inistate-core 0.1.0

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/index.js ADDED
@@ -0,0 +1,350 @@
1
+ #!/usr/bin/env node
2
+ /*!
3
+ * inistate-core v0.1.0
4
+ * Copyright (c) GNEY SOFTWARE PTE LTD. All rights reserved.
5
+ * Use governed by the Inistate Core Free-Use EULA (see LICENSE).
6
+ * Copying, redistribution, and reverse engineering are restricted.
7
+ */
8
+ var U7=Object.create;var Ch=Object.defineProperty;var W7=Object.getOwnPropertyDescriptor;var H7=Object.getOwnPropertyNames;var z7=Object.getPrototypeOf,X7=Object.prototype.hasOwnProperty;var Y=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var fr=(t,e)=>()=>(t&&(e=t(t=0)),e);var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),V7=(t,e)=>{for(var r in e)Ch(t,r,{get:e[r],enumerable:!0})},AR=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of H7(e))!X7.call(t,n)&&n!==r&&Ch(t,n,{get:()=>e[n],enumerable:!(i=W7(e,n))||i.enumerable});return t};var G7=(t,e,r)=>(r=t!=null?U7(z7(t)):{},AR(e||!t||!t.__esModule?Ch(r,"default",{value:t,enumerable:!0}):r,t)),Z7=t=>AR(Ch({},"__esModule",{value:!0}),t);var wt=w((xke,oA)=>{var{toString:aA}=Object.prototype,j9=/["&<>]/,Xi={each:function(e,r){e&&(Array.isArray(e)?e.forEach(r):Object.keys(e).forEach(i=>{r(e[i],i)}))},some:function(e,r){return e?Array.isArray(e)?e.some(r):Object.keys(e).some(i=>r(e[i],i)):!1},every:function(e,r){return e?Array.isArray(e)?e.every(r):Object.keys(e).every(i=>r(e[i],i)):!0},map:function(e,r){return e?Array.isArray(e)?e.map(r):Object.keys(e).map(i=>r(e[i],i)):[]},keyBy(t,e){return t.reduce((r,i)=>(r[i[e]]=i,r),{})},isEqual:function(e,r){let i=typeof e,n=typeof r,s=Array.isArray(e),a=Array.isArray(r),o;if(i!==n)return!1;switch(typeof e){case"object":if(s||a)return s&&a?e.length===r.length&&e.every((u,f)=>{let c=r[f];return Xi.isEqual(u,c)}):!1;if(e===null||r===null)return e===r;if(o=Object.keys(e),Object.keys(r).length!==o.length)return!1;for(let u of o)if(!r.hasOwnProperty(u))return!1;return Xi.every(e,(u,f)=>{let c=r[f];return Xi.isEqual(u,c)});default:return e===r}},escapeHtml(t){let e=j9.exec(t);if(!e)return t;let r="",i="",n=0,s=e.index;for(;s<t.length;s++){switch(t.charAt(s)){case'"':i="&quot;";break;case"&":i="&amp;";break;case"'":i="&apos;";break;case"<":i="&lt;";break;case">":i="&gt;";break;default:continue}n!==s&&(r+=t.substring(n,s)),n=s+1,r+=i}return n!==s?r+t.substring(n,s):r},strcmp(t,e){return t<e?-1:t>e?1:0},isUndefined(t){return aA.call(t)==="[object Undefined]"},isObject(t){return aA.call(t)==="[object Object]"},deepMerge(){let t=arguments[0]||{},{length:e}=arguments,r,i,n;function s(a,o){r=t[o],n=Array.isArray(a),Xi.isObject(a)||n?(n?(n=!1,i=r&&Array.isArray(r)?r:[]):i=r&&Xi.isObject(r)?r:{},t[o]=Xi.deepMerge(i,a)):Xi.isUndefined(a)||(t[o]=a)}for(let a=0;a<e;a++)Xi.each(arguments[a],s);return t}};oA.exports=Xi});var mt=w((Ske,lA)=>{var $9=/^[A-Z]+\d+$/,xu={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level(t){return t<=26?1:t<=676?2:3},_fill(t){let e,r,i,n,s,a=1;if(t>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&t>=1){for(;a<=26;)e=this._dictionary[a-1],this._n2l[a]=e,this._l2n[e]=a,a++;this._l2nFill=1}if(this._l2nFill<2&&t>=2){for(a=27;a<=702;)r=a-27,i=r%26,n=Math.floor(r/26),e=this._dictionary[n]+this._dictionary[i],this._n2l[a]=e,this._l2n[e]=a,a++;this._l2nFill=2}if(this._l2nFill<3&&t>=3){for(a=703;a<=16384;)r=a-703,i=r%26,n=Math.floor(r/26)%26,s=Math.floor(r/676),e=this._dictionary[s]+this._dictionary[n]+this._dictionary[i],this._n2l[a]=e,this._l2n[e]=a,a++;this._l2nFill=3}},l2n(t){if(this._l2n[t]||this._fill(t.length),!this._l2n[t])throw new Error(`Out of bounds. Invalid column letter: ${t}`);return this._l2n[t]},n2l(t){if(t<1||t>16384)throw new Error(`${t} is out of bounds. Excel supports columns from 1 to 16384`);return this._n2l[t]||this._fill(this._level(t)),this._n2l[t]},_hash:{},validateAddress(t){if(!$9.test(t))throw new Error(`Invalid Address: ${t}`);return!0},decodeAddress(t){let e=t.length<5&&this._hash[t];if(e)return e;let r=!1,i="",n=0,s=!1,a="",o=0;for(let f=0,c;f<t.length;f++)if(c=t.charCodeAt(f),!s&&c>=65&&c<=90)r=!0,i+=t[f],n=n*26+c-64;else if(c>=48&&c<=57)s=!0,a+=t[f],o=o*10+c-48;else if(s&&r&&c!==36)break;if(!r)n=void 0;else if(n>16384)throw new Error(`Out of bounds. Invalid column letter: ${i}`);s||(o=void 0),t=i+a;let u={address:t,col:n,row:o,$col$row:`$${i}$${a}`};return n<=100&&o<=100&&(this._hash[t]=u,this._hash[u.$col$row]=u),u},getAddress(t,e){if(e){let r=this.n2l(e)+t;return this.decodeAddress(r)}return this.decodeAddress(t)},decode(t){let e=t.split(":");if(e.length===2){let r=this.decodeAddress(e[0]),i=this.decodeAddress(e[1]),n={top:Math.min(r.row,i.row),left:Math.min(r.col,i.col),bottom:Math.max(r.row,i.row),right:Math.max(r.col,i.col)};return n.tl=this.n2l(n.left)+n.top,n.br=this.n2l(n.right)+n.bottom,n.dimensions=`${n.tl}:${n.br}`,n}return this.decodeAddress(t)},decodeEx(t){let e=t.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),r=e[1]||e[2],i=e[3],n=i.split(":");if(n.length>1){let a=this.decodeAddress(n[0]),o=this.decodeAddress(n[1]),u=Math.min(a.row,o.row),f=Math.min(a.col,o.col),c=Math.max(a.row,o.row),h=Math.max(a.col,o.col);return a=this.n2l(f)+u,o=this.n2l(h)+c,{top:u,left:f,bottom:c,right:h,sheetName:r,tl:{address:a,col:f,row:u,$col$row:`$${this.n2l(f)}$${u}`,sheetName:r},br:{address:o,col:h,row:c,$col$row:`$${this.n2l(h)}$${c}`,sheetName:r},dimensions:`${a}:${o}`}}if(i.startsWith("#"))return r?{sheetName:r,error:i}:{error:i};let s=this.decodeAddress(i);return r?{sheetName:r,...s}:s},encodeAddress(t,e){return xu.n2l(e)+t},encode(){switch(arguments.length){case 2:return xu.encodeAddress(arguments[0],arguments[1]);case 4:return`${xu.encodeAddress(arguments[0],arguments[1])}:${xu.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(t,e){let[r,i,,n,s]=t,[a,o]=e;return a>=r&&a<=n&&o>=i&&o<=s}};lA.exports=xu});var Vi=w((Eke,uA)=>{var vi=mt(),Zy=class t{constructor(){this.decode(arguments)}setTLBR(e,r,i,n,s){if(arguments.length<4){let a=vi.decodeAddress(e),o=vi.decodeAddress(r);this.model={top:Math.min(a.row,o.row),left:Math.min(a.col,o.col),bottom:Math.max(a.row,o.row),right:Math.max(a.col,o.col),sheetName:i},this.setTLBR(a.row,a.col,o.row,o.col,s)}else this.model={top:Math.min(e,i),left:Math.min(r,n),bottom:Math.max(e,i),right:Math.max(r,n),sheetName:s}}decode(e){switch(e.length){case 5:this.setTLBR(e[0],e[1],e[2],e[3],e[4]);break;case 4:this.setTLBR(e[0],e[1],e[2],e[3]);break;case 3:this.setTLBR(e[0],e[1],e[2]);break;case 2:this.setTLBR(e[0],e[1]);break;case 1:{let r=e[0];if(r instanceof t)this.model={top:r.model.top,left:r.model.left,bottom:r.model.bottom,right:r.model.right,sheetName:r.sheetName};else if(r instanceof Array)this.decode(r);else if(r.top&&r.left&&r.bottom&&r.right)this.model={top:r.top,left:r.left,bottom:r.bottom,right:r.right,sheetName:r.sheetName};else{let i=vi.decodeEx(r);i.top?this.model={top:i.top,left:i.left,bottom:i.bottom,right:i.right,sheetName:i.sheetName}:this.model={top:i.row,left:i.col,bottom:i.row,right:i.col,sheetName:i.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error(`Invalid number of arguments to _getDimensions() - ${e.length}`)}}get top(){return this.model.top||1}set top(e){this.model.top=e}get left(){return this.model.left||1}set left(e){this.model.left=e}get bottom(){return this.model.bottom||1}set bottom(e){this.model.bottom=e}get right(){return this.model.right||1}set right(e){this.model.right=e}get sheetName(){return this.model.sheetName}set sheetName(e){this.model.sheetName=e}get _serialisedSheetName(){let{sheetName:e}=this.model;return e?/^[a-zA-Z0-9]*$/.test(e)?`${e}!`:`'${e}'!`:""}expand(e,r,i,n){(!this.model.top||e<this.top)&&(this.top=e),(!this.model.left||r<this.left)&&(this.left=r),(!this.model.bottom||i>this.bottom)&&(this.bottom=i),(!this.model.right||n>this.right)&&(this.right=n)}expandRow(e){if(e){let{dimensions:r,number:i}=e;r&&this.expand(i,r.min,i,r.max)}}expandToAddress(e){let r=vi.decodeEx(e);this.expand(r.row,r.col,r.row,r.col)}get tl(){return vi.n2l(this.left)+this.top}get $t$l(){return`$${vi.n2l(this.left)}$${this.top}`}get br(){return vi.n2l(this.right)+this.bottom}get $b$r(){return`$${vi.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(e){return!(e.sheetName&&this.sheetName&&e.sheetName!==this.sheetName||e.bottom<this.top||e.top>this.bottom||e.right<this.left||e.left>this.right)}contains(e){let r=vi.decodeEx(e);return this.containsEx(r)}containsEx(e){return e.sheetName&&this.sheetName&&e.sheetName!==this.sheetName?!1:e.row>=this.top&&e.row<=this.bottom&&e.col>=this.left&&e.col<=this.right}forEachAddress(e){for(let r=this.left;r<=this.right;r++)for(let i=this.top;i<=this.bottom;i++)e(vi.encodeAddress(i,r),i,r)}};uA.exports=Zy});var ni=w((Tke,fA)=>{"use strict";fA.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}});var hA=w((Cke,cA)=>{var Mh=mt(),U9=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,W9=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;function H9(t,e,r){let i=Mh.decode(e),n=Mh.decode(r);return t.replace(U9,(s,a,o,u,f)=>{if(f)return s;let c=W9.exec(u);if(c){let h=c[1],d=c[2].toUpperCase(),p=c[3],g=c[4];if(d.length>3||d.length===3&&d>"XFD")return s;let y=Mh.l2n(d),v=parseInt(g,10);return h||(y+=n.col-i.col),p||(v+=n.row-i.row),(a||"")+(h||"")+Mh.n2l(y)+(p||"")+v}return s})}cA.exports={slideFormula:H9}});var pA=w((kke,dA)=>{var z9=wt(),Ph=class t{constructor(e){this.note=e}get model(){let e=null;return typeof this.note==="string"?e={type:"note",note:{texts:[{text:this.note}]}}:e={type:"note",note:this.note},z9.deepMerge({},t.DEFAULT_CONFIGS,e)}set model(e){let{note:r}=e,{texts:i}=r;i.length===1&&Object.keys(i[0]).length===1?this.note=i[0].text:this.note=r}static fromModel(e){let r=new t;return r.model=e,r}};Ph.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}};dA.exports=Ph});var yA=w((Rke,mA)=>{var X9=mt(),V9=wt(),si=ni(),{slideFormula:G9}=hA(),gA=pA(),fe=class t{constructor(e,r,i){if(!e||!r)throw new Error("A Cell needs a Row");this._row=e,this._column=r,X9.validateAddress(i),this._address=i,this._value=Dn.create(t.Types.Null,this),this.style=this._mergeStyle(e.style,r.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(e){this.style.numFmt=e}get font(){return this.style.font}set font(e){this.style.font=e}get alignment(){return this.style.alignment}set alignment(e){this.style.alignment=e}get border(){return this.style.border}set border(e){this.style.border=e}get fill(){return this.style.fill}set fill(e){this.style.fill=e}get protection(){return this.style.protection}set protection(e){this.style.protection=e}_mergeStyle(e,r,i){let n=e&&e.numFmt||r&&r.numFmt;n&&(i.numFmt=n);let s=e&&e.font||r&&r.font;s&&(i.font=s);let a=e&&e.alignment||r&&r.alignment;a&&(i.alignment=a);let o=e&&e.border||r&&r.border;o&&(i.border=o);let u=e&&e.fill||r&&r.fill;u&&(i.fill=u);let f=e&&e.protection||r&&r.protection;return f&&(i.protection=f),i}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===t.Types.Merge}merge(e,r){this._value.release(),this._value=Dn.create(t.Types.Merge,this,e),r||(this.style=e.style)}unmerge(){this.type===t.Types.Merge&&(this._value.release(),this._value=Dn.create(t.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(e){return this._value.type!==t.Types.Merge?!1:this._value.isMergedTo(e)}get master(){return this.type===t.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===t.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(e){if(this.type===t.Types.Merge){this._value.master.value=e;return}this._value.release(),this._value=Dn.create(Dn.getType(e),this,e)}get note(){return this._comment&&this._comment.note}set note(e){this._comment=new gA(e)}get text(){return this._value.toString()}get html(){return V9.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(e){this.type===t.Types.String&&(this._value=Dn.create(t.Types.Hyperlink,this,{text:this._value.value,hyperlink:e}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:e}=this._row;return{sheetName:e.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(e){this.names=[e]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(e){let{definedNames:r}=this.workbook;r.removeAllNames(this.fullAddress),e.forEach(i=>{r.addEx(this.fullAddress,i)})}addName(e){this.workbook.definedNames.addEx(this.fullAddress,e)}removeName(e){this.workbook.definedNames.removeEx(this.fullAddress,e)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(e){this._dataValidations.add(this.address,e)}get model(){let{model:e}=this._value;return e.style=this.style,this._comment&&(e.comment=this._comment.model),e}set model(e){this._value.release(),this._value=Dn.create(e.type,this),this._value.model=e,e.comment&&e.comment.type==="note"&&(this._comment=gA.fromModel(e.comment)),e.style?this.style=e.style:this.style={}}};fe.Types=si.ValueType;var Yy=class{constructor(e){this.model={address:e.address,type:fe.Types.Null}}get value(){return null}set value(e){}get type(){return fe.Types.Null}get effectiveType(){return fe.Types.Null}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return""}release(){}toString(){return""}},Ky=class{constructor(e,r){this.model={address:e.address,type:fe.Types.Number,value:r}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return fe.Types.Number}get effectiveType(){return fe.Types.Number}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}},Qy=class{constructor(e,r){this.model={address:e.address,type:fe.Types.String,value:r}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return fe.Types.String}get effectiveType(){return fe.Types.String}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}},Jy=class{constructor(e,r){this.model={address:e.address,type:fe.Types.String,value:r}}get value(){return this.model.value}set value(e){this.model.value=e}toString(){return this.model.value.richText.map(e=>e.text).join("")}get type(){return fe.Types.RichText}get effectiveType(){return fe.Types.RichText}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}},ev=class{constructor(e,r){this.model={address:e.address,type:fe.Types.Date,value:r}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return fe.Types.Date}get effectiveType(){return fe.Types.Date}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}},tv=class{constructor(e,r){this.model={address:e.address,type:fe.Types.Hyperlink,text:r?r.text:void 0,hyperlink:r?r.hyperlink:void 0},r&&r.tooltip&&(this.model.tooltip=r.tooltip)}get value(){let e={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(e.tooltip=this.model.tooltip),e}set value(e){this.model={text:e.text,hyperlink:e.hyperlink},e.tooltip&&(this.model.tooltip=e.tooltip)}get text(){return this.model.text}set text(e){this.model.text=e}get hyperlink(){return this.model.hyperlink}set hyperlink(e){this.model.hyperlink=e}get type(){return fe.Types.Hyperlink}get effectiveType(){return fe.Types.Hyperlink}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}},rv=class{constructor(e,r){this.model={address:e.address,type:fe.Types.Merge,master:r?r.address:void 0},this._master=r,r&&r.addMergeRef()}get value(){return this._master.value}set value(e){e instanceof fe?(this._master&&this._master.releaseMergeRef(),e.addMergeRef(),this._master=e):this._master.value=e}isMergedTo(e){return e===this._master}get master(){return this._master}get type(){return fe.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}},iv=class{constructor(e,r){this.cell=e,this.model={address:e.address,type:fe.Types.Formula,shareType:r?r.shareType:void 0,ref:r?r.ref:void 0,formula:r?r.formula:void 0,sharedFormula:r?r.sharedFormula:void 0,result:r?r.result:void 0}}_copyModel(e){let r={},i=n=>{let s=e[n];s&&(r[n]=s)};return i("formula"),i("result"),i("ref"),i("shareType"),i("sharedFormula"),r}get value(){return this._copyModel(this.model)}set value(e){this.model=this._copyModel(e)}validate(e){switch(Dn.getType(e)){case fe.Types.Null:case fe.Types.String:case fe.Types.Number:case fe.Types.Date:break;case fe.Types.Hyperlink:case fe.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){let e=this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),r=this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g);return{ranges:e,cells:r}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(e){this.model.formula=e}get formulaType(){return this.model.formula?si.FormulaType.Master:this.model.sharedFormula?si.FormulaType.Shared:si.FormulaType.None}get result(){return this.model.result}set result(e){this.model.result=e}get type(){return fe.Types.Formula}get effectiveType(){let e=this.model.result;return e==null?si.ValueType.Null:e instanceof String||typeof e=="string"?si.ValueType.String:typeof e=="number"?si.ValueType.Number:e instanceof Date?si.ValueType.Date:e.text&&e.hyperlink?si.ValueType.Hyperlink:e.formula?si.ValueType.Formula:si.ValueType.Null}get address(){return this.model.address}set address(e){this.model.address=e}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:e}=this.cell,r=e.findCell(this.model.sharedFormula);this._translatedFormula=r&&G9(r.formula,r.address,this.model.address)}return this._translatedFormula}toCsvString(){return`${this.model.result||""}`}release(){}toString(){return this.model.result?this.model.result.toString():""}},nv=class{constructor(e,r){this.model={address:e.address,type:fe.Types.SharedString,value:r}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return fe.Types.SharedString}get effectiveType(){return fe.Types.SharedString}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}},sv=class{constructor(e,r){this.model={address:e.address,type:fe.Types.Boolean,value:r}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return fe.Types.Boolean}get effectiveType(){return fe.Types.Boolean}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}},av=class{constructor(e,r){this.model={address:e.address,type:fe.Types.Error,value:r}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return fe.Types.Error}get effectiveType(){return fe.Types.Error}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}},ov=class{constructor(e,r){this.model={address:e.address,type:fe.Types.String,value:JSON.stringify(r),rawValue:r}}get value(){return this.model.rawValue}set value(e){this.model.rawValue=e,this.model.value=JSON.stringify(e)}get type(){return fe.Types.String}get effectiveType(){return fe.Types.String}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}},Dn={getType(t){return t==null?fe.Types.Null:t instanceof String||typeof t=="string"?fe.Types.String:typeof t=="number"?fe.Types.Number:typeof t=="boolean"?fe.Types.Boolean:t instanceof Date?fe.Types.Date:t.text&&t.hyperlink?fe.Types.Hyperlink:t.formula||t.sharedFormula?fe.Types.Formula:t.richText?fe.Types.RichText:t.sharedString?fe.Types.SharedString:t.error?fe.Types.Error:fe.Types.JSON},types:[{t:fe.Types.Null,f:Yy},{t:fe.Types.Number,f:Ky},{t:fe.Types.String,f:Qy},{t:fe.Types.Date,f:ev},{t:fe.Types.Hyperlink,f:tv},{t:fe.Types.Formula,f:iv},{t:fe.Types.Merge,f:rv},{t:fe.Types.JSON,f:ov},{t:fe.Types.SharedString,f:nv},{t:fe.Types.RichText,f:Jy},{t:fe.Types.Boolean,f:sv},{t:fe.Types.Error,f:av}].reduce((t,e)=>(t[e.t]=e.f,t),[]),create(t,e,r){let i=this.types[t];if(!i)throw new Error(`Could not create Value of type ${t}`);return new i(e,r)}};mA.exports=fe});var Lh=w((Ake,_A)=>{"use strict";var Z9=wt(),qh=ni(),qs=mt(),vA=yA(),lv=class{constructor(e,r){this._worksheet=e,this._number=r,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(e){return this._cells[e-1]}getCellEx(e){let r=this._cells[e.col-1];if(!r){let i=this._worksheet.getColumn(e.col);r=new vA(this,i,e.address),this._cells[e.col-1]=r}return r}getCell(e){if(typeof e=="string"){let r=this._worksheet.getColumnKey(e);r?e=r.number:e=qs.l2n(e)}return this._cells[e-1]||this.getCellEx({address:qs.encodeAddress(this._number,e),row:this._number,col:e})}splice(e,r,...i){let n=e+r,s=i.length-r,a=this._cells.length,o,u,f;if(s<0)for(o=e+i.length;o<=a;o++)f=this._cells[o-1],u=this._cells[o-s-1],u?(f=this.getCell(o),f.value=u.value,f.style=u.style,f._comment=u._comment):f&&(f.value=null,f.style={},f._comment=void 0);else if(s>0)for(o=a;o>=n;o--)u=this._cells[o-1],u?(f=this.getCell(o+s),f.value=u.value,f.style=u.style,f._comment=u._comment):this._cells[o+s-1]=void 0;for(o=0;o<i.length;o++)f=this.getCell(e+o),f.value=i[o],f.style={},f._comment=void 0}eachCell(e,r){if(r||(r=e,e=null),e&&e.includeEmpty){let i=this._cells.length;for(let n=1;n<=i;n++)r(this.getCell(n),n)}else this._cells.forEach((i,n)=>{i&&i.type!==qh.ValueType.Null&&r(i,n+1)})}addPageBreak(e,r){let i=this._worksheet,n=Math.max(0,e-1)||0,s=Math.max(0,r-1)||16838,a={id:this._number,max:s,man:1};n&&(a.min=n),i.rowBreaks.push(a)}get values(){let e=[];return this._cells.forEach(r=>{r&&r.type!==qh.ValueType.Null&&(e[r.col]=r.value)}),e}set values(e){if(this._cells=[],e)if(e instanceof Array){let r=0;e.hasOwnProperty("0")&&(r=1),e.forEach((i,n)=>{i!==void 0&&(this.getCellEx({address:qs.encodeAddress(this._number,n+r),row:this._number,col:n+r}).value=i)})}else this._worksheet.eachColumnKey((r,i)=>{e[i]!==void 0&&(this.getCellEx({address:qs.encodeAddress(this._number,r.number),row:this._number,col:r.number}).value=e[i])})}get hasValues(){return Z9.some(this._cells,e=>e&&e.type!==qh.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let e=0;return this.eachCell(()=>{e++}),e}get dimensions(){let e=0,r=0;return this._cells.forEach(i=>{i&&i.type!==qh.ValueType.Null&&((!e||e>i.col)&&(e=i.col),r<i.col&&(r=i.col))}),e>0?{min:e,max:r}:null}_applyStyle(e,r){return this.style[e]=r,this._cells.forEach(i=>{i&&(i[e]=r)}),r}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle("numFmt",e)}get font(){return this.style.font}set font(e){this._applyStyle("font",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle("alignment",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle("protection",e)}get border(){return this.style.border}set border(e){this._applyStyle("border",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle("fill",e)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let e=[],r=0,i=0;return this._cells.forEach(n=>{if(n){let s=n.model;s&&((!r||r>n.col)&&(r=n.col),i<n.col&&(i=n.col),e.push(s))}}),this.height||e.length?{cells:e,number:this.number,min:r,max:i,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(e){if(e.number!==this._number)throw new Error("Invalid row number in model");this._cells=[];let r;e.cells.forEach(i=>{switch(i.type){case vA.Types.Merge:break;default:{let n;if(i.address)n=qs.decodeAddress(i.address);else if(r){let{row:a}=r,o=r.col+1;n={row:a,col:o,address:qs.encodeAddress(a,o),$col$row:`$${qs.n2l(o)}$${a}`}}r=n;let s=this.getCellEx(n);s.model=i;break}}}),e.height?this.height=e.height:delete this.height,this.hidden=e.hidden,this.outlineLevel=e.outlineLevel||0,this.style=e.style&&JSON.parse(JSON.stringify(e.style))||{}}};_A.exports=lv});var Bh=w((Oke,wA)=>{"use strict";var Y9=wt(),K9=ni(),Q9=mt(),uv=9,fv=class t{constructor(e,r,i){this._worksheet=e,this._number=r,i!==!1&&(this.defn=i)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return Q9.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==uv}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(e){e?(this.key=e.key,this.width=e.width!==void 0?e.width:uv,this.outlineLevel=e.outlineLevel,e.style?this.style=e.style:this.style={},this.header=e.header,this._hidden=!!e.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(e){e!==void 0?(this._header=e,this.headers.forEach((r,i)=>{this._worksheet.getCell(i+1,this.number).value=r})):this._header=void 0}get key(){return this._key}set key(e){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=e,e&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(e){return this.width===e.width&&this.hidden===e.hidden&&this.outlineLevel===e.outlineLevel&&Y9.isEqual(this.style,e.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;let e=this.style;return!(e&&(e.font||e.numFmt||e.alignment||e.border||e.fill||e.protection))}get headerCount(){return this.headers.length}eachCell(e,r){let i=this.number;r||(r=e,e=null),this._worksheet.eachRow(e,(n,s)=>{r(n.getCell(i),s)})}get values(){let e=[];return this.eachCell((r,i)=>{r&&r.type!==K9.ValueType.Null&&(e[i]=r.value)}),e}set values(e){if(!e)return;let r=this.number,i=0;e.hasOwnProperty("0")&&(i=1),e.forEach((n,s)=>{this._worksheet.getCell(s+i,r).value=n})}_applyStyle(e,r){return this.style[e]=r,this.eachCell(i=>{i[e]=r}),r}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle("numFmt",e)}get font(){return this.style.font}set font(e){this._applyStyle("font",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle("alignment",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle("protection",e)}get border(){return this.style.border}set border(e){this._applyStyle("border",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle("fill",e)}static toModel(e){let r=[],i=null;return e&&e.forEach((n,s)=>{n.isDefault?i&&(i=null):!i||!n.equivalentTo(i)?(i={min:s+1,max:s+1,width:n.width!==void 0?n.width:uv,style:n.style,isCustomWidth:n.isCustomWidth,hidden:n.hidden,outlineLevel:n.outlineLevel,collapsed:n.collapsed},r.push(i)):i.max=s+1}),r.length?r:void 0}static fromModel(e,r){r=r||[];let i=[],n=1,s=0;for(r=r.sort(function(a,o){return a.min-o.min});s<r.length;){let a=r[s++];for(;n<a.min;)i.push(new t(e,n++));for(;n<=a.max;)i.push(new t(e,n++,a))}return i.length?i:null}};wA.exports=fv});var xA=w((Ike,bA)=>{"use strict";var J9=mt(),cv=class t{constructor(e,r,i=0){if(this.worksheet=e,!r)this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;else if(typeof r=="string"){let n=J9.decodeAddress(r);this.nativeCol=n.col+i,this.nativeColOff=0,this.nativeRow=n.row+i,this.nativeRowOff=0}else r.nativeCol!==void 0?(this.nativeCol=r.nativeCol||0,this.nativeColOff=r.nativeColOff||0,this.nativeRow=r.nativeRow||0,this.nativeRowOff=r.nativeRowOff||0):r.col!==void 0?(this.col=r.col+i,this.row=r.row+i):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0)}static asInstance(e){return e instanceof t||e==null?e:new t(e)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(e){this.nativeCol=Math.floor(e),this.nativeColOff=Math.floor((e-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(e){this.nativeRow=Math.floor(e),this.nativeRowOff=Math.floor((e-this.nativeRow)*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(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(this.worksheet.getRow(this.nativeRow+1).height*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}};bA.exports=cv});var EA=w((Nke,SA)=>{var eG=mt(),jh=xA(),hv=class{constructor(e,r){this.worksheet=e,this.model=r}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model({type:e,imageId:r,range:i,hyperlinks:n}){if(this.type=e,this.imageId=r,e==="image")if(typeof i=="string"){let s=eG.decode(i);this.range={tl:new jh(this.worksheet,{col:s.left,row:s.top},-1),br:new jh(this.worksheet,{col:s.right,row:s.bottom},0),editAs:"oneCell"}}else this.range={tl:new jh(this.worksheet,i.tl,0),br:i.br&&new jh(this.worksheet,i.br,0),ext:i.ext,editAs:i.editAs,hyperlinks:n||i.hyperlinks}}};SA.exports=hv});var CA=w((Dke,TA)=>{var $h=mt(),dv=class{constructor(e,r,i){this.table=e,this.column=r,this.index=i}_set(e,r){this.table.cacheState(),this.column[e]=r}get name(){return this.column.name}set name(e){this._set("name",e)}get filterButton(){return this.column.filterButton}set filterButton(e){this.column.filterButton=e}get style(){return this.column.style}set style(e){this.column.style=e}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(e){this._set("totalsRowLabel",e)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(e){this._set("totalsRowFunction",e)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(e){this._set("totalsRowResult",e)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(e){this._set("totalsRowFormula",e)}},pv=class{constructor(e,r){this.worksheet=e,r&&(this.table=r,this.validate(),this.store())}getFormula(e){switch(e.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${e.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${e.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${e.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${e.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${e.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${e.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${e.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${e.name}])`;case"custom":return e.totalsRowFormula;default:throw new Error(`Invalid Totals Row Function: ${e.totalsRowFunction}`)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:e}=this,r=(f,c,h)=>{f[c]===void 0&&(f[c]=h)};r(e,"headerRow",!0),r(e,"totalsRow",!1),r(e,"style",{}),r(e.style,"theme","TableStyleMedium2"),r(e.style,"showFirstColumn",!1),r(e.style,"showLastColumn",!1),r(e.style,"showRowStripes",!1),r(e.style,"showColumnStripes",!1);let i=(f,c)=>{if(!f)throw new Error(c)};i(e.ref,"Table must have ref"),i(e.columns,"Table must have column definitions"),i(e.rows,"Table must have row definitions"),e.tl=$h.decodeAddress(e.ref);let{row:n,col:s}=e.tl;i(n>0,"Table must be on valid row"),i(s>0,"Table must be on valid col");let{width:a,filterHeight:o,tableHeight:u}=this;e.autoFilterRef=$h.encode(n,s,n+o-1,s+a-1),e.tableRef=$h.encode(n,s,n+u-1,s+a-1),e.columns.forEach((f,c)=>{i(f.name,`Column ${c} must have a name`),c===0?r(f,"totalsRowLabel","Total"):(r(f,"totalsRowFunction","none"),f.totalsRowFormula=this.getFormula(f))})}store(){let e=(o,u)=>{u&&Object.keys(u).forEach(f=>{o[f]=u[f]})},{worksheet:r,table:i}=this,{row:n,col:s}=i.tl,a=0;if(i.headerRow){let o=r.getRow(n+a++);i.columns.forEach((u,f)=>{let{style:c,name:h}=u,d=o.getCell(s+f);d.value=h,e(d,c)})}if(i.rows.forEach(o=>{let u=r.getRow(n+a++);o.forEach((f,c)=>{let h=u.getCell(s+c);h.value=f,e(h,i.columns[c].style)})}),i.totalsRow){let o=r.getRow(n+a++);i.columns.forEach((u,f)=>{let c=o.getCell(s+f);f===0?c.value=u.totalsRowLabel:this.getFormula(u)?c.value={formula:u.totalsRowFormula,result:u.totalsRowResult}:c.value=null,e(c,u.style)})}}load(e){let{table:r}=this,{row:i,col:n}=r.tl,s=0;if(r.headerRow){let a=e.getRow(i+s++);r.columns.forEach((o,u)=>{let f=a.getCell(n+u);f.value=o.name})}if(r.rows.forEach(a=>{let o=e.getRow(i+s++);a.forEach((u,f)=>{let c=o.getCell(n+f);c.value=u})}),r.totalsRow){let a=e.getRow(i+s++);r.columns.forEach((o,u)=>{let f=a.getCell(n+u);u===0?f.value=o.totalsRowLabel:this.getFormula(o)&&(f.value={formula:o.totalsRowFormula,result:o.totalsRowResult})})}}get model(){return this.table}set model(e){this.table=e}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();let e=$h.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let r=0;r<this._cache.tableHeight;r++){let i=this.worksheet.getRow(e.row+r);for(let n=0;n<this._cache.width;n++){let s=i.getCell(e.col+n);s.value=null}}else{for(let r=this.tableHeight;r<this._cache.tableHeight;r++){let i=this.worksheet.getRow(e.row+r);for(let n=0;n<this._cache.width;n++){let s=i.getCell(e.col+n);s.value=null}}for(let r=0;r<this.tableHeight;r++){let i=this.worksheet.getRow(e.row+r);for(let n=this.width;n<this._cache.width;n++){let s=i.getCell(e.col+n);s.value=null}}}this.store()}addRow(e,r){this.cacheState(),r===void 0?this.table.rows.push(e):this.table.rows.splice(r,0,e)}removeRows(e,r=1){this.cacheState(),this.table.rows.splice(e,r)}getColumn(e){let r=this.table.columns[e];return new dv(this,r,e)}addColumn(e,r,i){this.cacheState(),i===void 0?(this.table.columns.push(e),this.table.rows.forEach((n,s)=>{n.push(r[s])})):(this.table.columns.splice(i,0,e),this.table.rows.forEach((n,s)=>{n.splice(i,0,r[s])}))}removeColumns(e,r=1){this.cacheState(),this.table.columns.splice(e,r),this.table.rows.forEach(i=>{i.splice(e,r)})}_assign(e,r,i){this.cacheState(),e[r]=i}get ref(){return this.table.ref}set ref(e){this._assign(this.table,"ref",e)}get name(){return this.table.name}set name(e){this.table.name=e}get displayName(){return this.table.displyName||this.table.name}set displayNamename(e){this.table.displayName=e}get headerRow(){return this.table.headerRow}set headerRow(e){this._assign(this.table,"headerRow",e)}get totalsRow(){return this.table.totalsRow}set totalsRow(e){this._assign(this.table,"totalsRow",e)}get theme(){return this.table.style.name}set theme(e){this.table.style.name=e}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(e){this.table.style.showFirstColumn=e}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(e){this.table.style.showLastColumn=e}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(e){this.table.style.showRowStripes=e}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(e){this.table.style.showColumnStripes=e}};TA.exports=pv});var mv=w((Fke,kA)=>{var gv=class{constructor(e){this.model=e||{}}add(e,r){return this.model[e]=r}find(e){return this.model[e]}remove(e){this.model[e]=void 0}};kA.exports=gv});var vv=w((Mke,RA)=>{"use strict";var yv=Y("crypto"),tG={hash(t,...e){let r=yv.createHash(t);return r.update(Buffer.concat(e)),r.digest()},convertPasswordToHash(t,e,r,i){if(e=e.toLowerCase(),yv.getHashes().indexOf(e)<0)throw new Error(`Hash algorithm '${e}' not supported!`);let s=Buffer.from(t,"utf16le"),a=this.hash(e,Buffer.from(r,"base64"),s);for(let o=0;o<i;o++){let u=Buffer.alloc(4);u.writeUInt32LE(o,0),a=this.hash(e,a,u)}return a.toString("base64")},randomBytes(t){return yv.randomBytes(t)}};RA.exports=tG});var IA=w(OA=>{var AA=(t,e)=>({...t,...e.reduce((r,i)=>(t[i]&&(r[i]={...t[i]}),r),{})}),_i=(t,e,r,i=[])=>{t[r]&&(e[r]=AA(t[r],i))},rG=t=>Object.keys(t).length===0,iG=t=>{if(!t)return t;if(rG(t))return{};let e={...t};return _i(t,e,"font",["color"]),_i(t,e,"alignment"),_i(t,e,"protection"),t.border&&(_i(t,e,"border"),_i(t.border,e.border,"top",["color"]),_i(t.border,e.border,"left",["color"]),_i(t.border,e.border,"bottom",["color"]),_i(t.border,e.border,"right",["color"]),_i(t.border,e.border,"diagonal",["color"])),t.fill&&(_i(t,e,"fill",["fgColor","bgColor","center"]),t.fill.stops&&(e.fill.stops=t.fill.stops.map(r=>AA(r,["color"])))),e};OA.copyStyle=iG});var LA=w((qke,qA)=>{var Su=wt(),Eu=mt(),Tu=Vi(),NA=Lh(),Uh=Bh(),nG=ni(),_v=EA(),DA=CA(),FA=mv(),MA=vv(),{copyStyle:PA}=IA(),wv=class{constructor(e){e=e||{},this._workbook=e.workbook,this.id=e.id,this.orderNo=e.orderNo,this.name=e.name,this.state=e.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},e.properties),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,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},e.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},e.headerFooter),this.dataValidations=new FA,this.views=e.views||[],this.autoFilter=e.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(e){if(e===void 0&&(e=`sheet${this.id}`),this._name!==e){if(typeof e!="string")throw new Error("The name has to be a string.");if(e==="")throw new Error("The name can't be empty.");if(e==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(e))throw new Error(`Worksheet name ${e} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(e))throw new Error(`The first or last character of worksheet name cannot be a single quotation mark: ${e}`);if(e&&e.length>31&&(console.warn(`Worksheet name ${e} exceeds 31 chars. This will be truncated`),e=e.substring(0,31)),this._workbook._worksheets.find(r=>r&&r.name.toLowerCase()===e.toLowerCase()))throw new Error(`Worksheet name already exists: ${e}`);this._name=e}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let e=new Tu;return this._rows.forEach(r=>{if(r){let i=r.dimensions;i&&e.expand(r.number,i.min,r.number,i.max)}}),e}get columns(){return this._columns}set columns(e){this._headerRowCount=e.reduce((n,s)=>{let a=s.header&&1||s.headers&&s.headers.length||0;return Math.max(n,a)},0);let r=1,i=this._columns=[];e.forEach(n=>{let s=new Uh(this,r++,!1);i.push(s),s.defn=n})}getColumnKey(e){return this._keys[e]}setColumnKey(e,r){this._keys[e]=r}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){Su.each(this._keys,e)}getColumn(e){if(typeof e=="string"){let r=this._keys[e];if(r)return r;e=Eu.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){let r=this._columns.length+1;for(;r<=e;)this._columns.push(new Uh(this,r++))}return this._columns[e-1]}spliceColumns(e,r,...i){let s=this._rows.length;if(i.length>0)for(let f=0;f<s;f++){let c=[e,r];i.forEach(d=>{c.push(d[f]||null)});let h=this.getRow(f+1);h.splice.apply(h,c)}else this._rows.forEach(f=>{f&&f.splice(e,r)});let a=i.length-r,o=e+r,u=this._columns.length;if(a<0)for(let f=e+i.length;f<=u;f++)this.getColumn(f).defn=this.getColumn(f-a).defn;else if(a>0)for(let f=u;f>=o;f--)this.getColumn(f+a).defn=this.getColumn(f).defn;for(let f=e;f<e+i.length;f++)this.getColumn(f).defn=null;this.workbook.definedNames.spliceColumns(this.name,e,r,i.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let e=0;return this.eachRow(r=>{e=Math.max(e,r.cellCount)}),e}get actualColumnCount(){let e=[],r=0;return this.eachRow(i=>{i.eachCell(({col:n})=>{e[n]||(e[n]=!0,r++)})}),r}_commitRow(){}get _lastRowNumber(){let e=this._rows,r=e.length;for(;r>0&&e[r-1]===void 0;)r--;return r}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(e){return this._rows[e-1]}findRows(e,r){return this._rows.slice(e-1,e-1+r)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let e=0;return this.eachRow(()=>{e++}),e}getRow(e){let r=this._rows[e-1];return r||(r=this._rows[e-1]=new NA(this,e)),r}getRows(e,r){if(r<1)return;let i=[];for(let n=e;n<e+r;n++)i.push(this.getRow(n));return i}addRow(e,r="n"){let i=this._nextRow,n=this.getRow(i);return n.values=e,this._setStyleOption(i,r[0]==="i"?r:"n"),n}addRows(e,r="n"){let i=[];return e.forEach(n=>{i.push(this.addRow(n,r))}),i}insertRow(e,r,i="n"){return this.spliceRows(e,0,r),this._setStyleOption(e,i),this.getRow(e)}insertRows(e,r,i="n"){if(this.spliceRows(e,0,...r),i!=="n")for(let n=0;n<r.length;n++)i[0]==="o"&&this.findRow(r.length+e+n)!==void 0?this._copyStyle(r.length+e+n,e+n,i[1]==="+"):i[0]==="i"&&this.findRow(e-1)!==void 0&&this._copyStyle(e-1,e+n,i[1]==="+");return this.getRows(e,r.length)}_setStyleOption(e,r="n"){r[0]==="o"&&this.findRow(e+1)!==void 0?this._copyStyle(e+1,e,r[1]==="+"):r[0]==="i"&&this.findRow(e-1)!==void 0&&this._copyStyle(e-1,e,r[1]==="+")}_copyStyle(e,r,i=!1){let n=this.getRow(e),s=this.getRow(r);s.style=PA(n.style),n.eachCell({includeEmpty:i},(a,o)=>{s.getCell(o).style=PA(a.style)}),s.height=n.height}duplicateRow(e,r,i=!1){let n=this._rows[e-1],s=new Array(r).fill(n.values);this.spliceRows(e+1,i?0:r,...s);for(let a=0;a<r;a++){let o=this._rows[e+a];o.style=n.style,o.height=n.height,n.eachCell({includeEmpty:!0},(u,f)=>{o.getCell(f).style=u.style})}}spliceRows(e,r,...i){let n=e+r,s=i.length,a=s-r,o=this._rows.length,u,f;if(a<0)for(e===o&&(this._rows[o-1]=void 0),u=n;u<=o;u++)if(f=this._rows[u-1],f){let c=this.getRow(u+a);c.values=f.values,c.style=f.style,c.height=f.height,f.eachCell({includeEmpty:!0},(h,d)=>{c.getCell(d).style=h.style}),this._rows[u-1]=void 0}else this._rows[u+a-1]=void 0;else if(a>0)for(u=o;u>=n;u--)if(f=this._rows[u-1],f){let c=this.getRow(u+a);c.values=f.values,c.style=f.style,c.height=f.height,f.eachCell({includeEmpty:!0},(h,d)=>{if(c.getCell(d).style=h.style,h._value.constructor.name==="MergeValue"){let p=this.getRow(h._row._number+s).getCell(d),g=h._value._master,y=this.getRow(g._row._number+s).getCell(g._column._number);p.merge(y)}})}else this._rows[u+a-1]=void 0;for(u=0;u<s;u++){let c=this.getRow(e+u);c.style={},c.values=i[u]}this.workbook.definedNames.spliceRows(this.name,e,r,s)}eachRow(e,r){if(r||(r=e,e=void 0),e&&e.includeEmpty){let i=this._rows.length;for(let n=1;n<=i;n++)r(this.getRow(n),n)}else this._rows.forEach(i=>{i&&i.hasValues&&r(i,i.number)})}getSheetValues(){let e=[];return this._rows.forEach(r=>{r&&(e[r.number]=r.values)}),e}findCell(e,r){let i=Eu.getAddress(e,r),n=this._rows[i.row-1];return n?n.findCell(i.col):void 0}getCell(e,r){let i=Eu.getAddress(e,r);return this.getRow(i.row).getCellEx(i)}mergeCells(...e){let r=new Tu(e);this._mergeCellsInternal(r)}mergeCellsWithoutStyle(...e){let r=new Tu(e);this._mergeCellsInternal(r,!0)}_mergeCellsInternal(e,r){Su.each(this._merges,n=>{if(n.intersects(e))throw new Error("Cannot merge already merged cells")});let i=this.getCell(e.top,e.left);for(let n=e.top;n<=e.bottom;n++)for(let s=e.left;s<=e.right;s++)(n>e.top||s>e.left)&&this.getCell(n,s).merge(i,r);this._merges[i.address]=e}_unMergeMaster(e){let r=this._merges[e.address];if(r){for(let i=r.top;i<=r.bottom;i++)for(let n=r.left;n<=r.right;n++)this.getCell(i,n).unmerge();delete this._merges[e.address]}}get hasMerges(){return Su.some(this._merges,Boolean)}unMergeCells(...e){let r=new Tu(e);for(let i=r.top;i<=r.bottom;i++)for(let n=r.left;n<=r.right;n++){let s=this.findCell(i,n);s&&(s.type===nG.ValueType.Merge?this._unMergeMaster(s.master):this._merges[s.address]&&this._unMergeMaster(s))}}fillFormula(e,r,i,n="shared"){let s=Eu.decode(e),{top:a,left:o,bottom:u,right:f}=s,c=f-o+1,h=Eu.encodeAddress(a,o),d=n==="shared",p;typeof i=="function"?p=i:Array.isArray(i)?Array.isArray(i[0])?p=(y,v)=>i[y-a][v-o]:p=(y,v)=>i[(y-a)*c+(v-o)]:p=()=>{};let g=!0;for(let y=a;y<=u;y++)for(let v=o;v<=f;v++)g?(this.getCell(y,v).value={shareType:n,formula:r,ref:e,result:p(y,v)},g=!1):this.getCell(y,v).value=d?{sharedFormula:h,result:p(y,v)}:p(y,v)}addImage(e,r){let i={type:"image",imageId:e,range:r};this._media.push(new _v(this,i))}getImages(){return this._media.filter(e=>e.type==="image")}addBackgroundImage(e){let r={type:"background",imageId:e};this._media.push(new _v(this,r))}getBackgroundImageId(){let e=this._media.find(r=>r.type==="background");return e&&e.imageId}protect(e,r){return new Promise(i=>{this.sheetProtection={sheet:!0},r&&"spinCount"in r&&(r.spinCount=Number.isFinite(r.spinCount)?Math.round(Math.max(0,r.spinCount)):1e5),e&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=MA.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=r&&"spinCount"in r?r.spinCount:1e5,this.sheetProtection.hashValue=MA.convertPasswordToHash(e,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),r&&(this.sheetProtection=Object.assign(this.sheetProtection,r),!e&&"spinCount"in r&&delete this.sheetProtection.spinCount),i()})}unprotect(){this.sheetProtection=null}addTable(e){let r=new DA(this,e);return this.tables[e.name]=r,r}getTable(e){return this.tables[e]}removeTable(e){delete this.tables[e]}getTables(){return Object.values(this.tables)}addConditionalFormatting(e){this.conditionalFormattings.push(e)}removeConditionalFormatting(e){typeof e=="number"?this.conditionalFormattings.splice(e,1):e instanceof Function?this.conditionalFormattings=this.conditionalFormattings.filter(e):this.conditionalFormattings=[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(e){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=e}get model(){let e={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(n=>n.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(n=>n.model),conditionalFormattings:this.conditionalFormattings};e.cols=Uh.toModel(this.columns);let r=e.rows=[],i=e.dimensions=new Tu;return this._rows.forEach(n=>{let s=n&&n.model;s&&(i.expand(s.number,s.min,s.number,s.max),r.push(s))}),e.merges=[],Su.each(this._merges,n=>{e.merges.push(n.range)}),e}_parseRows(e){this._rows=[],e.rows.forEach(r=>{let i=new NA(this,r.number);this._rows[i.number-1]=i,i.model=r})}_parseMergeCells(e){Su.each(e.mergeCells,r=>{this.mergeCellsWithoutStyle(r)})}set model(e){this.name=e.name,this._columns=Uh.fromModel(this,e.cols),this._parseRows(e),this._parseMergeCells(e),this.dataValidations=new FA(e.dataValidations),this.properties=e.properties,this.pageSetup=e.pageSetup,this.headerFooter=e.headerFooter,this.views=e.views,this.autoFilter=e.autoFilter,this._media=e.media.map(r=>new _v(this,r)),this.sheetProtection=e.sheetProtection,this.tables=e.tables.reduce((r,i)=>{let n=new DA;return n.model=i,r[i.name]=n,r},{}),this.conditionalFormattings=e.conditionalFormattings}};qA.exports=wv});var $A=w((Lke,jA)=>{var BA=wt(),Wh=mt(),bv=class{constructor(e){this.template=e,this.sheets={}}addCell(e){this.addCellEx(Wh.decodeEx(e))}getCell(e){return this.findCellEx(Wh.decodeEx(e),!0)}findCell(e){return this.findCellEx(Wh.decodeEx(e),!1)}findCellAt(e,r,i){let n=this.sheets[e],s=n&&n[r];return s&&s[i]}addCellEx(e){if(e.top)for(let r=e.top;r<=e.bottom;r++)for(let i=e.left;i<=e.right;i++)this.getCellAt(e.sheetName,r,i);else this.findCellEx(e,!0)}getCellEx(e){return this.findCellEx(e,!0)}findCellEx(e,r){let i=this.findSheet(e,r),n=this.findSheetRow(i,e,r);return this.findRowCell(n,e,r)}getCellAt(e,r,i){let n=this.sheets[e]||(this.sheets[e]=[]),s=n[r]||(n[r]=[]);return s[i]||(s[i]={sheetName:e,address:Wh.n2l(i)+r,row:r,col:i})}removeCellEx(e){let r=this.findSheet(e);if(!r)return;let i=this.findSheetRow(r,e);i&&delete i[e.col]}forEachInSheet(e,r){let i=this.sheets[e];i&&i.forEach((n,s)=>{n&&n.forEach((a,o)=>{a&&r(a,s,o)})})}forEach(e){BA.each(this.sheets,(r,i)=>{this.forEachInSheet(i,e)})}map(e){let r=[];return this.forEach(i=>{r.push(e(i))}),r}findSheet(e,r){let i=e.sheetName;if(this.sheets[i])return this.sheets[i];if(r)return this.sheets[i]=[]}findSheetRow(e,r,i){let{row:n}=r;if(e&&e[n])return e[n];if(i)return e[n]=[]}findRowCell(e,r,i){let{col:n}=r;if(e&&e[n])return e[n];if(i)return e[n]=this.template?Object.assign(r,JSON.parse(JSON.stringify(this.template))):r}spliceRows(e,r,i,n){let s=this.sheets[e];if(s){let a=[];for(let o=0;o<n;o++)a.push([]);s.splice(r,i,...a)}}spliceColumns(e,r,i,n){let s=this.sheets[e];if(s){let a=[];for(let o=0;o<n;o++)a.push(null);BA.each(s,o=>{o.splice(r,i,...a)})}}};jA.exports=bv});var Sv=w((Bke,WA)=>{"use strict";var io=wt(),Cu=mt(),UA=$A(),sG=Vi(),aG=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/,xv=class{constructor(){this.matrixMap={}}getMatrix(e){return this.matrixMap[e]||(this.matrixMap[e]=new UA)}add(e,r){let i=Cu.decodeEx(e);this.addEx(i,r)}addEx(e,r){let i=this.getMatrix(r);if(e.top)for(let n=e.left;n<=e.right;n++)for(let s=e.top;s<=e.bottom;s++){let a={sheetName:e.sheetName,address:Cu.n2l(n)+s,row:s,col:n};i.addCellEx(a)}else i.addCellEx(e)}remove(e,r){let i=Cu.decodeEx(e);this.removeEx(i,r)}removeEx(e,r){this.getMatrix(r).removeCellEx(e)}removeAllNames(e){io.each(this.matrixMap,r=>{r.removeCellEx(e)})}forEach(e){io.each(this.matrixMap,(r,i)=>{r.forEach(n=>{e(i,n)})})}getNames(e){return this.getNamesEx(Cu.decodeEx(e))}getNamesEx(e){return io.map(this.matrixMap,(r,i)=>r.findCellEx(e)&&i).filter(Boolean)}_explore(e,r){r.mark=!1;let{sheetName:i}=r,n=new sG(r.row,r.col,r.row,r.col,i),s,a;function o(f,c){let h=e.findCellAt(i,f,r.col);return!h||!h.mark?!1:(n[c]=f,h.mark=!1,!0)}for(a=r.row-1;o(a,"top");a--);for(a=r.row+1;o(a,"bottom");a++);function u(f,c){let h=[];for(a=n.top;a<=n.bottom;a++){let d=e.findCellAt(i,a,f);if(d&&d.mark)h.push(d);else return!1}n[c]=f;for(let d=0;d<h.length;d++)h[d].mark=!1;return!0}for(s=r.col-1;u(s,"left");s--);for(s=r.col+1;u(s,"right");s++);return n}getRanges(e,r){if(r=r||this.matrixMap[e],!r)return{name:e,ranges:[]};r.forEach(n=>{n.mark=!0});let i=r.map(n=>n.mark&&this._explore(r,n)).filter(Boolean).map(n=>n.$shortRange);return{name:e,ranges:i}}normaliseMatrix(e,r){e.forEachInSheet(r,(i,n,s)=>{i&&(i.row!==n||i.col!==s)&&(i.row=n,i.col=s,i.address=Cu.n2l(s)+n)})}spliceRows(e,r,i,n){io.each(this.matrixMap,s=>{s.spliceRows(e,r,i,n),this.normaliseMatrix(s,e)})}spliceColumns(e,r,i,n){io.each(this.matrixMap,s=>{s.spliceColumns(e,r,i,n),this.normaliseMatrix(s,e)})}get model(){return io.map(this.matrixMap,(e,r)=>this.getRanges(r,e)).filter(e=>e.ranges.length)}set model(e){let r=this.matrixMap={};e.forEach(i=>{let n=r[i.name]=new UA;i.ranges.forEach(s=>{aG.test(s.split("!").pop()||"")&&n.addCell(s)})})}};WA.exports=xv});var St=w((jke,Ev)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?Ev.exports={nextTick:oG}:Ev.exports=process;function oG(t,e,r,i){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,s,a;switch(n){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,r)});case 4:return process.nextTick(function(){t.call(null,e,r,i)});default:for(s=new Array(n-1),a=0;a<s.length;)s[a++]=arguments[a];return process.nextTick(function(){t.apply(null,s)})}}});var no=w(($ke,HA)=>{var lG={}.toString;HA.exports=Array.isArray||function(t){return lG.call(t)=="[object Array]"}});var Tv=w((Uke,zA)=>{zA.exports=Y("stream")});var ku=w((Cv,VA)=>{var Hh=Y("buffer"),Gi=Hh.Buffer;function XA(t,e){for(var r in t)e[r]=t[r]}Gi.from&&Gi.alloc&&Gi.allocUnsafe&&Gi.allocUnsafeSlow?VA.exports=Hh:(XA(Hh,Cv),Cv.Buffer=so);function so(t,e,r){return Gi(t,e,r)}XA(Gi,so);so.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Gi(t,e,r)};so.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Gi(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};so.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Gi(t)};so.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Hh.SlowBuffer(t)}});var et=w(rr=>{function uG(t){return Array.isArray?Array.isArray(t):zh(t)==="[object Array]"}rr.isArray=uG;function fG(t){return typeof t=="boolean"}rr.isBoolean=fG;function cG(t){return t===null}rr.isNull=cG;function hG(t){return t==null}rr.isNullOrUndefined=hG;function dG(t){return typeof t=="number"}rr.isNumber=dG;function pG(t){return typeof t=="string"}rr.isString=pG;function gG(t){return typeof t=="symbol"}rr.isSymbol=gG;function mG(t){return t===void 0}rr.isUndefined=mG;function yG(t){return zh(t)==="[object RegExp]"}rr.isRegExp=yG;function vG(t){return typeof t=="object"&&t!==null}rr.isObject=vG;function _G(t){return zh(t)==="[object Date]"}rr.isDate=_G;function wG(t){return zh(t)==="[object Error]"||t instanceof Error}rr.isError=wG;function bG(t){return typeof t=="function"}rr.isFunction=bG;function xG(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}rr.isPrimitive=xG;rr.isBuffer=Y("buffer").Buffer.isBuffer;function zh(t){return Object.prototype.toString.call(t)}});var GA=w((Hke,kv)=>{typeof Object.create=="function"?kv.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:kv.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var be=w((zke,Av)=>{try{if(Rv=Y("util"),typeof Rv.inherits!="function")throw"";Av.exports=Rv.inherits}catch{Av.exports=GA()}var Rv});var YA=w((Xke,Ov)=>{"use strict";function SG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ZA=ku().Buffer,Ru=Y("util");function EG(t,e,r){t.copy(e,r)}Ov.exports=(function(){function t(){SG(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return ZA.alloc(0);for(var i=ZA.allocUnsafe(r>>>0),n=this.head,s=0;n;)EG(n.data,i,s),s+=n.data.length,n=n.next;return i},t})();Ru&&Ru.inspect&&Ru.inspect.custom&&(Ov.exports.prototype[Ru.inspect.custom]=function(){var t=Ru.inspect({length:this.length});return this.constructor.name+" "+t})});var Iv=w((Vke,KA)=>{"use strict";var Xh=St();function TG(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Xh.nextTick(Vh,this,t)):Xh.nextTick(Vh,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,Xh.nextTick(Vh,r,s)):Xh.nextTick(Vh,r,s):e&&e(s)}),this)}function CG(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Vh(t,e){t.emit("error",e)}KA.exports={destroy:TG,undestroy:CG}});var Ls=w((Gke,QA)=>{QA.exports=Y("util").deprecate});var Dv=w((Zke,aO)=>{"use strict";var Bs=St();aO.exports=Tt;function eO(t){var e=this;this.next=null,this.entry=null,this.finish=function(){HG(e,t)}}var kG=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Bs.nextTick,ao;Tt.WritableState=Ou;var tO=Object.create(et());tO.inherits=be();var RG={deprecate:Ls()},rO=Tv(),Zh=ku().Buffer,AG=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function OG(t){return Zh.from(t)}function IG(t){return Zh.isBuffer(t)||t instanceof AG}var iO=Iv();tO.inherits(Tt,rO);function NG(){}function Ou(t,e){ao=ao||js(),t=t||{};var r=e instanceof ao;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){BG(e,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new eO(this)}Ou.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ou.prototype,"buffer",{get:RG.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Gh;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Gh=Function.prototype[Symbol.hasInstance],Object.defineProperty(Tt,Symbol.hasInstance,{value:function(t){return Gh.call(this,t)?!0:this!==Tt?!1:t&&t._writableState instanceof Ou}})):Gh=function(t){return t instanceof this};function Tt(t){if(ao=ao||js(),!Gh.call(Tt,this)&&!(this instanceof ao))return new Tt(t);this._writableState=new Ou(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),rO.call(this)}Tt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function DG(t,e){var r=new Error("write after end");t.emit("error",r),Bs.nextTick(e,r)}function FG(t,e,r,i){var n=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),Bs.nextTick(i,s),n=!1),n}Tt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&IG(t);return s&&!Zh.isBuffer(t)&&(t=OG(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=NG),i.ended?DG(this,r):(s||FG(this,i,t,r))&&(i.pendingcb++,n=PG(this,i,s,t,e,r)),n};Tt.prototype.cork=function(){var t=this._writableState;t.corked++};Tt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&nO(this,t))};Tt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function MG(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Zh.from(e,r)),e}Object.defineProperty(Tt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function PG(t,e,r,i,n,s){if(!r){var a=MG(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Nv(t,e,!1,o,i,n,s);return u}function Nv(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function qG(t,e,r,i,n){--e.pendingcb,r?(Bs.nextTick(n,i),Bs.nextTick(Au,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),Au(t,e))}function LG(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function BG(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(LG(r),e)qG(t,r,i,e,n);else{var s=sO(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&nO(t,r),i?kG(JA,t,r,s,n):JA(t,r,s,n)}}function JA(t,e,r,i){r||jG(t,e),e.pendingcb--,i(),Au(t,e)}function jG(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function nO(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,Nv(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new eO(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,c=r.callback,h=e.objectMode?1:u.length;if(Nv(t,e,!1,h,u,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Tt.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Tt.prototype._writev=null;Tt.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||WG(this,i,r)};function sO(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function $G(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Au(t,e)})}function UG(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,Bs.nextTick($G,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Au(t,e){var r=sO(e);return r&&(UG(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function WG(t,e,r){e.ending=!0,Au(t,e),r&&(e.finished?Bs.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function HG(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Tt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Tt.prototype.destroy=iO.destroy;Tt.prototype._undestroy=iO.undestroy;Tt.prototype._destroy=function(t,e){this.end(),e(t)}});var js=w((Yke,fO)=>{"use strict";var oO=St(),zG=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};fO.exports=Zi;var lO=Object.create(et());lO.inherits=be();var uO=Pv(),Mv=Dv();lO.inherits(Zi,uO);for(Fv=zG(Mv.prototype),Yh=0;Yh<Fv.length;Yh++)Kh=Fv[Yh],Zi.prototype[Kh]||(Zi.prototype[Kh]=Mv.prototype[Kh]);var Fv,Kh,Yh;function Zi(t){if(!(this instanceof Zi))return new Zi(t);uO.call(this,t),Mv.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",XG)}Object.defineProperty(Zi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function XG(){this.allowHalfOpen||this._writableState.ended||oO.nextTick(VG,this)}function VG(t){t.end()}Object.defineProperty(Zi.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Zi.prototype._destroy=function(t,e){this.push(null),this.end(),oO.nextTick(e,t)}});var Bv=w(hO=>{"use strict";var Lv=ku().Buffer,cO=Lv.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function GG(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function ZG(t){var e=GG(t);if(typeof e!="string"&&(Lv.isEncoding===cO||!cO(t)))throw new Error("Unknown encoding: "+t);return e||t}hO.StringDecoder=Iu;function Iu(t){this.encoding=ZG(t);var e;switch(this.encoding){case"utf16le":this.text=tZ,this.end=rZ,e=4;break;case"utf8":this.fillLast=QG,e=4;break;case"base64":this.text=iZ,this.end=nZ,e=3;break;default:this.write=sZ,this.end=aZ;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Lv.allocUnsafe(e)}Iu.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Iu.prototype.end=eZ;Iu.prototype.text=JG;Iu.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function qv(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function YG(t,e,r){var i=e.length-1;if(i<r)return 0;var n=qv(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=qv(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=qv(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function KG(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function QG(t){var e=this.lastTotal-this.lastNeed,r=KG(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function JG(t,e){var r=YG(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function eZ(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function tZ(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function rZ(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function iZ(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function nZ(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function sZ(t){return t.toString(this.encoding)}function aZ(t){return t&&t.length?this.write(t):""}});var Pv=w((Jke,EO)=>{"use strict";var lo=St();EO.exports=it;var oZ=no(),Nu;it.ReadableState=_O;var Qke=Y("events").EventEmitter,mO=function(t,e){return t.listeners(e).length},Hv=Tv(),Du=ku().Buffer,lZ=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function uZ(t){return Du.from(t)}function fZ(t){return Du.isBuffer(t)||t instanceof lZ}var yO=Object.create(et());yO.inherits=be();var jv=Y("util"),$e=void 0;jv&&jv.debuglog?$e=jv.debuglog("stream"):$e=function(){};var cZ=YA(),vO=Iv(),oo;yO.inherits(it,Hv);var $v=["error","close","destroy","pause","resume"];function hZ(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):oZ(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function _O(t,e){Nu=Nu||js(),t=t||{};var r=e instanceof Nu;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new cZ,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(oo||(oo=Bv().StringDecoder),this.decoder=new oo(t.encoding),this.encoding=t.encoding)}function it(t){if(Nu=Nu||js(),!(this instanceof it))return new it(t);this._readableState=new _O(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Hv.call(this)}Object.defineProperty(it.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});it.prototype.destroy=vO.destroy;it.prototype._undestroy=vO.undestroy;it.prototype._destroy=function(t,e){this.push(null),e(t)};it.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Du.from(t,e),e=""),i=!0),wO(this,t,e,!1,i)};it.prototype.unshift=function(t){return wO(this,t,null,!0,!1)};function wO(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,mZ(t,s);else{var a;n||(a=dZ(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Du.prototype&&(e=uZ(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):Uv(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Uv(t,s,e,!1):bO(t,s)):Uv(t,s,e,!1))):i||(s.reading=!1)}return pZ(s)}function Uv(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Qh(t)),bO(t,e)}function dZ(t,e){var r;return!fZ(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function pZ(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}it.prototype.isPaused=function(){return this._readableState.flowing===!1};it.prototype.setEncoding=function(t){return oo||(oo=Bv().StringDecoder),this._readableState.decoder=new oo(t),this._readableState.encoding=t,this};var dO=8388608;function gZ(t){return t>=dO?t=dO:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function pO(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=gZ(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}it.prototype.read=function(t){$e("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return $e("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Wv(this):Qh(this),null;if(t=pO(t,e),t===0&&e.ended)return e.length===0&&Wv(this),null;var i=e.needReadable;$e("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,$e("length less than watermark",i)),e.ended||e.reading?(i=!1,$e("reading or ended",i)):i&&($e("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=pO(r,e)));var n;return t>0?n=xO(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Wv(this)),n!==null&&this.emit("data",n),n};function mZ(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Qh(t)}}function Qh(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||($e("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?lo.nextTick(gO,t):gO(t))}function gO(t){$e("emit readable"),t.emit("readable"),zv(t)}function bO(t,e){e.readingMore||(e.readingMore=!0,lo.nextTick(yZ,t,e))}function yZ(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&($e("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}it.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};it.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,$e("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:v;i.endEmitted?lo.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(b,k){$e("onunpipe"),b===r&&k&&k.hasUnpiped===!1&&(k.hasUnpiped=!0,c())}function o(){$e("onend"),t.end()}var u=vZ(r);t.on("drain",u);var f=!1;function c(){$e("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",v),r.removeListener("data",d),f=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var h=!1;r.on("data",d);function d(b){$e("ondata"),h=!1;var k=t.write(b);k===!1&&!h&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&SO(i.pipes,t)!==-1)&&!f&&($e("false write response, pause",i.awaitDrain),i.awaitDrain++,h=!0),r.pause())}function p(b){$e("onerror",b),v(),t.removeListener("error",p),mO(t,"error")===0&&t.emit("error",b)}hZ(t,"error",p);function g(){t.removeListener("finish",y),v()}t.once("close",g);function y(){$e("onfinish"),t.removeListener("close",g),v()}t.once("finish",y);function v(){$e("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||($e("pipe resume"),r.resume()),t};function vZ(t){return function(){var e=t._readableState;$e("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&mO(t,"data")&&(e.flowing=!0,zv(t))}}it.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=SO(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};it.prototype.on=function(t,e){var r=Hv.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Qh(this):lo.nextTick(_Z,this))}return r};it.prototype.addListener=it.prototype.on;function _Z(t){$e("readable nexttick read 0"),t.read(0)}it.prototype.resume=function(){var t=this._readableState;return t.flowing||($e("resume"),t.flowing=!0,wZ(this,t)),this};function wZ(t,e){e.resumeScheduled||(e.resumeScheduled=!0,lo.nextTick(bZ,t,e))}function bZ(t,e){e.reading||($e("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),zv(t),e.flowing&&!e.reading&&t.read(0)}it.prototype.pause=function(){return $e("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&($e("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function zv(t){var e=t._readableState;for($e("flow",e.flowing);e.flowing&&t.read()!==null;);}it.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if($e("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if($e("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<$v.length;s++)t.on($v[s],this.emit.bind(this,$v[s]));return this._read=function(a){$e("wrapped _read",a),i&&(i=!1,t.resume())},this};Object.defineProperty(it.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});it._fromList=xO;function xO(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=xZ(t,e.buffer,e.decoder),r}function xZ(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?SZ(t,e):EZ(t,e),i}function SZ(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var s=r.data,a=t>s.length?s.length:t;if(a===s.length?n+=s:n+=s.slice(0,t),t-=a,t===0){a===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(a));break}++i}return e.length-=i,n}function EZ(t,e){var r=Du.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var s=i.data,a=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,a),t-=a,t===0){a===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(a));break}++n}return e.length-=n,r}function Wv(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,lo.nextTick(TZ,e,t))}function TZ(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function SO(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Xv=w((eRe,kO)=>{"use strict";kO.exports=Yi;var Jh=js(),CO=Object.create(et());CO.inherits=be();CO.inherits(Yi,Jh);function CZ(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Yi(t){if(!(this instanceof Yi))return new Yi(t);Jh.call(this,t),this._transformState={afterTransform:CZ.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",kZ)}function kZ(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){TO(t,e,r)}):TO(this,null,null)}Yi.prototype.push=function(t,e){return this._transformState.needTransform=!1,Jh.prototype.push.call(this,t,e)};Yi.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Yi.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Yi.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Yi.prototype._destroy=function(t,e){var r=this;Jh.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function TO(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var IO=w((tRe,OO)=>{"use strict";OO.exports=Fu;var RO=Xv(),AO=Object.create(et());AO.inherits=be();AO.inherits(Fu,RO);function Fu(t){if(!(this instanceof Fu))return new Fu(t);RO.call(this,t)}Fu.prototype._transform=function(t,e,r){r(null,t)}});var Vv=w((Wt,ed)=>{var wi=Y("stream");process.env.READABLE_STREAM==="disable"&&wi?(ed.exports=wi,Wt=ed.exports=wi.Readable,Wt.Readable=wi.Readable,Wt.Writable=wi.Writable,Wt.Duplex=wi.Duplex,Wt.Transform=wi.Transform,Wt.PassThrough=wi.PassThrough,Wt.Stream=wi):(Wt=ed.exports=Pv(),Wt.Stream=wi||Wt,Wt.Readable=Wt,Wt.Writable=Dv(),Wt.Duplex=js(),Wt.Transform=Xv(),Wt.PassThrough=IO())});var Ki=w(Ir=>{"use strict";Ir.base64=!0;Ir.array=!0;Ir.string=!0;Ir.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";Ir.nodebuffer=typeof Buffer<"u";Ir.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")Ir.blob=!1;else{Gv=new ArrayBuffer(0);try{Ir.blob=new Blob([Gv],{type:"application/zip"}).size===0}catch{try{NO=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Zv=new NO,Zv.append(Gv),Ir.blob=Zv.getBlob("application/zip").size===0}catch{Ir.blob=!1}}}var Gv,NO,Zv;try{Ir.nodestream=!!Vv().Readable}catch{Ir.nodestream=!1}});var Kv=w(Yv=>{"use strict";var RZ=yt(),AZ=Ki(),bi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Yv.encode=function(t){for(var e=[],r,i,n,s,a,o,u,f=0,c=t.length,h=c,d=RZ.getTypeOf(t)!=="string";f<t.length;)h=c-f,d?(r=t[f++],i=f<c?t[f++]:0,n=f<c?t[f++]:0):(r=t.charCodeAt(f++),i=f<c?t.charCodeAt(f++):0,n=f<c?t.charCodeAt(f++):0),s=r>>2,a=(r&3)<<4|i>>4,o=h>1?(i&15)<<2|n>>6:64,u=h>2?n&63:64,e.push(bi.charAt(s)+bi.charAt(a)+bi.charAt(o)+bi.charAt(u));return e.join("")};Yv.decode=function(t){var e,r,i,n,s,a,o,u=0,f=0,c="data:";if(t.substr(0,c.length)===c)throw new Error("Invalid base64 input, it looks like a data url.");t=t.replace(/[^A-Za-z0-9+/=]/g,"");var h=t.length*3/4;if(t.charAt(t.length-1)===bi.charAt(64)&&h--,t.charAt(t.length-2)===bi.charAt(64)&&h--,h%1!==0)throw new Error("Invalid base64 input, bad content length.");var d;for(AZ.uint8array?d=new Uint8Array(h|0):d=new Array(h|0);u<t.length;)n=bi.indexOf(t.charAt(u++)),s=bi.indexOf(t.charAt(u++)),a=bi.indexOf(t.charAt(u++)),o=bi.indexOf(t.charAt(u++)),e=n<<2|s>>4,r=(s&15)<<4|a>>2,i=(a&3)<<6|o,d[f++]=e,a!==64&&(d[f++]=r),o!==64&&(d[f++]=i);return d}});var Mu=w((nRe,DO)=>{"use strict";DO.exports={isNode:typeof Buffer<"u",newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if(typeof t=="number")throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&typeof t.on=="function"&&typeof t.pause=="function"&&typeof t.resume=="function"}}});var qO=w((sRe,PO)=>{"use strict";var FO=global.MutationObserver||global.WebKitMutationObserver,uo;process.browser?FO?(Qv=0,MO=new FO(Pu),Jv=global.document.createTextNode(""),MO.observe(Jv,{characterData:!0}),uo=function(){Jv.data=Qv=++Qv%2}):!global.setImmediate&&typeof global.MessageChannel<"u"?(e_=new global.MessageChannel,e_.port1.onmessage=Pu,uo=function(){e_.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?uo=function(){var t=global.document.createElement("script");t.onreadystatechange=function(){Pu(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},global.document.documentElement.appendChild(t)}:uo=function(){setTimeout(Pu,0)}:uo=function(){process.nextTick(Pu)};var Qv,MO,Jv,e_,t_,qu=[];function Pu(){t_=!0;for(var t,e,r=qu.length;r;){for(e=qu,qu=[],t=-1;++t<r;)e[t]();r=qu.length}t_=!1}PO.exports=OZ;function OZ(t){qu.push(t)===1&&!t_&&uo()}});var HO=w((aRe,WO)=>{"use strict";var LO=qO();function fo(){}var ir={},BO=["REJECTED"],r_=["FULFILLED"],jO=["PENDING"];process.browser||(Lu=["UNHANDLED"]);var Lu;WO.exports=Fn;function Fn(t){if(typeof t!="function")throw new TypeError("resolver must be a function");this.state=jO,this.queue=[],this.outcome=void 0,process.browser||(this.handled=Lu),t!==fo&&$O(this,t)}Fn.prototype.finally=function(t){if(typeof t!="function")return this;var e=this.constructor;return this.then(r,i);function r(n){function s(){return n}return e.resolve(t()).then(s)}function i(n){function s(){throw n}return e.resolve(t()).then(s)}};Fn.prototype.catch=function(t){return this.then(null,t)};Fn.prototype.then=function(t,e){if(typeof t!="function"&&this.state===r_||typeof e!="function"&&this.state===BO)return this;var r=new this.constructor(fo);if(process.browser||this.handled===Lu&&(this.handled=null),this.state!==jO){var i=this.state===r_?t:e;i_(r,i,this.outcome)}else this.queue.push(new Bu(r,t,e));return r};function Bu(t,e,r){this.promise=t,typeof e=="function"&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}Bu.prototype.callFulfilled=function(t){ir.resolve(this.promise,t)};Bu.prototype.otherCallFulfilled=function(t){i_(this.promise,this.onFulfilled,t)};Bu.prototype.callRejected=function(t){ir.reject(this.promise,t)};Bu.prototype.otherCallRejected=function(t){i_(this.promise,this.onRejected,t)};function i_(t,e,r){LO(function(){var i;try{i=e(r)}catch(n){return ir.reject(t,n)}i===t?ir.reject(t,new TypeError("Cannot resolve promise with itself")):ir.resolve(t,i)})}ir.resolve=function(t,e){var r=UO(IZ,e);if(r.status==="error")return ir.reject(t,r.value);var i=r.value;if(i)$O(t,i);else{t.state=r_,t.outcome=e;for(var n=-1,s=t.queue.length;++n<s;)t.queue[n].callFulfilled(e)}return t};ir.reject=function(t,e){t.state=BO,t.outcome=e,process.browser||t.handled===Lu&&LO(function(){t.handled===Lu&&process.emit("unhandledRejection",e,t)});for(var r=-1,i=t.queue.length;++r<i;)t.queue[r].callRejected(e);return t};function IZ(t){var e=t&&t.then;if(t&&(typeof t=="object"||typeof t=="function")&&typeof e=="function")return function(){e.apply(t,arguments)}}function $O(t,e){var r=!1;function i(o){r||(r=!0,ir.reject(t,o))}function n(o){r||(r=!0,ir.resolve(t,o))}function s(){e(n,i)}var a=UO(s);a.status==="error"&&i(a.value)}function UO(t,e){var r={};try{r.value=t(e),r.status="success"}catch(i){r.status="error",r.value=i}return r}Fn.resolve=NZ;function NZ(t){return t instanceof this?t:ir.resolve(new this(fo),t)}Fn.reject=DZ;function DZ(t){var e=new this(fo);return ir.reject(e,t)}Fn.all=FZ;function FZ(t){var e=this;if(Object.prototype.toString.call(t)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);for(var n=new Array(r),s=0,a=-1,o=new this(fo);++a<r;)u(t[a],a);return o;function u(f,c){e.resolve(f).then(h,function(d){i||(i=!0,ir.reject(o,d))});function h(d){n[c]=d,++s===r&&!i&&(i=!0,ir.resolve(o,n))}}}Fn.race=MZ;function MZ(t){var e=this;if(Object.prototype.toString.call(t)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);for(var n=-1,s=new this(fo);++n<r;)a(t[n]);return s;function a(o){e.resolve(o).then(function(u){i||(i=!0,ir.resolve(s,u))},function(u){i||(i=!0,ir.reject(s,u))})}}});var co=w((oRe,zO)=>{"use strict";var n_=null;typeof Promise<"u"?n_=Promise:n_=HO();zO.exports={Promise:n_}});var s_=w(XO=>{(function(t,e){"use strict";if(t.setImmediate)return;var r=1,i={},n=!1,s=t.document,a;function o(k){typeof k!="function"&&(k=new Function(""+k));for(var N=new Array(arguments.length-1),E=0;E<N.length;E++)N[E]=arguments[E+1];var U={callback:k,args:N};return i[r]=U,a(r),r++}function u(k){delete i[k]}function f(k){var N=k.callback,E=k.args;switch(E.length){case 0:N();break;case 1:N(E[0]);break;case 2:N(E[0],E[1]);break;case 3:N(E[0],E[1],E[2]);break;default:N.apply(e,E);break}}function c(k){if(n)setTimeout(c,0,k);else{var N=i[k];if(N){n=!0;try{f(N)}finally{u(k),n=!1}}}}function h(){a=function(k){process.nextTick(function(){c(k)})}}function d(){if(t.postMessage&&!t.importScripts){var k=!0,N=t.onmessage;return t.onmessage=function(){k=!1},t.postMessage("","*"),t.onmessage=N,k}}function p(){var k="setImmediate$"+Math.random()+"$",N=function(E){E.source===t&&typeof E.data=="string"&&E.data.indexOf(k)===0&&c(+E.data.slice(k.length))};t.addEventListener?t.addEventListener("message",N,!1):t.attachEvent("onmessage",N),a=function(E){t.postMessage(k+E,"*")}}function g(){var k=new MessageChannel;k.port1.onmessage=function(N){var E=N.data;c(E)},a=function(N){k.port2.postMessage(N)}}function y(){var k=s.documentElement;a=function(N){var E=s.createElement("script");E.onreadystatechange=function(){c(N),E.onreadystatechange=null,k.removeChild(E),E=null},k.appendChild(E)}}function v(){a=function(k){setTimeout(c,0,k)}}var b=Object.getPrototypeOf&&Object.getPrototypeOf(t);b=b&&b.setTimeout?b:t,{}.toString.call(t.process)==="[object process]"?h():d()?p():t.MessageChannel?g():s&&"onreadystatechange"in s.createElement("script")?y():v(),b.setImmediate=o,b.clearImmediate=u})(typeof self>"u"?typeof global>"u"?XO:global:self)});var yt=w(Ct=>{"use strict";var Mn=Ki(),PZ=Kv(),ho=Mu(),a_=co();s_();function qZ(t){var e=null;return Mn.uint8array?e=new Uint8Array(t.length):e=new Array(t.length),rd(t,e)}Ct.newBlob=function(t,e){Ct.checkSupport("blob");try{return new Blob([t],{type:e})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,i=new r;return i.append(t),i.getBlob(e)}catch{throw new Error("Bug : can't construct the Blob.")}}};function ju(t){return t}function rd(t,e){for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)&255;return e}var td={stringifyByChunk:function(t,e,r){var i=[],n=0,s=t.length;if(s<=r)return String.fromCharCode.apply(null,t);for(;n<s;)e==="array"||e==="nodebuffer"?i.push(String.fromCharCode.apply(null,t.slice(n,Math.min(n+r,s)))):i.push(String.fromCharCode.apply(null,t.subarray(n,Math.min(n+r,s)))),n+=r;return i.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:(function(){try{return Mn.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return Mn.nodebuffer&&String.fromCharCode.apply(null,ho.allocBuffer(1)).length===1}catch{return!1}})()}};function $u(t){var e=65536,r=Ct.getTypeOf(t),i=!0;if(r==="uint8array"?i=td.applyCanBeUsed.uint8array:r==="nodebuffer"&&(i=td.applyCanBeUsed.nodebuffer),i)for(;e>1;)try{return td.stringifyByChunk(t,r,e)}catch{e=Math.floor(e/2)}return td.stringifyByChar(t)}Ct.applyFromCharCode=$u;function id(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}var Pn={};Pn.string={string:ju,array:function(t){return rd(t,new Array(t.length))},arraybuffer:function(t){return Pn.string.uint8array(t).buffer},uint8array:function(t){return rd(t,new Uint8Array(t.length))},nodebuffer:function(t){return rd(t,ho.allocBuffer(t.length))}};Pn.array={string:$u,array:ju,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return ho.newBufferFrom(t)}};Pn.arraybuffer={string:function(t){return $u(new Uint8Array(t))},array:function(t){return id(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:ju,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return ho.newBufferFrom(new Uint8Array(t))}};Pn.uint8array={string:$u,array:function(t){return id(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:ju,nodebuffer:function(t){return ho.newBufferFrom(t)}};Pn.nodebuffer={string:$u,array:function(t){return id(t,new Array(t.length))},arraybuffer:function(t){return Pn.nodebuffer.uint8array(t).buffer},uint8array:function(t){return id(t,new Uint8Array(t.length))},nodebuffer:ju};Ct.transformTo=function(t,e){if(e||(e=""),!t)return e;Ct.checkSupport(t);var r=Ct.getTypeOf(e),i=Pn[r][t](e);return i};Ct.resolve=function(t){for(var e=t.split("/"),r=[],i=0;i<e.length;i++){var n=e[i];n==="."||n===""&&i!==0&&i!==e.length-1||(n===".."?r.pop():r.push(n))}return r.join("/")};Ct.getTypeOf=function(t){if(typeof t=="string")return"string";if(Object.prototype.toString.call(t)==="[object Array]")return"array";if(Mn.nodebuffer&&ho.isBuffer(t))return"nodebuffer";if(Mn.uint8array&&t instanceof Uint8Array)return"uint8array";if(Mn.arraybuffer&&t instanceof ArrayBuffer)return"arraybuffer"};Ct.checkSupport=function(t){var e=Mn[t.toLowerCase()];if(!e)throw new Error(t+" is not supported by this platform")};Ct.MAX_VALUE_16BITS=65535;Ct.MAX_VALUE_32BITS=-1;Ct.pretty=function(t){var e="",r,i;for(i=0;i<(t||"").length;i++)r=t.charCodeAt(i),e+="\\x"+(r<16?"0":"")+r.toString(16).toUpperCase();return e};Ct.delay=function(t,e,r){setImmediate(function(){t.apply(r||null,e||[])})};Ct.inherits=function(t,e){var r=function(){};r.prototype=e.prototype,t.prototype=new r};Ct.extend=function(){var t={},e,r;for(e=0;e<arguments.length;e++)for(r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&typeof t[r]>"u"&&(t[r]=arguments[e][r]);return t};Ct.prepareContent=function(t,e,r,i,n){var s=a_.Promise.resolve(e).then(function(a){var o=Mn.blob&&(a instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(a))!==-1);return o&&typeof FileReader<"u"?new a_.Promise(function(u,f){var c=new FileReader;c.onload=function(h){u(h.target.result)},c.onerror=function(h){f(h.target.error)},c.readAsArrayBuffer(a)}):a});return s.then(function(a){var o=Ct.getTypeOf(a);return o?(o==="arraybuffer"?a=Ct.transformTo("uint8array",a):o==="string"&&(n?a=PZ.decode(a):r&&i!==!0&&(a=qZ(a))),a):a_.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}});var Nr=w((fRe,GO)=>{"use strict";function VO(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}VO.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return this.isFinished?!1:(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(r){e.processChunk(r)}),t.on("end",function(){e.end()}),t.on("error",function(r){e.error(r)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var t=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}};GO.exports=VO});var go=w(qn=>{"use strict";var po=yt(),$s=Ki(),LZ=Mu(),nd=Nr(),Uu=new Array(256);for(Qi=0;Qi<256;Qi++)Uu[Qi]=Qi>=252?6:Qi>=248?5:Qi>=240?4:Qi>=224?3:Qi>=192?2:1;var Qi;Uu[254]=Uu[254]=1;var BZ=function(t){var e,r,i,n,s,a=t.length,o=0;for(n=0;n<a;n++)r=t.charCodeAt(n),(r&64512)===55296&&n+1<a&&(i=t.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),o+=r<128?1:r<2048?2:r<65536?3:4;for($s.uint8array?e=new Uint8Array(o):e=new Array(o),s=0,n=0;s<o;n++)r=t.charCodeAt(n),(r&64512)===55296&&n+1<a&&(i=t.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?e[s++]=r:r<2048?(e[s++]=192|r>>>6,e[s++]=128|r&63):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|r&63):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|r&63);return e},jZ=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+Uu[t[r]]>e?r:e},$Z=function(t){var e,r,i,n,s=t.length,a=new Array(s*2);for(r=0,e=0;e<s;){if(i=t[e++],i<128){a[r++]=i;continue}if(n=Uu[i],n>4){a[r++]=65533,e+=n-1;continue}for(i&=n===2?31:n===3?15:7;n>1&&e<s;)i=i<<6|t[e++]&63,n--;if(n>1){a[r++]=65533;continue}i<65536?a[r++]=i:(i-=65536,a[r++]=55296|i>>10&1023,a[r++]=56320|i&1023)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),po.applyFromCharCode(a)};qn.utf8encode=function(e){return $s.nodebuffer?LZ.newBufferFrom(e,"utf-8"):BZ(e)};qn.utf8decode=function(e){return $s.nodebuffer?po.transformTo("nodebuffer",e).toString("utf-8"):(e=po.transformTo($s.uint8array?"uint8array":"array",e),$Z(e))};function sd(){nd.call(this,"utf-8 decode"),this.leftOver=null}po.inherits(sd,nd);sd.prototype.processChunk=function(t){var e=po.transformTo($s.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if($s.uint8array){var r=e;e=new Uint8Array(r.length+this.leftOver.length),e.set(this.leftOver,0),e.set(r,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var i=jZ(e),n=e;i!==e.length&&($s.uint8array?(n=e.subarray(0,i),this.leftOver=e.subarray(i,e.length)):(n=e.slice(0,i),this.leftOver=e.slice(i,e.length))),this.push({data:qn.utf8decode(n),meta:t.meta})};sd.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:qn.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};qn.Utf8DecodeWorker=sd;function o_(){nd.call(this,"utf-8 encode")}po.inherits(o_,nd);o_.prototype.processChunk=function(t){this.push({data:qn.utf8encode(t.data),meta:t.meta})};qn.Utf8EncodeWorker=o_});var QO=w((hRe,KO)=>{"use strict";var ZO=Nr(),YO=yt();function l_(t){ZO.call(this,"ConvertWorker to "+t),this.destType=t}YO.inherits(l_,ZO);l_.prototype.processChunk=function(t){this.push({data:YO.transformTo(this.destType,t.data),meta:t.meta})};KO.exports=l_});var tI=w((dRe,eI)=>{"use strict";var JO=Vv().Readable,UZ=yt();UZ.inherits(u_,JO);function u_(t,e,r){JO.call(this,e),this._helper=t;var i=this;t.on("data",function(n,s){i.push(n)||i._helper.pause(),r&&r(s)}).on("error",function(n){i.emit("error",n)}).on("end",function(){i.push(null)})}u_.prototype._read=function(){this._helper.resume()};eI.exports=u_});var f_=w((pRe,nI)=>{"use strict";var Us=yt(),WZ=QO(),HZ=Nr(),zZ=Kv(),XZ=Ki(),VZ=co(),rI=null;if(XZ.nodestream)try{rI=tI()}catch{}function GZ(t,e,r){switch(t){case"blob":return Us.newBlob(Us.transformTo("arraybuffer",e),r);case"base64":return zZ.encode(e);default:return Us.transformTo(t,e)}}function ZZ(t,e){var r,i=0,n=null,s=0;for(r=0;r<e.length;r++)s+=e[r].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(n=new Uint8Array(s),r=0;r<e.length;r++)n.set(e[r],i),i+=e[r].length;return n;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}function YZ(t,e){return new VZ.Promise(function(r,i){var n=[],s=t._internalType,a=t._outputType,o=t._mimeType;t.on("data",function(u,f){n.push(u),e&&e(f)}).on("error",function(u){n=[],i(u)}).on("end",function(){try{var u=GZ(a,ZZ(s,n),o);r(u)}catch(f){i(f)}n=[]}).resume()})}function iI(t,e,r){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string";break}try{this._internalType=i,this._outputType=e,this._mimeType=r,Us.checkSupport(i),this._worker=t.pipe(new WZ(i)),t.lock()}catch(n){this._worker=new HZ("error"),this._worker.error(n)}}iI.prototype={accumulate:function(t){return YZ(this,t)},on:function(t,e){var r=this;return t==="data"?this._worker.on(t,function(i){e.call(r,i.data,i.meta)}):this._worker.on(t,function(){Us.delay(e,arguments,r)}),this},resume:function(){return Us.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(Us.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new rI(this,{objectMode:this._outputType!=="nodebuffer"},t)}};nI.exports=iI});var c_=w(ai=>{"use strict";ai.base64=!1;ai.binary=!1;ai.dir=!1;ai.createFolders=!0;ai.date=null;ai.compression=null;ai.compressionOptions=null;ai.comment=null;ai.unixPermissions=null;ai.dosPermissions=null});var h_=w((mRe,sI)=>{"use strict";var ad=yt(),od=Nr(),KZ=16*1024;function mo(t){od.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(r){e.dataIsReady=!0,e.data=r,e.max=r&&r.length||0,e.type=ad.getTypeOf(r),e.isPaused||e._tickAndRepeat()},function(r){e.error(r)})}ad.inherits(mo,od);mo.prototype.cleanUp=function(){od.prototype.cleanUp.call(this),this.data=null};mo.prototype.resume=function(){return od.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,ad.delay(this._tickAndRepeat,[],this)),!0):!1};mo.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(ad.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};mo.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=KZ,e=null,r=Math.min(this.max,this.index+t);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,r);break;case"uint8array":e=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":e=this.data.slice(this.index,r);break}return this.index=r,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};sI.exports=mo});var ld=w((yRe,oI)=>{"use strict";var QZ=yt();function JZ(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e}var aI=JZ();function eY(t,e,r,i){var n=aI,s=i+r;t=t^-1;for(var a=i;a<s;a++)t=t>>>8^n[(t^e[a])&255];return t^-1}function tY(t,e,r,i){var n=aI,s=i+r;t=t^-1;for(var a=i;a<s;a++)t=t>>>8^n[(t^e.charCodeAt(a))&255];return t^-1}oI.exports=function(e,r){if(typeof e>"u"||!e.length)return 0;var i=QZ.getTypeOf(e)!=="string";return i?eY(r|0,e,e.length,0):tY(r|0,e,e.length,0)}});var p_=w((vRe,uI)=>{"use strict";var lI=Nr(),rY=ld(),iY=yt();function d_(){lI.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}iY.inherits(d_,lI);d_.prototype.processChunk=function(t){this.streamInfo.crc32=rY(t.data,this.streamInfo.crc32||0),this.push(t)};uI.exports=d_});var cI=w((_Re,fI)=>{"use strict";var nY=yt(),g_=Nr();function m_(t){g_.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}nY.inherits(m_,g_);m_.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}g_.prototype.processChunk.call(this,t)};fI.exports=m_});var ud=w((wRe,pI)=>{"use strict";var hI=co(),dI=h_(),sY=p_(),y_=cI();function v_(t,e,r,i,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=n}v_.prototype={getContentWorker:function(){var t=new dI(hI.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new y_("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new dI(hI.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};v_.createWorkerFrom=function(t,e,r){return t.pipe(new sY).pipe(new y_("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new y_("compressedSize")).withStreamInfo("compression",e)};pI.exports=v_});var vI=w((bRe,yI)=>{"use strict";var aY=f_(),oY=h_(),__=go(),w_=ud(),gI=Nr(),b_=function(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};b_.prototype={internalStream:function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");r=t.toLowerCase();var i=r==="string"||r==="text";(r==="binarystring"||r==="text")&&(r="string"),e=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(e=e.pipe(new __.Utf8EncodeWorker)),!n&&i&&(e=e.pipe(new __.Utf8DecodeWorker))}catch(s){e=new gI("error"),e.error(s)}return new aY(e,r,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof w_&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new __.Utf8EncodeWorker)),w_.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof w_?this._data.getContentWorker():this._data instanceof gI?this._data:new oY(this._data)}};var mI=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],lY=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(fd=0;fd<mI.length;fd++)b_.prototype[mI[fd]]=lY;var fd;yI.exports=b_});var Ji=w(cr=>{"use strict";var uY=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function fY(t,e){return Object.prototype.hasOwnProperty.call(t,e)}cr.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)fY(r,i)&&(t[i]=r[i])}}return t};cr.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var cY={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray){t.set(e.subarray(r,r+i),n);return}for(var s=0;s<i;s++)t[n+s]=e[r+s]},flattenChunks:function(t){var e,r,i,n,s,a;for(i=0,e=0,r=t.length;e<r;e++)i+=t[e].length;for(a=new Uint8Array(i),n=0,e=0,r=t.length;e<r;e++)s=t[e],a.set(s,n),n+=s.length;return a}},hY={arraySet:function(t,e,r,i,n){for(var s=0;s<i;s++)t[n+s]=e[r+s]},flattenChunks:function(t){return[].concat.apply([],t)}};cr.setTyped=function(t){t?(cr.Buf8=Uint8Array,cr.Buf16=Uint16Array,cr.Buf32=Int32Array,cr.assign(cr,cY)):(cr.Buf8=Array,cr.Buf16=Array,cr.Buf32=Array,cr.assign(cr,hY))};cr.setTyped(uY)});var $I=w(_o=>{"use strict";var dY=Ji(),pY=4,_I=0,wI=1,gY=2;function vo(t){for(var e=t.length;--e>=0;)t[e]=0}var mY=0,CI=1,yY=2,vY=3,_Y=258,R_=29,Gu=256,Hu=Gu+1+R_,yo=30,A_=19,kI=2*Hu+1,Ws=15,x_=16,wY=7,O_=256,RI=16,AI=17,OI=18,C_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],cd=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bY=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],II=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],xY=512,en=new Array((Hu+2)*2);vo(en);var Wu=new Array(yo*2);vo(Wu);var zu=new Array(xY);vo(zu);var Xu=new Array(_Y-vY+1);vo(Xu);var I_=new Array(R_);vo(I_);var hd=new Array(yo);vo(hd);function S_(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}var NI,DI,FI;function E_(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function MI(t){return t<256?zu[t]:zu[256+(t>>>7)]}function Vu(t,e){t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255}function _r(t,e,r){t.bi_valid>x_-r?(t.bi_buf|=e<<t.bi_valid&65535,Vu(t,t.bi_buf),t.bi_buf=e>>x_-t.bi_valid,t.bi_valid+=r-x_):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function xi(t,e,r){_r(t,r[e*2],r[e*2+1])}function PI(t,e){var r=0;do r|=t&1,t>>>=1,r<<=1;while(--e>0);return r>>>1}function SY(t){t.bi_valid===16?(Vu(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)}function EY(t,e){var r=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,u=e.stat_desc.max_length,f,c,h,d,p,g,y=0;for(d=0;d<=Ws;d++)t.bl_count[d]=0;for(r[t.heap[t.heap_max]*2+1]=0,f=t.heap_max+1;f<kI;f++)c=t.heap[f],d=r[r[c*2+1]*2+1]+1,d>u&&(d=u,y++),r[c*2+1]=d,!(c>i)&&(t.bl_count[d]++,p=0,c>=o&&(p=a[c-o]),g=r[c*2],t.opt_len+=g*(d+p),s&&(t.static_len+=g*(n[c*2+1]+p)));if(y!==0){do{for(d=u-1;t.bl_count[d]===0;)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[u]--,y-=2}while(y>0);for(d=u;d!==0;d--)for(c=t.bl_count[d];c!==0;)h=t.heap[--f],!(h>i)&&(r[h*2+1]!==d&&(t.opt_len+=(d-r[h*2+1])*r[h*2],r[h*2+1]=d),c--)}}function qI(t,e,r){var i=new Array(Ws+1),n=0,s,a;for(s=1;s<=Ws;s++)i[s]=n=n+r[s-1]<<1;for(a=0;a<=e;a++){var o=t[a*2+1];o!==0&&(t[a*2]=PI(i[o]++,o))}}function TY(){var t,e,r,i,n,s=new Array(Ws+1);for(r=0,i=0;i<R_-1;i++)for(I_[i]=r,t=0;t<1<<C_[i];t++)Xu[r++]=i;for(Xu[r-1]=i,n=0,i=0;i<16;i++)for(hd[i]=n,t=0;t<1<<cd[i];t++)zu[n++]=i;for(n>>=7;i<yo;i++)for(hd[i]=n<<7,t=0;t<1<<cd[i]-7;t++)zu[256+n++]=i;for(e=0;e<=Ws;e++)s[e]=0;for(t=0;t<=143;)en[t*2+1]=8,t++,s[8]++;for(;t<=255;)en[t*2+1]=9,t++,s[9]++;for(;t<=279;)en[t*2+1]=7,t++,s[7]++;for(;t<=287;)en[t*2+1]=8,t++,s[8]++;for(qI(en,Hu+1,s),t=0;t<yo;t++)Wu[t*2+1]=5,Wu[t*2]=PI(t,5);NI=new S_(en,C_,Gu+1,Hu,Ws),DI=new S_(Wu,cd,0,yo,Ws),FI=new S_(new Array(0),bY,0,A_,wY)}function LI(t){var e;for(e=0;e<Hu;e++)t.dyn_ltree[e*2]=0;for(e=0;e<yo;e++)t.dyn_dtree[e*2]=0;for(e=0;e<A_;e++)t.bl_tree[e*2]=0;t.dyn_ltree[O_*2]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function BI(t){t.bi_valid>8?Vu(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function CY(t,e,r,i){BI(t),i&&(Vu(t,r),Vu(t,~r)),dY.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function bI(t,e,r,i){var n=e*2,s=r*2;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]}function T_(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&bI(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!bI(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function xI(t,e,r){var i,n,s=0,a,o;if(t.last_lit!==0)do i=t.pending_buf[t.d_buf+s*2]<<8|t.pending_buf[t.d_buf+s*2+1],n=t.pending_buf[t.l_buf+s],s++,i===0?xi(t,n,e):(a=Xu[n],xi(t,a+Gu+1,e),o=C_[a],o!==0&&(n-=I_[a],_r(t,n,o)),i--,a=MI(i),xi(t,a,r),o=cd[a],o!==0&&(i-=hd[a],_r(t,i,o)));while(s<t.last_lit);xi(t,O_,e)}function k_(t,e){var r=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems,a,o,u=-1,f;for(t.heap_len=0,t.heap_max=kI,a=0;a<s;a++)r[a*2]!==0?(t.heap[++t.heap_len]=u=a,t.depth[a]=0):r[a*2+1]=0;for(;t.heap_len<2;)f=t.heap[++t.heap_len]=u<2?++u:0,r[f*2]=1,t.depth[f]=0,t.opt_len--,n&&(t.static_len-=i[f*2+1]);for(e.max_code=u,a=t.heap_len>>1;a>=1;a--)T_(t,r,a);f=s;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],T_(t,r,1),o=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=o,r[f*2]=r[a*2]+r[o*2],t.depth[f]=(t.depth[a]>=t.depth[o]?t.depth[a]:t.depth[o])+1,r[a*2+1]=r[o*2+1]=f,t.heap[1]=f++,T_(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],EY(t,e),qI(r,u,t.bl_count)}function SI(t,e,r){var i,n=-1,s,a=e[1],o=0,u=7,f=4;for(a===0&&(u=138,f=3),e[(r+1)*2+1]=65535,i=0;i<=r;i++)s=a,a=e[(i+1)*2+1],!(++o<u&&s===a)&&(o<f?t.bl_tree[s*2]+=o:s!==0?(s!==n&&t.bl_tree[s*2]++,t.bl_tree[RI*2]++):o<=10?t.bl_tree[AI*2]++:t.bl_tree[OI*2]++,o=0,n=s,a===0?(u=138,f=3):s===a?(u=6,f=3):(u=7,f=4))}function EI(t,e,r){var i,n=-1,s,a=e[1],o=0,u=7,f=4;for(a===0&&(u=138,f=3),i=0;i<=r;i++)if(s=a,a=e[(i+1)*2+1],!(++o<u&&s===a)){if(o<f)do xi(t,s,t.bl_tree);while(--o!==0);else s!==0?(s!==n&&(xi(t,s,t.bl_tree),o--),xi(t,RI,t.bl_tree),_r(t,o-3,2)):o<=10?(xi(t,AI,t.bl_tree),_r(t,o-3,3)):(xi(t,OI,t.bl_tree),_r(t,o-11,7));o=0,n=s,a===0?(u=138,f=3):s===a?(u=6,f=3):(u=7,f=4)}}function kY(t){var e;for(SI(t,t.dyn_ltree,t.l_desc.max_code),SI(t,t.dyn_dtree,t.d_desc.max_code),k_(t,t.bl_desc),e=A_-1;e>=3&&t.bl_tree[II[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e}function RY(t,e,r,i){var n;for(_r(t,e-257,5),_r(t,r-1,5),_r(t,i-4,4),n=0;n<i;n++)_r(t,t.bl_tree[II[n]*2+1],3);EI(t,t.dyn_ltree,e-1),EI(t,t.dyn_dtree,r-1)}function AY(t){var e=4093624447,r;for(r=0;r<=31;r++,e>>>=1)if(e&1&&t.dyn_ltree[r*2]!==0)return _I;if(t.dyn_ltree[18]!==0||t.dyn_ltree[20]!==0||t.dyn_ltree[26]!==0)return wI;for(r=32;r<Gu;r++)if(t.dyn_ltree[r*2]!==0)return wI;return _I}var TI=!1;function OY(t){TI||(TY(),TI=!0),t.l_desc=new E_(t.dyn_ltree,NI),t.d_desc=new E_(t.dyn_dtree,DI),t.bl_desc=new E_(t.bl_tree,FI),t.bi_buf=0,t.bi_valid=0,LI(t)}function jI(t,e,r,i){_r(t,(mY<<1)+(i?1:0),3),CY(t,e,r,!0)}function IY(t){_r(t,CI<<1,3),xi(t,O_,en),SY(t)}function NY(t,e,r,i){var n,s,a=0;t.level>0?(t.strm.data_type===gY&&(t.strm.data_type=AY(t)),k_(t,t.l_desc),k_(t,t.d_desc),a=kY(t),n=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=n&&(n=s)):n=s=r+5,r+4<=n&&e!==-1?jI(t,e,r,i):t.strategy===pY||s===n?(_r(t,(CI<<1)+(i?1:0),3),xI(t,en,Wu)):(_r(t,(yY<<1)+(i?1:0),3),RY(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),xI(t,t.dyn_ltree,t.dyn_dtree)),LI(t),i&&BI(t)}function DY(t,e,r){return t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255,t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255,t.pending_buf[t.l_buf+t.last_lit]=r&255,t.last_lit++,e===0?t.dyn_ltree[r*2]++:(t.matches++,e--,t.dyn_ltree[(Xu[r]+Gu+1)*2]++,t.dyn_dtree[MI(e)*2]++),t.last_lit===t.lit_bufsize-1}_o._tr_init=OY;_o._tr_stored_block=jI;_o._tr_flush_block=NY;_o._tr_tally=DY;_o._tr_align=IY});var N_=w((ERe,UI)=>{"use strict";function FY(t,e,r,i){for(var n=t&65535|0,s=t>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do n=n+e[i++]|0,s=s+n|0;while(--a);n%=65521,s%=65521}return n|s<<16|0}UI.exports=FY});var D_=w((TRe,WI)=>{"use strict";function MY(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e}var PY=MY();function qY(t,e,r,i){var n=PY,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[(t^e[a])&255];return t^-1}WI.exports=qY});var dd=w((CRe,HI)=>{"use strict";HI.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var JI=w(Ti=>{"use strict";var hr=Ji(),Hr=$I(),GI=N_(),Ln=D_(),LY=dd(),Vs=0,BY=1,jY=3,Wn=4,zI=5,Ei=0,XI=1,zr=-2,$Y=-3,F_=-5,UY=-1,WY=1,pd=2,HY=3,zY=4,XY=0,VY=2,vd=8,GY=9,ZY=15,YY=8,KY=29,QY=256,P_=QY+1+KY,JY=30,eK=19,tK=2*P_+1,rK=15,Re=3,$n=258,oi=$n+Re+1,iK=32,_d=42,q_=69,gd=73,md=91,yd=103,Hs=113,Yu=666,Dt=1,Ku=2,zs=3,xo=4,nK=3;function Un(t,e){return t.msg=LY[e],e}function VI(t){return(t<<1)-(t>4?9:0)}function jn(t){for(var e=t.length;--e>=0;)t[e]=0}function Bn(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(hr.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))}function Ht(t,e){Hr._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Bn(t.strm)}function Pe(t,e){t.pending_buf[t.pending++]=e}function Zu(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255}function sK(t,e,r,i){var n=t.avail_in;return n>i&&(n=i),n===0?0:(t.avail_in-=n,hr.arraySet(e,t.input,t.next_in,n,r),t.state.wrap===1?t.adler=GI(t.adler,e,n,r):t.state.wrap===2&&(t.adler=Ln(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)}function ZI(t,e){var r=t.max_chain_length,i=t.strstart,n,s,a=t.prev_length,o=t.nice_match,u=t.strstart>t.w_size-oi?t.strstart-(t.w_size-oi):0,f=t.window,c=t.w_mask,h=t.prev,d=t.strstart+$n,p=f[i+a-1],g=f[i+a];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do if(n=e,!(f[n+a]!==g||f[n+a-1]!==p||f[n]!==f[i]||f[++n]!==f[i+1])){i+=2,n++;do;while(f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&i<d);if(s=$n-(d-i),i=d-$n,s>a){if(t.match_start=e,a=s,s>=o)break;p=f[i+a-1],g=f[i+a]}}while((e=h[e&c])>u&&--r!==0);return a<=t.lookahead?a:t.lookahead}function Xs(t){var e=t.w_size,r,i,n,s,a;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-oi)){hr.arraySet(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,i=t.hash_size,r=i;do n=t.head[--r],t.head[r]=n>=e?n-e:0;while(--i);i=e,r=i;do n=t.prev[--r],t.prev[r]=n>=e?n-e:0;while(--i);s+=e}if(t.strm.avail_in===0)break;if(i=sK(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=i,t.lookahead+t.insert>=Re)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+Re-1])&t.hash_mask,t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<Re)););}while(t.lookahead<oi&&t.strm.avail_in!==0)}function aK(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Xs(t),t.lookahead===0&&e===Vs)return Dt;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((t.strstart===0||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,Ht(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-oi&&(Ht(t,!1),t.strm.avail_out===0))return Dt}return t.insert=0,e===Wn?(Ht(t,!0),t.strm.avail_out===0?zs:xo):(t.strstart>t.block_start&&(Ht(t,!1),t.strm.avail_out===0),Dt)}function M_(t,e){for(var r,i;;){if(t.lookahead<oi){if(Xs(t),t.lookahead<oi&&e===Vs)return Dt;if(t.lookahead===0)break}if(r=0,t.lookahead>=Re&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Re-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),r!==0&&t.strstart-r<=t.w_size-oi&&(t.match_length=ZI(t,r)),t.match_length>=Re)if(i=Hr._tr_tally(t,t.strstart-t.match_start,t.match_length-Re),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=Re){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Re-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=Hr._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(Ht(t,!1),t.strm.avail_out===0))return Dt}return t.insert=t.strstart<Re-1?t.strstart:Re-1,e===Wn?(Ht(t,!0),t.strm.avail_out===0?zs:xo):t.last_lit&&(Ht(t,!1),t.strm.avail_out===0)?Dt:Ku}function wo(t,e){for(var r,i,n;;){if(t.lookahead<oi){if(Xs(t),t.lookahead<oi&&e===Vs)return Dt;if(t.lookahead===0)break}if(r=0,t.lookahead>=Re&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Re-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=Re-1,r!==0&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-oi&&(t.match_length=ZI(t,r),t.match_length<=5&&(t.strategy===WY||t.match_length===Re&&t.strstart-t.match_start>4096)&&(t.match_length=Re-1)),t.prev_length>=Re&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-Re,i=Hr._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-Re),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Re-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=Re-1,t.strstart++,i&&(Ht(t,!1),t.strm.avail_out===0))return Dt}else if(t.match_available){if(i=Hr._tr_tally(t,0,t.window[t.strstart-1]),i&&Ht(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Dt}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=Hr._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<Re-1?t.strstart:Re-1,e===Wn?(Ht(t,!0),t.strm.avail_out===0?zs:xo):t.last_lit&&(Ht(t,!1),t.strm.avail_out===0)?Dt:Ku}function oK(t,e){for(var r,i,n,s,a=t.window;;){if(t.lookahead<=$n){if(Xs(t),t.lookahead<=$n&&e===Vs)return Dt;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=Re&&t.strstart>0&&(n=t.strstart-1,i=a[n],i===a[++n]&&i===a[++n]&&i===a[++n])){s=t.strstart+$n;do;while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&n<s);t.match_length=$n-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=Re?(r=Hr._tr_tally(t,1,t.match_length-Re),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=Hr._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Ht(t,!1),t.strm.avail_out===0))return Dt}return t.insert=0,e===Wn?(Ht(t,!0),t.strm.avail_out===0?zs:xo):t.last_lit&&(Ht(t,!1),t.strm.avail_out===0)?Dt:Ku}function lK(t,e){for(var r;;){if(t.lookahead===0&&(Xs(t),t.lookahead===0)){if(e===Vs)return Dt;break}if(t.match_length=0,r=Hr._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Ht(t,!1),t.strm.avail_out===0))return Dt}return t.insert=0,e===Wn?(Ht(t,!0),t.strm.avail_out===0?zs:xo):t.last_lit&&(Ht(t,!1),t.strm.avail_out===0)?Dt:Ku}function Si(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}var bo;bo=[new Si(0,0,0,0,aK),new Si(4,4,8,4,M_),new Si(4,5,16,8,M_),new Si(4,6,32,32,M_),new Si(4,4,16,16,wo),new Si(8,16,32,32,wo),new Si(8,16,128,128,wo),new Si(8,32,128,256,wo),new Si(32,128,258,1024,wo),new Si(32,258,258,4096,wo)];function uK(t){t.window_size=2*t.w_size,jn(t.head),t.max_lazy_match=bo[t.level].max_lazy,t.good_match=bo[t.level].good_length,t.nice_match=bo[t.level].nice_length,t.max_chain_length=bo[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=Re-1,t.match_available=0,t.ins_h=0}function fK(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=vd,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new hr.Buf16(tK*2),this.dyn_dtree=new hr.Buf16((2*JY+1)*2),this.bl_tree=new hr.Buf16((2*eK+1)*2),jn(this.dyn_ltree),jn(this.dyn_dtree),jn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new hr.Buf16(rK+1),this.heap=new hr.Buf16(2*P_+1),jn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new hr.Buf16(2*P_+1),jn(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function YI(t){var e;return!t||!t.state?Un(t,zr):(t.total_in=t.total_out=0,t.data_type=VY,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?_d:Hs,t.adler=e.wrap===2?0:1,e.last_flush=Vs,Hr._tr_init(e),Ei)}function KI(t){var e=YI(t);return e===Ei&&uK(t.state),e}function cK(t,e){return!t||!t.state||t.state.wrap!==2?zr:(t.state.gzhead=e,Ei)}function QI(t,e,r,i,n,s){if(!t)return zr;var a=1;if(e===UY&&(e=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),n<1||n>GY||r!==vd||i<8||i>15||e<0||e>9||s<0||s>zY)return Un(t,zr);i===8&&(i=9);var o=new fK;return t.state=o,o.strm=t,o.wrap=a,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+Re-1)/Re),o.window=new hr.Buf8(o.w_size*2),o.head=new hr.Buf16(o.hash_size),o.prev=new hr.Buf16(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new hr.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=s,o.method=r,KI(t)}function hK(t,e){return QI(t,e,vd,ZY,YY,XY)}function dK(t,e){var r,i,n,s;if(!t||!t.state||e>zI||e<0)return t?Un(t,zr):zr;if(i=t.state,!t.output||!t.input&&t.avail_in!==0||i.status===Yu&&e!==Wn)return Un(t,t.avail_out===0?F_:zr);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===_d)if(i.wrap===2)t.adler=0,Pe(i,31),Pe(i,139),Pe(i,8),i.gzhead?(Pe(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Pe(i,i.gzhead.time&255),Pe(i,i.gzhead.time>>8&255),Pe(i,i.gzhead.time>>16&255),Pe(i,i.gzhead.time>>24&255),Pe(i,i.level===9?2:i.strategy>=pd||i.level<2?4:0),Pe(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Pe(i,i.gzhead.extra.length&255),Pe(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=Ln(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=q_):(Pe(i,0),Pe(i,0),Pe(i,0),Pe(i,0),Pe(i,0),Pe(i,i.level===9?2:i.strategy>=pd||i.level<2?4:0),Pe(i,nK),i.status=Hs);else{var a=vd+(i.w_bits-8<<4)<<8,o=-1;i.strategy>=pd||i.level<2?o=0:i.level<6?o=1:i.level===6?o=2:o=3,a|=o<<6,i.strstart!==0&&(a|=iK),a+=31-a%31,i.status=Hs,Zu(i,a),i.strstart!==0&&(Zu(i,t.adler>>>16),Zu(i,t.adler&65535)),t.adler=1}if(i.status===q_)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=Ln(t.adler,i.pending_buf,i.pending-n,n)),Bn(t),n=i.pending,i.pending===i.pending_buf_size));)Pe(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=Ln(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=gd)}else i.status=gd;if(i.status===gd)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=Ln(t.adler,i.pending_buf,i.pending-n,n)),Bn(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}i.gzindex<i.gzhead.name.length?s=i.gzhead.name.charCodeAt(i.gzindex++)&255:s=0,Pe(i,s)}while(s!==0);i.gzhead.hcrc&&i.pending>n&&(t.adler=Ln(t.adler,i.pending_buf,i.pending-n,n)),s===0&&(i.gzindex=0,i.status=md)}else i.status=md;if(i.status===md)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=Ln(t.adler,i.pending_buf,i.pending-n,n)),Bn(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}i.gzindex<i.gzhead.comment.length?s=i.gzhead.comment.charCodeAt(i.gzindex++)&255:s=0,Pe(i,s)}while(s!==0);i.gzhead.hcrc&&i.pending>n&&(t.adler=Ln(t.adler,i.pending_buf,i.pending-n,n)),s===0&&(i.status=yd)}else i.status=yd;if(i.status===yd&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Bn(t),i.pending+2<=i.pending_buf_size&&(Pe(i,t.adler&255),Pe(i,t.adler>>8&255),t.adler=0,i.status=Hs)):i.status=Hs),i.pending!==0){if(Bn(t),t.avail_out===0)return i.last_flush=-1,Ei}else if(t.avail_in===0&&VI(e)<=VI(r)&&e!==Wn)return Un(t,F_);if(i.status===Yu&&t.avail_in!==0)return Un(t,F_);if(t.avail_in!==0||i.lookahead!==0||e!==Vs&&i.status!==Yu){var u=i.strategy===pd?lK(i,e):i.strategy===HY?oK(i,e):bo[i.level].func(i,e);if((u===zs||u===xo)&&(i.status=Yu),u===Dt||u===zs)return t.avail_out===0&&(i.last_flush=-1),Ei;if(u===Ku&&(e===BY?Hr._tr_align(i):e!==zI&&(Hr._tr_stored_block(i,0,0,!1),e===jY&&(jn(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Bn(t),t.avail_out===0))return i.last_flush=-1,Ei}return e!==Wn?Ei:i.wrap<=0?XI:(i.wrap===2?(Pe(i,t.adler&255),Pe(i,t.adler>>8&255),Pe(i,t.adler>>16&255),Pe(i,t.adler>>24&255),Pe(i,t.total_in&255),Pe(i,t.total_in>>8&255),Pe(i,t.total_in>>16&255),Pe(i,t.total_in>>24&255)):(Zu(i,t.adler>>>16),Zu(i,t.adler&65535)),Bn(t),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?Ei:XI)}function pK(t){var e;return!t||!t.state?zr:(e=t.state.status,e!==_d&&e!==q_&&e!==gd&&e!==md&&e!==yd&&e!==Hs&&e!==Yu?Un(t,zr):(t.state=null,e===Hs?Un(t,$Y):Ei))}function gK(t,e){var r=e.length,i,n,s,a,o,u,f,c;if(!t||!t.state||(i=t.state,a=i.wrap,a===2||a===1&&i.status!==_d||i.lookahead))return zr;for(a===1&&(t.adler=GI(t.adler,e,r,0)),i.wrap=0,r>=i.w_size&&(a===0&&(jn(i.head),i.strstart=0,i.block_start=0,i.insert=0),c=new hr.Buf8(i.w_size),hr.arraySet(c,e,r-i.w_size,i.w_size,0),e=c,r=i.w_size),o=t.avail_in,u=t.next_in,f=t.input,t.avail_in=r,t.next_in=0,t.input=e,Xs(i);i.lookahead>=Re;){n=i.strstart,s=i.lookahead-(Re-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+Re-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--s);i.strstart=n,i.lookahead=Re-1,Xs(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Re-1,i.match_available=0,t.next_in=u,t.input=f,t.avail_in=o,i.wrap=a,Ei}Ti.deflateInit=hK;Ti.deflateInit2=QI;Ti.deflateReset=KI;Ti.deflateResetKeep=YI;Ti.deflateSetHeader=cK;Ti.deflate=dK;Ti.deflateEnd=pK;Ti.deflateSetDictionary=gK;Ti.deflateInfo="pako deflate (from Nodeca project)"});var L_=w(So=>{"use strict";var wd=Ji(),eN=!0,tN=!0;try{String.fromCharCode.apply(null,[0])}catch{eN=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{tN=!1}var Qu=new wd.Buf8(256);for(tn=0;tn<256;tn++)Qu[tn]=tn>=252?6:tn>=248?5:tn>=240?4:tn>=224?3:tn>=192?2:1;var tn;Qu[254]=Qu[254]=1;So.string2buf=function(t){var e,r,i,n,s,a=t.length,o=0;for(n=0;n<a;n++)r=t.charCodeAt(n),(r&64512)===55296&&n+1<a&&(i=t.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=new wd.Buf8(o),s=0,n=0;s<o;n++)r=t.charCodeAt(n),(r&64512)===55296&&n+1<a&&(i=t.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?e[s++]=r:r<2048?(e[s++]=192|r>>>6,e[s++]=128|r&63):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|r&63):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|r&63);return e};function rN(t,e){if(e<65534&&(t.subarray&&tN||!t.subarray&&eN))return String.fromCharCode.apply(null,wd.shrinkBuf(t,e));for(var r="",i=0;i<e;i++)r+=String.fromCharCode(t[i]);return r}So.buf2binstring=function(t){return rN(t,t.length)};So.binstring2buf=function(t){for(var e=new wd.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e};So.buf2string=function(t,e){var r,i,n,s,a=e||t.length,o=new Array(a*2);for(i=0,r=0;r<a;){if(n=t[r++],n<128){o[i++]=n;continue}if(s=Qu[n],s>4){o[i++]=65533,r+=s-1;continue}for(n&=s===2?31:s===3?15:7;s>1&&r<a;)n=n<<6|t[r++]&63,s--;if(s>1){o[i++]=65533;continue}n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|n&1023)}return rN(o,i)};So.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+Qu[t[r]]>e?r:e}});var B_=w((ARe,iN)=>{"use strict";function mK(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}iN.exports=mK});var oN=w(tf=>{"use strict";var Ju=JI(),ef=Ji(),$_=L_(),U_=dd(),yK=B_(),aN=Object.prototype.toString,vK=0,j_=4,Eo=0,nN=1,sN=2,_K=-1,wK=0,bK=8;function Gs(t){if(!(this instanceof Gs))return new Gs(t);this.options=ef.assign({level:_K,method:bK,chunkSize:16384,windowBits:15,memLevel:8,strategy:wK,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new yK,this.strm.avail_out=0;var r=Ju.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Eo)throw new Error(U_[r]);if(e.header&&Ju.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(typeof e.dictionary=="string"?i=$_.string2buf(e.dictionary):aN.call(e.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(e.dictionary):i=e.dictionary,r=Ju.deflateSetDictionary(this.strm,i),r!==Eo)throw new Error(U_[r]);this._dict_set=!0}}Gs.prototype.push=function(t,e){var r=this.strm,i=this.options.chunkSize,n,s;if(this.ended)return!1;s=e===~~e?e:e===!0?j_:vK,typeof t=="string"?r.input=$_.string2buf(t):aN.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new ef.Buf8(i),r.next_out=0,r.avail_out=i),n=Ju.deflate(r,s),n!==nN&&n!==Eo)return this.onEnd(n),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(s===j_||s===sN))&&(this.options.to==="string"?this.onData($_.buf2binstring(ef.shrinkBuf(r.output,r.next_out))):this.onData(ef.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&n!==nN);return s===j_?(n=Ju.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Eo):(s===sN&&(this.onEnd(Eo),r.avail_out=0),!0)};Gs.prototype.onData=function(t){this.chunks.push(t)};Gs.prototype.onEnd=function(t){t===Eo&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ef.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function W_(t,e){var r=new Gs(e);if(r.push(t,!0),r.err)throw r.msg||U_[r.err];return r.result}function xK(t,e){return e=e||{},e.raw=!0,W_(t,e)}function SK(t,e){return e=e||{},e.gzip=!0,W_(t,e)}tf.Deflate=Gs;tf.deflate=W_;tf.deflateRaw=xK;tf.gzip=SK});var uN=w((IRe,lN)=>{"use strict";var bd=30,EK=12;lN.exports=function(e,r){var i,n,s,a,o,u,f,c,h,d,p,g,y,v,b,k,N,E,U,ee,F,L,I,Z,H;i=e.state,n=e.next_in,Z=e.input,s=n+(e.avail_in-5),a=e.next_out,H=e.output,o=a-(r-e.avail_out),u=a+(e.avail_out-257),f=i.dmax,c=i.wsize,h=i.whave,d=i.wnext,p=i.window,g=i.hold,y=i.bits,v=i.lencode,b=i.distcode,k=(1<<i.lenbits)-1,N=(1<<i.distbits)-1;e:do{y<15&&(g+=Z[n++]<<y,y+=8,g+=Z[n++]<<y,y+=8),E=v[g&k];t:for(;;){if(U=E>>>24,g>>>=U,y-=U,U=E>>>16&255,U===0)H[a++]=E&65535;else if(U&16){ee=E&65535,U&=15,U&&(y<U&&(g+=Z[n++]<<y,y+=8),ee+=g&(1<<U)-1,g>>>=U,y-=U),y<15&&(g+=Z[n++]<<y,y+=8,g+=Z[n++]<<y,y+=8),E=b[g&N];r:for(;;){if(U=E>>>24,g>>>=U,y-=U,U=E>>>16&255,U&16){if(F=E&65535,U&=15,y<U&&(g+=Z[n++]<<y,y+=8,y<U&&(g+=Z[n++]<<y,y+=8)),F+=g&(1<<U)-1,F>f){e.msg="invalid distance too far back",i.mode=bd;break e}if(g>>>=U,y-=U,U=a-o,F>U){if(U=F-U,U>h&&i.sane){e.msg="invalid distance too far back",i.mode=bd;break e}if(L=0,I=p,d===0){if(L+=c-U,U<ee){ee-=U;do H[a++]=p[L++];while(--U);L=a-F,I=H}}else if(d<U){if(L+=c+d-U,U-=d,U<ee){ee-=U;do H[a++]=p[L++];while(--U);if(L=0,d<ee){U=d,ee-=U;do H[a++]=p[L++];while(--U);L=a-F,I=H}}}else if(L+=d-U,U<ee){ee-=U;do H[a++]=p[L++];while(--U);L=a-F,I=H}for(;ee>2;)H[a++]=I[L++],H[a++]=I[L++],H[a++]=I[L++],ee-=3;ee&&(H[a++]=I[L++],ee>1&&(H[a++]=I[L++]))}else{L=a-F;do H[a++]=H[L++],H[a++]=H[L++],H[a++]=H[L++],ee-=3;while(ee>2);ee&&(H[a++]=H[L++],ee>1&&(H[a++]=H[L++]))}}else if((U&64)===0){E=b[(E&65535)+(g&(1<<U)-1)];continue r}else{e.msg="invalid distance code",i.mode=bd;break e}break}}else if((U&64)===0){E=v[(E&65535)+(g&(1<<U)-1)];continue t}else if(U&32){i.mode=EK;break e}else{e.msg="invalid literal/length code",i.mode=bd;break e}break}}while(n<s&&a<u);ee=y>>3,n-=ee,y-=ee<<3,g&=(1<<y)-1,e.next_in=n,e.next_out=a,e.avail_in=n<s?5+(s-n):5-(n-s),e.avail_out=a<u?257+(u-a):257-(a-u),i.hold=g,i.bits=y}});var mN=w((NRe,gN)=>{"use strict";var fN=Ji(),To=15,cN=852,hN=592,dN=0,H_=1,pN=2,TK=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],CK=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],kK=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],RK=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];gN.exports=function(e,r,i,n,s,a,o,u){var f=u.bits,c=0,h=0,d=0,p=0,g=0,y=0,v=0,b=0,k=0,N=0,E,U,ee,F,L,I=null,Z=0,H,O=new fN.Buf16(To+1),q=new fN.Buf16(To+1),B=null,J=0,T,M,$;for(c=0;c<=To;c++)O[c]=0;for(h=0;h<n;h++)O[r[i+h]]++;for(g=f,p=To;p>=1&&O[p]===0;p--);if(g>p&&(g=p),p===0)return s[a++]=1<<24|64<<16|0,s[a++]=1<<24|64<<16|0,u.bits=1,0;for(d=1;d<p&&O[d]===0;d++);for(g<d&&(g=d),b=1,c=1;c<=To;c++)if(b<<=1,b-=O[c],b<0)return-1;if(b>0&&(e===dN||p!==1))return-1;for(q[1]=0,c=1;c<To;c++)q[c+1]=q[c]+O[c];for(h=0;h<n;h++)r[i+h]!==0&&(o[q[r[i+h]]++]=h);if(e===dN?(I=B=o,H=19):e===H_?(I=TK,Z-=257,B=CK,J-=257,H=256):(I=kK,B=RK,H=-1),N=0,h=0,c=d,L=a,y=g,v=0,ee=-1,k=1<<g,F=k-1,e===H_&&k>cN||e===pN&&k>hN)return 1;for(;;){T=c-v,o[h]<H?(M=0,$=o[h]):o[h]>H?(M=B[J+o[h]],$=I[Z+o[h]]):(M=96,$=0),E=1<<c-v,U=1<<y,d=U;do U-=E,s[L+(N>>v)+U]=T<<24|M<<16|$|0;while(U!==0);for(E=1<<c-1;N&E;)E>>=1;if(E!==0?(N&=E-1,N+=E):N=0,h++,--O[c]===0){if(c===p)break;c=r[i+o[h]]}if(c>g&&(N&F)!==ee){for(v===0&&(v=g),L+=d,y=c-v,b=1<<y;y+v<p&&(b-=O[y+v],!(b<=0));)y++,b<<=1;if(k+=1<<y,e===H_&&k>cN||e===pN&&k>hN)return 1;ee=N&F,s[ee]=g<<24|y<<16|L-a|0}}return N!==0&&(s[L+N]=c-v<<24|64<<16|0),u.bits=g,0}});var KN=w(li=>{"use strict";var Dr=Ji(),Y_=N_(),Ci=D_(),AK=uN(),rf=mN(),OK=0,UN=1,WN=2,yN=4,IK=5,xd=6,Zs=0,NK=1,DK=2,Xr=-2,HN=-3,K_=-4,FK=-5,vN=8,zN=1,_N=2,wN=3,bN=4,xN=5,SN=6,EN=7,TN=8,CN=9,kN=10,Td=11,rn=12,z_=13,RN=14,X_=15,AN=16,ON=17,IN=18,NN=19,Sd=20,Ed=21,DN=22,FN=23,MN=24,PN=25,qN=26,V_=27,LN=28,BN=29,ht=30,Q_=31,MK=32,PK=852,qK=592,LK=15,BK=LK;function jN(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function jK(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Dr.Buf16(320),this.work=new Dr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function XN(t){var e;return!t||!t.state?Xr:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=zN,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Dr.Buf32(PK),e.distcode=e.distdyn=new Dr.Buf32(qK),e.sane=1,e.back=-1,Zs)}function VN(t){var e;return!t||!t.state?Xr:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,XN(t))}function GN(t,e){var r,i;return!t||!t.state||(i=t.state,e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?Xr:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,VN(t))}function ZN(t,e){var r,i;return t?(i=new jK,t.state=i,i.window=null,r=GN(t,e),r!==Zs&&(t.state=null),r):Xr}function $K(t){return ZN(t,BK)}var $N=!0,G_,Z_;function UK(t){if($N){var e;for(G_=new Dr.Buf32(512),Z_=new Dr.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(rf(UN,t.lens,0,288,G_,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;rf(WN,t.lens,0,32,Z_,0,t.work,{bits:5}),$N=!1}t.lencode=G_,t.lenbits=9,t.distcode=Z_,t.distbits=5}function YN(t,e,r,i){var n,s=t.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Dr.Buf8(s.wsize)),i>=s.wsize?(Dr.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),Dr.arraySet(s.window,e,r-i,n,s.wnext),i-=n,i?(Dr.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0}function WK(t,e){var r,i,n,s,a,o,u,f,c,h,d,p,g,y,v=0,b,k,N,E,U,ee,F,L,I=new Dr.Buf8(4),Z,H,O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0)return Xr;r=t.state,r.mode===rn&&(r.mode=z_),a=t.next_out,n=t.output,u=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,f=r.hold,c=r.bits,h=o,d=u,L=Zs;e:for(;;)switch(r.mode){case zN:if(r.wrap===0){r.mode=z_;break}for(;c<16;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if(r.wrap&2&&f===35615){r.check=0,I[0]=f&255,I[1]=f>>>8&255,r.check=Ci(r.check,I,2,0),f=0,c=0,r.mode=_N;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((f&255)<<8)+(f>>8))%31){t.msg="incorrect header check",r.mode=ht;break}if((f&15)!==vN){t.msg="unknown compression method",r.mode=ht;break}if(f>>>=4,c-=4,F=(f&15)+8,r.wbits===0)r.wbits=F;else if(F>r.wbits){t.msg="invalid window size",r.mode=ht;break}r.dmax=1<<F,t.adler=r.check=1,r.mode=f&512?kN:rn,f=0,c=0;break;case _N:for(;c<16;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if(r.flags=f,(r.flags&255)!==vN){t.msg="unknown compression method",r.mode=ht;break}if(r.flags&57344){t.msg="unknown header flags set",r.mode=ht;break}r.head&&(r.head.text=f>>8&1),r.flags&512&&(I[0]=f&255,I[1]=f>>>8&255,r.check=Ci(r.check,I,2,0)),f=0,c=0,r.mode=wN;case wN:for(;c<32;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}r.head&&(r.head.time=f),r.flags&512&&(I[0]=f&255,I[1]=f>>>8&255,I[2]=f>>>16&255,I[3]=f>>>24&255,r.check=Ci(r.check,I,4,0)),f=0,c=0,r.mode=bN;case bN:for(;c<16;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}r.head&&(r.head.xflags=f&255,r.head.os=f>>8),r.flags&512&&(I[0]=f&255,I[1]=f>>>8&255,r.check=Ci(r.check,I,2,0)),f=0,c=0,r.mode=xN;case xN:if(r.flags&1024){for(;c<16;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}r.length=f,r.head&&(r.head.extra_len=f),r.flags&512&&(I[0]=f&255,I[1]=f>>>8&255,r.check=Ci(r.check,I,2,0)),f=0,c=0}else r.head&&(r.head.extra=null);r.mode=SN;case SN:if(r.flags&1024&&(p=r.length,p>o&&(p=o),p&&(r.head&&(F=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Dr.arraySet(r.head.extra,i,s,p,F)),r.flags&512&&(r.check=Ci(r.check,i,p,s)),o-=p,s+=p,r.length-=p),r.length))break e;r.length=0,r.mode=EN;case EN:if(r.flags&2048){if(o===0)break e;p=0;do F=i[s+p++],r.head&&F&&r.length<65536&&(r.head.name+=String.fromCharCode(F));while(F&&p<o);if(r.flags&512&&(r.check=Ci(r.check,i,p,s)),o-=p,s+=p,F)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=TN;case TN:if(r.flags&4096){if(o===0)break e;p=0;do F=i[s+p++],r.head&&F&&r.length<65536&&(r.head.comment+=String.fromCharCode(F));while(F&&p<o);if(r.flags&512&&(r.check=Ci(r.check,i,p,s)),o-=p,s+=p,F)break e}else r.head&&(r.head.comment=null);r.mode=CN;case CN:if(r.flags&512){for(;c<16;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if(f!==(r.check&65535)){t.msg="header crc mismatch",r.mode=ht;break}f=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=rn;break;case kN:for(;c<32;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}t.adler=r.check=jN(f),f=0,c=0,r.mode=Td;case Td:if(r.havedict===0)return t.next_out=a,t.avail_out=u,t.next_in=s,t.avail_in=o,r.hold=f,r.bits=c,DK;t.adler=r.check=1,r.mode=rn;case rn:if(e===IK||e===xd)break e;case z_:if(r.last){f>>>=c&7,c-=c&7,r.mode=V_;break}for(;c<3;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}switch(r.last=f&1,f>>>=1,c-=1,f&3){case 0:r.mode=RN;break;case 1:if(UK(r),r.mode=Sd,e===xd){f>>>=2,c-=2;break e}break;case 2:r.mode=ON;break;case 3:t.msg="invalid block type",r.mode=ht}f>>>=2,c-=2;break;case RN:for(f>>>=c&7,c-=c&7;c<32;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if((f&65535)!==(f>>>16^65535)){t.msg="invalid stored block lengths",r.mode=ht;break}if(r.length=f&65535,f=0,c=0,r.mode=X_,e===xd)break e;case X_:r.mode=AN;case AN:if(p=r.length,p){if(p>o&&(p=o),p>u&&(p=u),p===0)break e;Dr.arraySet(n,i,s,p,a),o-=p,s+=p,u-=p,a+=p,r.length-=p;break}r.mode=rn;break;case ON:for(;c<14;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if(r.nlen=(f&31)+257,f>>>=5,c-=5,r.ndist=(f&31)+1,f>>>=5,c-=5,r.ncode=(f&15)+4,f>>>=4,c-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ht;break}r.have=0,r.mode=IN;case IN:for(;r.have<r.ncode;){for(;c<3;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}r.lens[O[r.have++]]=f&7,f>>>=3,c-=3}for(;r.have<19;)r.lens[O[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Z={bits:r.lenbits},L=rf(OK,r.lens,0,19,r.lencode,0,r.work,Z),r.lenbits=Z.bits,L){t.msg="invalid code lengths set",r.mode=ht;break}r.have=0,r.mode=NN;case NN:for(;r.have<r.nlen+r.ndist;){for(;v=r.lencode[f&(1<<r.lenbits)-1],b=v>>>24,k=v>>>16&255,N=v&65535,!(b<=c);){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if(N<16)f>>>=b,c-=b,r.lens[r.have++]=N;else{if(N===16){for(H=b+2;c<H;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if(f>>>=b,c-=b,r.have===0){t.msg="invalid bit length repeat",r.mode=ht;break}F=r.lens[r.have-1],p=3+(f&3),f>>>=2,c-=2}else if(N===17){for(H=b+3;c<H;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}f>>>=b,c-=b,F=0,p=3+(f&7),f>>>=3,c-=3}else{for(H=b+7;c<H;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}f>>>=b,c-=b,F=0,p=11+(f&127),f>>>=7,c-=7}if(r.have+p>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ht;break}for(;p--;)r.lens[r.have++]=F}}if(r.mode===ht)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=ht;break}if(r.lenbits=9,Z={bits:r.lenbits},L=rf(UN,r.lens,0,r.nlen,r.lencode,0,r.work,Z),r.lenbits=Z.bits,L){t.msg="invalid literal/lengths set",r.mode=ht;break}if(r.distbits=6,r.distcode=r.distdyn,Z={bits:r.distbits},L=rf(WN,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Z),r.distbits=Z.bits,L){t.msg="invalid distances set",r.mode=ht;break}if(r.mode=Sd,e===xd)break e;case Sd:r.mode=Ed;case Ed:if(o>=6&&u>=258){t.next_out=a,t.avail_out=u,t.next_in=s,t.avail_in=o,r.hold=f,r.bits=c,AK(t,d),a=t.next_out,n=t.output,u=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,f=r.hold,c=r.bits,r.mode===rn&&(r.back=-1);break}for(r.back=0;v=r.lencode[f&(1<<r.lenbits)-1],b=v>>>24,k=v>>>16&255,N=v&65535,!(b<=c);){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if(k&&(k&240)===0){for(E=b,U=k,ee=N;v=r.lencode[ee+((f&(1<<E+U)-1)>>E)],b=v>>>24,k=v>>>16&255,N=v&65535,!(E+b<=c);){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}f>>>=E,c-=E,r.back+=E}if(f>>>=b,c-=b,r.back+=b,r.length=N,k===0){r.mode=qN;break}if(k&32){r.back=-1,r.mode=rn;break}if(k&64){t.msg="invalid literal/length code",r.mode=ht;break}r.extra=k&15,r.mode=DN;case DN:if(r.extra){for(H=r.extra;c<H;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}r.length+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=FN;case FN:for(;v=r.distcode[f&(1<<r.distbits)-1],b=v>>>24,k=v>>>16&255,N=v&65535,!(b<=c);){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if((k&240)===0){for(E=b,U=k,ee=N;v=r.distcode[ee+((f&(1<<E+U)-1)>>E)],b=v>>>24,k=v>>>16&255,N=v&65535,!(E+b<=c);){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}f>>>=E,c-=E,r.back+=E}if(f>>>=b,c-=b,r.back+=b,k&64){t.msg="invalid distance code",r.mode=ht;break}r.offset=N,r.extra=k&15,r.mode=MN;case MN:if(r.extra){for(H=r.extra;c<H;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}r.offset+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ht;break}r.mode=PN;case PN:if(u===0)break e;if(p=d-u,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ht;break}p>r.wnext?(p-=r.wnext,g=r.wsize-p):g=r.wnext-p,p>r.length&&(p=r.length),y=r.window}else y=n,g=a-r.offset,p=r.length;p>u&&(p=u),u-=p,r.length-=p;do n[a++]=y[g++];while(--p);r.length===0&&(r.mode=Ed);break;case qN:if(u===0)break e;n[a++]=r.length,u--,r.mode=Ed;break;case V_:if(r.wrap){for(;c<32;){if(o===0)break e;o--,f|=i[s++]<<c,c+=8}if(d-=u,t.total_out+=d,r.total+=d,d&&(t.adler=r.check=r.flags?Ci(r.check,n,d,a-d):Y_(r.check,n,d,a-d)),d=u,(r.flags?f:jN(f))!==r.check){t.msg="incorrect data check",r.mode=ht;break}f=0,c=0}r.mode=LN;case LN:if(r.wrap&&r.flags){for(;c<32;){if(o===0)break e;o--,f+=i[s++]<<c,c+=8}if(f!==(r.total&4294967295)){t.msg="incorrect length check",r.mode=ht;break}f=0,c=0}r.mode=BN;case BN:L=NK;break e;case ht:L=HN;break e;case Q_:return K_;case MK:default:return Xr}return t.next_out=a,t.avail_out=u,t.next_in=s,t.avail_in=o,r.hold=f,r.bits=c,(r.wsize||d!==t.avail_out&&r.mode<ht&&(r.mode<V_||e!==yN))&&YN(t,t.output,t.next_out,d-t.avail_out)?(r.mode=Q_,K_):(h-=t.avail_in,d-=t.avail_out,t.total_in+=h,t.total_out+=d,r.total+=d,r.wrap&&d&&(t.adler=r.check=r.flags?Ci(r.check,n,d,t.next_out-d):Y_(r.check,n,d,t.next_out-d)),t.data_type=r.bits+(r.last?64:0)+(r.mode===rn?128:0)+(r.mode===Sd||r.mode===X_?256:0),(h===0&&d===0||e===yN)&&L===Zs&&(L=FK),L)}function HK(t){if(!t||!t.state)return Xr;var e=t.state;return e.window&&(e.window=null),t.state=null,Zs}function zK(t,e){var r;return!t||!t.state||(r=t.state,(r.wrap&2)===0)?Xr:(r.head=e,e.done=!1,Zs)}function XK(t,e){var r=e.length,i,n,s;return!t||!t.state||(i=t.state,i.wrap!==0&&i.mode!==Td)?Xr:i.mode===Td&&(n=1,n=Y_(n,e,r,0),n!==i.check)?HN:(s=YN(t,e,r,r),s?(i.mode=Q_,K_):(i.havedict=1,Zs))}li.inflateReset=VN;li.inflateReset2=GN;li.inflateResetKeep=XN;li.inflateInit=$K;li.inflateInit2=ZN;li.inflate=WK;li.inflateEnd=HK;li.inflateGetHeader=zK;li.inflateSetDictionary=XK;li.inflateInfo="pako inflate (from Nodeca project)"});var J_=w((FRe,QN)=>{"use strict";QN.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var eD=w((MRe,JN)=>{"use strict";function VK(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}JN.exports=VK});var rD=w(sf=>{"use strict";var Co=KN(),nf=Ji(),Cd=L_(),Et=J_(),ew=dd(),GK=B_(),ZK=eD(),tD=Object.prototype.toString;function Ys(t){if(!(this instanceof Ys))return new Ys(t);this.options=nf.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new GK,this.strm.avail_out=0;var r=Co.inflateInit2(this.strm,e.windowBits);if(r!==Et.Z_OK)throw new Error(ew[r]);if(this.header=new ZK,Co.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Cd.string2buf(e.dictionary):tD.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Co.inflateSetDictionary(this.strm,e.dictionary),r!==Et.Z_OK)))throw new Error(ew[r])}Ys.prototype.push=function(t,e){var r=this.strm,i=this.options.chunkSize,n=this.options.dictionary,s,a,o,u,f,c=!1;if(this.ended)return!1;a=e===~~e?e:e===!0?Et.Z_FINISH:Et.Z_NO_FLUSH,typeof t=="string"?r.input=Cd.binstring2buf(t):tD.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new nf.Buf8(i),r.next_out=0,r.avail_out=i),s=Co.inflate(r,Et.Z_NO_FLUSH),s===Et.Z_NEED_DICT&&n&&(s=Co.inflateSetDictionary(this.strm,n)),s===Et.Z_BUF_ERROR&&c===!0&&(s=Et.Z_OK,c=!1),s!==Et.Z_STREAM_END&&s!==Et.Z_OK)return this.onEnd(s),this.ended=!0,!1;r.next_out&&(r.avail_out===0||s===Et.Z_STREAM_END||r.avail_in===0&&(a===Et.Z_FINISH||a===Et.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=Cd.utf8border(r.output,r.next_out),u=r.next_out-o,f=Cd.buf2string(r.output,o),r.next_out=u,r.avail_out=i-u,u&&nf.arraySet(r.output,r.output,o,u,0),this.onData(f)):this.onData(nf.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(c=!0)}while((r.avail_in>0||r.avail_out===0)&&s!==Et.Z_STREAM_END);return s===Et.Z_STREAM_END&&(a=Et.Z_FINISH),a===Et.Z_FINISH?(s=Co.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===Et.Z_OK):(a===Et.Z_SYNC_FLUSH&&(this.onEnd(Et.Z_OK),r.avail_out=0),!0)};Ys.prototype.onData=function(t){this.chunks.push(t)};Ys.prototype.onEnd=function(t){t===Et.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=nf.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function tw(t,e){var r=new Ys(e);if(r.push(t,!0),r.err)throw r.msg||ew[r.err];return r.result}function YK(t,e){return e=e||{},e.raw=!0,tw(t,e)}sf.Inflate=Ys;sf.inflate=tw;sf.inflateRaw=YK;sf.ungzip=tw});var sD=w((qRe,nD)=>{"use strict";var KK=Ji().assign,QK=oN(),JK=rD(),eQ=J_(),iD={};KK(iD,QK,JK,eQ);nD.exports=iD});var oD=w(Rd=>{"use strict";var tQ=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",rQ=sD(),aD=yt(),kd=Nr(),iQ=tQ?"uint8array":"array";Rd.magic="\b\0";function Ks(t,e){kd.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}aD.inherits(Ks,kd);Ks.prototype.processChunk=function(t){this.meta=t.meta,this._pako===null&&this._createPako(),this._pako.push(aD.transformTo(iQ,t.data),!1)};Ks.prototype.flush=function(){kd.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};Ks.prototype.cleanUp=function(){kd.prototype.cleanUp.call(this),this._pako=null};Ks.prototype._createPako=function(){this._pako=new rQ[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}};Rd.compressWorker=function(t){return new Ks("Deflate",t)};Rd.uncompressWorker=function(){return new Ks("Inflate",{})}});var iw=w(rw=>{"use strict";var lD=Nr();rw.STORE={magic:"\0\0",compressWorker:function(){return new lD("STORE compression")},uncompressWorker:function(){return new lD("STORE decompression")}};rw.DEFLATE=oD()});var nw=w(Qs=>{"use strict";Qs.LOCAL_FILE_HEADER="PK";Qs.CENTRAL_FILE_HEADER="PK";Qs.CENTRAL_DIRECTORY_END="PK";Qs.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";Qs.ZIP64_CENTRAL_DIRECTORY_END="PK";Qs.DATA_DESCRIPTOR="PK\x07\b"});var hD=w(($Re,cD)=>{"use strict";var ko=yt(),Ro=Nr(),sw=go(),uD=ld(),Ad=nw(),tt=function(t,e){var r="",i;for(i=0;i<e;i++)r+=String.fromCharCode(t&255),t=t>>>8;return r},nQ=function(t,e){var r=t;return t||(r=e?16893:33204),(r&65535)<<16},sQ=function(t){return(t||0)&63},fD=function(t,e,r,i,n,s){var a=t.file,o=t.compression,u=s!==sw.utf8encode,f=ko.transformTo("string",s(a.name)),c=ko.transformTo("string",sw.utf8encode(a.name)),h=a.comment,d=ko.transformTo("string",s(h)),p=ko.transformTo("string",sw.utf8encode(h)),g=c.length!==a.name.length,y=p.length!==h.length,v,b,k="",N="",E="",U=a.dir,ee=a.date,F={crc32:0,compressedSize:0,uncompressedSize:0};(!e||r)&&(F.crc32=t.crc32,F.compressedSize=t.compressedSize,F.uncompressedSize=t.uncompressedSize);var L=0;e&&(L|=8),!u&&(g||y)&&(L|=2048);var I=0,Z=0;U&&(I|=16),n==="UNIX"?(Z=798,I|=nQ(a.unixPermissions,U)):(Z=20,I|=sQ(a.dosPermissions,U)),v=ee.getUTCHours(),v=v<<6,v=v|ee.getUTCMinutes(),v=v<<5,v=v|ee.getUTCSeconds()/2,b=ee.getUTCFullYear()-1980,b=b<<4,b=b|ee.getUTCMonth()+1,b=b<<5,b=b|ee.getUTCDate(),g&&(N=tt(1,1)+tt(uD(f),4)+c,k+="up"+tt(N.length,2)+N),y&&(E=tt(1,1)+tt(uD(d),4)+p,k+="uc"+tt(E.length,2)+E);var H="";H+=`
9
+ \0`,H+=tt(L,2),H+=o.magic,H+=tt(v,2),H+=tt(b,2),H+=tt(F.crc32,4),H+=tt(F.compressedSize,4),H+=tt(F.uncompressedSize,4),H+=tt(f.length,2),H+=tt(k.length,2);var O=Ad.LOCAL_FILE_HEADER+H+f+k,q=Ad.CENTRAL_FILE_HEADER+tt(Z,2)+H+tt(d.length,2)+"\0\0\0\0"+tt(I,4)+tt(i,4)+f+k+d;return{fileRecord:O,dirRecord:q}},aQ=function(t,e,r,i,n){var s="",a=ko.transformTo("string",n(i));return s=Ad.CENTRAL_DIRECTORY_END+"\0\0\0\0"+tt(t,2)+tt(t,2)+tt(e,4)+tt(r,4)+tt(a.length,2)+a,s},oQ=function(t){var e="";return e=Ad.DATA_DESCRIPTOR+tt(t.crc32,4)+tt(t.compressedSize,4)+tt(t.uncompressedSize,4),e};function ui(t,e,r,i){Ro.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}ko.inherits(ui,Ro);ui.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,Ro.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-i-1))/r:100}}))};ui.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=fD(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0};ui.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=fD(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:oQ(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};ui.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r=this.bytesWritten-t,i=aQ(this.dirRecords.length,r,t,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})};ui.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()};ui.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",function(r){e.processChunk(r)}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()}),t.on("error",function(r){e.error(r)}),this};ui.prototype.resume=function(){if(!Ro.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};ui.prototype.error=function(t){var e=this._sources;if(!Ro.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch{}return!0};ui.prototype.lock=function(){Ro.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()};cD.exports=ui});var pD=w(dD=>{"use strict";var lQ=iw(),uQ=hD(),fQ=function(t,e){var r=t||e,i=lQ[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};dD.generateWorker=function(t,e,r){var i=new uQ(e.streamFiles,r,e.platform,e.encodeFileName),n=0;try{t.forEach(function(s,a){n++;var o=fQ(a.options.compression,e.compression),u=a.options.compressionOptions||e.compressionOptions||{},f=a.dir,c=a.date;a._compressWorker(o,u).withStreamInfo("file",{name:s,dir:f,date:c,comment:a.comment||"",unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions}).pipe(i)}),i.entriesCount=n}catch(s){i.error(s)}return i}});var mD=w((WRe,gD)=>{"use strict";var cQ=yt(),Od=Nr();function af(t,e){Od.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}cQ.inherits(af,Od);af.prototype._bindStream=function(t){var e=this;this._stream=t,t.pause(),t.on("data",function(r){e.push({data:r,meta:{percent:0}})}).on("error",function(r){e.isPaused?this.generatedError=r:e.error(r)}).on("end",function(){e.isPaused?e._upstreamEnded=!0:e.end()})};af.prototype.pause=function(){return Od.prototype.pause.call(this)?(this._stream.pause(),!0):!1};af.prototype.resume=function(){return Od.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};gD.exports=af});var CD=w((HRe,TD)=>{"use strict";var hQ=go(),of=yt(),wD=Nr(),dQ=f_(),bD=c_(),yD=ud(),pQ=vI(),gQ=pD(),vD=Mu(),mQ=mD(),xD=function(t,e,r){var i=of.getTypeOf(e),n,s=of.extend(r||{},bD);s.date=s.date||new Date,s.compression!==null&&(s.compression=s.compression.toUpperCase()),typeof s.unixPermissions=="string"&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&s.unixPermissions&16384&&(s.dir=!0),s.dosPermissions&&s.dosPermissions&16&&(s.dir=!0),s.dir&&(t=SD(t)),s.createFolders&&(n=yQ(t))&&ED.call(this,n,!0);var a=i==="string"&&s.binary===!1&&s.base64===!1;(!r||typeof r.binary>"u")&&(s.binary=!a);var o=e instanceof yD&&e.uncompressedSize===0;(o||s.dir||!e||e.length===0)&&(s.base64=!1,s.binary=!0,e="",s.compression="STORE",i="string");var u=null;e instanceof yD||e instanceof wD?u=e:vD.isNode&&vD.isStream(e)?u=new mQ(t,e):u=of.prepareContent(t,e,s.binary,s.optimizedBinaryString,s.base64);var f=new pQ(t,u,s);this.files[t]=f},yQ=function(t){t.slice(-1)==="/"&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return e>0?t.substring(0,e):""},SD=function(t){return t.slice(-1)!=="/"&&(t+="/"),t},ED=function(t,e){return e=typeof e<"u"?e:bD.createFolders,t=SD(t),this.files[t]||xD.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function _D(t){return Object.prototype.toString.call(t)==="[object RegExp]"}var vQ={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,i;for(e in this.files)i=this.files[e],r=e.slice(this.root.length,e.length),r&&e.slice(0,this.root.length)===this.root&&t(r,i)},filter:function(t){var e=[];return this.forEach(function(r,i){t(r,i)&&e.push(i)}),e},file:function(t,e,r){if(arguments.length===1)if(_D(t)){var i=t;return this.filter(function(s,a){return!a.dir&&i.test(s)})}else{var n=this.files[this.root+t];return n&&!n.dir?n:null}else t=this.root+t,xD.call(this,t,e,r);return this},folder:function(t){if(!t)return this;if(_D(t))return this.filter(function(n,s){return s.dir&&t.test(n)});var e=this.root+t,r=ED.call(this,e),i=this.clone();return i.root=r.name,i},remove:function(t){t=this.root+t;var e=this.files[t];if(e||(t.slice(-1)!=="/"&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter(function(n,s){return s.name.slice(0,t.length)===t}),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if(r=of.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:hQ.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),r.type==="binarystring"&&(r.type="string"),!r.type)throw new Error("No output type specified.");of.checkSupport(r.type),(r.platform==="darwin"||r.platform==="freebsd"||r.platform==="linux"||r.platform==="sunos")&&(r.platform="UNIX"),r.platform==="win32"&&(r.platform="DOS");var i=r.comment||this.comment||"";e=gQ.generateWorker(this,r,i)}catch(n){e=new wD("error"),e.error(n)}return new dQ(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return t=t||{},t.type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};TD.exports=vQ});var aw=w((zRe,RD)=>{"use strict";var _Q=yt();function kD(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}kD.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(){},readInt:function(t){var e=0,r;for(this.checkOffset(t),r=this.index+t-1;r>=this.index;r--)e=(e<<8)+this.byteAt(r);return this.index+=t,e},readString:function(t){return _Q.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(t&31)<<1))}};RD.exports=kD});var ow=w((XRe,OD)=>{"use strict";var AD=aw(),wQ=yt();function Ao(t){AD.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=t[e]&255}wQ.inherits(Ao,AD);Ao.prototype.byteAt=function(t){return this.data[this.zero+t]};Ao.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.length-4;s>=0;--s)if(this.data[s]===e&&this.data[s+1]===r&&this.data[s+2]===i&&this.data[s+3]===n)return s-this.zero;return-1};Ao.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.readData(4);return e===s[0]&&r===s[1]&&i===s[2]&&n===s[3]};Ao.prototype.readData=function(t){if(this.checkOffset(t),t===0)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e};OD.exports=Ao});var DD=w((VRe,ND)=>{"use strict";var ID=aw(),bQ=yt();function Oo(t){ID.call(this,t)}bQ.inherits(Oo,ID);Oo.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)};Oo.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero};Oo.prototype.readAndCheckSignature=function(t){var e=this.readData(4);return t===e};Oo.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e};ND.exports=Oo});var uw=w((GRe,MD)=>{"use strict";var FD=ow(),xQ=yt();function lw(t){FD.call(this,t)}xQ.inherits(lw,FD);lw.prototype.readData=function(t){if(this.checkOffset(t),t===0)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e};MD.exports=lw});var LD=w((ZRe,qD)=>{"use strict";var PD=uw(),SQ=yt();function fw(t){PD.call(this,t)}SQ.inherits(fw,PD);fw.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e};qD.exports=fw});var cw=w((YRe,jD)=>{"use strict";var Id=yt(),BD=Ki(),EQ=ow(),TQ=DD(),CQ=LD(),kQ=uw();jD.exports=function(t){var e=Id.getTypeOf(t);return Id.checkSupport(e),e==="string"&&!BD.uint8array?new TQ(t):e==="nodebuffer"?new CQ(t):BD.uint8array?new kQ(Id.transformTo("uint8array",t)):new EQ(Id.transformTo("array",t))}});var HD=w((KRe,WD)=>{"use strict";var hw=cw(),Hn=yt(),RQ=ud(),$D=ld(),Nd=go(),Dd=iw(),AQ=Ki(),OQ=0,IQ=3,NQ=function(t){for(var e in Dd)if(Object.prototype.hasOwnProperty.call(Dd,e)&&Dd[e].magic===t)return Dd[e];return null};function UD(t,e){this.options=t,this.loadOptions=e}UD.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(e=NQ(this.compressionMethod),e===null)throw new Error("Corrupted zip : compression "+Hn.pretty(this.compressionMethod)+" unknown (inner file : "+Hn.transformTo("string",this.fileName)+")");this.decompressed=new RQ(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),t===OQ&&(this.dosPermissions=this.externalFileAttributes&63),t===IQ&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=hw(this.extraFields[1].value);this.uncompressedSize===Hn.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===Hn.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===Hn.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===Hn.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var e=t.index+this.extraFieldsLength,r,i,n;for(this.extraFields||(this.extraFields={});t.index+4<e;)r=t.readInt(2),i=t.readInt(2),n=t.readData(i),this.extraFields[r]={id:r,length:i,value:n};t.setIndex(e)},handleUTF8:function(){var t=AQ.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=Nd.utf8decode(this.fileName),this.fileCommentStr=Nd.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(e!==null)this.fileNameStr=e;else{var r=Hn.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var i=this.findExtraFieldUnicodeComment();if(i!==null)this.fileCommentStr=i;else{var n=Hn.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=hw(t.value);return e.readInt(1)!==1||$D(this.fileName)!==e.readInt(4)?null:Nd.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=hw(t.value);return e.readInt(1)!==1||$D(this.fileComment)!==e.readInt(4)?null:Nd.utf8decode(e.readData(t.length-5))}return null}};WD.exports=UD});var VD=w((QRe,XD)=>{"use strict";var DQ=cw(),nn=yt(),fi=nw(),FQ=HD(),MQ=Ki();function zD(t){this.files=[],this.loadOptions=t}zD.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+nn.pretty(e)+", expected "+nn.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4),n=i===e;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=MQ.uint8array?"uint8array":"array",r=nn.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t=this.zip64EndOfCentralSize-44,e=0,r,i,n;e<t;)r=this.reader.readInt(2),i=this.reader.readInt(4),n=this.reader.readData(i),this.zip64ExtensibleData[r]={id:r,length:i,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(fi.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(fi.CENTRAL_FILE_HEADER);)t=new FQ({zip64:this.zip64},this.loadOptions),t.readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(fi.CENTRAL_DIRECTORY_END);if(t<0){var e=!this.isSignature(0,fi.LOCAL_FILE_HEADER);throw e?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(t);var r=t;if(this.checkSignature(fi.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===nn.MAX_VALUE_16BITS||this.diskWithCentralDirStart===nn.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===nn.MAX_VALUE_16BITS||this.centralDirRecords===nn.MAX_VALUE_16BITS||this.centralDirSize===nn.MAX_VALUE_32BITS||this.centralDirOffset===nn.MAX_VALUE_32BITS){if(this.zip64=!0,t=this.reader.lastIndexOfSignature(fi.ZIP64_CENTRAL_DIRECTORY_LOCATOR),t<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(fi.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,fi.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(fi.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(fi.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=r-i;if(n>0)this.isSignature(r,fi.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=DQ(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};XD.exports=zD});var YD=w((JRe,ZD)=>{"use strict";var dw=yt(),Fd=co(),PQ=go(),qQ=VD(),LQ=p_(),GD=Mu();function BQ(t){return new Fd.Promise(function(e,r){var i=t.decompressed.getContentWorker().pipe(new LQ);i.on("error",function(n){r(n)}).on("end",function(){i.streamInfo.crc32!==t.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()})}ZD.exports=function(t,e){var r=this;return e=dw.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:PQ.utf8decode}),GD.isNode&&GD.isStream(t)?Fd.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):dw.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then(function(i){var n=new qQ(e);return n.load(i),n}).then(function(n){var s=[Fd.Promise.resolve(n)],a=n.files;if(e.checkCRC32)for(var o=0;o<a.length;o++)s.push(BQ(a[o]));return Fd.Promise.all(s)}).then(function(n){for(var s=n.shift(),a=s.files,o=0;o<a.length;o++){var u=a[o],f=u.fileNameStr,c=dw.resolve(u.fileNameStr);r.file(c,u.decompressed,{binary:!0,optimizedBinaryString:!0,date:u.date,dir:u.dir,comment:u.fileCommentStr.length?u.fileCommentStr:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:e.createFolders}),u.dir||(r.file(c).unsafeOriginalName=f)}return s.zipComment.length&&(r.comment=s.zipComment),r})}});var pw=w((eAe,KD)=>{"use strict";function Vr(){if(!(this instanceof Vr))return new Vr;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new Vr;for(var e in this)typeof this[e]!="function"&&(t[e]=this[e]);return t}}Vr.prototype=CD();Vr.prototype.loadAsync=YD();Vr.support=Ki();Vr.defaults=c_();Vr.version="3.10.1";Vr.loadAsync=function(t,e){return new Vr().loadAsync(t,e)};Vr.external=co();KD.exports=Vr});var gw=w((tAe,QD)=>{QD.exports=Y("stream")});var nF=w((rAe,iF)=>{"use strict";function JD(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function eF(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?JD(Object(r),!0).forEach(function(i){jQ(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JD(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function jQ(t,e,r){return e=rF(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $Q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tF(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,rF(i.key),i)}}function UQ(t,e,r){return e&&tF(t.prototype,e),r&&tF(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function rF(t){var e=WQ(t,"string");return typeof e=="symbol"?e:String(e)}function WQ(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var HQ=Y("buffer"),Md=HQ.Buffer,zQ=Y("util"),mw=zQ.inspect,XQ=mw&&mw.custom||"inspect";function VQ(t,e,r){Md.prototype.copy.call(t,e,r)}iF.exports=(function(){function t(){$Q(this,t),this.head=null,this.tail=null,this.length=0}return UQ(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Md.alloc(0);for(var i=Md.allocUnsafe(r>>>0),n=this.head,s=0;n;)VQ(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Md.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:XQ,value:function(r,i){return mw(this,eF(eF({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var vw=w((iAe,aF)=>{"use strict";function GQ(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(yw,this,t)):process.nextTick(yw,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Pd,r):(r._writableState.errorEmitted=!0,process.nextTick(sF,r,s)):process.nextTick(sF,r,s):e?(process.nextTick(Pd,r),e(s)):process.nextTick(Pd,r)}),this)}function sF(t,e){yw(t,e),Pd(t)}function Pd(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function ZQ(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function yw(t,e){t.emit("error",e)}function YQ(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}aF.exports={destroy:GQ,undestroy:ZQ,errorOrDestroy:YQ}});var zn=w((nAe,uF)=>{"use strict";var lF={};function Gr(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,u){super(i(a,o,u))}}n.prototype.name=r.name,n.prototype.code=t,lF[t]=n}function oF(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function KQ(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function QQ(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function JQ(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Gr("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Gr("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&KQ(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(QQ(t," argument"))n=`The ${t} ${i} ${oF(e,"type")}`;else{let s=JQ(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${oF(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Gr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Gr("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Gr("ERR_STREAM_PREMATURE_CLOSE","Premature close");Gr("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Gr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Gr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Gr("ERR_STREAM_WRITE_AFTER_END","write after end");Gr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Gr("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Gr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");uF.exports.codes=lF});var _w=w((sAe,fF)=>{"use strict";var eJ=zn().codes.ERR_INVALID_OPT_VALUE;function tJ(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function rJ(t,e,r,i){var n=tJ(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new eJ(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}fF.exports={getHighWaterMark:rJ}});var xw=w((aAe,mF)=>{"use strict";mF.exports=bt;function hF(t){var e=this;this.next=null,this.entry=null,this.finish=function(){AJ(e,t)}}var Io;bt.WritableState=uf;var iJ={deprecate:Ls()},dF=gw(),Ld=Y("buffer").Buffer,nJ=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function sJ(t){return Ld.from(t)}function aJ(t){return Ld.isBuffer(t)||t instanceof nJ}var bw=vw(),oJ=_w(),lJ=oJ.getHighWaterMark,Xn=zn().codes,uJ=Xn.ERR_INVALID_ARG_TYPE,fJ=Xn.ERR_METHOD_NOT_IMPLEMENTED,cJ=Xn.ERR_MULTIPLE_CALLBACK,hJ=Xn.ERR_STREAM_CANNOT_PIPE,dJ=Xn.ERR_STREAM_DESTROYED,pJ=Xn.ERR_STREAM_NULL_VALUES,gJ=Xn.ERR_STREAM_WRITE_AFTER_END,mJ=Xn.ERR_UNKNOWN_ENCODING,No=bw.errorOrDestroy;be()(bt,dF);function yJ(){}function uf(t,e,r){Io=Io||Js(),t=t||{},typeof r!="boolean"&&(r=e instanceof Io),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=lJ(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){EJ(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new hF(this)}uf.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(uf.prototype,"buffer",{get:iJ.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var qd;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(qd=Function.prototype[Symbol.hasInstance],Object.defineProperty(bt,Symbol.hasInstance,{value:function(e){return qd.call(this,e)?!0:this!==bt?!1:e&&e._writableState instanceof uf}})):qd=function(e){return e instanceof this};function bt(t){Io=Io||Js();var e=this instanceof Io;if(!e&&!qd.call(bt,this))return new bt(t);this._writableState=new uf(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),dF.call(this)}bt.prototype.pipe=function(){No(this,new hJ)};function vJ(t,e){var r=new gJ;No(t,r),process.nextTick(e,r)}function _J(t,e,r,i){var n;return r===null?n=new pJ:typeof r!="string"&&!e.objectMode&&(n=new uJ("chunk",["string","Buffer"],r)),n?(No(t,n),process.nextTick(i,n),!1):!0}bt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&aJ(t);return s&&!Ld.isBuffer(t)&&(t=sJ(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=yJ),i.ending?vJ(this,r):(s||_J(this,i,t,r))&&(i.pendingcb++,n=bJ(this,i,s,t,e,r)),n};bt.prototype.cork=function(){this._writableState.corked++};bt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&pF(this,t))};bt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new mJ(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(bt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function wJ(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Ld.from(e,r)),e}Object.defineProperty(bt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function bJ(t,e,r,i,n,s){if(!r){var a=wJ(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else ww(t,e,!1,o,i,n,s);return u}function ww(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new dJ("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function xJ(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(lf,t,e),t._writableState.errorEmitted=!0,No(t,i)):(n(i),t._writableState.errorEmitted=!0,No(t,i),lf(t,e))}function SJ(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function EJ(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new cJ;if(SJ(r),e)xJ(t,r,i,e,n);else{var s=gF(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&pF(t,r),i?process.nextTick(cF,t,r,s,n):cF(t,r,s,n)}}function cF(t,e,r,i){r||TJ(t,e),e.pendingcb--,i(),lf(t,e)}function TJ(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function pF(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,ww(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new hF(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,c=r.callback,h=e.objectMode?1:u.length;if(ww(t,e,!1,h,u,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}bt.prototype._write=function(t,e,r){r(new fJ("_write()"))};bt.prototype._writev=null;bt.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||RJ(this,i,r),this};Object.defineProperty(bt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function gF(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function CJ(t,e){t._final(function(r){e.pendingcb--,r&&No(t,r),e.prefinished=!0,t.emit("prefinish"),lf(t,e)})}function kJ(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(CJ,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function lf(t,e){var r=gF(e);if(r&&(kJ(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function RJ(t,e,r){e.ending=!0,lf(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function AJ(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(bt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});bt.prototype.destroy=bw.destroy;bt.prototype._undestroy=bw.undestroy;bt.prototype._destroy=function(t,e){e(t)}});var Js=w((oAe,vF)=>{"use strict";var OJ=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};vF.exports=ki;var yF=Tw(),Ew=xw();be()(ki,yF);for(Sw=OJ(Ew.prototype),Bd=0;Bd<Sw.length;Bd++)jd=Sw[Bd],ki.prototype[jd]||(ki.prototype[jd]=Ew.prototype[jd]);var Sw,jd,Bd;function ki(t){if(!(this instanceof ki))return new ki(t);yF.call(this,t),Ew.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",IJ)))}Object.defineProperty(ki.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(ki.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(ki.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function IJ(){this._writableState.ended||process.nextTick(NJ,this)}function NJ(t){t.end()}Object.defineProperty(ki.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var bF=w((Cw,wF)=>{var $d=Y("buffer"),Ri=$d.Buffer;function _F(t,e){for(var r in t)e[r]=t[r]}Ri.from&&Ri.alloc&&Ri.allocUnsafe&&Ri.allocUnsafeSlow?wF.exports=$d:(_F($d,Cw),Cw.Buffer=ea);function ea(t,e,r){return Ri(t,e,r)}ea.prototype=Object.create(Ri.prototype);_F(Ri,ea);ea.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ri(t,e,r)};ea.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ri(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};ea.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ri(t)};ea.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return $d.SlowBuffer(t)}});var Aw=w(SF=>{"use strict";var Rw=bF().Buffer,xF=Rw.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function DJ(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function FJ(t){var e=DJ(t);if(typeof e!="string"&&(Rw.isEncoding===xF||!xF(t)))throw new Error("Unknown encoding: "+t);return e||t}SF.StringDecoder=ff;function ff(t){this.encoding=FJ(t);var e;switch(this.encoding){case"utf16le":this.text=jJ,this.end=$J,e=4;break;case"utf8":this.fillLast=qJ,e=4;break;case"base64":this.text=UJ,this.end=WJ,e=3;break;default:this.write=HJ,this.end=zJ;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Rw.allocUnsafe(e)}ff.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};ff.prototype.end=BJ;ff.prototype.text=LJ;ff.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function kw(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function MJ(t,e,r){var i=e.length-1;if(i<r)return 0;var n=kw(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=kw(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=kw(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function PJ(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function qJ(t){var e=this.lastTotal-this.lastNeed,r=PJ(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function LJ(t,e){var r=MJ(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function BJ(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function jJ(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function $J(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function UJ(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function WJ(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function HJ(t){return t.toString(this.encoding)}function zJ(t){return t&&t.length?this.write(t):""}});var Ud=w((uAe,CF)=>{"use strict";var EF=zn().codes.ERR_STREAM_PREMATURE_CLOSE;function XJ(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function VJ(){}function GJ(t){return t.setHeader&&typeof t.abort=="function"}function TF(t,e,r){if(typeof e=="function")return TF(t,null,e);e||(e={}),r=XJ(r||VJ);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},u=t._readableState&&t._readableState.endEmitted,f=function(){i=!1,u=!0,n||r.call(t)},c=function(g){r.call(t,g)},h=function(){var g;if(i&&!u)return(!t._readableState||!t._readableState.ended)&&(g=new EF),r.call(t,g);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(g=new EF),r.call(t,g)},d=function(){t.req.on("finish",o)};return GJ(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",f),t.on("finish",o),e.error!==!1&&t.on("error",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",f),t.removeListener("error",c),t.removeListener("close",h)}}CF.exports=TF});var RF=w((fAe,kF)=>{"use strict";var Wd;function Vn(t,e,r){return e=ZJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZJ(t){var e=YJ(t,"string");return typeof e=="symbol"?e:String(e)}function YJ(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var KJ=Ud(),Gn=Symbol("lastResolve"),ta=Symbol("lastReject"),cf=Symbol("error"),Hd=Symbol("ended"),ra=Symbol("lastPromise"),Ow=Symbol("handlePromise"),ia=Symbol("stream");function Zn(t,e){return{value:t,done:e}}function QJ(t){var e=t[Gn];if(e!==null){var r=t[ia].read();r!==null&&(t[ra]=null,t[Gn]=null,t[ta]=null,e(Zn(r,!1)))}}function JJ(t){process.nextTick(QJ,t)}function eee(t,e){return function(r,i){t.then(function(){if(e[Hd]){r(Zn(void 0,!0));return}e[Ow](r,i)},i)}}var tee=Object.getPrototypeOf(function(){}),ree=Object.setPrototypeOf((Wd={get stream(){return this[ia]},next:function(){var e=this,r=this[cf];if(r!==null)return Promise.reject(r);if(this[Hd])return Promise.resolve(Zn(void 0,!0));if(this[ia].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[cf]?o(e[cf]):a(Zn(void 0,!0))})});var i=this[ra],n;if(i)n=new Promise(eee(i,this));else{var s=this[ia].read();if(s!==null)return Promise.resolve(Zn(s,!1));n=new Promise(this[Ow])}return this[ra]=n,n}},Vn(Wd,Symbol.asyncIterator,function(){return this}),Vn(Wd,"return",function(){var e=this;return new Promise(function(r,i){e[ia].destroy(null,function(n){if(n){i(n);return}r(Zn(void 0,!0))})})}),Wd),tee),iee=function(e){var r,i=Object.create(ree,(r={},Vn(r,ia,{value:e,writable:!0}),Vn(r,Gn,{value:null,writable:!0}),Vn(r,ta,{value:null,writable:!0}),Vn(r,cf,{value:null,writable:!0}),Vn(r,Hd,{value:e._readableState.endEmitted,writable:!0}),Vn(r,Ow,{value:function(s,a){var o=i[ia].read();o?(i[ra]=null,i[Gn]=null,i[ta]=null,s(Zn(o,!1))):(i[Gn]=s,i[ta]=a)},writable:!0}),r));return i[ra]=null,KJ(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[ta];s!==null&&(i[ra]=null,i[Gn]=null,i[ta]=null,s(n)),i[cf]=n;return}var a=i[Gn];a!==null&&(i[ra]=null,i[Gn]=null,i[ta]=null,a(Zn(void 0,!0))),i[Hd]=!0}),e.on("readable",JJ.bind(null,i)),i};kF.exports=iee});var NF=w((cAe,IF)=>{"use strict";function AF(t,e,r,i,n,s,a){try{var o=t[s](a),u=o.value}catch(f){r(f);return}o.done?e(u):Promise.resolve(u).then(i,n)}function nee(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(u){AF(s,i,n,a,o,"next",u)}function o(u){AF(s,i,n,a,o,"throw",u)}a(void 0)})}}function OF(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function see(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?OF(Object(r),!0).forEach(function(i){aee(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):OF(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function aee(t,e,r){return e=oee(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oee(t){var e=lee(t,"string");return typeof e=="symbol"?e:String(e)}function lee(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var uee=zn().codes.ERR_INVALID_ARG_TYPE;function fee(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new uee("iterable",["Iterable"],e);var n=new t(see({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=nee(function*(){try{var u=yield i.next(),f=u.value,c=u.done;c?n.push(null):n.push(yield f)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}IF.exports=fee});var Tw=w((dAe,UF)=>{"use strict";UF.exports=Ne;var Do;Ne.ReadableState=PF;var hAe=Y("events").EventEmitter,MF=function(e,r){return e.listeners(r).length},df=gw(),zd=Y("buffer").Buffer,cee=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function hee(t){return zd.from(t)}function dee(t){return zd.isBuffer(t)||t instanceof cee}var Iw=Y("util"),Ee;Iw&&Iw.debuglog?Ee=Iw.debuglog("stream"):Ee=function(){};var pee=nF(),Lw=vw(),gee=_w(),mee=gee.getHighWaterMark,Xd=zn().codes,yee=Xd.ERR_INVALID_ARG_TYPE,vee=Xd.ERR_STREAM_PUSH_AFTER_EOF,_ee=Xd.ERR_METHOD_NOT_IMPLEMENTED,wee=Xd.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Fo,Nw,Dw;be()(Ne,df);var hf=Lw.errorOrDestroy,Fw=["error","close","destroy","pause","resume"];function bee(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function PF(t,e,r){Do=Do||Js(),t=t||{},typeof r!="boolean"&&(r=e instanceof Do),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=mee(this,t,"readableHighWaterMark",r),this.buffer=new pee,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Fo||(Fo=Aw().StringDecoder),this.decoder=new Fo(t.encoding),this.encoding=t.encoding)}function Ne(t){if(Do=Do||Js(),!(this instanceof Ne))return new Ne(t);var e=this instanceof Do;this._readableState=new PF(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),df.call(this)}Object.defineProperty(Ne.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Ne.prototype.destroy=Lw.destroy;Ne.prototype._undestroy=Lw.undestroy;Ne.prototype._destroy=function(t,e){e(t)};Ne.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=zd.from(t,e),e=""),i=!0),qF(this,t,e,!1,i)};Ne.prototype.unshift=function(t){return qF(this,t,null,!0,!1)};function qF(t,e,r,i,n){Ee("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Eee(t,s);else{var a;if(n||(a=xee(s,e)),a)hf(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==zd.prototype&&(e=hee(e)),i)s.endEmitted?hf(t,new wee):Mw(t,s,e,!0);else if(s.ended)hf(t,new vee);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Mw(t,s,e,!1):qw(t,s)):Mw(t,s,e,!1)}else i||(s.reading=!1,qw(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Mw(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Vd(t)),qw(t,e)}function xee(t,e){var r;return!dee(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new yee("chunk",["string","Buffer","Uint8Array"],e)),r}Ne.prototype.isPaused=function(){return this._readableState.flowing===!1};Ne.prototype.setEncoding=function(t){Fo||(Fo=Aw().StringDecoder);var e=new Fo(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var DF=1073741824;function See(t){return t>=DF?t=DF:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function FF(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=See(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Ne.prototype.read=function(t){Ee("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Ee("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Pw(this):Vd(this),null;if(t=FF(t,e),t===0&&e.ended)return e.length===0&&Pw(this),null;var i=e.needReadable;Ee("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ee("length less than watermark",i)),e.ended||e.reading?(i=!1,Ee("reading or ended",i)):i&&(Ee("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=FF(r,e)));var n;return t>0?n=jF(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Pw(this)),n!==null&&this.emit("data",n),n};function Eee(t,e){if(Ee("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Vd(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,LF(t)))}}function Vd(t){var e=t._readableState;Ee("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Ee("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(LF,t))}function LF(t){var e=t._readableState;Ee("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Bw(t)}function qw(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Tee,t,e))}function Tee(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Ee("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Ne.prototype._read=function(t){hf(this,new _ee("_read()"))};Ne.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ee("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:y;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(v,b){Ee("onunpipe"),v===r&&b&&b.hasUnpiped===!1&&(b.hasUnpiped=!0,c())}function o(){Ee("onend"),t.end()}var u=Cee(r);t.on("drain",u);var f=!1;function c(){Ee("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",u),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",y),r.removeListener("data",h),f=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",h);function h(v){Ee("ondata");var b=t.write(v);Ee("dest.write",b),b===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&$F(i.pipes,t)!==-1)&&!f&&(Ee("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(v){Ee("onerror",v),y(),t.removeListener("error",d),MF(t,"error")===0&&hf(t,v)}bee(t,"error",d);function p(){t.removeListener("finish",g),y()}t.once("close",p);function g(){Ee("onfinish"),t.removeListener("close",p),y()}t.once("finish",g);function y(){Ee("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ee("pipe resume"),r.resume()),t};function Cee(t){return function(){var r=t._readableState;Ee("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&MF(t,"data")&&(r.flowing=!0,Bw(t))}}Ne.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=$F(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Ne.prototype.on=function(t,e){var r=df.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Ee("on readable",i.length,i.reading),i.length?Vd(this):i.reading||process.nextTick(kee,this)),r};Ne.prototype.addListener=Ne.prototype.on;Ne.prototype.removeListener=function(t,e){var r=df.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(BF,this),r};Ne.prototype.removeAllListeners=function(t){var e=df.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(BF,this),e};function BF(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function kee(t){Ee("readable nexttick read 0"),t.read(0)}Ne.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ee("resume"),t.flowing=!t.readableListening,Ree(this,t)),t.paused=!1,this};function Ree(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Aee,t,e))}function Aee(t,e){Ee("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Bw(t),e.flowing&&!e.reading&&t.read(0)}Ne.prototype.pause=function(){return Ee("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ee("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Bw(t){var e=t._readableState;for(Ee("flow",e.flowing);e.flowing&&t.read()!==null;);}Ne.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ee("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(Ee("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(o){return function(){return t[o].apply(t,arguments)}})(n));for(var s=0;s<Fw.length;s++)t.on(Fw[s],this.emit.bind(this,Fw[s]));return this._read=function(a){Ee("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(Ne.prototype[Symbol.asyncIterator]=function(){return Nw===void 0&&(Nw=RF()),Nw(this)});Object.defineProperty(Ne.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ne.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ne.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Ne._fromList=jF;Object.defineProperty(Ne.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function jF(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Pw(t){var e=t._readableState;Ee("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Oee,e,t))}function Oee(t,e){if(Ee("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Ne.from=function(t,e){return Dw===void 0&&(Dw=NF()),Dw(Ne,t,e)});function $F(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var jw=w((pAe,HF)=>{"use strict";HF.exports=sn;var Gd=zn().codes,Iee=Gd.ERR_METHOD_NOT_IMPLEMENTED,Nee=Gd.ERR_MULTIPLE_CALLBACK,Dee=Gd.ERR_TRANSFORM_ALREADY_TRANSFORMING,Fee=Gd.ERR_TRANSFORM_WITH_LENGTH_0,Zd=Js();be()(sn,Zd);function Mee(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Nee);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function sn(t){if(!(this instanceof sn))return new sn(t);Zd.call(this,t),this._transformState={afterTransform:Mee.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Pee)}function Pee(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){WF(t,e,r)}):WF(this,null,null)}sn.prototype.push=function(t,e){return this._transformState.needTransform=!1,Zd.prototype.push.call(this,t,e)};sn.prototype._transform=function(t,e,r){r(new Iee("_transform()"))};sn.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};sn.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};sn.prototype._destroy=function(t,e){Zd.prototype._destroy.call(this,t,function(r){e(r)})};function WF(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Fee;if(t._transformState.transforming)throw new Dee;return t.push(null)}});var VF=w((gAe,XF)=>{"use strict";XF.exports=pf;var zF=jw();be()(pf,zF);function pf(t){if(!(this instanceof pf))return new pf(t);zF.call(this,t)}pf.prototype._transform=function(t,e,r){r(null,t)}});var QF=w((mAe,KF)=>{"use strict";var $w;function qee(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var YF=zn().codes,Lee=YF.ERR_MISSING_ARGS,Bee=YF.ERR_STREAM_DESTROYED;function GF(t){if(t)throw t}function jee(t){return t.setHeader&&typeof t.abort=="function"}function $ee(t,e,r,i){i=qee(i);var n=!1;t.on("close",function(){n=!0}),$w===void 0&&($w=Ud()),$w(t,{readable:e,writable:r},function(a){if(a)return i(a);n=!0,i()});var s=!1;return function(a){if(!n&&!s){if(s=!0,jee(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new Bee("pipe"))}}}function ZF(t){t()}function Uee(t,e){return t.pipe(e)}function Wee(t){return!t.length||typeof t[t.length-1]!="function"?GF:t.pop()}function Hee(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=Wee(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Lee("streams");var n,s=e.map(function(a,o){var u=o<e.length-1,f=o>0;return $ee(a,u,f,function(c){n||(n=c),c&&s.forEach(ZF),!u&&(s.forEach(ZF),i(n))})});return e.reduce(Uee)}KF.exports=Hee});var nr=w((Zr,mf)=>{var gf=Y("stream");process.env.READABLE_STREAM==="disable"&&gf?(mf.exports=gf.Readable,Object.assign(mf.exports,gf),mf.exports.Stream=gf):(Zr=mf.exports=Tw(),Zr.Stream=gf||Zr,Zr.Readable=Zr,Zr.Writable=xw(),Zr.Duplex=Js(),Zr.Transform=jw(),Zr.PassThrough=VF(),Zr.finished=Ud(),Zr.pipeline=QF())});var sr=w((yAe,tM)=>{var JF=Y("fs"),zee=function(t,e,r,i){t.super_=e,i||(i=r,r=null),r&&Object.keys(r).forEach(s=>{Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))});let n={constructor:{value:t,enumerable:!1,writable:!1,configurable:!0}};i&&Object.keys(i).forEach(s=>{n[s]=Object.getOwnPropertyDescriptor(i,s)}),t.prototype=Object.create(e.prototype,n)},Xee=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,eM={nop(){},promiseImmediate(t){return new Promise(e=>{global.setImmediate?setImmediate(()=>{e(t)}):setTimeout(()=>{e(t)},1)})},inherits:zee,dateToExcel(t,e){return 25569+t.getTime()/(24*3600*1e3)-(e?1462:0)},excelToDate(t,e){let r=Math.round((t-25569+(e?1462:0))*24*3600*1e3);return new Date(r)},parsePath(t){let e=t.lastIndexOf("/");return{path:t.substring(0,e),name:t.substring(e+1)}},getRelsPath(t){let e=eM.parsePath(t);return`${e.path}/_rels/${e.name}.rels`},xmlEncode(t){let e=Xee.exec(t);if(!e)return t;let r="",i="",n=0,s=e.index;for(;s<t.length;s++){let a=t.charCodeAt(s);switch(a){case 34:i="&quot;";break;case 38:i="&amp;";break;case 39:i="&apos;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;case 127:i="";break;default:{if(a<=31&&(a<=8||a>=11&&a!==13)){i="";break}continue}}n!==s&&(r+=t.substring(n,s)),n=s+1,i&&(r+=i)}return n!==s?r+t.substring(n,s):r},xmlDecode(t){return t.replace(/&([a-z]*);/g,e=>{switch(e){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return e}})},validInt(t){let e=parseInt(t,10);return Number.isNaN(e)?0:e},isDateFmt(t){return t?(t=t.replace(/\[[^\]]*]/g,""),t=t.replace(/"[^"]*"/g,""),t.match(/[ymdhMsb]+/)!==null):!1},fs:{exists(t){return new Promise(e=>{JF.access(t,JF.constants.F_OK,r=>{e(!r)})})}},toIsoDateString(t){return t.toIsoString().subsstr(0,10)},parseBoolean(t){return t===!0||t==="true"||t===1||t==="1"}};tM.exports=eM});var Ww=w((vAe,rM)=>{var Uw=class{constructor(e){this._buf=Buffer.alloc(e&&e.size||16384),this._encoding=e&&e.encoding||"utf8",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._buffer=Buffer.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(e){e=e||0,this._buffer=void 0,this._inPos=e}_grow(e){let r=this._buf.length*2;for(;r<e;)r*=2;let i=Buffer.alloc(r);this._buf.copy(i,0),this._buf=i}addText(e){this._buffer=void 0;let r=this._inPos+this._buf.write(e,this._inPos,this._encoding);for(;r>=this._buf.length-4;)this._grow(this._inPos+e.length),r=this._inPos+this._buf.write(e,this._inPos,this._encoding);this._inPos=r}addStringBuf(e){e.length&&(this._buffer=void 0,this.length+e.length>this.capacity&&this._grow(this.length+e.length),e._buf.copy(this._buf,this._inPos,0,e.length),this._inPos+=e.length)}};rM.exports=Uw});var yf=w((_Ae,sM)=>{var Vee=nr(),iM=sr(),Gee=Ww(),Hw=class{constructor(e,r){this._data=e,this._encoding=r}get length(){return this.toBuffer().length}copy(e,r,i,n){return this.toBuffer().copy(e,r,i,n)}toBuffer(){return this._buffer||(this._buffer=Buffer.from(this._data,this._encoding)),this._buffer}},zw=class{constructor(e){this._data=e}get length(){return this._data.length}copy(e,r,i,n){return this._data._buf.copy(e,r,i,n)}toBuffer(){return this._data.toBuffer()}},Xw=class{constructor(e){this._data=e}get length(){return this._data.length}copy(e,r,i,n){this._data.copy(e,r,i,n)}toBuffer(){return this._data}},Vw=class{constructor(e){this.size=e,this.buffer=Buffer.alloc(e),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let e=Buffer.alloc(this.iWrite-this.iRead);return this.buffer.copy(e,0,this.iRead,this.iWrite),e}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(e){let r;return e===0?null:e===void 0||e>=this.length?(r=this.toBuffer(),this.iRead=this.iWrite,r):(r=Buffer.alloc(e),this.buffer.copy(r,0,this.iRead,e),this.iRead+=e,r)}write(e,r,i){let n=Math.min(i,this.size-this.iWrite);return e.copy(this.buffer,this.iWrite,r,r+n),this.iWrite+=n,n}},nM=function(t){t=t||{},this.bufSize=t.bufSize||1024*1024,this.buffers=[],this.batch=t.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};iM.inherits(nM,Vee.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return Buffer.concat(this.buffers.map(t=>t.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let e=this.buffers[this.buffers.length-1];if(!e.full)return e}let t=new Vw(this.bufSize);return this.buffers.push(t),t},async _pipe(t){let e=function(r){return new Promise(i=>{r.write(t.toBuffer(),()=>{i()})})};await Promise.all(this.pipes.map(e))},_writeToBuffers(t){let e=0,r=t.length;for(;e<r;){let i=this._getWritableBuffer();e+=i.write(t,e,r-e)}},async write(t,e,r){e instanceof Function&&(r=e,e="utf8"),r=r||iM.nop;let i;if(t instanceof Gee)i=new zw(t);else if(t instanceof Buffer)i=new Xw(t);else if(typeof t=="string"||t instanceof String||t instanceof ArrayBuffer)i=new Hw(t,e);else throw new Error("Chunk must be one of type String, Buffer or StringBuf.");if(this.pipes.length)if(this.batch)for(this._writeToBuffers(i);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(i),process.nextTick(r)):(await this._pipe(i),r());else this.paused||this.emit("data",i.toBuffer()),this._writeToBuffers(i),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(t,e,r){let i=n=>{n?r(n):(this._flush(),this.pipes.forEach(s=>{s.end()}),this.emit("finish"))};t?this.write(t,e,i):i()},read(t){let e;if(t){for(e=[];t&&this.buffers.length&&!this.buffers[0].eod;){let r=this.buffers[0],i=r.read(t);t-=i.length,e.push(i),r.eod&&r.full&&this.buffers.shift()}return Buffer.concat(e)}return e=this.buffers.map(r=>r.toBuffer()).filter(Boolean),this.buffers=[],Buffer.concat(e)},setEncoding(t){this.encoding=t},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(t){this.pipes.push(t),!this.paused&&this.buffers.length&&this.end()},unpipe(t){this.pipes=this.pipes.filter(e=>e!==t)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}});sM.exports=nM});var uM=w(lM=>{var aM=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:oM}=Y("buffer");function Zee(t){return typeof t!="string"?t:aM?oM.from(aM.encode(t).buffer):oM.from(t)}lM.stringToBuffer=Zee});var cM=w((bAe,fM)=>{var Yee=Y("events"),Kee=pw(),Qee=yf(),{stringToBuffer:Jee}=uM(),Gw=class extends Yee.EventEmitter{constructor(e){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},e),this.zip=new Kee,this.stream=new Qee}append(e,r){r.hasOwnProperty("base64")&&r.base64?this.zip.file(r.name,e,{base64:!0}):(process.browser&&typeof e=="string"&&(e=Jee(e)),this.zip.file(r.name,e))}async finalize(){let e=await this.zip.generateAsync(this.options);this.stream.end(e),this.emit("finish")}read(e){return this.stream.read(e)}setEncoding(e){return this.stream.setEncoding(e)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(e,r){return this.stream.pipe(e,r)}unpipe(e){return this.stream.unpipe(e)}unshift(e){return this.stream.unshift(e)}wrap(e){return this.stream.wrap(e)}};fM.exports={ZipWriter:Gw}});var zt=w((xAe,pM)=>{var ete=wt(),hM=sr(),tte="<",Yd=">",rte="</",ite="/>";function dM(t,e,r){t.push(` ${e}="${hM.xmlEncode(r.toString())}"`)}function Zw(t,e){if(e){let r=[];ete.each(e,(i,n)=>{i!==void 0&&dM(r,n,i)}),t.push(r.join(""))}}var Kd=class{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(e){let r=this._xml;r.push("<?xml"),Zw(r,e),r.push(`?>
10
+ `)}openNode(e,r){let i=this.tos,n=this._xml;i&&this.open&&n.push(Yd),this._stack.push(e),n.push(tte),n.push(e),Zw(n,r),this.leaf=!0,this.open=!0}addAttribute(e,r){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");r!==void 0&&dM(this._xml,e,r)}addAttributes(e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");Zw(this._xml,e)}writeText(e){let r=this._xml;this.open&&(r.push(Yd),this.open=!1),this.leaf=!1,r.push(hM.xmlEncode(e.toString()))}writeXml(e){this.open&&(this._xml.push(Yd),this.open=!1),this.leaf=!1,this._xml.push(e)}closeNode(){let e=this._stack.pop(),r=this._xml;this.leaf?r.push(ite):(r.push(rte),r.push(e),r.push(Yd)),this.open=!1,this.leaf=!1}leafNode(e,r,i){this.openNode(e,r),i!==void 0&&this.writeText(i),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let e=this._rollbacks.pop();this._xml.length>e.xml&&this._xml.splice(e.xml,this._xml.length-e.xml),this._stack.length>e.stack&&this._stack.splice(e.stack,this._stack.length-e.stack),this.leaf=e.leaf,this.open=e.open}get xml(){return this.closeAll(),this._xml.join("")}};Kd.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};pM.exports=Kd});var Yw=w(mM=>{var gM=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function nte(t){return typeof t=="string"?t:gM?gM.decode(t):t.toString()}mM.bufferToString=nte});var vM=w(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.CHAR=`
11
+ \r -\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}`;nt.S=` \r
12
+ `;nt.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}";nt.NAME_CHAR="-"+nt.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040";nt.CHAR_RE=new RegExp("^["+nt.CHAR+"]$","u");nt.S_RE=new RegExp("^["+nt.S+"]+$","u");nt.NAME_START_CHAR_RE=new RegExp("^["+nt.NAME_START_CHAR+"]$","u");nt.NAME_CHAR_RE=new RegExp("^["+nt.NAME_CHAR+"]$","u");nt.NAME_RE=new RegExp("^["+nt.NAME_START_CHAR+"]["+nt.NAME_CHAR+"]*$","u");nt.NMTOKEN_RE=new RegExp("^["+nt.NAME_CHAR+"]+$","u");var Kw=9,Qw=10,Jw=13,e0=32;nt.S_LIST=[e0,Qw,Jw,Kw];function ste(t){return t>=e0&&t<=55295||t===Qw||t===Jw||t===Kw||t>=57344&&t<=65533||t>=65536&&t<=1114111}nt.isChar=ste;function ate(t){return t===e0||t===Qw||t===Jw||t===Kw}nt.isS=ate;function yM(t){return t>=65&&t<=90||t>=97&&t<=122||t===58||t===95||t===8204||t===8205||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}nt.isNameStartChar=yM;function ote(t){return yM(t)||t>=48&&t<=57||t===45||t===46||t===183||t>=768&&t<=879||t>=8255&&t<=8256}nt.isNameChar=ote});var EM=w(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.CHAR="-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}";Ve.RESTRICTED_CHAR="-\b\v\f-\x7F-\x84\x86-\x9F";Ve.S=` \r
13
+ `;Ve.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}";Ve.NAME_CHAR="-"+Ve.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040";Ve.CHAR_RE=new RegExp("^["+Ve.CHAR+"]$","u");Ve.RESTRICTED_CHAR_RE=new RegExp("^["+Ve.RESTRICTED_CHAR+"]$","u");Ve.S_RE=new RegExp("^["+Ve.S+"]+$","u");Ve.NAME_START_CHAR_RE=new RegExp("^["+Ve.NAME_START_CHAR+"]$","u");Ve.NAME_CHAR_RE=new RegExp("^["+Ve.NAME_CHAR+"]$","u");Ve.NAME_RE=new RegExp("^["+Ve.NAME_START_CHAR+"]["+Ve.NAME_CHAR+"]*$","u");Ve.NMTOKEN_RE=new RegExp("^["+Ve.NAME_CHAR+"]+$","u");var _M=9,wM=10,bM=13,xM=32;Ve.S_LIST=[xM,wM,bM,_M];function lte(t){return t>=1&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111}Ve.isChar=lte;function ute(t){return t>=1&&t<=8||t===11||t===12||t>=14&&t<=31||t>=127&&t<=132||t>=134&&t<=159}Ve.isRestrictedChar=ute;function fte(t){return t===9||t===10||t===13||t>31&&t<127||t===133||t>159&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111}Ve.isCharAndNotRestricted=fte;function cte(t){return t===xM||t===wM||t===bM||t===_M}Ve.isS=cte;function SM(t){return t>=65&&t<=90||t>=97&&t<=122||t===58||t===95||t===8204||t===8205||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}Ve.isNameStartChar=SM;function hte(t){return SM(t)||t>=48&&t<=57||t===45||t===46||t===183||t>=768&&t<=879||t>=8255&&t<=8256}Ve.isNameChar=hte});var CM=w(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.NC_NAME_START_CHAR="A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}";wr.NC_NAME_CHAR="-"+wr.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040";wr.NC_NAME_START_CHAR_RE=new RegExp("^["+wr.NC_NAME_START_CHAR+"]$","u");wr.NC_NAME_CHAR_RE=new RegExp("^["+wr.NC_NAME_CHAR+"]$","u");wr.NC_NAME_RE=new RegExp("^["+wr.NC_NAME_START_CHAR+"]["+wr.NC_NAME_CHAR+"]*$","u");function TM(t){return t>=65&&t<=90||t===95||t>=97&&t<=122||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}wr.isNCNameStartChar=TM;function dte(t){return TM(t)||t===45||t===46||t>=48&&t<=57||t===183||t>=768&&t<=879||t>=8255&&t<=8256}wr.isNCNameChar=dte});var XM=w(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var Bo=vM(),pte=EM(),p0=CM(),br=Bo.isS,gte=Bo.isChar,vf=Bo.isNameStartChar,kM=Bo.isNameChar,$M=Bo.S_LIST,mte=Bo.NAME_RE,yte=pte.isChar,vte=p0.isNCNameStartChar,_te=p0.isNCNameChar,wte=p0.NC_NAME_RE,ip="http://www.w3.org/XML/1998/namespace",Lo="http://www.w3.org/2000/xmlns/",bte={__proto__:null,xml:ip,xmlns:Lo},xte={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},dt=-1,Ai=-2,RM=0,Ste=1,t0=2,Ete=3,Mo=4,Tte=5,Cte=6,kte=7,r0=8,Rte=9,Ate=10,Ote=11,Ite=12,dr=13,Qd=14,i0=15,Nte=16,n0=17,Dte=18,Fte=19,s0=20,Mte=21,Pte=22,qte=23,AM=24,a0=25,Jd=26,OM=27,Lte=28,Bte=29,IM=30,jte=31,$te=32,na=33,Ute=34,o0=35,_f=36,l0=37,Wte=38,NM=39,DM=40,Hte=41,FM=42,zte=43,Xte=44,u0=9,ci=10,f0=13,MM=32,PM=33,UM=34,wf=38,WM=39,ep=45,tp=47,Vte=59,Yn=60,Po=61,Ft=62,Xt=63,HM=91,qo=93,qM=133,LM=8232,rp=t=>t===UM||t===WM,zM=[UM,WM],Gte=[...zM,HM,Ft],Zte=[...zM,Yn,qo],Yte=[Po,Xt,...$M],Kte=[...$M,Ft,wf,Yn];function h0(t,e,r){switch(e){case"xml":r!==ip&&t.fail(`xml prefix must be bound to ${ip}.`);break;case"xmlns":r!==Lo&&t.fail(`xmlns prefix must be bound to ${Lo}.`);break;default:}switch(r){case Lo:t.fail(e===""?`the default namespace may not be set to ${r}.`:`may not assign a prefix (even "xmlns") to the URI ${Lo}.`);break;case ip:switch(e){case"xml":break;case"":t.fail(`the default namespace may not be set to ${r}.`);break;default:t.fail("may not assign the xml namespace to another prefix.")}break;default:}}function Qte(t,e){for(let r of Object.keys(e))h0(t,r,e[r])}var Jte=t=>wte.test(t),ere=t=>mte.test(t),sa=0,BM=1,c0=2;np.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];var jM={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"},d0=class{constructor(e){this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;let r=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,r){this.nameStartCheck=vte,this.nameCheck=_te,this.isName=Jte,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},bte);let i=this.opt.additionalNamespaces;i!=null&&(Qte(this,i),Object.assign(this.ns,i))}else this.nameStartCheck=vf,this.nameCheck=kM,this.isName=ere,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){var e;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=sa,this.attribList=[];let{fragmentOpt:r}=this;this.state=r?dr:RM,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=r,this.xmlDeclPossible=!r,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:i}=this.opt;if(i===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");i="1.0"}this.setXMLVersion(i),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(xte),(e=this.readyHandler)===null||e===void 0||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,r){this[jM[e]]=r}off(e){this[jM[e]]=void 0}makeError(e){var r;let i=(r=this.fileName)!==null&&r!==void 0?r:"";return this.trackPosition&&(i.length>0&&(i+=":"),i+=`${this.line}:${this.column}`),i.length>0&&(i+=": "),new Error(i+e)}fail(e){let r=this.makeError(e),i=this.errorHandler;if(i===void 0)throw r;return i(r),this}write(e){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let r=!1;e===null?(r=!0,e=""):typeof e=="object"&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let i=e.length,n=e.charCodeAt(i-1);!r&&(n===f0||n>=55296&&n<=56319)&&(this.carriedFromPrevious=e[i-1],i--,e=e.slice(0,i));let{stateTable:s}=this;for(this.chunk=e,this.i=0;this.i<i;)s[this.state].call(this);return this.chunkPosition+=i,r?this.end():this}close(){return this.write(null)}getCode10(){let{chunk:e,i:r}=this;if(this.prevI=r,this.i=r+1,r>=e.length)return dt;let i=e.charCodeAt(r);if(this.column++,i<55296){if(i>=MM||i===u0)return i;switch(i){case ci:return this.line++,this.column=0,this.positionAtNewLine=this.position,ci;case f0:return e.charCodeAt(r+1)===ci&&(this.i=r+2),this.line++,this.column=0,this.positionAtNewLine=this.position,Ai;default:return this.fail("disallowed character."),i}}if(i>56319)return i>=57344&&i<=65533||this.fail("disallowed character."),i;let n=65536+(i-55296)*1024+(e.charCodeAt(r+1)-56320);return this.i=r+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){let{chunk:e,i:r}=this;if(this.prevI=r,this.i=r+1,r>=e.length)return dt;let i=e.charCodeAt(r);if(this.column++,i<55296){if(i>31&&i<127||i>159&&i!==LM||i===u0)return i;switch(i){case ci:return this.line++,this.column=0,this.positionAtNewLine=this.position,ci;case f0:{let s=e.charCodeAt(r+1);(s===ci||s===qM)&&(this.i=r+2)}case qM:case LM:return this.line++,this.column=0,this.positionAtNewLine=this.position,Ai;default:return this.fail("disallowed character."),i}}if(i>56319)return i>=57344&&i<=65533||this.fail("disallowed character."),i;let n=65536+(i-55296)*1024+(e.charCodeAt(r+1)-56320);return this.i=r+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){let e=this.getCode();return e===Ai?ci:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:r}=this,{chunk:i}=this;for(;;){let n=this.getCode(),s=n===Ai,a=s?ci:n;if(a===dt||e.includes(a))return this.text+=i.slice(r,this.prevI),a;s&&(this.text+=`${i.slice(r,this.prevI)}
14
+ `,r=this.i)}}captureToChar(e){let{i:r}=this,{chunk:i}=this;for(;;){let n=this.getCode();switch(n){case Ai:this.text+=`${i.slice(r,this.prevI)}
15
+ `,r=this.i,n=ci;break;case dt:return this.text+=i.slice(r),!1;default:}if(n===e)return this.text+=i.slice(r,this.prevI),!0}}captureNameChars(){let{chunk:e,i:r}=this;for(;;){let i=this.getCode();if(i===dt)return this.name+=e.slice(r),dt;if(!kM(i))return this.name+=e.slice(r,this.prevI),i===Ai?ci:i}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===dt||!br(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e==="1.0"?(this.isChar=gte,this.getCode=this.getCode10):(this.isChar=yte,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=Ste}sBeginWhitespace(){let e=this.i,r=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),r){case Yn:if(this.state=i0,this.text.length!==0)throw new Error("no-empty text at start");break;case dt:break;default:this.unget(),this.state=dr,this.xmlDeclPossible=!1}}sDoctype(){var e;let r=this.captureTo(Gte);switch(r){case Ft:{(e=this.doctypeHandler)===null||e===void 0||e.call(this,this.text),this.text="",this.state=dr,this.doctype=!0;break}case dt:break;default:this.text+=String.fromCodePoint(r),r===HM?this.state=Mo:rp(r)&&(this.state=Ete,this.q=r)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=t0)}sDTD(){let e=this.captureTo(Zte);e!==dt&&(this.text+=String.fromCodePoint(e),e===qo?this.state=t0:e===Yn?this.state=Cte:rp(e)&&(this.state=Tte,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=Mo,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case PM:this.state=kte,this.openWakaBang="";break;case Xt:this.state=Ote;break;default:this.state=Mo}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),r=this.openWakaBang+=e;this.text+=e,r!=="-"&&(this.state=r==="--"?r0:Mo,this.openWakaBang="")}sDTDComment(){this.captureToChar(ep)&&(this.text+="-",this.state=Rte)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===ep?Ate:r0}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===Ft?this.state=Mo:(this.fail("malformed comment."),this.state=r0)}sDTDPI(){this.captureToChar(Xt)&&(this.text+="?",this.state=Ite)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===Ft&&(this.state=Mo)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:e}=this,{chunk:r}=this;e:for(;;)switch(this.getCode()){case Ai:this.entity+=`${r.slice(e,this.prevI)}
16
+ `,e=this.i;break;case Vte:{let{entityReturnState:i}=this,n=this.entity+r.slice(e,this.prevI);this.state=i;let s;n===""?(this.fail("empty entity name."),s="&;"):(s=this.parseEntity(n),this.entity=""),(i!==dr||this.textHandler!==void 0)&&(this.text+=s);break e}case dt:this.entity+=r.slice(e);break e;default:}}sOpenWaka(){let e=this.getCode();if(vf(e))this.state=Ute,this.unget(),this.xmlDeclPossible=!1;else switch(e){case tp:this.state=zte,this.xmlDeclPossible=!1;break;case PM:this.state=Nte,this.openWakaBang="",this.xmlDeclPossible=!1;break;case Xt:this.state=qte;break;default:this.fail("disallowed character in tag name"),this.state=dr,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=s0,this.openWakaBang="";break;case"--":this.state=n0,this.openWakaBang="";break;case"DOCTYPE":this.state=t0,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(ep)&&(this.state=Dte)}sCommentEnding(){var e;let r=this.getCodeNorm();r===ep?(this.state=Fte,(e=this.commentHandler)===null||e===void 0||e.call(this,this.text),this.text=""):(this.text+=`-${String.fromCodePoint(r)}`,this.state=n0)}sCommentEnded(){let e=this.getCodeNorm();e!==Ft?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(e)}`,this.state=n0):this.state=dr}sCData(){this.captureToChar(qo)&&(this.state=Mte)}sCDataEnding(){let e=this.getCodeNorm();e===qo?this.state=Pte:(this.text+=`]${String.fromCodePoint(e)}`,this.state=s0)}sCDataEnding2(){var e;let r=this.getCodeNorm();switch(r){case Ft:{(e=this.cdataHandler)===null||e===void 0||e.call(this,this.text),this.text="",this.state=dr;break}case qo:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(r)}`,this.state=s0}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=AM):e===Xt||br(e)?(this.fail("processing instruction without a target."),this.state=e===Xt?Jd:a0):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=AM)}sPIRest(){let{chunk:e,i:r}=this;for(;;){let i=this.getCodeNorm();if(i===dt){this.piTarget+=e.slice(r);return}if(!this.nameCheck(i)){this.piTarget+=e.slice(r,this.prevI);let n=i===Xt;n||br(i)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?na:OM):this.state=n?Jd:a0:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(i));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===Xt?this.state=Jd:br(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(Xt)&&(this.state=Jd)}sPIEnding(){var e;let r=this.getCodeNorm();if(r===Ft){let{piTarget:i}=this;i.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(e=this.piHandler)===null||e===void 0||e.call(this,{target:i,body:this.text}),this.piTarget=this.text="",this.state=dr}else r===Xt?this.text+="?":(this.text+=`?${String.fromCodePoint(r)}`,this.state=a0);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();if(e===Xt){this.state=na;return}e!==dt&&(this.state=Lte,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(Yte);if(e===Xt){this.state=na,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(br(e)||e===Po){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=e===Po?IM:Bte}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===Xt){this.state=na,this.fail("XML declaration is incomplete.");return}br(e)||(e!==Po&&this.fail("value required."),this.state=IM)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===Xt){this.state=na,this.fail("XML declaration is incomplete.");return}br(e)||(rp(e)?this.q=e:(this.fail("value must be quoted."),this.q=MM),this.state=jte)}sXMLDeclValue(){let e=this.captureTo([this.q,Xt]);if(e===Xt){this.state=na,this.text="",this.fail("XML declaration is incomplete.");return}if(e===dt)return;let r=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];let i=r;this.xmlDecl.version=i,/^1\.[0-9]+$/.test(i)?this.opt.forceXMLVersion||this.setXMLVersion(i):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(r)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=r;break;case"standalone":r!=="yes"&&r!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=r;break;default:}this.name="",this.state=$te}sXMLDeclSeparator(){let e=this.getCodeNorm();if(e===Xt){this.state=na;return}br(e)||(this.fail("whitespace required."),this.unget()),this.state=OM}sXMLDeclEnding(){var e;this.getCodeNorm()===Ft?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(e=this.xmldeclHandler)===null||e===void 0||e.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=dr):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var e;let r=this.captureNameChars();if(r===dt)return;let i=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=i.ns=Object.create(null)),(e=this.openTagStartHandler)===null||e===void 0||e.call(this,i),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),r){case Ft:this.openTag();break;case tp:this.state=o0;break;default:br(r)||this.fail("disallowed character in tag name."),this.state=_f}}sOpenTagSlash(){this.getCode()===Ft?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=_f)}sAttrib(){let e=this.skipSpaces();e!==dt&&(vf(e)?(this.unget(),this.state=l0):e===Ft?this.openTag():e===tp?this.state=o0:this.fail("disallowed character in attribute name."))}sAttribName(){let e=this.captureNameChars();e===Po?this.state=NM:br(e)?this.state=Wte:e===Ft?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):e!==dt&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case dt:return;case Po:this.state=NM;break;default:this.fail("attribute without value."),this.text="",this.name="",e===Ft?this.openTag():vf(e)?(this.unget(),this.state=l0):(this.fail("disallowed character in attribute name."),this.state=_f)}}sAttribValue(){let e=this.getCodeNorm();rp(e)?(this.q=e,this.state=DM):br(e)||(this.fail("unquoted attribute value."),this.state=FM,this.unget())}sAttribValueQuoted(){let{q:e,chunk:r}=this,{i}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+r.slice(i,this.prevI)),this.name=this.text="",this.q=null,this.state=Hte;return;case wf:this.text+=r.slice(i,this.prevI),this.state=Qd,this.entityReturnState=DM;return;case ci:case Ai:case u0:this.text+=`${r.slice(i,this.prevI)} `,i=this.i;break;case Yn:this.text+=r.slice(i,this.prevI),this.fail("disallowed character.");return;case dt:this.text+=r.slice(i);return;default:}}sAttribValueClosed(){let e=this.getCodeNorm();br(e)?this.state=_f:e===Ft?this.openTag():e===tp?this.state=o0:vf(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=l0):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){let e=this.captureTo(Kte);switch(e){case wf:this.state=Qd,this.entityReturnState=FM;break;case Yn:this.fail("disallowed character.");break;case dt:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",e===Ft?this.openTag():this.state=_f}}sCloseTag(){let e=this.captureNameChars();e===Ft?this.closeTag():br(e)?this.state=Xte:e!==dt&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case Ft:this.closeTag();break;case dt:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:e,forbiddenState:r}=this,{chunk:i,textHandler:n}=this;e:for(;;)switch(this.getCode()){case Yn:{if(this.state=i0,n!==void 0){let{text:s}=this,a=i.slice(e,this.prevI);s.length!==0?(n(s+a),this.text=""):a.length!==0&&n(a)}r=sa;break e}case wf:this.state=Qd,this.entityReturnState=dr,n!==void 0&&(this.text+=i.slice(e,this.prevI)),r=sa;break e;case qo:switch(r){case sa:r=BM;break;case BM:r=c0;break;case c0:break;default:throw new Error("impossible state")}break;case Ft:r===c0&&this.fail('the string "]]>" is disallowed in char data.'),r=sa;break;case Ai:n!==void 0&&(this.text+=`${i.slice(e,this.prevI)}
17
+ `),e=this.i,r=sa;break;case dt:n!==void 0&&(this.text+=i.slice(e));break e;default:r=sa}this.forbiddenState=r}handleTextOutsideRoot(){let{i:e}=this,{chunk:r,textHandler:i}=this,n=!1;e:for(;;){let s=this.getCode();switch(s){case Yn:{if(this.state=i0,i!==void 0){let{text:a}=this,o=r.slice(e,this.prevI);a.length!==0?(i(a+o),this.text=""):o.length!==0&&i(o)}break e}case wf:this.state=Qd,this.entityReturnState=dr,i!==void 0&&(this.text+=r.slice(e,this.prevI)),n=!0;break e;case Ai:i!==void 0&&(this.text+=`${r.slice(e,this.prevI)}
18
+ `),e=this.i;break;case dt:i!==void 0&&(this.text+=r.slice(e));break e;default:br(s)||(n=!0)}}n&&(!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(e,r){var i;let{prefix:n,local:s}=this.qname(e),a={name:e,prefix:n,local:s,value:r};if(this.attribList.push(a),(i=this.attributeHandler)===null||i===void 0||i.call(this,a),n==="xmlns"){let o=r.trim();this.currentXMLVersion==="1.0"&&o===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[s]=o,h0(this,s,o)}else if(e==="xmlns"){let o=r.trim();this.topNS[""]=o,h0(this,"",o)}}pushAttribPlain(e,r){var i;let n={name:e,value:r};this.attribList.push(n),(i=this.attributeHandler)===null||i===void 0||i.call(this,n)}end(){var e,r;this.sawRoot||this.fail("document must contain a root element.");let{tags:i}=this;for(;i.length>0;){let s=i.pop();this.fail(`unclosed tag: ${s.name}`)}this.state!==RM&&this.state!==dr&&this.fail("unexpected end.");let{text:n}=this;return n.length!==0&&((e=this.textHandler)===null||e===void 0||e.call(this,n),this.text=""),this._closed=!0,(r=this.endHandler)===null||r===void 0||r.call(this),this._init(),this}resolve(e){var r,i;let n=this.topNS[e];if(n!==void 0)return n;let{tags:s}=this;for(let a=s.length-1;a>=0;a--)if(n=s[a].ns[e],n!==void 0)return n;return n=this.ns[e],n!==void 0?n:(i=(r=this.opt).resolvePrefix)===null||i===void 0?void 0:i.call(r,e)}qname(e){let r=e.indexOf(":");if(r===-1)return{prefix:"",local:e};let i=e.slice(r+1),n=e.slice(0,r);return(n===""||i===""||i.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:n,local:i}}processAttribsNS(){var e;let{attribList:r}=this,i=this.tag;{let{prefix:a,local:o}=this.qname(i.name);i.prefix=a,i.local=o;let u=i.uri=(e=this.resolve(a))!==null&&e!==void 0?e:"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),u===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),i.uri=a))}if(r.length===0)return;let{attributes:n}=i,s=new Set;for(let a of r){let{name:o,prefix:u,local:f}=a,c,h;u===""?(c=o==="xmlns"?Lo:"",h=o):(c=this.resolve(u),c===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(u)}.`),c=u),h=`{${c}}${f}`),s.has(h)&&this.fail(`duplicate attribute: ${h}.`),s.add(h),a.uri=c,n[o]=a}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,r=this.tag.attributes;for(let{name:i,value:n}of e)r[i]!==void 0&&this.fail(`duplicate attribute: ${i}.`),r[i]=n;this.attribList=[]}openTag(){var e;this.processAttribs();let{tags:r}=this,i=this.tag;i.isSelfClosing=!1,(e=this.openTagHandler)===null||e===void 0||e.call(this,i),r.push(i),this.state=dr,this.name=""}openSelfClosingTag(){var e,r,i;this.processAttribs();let{tags:n}=this,s=this.tag;s.isSelfClosing=!0,(e=this.openTagHandler)===null||e===void 0||e.call(this,s),(r=this.closeTagHandler)===null||r===void 0||r.call(this,s),(this.tag=(i=n[n.length-1])!==null&&i!==void 0?i:null)===null&&(this.closedRoot=!0),this.state=dr,this.name=""}closeTag(){let{tags:e,name:r}=this;if(this.state=dr,this.name="",r===""){this.fail("weird empty close tag."),this.text+="</>";return}let i=this.closeTagHandler,n=e.length;for(;n-- >0;){let s=this.tag=e.pop();if(this.topNS=s.ns,i?.(s),s.name===r)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${r}.`),this.text+=`</${r}>`)}parseEntity(e){if(e[0]!=="#"){let i=this.ENTITIES[e];return i!==void 0?i:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let r=NaN;return e[1]==="x"&&/^#x[0-9a-f]+$/i.test(e)?r=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(r=parseInt(e.slice(1),10)),this.isChar(r)?String.fromCodePoint(r):(this.fail("malformed character entity."),`&${e};`)}};np.SaxesParser=d0});var bf=w((RAe,VM)=>{var{SaxesParser:tre}=XM(),{PassThrough:rre}=nr(),{bufferToString:ire}=Yw();VM.exports=async function*(t){t.pipe&&!t[Symbol.asyncIterator]&&(t=t.pipe(new rre));let e=new tre,r;e.on("error",n=>{r=n});let i=[];e.on("opentag",n=>i.push({eventType:"opentag",value:n})),e.on("text",n=>i.push({eventType:"text",value:n})),e.on("closetag",n=>i.push({eventType:"closetag",value:n}));for await(let n of t){if(e.write(ire(n)),r)throw r;yield i,i=[]}}});var oe=w((AAe,GM)=>{var nre=bf(),sre=zt(),g0=class t{prepare(){}render(){}parseOpen(e){}parseText(e){}parseClose(e){}reconcile(e,r){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(e=>{e instanceof t?e.reset():e.xform&&e.xform.reset()})}mergeModel(e){this.model=Object.assign(this.model||{},e)}async parse(e){for await(let r of e)for(let{eventType:i,value:n}of r)if(i==="opentag")this.parseOpen(n);else if(i==="text")this.parseText(n);else if(i==="closetag"&&!this.parseClose(n.name))return this.model;return this.model}async parseStream(e){return this.parse(nre(e))}get xml(){return this.toXml(this.model)}toXml(e){let r=new sre;return this.render(r,e),r.xml}static toAttribute(e,r,i=!1){if(e===void 0){if(i)return r}else if(i||e!==r)return e.toString()}static toStringAttribute(e,r,i=!1){return t.toAttribute(e,r,i)}static toStringValue(e,r){return e===void 0?r:e}static toBoolAttribute(e,r,i=!1){if(e===void 0){if(i)return r}else if(i||e!==r)return e?"1":"0"}static toBoolValue(e,r){return e===void 0?r:e==="1"}static toIntAttribute(e,r,i=!1){return t.toAttribute(e,r,i)}static toIntValue(e,r){return e===void 0?r:parseInt(e,10)}static toFloatAttribute(e,r,i=!1){return t.toAttribute(e,r,i)}static toFloatValue(e,r){return e===void 0?r:parseFloat(e)}};GM.exports=g0});var jo=w((OAe,YM)=>{var are=oe(),ore=zt();function ZM(t,e){t.openNode(e.tag,e.$),e.c&&e.c.forEach(r=>{ZM(t,r)}),e.t&&t.writeText(e.t),t.closeNode()}var m0=class extends are{constructor(e){super(),this._model=e}render(e){if(!this._xml){let r=new ore;ZM(r,this._model),this._xml=r.xml}e.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(e){return e!==this._model.tag}};YM.exports=m0});var Kn=w((IAe,KM)=>{var lre=oe(),y0=class extends lre{constructor(e){super(),this.tag=e.tag,this.always=!!e.always,this.count=e.count,this.empty=e.empty,this.$count=e.$count||"count",this.$=e.$,this.childXform=e.childXform,this.maxItems=e.maxItems}prepare(e,r){let{childXform:i}=this;e&&e.forEach((n,s)=>{r.index=s,i.prepare(n,r)})}render(e,r){if(this.always||r&&r.length){e.openNode(this.tag,this.$),this.count&&e.addAttribute(this.$count,r&&r.length||0);let{childXform:i}=this;(r||[]).forEach((n,s)=>{i.render(e,n,s)}),e.closeNode()}else this.empty&&e.leafNode(this.tag)}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.model=[],!0):this.childXform.parseOpen(e)?(this.parser=this.childXform,!0):!1}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(e,r){if(e){let{childXform:i}=this;e.forEach(n=>{i.reconcile(n,r)})}}};KM.exports=y0});var Qn=w((NAe,QM)=>{var ure=oe(),v0=class extends ure{constructor(e){super(),this.name=e||"color"}get tag(){return this.name}render(e,r){return r?(e.openNode(this.name),r.argb?e.addAttribute("rgb",r.argb):r.theme!==void 0?(e.addAttribute("theme",r.theme),r.tint!==void 0&&e.addAttribute("tint",r.tint)):r.indexed!==void 0?e.addAttribute("indexed",r.indexed):e.addAttribute("auto","1"),e.closeNode(),!0):!1}parseOpen(e){return e.name===this.name?(e.attributes.rgb?this.model={argb:e.attributes.rgb}:e.attributes.theme?(this.model={theme:parseInt(e.attributes.theme,10)},e.attributes.tint&&(this.model.tint=parseFloat(e.attributes.tint))):e.attributes.indexed?this.model={indexed:parseInt(e.attributes.indexed,10)}:this.model=void 0,!0):!1}parseText(){}parseClose(){return!1}};QM.exports=v0});var eP=w((DAe,JM)=>{var fre=oe(),_0=class extends fre{constructor(e){super(),this.tag=e.tag,this.attr=e.attr}render(e,r){r&&(e.openNode(this.tag),e.closeNode())}parseOpen(e){e.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}};JM.exports=_0});var sp=w((FAe,tP)=>{var cre=oe(),w0=class extends cre{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs,this.zero=e.zero}render(e,r){(r||this.zero)&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,r):e.writeText(r),e.closeNode())}parseOpen(e){return e.name===this.tag?(this.attr?this.model=parseInt(e.attributes[this.attr],10):this.text=[],!0):!1}parseText(e){this.attr||this.text.push(e)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}};tP.exports=w0});var ap=w((MAe,rP)=>{var hre=oe(),b0=class extends hre{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs}render(e,r){r!==void 0&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,r):e.writeText(r),e.closeNode())}parseOpen(e){e.name===this.tag&&(this.attr?this.model=e.attributes[this.attr]:this.text=[])}parseText(e){this.attr||this.text.push(e)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}};rP.exports=b0});var nP=w((PAe,iP)=>{var dre=oe(),op=class t extends dre{constructor(e){super(),this.model=e}get tag(){return"u"}render(e,r){if(r=r||this.model,r===!0)e.leafNode("u");else{let i=t.Attributes[r];i&&e.leafNode("u",i)}}parseOpen(e){e.name==="u"&&(this.model=e.attributes.val||!0)}parseText(){}parseClose(){return!1}};op.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}};iP.exports=op});var up=w((qAe,sP)=>{"use strict";var pre=Qn(),aa=eP(),x0=sp(),S0=ap(),gre=nP(),mre=wt(),yre=oe(),lp=class t extends yre{constructor(e){super(),this.options=e||t.OPTIONS,this.map={b:{prop:"bold",xform:new aa({tag:"b",attr:"val"})},i:{prop:"italic",xform:new aa({tag:"i",attr:"val"})},u:{prop:"underline",xform:new gre},charset:{prop:"charset",xform:new x0({tag:"charset",attr:"val"})},color:{prop:"color",xform:new pre},condense:{prop:"condense",xform:new aa({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new aa({tag:"extend",attr:"val"})},family:{prop:"family",xform:new x0({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new aa({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new S0({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new S0({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new aa({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new aa({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new x0({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new S0({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(e,r){let{map:i}=this;e.openNode(this.options.tagName),mre.each(this.map,(n,s)=>{i[s].xform.render(e,r[n.prop])}),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):this.map[e.name]?(this.parser=this.map[e.name].xform,this.parser.parseOpen(e)):e.name===this.options.tagName?(this.model={},!0):!1}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser&&!this.parser.parseClose(e)){let r=this.map[e];return this.parser.model&&(this.model[r.prop]=this.parser.model),this.parser=void 0,!0}return e!==this.options.tagName}};lp.OPTIONS={tagName:"font",fontNameTag:"name"};sP.exports=lp});var T0=w((LAe,aP)=>{var dp=oe(),E0=Qn(),fp=class extends dp{constructor(){super(),this.map={color:new E0}}get tag(){return"stop"}render(e,r){e.openNode("stop"),e.addAttribute("position",r.position),this.map.color.render(e,r.color),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"stop":return this.model={position:parseFloat(e.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.model.color=this.parser.model,this.parser=void 0),!0):!1}},cp=class extends dp{constructor(){super(),this.map={fgColor:new E0("fgColor"),bgColor:new E0("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(e,r){e.openNode("patternFill"),e.addAttribute("patternType",r.pattern),r.fgColor&&this.map.fgColor.render(e,r.fgColor),r.bgColor&&this.map.bgColor.render(e,r.bgColor),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name==="patternFill"?(this.model={type:"pattern",pattern:e.attributes.patternType},!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){return this.parser?(this.parser.parseClose(e)||(this.parser.model&&(this.model[e]=this.parser.model),this.parser=void 0),!0):!1}},hp=class extends dp{constructor(){super(),this.map={stop:new fp}}get name(){return"gradient"}get tag(){return"gradientFill"}render(e,r){switch(e.openNode("gradientFill"),r.gradient){case"angle":e.addAttribute("degree",r.degree);break;case"path":e.addAttribute("type","path"),r.center.left&&(e.addAttribute("left",r.center.left),r.center.right===void 0&&e.addAttribute("right",r.center.left)),r.center.right&&e.addAttribute("right",r.center.right),r.center.top&&(e.addAttribute("top",r.center.top),r.center.bottom===void 0&&e.addAttribute("bottom",r.center.top)),r.center.bottom&&e.addAttribute("bottom",r.center.bottom);break;default:break}let i=this.map.stop;r.stops.forEach(n=>{i.render(e,n)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"gradientFill":{let r=this.model={stops:[]};return e.attributes.degree?(r.gradient="angle",r.degree=parseInt(e.attributes.degree,10)):e.attributes.type==="path"&&(r.gradient="path",r.center={left:e.attributes.left?parseFloat(e.attributes.left):0,top:e.attributes.top?parseFloat(e.attributes.top):0},e.attributes.right!==e.attributes.left&&(r.center.right=e.attributes.right?parseFloat(e.attributes.right):0),e.attributes.bottom!==e.attributes.top&&(r.center.bottom=e.attributes.bottom?parseFloat(e.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,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)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0):!1}},oa=class t extends dp{constructor(){super(),this.map={patternFill:new cp,gradientFill:new hp}}get tag(){return"fill"}render(e,r){switch(e.addRollback(),e.openNode("fill"),r.type){case"pattern":this.map.patternFill.render(e,r);break;case"gradient":this.map.gradientFill.render(e,r);break;default:e.rollback();return}e.closeNode(),e.commit()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name==="fill"?(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){return this.parser?(this.parser.parseClose(e)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0):!1}validStyle(e){return t.validPatternValues[e]}};oa.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((t,e)=>(t[e]=!0,t),{});oa.StopXform=fp;oa.PatternFillXform=cp;oa.GradientFillXform=hp;aP.exports=oa});var k0=w((BAe,uP)=>{var lP=oe(),oP=sr(),vre=Qn(),Jn=class t extends lP{constructor(e){super(),this.name=e,this.map={color:new vre}}get tag(){return this.name}render(e,r,i){let n=r&&r.color||i||this.defaultColor;e.openNode(this.name),r&&r.style&&(e.addAttribute("style",r.style),n&&this.map.color.render(e,n)),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.name:{let{style:r}=e.attributes;return r?this.model={style:r}:this.model=void 0,!0}case"color":return this.parser=this.map.color,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)||(this.parser=void 0),!0):(e===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(e){return t.validStyleValues[e]}};Jn.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((t,e)=>(t[e]=!0,t),{});var C0=class extends lP{constructor(){super(),this.map={top:new Jn("top"),left:new Jn("left"),bottom:new Jn("bottom"),right:new Jn("right"),diagonal:new Jn("diagonal")}}render(e,r){let{color:i}=r;e.openNode("border"),r.diagonal&&r.diagonal.style&&(r.diagonal.up&&e.addAttribute("diagonalUp","1"),r.diagonal.down&&e.addAttribute("diagonalDown","1"));function n(s,a){s&&!s.color&&r.color&&(s={...s,color:r.color}),a.render(e,s,i)}n(r.left,this.map.left),n(r.right,this.map.right),n(r.top,this.map.top),n(r.bottom,this.map.bottom),n(r.diagonal,this.map.diagonal),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name==="border"?(this.reset(),this.diagonalUp=oP.parseBoolean(e.attributes.diagonalUp),this.diagonalDown=oP.parseBoolean(e.attributes.diagonalDown),!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)return this.parser.parseClose(e)||(this.parser=void 0),!0;if(e==="border"){let r=this.model={},i=function(n,s,a){s&&(a&&Object.assign(s,a),r[n]=s)};i("left",this.map.left.model),i("right",this.map.right.model),i("top",this.map.top.model),i("bottom",this.map.bottom.model),i("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}};uP.exports=C0});var cP=w((jAe,fP)=>{fP.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},28:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ja-jp":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":'yyyy"\uB144" mm"\uC6D4" dd"\uC77C"'},32:{"zh-tw":'hh"\u6642"mm"\u5206"',"zh-cn":'h"\u65F6"mm"\u5206"',"ja-jp":'h"\u6642"mm"\u5206"',"ko-kr":'h"\uC2DC" mm"\uBD84"'},33:{"zh-tw":'hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'h"\u6642"mm"\u5206"ss"\u79D2"',"ko-kr":'h"\uC2DC" mm"\uBD84" ss"\uCD08"'},34:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},51:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},52:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},55:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},58:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}});var A0=w(($Ae,hP)=>{var _re=wt(),R0=cP(),wre=oe();function bre(){let t={};return _re.each(R0,(e,r)=>{e.f&&(t[e.f]=parseInt(r,10))}),t}var xre=bre(),xf=class extends wre{constructor(e,r){super(),this.id=e,this.formatCode=r}get tag(){return"numFmt"}render(e,r){e.leafNode("numFmt",{numFmtId:r.id,formatCode:r.formatCode})}parseOpen(e){return e.name==="numFmt"?(this.model={id:parseInt(e.attributes.numFmtId,10),formatCode:e.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0):!1}parseText(){}parseClose(){return!1}};xf.getDefaultFmtId=function(e){return xre[e]};xf.getDefaultFmtCode=function(e){return R0[e]&&R0[e].f};hP.exports=xf});var I0=w((UAe,gP)=>{var dP=ni(),Sf=sr(),Sre=oe(),la={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((t,e)=>(t[e]=!0,t),{}),horizontal(t){return this.horizontalValues[t]?t:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((t,e)=>(t[e]=!0,t),{}),vertical(t){return t==="middle"?"center":this.verticalValues[t]?t:void 0},wrapText(t){return t?!0:void 0},shrinkToFit(t){return t?!0:void 0},textRotation(t){return t==="vertical"?t:(t=Sf.validInt(t),t>=-90&&t<=90?t:void 0)},indent(t){return t=Sf.validInt(t),Math.max(0,t)},readingOrder(t){switch(t){case"ltr":return dP.ReadingOrder.LeftToRight;case"rtl":return dP.ReadingOrder.RightToLeft;default:return}}},pP={toXml(t){if(t=la.textRotation(t),t){if(t==="vertical")return 255;let e=Math.round(t);if(e>=0&&e<=90)return e;if(e<0&&e>=-90)return 90-e}},toModel(t){let e=Sf.validInt(t);if(e!==void 0){if(e===255)return"vertical";if(e>=0&&e<=90)return e;if(e>90&&e<=180)return 90-e}}},O0=class extends Sre{get tag(){return"alignment"}render(e,r){e.addRollback(),e.openNode("alignment");let i=!1;function n(s,a){a&&(e.addAttribute(s,a),i=!0)}n("horizontal",la.horizontal(r.horizontal)),n("vertical",la.vertical(r.vertical)),n("wrapText",la.wrapText(r.wrapText)?"1":!1),n("shrinkToFit",la.shrinkToFit(r.shrinkToFit)?"1":!1),n("indent",la.indent(r.indent)),n("textRotation",pP.toXml(r.textRotation)),n("readingOrder",la.readingOrder(r.readingOrder)),e.closeNode(),i?e.commit():e.rollback()}parseOpen(e){let r={},i=!1;function n(s,a,o){s&&(r[a]=o,i=!0)}n(e.attributes.horizontal,"horizontal",e.attributes.horizontal),n(e.attributes.vertical,"vertical",e.attributes.vertical==="center"?"middle":e.attributes.vertical),n(e.attributes.wrapText,"wrapText",Sf.parseBoolean(e.attributes.wrapText)),n(e.attributes.shrinkToFit,"shrinkToFit",Sf.parseBoolean(e.attributes.shrinkToFit)),n(e.attributes.indent,"indent",parseInt(e.attributes.indent,10)),n(e.attributes.textRotation,"textRotation",pP.toModel(e.attributes.textRotation)),n(e.attributes.readingOrder,"readingOrder",e.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=i?r:null}parseText(){}parseClose(){return!1}};gP.exports=O0});var D0=w((WAe,yP)=>{var Ere=oe(),mP={boolean(t,e){return t===void 0?e:t}},N0=class extends Ere{get tag(){return"protection"}render(e,r){e.addRollback(),e.openNode("protection");let i=!1;function n(s,a){a!==void 0&&(e.addAttribute(s,a),i=!0)}n("locked",mP.boolean(r.locked,!0)?void 0:"0"),n("hidden",mP.boolean(r.hidden,!1)?"1":void 0),e.closeNode(),i?e.commit():e.rollback()}parseOpen(e){let r={locked:e.attributes.locked!=="0",hidden:e.attributes.hidden==="1"},i=!r.locked||r.hidden;this.model=i?r:null}parseText(){}parseClose(){return!1}};yP.exports=N0});var _P=w((HAe,vP)=>{var Tre=oe(),Cre=I0(),kre=D0(),F0=class extends Tre{constructor(e){super(),this.xfId=!!(e&&e.xfId),this.map={alignment:new Cre,protection:new kre}}get tag(){return"xf"}render(e,r){e.openNode("xf",{numFmtId:r.numFmtId||0,fontId:r.fontId||0,fillId:r.fillId||0,borderId:r.borderId||0}),this.xfId&&e.addAttribute("xfId",r.xfId||0),r.numFmtId&&e.addAttribute("applyNumberFormat","1"),r.fontId&&e.addAttribute("applyFont","1"),r.fillId&&e.addAttribute("applyFill","1"),r.borderId&&e.addAttribute("applyBorder","1"),r.alignment&&e.addAttribute("applyAlignment","1"),r.protection&&e.addAttribute("applyProtection","1"),r.alignment&&this.map.alignment.render(e,r.alignment),r.protection&&this.map.protection.render(e,r.protection),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"xf":return this.model={numFmtId:parseInt(e.attributes.numFmtId,10),fontId:parseInt(e.attributes.fontId,10),fillId:parseInt(e.attributes.fillId,10),borderId:parseInt(e.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(e.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(e),!0;case"protection":return this.parser=this.map.protection,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)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):e!=="xf"}};vP.exports=F0});var bP=w((zAe,wP)=>{var Rre=oe(),Are=I0(),Ore=k0(),Ire=T0(),Nre=up(),Dre=A0(),Fre=D0(),M0=class extends Rre{constructor(){super(),this.map={alignment:new Are,border:new Ore,fill:new Ire,font:new Nre,numFmt:new Dre,protection:new Fre}}get tag(){return"dxf"}render(e,r){if(e.openNode(this.tag),r.font&&this.map.font.render(e,r.font),r.numFmt&&r.numFmtId){let i={id:r.numFmtId,formatCode:r.numFmt};this.map.numFmt.render(e,i)}r.fill&&this.map.fill.render(e,r.fill),r.alignment&&this.map.alignment.render(e,r.alignment),r.border&&this.map.border.render(e,r.border),r.protection&&this.map.protection.render(e,r.protection),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.reset(),!0):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1):!0}};wP.exports=M0});var mp=w((XAe,TP)=>{var gp=ni(),Mre=zt(),Pre=oe(),pp=jo(),ua=Kn(),xP=up(),SP=T0(),EP=k0(),Ef=A0(),P0=_P(),qre=bP(),Lre=164,fa=class t extends Pre{constructor(e){super(),this.map={numFmts:new ua({tag:"numFmts",count:!0,childXform:new Ef}),fonts:new ua({tag:"fonts",count:!0,childXform:new xP,$:{"x14ac:knownFonts":1}}),fills:new ua({tag:"fills",count:!0,childXform:new SP}),borders:new ua({tag:"borders",count:!0,childXform:new EP}),cellStyleXfs:new ua({tag:"cellStyleXfs",count:!0,childXform:new P0}),cellXfs:new ua({tag:"cellXfs",count:!0,childXform:new P0({xfId:!0})}),dxfs:new ua({tag:"dxfs",always:!0,count:!0,childXform:new qre}),numFmt:new Ef,font:new xP,fill:new SP,border:new EP,style:new P0({xfId:!0}),cellStyles:t.STATIC_XFORMS.cellStyles,tableStyles:t.STATIC_XFORMS.tableStyles,extLst:t.STATIC_XFORMS.extLst},e&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(e,r){r=r||this.model,e.openXml(Mre.StdDocAttributes),e.openNode("styleSheet",t.STYLESHEET_ATTRIBUTES),this.index?(r.numFmts&&r.numFmts.length&&(e.openNode("numFmts",{count:r.numFmts.length}),r.numFmts.forEach(i=>{e.writeXml(i)}),e.closeNode()),r.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),e.openNode("fonts",{count:r.fonts.length,"x14ac:knownFonts":1}),r.fonts.forEach(i=>{e.writeXml(i)}),e.closeNode(),e.openNode("fills",{count:r.fills.length}),r.fills.forEach(i=>{e.writeXml(i)}),e.closeNode(),e.openNode("borders",{count:r.borders.length}),r.borders.forEach(i=>{e.writeXml(i)}),e.closeNode(),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),e.openNode("cellXfs",{count:r.styles.length}),r.styles.forEach(i=>{e.writeXml(i)}),e.closeNode()):(this.map.numFmts.render(e,r.numFmts),this.map.fonts.render(e,r.fonts),this.map.fills.render(e,r.fills),this.map.borders.render(e,r.borders),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(e,r.styles)),t.STATIC_XFORMS.cellStyles.render(e),this.map.dxfs.render(e,r.dxfs),t.STATIC_XFORMS.tableStyles.render(e),t.STATIC_XFORMS.extLst.render(e),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name==="styleSheet"?(this.initIndex(),!0):(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;switch(e){case"styleSheet":{this.model={};let r=(i,n)=>{n.model&&n.model.length&&(this.model[i]=n.model)};if(r("numFmts",this.map.numFmts),r("fonts",this.map.fonts),r("fills",this.map.fills),r("borders",this.map.borders),r("styles",this.map.cellXfs),r("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){let i=this.index.numFmt;this.model.numFmts.forEach(n=>{i[n.id]=n.formatCode})}return!1}default:return!0}}addStyleModel(e,r){if(!e)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(e))return this.weakMap.get(e);let i={};if(r=r||gp.ValueType.Number,e.numFmt)i.numFmtId=this._addNumFmtStr(e.numFmt);else switch(r){case gp.ValueType.Number:i.numFmtId=this._addNumFmtStr("General");break;case gp.ValueType.Date:i.numFmtId=this._addNumFmtStr("mm-dd-yy");break;default:break}e.font&&(i.fontId=this._addFont(e.font)),e.border&&(i.borderId=this._addBorder(e.border)),e.fill&&(i.fillId=this._addFill(e.fill)),e.alignment&&(i.alignment=e.alignment),e.protection&&(i.protection=e.protection);let n=this._addStyle(i);return this.weakMap&&this.weakMap.set(e,n),n}getStyleModel(e){let r=this.model.styles[e];if(!r)return null;let i=this.index.model[e];if(i)return i;if(i=this.index.model[e]={},r.numFmtId){let s=this.index.numFmt[r.numFmtId]||Ef.getDefaultFmtCode(r.numFmtId);s&&(i.numFmt=s)}function n(s,a,o){if(o||o===0){let u=a[o];u&&(i[s]=u)}}return n("font",this.model.fonts,r.fontId),n("border",this.model.borders,r.borderId),n("fill",this.model.fills,r.fillId),r.alignment&&(i.alignment=r.alignment),r.protection&&(i.protection=r.protection),i}addDxfStyle(e){return e.numFmt&&(e.numFmtId=this._addNumFmtStr(e.numFmt)),this.model.dxfs.push(e),this.model.dxfs.length-1}getDxfStyle(e){return this.model.dxfs[e]}_addStyle(e){let r=this.map.style.toXml(e),i=this.index.style[r];return i===void 0&&(i=this.index.style[r]=this.model.styles.length,this.model.styles.push(r)),i}_addNumFmtStr(e){let r=Ef.getDefaultFmtId(e);if(r!==void 0||(r=this.index.numFmt[e],r!==void 0))return r;r=this.index.numFmt[e]=Lre+this.model.numFmts.length;let i=this.map.numFmt.toXml({id:r,formatCode:e});return this.model.numFmts.push(i),r}_addFont(e){let r=this.map.font.toXml(e),i=this.index.font[r];return i===void 0&&(i=this.index.font[r]=this.model.fonts.length,this.model.fonts.push(r)),i}_addBorder(e){let r=this.map.border.toXml(e),i=this.index.border[r];return i===void 0&&(i=this.index.border[r]=this.model.borders.length,this.model.borders.push(r)),i}_addFill(e){let r=this.map.fill.toXml(e),i=this.index.fill[r];return i===void 0&&(i=this.index.fill[r]=this.model.fills.length,this.model.fills.push(r)),i}};fa.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"};fa.STATIC_XFORMS={cellStyles:new pp({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new pp({tag:"dxfs",$:{count:0}}),tableStyles:new pp({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new pp({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})};var q0=class extends fa{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(e){return e.autodrain(),Promise.resolve()}addStyleModel(e,r){return r===gp.ValueType.Date?this.dateStyleId:0}get dateStyleId(){if(!this._dateStyleId){let e={numFmtId:Ef.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(e)}return this._dateStyleId}getStyleModel(){return{}}};fa.Mock=q0;TP.exports=fa});var kP=w((VAe,CP)=>{var Bre=oe(),L0=class extends Bre{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs,this._format=e.format||function(r){try{return Number.isNaN(r.getTime())?"":r.toISOString()}catch{return""}},this._parse=e.parse||function(r){return new Date(r)}}render(e,r){r&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,this._format(r)):e.writeText(this._format(r)),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}};CP.exports=L0});var j0=w((GAe,RP)=>{var jre=zt(),$re=oe(),B0=kP(),Yr=ap(),Ure=sp(),$o=class t extends $re{constructor(){super(),this.map={"dc:creator":new Yr({tag:"dc:creator"}),"dc:title":new Yr({tag:"dc:title"}),"dc:subject":new Yr({tag:"dc:subject"}),"dc:description":new Yr({tag:"dc:description"}),"dc:identifier":new Yr({tag:"dc:identifier"}),"dc:language":new Yr({tag:"dc:language"}),"cp:keywords":new Yr({tag:"cp:keywords"}),"cp:category":new Yr({tag:"cp:category"}),"cp:lastModifiedBy":new Yr({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new B0({tag:"cp:lastPrinted",format:t.DateFormat}),"cp:revision":new Ure({tag:"cp:revision"}),"cp:version":new Yr({tag:"cp:version"}),"cp:contentStatus":new Yr({tag:"cp:contentStatus"}),"cp:contentType":new Yr({tag:"cp:contentType"}),"dcterms:created":new B0({tag:"dcterms:created",attrs:t.DateAttrs,format:t.DateFormat}),"dcterms:modified":new B0({tag:"dcterms:modified",attrs:t.DateAttrs,format:t.DateFormat})}}render(e,r){e.openXml(jre.StdDocAttributes),e.openNode("cp:coreProperties",t.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(e,r.creator),this.map["dc:title"].render(e,r.title),this.map["dc:subject"].render(e,r.subject),this.map["dc:description"].render(e,r.description),this.map["dc:identifier"].render(e,r.identifier),this.map["dc:language"].render(e,r.language),this.map["cp:keywords"].render(e,r.keywords),this.map["cp:category"].render(e,r.category),this.map["cp:lastModifiedBy"].render(e,r.lastModifiedBy),this.map["cp:lastPrinted"].render(e,r.lastPrinted),this.map["cp:revision"].render(e,r.revision),this.map["cp:version"].render(e,r.version),this.map["cp:contentStatus"].render(e,r.contentStatus),this.map["cp:contentType"].render(e,r.contentType),this.map["dcterms:created"].render(e,r.created),this.map["dcterms:modified"].render(e,r.modified),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error(`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.parser=void 0),!0;switch(e){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error(`Unexpected xml node in parseClose: ${e}`)}}};$o.DateFormat=function(t){return t.toISOString().replace(/[.]\d{3}/,"")};$o.DateAttrs={"xsi:type":"dcterms:W3CDTF"};$o.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"};RP.exports=$o});var yp=w((ZAe,AP)=>{var Wre=oe(),$0=class extends Wre{get tag(){return"t"}render(e,r){e.openNode("t"),/^\s|\n|\s$/.test(r)&&e.addAttribute("xml:space","preserve"),e.writeText(r),e.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(e,r)=>String.fromCharCode(parseInt(r,16)))}parseOpen(e){return e.name==="t"?(this._text=[],!0):!1}parseText(e){this._text.push(e)}parseClose(){return!1}};AP.exports=$0});var Tf=w((YAe,OP)=>{var Hre=yp(),zre=up(),Xre=oe(),vp=class t extends Xre{constructor(e){super(),this.model=e}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new Hre)}get fontXform(){return this._fontXform||(this._fontXform=new zre(t.FONT_OPTIONS))}render(e,r){r=r||this.model,e.openNode("r"),r.font&&this.fontXform.render(e,r.font),this.textXform.render(e,r.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}}};vp.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"};OP.exports=vp});var NP=w((KAe,IP)=>{var Vre=yp(),Gre=Tf(),Zre=oe(),U0=class extends Zre{constructor(){super(),this.map={r:new Gre,t:new Vre}}get tag(){return"rPh"}render(e,r){if(e.openNode(this.tag,{sb:r.sb||0,eb:r.eb||0}),r&&r.hasOwnProperty("richText")&&r.richText){let{r:i}=this.map;r.richText.forEach(n=>{i.render(e,n)})}else r&&this.map.t.render(e,r.text);e.closeNode()}parseOpen(e){let{name:r}=e;return this.parser?(this.parser.parseOpen(e),!0):r===this.tag?(this.model={sb:parseInt(e.attributes.sb,10),eb:parseInt(e.attributes.eb,10)},!0):(this.parser=this.map[r],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 r=this.model.richText;r||(r=this.model.richText=[]),r.push(this.parser.model);break}case"t":this.model.text=this.parser.model;break;default:break}this.parser=void 0}return!0}return e!==this.tag}};IP.exports=U0});var FP=w((QAe,DP)=>{var Yre=yp(),Kre=Tf(),Qre=NP(),Jre=oe(),W0=class extends Jre{constructor(e){super(),this.model=e,this.map={r:new Kre,t:new Yre,rPh:new Qre}}get tag(){return"si"}render(e,r){e.openNode(this.tag),r&&r.hasOwnProperty("richText")&&r.richText?r.richText.length?r.richText.forEach(i=>{this.map.r.render(e,i)}):this.map.t.render(e,""):r!=null&&this.map.t.render(e,r),e.closeNode()}parseOpen(e){let{name:r}=e;return this.parser?(this.parser.parseOpen(e),!0):r===this.tag?(this.model={},!0):(this.parser=this.map[r],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 r=this.model.richText;r||(r=this.model.richText=[]),r.push(this.parser.model);break}case"t":this.model=this.parser.model;break;default:break}this.parser=void 0}return!0}return e!==this.tag}};DP.exports=W0});var z0=w((JAe,MP)=>{var eie=zt(),tie=oe(),rie=FP(),H0=class extends tie{constructor(e){super(),this.model=e||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new rie)}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 r=this.hash[e];return r===void 0&&(r=this.hash[e]=this.model.values.length,this.model.values.push(e)),this.model.count++,r}addRichText(e){let r=this.sharedStringXform.toXml(e),i=this.rich[r];return i===void 0&&(i=this.rich[r]=this.model.values.length,this.model.values.push(e)),this.model.count++,i}render(e,r){r=r||this._values,e.openXml(eie.StdDocAttributes),e.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:r.count,uniqueCount:r.values.length});let i=this.sharedStringXform;r.values.forEach(n=>{i.render(e,n)}),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 Error(`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;if(e==="sst")return!1;throw new Error(`Unexpected xml node in parseClose: ${e}`)}};MP.exports=H0});var qP=w((eOe,PP)=>{var iie=oe(),X0=class extends iie{render(e,r){e.leafNode("Relationship",r)}parseOpen(e){return e.name==="Relationship"?(this.model=e.attributes,!0):!1}parseText(){}parseClose(){return!1}};PP.exports=X0});var wp=w((tOe,LP)=>{var nie=zt(),sie=oe(),aie=qP(),_p=class t extends sie{constructor(){super(),this.map={Relationship:new aie}}render(e,r){r=r||this._values,e.openXml(nie.StdDocAttributes),e.openNode("Relationships",t.RELATIONSHIPS_ATTRIBUTES),r.forEach(i=>{this.map.Relationship.render(e,i)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error(`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.push(this.parser.model),this.parser=void 0),!0;if(e==="Relationships")return!1;throw new Error(`Unexpected xml node in parseClose: ${e}`)}};_p.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"};LP.exports=_p});var V0=w((rOe,BP)=>{var oie=zt(),lie=oe(),bp=class t extends lie{render(e,r){e.openXml(oie.StdDocAttributes),e.openNode("Types",t.PROPERTY_ATTRIBUTES);let i={};(r.media||[]).forEach(s=>{if(s.type==="image"){let a=s.extension;i[a]||(i[a]=!0,e.leafNode("Default",{Extension:a,ContentType:`image/${a}`}))}}),e.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),e.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),e.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),r.worksheets.forEach(s=>{let a=`/xl/worksheets/sheet${s.id}.xml`;e.leafNode("Override",{PartName:a,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),e.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),e.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),r.sharedStrings&&r.sharedStrings.count&&e.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),r.tables&&r.tables.forEach(s=>{e.leafNode("Override",{PartName:`/xl/tables/${s.target}`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),r.drawings&&r.drawings.forEach(s=>{e.leafNode("Override",{PartName:`/xl/drawings/${s.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),r.commentRefs&&(e.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),r.commentRefs.forEach(({commentName:s})=>{e.leafNode("Override",{PartName:`/xl/${s}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),e.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),e.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),e.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}};bp.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"};BP.exports=bp});var $P=w((iOe,jP)=>{var uie=oe(),G0=class extends uie{render(e,r){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,r.length),e.closeNode(),e.closeNode(),e.closeNode()}parseOpen(e){return e.name==="HeadingPairs"}parseText(){}parseClose(e){return e!=="HeadingPairs"}};jP.exports=G0});var WP=w((nOe,UP)=>{var fie=oe(),Z0=class extends fie{render(e,r){e.openNode("TitlesOfParts"),e.openNode("vt:vector",{size:r.length,baseType:"lpstr"}),r.forEach(i=>{e.leafNode("vt:lpstr",void 0,i.name)}),e.closeNode(),e.closeNode()}parseOpen(e){return e.name==="TitlesOfParts"}parseText(){}parseClose(e){return e!=="TitlesOfParts"}};UP.exports=Z0});var Y0=w((sOe,zP)=>{var cie=zt(),hie=oe(),HP=ap(),die=$P(),pie=WP(),Uo=class t extends hie{constructor(){super(),this.map={Company:new HP({tag:"Company"}),Manager:new HP({tag:"Manager"}),HeadingPairs:new die,TitleOfParts:new pie}}render(e,r){e.openXml(cie.StdDocAttributes),e.openNode("Properties",t.PROPERTY_ATTRIBUTES),e.leafNode("Application",void 0,"Microsoft Excel"),e.leafNode("DocSecurity",void 0,"0"),e.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(e,r.worksheets),this.map.TitleOfParts.render(e,r.worksheets),this.map.Company.render(e,r.company||""),this.map.Manager.render(e,r.manager),e.leafNode("LinksUpToDate",void 0,"false"),e.leafNode("SharedDoc",void 0,"false"),e.leafNode("HyperlinksChanged",void 0,"false"),e.leafNode("AppVersion",void 0,"16.0300"),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name==="Properties"?!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){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e==="Properties"?(this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1):!0}};Uo.DateFormat=function(t){return t.toISOString().replace(/[.]\d{3,6}/,"")};Uo.DateAttrs={"xsi:type":"dcterms:W3CDTF"};Uo.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"};zP.exports=Uo});var VP=w((aOe,XP)=>{var gie=oe(),mie=mt(),Q0=class extends gie{render(e,r){e.openNode("definedName",{name:r.name,localSheetId:r.localSheetId}),e.writeText(r.ranges.join(",")),e.closeNode()}parseOpen(e){return e.name==="definedName"?(this._parsedName=e.attributes.name,this._parsedLocalSheetId=e.attributes.localSheetId,this._parsedText=[],!0):!1}parseText(e){this._parsedText.push(e)}parseClose(){return this.model={name:this._parsedName,ranges:yie(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}};function K0(t){try{return mie.decodeEx(t),!0}catch{return!1}}function yie(t){let e=[],r=!1,i="";return t.split(",").forEach(n=>{if(!n)return;let s=(n.match(/'/g)||[]).length;if(!s){r?i+=`${n},`:K0(n)&&e.push(n);return}let a=s%2===0;!r&&a&&K0(n)?e.push(n):r&&!a?(r=!1,K0(i+n)&&e.push(i+n),i=""):(r=!0,i+=`${n},`)}),e}XP.exports=Q0});var ZP=w((oOe,GP)=>{var vie=sr(),_ie=oe(),J0=class extends _ie{render(e,r){e.leafNode("sheet",{sheetId:r.id,name:r.name,state:r.state,"r:id":r.rId})}parseOpen(e){return e.name==="sheet"?(this.model={name:vie.xmlDecode(e.attributes.name),id:parseInt(e.attributes.sheetId,10),state:e.attributes.state,rId:e.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}};GP.exports=J0});var KP=w((lOe,YP)=>{var wie=oe(),eb=class extends wie{render(e,r){let i={xWindow:r.x||0,yWindow:r.y||0,windowWidth:r.width||12e3,windowHeight:r.height||24e3,firstSheet:r.firstSheet,activeTab:r.activeTab};r.visibility&&r.visibility!=="visible"&&(i.visibility=r.visibility),e.leafNode("workbookView",i)}parseOpen(e){if(e.name==="workbookView"){let r=this.model={},i=function(s,a,o){let u=a!==void 0?r[s]=a:o;u!==void 0&&(r[s]=u)},n=function(s,a,o){let u=a!==void 0?r[s]=parseInt(a,10):o;u!==void 0&&(r[s]=u)};return n("x",e.attributes.xWindow,0),n("y",e.attributes.yWindow,0),n("width",e.attributes.windowWidth,25e3),n("height",e.attributes.windowHeight,1e4),i("visibility",e.attributes.visibility,"visible"),n("activeTab",e.attributes.activeTab,void 0),n("firstSheet",e.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}};YP.exports=eb});var JP=w((uOe,QP)=>{var bie=oe(),tb=class extends bie{render(e,r){e.leafNode("workbookPr",{date1904:r.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(e){return e.name==="workbookPr"?(this.model={date1904:e.attributes.date1904==="1"},!0):!1}parseText(){}parseClose(){return!1}};QP.exports=tb});var tq=w((fOe,eq)=>{var xie=oe(),rb=class extends xie{render(e,r){e.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:r.fullCalcOnLoad?1:void 0})}parseOpen(e){return e.name==="calcPr"?(this.model={},!0):!1}parseText(){}parseClose(){return!1}};eq.exports=rb});var xp=w((cOe,rq)=>{var Sie=wt(),Eie=mt(),Tie=zt(),Cie=oe(),kie=jo(),ib=Kn(),Rie=VP(),Aie=ZP(),Oie=KP(),Iie=JP(),Nie=tq(),Cf=class t extends Cie{constructor(){super(),this.map={fileVersion:t.STATIC_XFORMS.fileVersion,workbookPr:new Iie,bookViews:new ib({tag:"bookViews",count:!1,childXform:new Oie}),sheets:new ib({tag:"sheets",count:!1,childXform:new Aie}),definedNames:new ib({tag:"definedNames",count:!1,childXform:new Rie}),calcPr:new Nie}}prepare(e){e.sheets=e.worksheets;let r=[],i=0;e.sheets.forEach(n=>{if(n.pageSetup&&n.pageSetup.printArea&&n.pageSetup.printArea.split("&&").forEach(s=>{let a=s.split(":"),o={name:"_xlnm.Print_Area",ranges:[`'${n.name}'!$${a[0]}:$${a[1]}`],localSheetId:i};r.push(o)}),n.pageSetup&&(n.pageSetup.printTitlesRow||n.pageSetup.printTitlesColumn)){let s=[];if(n.pageSetup.printTitlesColumn){let o=n.pageSetup.printTitlesColumn.split(":");s.push(`'${n.name}'!$${o[0]}:$${o[1]}`)}if(n.pageSetup.printTitlesRow){let o=n.pageSetup.printTitlesRow.split(":");s.push(`'${n.name}'!$${o[0]}:$${o[1]}`)}let a={name:"_xlnm.Print_Titles",ranges:s,localSheetId:i};r.push(a)}i++}),r.length&&(e.definedNames=e.definedNames.concat(r)),(e.media||[]).forEach((n,s)=>{n.name=n.type+(s+1)})}render(e,r){e.openXml(Tie.StdDocAttributes),e.openNode("workbook",t.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(e),this.map.workbookPr.render(e,r.properties),this.map.bookViews.render(e,r.views),this.map.sheets.render(e,r.sheets),this.map.definedNames.render(e,r.definedNames),this.map.calcPr.render(e,r.calcProperties),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name==="workbook"||(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e==="workbook"?(this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1):!0}reconcile(e){let r=(e.workbookRels||[]).reduce((o,u)=>(o[u.Id]=u,o),{}),i=[],n,s=0;(e.sheets||[]).forEach(o=>{let u=r[o.rId];u&&(n=e.worksheetHash[`xl/${u.Target.replace(/^(\s|\/xl\/)+/,"")}`],n&&(n.name=o.name,n.id=o.id,n.state=o.state,i[s++]=n))});let a=[];Sie.each(e.definedNames,o=>{if(o.name==="_xlnm.Print_Area"){if(n=i[o.localSheetId],n){n.pageSetup||(n.pageSetup={});let u=Eie.decodeEx(o.ranges[0]);n.pageSetup.printArea=n.pageSetup.printArea?`${n.pageSetup.printArea}&&${u.dimensions}`:u.dimensions}}else if(o.name==="_xlnm.Print_Titles"){if(n=i[o.localSheetId],n){n.pageSetup||(n.pageSetup={});let u=o.ranges.join(","),f=/\$/g,c=/\$\d+:\$\d+/,h=u.match(c);if(h&&h.length){let g=h[0];n.pageSetup.printTitlesRow=g.replace(f,"")}let d=/\$[A-Z]+:\$[A-Z]+/,p=u.match(d);if(p&&p.length){let g=p[0];n.pageSetup.printTitlesColumn=g.replace(f,"")}}}else a.push(o)}),e.definedNames=a,e.media.forEach((o,u)=>{o.index=u})}};Cf.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"};Cf.STATIC_XFORMS={fileVersion:new kie({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})};rq.exports=Cf});var es=w((hOe,iq)=>{"use strict";iq.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}});var lq=w((dOe,oq)=>{var nq=wt(),Die=Vi(),sq=mt(),aq=ni(),nb=class{constructor(){this.merges={}}add(e){if(this.merges[e.master])this.merges[e.master].expandToAddress(e.address);else{let r=`${e.master}:${e.address}`;this.merges[e.master]=new Die(r)}}get mergeCells(){return nq.map(this.merges,e=>e.range)}reconcile(e,r){nq.each(e,i=>{let n=sq.decode(i);for(let s=n.top;s<=n.bottom;s++){let a=r[s-1];for(let o=n.left;o<=n.right;o++){let u=a.cells[o-1];u?u.type===aq.ValueType.Merge&&(u.master=n.tl):a.cells[o]={type:aq.ValueType.Null,address:sq.encodeAddress(s,o)}}}})}getMasterAddress(e){let r=this.hash[e];return r&&r.tl}};oq.exports=nb});var cq=w((pOe,fq)=>{var ts=sr(),Fie=oe(),Mie=Vi(),_e=ni(),Pie=Tf();function uq(t){if(t==null)return _e.ValueType.Null;if(t instanceof String||typeof t=="string")return _e.ValueType.String;if(typeof t=="number")return _e.ValueType.Number;if(typeof t=="boolean")return _e.ValueType.Boolean;if(t instanceof Date)return _e.ValueType.Date;if(t.text&&t.hyperlink)return _e.ValueType.Hyperlink;if(t.formula)return _e.ValueType.Formula;if(t.error)return _e.ValueType.Error;throw new Error("I could not understand type of value")}function qie(t){return t.type===_e.ValueType.Formula?uq(t.result):t.type}var sb=class extends Fie{constructor(){super(),this.richTextXForm=new Pie}get tag(){return"c"}prepare(e,r){let i=r.styles.addStyleModel(e.style||{},qie(e));switch(i&&(e.styleId=i),e.comment&&r.comments.push({...e.comment,ref:e.address}),e.type){case _e.ValueType.String:case _e.ValueType.RichText:r.sharedStrings&&(e.ssId=r.sharedStrings.add(e.value));break;case _e.ValueType.Date:r.date1904&&(e.date1904=!0);break;case _e.ValueType.Hyperlink:r.sharedStrings&&e.text!==void 0&&e.text!==null&&(e.ssId=r.sharedStrings.add(e.text)),r.hyperlinks.push({address:e.address,target:e.hyperlink,tooltip:e.tooltip});break;case _e.ValueType.Merge:r.merges.add(e);break;case _e.ValueType.Formula:if(r.date1904&&(e.date1904=!0),e.shareType==="shared"&&(e.si=r.siFormulae++),e.formula)r.formulae[e.address]=e;else if(e.sharedFormula){let n=r.formulae[e.sharedFormula];if(!n)throw new Error(`Shared Formula master must exist above and or left of clone for cell ${e.address}`);n.si===void 0?(n.shareType="shared",n.si=r.siFormulae++,n.range=new Mie(n.address,e.address)):n.range&&n.range.expandToAddress(e.address),e.si=n.si}break;default:break}}renderFormula(e,r){let i=null;switch(r.shareType){case"shared":i={t:"shared",ref:r.ref||r.range.range,si:r.si};break;case"array":i={t:"array",ref:r.ref};break;default:r.si!==void 0&&(i={t:"shared",si:r.si});break}switch(uq(r.result)){case _e.ValueType.Null:e.leafNode("f",i,r.formula);break;case _e.ValueType.String:e.addAttribute("t","str"),e.leafNode("f",i,r.formula),e.leafNode("v",null,r.result);break;case _e.ValueType.Number:e.leafNode("f",i,r.formula),e.leafNode("v",null,r.result);break;case _e.ValueType.Boolean:e.addAttribute("t","b"),e.leafNode("f",i,r.formula),e.leafNode("v",null,r.result?1:0);break;case _e.ValueType.Error:e.addAttribute("t","e"),e.leafNode("f",i,r.formula),e.leafNode("v",null,r.result.error);break;case _e.ValueType.Date:e.leafNode("f",i,r.formula),e.leafNode("v",null,ts.dateToExcel(r.result,r.date1904));break;default:throw new Error("I could not understand type of value")}}render(e,r){if(!(r.type===_e.ValueType.Null&&!r.styleId)){switch(e.openNode("c"),e.addAttribute("r",r.address),r.styleId&&e.addAttribute("s",r.styleId),r.type){case _e.ValueType.Null:break;case _e.ValueType.Number:e.leafNode("v",null,r.value);break;case _e.ValueType.Boolean:e.addAttribute("t","b"),e.leafNode("v",null,r.value?"1":"0");break;case _e.ValueType.Error:e.addAttribute("t","e"),e.leafNode("v",null,r.value.error);break;case _e.ValueType.String:case _e.ValueType.RichText:r.ssId!==void 0?(e.addAttribute("t","s"),e.leafNode("v",null,r.ssId)):r.value&&r.value.richText?(e.addAttribute("t","inlineStr"),e.openNode("is"),r.value.richText.forEach(i=>{this.richTextXForm.render(e,i)}),e.closeNode("is")):(e.addAttribute("t","str"),e.leafNode("v",null,r.value));break;case _e.ValueType.Date:e.leafNode("v",null,ts.dateToExcel(r.value,r.date1904));break;case _e.ValueType.Hyperlink:r.ssId!==void 0?(e.addAttribute("t","s"),e.leafNode("v",null,r.ssId)):(e.addAttribute("t","str"),e.leafNode("v",null,r.text));break;case _e.ValueType.Formula:this.renderFormula(e,r);break;case _e.ValueType.Merge: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)),!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:r}=this;if(r.formula||r.shareType)r.type=_e.ValueType.Formula,r.value&&(this.t==="str"?r.result=ts.xmlDecode(r.value):this.t==="b"?r.result=parseInt(r.value,10)!==0:this.t==="e"?r.result={error:r.value}:r.result=parseFloat(r.value),r.value=void 0);else if(r.value!==void 0)switch(this.t){case"s":r.type=_e.ValueType.String,r.value=parseInt(r.value,10);break;case"str":r.type=_e.ValueType.String,r.value=ts.xmlDecode(r.value);break;case"inlineStr":r.type=_e.ValueType.String;break;case"b":r.type=_e.ValueType.Boolean,r.value=parseInt(r.value,10)!==0;break;case"e":r.type=_e.ValueType.Error,r.value={error:r.value};break;default:r.type=_e.ValueType.Number,r.value=parseFloat(r.value);break}else r.styleId?r.type=_e.ValueType.Null:r.type=_e.ValueType.Merge;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,r){let i=e.styleId&&r.styles&&r.styles.getStyleModel(e.styleId);switch(i&&(e.style=i),e.styleId!==void 0&&(e.styleId=void 0),e.type){case _e.ValueType.String:typeof e.value=="number"&&r.sharedStrings&&(e.value=r.sharedStrings.getString(e.value)),e.value.richText&&(e.type=_e.ValueType.RichText);break;case _e.ValueType.Number:i&&ts.isDateFmt(i.numFmt)&&(e.type=_e.ValueType.Date,e.value=ts.excelToDate(e.value,r.date1904));break;case _e.ValueType.Formula:e.result!==void 0&&i&&ts.isDateFmt(i.numFmt)&&(e.result=ts.excelToDate(e.result,r.date1904)),e.shareType==="shared"&&(e.ref?r.formulae[e.si]=e.address:(e.sharedFormula=r.formulae[e.si],delete e.shareType),delete e.si);break;default:break}let n=r.hyperlinkMap[e.address];n&&(e.type===_e.ValueType.Formula?(e.text=e.result,e.result=void 0):(e.text=e.value,e.value=void 0),e.type=_e.ValueType.Hyperlink,e.hyperlink=n);let s=r.commentsMap&&r.commentsMap[e.address];s&&(e.comment=s)}};fq.exports=sb});var lb=w((gOe,hq)=>{var Lie=oe(),ab=sr(),Bie=cq(),ob=class extends Lie{constructor(e){super(),this.maxItems=e&&e.maxItems,this.map={c:new Bie}}get tag(){return"row"}prepare(e,r){let i=r.styles.addStyleModel(e.style);i&&(e.styleId=i);let n=this.map.c;e.cells.forEach(s=>{n.prepare(s,r)})}render(e,r,i){e.openNode("row"),e.addAttribute("r",r.number),r.height&&(e.addAttribute("ht",r.height),e.addAttribute("customHeight","1")),r.hidden&&e.addAttribute("hidden","1"),r.min>0&&r.max>0&&r.min<=r.max&&e.addAttribute("spans",`${r.min}:${r.max}`),r.styleId&&(e.addAttribute("s",r.styleId),e.addAttribute("customFormat","1")),e.addAttribute("x14ac:dyDescent","0.25"),r.outlineLevel&&e.addAttribute("outlineLevel",r.outlineLevel),r.collapsed&&e.addAttribute("collapsed","1");let n=this.map.c;r.cells.forEach(s=>{n.render(e,s,i)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name==="row"){this.numRowsSeen+=1;let r=e.attributes.spans?e.attributes.spans.split(":").map(n=>parseInt(n,10)):[void 0,void 0],i=this.model={number:parseInt(e.attributes.r,10),min:r[0],max:r[1],cells:[]};return e.attributes.s&&(i.styleId=parseInt(e.attributes.s,10)),ab.parseBoolean(e.attributes.hidden)&&(i.hidden=!0),ab.parseBoolean(e.attributes.bestFit)&&(i.bestFit=!0),e.attributes.ht&&(i.height=parseFloat(e.attributes.ht)),e.attributes.outlineLevel&&(i.outlineLevel=parseInt(e.attributes.outlineLevel,10)),ab.parseBoolean(e.attributes.collapsed)&&(i.collapsed=!0),!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)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(e,r){e.style=e.styleId?r.styles.getStyleModel(e.styleId):{},e.styleId!==void 0&&(e.styleId=void 0);let i=this.map.c;e.cells.forEach(n=>{i.reconcile(n,r)})}};hq.exports=ob});var cb=w((mOe,dq)=>{var ub=sr(),jie=oe(),fb=class extends jie{get tag(){return"col"}prepare(e,r){let i=r.styles.addStyleModel(e.style||{});i&&(e.styleId=i)}render(e,r){e.openNode("col"),e.addAttribute("min",r.min),e.addAttribute("max",r.max),r.width&&e.addAttribute("width",r.width),r.styleId&&e.addAttribute("style",r.styleId),r.hidden&&e.addAttribute("hidden","1"),r.bestFit&&e.addAttribute("bestFit","1"),r.outlineLevel&&e.addAttribute("outlineLevel",r.outlineLevel),r.collapsed&&e.addAttribute("collapsed","1"),e.addAttribute("customWidth","1"),e.closeNode()}parseOpen(e){if(e.name==="col"){let r=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&&(r.styleId=parseInt(e.attributes.style,10)),ub.parseBoolean(e.attributes.hidden)&&(r.hidden=!0),ub.parseBoolean(e.attributes.bestFit)&&(r.bestFit=!0),e.attributes.outlineLevel&&(r.outlineLevel=parseInt(e.attributes.outlineLevel,10)),ub.parseBoolean(e.attributes.collapsed)&&(r.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(e,r){e.styleId&&(e.style=r.styles.getStyleModel(e.styleId))}};dq.exports=fb});var gq=w((yOe,pq)=>{var $ie=oe(),hb=class extends $ie{get tag(){return"dimension"}render(e,r){r&&e.leafNode("dimension",{ref:r})}parseOpen(e){return e.name==="dimension"?(this.model=e.attributes.ref,!0):!1}parseText(){}parseClose(){return!1}};pq.exports=hb});var pb=w((vOe,mq)=>{var Uie=oe(),db=class extends Uie{get tag(){return"hyperlink"}render(e,r){this.isInternalLink(r)?e.leafNode("hyperlink",{ref:r.address,"r:id":r.rId,tooltip:r.tooltip,location:r.target}):e.leafNode("hyperlink",{ref:r.address,"r:id":r.rId,tooltip:r.tooltip})}parseOpen(e){return e.name==="hyperlink"?(this.model={address:e.attributes.ref,rId:e.attributes["r:id"],tooltip:e.attributes.tooltip},e.attributes.location&&(this.model.target=e.attributes.location),!0):!1}parseText(){}parseClose(){return!1}isInternalLink(e){return e.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(e.target)}};mq.exports=db});var vq=w((_Oe,yq)=>{var Wie=oe(),gb=class extends Wie{get tag(){return"mergeCell"}render(e,r){e.leafNode("mergeCell",{ref:r})}parseOpen(e){return e.name==="mergeCell"?(this.model=e.attributes.ref,!0):!1}parseText(){}parseClose(){return!1}};yq.exports=gb});var _b=w((wOe,_q)=>{var kf=wt(),yb=sr(),Wo=mt(),Hie=oe(),zie=Vi();function Ho(t,e,r,i){let n=e[r];n!==void 0?t[r]=n:i!==void 0&&(t[r]=i)}function mb(t,e,r,i){let n=e[r];n!==void 0?t[r]=yb.parseBoolean(n):i!==void 0&&(t[r]=i)}function Xie(t){let e=kf.map(t,(n,s)=>({address:s,dataValidation:n,marked:!1})).sort((n,s)=>kf.strcmp(n.address,s.address)),r=kf.keyBy(e,"address"),i=(n,s,a)=>{for(let o=0;o<s;o++){let u=Wo.encodeAddress(n.row+o,a);if(!t[u]||!kf.isEqual(t[n.address],t[u]))return!1}return!0};return e.map(n=>{if(!n.marked){let s=Wo.decodeEx(n.address);if(s.dimensions)return r[s.dimensions].marked=!0,{...n.dataValidation,sqref:n.address};let a=1,o=Wo.encodeAddress(s.row+a,s.col);for(;t[o]&&kf.isEqual(n.dataValidation,t[o]);)a++,o=Wo.encodeAddress(s.row+a,s.col);let u=1;for(;i(s,a,s.col+u);)u++;for(let f=0;f<a;f++)for(let c=0;c<u;c++)o=Wo.encodeAddress(s.row+f,s.col+c),r[o].marked=!0;if(a>1||u>1){let f=s.row+(a-1),c=s.col+(u-1);return{...n.dataValidation,sqref:`${n.address}:${Wo.encodeAddress(f,c)}`}}return{...n.dataValidation,sqref:n.address}}return null}).filter(Boolean)}var vb=class extends Hie{get tag(){return"dataValidations"}render(e,r){let i=Xie(r);i.length&&(e.openNode("dataValidations",{count:i.length}),i.forEach(n=>{e.openNode("dataValidation"),n.type!=="any"&&(e.addAttribute("type",n.type),n.operator&&n.type!=="list"&&n.operator!=="between"&&e.addAttribute("operator",n.operator),n.allowBlank&&e.addAttribute("allowBlank","1")),n.showInputMessage&&e.addAttribute("showInputMessage","1"),n.promptTitle&&e.addAttribute("promptTitle",n.promptTitle),n.prompt&&e.addAttribute("prompt",n.prompt),n.showErrorMessage&&e.addAttribute("showErrorMessage","1"),n.errorStyle&&e.addAttribute("errorStyle",n.errorStyle),n.errorTitle&&e.addAttribute("errorTitle",n.errorTitle),n.error&&e.addAttribute("error",n.error),e.addAttribute("sqref",n.sqref),(n.formulae||[]).forEach((s,a)=>{e.openNode(`formula${a+1}`),n.type==="date"?e.writeText(yb.dateToExcel(new Date(s))):e.writeText(s),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 r={type:e.attributes.type||"any",formulae:[]};switch(e.attributes.type&&mb(r,e.attributes,"allowBlank"),mb(r,e.attributes,"showInputMessage"),mb(r,e.attributes,"showErrorMessage"),r.type){case"any":case"list":case"custom":break;default:Ho(r,e.attributes,"operator","between");break}return Ho(r,e.attributes,"promptTitle"),Ho(r,e.attributes,"prompt"),Ho(r,e.attributes,"errorStyle"),Ho(r,e.attributes,"errorTitle"),Ho(r,e.attributes,"error"),this._dataValidation=r,!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(i=>{i.includes(":")?new zie(i).forEachAddress(s=>{this.model[s]=this._dataValidation}):this.model[i]=this._dataValidation}),!0;case"formula1":case"formula2":{let r=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":r=parseInt(r,10);break;case"decimal":r=parseFloat(r);break;case"date":r=yb.excelToDate(parseFloat(r));break;default:break}return this._dataValidation.formulae.push(r),this._formula=void 0,!0}default:return!0}}};_q.exports=vb});var bq=w((bOe,wq)=>{var Vie=oe(),wb=class extends Vie{get tag(){return"pageSetUpPr"}render(e,r){return r&&r.fitToPage?(e.leafNode(this.tag,{fitToPage:r.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}};wq.exports=wb});var Sq=w((xOe,xq)=>{var Gie=oe(),zo=t=>typeof t<"u",bb=class extends Gie{get tag(){return"outlinePr"}render(e,r){return r&&(zo(r.summaryBelow)||zo(r.summaryRight))?(e.leafNode(this.tag,{summaryBelow:zo(r.summaryBelow)?Number(r.summaryBelow):void 0,summaryRight:zo(r.summaryRight)?Number(r.summaryRight):void 0}),!0):!1}parseOpen(e){return e.name===this.tag?(this.model={summaryBelow:zo(e.attributes.summaryBelow)?!!Number(e.attributes.summaryBelow):void 0,summaryRight:zo(e.attributes.summaryRight)?!!Number(e.attributes.summaryRight):void 0},!0):!1}parseText(){}parseClose(){return!1}};xq.exports=bb});var Sb=w((SOe,Eq)=>{var Zie=oe(),Yie=Qn(),Kie=bq(),Qie=Sq(),xb=class extends Zie{constructor(){super(),this.map={tabColor:new Yie("tabColor"),pageSetUpPr:new Kie,outlinePr:new Qie}}get tag(){return"sheetPr"}render(e,r){if(r){e.addRollback(),e.openNode("sheetPr");let i=!1;i=this.map.tabColor.render(e,r.tabColor)||i,i=this.map.pageSetUpPr.render(e,r.pageSetup)||i,i=this.map.outlinePr.render(e,r.outlineProperties)||i,i?(e.closeNode(),e.commit()):e.rollback()}}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)}};Eq.exports=xb});var Tb=w((EOe,Tq)=>{var Jie=wt(),ene=oe(),Eb=class extends ene{get tag(){return"sheetFormatPr"}render(e,r){if(r){let i={defaultRowHeight:r.defaultRowHeight,outlineLevelRow:r.outlineLevelRow,outlineLevelCol:r.outlineLevelCol,"x14ac:dyDescent":r.dyDescent};r.defaultColWidth&&(i.defaultColWidth=r.defaultColWidth),(!r.defaultRowHeight||r.defaultRowHeight!==15)&&(i.customHeight="1"),Jie.some(i,n=>n!==void 0)&&e.leafNode("sheetFormatPr",i)}}parseOpen(e){return e.name==="sheetFormatPr"?(this.model={defaultRowHeight:parseFloat(e.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(e.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(e.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(e.attributes.outlineLevelCol||"0",10)},e.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(e.attributes.defaultColWidth)),!0):!1}parseText(){}parseClose(){return!1}};Tq.exports=Eb});var kb=w((TOe,Cq)=>{var tne=mt(),rne=oe(),ine={frozen:"frozen",frozenSplit:"frozen",split:"split"},Cb=class extends rne{get tag(){return"sheetView"}prepare(e){switch(e.state){case"frozen":case"split":break;default:e.state="normal";break}}render(e,r){e.openNode("sheetView",{workbookViewId:r.workbookViewId||0});let i=function(u,f,c){c&&e.addAttribute(u,f)};i("rightToLeft","1",r.rightToLeft===!0),i("tabSelected","1",r.tabSelected),i("showRuler","0",r.showRuler===!1),i("showRowColHeaders","0",r.showRowColHeaders===!1),i("showGridLines","0",r.showGridLines===!1),i("zoomScale",r.zoomScale,r.zoomScale),i("zoomScaleNormal",r.zoomScaleNormal,r.zoomScaleNormal),i("view",r.style,r.style);let n,s,a,o;switch(r.state){case"frozen":s=r.xSplit||0,a=r.ySplit||0,n=r.topLeftCell||tne.getAddress(a+1,s+1).address,o=r.xSplit&&r.ySplit&&"bottomRight"||r.xSplit&&"topRight"||"bottomLeft",e.leafNode("pane",{xSplit:r.xSplit||void 0,ySplit:r.ySplit||void 0,topLeftCell:n,activePane:o,state:"frozen"}),e.leafNode("selection",{pane:o,activeCell:r.activeCell,sqref:r.activeCell});break;case"split":r.activePane==="topLeft"&&(r.activePane=void 0),e.leafNode("pane",{xSplit:r.xSplit||void 0,ySplit:r.ySplit||void 0,topLeftCell:r.topLeftCell,activePane:r.activePane}),e.leafNode("selection",{pane:r.activePane,activeCell:r.activeCell,sqref:r.activeCell});break;case"normal":r.activeCell&&e.leafNode("selection",{activeCell:r.activeCell,sqref:r.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 r=e.attributes.pane||"topLeft";return this.selections[r]={pane:r,activeCell:e.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(e){let r,i;return e==="sheetView"?(this.sheetView&&this.pane?(r=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:ine[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"&&(r.activePane=this.pane.activePane),i=this.selections[this.pane.activePane],i&&i.activeCell&&(r.activeCell=i.activeCell),this.sheetView.style&&(r.style=this.sheetView.style)):(r=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},i=this.selections.topLeft,i&&i.activeCell&&(r.activeCell=i.activeCell),this.sheetView.style&&(r.style=this.sheetView.style)),!1):!0}reconcile(){}};Cq.exports=Cb});var Ab=w((COe,kq)=>{var nne=wt(),sne=oe();function xr(t,e){return t?e:void 0}function Kr(t,e){return t===e?!0:void 0}var Rb=class extends sne{get tag(){return"sheetProtection"}render(e,r){if(r){let i={sheet:xr(r.sheet,"1"),selectLockedCells:r.selectLockedCells===!1?"1":void 0,selectUnlockedCells:r.selectUnlockedCells===!1?"1":void 0,formatCells:xr(r.formatCells,"0"),formatColumns:xr(r.formatColumns,"0"),formatRows:xr(r.formatRows,"0"),insertColumns:xr(r.insertColumns,"0"),insertRows:xr(r.insertRows,"0"),insertHyperlinks:xr(r.insertHyperlinks,"0"),deleteColumns:xr(r.deleteColumns,"0"),deleteRows:xr(r.deleteRows,"0"),sort:xr(r.sort,"0"),autoFilter:xr(r.autoFilter,"0"),pivotTables:xr(r.pivotTables,"0")};r.sheet&&(i.algorithmName=r.algorithmName,i.hashValue=r.hashValue,i.saltValue=r.saltValue,i.spinCount=r.spinCount,i.objects=xr(r.objects===!1,"1"),i.scenarios=xr(r.scenarios===!1,"1")),nne.some(i,n=>n!==void 0)&&e.leafNode(this.tag,i)}}parseOpen(e){return e.name===this.tag?(this.model={sheet:Kr(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:Kr(e.attributes.formatCells,"0"),formatColumns:Kr(e.attributes.formatColumns,"0"),formatRows:Kr(e.attributes.formatRows,"0"),insertColumns:Kr(e.attributes.insertColumns,"0"),insertRows:Kr(e.attributes.insertRows,"0"),insertHyperlinks:Kr(e.attributes.insertHyperlinks,"0"),deleteColumns:Kr(e.attributes.deleteColumns,"0"),deleteRows:Kr(e.attributes.deleteRows,"0"),sort:Kr(e.attributes.sort,"0"),autoFilter:Kr(e.attributes.autoFilter,"0"),pivotTables:Kr(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):!1}parseText(){}parseClose(){return!1}};kq.exports=Rb});var Ib=w((kOe,Rq)=>{var ane=wt(),one=oe(),Ob=class extends one{get tag(){return"pageMargins"}render(e,r){if(r){let i={left:r.left,right:r.right,top:r.top,bottom:r.bottom,header:r.header,footer:r.footer};ane.some(i,n=>n!==void 0)&&e.leafNode(this.tag,i)}}parseOpen(e){return e.name===this.tag?(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):!1}parseText(){}parseClose(){return!1}};Rq.exports=Ob});var Db=w((ROe,Aq)=>{var lne=wt(),une=oe();function Sp(t){return t?"1":void 0}function fne(t){if(t==="overThenDown")return t}function cne(t){switch(t){case"atEnd":case"asDisplyed":return t;default:return}}function hne(t){switch(t){case"dash":case"blank":case"NA":return t;default:return}}function dne(t){return t!==void 0?parseInt(t,10):void 0}var Nb=class extends une{get tag(){return"pageSetup"}render(e,r){if(r){let i={paperSize:r.paperSize,orientation:r.orientation,horizontalDpi:r.horizontalDpi,verticalDpi:r.verticalDpi,pageOrder:fne(r.pageOrder),blackAndWhite:Sp(r.blackAndWhite),draft:Sp(r.draft),cellComments:cne(r.cellComments),errors:hne(r.errors),scale:r.scale,fitToWidth:r.fitToWidth,fitToHeight:r.fitToHeight,firstPageNumber:r.firstPageNumber,useFirstPageNumber:Sp(r.firstPageNumber),usePrinterDefaults:Sp(r.usePrinterDefaults),copies:r.copies};lne.some(i,n=>n!==void 0)&&e.leafNode(this.tag,i)}}parseOpen(e){return e.name===this.tag?(this.model={paperSize:dne(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):!1}parseText(){}parseClose(){return!1}};Aq.exports=Nb});var Iq=w((AOe,Oq)=>{var pne=wt(),gne=oe();function Ep(t){return t?"1":void 0}var Fb=class extends gne{get tag(){return"printOptions"}render(e,r){if(r){let i={headings:Ep(r.showRowColHeaders),gridLines:Ep(r.showGridLines),horizontalCentered:Ep(r.horizontalCentered),verticalCentered:Ep(r.verticalCentered)};pne.some(i,n=>n!==void 0)&&e.leafNode(this.tag,i)}}parseOpen(e){return e.name===this.tag?(this.model={showRowColHeaders:e.attributes.headings==="1",showGridLines:e.attributes.gridLines==="1",horizontalCentered:e.attributes.horizontalCentered==="1",verticalCentered:e.attributes.verticalCentered==="1"},!0):!1}parseText(){}parseClose(){return!1}};Oq.exports=Fb});var Pb=w((OOe,Nq)=>{var mne=mt(),yne=oe(),Mb=class extends yne{get tag(){return"autoFilter"}render(e,r){if(r)if(typeof r=="string")e.leafNode("autoFilter",{ref:r});else{let i=function(a){return typeof a=="string"?a:mne.getAddress(a.row,a.column).address},n=i(r.from),s=i(r.to);n&&s&&e.leafNode("autoFilter",{ref:`${n}:${s}`})}}parseOpen(e){e.name==="autoFilter"&&(this.model=e.attributes.ref)}};Nq.exports=Mb});var Lb=w((IOe,Dq)=>{var vne=oe(),qb=class extends vne{get tag(){return"picture"}render(e,r){r&&e.leafNode(this.tag,{"r:id":r.rId})}parseOpen(e){return e.name===this.tag?(this.model={rId:e.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}};Dq.exports=qb});var Mq=w((NOe,Fq)=>{var _ne=oe(),Bb=class extends _ne{get tag(){return"drawing"}render(e,r){r&&e.leafNode(this.tag,{"r:id":r.rId})}parseOpen(e){return e.name===this.tag?(this.model={rId:e.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}};Fq.exports=Bb});var qq=w((DOe,Pq)=>{var wne=oe(),jb=class extends wne{get tag(){return"tablePart"}render(e,r){r&&e.leafNode(this.tag,{"r:id":r.rId})}parseOpen(e){return e.name===this.tag?(this.model={rId:e.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}};Pq.exports=jb});var Bq=w((FOe,Lq)=>{var bne=oe(),$b=class extends bne{get tag(){return"brk"}render(e,r){e.leafNode("brk",r)}parseOpen(e){return e.name==="brk"?(this.model=e.attributes.ref,!0):!1}parseText(){}parseClose(){return!1}};Lq.exports=$b});var Wb=w((MOe,jq)=>{"use strict";var xne=Bq(),Sne=Kn(),Ub=class extends Sne{constructor(){let e={tag:"rowBreaks",count:!0,childXform:new xne};super(e)}render(e,r){if(r&&r.length){e.openNode(this.tag,this.$),this.count&&(e.addAttribute(this.$count,r.length),e.addAttribute("manualBreakCount",r.length));let{childXform:i}=this;r.forEach(n=>{i.render(e,n)}),e.closeNode()}else this.empty&&e.leafNode(this.tag)}};jq.exports=Ub});var zb=w((POe,$q)=>{var Ene=oe(),Hb=class extends Ene{get tag(){return"headerFooter"}render(e,r){if(r){e.addRollback();let i=!1;e.openNode("headerFooter"),r.differentFirst&&(e.addAttribute("differentFirst","1"),i=!0),r.differentOddEven&&(e.addAttribute("differentOddEven","1"),i=!0),r.oddHeader&&typeof r.oddHeader=="string"&&(e.leafNode("oddHeader",null,r.oddHeader),i=!0),r.oddFooter&&typeof r.oddFooter=="string"&&(e.leafNode("oddFooter",null,r.oddFooter),i=!0),r.evenHeader&&typeof r.evenHeader=="string"&&(e.leafNode("evenHeader",null,r.evenHeader),i=!0),r.evenFooter&&typeof r.evenFooter=="string"&&(e.leafNode("evenFooter",null,r.evenFooter),i=!0),r.firstHeader&&typeof r.firstHeader=="string"&&(e.leafNode("firstHeader",null,r.firstHeader),i=!0),r.firstFooter&&typeof r.firstFooter=="string"&&(e.leafNode("firstFooter",null,r.firstFooter),i=!0),i?(e.closeNode(),e.commit()):e.rollback()}}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=e;break;case"oddFooter":this.model.oddFooter=e;break;case"evenHeader":this.model.evenHeader=e;break;case"evenFooter":this.model.evenFooter=e;break;case"firstHeader":this.model.firstHeader=e;break;case"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}}};$q.exports=Hb});var Sr=w((qOe,Uq)=>{var Tne=oe(),Xb=class extends Tne{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,r){this.model[e]=r.model}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.onParserClose(e,this.parser),this.parser=void 0),!0):e!==this.tag}};Uq.exports=Xb});var Tp=w((LOe,Hq)=>{var Wq=oe(),Vb=class extends Wq{get tag(){return"cfvo"}render(e,r){e.leafNode(this.tag,{type:r.type,val:r.value})}parseOpen(e){this.model={type:e.attributes.type,value:Wq.toFloatValue(e.attributes.val)}}parseClose(e){return e!==this.tag}};Hq.exports=Vb});var Xq=w((BOe,zq)=>{var Cne=Sr(),kne=Qn(),Rne=Tp(),Gb=class extends Cne{constructor(){super(),this.map={cfvo:this.cfvoXform=new Rne,color:this.colorXform=new kne}}get tag(){return"dataBar"}render(e,r){e.openNode(this.tag),r.cfvo.forEach(i=>{this.cfvoXform.render(e,i)}),this.colorXform.render(e,r.color),e.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(e,r){switch(e){case"cfvo":this.model.cfvo.push(r.model);break;case"color":this.model.color=r.model;break}}};zq.exports=Gb});var Zq=w((jOe,Gq)=>{var Ane=oe(),Vq=Sr(),Zb=class extends Ane{get tag(){return"x14:id"}render(e,r){e.leafNode(this.tag,null,r)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}},Yb=class extends Vq{constructor(){super(),this.map={"x14:id":this.idXform=new Zb}}get tag(){return"ext"}render(e,r){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,r.x14Id),e.closeNode()}createNewModel(){return{}}onParserClose(e,r){this.model.x14Id=r.model}},Kb=class extends Vq{constructor(){super(),this.map={ext:new Yb}}get tag(){return"extLst"}render(e,r){e.openNode(this.tag),this.map.ext.render(e,r),e.closeNode()}createNewModel(){return{}}onParserClose(e,r){Object.assign(this.model,r.model)}};Gq.exports=Kb});var Kq=w(($Oe,Yq)=>{var One=oe(),Qb=class extends One{get tag(){return"formula"}render(e,r){e.leafNode(this.tag,null,r)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}};Yq.exports=Qb});var Jq=w((UOe,Qq)=>{var Ine=Sr(),Nne=Qn(),Dne=Tp(),Jb=class extends Ine{constructor(){super(),this.map={cfvo:this.cfvoXform=new Dne,color:this.colorXform=new Nne}}get tag(){return"colorScale"}render(e,r){e.openNode(this.tag),r.cfvo.forEach(i=>{this.cfvoXform.render(e,i)}),r.color.forEach(i=>{this.colorXform.render(e,i)}),e.closeNode()}createNewModel(e){return{cfvo:[],color:[]}}onParserClose(e,r){this.model[e].push(r.model)}};Qq.exports=Jb});var tL=w((WOe,eL)=>{var Xo=oe(),Fne=Sr(),Mne=Tp(),ex=class extends Fne{constructor(){super(),this.map={cfvo:this.cfvoXform=new Mne}}get tag(){return"iconSet"}render(e,r){e.openNode(this.tag,{iconSet:Xo.toStringAttribute(r.iconSet,"3TrafficLights"),reverse:Xo.toBoolAttribute(r.reverse,!1),showValue:Xo.toBoolAttribute(r.showValue,!0)}),r.cfvo.forEach(i=>{this.cfvoXform.render(e,i)}),e.closeNode()}createNewModel({attributes:e}){return{iconSet:Xo.toStringValue(e.iconSet,"3TrafficLights"),reverse:Xo.toBoolValue(e.reverse),showValue:Xo.toBoolValue(e.showValue),cfvo:[]}}onParserClose(e,r){this.model[e].push(r.model)}};eL.exports=ex});var nL=w((HOe,iL)=>{var hi=oe(),Pne=Sr(),rL=Vi(),qne=Xq(),Lne=Zq(),Bne=Kq(),jne=Jq(),$ne=tL(),Une={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},Wne=t=>{if(t.formulae&&t.formulae[0])return t.formulae[0];let e=new rL(t.ref),{tl:r}=e;switch(t.operator){case"containsText":return`NOT(ISERROR(SEARCH("${t.text}",${r})))`;case"containsBlanks":return`LEN(TRIM(${r}))=0`;case"notContainsBlanks":return`LEN(TRIM(${r}))>0`;case"containsErrors":return`ISERROR(${r})`;case"notContainsErrors":return`NOT(ISERROR(${r}))`;default:return}},Hne=t=>{if(t.formulae&&t.formulae[0])return t.formulae[0];let e=new rL(t.ref),{tl:r}=e;switch(t.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${r},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${r},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${r},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${r},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${r},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${r},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${r},1)=TODAY()-1`;case"today":return`FLOOR(${r},1)=TODAY()`;case"tomorrow":return`FLOOR(${r},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${r},1)<=6,FLOOR(${r},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${r})=MONTH(EDATE(TODAY(),0-1)),YEAR(${r})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${r})=MONTH(TODAY()),YEAR(${r})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${r})=MONTH(EDATE(TODAY(),0+1)),YEAR(${r})=YEAR(EDATE(TODAY(),0+1)))`;default:return}},zne=t=>{let{type:e,operator:r}=t;switch(e){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:e};default:return{type:e,operator:r}}},tx=class t extends Pne{constructor(){super(),this.map={dataBar:this.databarXform=new qne,extLst:this.extLstRefXform=new Lne,formula:this.formulaXform=new Bne,colorScale:this.colorScaleXform=new jne,iconSet:this.iconSetXform=new $ne}}get tag(){return"cfRule"}static isPrimitive(e){return!(e.type==="iconSet"&&(e.custom||Une[e.iconSet]))}render(e,r){switch(r.type){case"expression":this.renderExpression(e,r);break;case"cellIs":this.renderCellIs(e,r);break;case"top10":this.renderTop10(e,r);break;case"aboveAverage":this.renderAboveAverage(e,r);break;case"dataBar":this.renderDataBar(e,r);break;case"colorScale":this.renderColorScale(e,r);break;case"iconSet":this.renderIconSet(e,r);break;case"containsText":this.renderText(e,r);break;case"timePeriod":this.renderTimePeriod(e,r);break}}renderExpression(e,r){e.openNode(this.tag,{type:"expression",dxfId:r.dxfId,priority:r.priority}),this.formulaXform.render(e,r.formulae[0]),e.closeNode()}renderCellIs(e,r){e.openNode(this.tag,{type:"cellIs",dxfId:r.dxfId,priority:r.priority,operator:r.operator}),r.formulae.forEach(i=>{this.formulaXform.render(e,i)}),e.closeNode()}renderTop10(e,r){e.leafNode(this.tag,{type:"top10",dxfId:r.dxfId,priority:r.priority,percent:hi.toBoolAttribute(r.percent,!1),bottom:hi.toBoolAttribute(r.bottom,!1),rank:hi.toIntValue(r.rank,10,!0)})}renderAboveAverage(e,r){e.leafNode(this.tag,{type:"aboveAverage",dxfId:r.dxfId,priority:r.priority,aboveAverage:hi.toBoolAttribute(r.aboveAverage,!0)})}renderDataBar(e,r){e.openNode(this.tag,{type:"dataBar",priority:r.priority}),this.databarXform.render(e,r),this.extLstRefXform.render(e,r),e.closeNode()}renderColorScale(e,r){e.openNode(this.tag,{type:"colorScale",priority:r.priority}),this.colorScaleXform.render(e,r),e.closeNode()}renderIconSet(e,r){t.isPrimitive(r)&&(e.openNode(this.tag,{type:"iconSet",priority:r.priority}),this.iconSetXform.render(e,r),e.closeNode())}renderText(e,r){e.openNode(this.tag,{type:r.operator,dxfId:r.dxfId,priority:r.priority,operator:hi.toStringAttribute(r.operator,"containsText")});let i=Wne(r);i&&this.formulaXform.render(e,i),e.closeNode()}renderTimePeriod(e,r){e.openNode(this.tag,{type:"timePeriod",dxfId:r.dxfId,priority:r.priority,timePeriod:r.timePeriod});let i=Hne(r);i&&this.formulaXform.render(e,i),e.closeNode()}createNewModel({attributes:e}){return{...zne(e),dxfId:hi.toIntValue(e.dxfId),priority:hi.toIntValue(e.priority),timePeriod:e.timePeriod,percent:hi.toBoolValue(e.percent),bottom:hi.toBoolValue(e.bottom),rank:hi.toIntValue(e.rank),aboveAverage:hi.toBoolValue(e.aboveAverage)}}onParserClose(e,r){switch(e){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,r.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(r.model);break}}};iL.exports=tx});var aL=w((zOe,sL)=>{var Xne=Sr(),rx=nL(),ix=class extends Xne{constructor(){super(),this.map={cfRule:new rx}}get tag(){return"conditionalFormatting"}render(e,r){r.rules.some(rx.isPrimitive)&&(e.openNode(this.tag,{sqref:r.ref}),r.rules.forEach(i=>{rx.isPrimitive(i)&&(i.ref=r.ref,this.map.cfRule.render(e,i))}),e.closeNode())}createNewModel({attributes:e}){return{ref:e.sqref,rules:[]}}onParserClose(e,r){this.model.rules.push(r.model)}};sL.exports=ix});var sx=w((XOe,oL)=>{var Vne=oe(),Gne=aL(),nx=class extends Vne{constructor(){super(),this.cfXform=new Gne}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(e,r){let i=e.reduce((n,s)=>Math.max(n,...s.rules.map(a=>a.priority||0)),1);e.forEach(n=>{n.rules.forEach(s=>{s.priority||(s.priority=i++),s.style&&(s.dxfId=r.styles.addDxfStyle(s.style))})})}render(e,r){r.forEach(i=>{this.cfXform.render(e,i)})}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name==="conditionalFormatting"?(this.parser=this.cfXform,this.parser.parseOpen(e),!0):!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,r){e.forEach(i=>{i.rules.forEach(n=>{n.dxfId!==void 0&&(n.style=r.styles.getDxfStyle(n.dxfId),delete n.dxfId)})})}};oL.exports=nx});import Zne from"crypto";function Rf(){return Cp>kp.length-16&&(Zne.randomFillSync(kp),Cp=0),kp.slice(Cp,Cp+=16)}var kp,Cp,ax=fr(()=>{kp=new Uint8Array(256),Cp=kp.length});var lL,uL=fr(()=>{lL=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function Yne(t){return typeof t=="string"&&lL.test(t)}var rs,Af=fr(()=>{uL();rs=Yne});function Kne(t,e=0){let r=(Vt[t[e+0]]+Vt[t[e+1]]+Vt[t[e+2]]+Vt[t[e+3]]+"-"+Vt[t[e+4]]+Vt[t[e+5]]+"-"+Vt[t[e+6]]+Vt[t[e+7]]+"-"+Vt[t[e+8]]+Vt[t[e+9]]+"-"+Vt[t[e+10]]+Vt[t[e+11]]+Vt[t[e+12]]+Vt[t[e+13]]+Vt[t[e+14]]+Vt[t[e+15]]).toLowerCase();if(!rs(r))throw TypeError("Stringified UUID is invalid");return r}var Vt,is,Of=fr(()=>{Af();Vt=[];for(let t=0;t<256;++t)Vt.push((t+256).toString(16).substr(1));is=Kne});function Qne(t,e,r){let i=e&&r||0,n=e||new Array(16);t=t||{};let s=t.node||fL,a=t.clockseq!==void 0?t.clockseq:ox;if(s==null||a==null){let d=t.random||(t.rng||Rf)();s==null&&(s=fL=[d[0]|1,d[1],d[2],d[3],d[4],d[5]]),a==null&&(a=ox=(d[6]<<8|d[7])&16383)}let o=t.msecs!==void 0?t.msecs:Date.now(),u=t.nsecs!==void 0?t.nsecs:ux+1,f=o-lx+(u-ux)/1e4;if(f<0&&t.clockseq===void 0&&(a=a+1&16383),(f<0||o>lx)&&t.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");lx=o,ux=u,ox=a,o+=122192928e5;let c=((o&268435455)*1e4+u)%4294967296;n[i++]=c>>>24&255,n[i++]=c>>>16&255,n[i++]=c>>>8&255,n[i++]=c&255;let h=o/4294967296*1e4&268435455;n[i++]=h>>>8&255,n[i++]=h&255,n[i++]=h>>>24&15|16,n[i++]=h>>>16&255,n[i++]=a>>>8|128,n[i++]=a&255;for(let d=0;d<6;++d)n[i+d]=s[d];return e||is(n)}var fL,ox,lx,ux,cL,hL=fr(()=>{ax();Of();lx=0,ux=0;cL=Qne});function Jne(t){if(!rs(t))throw TypeError("Invalid UUID");let e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var Rp,fx=fr(()=>{Af();Rp=Jne});function ese(t){t=unescape(encodeURIComponent(t));let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}function Ap(t,e,r){function i(n,s,a,o){if(typeof n=="string"&&(n=ese(n)),typeof s=="string"&&(s=Rp(s)),s.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+n.length);if(u.set(s),u.set(n,s.length),u=r(u),u[6]=u[6]&15|e,u[8]=u[8]&63|128,a){o=o||0;for(let f=0;f<16;++f)a[o+f]=u[f];return a}return is(u)}try{i.name=t}catch{}return i.DNS=tse,i.URL=rse,i}var tse,rse,cx=fr(()=>{Of();fx();tse="6ba7b810-9dad-11d1-80b4-00c04fd430c8",rse="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});import ise from"crypto";function nse(t){return Array.isArray(t)?t=Buffer.from(t):typeof t=="string"&&(t=Buffer.from(t,"utf8")),ise.createHash("md5").update(t).digest()}var dL,pL=fr(()=>{dL=nse});var sse,gL,mL=fr(()=>{cx();pL();sse=Ap("v3",48,dL),gL=sse});function ase(t,e,r){t=t||{};let i=t.random||(t.rng||Rf)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){r=r||0;for(let n=0;n<16;++n)e[r+n]=i[n];return e}return is(i)}var yL,vL=fr(()=>{ax();Of();yL=ase});import ose from"crypto";function lse(t){return Array.isArray(t)?t=Buffer.from(t):typeof t=="string"&&(t=Buffer.from(t,"utf8")),ose.createHash("sha1").update(t).digest()}var _L,wL=fr(()=>{_L=lse});var use,bL,xL=fr(()=>{cx();wL();use=Ap("v5",80,_L),bL=use});var SL,EL=fr(()=>{SL="00000000-0000-0000-0000-000000000000"});function fse(t){if(!rs(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}var TL,CL=fr(()=>{Af();TL=fse});var kL={};V7(kL,{NIL:()=>SL,parse:()=>Rp,stringify:()=>is,v1:()=>cL,v3:()=>gL,v4:()=>yL,v5:()=>bL,validate:()=>rs,version:()=>TL});var RL=fr(()=>{hL();mL();vL();xL();EL();CL();Af();Of();fx()});var OL=w((DIe,AL)=>{var cse=oe(),hx=class extends cse{get tag(){return"xm:f"}render(e,r){e.leafNode(this.tag,null,r)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}};AL.exports=hx});var px=w((FIe,IL)=>{var hse=Sr(),dse=OL(),dx=class extends hse{constructor(){super(),this.map={"xm:f":this.fExtXform=new dse}}get tag(){return"x14:cfvo"}render(e,r){e.openNode(this.tag,{type:r.type}),r.value!==void 0&&this.fExtXform.render(e,r.value),e.closeNode()}createNewModel(e){return{type:e.attributes.type}}onParserClose(e,r){e==="xm:f"&&(this.model.value=r.model?parseFloat(r.model):0)}};IL.exports=dx});var DL=w((MIe,NL)=>{var ar=oe(),pse=Sr(),Op=Qn(),gse=px(),gx=class extends pse{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new gse,"x14:borderColor":this.borderColorXform=new Op("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new Op("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new Op("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new Op("x14:axisColor")}}static isExt(e){return!e.gradient}get tag(){return"x14:dataBar"}render(e,r){e.openNode(this.tag,{minLength:ar.toIntAttribute(r.minLength,0,!0),maxLength:ar.toIntAttribute(r.maxLength,100,!0),border:ar.toBoolAttribute(r.border,!1),gradient:ar.toBoolAttribute(r.gradient,!0),negativeBarColorSameAsPositive:ar.toBoolAttribute(r.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:ar.toBoolAttribute(r.negativeBarBorderColorSameAsPositive,!0),axisPosition:ar.toAttribute(r.axisPosition,"auto"),direction:ar.toAttribute(r.direction,"leftToRight")}),r.cfvo.forEach(i=>{this.cfvoXform.render(e,i)}),this.borderColorXform.render(e,r.borderColor),this.negativeBorderColorXform.render(e,r.negativeBorderColor),this.negativeFillColorXform.render(e,r.negativeFillColor),this.axisColorXform.render(e,r.axisColor),e.closeNode()}createNewModel({attributes:e}){return{cfvo:[],minLength:ar.toIntValue(e.minLength,0),maxLength:ar.toIntValue(e.maxLength,100),border:ar.toBoolValue(e.border,!1),gradient:ar.toBoolValue(e.gradient,!0),negativeBarColorSameAsPositive:ar.toBoolValue(e.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:ar.toBoolValue(e.negativeBarBorderColorSameAsPositive,!0),axisPosition:ar.toStringValue(e.axisPosition,"auto"),direction:ar.toStringValue(e.direction,"leftToRight")}}onParserClose(e,r){let[,i]=e.split(":");i==="cfvo"?this.model.cfvo.push(r.model):this.model[i]=r.model}};NL.exports=gx});var PL=w((PIe,ML)=>{var FL=oe(),mx=class extends FL{get tag(){return"x14:cfIcon"}render(e,r){e.leafNode(this.tag,{iconSet:r.iconSet,iconId:r.iconId})}parseOpen({attributes:e}){this.model={iconSet:e.iconSet,iconId:FL.toIntValue(e.iconId)}}parseClose(e){return e!==this.tag}};ML.exports=mx});var LL=w((qIe,qL)=>{var ca=oe(),mse=Sr(),yse=px(),vse=PL(),yx=class extends mse{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new yse,"x14:cfIcon":this.cfIconXform=new vse}}get tag(){return"x14:iconSet"}render(e,r){e.openNode(this.tag,{iconSet:ca.toStringAttribute(r.iconSet),reverse:ca.toBoolAttribute(r.reverse,!1),showValue:ca.toBoolAttribute(r.showValue,!0),custom:ca.toBoolAttribute(r.icons,!1)}),r.cfvo.forEach(i=>{this.cfvoXform.render(e,i)}),r.icons&&r.icons.forEach((i,n)=>{i.iconId=n,this.cfIconXform.render(e,i)}),e.closeNode()}createNewModel({attributes:e}){return{cfvo:[],iconSet:ca.toStringValue(e.iconSet,"3TrafficLights"),reverse:ca.toBoolValue(e.reverse,!1),showValue:ca.toBoolValue(e.showValue,!0)}}onParserClose(e,r){let[,i]=e.split(":");switch(i){case"cfvo":this.model.cfvo.push(r.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(r.model);break;default:this.model[i]=r.model;break}}};qL.exports=yx});var _x=w((LIe,$L)=>{var{v4:BL}=(RL(),Z7(kL)),_se=oe(),wse=Sr(),jL=DL(),bse=LL(),xse={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},vx=class t extends wse{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new jL,"x14:iconSet":this.iconSetXform=new bse}}get tag(){return"x14:cfRule"}static isExt(e){return e.type==="dataBar"?jL.isExt(e):!!(e.type==="iconSet"&&(e.custom||xse[e.iconSet]))}prepare(e){t.isExt(e)&&(e.x14Id=`{${BL()}}`.toUpperCase())}render(e,r){if(t.isExt(r))switch(r.type){case"dataBar":this.renderDataBar(e,r);break;case"iconSet":this.renderIconSet(e,r);break}}renderDataBar(e,r){e.openNode(this.tag,{type:"dataBar",id:r.x14Id}),this.databarXform.render(e,r),e.closeNode()}renderIconSet(e,r){e.openNode(this.tag,{type:"iconSet",priority:r.priority,id:r.x14Id||`{${BL()}}`}),this.iconSetXform.render(e,r),e.closeNode()}createNewModel({attributes:e}){return{type:e.type,x14Id:e.id,priority:_se.toIntValue(e.priority)}}onParserClose(e,r){Object.assign(this.model,r.model)}};$L.exports=vx});var WL=w((BIe,UL)=>{var Sse=oe(),wx=class extends Sse{get tag(){return"xm:sqref"}render(e,r){e.leafNode(this.tag,null,r)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}};UL.exports=wx});var zL=w((jIe,HL)=>{var Ese=Sr(),Tse=WL(),bx=_x(),xx=class extends Ese{constructor(){super(),this.map={"xm:sqref":this.sqRef=new Tse,"x14:cfRule":this.cfRule=new bx}}get tag(){return"x14:conditionalFormatting"}prepare(e,r){e.rules.forEach(i=>{this.cfRule.prepare(i,r)})}render(e,r){r.rules.some(bx.isExt)&&(e.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),r.rules.filter(bx.isExt).forEach(i=>this.cfRule.render(e,i)),this.sqRef.render(e,r.ref),e.closeNode())}createNewModel(){return{rules:[]}}onParserClose(e,r){switch(e){case"xm:sqref":this.model.ref=r.model;break;case"x14:cfRule":this.model.rules.push(r.model);break}}};HL.exports=xx});var VL=w(($Ie,XL)=>{var Cse=Sr(),kse=_x(),Rse=zL(),Sx=class extends Cse{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new Rse}}get tag(){return"x14:conditionalFormattings"}hasContent(e){return e.hasExtContent===void 0&&(e.hasExtContent=e.some(r=>r.rules.some(kse.isExt))),e.hasExtContent}prepare(e,r){e.forEach(i=>{this.cfXform.prepare(i,r)})}render(e,r){this.hasContent(r)&&(e.openNode(this.tag),r.forEach(i=>this.cfXform.render(e,i)),e.closeNode())}createNewModel(){return[]}onParserClose(e,r){this.model.push(r.model)}};XL.exports=Sx});var YL=w((UIe,ZL)=>{var GL=Sr(),Ase=VL(),Ex=class extends GL{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new Ase}}get tag(){return"ext"}hasContent(e){return this.conditionalFormattings.hasContent(e.conditionalFormattings)}prepare(e,r){this.conditionalFormattings.prepare(e.conditionalFormattings,r)}render(e,r){e.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(e,r.conditionalFormattings),e.closeNode()}createNewModel(){return{}}onParserClose(e,r){this.model[e]=r.model}},Tx=class extends GL{constructor(){super(),this.map={ext:this.ext=new Ex}}get tag(){return"extLst"}prepare(e,r){this.ext.prepare(e,r)}hasContent(e){return this.ext.hasContent(e)}render(e,r){this.hasContent(r)&&(e.openNode("extLst"),this.ext.render(e,r),e.closeNode())}createNewModel(){return{}}onParserClose(e,r){Object.assign(this.model,r.model)}};ZL.exports=Tx});var QL=w((WIe,KL)=>{var Ose=wt(),Ise=mt(),Nse=zt(),an=es(),Dse=lq(),Fse=oe(),Vo=Kn(),Mse=lb(),Pse=cb(),qse=gq(),Lse=pb(),Bse=vq(),jse=_b(),$se=Sb(),Use=Tb(),Wse=kb(),Hse=Ab(),zse=Ib(),Xse=Db(),Vse=Iq(),Gse=Pb(),Zse=Lb(),Yse=Mq(),Kse=qq(),Qse=Wb(),Jse=zb(),eae=sx(),tae=YL(),rae=(t,e)=>{Object.keys(e).forEach(r=>{let i=t[r],n=e[r];i===void 0&&n!==void 0&&(t[r]=n)})},iae=(t,e)=>{if(!e||!e.length)return t;if(!t||!t.length)return e;let r={},i={};return t.forEach(n=>{r[n.ref]=n,n.rules.forEach(s=>{let{x14Id:a}=s;a&&(i[a]=s)})}),e.forEach(n=>{n.rules.forEach(s=>{let a=i[s.x14Id];a?rae(a,s):r[n.ref]?r[n.ref].rules.push(s):t.push({ref:n.ref,rules:[s]})})}),t},Ip=class t extends Fse{constructor(e){super();let{maxRows:r,maxCols:i,ignoreNodes:n}=e||{};this.ignoreNodes=n||[],this.map={sheetPr:new $se,dimension:new qse,sheetViews:new Vo({tag:"sheetViews",count:!1,childXform:new Wse}),sheetFormatPr:new Use,cols:new Vo({tag:"cols",count:!1,childXform:new Pse}),sheetData:new Vo({tag:"sheetData",count:!1,empty:!0,childXform:new Mse({maxItems:i}),maxItems:r}),autoFilter:new Gse,mergeCells:new Vo({tag:"mergeCells",count:!0,childXform:new Bse}),rowBreaks:new Qse,hyperlinks:new Vo({tag:"hyperlinks",count:!1,childXform:new Lse}),pageMargins:new zse,dataValidations:new jse,pageSetup:new Xse,headerFooter:new Jse,printOptions:new Vse,picture:new Zse,drawing:new Yse,sheetProtection:new Hse,tableParts:new Vo({tag:"tableParts",count:!0,childXform:new Kse}),conditionalFormatting:new eae,extLst:new tae}}prepare(e,r){r.merges=new Dse,e.hyperlinks=r.hyperlinks=[],e.comments=r.comments=[],r.formulae={},r.siFormulae=0,this.map.cols.prepare(e.cols,r),this.map.sheetData.prepare(e.rows,r),this.map.conditionalFormatting.prepare(e.conditionalFormattings,r),e.mergeCells=r.merges.mergeCells;let i=e.rels=[];function n(o){return`rId${o.length+1}`}if(e.hyperlinks.forEach(o=>{let u=n(i);o.rId=u,i.push({Id:u,Type:an.Hyperlink,Target:o.target,TargetMode:"External"})}),e.comments.length>0){let o={Id:n(i),Type:an.Comments,Target:`../comments${e.id}.xml`};i.push(o);let u={Id:n(i),Type:an.VmlDrawing,Target:`../drawings/vmlDrawing${e.id}.vml`};i.push(u),e.comments.forEach(f=>{f.refAddress=Ise.decodeAddress(f.ref)}),r.commentRefs.push({commentName:`comments${e.id}`,vmlDrawing:`vmlDrawing${e.id}`})}let s=[],a;e.media.forEach(o=>{if(o.type==="background"){let u=n(i);a=r.media[o.imageId],i.push({Id:u,Type:an.Image,Target:`../media/${a.name}.${a.extension}`}),e.background={rId:u},e.image=r.media[o.imageId]}else if(o.type==="image"){let{drawing:u}=e;a=r.media[o.imageId],u||(u=e.drawing={rId:n(i),name:`drawing${++r.drawingsCount}`,anchors:[],rels:[]},r.drawings.push(u),i.push({Id:u.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${u.name}.xml`}));let f=this.preImageId===o.imageId?s[o.imageId]:s[u.rels.length];f||(f=n(u.rels),s[u.rels.length]=f,u.rels.push({Id:f,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${a.name}.${a.extension}`}));let c={picture:{rId:f},range:o.range};if(o.hyperlinks&&o.hyperlinks.hyperlink){let h=n(u.rels);s[u.rels.length]=h,c.picture.hyperlinks={tooltip:o.hyperlinks.tooltip,rId:h},u.rels.push({Id:h,Type:an.Hyperlink,Target:o.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=o.imageId,u.anchors.push(c)}}),e.tables.forEach(o=>{let u=n(i);o.rId=u,i.push({Id:u,Type:an.Table,Target:`../tables/${o.target}`}),o.columns.forEach(f=>{let{style:c}=f;c&&(f.dxfId=r.styles.addDxfStyle(c))})}),this.map.extLst.prepare(e,r)}render(e,r){e.openXml(Nse.StdDocAttributes),e.openNode("worksheet",t.WORKSHEET_ATTRIBUTES);let i=r.properties?{defaultRowHeight:r.properties.defaultRowHeight,dyDescent:r.properties.dyDescent,outlineLevelCol:r.properties.outlineLevelCol,outlineLevelRow:r.properties.outlineLevelRow}:void 0;r.properties&&r.properties.defaultColWidth&&(i.defaultColWidth=r.properties.defaultColWidth);let n={outlineProperties:r.properties&&r.properties.outlineProperties,tabColor:r.properties&&r.properties.tabColor,pageSetup:r.pageSetup&&r.pageSetup.fitToPage?{fitToPage:r.pageSetup.fitToPage}:void 0},s=r.pageSetup&&r.pageSetup.margins,a={showRowColHeaders:r.pageSetup&&r.pageSetup.showRowColHeaders,showGridLines:r.pageSetup&&r.pageSetup.showGridLines,horizontalCentered:r.pageSetup&&r.pageSetup.horizontalCentered,verticalCentered:r.pageSetup&&r.pageSetup.verticalCentered},o=r.sheetProtection;this.map.sheetPr.render(e,n),this.map.dimension.render(e,r.dimensions),this.map.sheetViews.render(e,r.views),this.map.sheetFormatPr.render(e,i),this.map.cols.render(e,r.cols),this.map.sheetData.render(e,r.rows),this.map.sheetProtection.render(e,o),this.map.autoFilter.render(e,r.autoFilter),this.map.mergeCells.render(e,r.mergeCells),this.map.conditionalFormatting.render(e,r.conditionalFormattings),this.map.dataValidations.render(e,r.dataValidations),this.map.hyperlinks.render(e,r.hyperlinks),this.map.printOptions.render(e,a),this.map.pageMargins.render(e,s),this.map.pageSetup.render(e,r.pageSetup),this.map.headerFooter.render(e,r.headerFooter),this.map.rowBreaks.render(e,r.rowBreaks),this.map.drawing.render(e,r.drawing),this.map.picture.render(e,r.background),this.map.tableParts.render(e,r.tables),this.map.extLst.render(e,r),r.rels&&r.rels.forEach(u=>{u.Type===an.VmlDrawing&&e.leafNode("legacyDrawing",{"r:id":u.Id})}),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name==="worksheet"?(Ose.each(this.map,r=>{r.reset()}),!0):(this.map[e.name]&&!this.ignoreNodes.includes(e.name)&&(this.parser=this.map[e.name],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==="worksheet"){let r=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(r.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(r.outlineProperties=this.map.sheetPr.model.outlineProperties);let i={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},n=Object.assign(i,this.map.pageSetup.model,this.map.printOptions.model),s=iae(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:r,views:this.map.sheetViews.model,pageSetup:n,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:s},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}else return!0}reconcile(e,r){let i=(e.relationships||[]).reduce((s,a)=>{if(s[a.Id]=a,a.Type===an.Comments&&(e.comments=r.comments[a.Target].comments),a.Type===an.VmlDrawing&&e.comments&&e.comments.length){let o=r.vmlDrawings[a.Target].comments;e.comments.forEach((u,f)=>{u.note=Object.assign({},u.note,o[f])})}return s},{});if(r.commentsMap=(e.comments||[]).reduce((s,a)=>(a.ref&&(s[a.ref]=a),s),{}),r.hyperlinkMap=(e.hyperlinks||[]).reduce((s,a)=>(a.rId&&(s[a.address]=i[a.rId].Target),s),{}),r.formulae={},e.rows=e.rows&&e.rows.filter(Boolean)||[],e.rows.forEach(s=>{s.cells=s.cells&&s.cells.filter(Boolean)||[]}),this.map.cols.reconcile(e.cols,r),this.map.sheetData.reconcile(e.rows,r),this.map.conditionalFormatting.reconcile(e.conditionalFormattings,r),e.media=[],e.drawing){let a=i[e.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(a){let o=a[1];r.drawings[o].anchors.forEach(f=>{if(f.medium){let c={type:"image",imageId:f.medium.index,range:f.range,hyperlinks:f.picture.hyperlinks};e.media.push(c)}})}}let n=e.background&&i[e.background.rId];if(n){let s=n.Target.split("/media/")[1],a=r.mediaIndex&&r.mediaIndex[s];a!==void 0&&e.media.push({type:"background",imageId:a})}e.tables=(e.tables||[]).map(s=>{let a=i[s.rId];return r.tables[a.Target]}),delete e.relationships,delete e.hyperlinks,delete e.comments}};Ip.WORKSHEET_ATTRIBUTES={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"};KL.exports=Ip});var kx=w((HIe,JL)=>{var nae=oe(),Cx=class extends nae{parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?(this.reset(),this.model={range:{editAs:e.attributes.editAs||"oneCell"}}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}reconcilePicture(e,r){if(e&&e.rId){let n=r.rels[e.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(n){let s=n[1],a=r.mediaIndex[s];return r.media[a]}}}};JL.exports=Cx});var Ax=w((zIe,e2)=>{var sae=oe(),Np=sp(),Rx=class extends sae{constructor(e){super(),this.tag=e.tag,this.map={"xdr:col":new Np({tag:"xdr:col",zero:!0}),"xdr:colOff":new Np({tag:"xdr:colOff",zero:!0}),"xdr:row":new Np({tag:"xdr:row",zero:!0}),"xdr:rowOff":new Np({tag:"xdr:rowOff",zero:!0})}}render(e,r){e.openNode(this.tag),this.map["xdr:col"].render(e,r.nativeCol),this.map["xdr:colOff"].render(e,r.nativeColOff),this.map["xdr:row"].render(e,r.nativeRow),this.map["xdr:rowOff"].render(e,r.nativeRowOff),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(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):!0}};e2.exports=Rx});var r2=w((XIe,t2)=>{var aae=oe(),Ox=class extends aae{get tag(){return"a:blip"}render(e,r){e.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":r.rId,cstate:"print"})}parseOpen(e){return e.name===this.tag&&(this.model={rId:e.attributes["r:embed"]}),!0}parseText(){}parseClose(e){return e!==this.tag}};t2.exports=Ox});var n2=w((VIe,i2)=>{var oae=oe(),lae=r2(),Ix=class extends oae{constructor(){super(),this.map={"a:blip":new lae}}get tag(){return"xdr:blipFill"}render(e,r){e.openNode(this.tag),this.map["a:blip"].render(e,r),e.openNode("a:stretch"),e.leafNode("a:fillRect"),e.closeNode(),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.model=this.map["a:blip"].model,!1):!0}};i2.exports=Ix});var a2=w((GIe,s2)=>{var uae=oe(),Nx=class extends uae{get tag(){return"a:hlinkClick"}render(e,r){r.hyperlinks&&r.hyperlinks.rId&&e.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":r.hyperlinks.rId,tooltip:r.hyperlinks.tooltip})}parseOpen(e){return e.name===this.tag&&(this.model={hyperlinks:{rId:e.attributes["r:id"],tooltip:e.attributes.tooltip}}),!0}parseText(){}parseClose(){return!1}};s2.exports=Nx});var l2=w((ZIe,o2)=>{var fae=oe(),Dx=class extends fae{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){return e.name===this.tag,!0}parseText(){}parseClose(e){return e!==this.tag}};o2.exports=Dx});var f2=w((YIe,u2)=>{var cae=oe(),hae=a2(),dae=l2(),Fx=class extends cae{constructor(){super(),this.map={"a:hlinkClick":new hae,"a:extLst":new dae}}get tag(){return"xdr:cNvPr"}render(e,r){e.openNode(this.tag,{id:r.index,name:`Picture ${r.index}`}),this.map["a:hlinkClick"].render(e,r),this.map["a:extLst"].render(e,r),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.model=this.map["a:hlinkClick"].model,!1):!0}};u2.exports=Fx});var h2=w((KIe,c2)=>{var pae=oe(),Mx=class extends pae{get tag(){return"xdr:cNvPicPr"}render(e){e.openNode(this.tag),e.leafNode("a:picLocks",{noChangeAspect:"1"}),e.closeNode()}parseOpen(e){return e.name===this.tag,!0}parseText(){}parseClose(e){return e!==this.tag}};c2.exports=Mx});var p2=w((QIe,d2)=>{var gae=oe(),mae=f2(),yae=h2(),Px=class extends gae{constructor(){super(),this.map={"xdr:cNvPr":new mae,"xdr:cNvPicPr":new yae}}get tag(){return"xdr:nvPicPr"}render(e,r){e.openNode(this.tag),this.map["xdr:cNvPr"].render(e,r),this.map["xdr:cNvPicPr"].render(e,r),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.model=this.map["xdr:cNvPr"].model,!1):!0}};d2.exports=Px});var m2=w((JIe,g2)=>{g2.exports={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"}]}]}});var Lx=w((eNe,y2)=>{var vae=oe(),_ae=jo(),wae=n2(),bae=p2(),xae=m2(),qx=class extends vae{constructor(){super(),this.map={"xdr:nvPicPr":new bae,"xdr:blipFill":new wae,"xdr:spPr":new _ae(xae)}}get tag(){return"xdr:pic"}prepare(e,r){e.index=r.index+1}render(e,r){e.openNode(this.tag),this.map["xdr:nvPicPr"].render(e,r),this.map["xdr:blipFill"].render(e,r),this.map["xdr:spPr"].render(e,r),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.mergeModel(this.parser.model),this.parser=void 0),!0):e!==this.tag}};y2.exports=qx});var w2=w((tNe,_2)=>{var Sae=kx(),Eae=jo(),v2=Ax(),Tae=Lx(),Bx=class extends Sae{constructor(){super(),this.map={"xdr:from":new v2({tag:"xdr:from"}),"xdr:to":new v2({tag:"xdr:to"}),"xdr:pic":new Tae,"xdr:clientData":new Eae({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(e,r){this.map["xdr:pic"].prepare(e.picture,r)}render(e,r){e.openNode(this.tag,{editAs:r.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,r.range.tl),this.map["xdr:to"].render(e,r.range.br),this.map["xdr:pic"].render(e,r.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(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,!1):!0}reconcile(e,r){e.medium=this.reconcilePicture(e.picture,r)}};_2.exports=Bx});var x2=w((rNe,b2)=>{var Cae=oe(),Dp=9525,jx=class extends Cae{constructor(e){super(),this.tag=e.tag,this.map={}}render(e,r){e.openNode(this.tag);let i=Math.floor(r.width*Dp),n=Math.floor(r.height*Dp);e.addAttribute("cx",i),e.addAttribute("cy",n),e.closeNode()}parseOpen(e){return e.name===this.tag?(this.model={width:parseInt(e.attributes.cx||"0",10)/Dp,height:parseInt(e.attributes.cy||"0",10)/Dp},!0):!1}parseText(){}parseClose(){return!1}};b2.exports=jx});var E2=w((iNe,S2)=>{var kae=kx(),Rae=jo(),Aae=Ax(),Oae=x2(),Iae=Lx(),$x=class extends kae{constructor(){super(),this.map={"xdr:from":new Aae({tag:"xdr:from"}),"xdr:ext":new Oae({tag:"xdr:ext"}),"xdr:pic":new Iae,"xdr:clientData":new Rae({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(e,r){this.map["xdr:pic"].prepare(e.picture,r)}render(e,r){e.openNode(this.tag,{editAs:r.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,r.range.tl),this.map["xdr:ext"].render(e,r.range.ext),this.map["xdr:pic"].render(e,r.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(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,!1):!0}reconcile(e,r){e.medium=this.reconcilePicture(e.picture,r)}};S2.exports=$x});var C2=w((nNe,T2)=>{var Nae=mt(),Dae=zt(),Fae=oe(),Mae=w2(),Pae=E2();function qae(t){return(typeof t.range=="string"?Nae.decode(t.range):t.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}var Fp=class t extends Fae{constructor(){super(),this.map={"xdr:twoCellAnchor":new Mae,"xdr:oneCellAnchor":new Pae}}prepare(e){e.anchors.forEach((r,i)=>{r.anchorType=qae(r),this.map[r.anchorType].prepare(r,{index:i})})}get tag(){return"xdr:wsDr"}render(e,r){e.openXml(Dae.StdDocAttributes),e.openNode(this.tag,t.DRAWING_ATTRIBUTES),r.anchors.forEach(i=>{this.map[i.anchorType].render(e,i)}),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?(this.reset(),this.model={anchors:[]}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0):e!==this.tag}reconcile(e,r){e.anchors.forEach(i=>{i.br?this.map["xdr:twoCellAnchor"].reconcile(i,r):this.map["xdr:oneCellAnchor"].reconcile(i,r)})}};Fp.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"};T2.exports=Fp});var R2=w((sNe,k2)=>{var Lae=oe(),Ux=class extends Lae{get tag(){return"customFilter"}render(e,r){e.leafNode(this.tag,{val:r.val,operator:r.operator})}parseOpen(e){return e.name===this.tag?(this.model={val:e.attributes.val,operator:e.attributes.operator},!0):!1}parseText(){}parseClose(){return!1}};k2.exports=Ux});var O2=w((aNe,A2)=>{var Bae=oe(),Wx=class extends Bae{get tag(){return"filter"}render(e,r){e.leafNode(this.tag,{val:r.val})}parseOpen(e){return e.name===this.tag?(this.model={val:e.attributes.val},!0):!1}parseText(){}parseClose(){return!1}};A2.exports=Wx});var D2=w((oNe,N2)=>{var jae=oe(),I2=Kn(),$ae=R2(),Uae=O2(),Hx=class extends jae{constructor(){super(),this.map={customFilters:new I2({tag:"customFilters",count:!1,empty:!0,childXform:new $ae}),filters:new I2({tag:"filters",count:!1,empty:!0,childXform:new Uae})}}get tag(){return"filterColumn"}prepare(e,r){e.colId=r.index.toString()}render(e,r){return r.customFilters?(e.openNode(this.tag,{colId:r.colId,hiddenButton:r.filterButton?"0":"1"}),this.map.customFilters.render(e,r.customFilters),e.closeNode(),!0):(e.leafNode(this.tag,{colId:r.colId,hiddenButton:r.filterButton?"0":"1"}),!0)}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;let{attributes:r}=e;switch(e.name){case this.tag:return this.model={filterButton:r.hiddenButton==="0"},!0;default:if(this.parser=this.map[e.name],this.parser)return this.parseOpen(e),!0;throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(e)}`)}}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.model.customFilters=this.map.customFilters.model,!1):!0}};N2.exports=Hx});var M2=w((lNe,F2)=>{var Wae=oe(),Hae=D2(),zx=class extends Wae{constructor(){super(),this.map={filterColumn:new Hae}}get tag(){return"autoFilter"}prepare(e){e.columns.forEach((r,i)=>{this.map.filterColumn.prepare(r,{index:i})})}render(e,r){return e.openNode(this.tag,{ref:r.autoFilterRef}),r.columns.forEach(i=>{this.map.filterColumn.render(e,i)}),e.closeNode(),!0}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:return this.model={autoFilterRef:e.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[e.name],this.parser)return this.parseOpen(e),!0;throw new Error(`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.columns.push(this.parser.model),this.parser=void 0),!0;if(e===this.tag)return!1;throw new Error(`Unexpected xml node in parseClose: ${e}`)}};F2.exports=zx});var q2=w((uNe,P2)=>{var zae=oe(),Xx=class extends zae{get tag(){return"tableColumn"}prepare(e,r){e.id=r.index+1}render(e,r){return e.leafNode(this.tag,{id:r.id.toString(),name:r.name,totalsRowLabel:r.totalsRowLabel,totalsRowFunction:r.totalsRowFunction,dxfId:r.dxfId}),!0}parseOpen(e){if(e.name===this.tag){let{attributes:r}=e;return this.model={name:r.name,totalsRowLabel:r.totalsRowLabel,totalsRowFunction:r.totalsRowFunction,dxfId:r.dxfId},!0}return!1}parseText(){}parseClose(){return!1}};P2.exports=Xx});var B2=w((fNe,L2)=>{var Xae=oe(),Vx=class extends Xae{get tag(){return"tableStyleInfo"}render(e,r){return e.leafNode(this.tag,{name:r.theme?r.theme:void 0,showFirstColumn:r.showFirstColumn?"1":"0",showLastColumn:r.showLastColumn?"1":"0",showRowStripes:r.showRowStripes?"1":"0",showColumnStripes:r.showColumnStripes?"1":"0"}),!0}parseOpen(e){if(e.name===this.tag){let{attributes:r}=e;return this.model={theme:r.name?r.name:null,showFirstColumn:r.showFirstColumn==="1",showLastColumn:r.showLastColumn==="1",showRowStripes:r.showRowStripes==="1",showColumnStripes:r.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}};L2.exports=Vx});var $2=w((cNe,j2)=>{var Vae=zt(),Gae=oe(),Zae=Kn(),Yae=M2(),Kae=q2(),Qae=B2(),Mp=class t extends Gae{constructor(){super(),this.map={autoFilter:new Yae,tableColumns:new Zae({tag:"tableColumns",count:!0,empty:!0,childXform:new Kae}),tableStyleInfo:new Qae}}prepare(e,r){this.map.autoFilter.prepare(e),this.map.tableColumns.prepare(e.columns,r)}get tag(){return"table"}render(e,r){e.openXml(Vae.StdDocAttributes),e.openNode(this.tag,{...t.TABLE_ATTRIBUTES,id:r.id,name:r.name,displayName:r.displayName||r.name,ref:r.tableRef,totalsRowCount:r.totalsRow?"1":void 0,totalsRowShown:r.totalsRow?void 0:"1",headerRowCount:r.headerRow?"1":"0"}),this.map.autoFilter.render(e,r),this.map.tableColumns.render(e,r.columns),this.map.tableStyleInfo.render(e,r.style),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;let{name:r,attributes:i}=e;return r===this.tag?(this.reset(),this.model={name:i.name,displayName:i.displayName||i.name,tableRef:i.ref,totalsRow:i.totalsRowCount==="1",headerRow:i.headerRowCount==="1"}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((r,i)=>{this.model.columns[i].filterButton=r.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1):!0}reconcile(e,r){e.columns.forEach(i=>{i.dxfId!==void 0&&(i.style=r.styles.getDxfStyle(i.dxfId))})}};Mp.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"};j2.exports=Mp});var Gx=w((hNe,U2)=>{var Jae=Tf(),eoe=sr(),toe=oe(),roe=U2.exports=function(t){this.model=t};eoe.inherits(roe,toe,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new Jae),this._richTextXform},render(t,e){e=e||this.model,t.openNode("comment",{ref:e.ref,authorId:0}),t.openNode("text"),e&&e.note&&e.note.texts&&e.note.texts.forEach(r=>{this.richTextXform.render(t,r)}),t.closeNode(),t.closeNode()},parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;switch(t.name){case"comment":return this.model={type:"note",note:{texts:[]},...t.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(t),!0;default:return!1}},parseText(t){this.parser&&this.parser.parseText(t)},parseClose(t){switch(t){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(t),!0}}})});var z2=w((dNe,H2)=>{var ioe=zt(),noe=sr(),soe=oe(),aoe=Gx(),W2=H2.exports=function(){this.map={comment:new aoe}};noe.inherits(W2,soe,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(t,e){e=e||this.model,t.openXml(ioe.StdDocAttributes),t.openNode("comments",W2.COMMENTS_ATTRIBUTES),t.openNode("authors"),t.leafNode("author",null,"Author"),t.closeNode(),t.openNode("commentList"),e.comments.forEach(r=>{this.map.comment.render(t,r)}),t.closeNode(),t.closeNode()},parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;switch(t.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(t),!0;default:return!1}},parseText(t){this.parser&&this.parser.parseText(t)},parseClose(t){switch(t){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(t),!0}}})});var V2=w((pNe,X2)=>{var ooe=oe(),Zx=class extends ooe{get tag(){return"v:textbox"}conversionUnit(e,r,i){return`${parseFloat(e)*r.toFixed(2)}${i}`}reverseConversionUnit(e){return(e||"").split(",").map(r=>Number(parseFloat(this.conversionUnit(parseFloat(r),.1,"")).toFixed(2)))}render(e,r){let i={style:"mso-direction-alt:auto"};if(r&&r.note){let{inset:n}=r.note&&r.note.margins;Array.isArray(n)&&(n=n.map(s=>this.conversionUnit(s,10,"mm")).join(",")),n&&(i.inset=n)}e.openNode("v:textbox",i),e.leafNode("div",{style:"text-align:left"}),e.closeNode()}parseOpen(e){return e.name===this.tag&&(this.model={inset:this.reverseConversionUnit(e.attributes.inset)}),!0}parseText(){}parseClose(e){return e!==this.tag}};X2.exports=Zx});var Z2=w((gNe,G2)=>{var loe=oe(),Yx=class extends loe{get tag(){return"x:Anchor"}getAnchorRect(e){let r=Math.floor(e.left),i=Math.floor((e.left-r)*68),n=Math.floor(e.top),s=Math.floor((e.top-n)*18),a=Math.floor(e.right),o=Math.floor((e.right-a)*68),u=Math.floor(e.bottom),f=Math.floor((e.bottom-u)*18);return[r,i,n,s,a,o,u,f]}getDefaultRect(e){let r=e.col,i=6,n=Math.max(e.row-2,0),s=14,a=r+2,o=2,u=n+4;return[r,i,n,s,a,o,u,16]}render(e,r){let i=r.anchor?this.getAnchorRect(r.anchor):this.getDefaultRect(r.refAddress);e.leafNode("x:Anchor",null,i.join(", "))}parseOpen(e){return e.name===this.tag?(this.text="",!0):!1}parseText(e){this.text=e}parseClose(){return!1}};G2.exports=Yx});var K2=w((mNe,Y2)=>{var uoe=oe(),Kx=class extends uoe{constructor(e){super(),this._model=e}get tag(){return this._model&&this._model.tag}render(e,r){e.leafNode(this.tag,null,r)}parseOpen(e){return e.name===this.tag?(this.text="",!0):!1}parseText(e){this.text=e}parseClose(){return!1}};Y2.exports=Kx});var J2=w((yNe,Q2)=>{var foe=oe(),Qx=class extends foe{constructor(e){super(),this._model=e}get tag(){return this._model&&this._model.tag}render(e,r,i){r===i[2]?e.leafNode(this.tag):this.tag==="x:SizeWithCells"&&r===i[1]&&e.leafNode(this.tag)}parseOpen(e){return e.name===this.tag?(this.model={},this.model[this.tag]=!0,!0):!1}parseText(){}parseClose(){return!1}};Q2.exports=Qx});var iB=w((vNe,rB)=>{var coe=oe(),hoe=Z2(),eB=K2(),tB=J2(),Jx=["twoCells","oneCells","absolute"],eS=class extends coe{constructor(){super(),this.map={"x:Anchor":new hoe,"x:Locked":new eB({tag:"x:Locked"}),"x:LockText":new eB({tag:"x:LockText"}),"x:SizeWithCells":new tB({tag:"x:SizeWithCells"}),"x:MoveWithCells":new tB({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(e,r){let{protection:i,editAs:n}=r.note;e.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(e,n,Jx),this.map["x:SizeWithCells"].render(e,n,Jx),this.map["x:Anchor"].render(e,r),this.map["x:Locked"].render(e,i.locked),e.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(e,i.lockText),e.leafNode("x:Row",null,r.refAddress.row-1),e.leafNode("x:Column",null,r.refAddress.col-1),e.closeNode()}parseOpen(e){return e.name===this.tag?(this.reset(),this.model={anchor:[],protection:{},editAs:""}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.normalizeModel(),!1):!0}normalizeModel(){let e=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),r=Object.keys(e).length;this.model.editAs=Jx[r],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}};rB.exports=eS});var tS=w((_Ne,nB)=>{var doe=oe(),poe=V2(),goe=iB(),Pp=class t extends doe{constructor(){super(),this.map={"v:textbox":new poe,"x:ClientData":new goe}}get tag(){return"v:shape"}render(e,r,i){e.openNode("v:shape",t.V_SHAPE_ATTRIBUTES(r,i)),e.leafNode("v:fill",{color2:"infoBackground [80]"}),e.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),e.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(e,r),this.map["x:ClientData"].render(e,r),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?(this.reset(),this.model={margins:{insetmode:e.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(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,!1):!0}};Pp.V_SHAPE_ATTRIBUTES=(t,e)=>({id:`_x0000_s${1025+e}`,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":t.note.margins&&t.note.margins.insetmode});nB.exports=Pp});var aB=w((wNe,sB)=>{var moe=zt(),yoe=oe(),voe=tS(),qp=class t extends yoe{constructor(){super(),this.map={"v:shape":new voe}}get tag(){return"xml"}render(e,r){e.openXml(moe.StdDocAttributes),e.openNode(this.tag,t.DRAWING_ATTRIBUTES),e.openNode("o:shapelayout",{"v:ext":"edit"}),e.leafNode("o:idmap",{"v:ext":"edit",data:1}),e.closeNode(),e.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),e.leafNode("v:stroke",{joinstyle:"miter"}),e.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),e.closeNode(),r.comments.forEach((i,n)=>{this.map["v:shape"].render(e,i,n)}),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?(this.reset(),this.model={comments:[]}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0):e!==this.tag}reconcile(e,r){e.anchors.forEach(i=>{i.br?this.map["xdr:twoCellAnchor"].reconcile(i,r):this.map["xdr:oneCellAnchor"].reconcile(i,r)})}};qp.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"};sB.exports=qp});var rS=w((bNe,oB)=>{oB.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
19
+ <a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/> <a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/> <a:font script="Hans" typeface="\u5B8B\u4F53"/> <a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/> <a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/> <a:font script="Hans" typeface="\u5B8B\u4F53"/> <a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`});var fS=w((xNe,hB)=>{var uS=Y("fs"),_oe=pw(),{PassThrough:iS}=nr(),woe=cM(),nS=yf(),boe=sr(),Lp=zt(),{bufferToString:xoe}=Yw(),sS=mp(),lB=j0(),aS=z0(),ha=wp(),Soe=V0(),uB=Y0(),Bp=xp(),jp=QL(),oS=C2(),lS=$2(),fB=z2(),cB=aB(),Eoe=rS();function Toe(t,e){return new Promise((r,i)=>{uS.readFile(t,e,(n,s)=>{n?i(n):r(s)})})}var $p=class t{constructor(e){this.workbook=e}async readFile(e,r){if(!await boe.fs.exists(e))throw new Error(`File not found: ${e}`);let i=uS.createReadStream(e);try{let n=await this.read(i,r);return i.close(),n}catch(n){throw i.close(),n}}parseRels(e){return new ha().parseStream(e)}parseWorkbook(e){return new Bp().parseStream(e)}parseSharedStrings(e){return new aS().parseStream(e)}reconcile(e,r){let i=new Bp,n=new jp(r),s=new oS,a=new lS;i.reconcile(e);let o={media:e.media,mediaIndex:e.mediaIndex};Object.keys(e.drawings).forEach(c=>{let h=e.drawings[c],d=e.drawingRels[c];d&&(o.rels=d.reduce((p,g)=>(p[g.Id]=g,p),{}),(h.anchors||[]).forEach(p=>{let g=p.picture&&p.picture.hyperlinks;g&&o.rels[g.rId]&&(g.hyperlink=o.rels[g.rId].Target,delete g.rId)}),s.reconcile(h,o))});let u={styles:e.styles};Object.values(e.tables).forEach(c=>{a.reconcile(c,u)});let f={styles:e.styles,sharedStrings:e.sharedStrings,media:e.media,mediaIndex:e.mediaIndex,date1904:e.properties&&e.properties.date1904,drawings:e.drawings,comments:e.comments,tables:e.tables,vmlDrawings:e.vmlDrawings};e.worksheets.forEach(c=>{c.relationships=e.worksheetRels[c.sheetNo],n.reconcile(c,f)}),delete e.worksheetHash,delete e.worksheetRels,delete e.globalRels,delete e.sharedStrings,delete e.workbookRels,delete e.sheetDefs,delete e.styles,delete e.mediaIndex,delete e.drawings,delete e.drawingRels,delete e.vmlDrawings}async _processWorksheetEntry(e,r,i,n,s){let o=await new jp(n).parseStream(e);o.sheetNo=i,r.worksheetHash[s]=o,r.worksheets.push(o)}async _processCommentEntry(e,r,i){let s=await new fB().parseStream(e);r.comments[`../${i}.xml`]=s}async _processTableEntry(e,r,i){let s=await new lS().parseStream(e);r.tables[`../tables/${i}.xml`]=s}async _processWorksheetRelsEntry(e,r,i){let s=await new ha().parseStream(e);r.worksheetRels[i]=s}async _processMediaEntry(e,r,i){let n=i.lastIndexOf(".");if(n>=1){let s=i.substr(n+1),a=i.substr(0,n);await new Promise((o,u)=>{let f=new nS;f.on("finish",()=>{r.mediaIndex[i]=r.media.length,r.mediaIndex[a]=r.media.length;let c={type:"image",name:a,extension:s,buffer:f.toBuffer()};r.media.push(c),o()}),e.on("error",c=>{u(c)}),e.pipe(f)})}}async _processDrawingEntry(e,r,i){let s=await new oS().parseStream(e);r.drawings[i]=s}async _processDrawingRelsEntry(e,r,i){let s=await new ha().parseStream(e);r.drawingRels[i]=s}async _processVmlDrawingEntry(e,r,i){let s=await new cB().parseStream(e);r.vmlDrawings[`../drawings/${i}.vml`]=s}async _processThemeEntry(e,r,i){await new Promise((n,s)=>{let a=new nS;e.on("error",s),a.on("error",s),a.on("finish",()=>{r.themes[i]=a.read().toString(),n()}),e.pipe(a)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(e,r){!e[Symbol.asyncIterator]&&e.pipe&&(e=e.pipe(new iS));let i=[];for await(let n of e)i.push(n);return this.load(Buffer.concat(i),r)}async load(e,r){let i;r&&r.base64?i=Buffer.from(e.toString(),"base64"):i=e;let n={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},s=await _oe.loadAsync(i);for(let a of Object.values(s.files))if(!a.dir){let o=a.name;o[0]==="/"&&(o=o.substr(1));let u;if(o.match(/xl\/media\//)||o.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))u=new iS,u.write(await a.async("nodebuffer"));else{u=new iS({writableObjectMode:!0,readableObjectMode:!0});let f;process.browser?f=xoe(await a.async("nodebuffer")):f=await a.async("string");let c=16*1024;for(let h=0;h<f.length;h+=c)u.write(f.substring(h,h+c))}switch(u.end(),o){case"_rels/.rels":n.globalRels=await this.parseRels(u);break;case"xl/workbook.xml":{let f=await this.parseWorkbook(u);n.sheets=f.sheets,n.definedNames=f.definedNames,n.views=f.views,n.properties=f.properties,n.calcProperties=f.calcProperties;break}case"xl/_rels/workbook.xml.rels":n.workbookRels=await this.parseRels(u);break;case"xl/sharedStrings.xml":n.sharedStrings=new aS,await n.sharedStrings.parseStream(u);break;case"xl/styles.xml":n.styles=new sS,await n.styles.parseStream(u);break;case"docProps/app.xml":{let c=await new uB().parseStream(u);n.company=c.company,n.manager=c.manager;break}case"docProps/core.xml":{let c=await new lB().parseStream(u);Object.assign(n,c);break}default:{let f=o.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(f){await this._processWorksheetEntry(u,n,f[1],r,o);break}if(f=o.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),f){await this._processWorksheetRelsEntry(u,n,f[1]);break}if(f=o.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),f){await this._processThemeEntry(u,n,f[1]);break}if(f=o.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),f){await this._processMediaEntry(u,n,f[1]);break}if(f=o.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),f){await this._processDrawingEntry(u,n,f[1]);break}if(f=o.match(/xl\/(comments\d+)[.]xml/),f){await this._processCommentEntry(u,n,f[1]);break}if(f=o.match(/xl\/tables\/(table\d+)[.]xml/),f){await this._processTableEntry(u,n,f[1]);break}if(f=o.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),f){await this._processDrawingRelsEntry(u,n,f[1]);break}if(f=o.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),f){await this._processVmlDrawingEntry(u,n,f[1]);break}}}}return this.reconcile(n,r),this.workbook.model=n,this.workbook}async addMedia(e,r){await Promise.all(r.media.map(async i=>{if(i.type==="image"){let n=`xl/media/${i.name}.${i.extension}`;if(i.filename){let s=await Toe(i.filename);return e.append(s,{name:n})}if(i.buffer)return e.append(i.buffer,{name:n});if(i.base64){let s=i.base64,a=s.substring(s.indexOf(",")+1);return e.append(a,{name:n,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(e,r){let i=new oS,n=new ha;r.worksheets.forEach(s=>{let{drawing:a}=s;if(a){i.prepare(a,{});let o=i.toXml(a);e.append(o,{name:`xl/drawings/${a.name}.xml`}),o=n.toXml(a.rels),e.append(o,{name:`xl/drawings/_rels/${a.name}.xml.rels`})}})}addTables(e,r){let i=new lS;r.worksheets.forEach(n=>{let{tables:s}=n;s.forEach(a=>{i.prepare(a,{});let o=i.toXml(a);e.append(o,{name:`xl/tables/${a.target}`})})})}async addContentTypes(e,r){let n=new Soe().toXml(r);e.append(n,{name:"[Content_Types].xml"})}async addApp(e,r){let n=new uB().toXml(r);e.append(n,{name:"docProps/app.xml"})}async addCore(e,r){let i=new lB;e.append(i.toXml(r),{name:"docProps/core.xml"})}async addThemes(e,r){let i=r.themes||{theme1:Eoe};Object.keys(i).forEach(n=>{let s=i[n],a=`xl/theme/${n}.xml`;e.append(s,{name:a})})}async addOfficeRels(e){let i=new ha().toXml([{Id:"rId1",Type:t.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:t.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:t.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);e.append(i,{name:"_rels/.rels"})}async addWorkbookRels(e,r){let i=1,n=[{Id:`rId${i++}`,Type:t.RelType.Styles,Target:"styles.xml"},{Id:`rId${i++}`,Type:t.RelType.Theme,Target:"theme/theme1.xml"}];r.sharedStrings.count&&n.push({Id:`rId${i++}`,Type:t.RelType.SharedStrings,Target:"sharedStrings.xml"}),r.worksheets.forEach(o=>{o.rId=`rId${i++}`,n.push({Id:o.rId,Type:t.RelType.Worksheet,Target:`worksheets/sheet${o.id}.xml`})});let a=new ha().toXml(n);e.append(a,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(e,r){r.sharedStrings&&r.sharedStrings.count&&e.append(r.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(e,r){let{xml:i}=r.styles;i&&e.append(i,{name:"xl/styles.xml"})}async addWorkbook(e,r){let i=new Bp;e.append(i.toXml(r),{name:"xl/workbook.xml"})}async addWorksheets(e,r){let i=new jp,n=new ha,s=new fB,a=new cB;r.worksheets.forEach(o=>{let u=new Lp;i.render(u,o),e.append(u.xml,{name:`xl/worksheets/sheet${o.id}.xml`}),o.rels&&o.rels.length&&(u=new Lp,n.render(u,o.rels),e.append(u.xml,{name:`xl/worksheets/_rels/sheet${o.id}.xml.rels`})),o.comments.length>0&&(u=new Lp,s.render(u,o),e.append(u.xml,{name:`xl/comments${o.id}.xml`}),u=new Lp,a.render(u,o),e.append(u.xml,{name:`xl/drawings/vmlDrawing${o.id}.vml`}))})}_finalize(e){return new Promise((r,i)=>{e.on("finish",()=>{r(this)}),e.on("error",i),e.finalize()})}prepareModel(e,r){e.creator=e.creator||"ExcelJS",e.lastModifiedBy=e.lastModifiedBy||"ExcelJS",e.created=e.created||new Date,e.modified=e.modified||new Date,e.useSharedStrings=r.useSharedStrings!==void 0?r.useSharedStrings:!0,e.useStyles=r.useStyles!==void 0?r.useStyles:!0,e.sharedStrings=new aS,e.styles=e.useStyles?new sS(!0):new sS.Mock;let i=new Bp,n=new jp;i.prepare(e);let s={sharedStrings:e.sharedStrings,styles:e.styles,date1904:e.properties.date1904,drawingsCount:0,media:e.media};s.drawings=e.drawings=[],s.commentRefs=e.commentRefs=[];let a=0;e.tables=[],e.worksheets.forEach(o=>{o.tables.forEach(u=>{a++,u.target=`table${a}.xml`,u.id=a,e.tables.push(u)}),n.prepare(o,s)})}async write(e,r){r=r||{};let{model:i}=this.workbook,n=new woe.ZipWriter(r.zip);return n.pipe(e),this.prepareModel(i,r),await this.addContentTypes(n,i),await this.addOfficeRels(n,i),await this.addWorkbookRels(n,i),await this.addWorksheets(n,i),await this.addSharedStrings(n,i),await this.addDrawings(n,i),await this.addTables(n,i),await Promise.all([this.addThemes(n,i),this.addStyles(n,i)]),await this.addMedia(n,i),await Promise.all([this.addApp(n,i),this.addCore(n,i)]),await this.addWorkbook(n,i),this._finalize(n)}writeFile(e,r){let i=uS.createWriteStream(e);return new Promise((n,s)=>{i.on("finish",()=>{n()}),i.on("error",a=>{s(a)}),this.write(i,r).then(()=>{i.end()}).catch(a=>{s(a)})})}async writeBuffer(e){let r=new nS;return await this.write(r,e),r.read()}};$p.RelType=es();hB.exports=$p});var hS=w(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.FormatterOptions=void 0;var cS=class{constructor(e={}){var r;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
20
+ `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,e||{}),typeof e?.quoteHeaders>"u"&&(this.quoteHeaders=this.quoteColumns),e?.quote===!0?this.quote='"':e?.quote===!1&&(this.quote=""),typeof e?.escape!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((r=e.writeHeaders)!==null&&r!==void 0?r:!0),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}};Up.FormatterOptions=cS});var Wp=w((ENe,mB)=>{var Coe="[object AsyncFunction]",koe="[object Function]",Roe="[object GeneratorFunction]",Aoe="[object Null]",Ooe="[object Proxy]",Ioe="[object Undefined]",Noe=typeof global=="object"&&global&&global.Object===Object&&global,Doe=typeof self=="object"&&self&&self.Object===Object&&self,Foe=Noe||Doe||Function("return this")(),pB=Object.prototype,Moe=pB.hasOwnProperty,gB=pB.toString,dB=Foe.Symbol,da=dB?dB.toStringTag:void 0;function Poe(t){return t==null?t===void 0?Ioe:Aoe:da&&da in Object(t)?qoe(t):Loe(t)}function qoe(t){var e=Moe.call(t,da),r=t[da];try{t[da]=void 0;var i=!0}catch{}var n=gB.call(t);return i&&(e?t[da]=r:delete t[da]),n}function Loe(t){return gB.call(t)}function Boe(t){if(!joe(t))return!1;var e=Poe(t);return e==koe||e==Roe||e==Coe||e==Ooe}function joe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}mB.exports=Boe});var KB=w((If,Zo)=>{var $oe=200,SS="__lodash_hash_undefined__",Kp=1,RB=2,AB=9007199254740991,Hp="[object Arguments]",mS="[object Array]",Uoe="[object AsyncFunction]",OB="[object Boolean]",IB="[object Date]",NB="[object Error]",DB="[object Function]",Woe="[object GeneratorFunction]",zp="[object Map]",FB="[object Number]",Hoe="[object Null]",Go="[object Object]",yB="[object Promise]",zoe="[object Proxy]",MB="[object RegExp]",Xp="[object Set]",PB="[object String]",Xoe="[object Symbol]",Voe="[object Undefined]",yS="[object WeakMap]",qB="[object ArrayBuffer]",Vp="[object DataView]",Goe="[object Float32Array]",Zoe="[object Float64Array]",Yoe="[object Int8Array]",Koe="[object Int16Array]",Qoe="[object Int32Array]",Joe="[object Uint8Array]",ele="[object Uint8ClampedArray]",tle="[object Uint16Array]",rle="[object Uint32Array]",ile=/[\\^$.*+?()[\]{}|]/g,nle=/^\[object .+?Constructor\]$/,sle=/^(?:0|[1-9]\d*)$/,st={};st[Goe]=st[Zoe]=st[Yoe]=st[Koe]=st[Qoe]=st[Joe]=st[ele]=st[tle]=st[rle]=!0;st[Hp]=st[mS]=st[qB]=st[OB]=st[Vp]=st[IB]=st[NB]=st[DB]=st[zp]=st[FB]=st[Go]=st[MB]=st[Xp]=st[PB]=st[yS]=!1;var LB=typeof global=="object"&&global&&global.Object===Object&&global,ale=typeof self=="object"&&self&&self.Object===Object&&self,on=LB||ale||Function("return this")(),BB=typeof If=="object"&&If&&!If.nodeType&&If,vB=BB&&typeof Zo=="object"&&Zo&&!Zo.nodeType&&Zo,jB=vB&&vB.exports===BB,dS=jB&&LB.process,_B=(function(){try{return dS&&dS.binding&&dS.binding("util")}catch{}})(),wB=_B&&_B.isTypedArray;function ole(t,e){for(var r=-1,i=t==null?0:t.length,n=0,s=[];++r<i;){var a=t[r];e(a,r,t)&&(s[n++]=a)}return s}function lle(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}function ule(t,e){for(var r=-1,i=t==null?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}function fle(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}function cle(t){return function(e){return t(e)}}function hle(t,e){return t.has(e)}function dle(t,e){return t?.[e]}function ple(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}function gle(t,e){return function(r){return t(e(r))}}function mle(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var yle=Array.prototype,vle=Function.prototype,Qp=Object.prototype,pS=on["__core-js_shared__"],$B=vle.toString,Oi=Qp.hasOwnProperty,bB=(function(){var t=/[^.]+$/.exec(pS&&pS.keys&&pS.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),UB=Qp.toString,_le=RegExp("^"+$B.call(Oi).replace(ile,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xB=jB?on.Buffer:void 0,Gp=on.Symbol,SB=on.Uint8Array,WB=Qp.propertyIsEnumerable,wle=yle.splice,pa=Gp?Gp.toStringTag:void 0,EB=Object.getOwnPropertySymbols,ble=xB?xB.isBuffer:void 0,xle=gle(Object.keys,Object),vS=Yo(on,"DataView"),Nf=Yo(on,"Map"),_S=Yo(on,"Promise"),wS=Yo(on,"Set"),bS=Yo(on,"WeakMap"),Df=Yo(Object,"create"),Sle=ya(vS),Ele=ya(Nf),Tle=ya(_S),Cle=ya(wS),kle=ya(bS),TB=Gp?Gp.prototype:void 0,gS=TB?TB.valueOf:void 0;function ga(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Rle(){this.__data__=Df?Df(null):{},this.size=0}function Ale(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Ole(t){var e=this.__data__;if(Df){var r=e[t];return r===SS?void 0:r}return Oi.call(e,t)?e[t]:void 0}function Ile(t){var e=this.__data__;return Df?e[t]!==void 0:Oi.call(e,t)}function Nle(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Df&&e===void 0?SS:e,this}ga.prototype.clear=Rle;ga.prototype.delete=Ale;ga.prototype.get=Ole;ga.prototype.has=Ile;ga.prototype.set=Nle;function ln(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Dle(){this.__data__=[],this.size=0}function Fle(t){var e=this.__data__,r=Jp(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():wle.call(e,r,1),--this.size,!0}function Mle(t){var e=this.__data__,r=Jp(e,t);return r<0?void 0:e[r][1]}function Ple(t){return Jp(this.__data__,t)>-1}function qle(t,e){var r=this.__data__,i=Jp(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}ln.prototype.clear=Dle;ln.prototype.delete=Fle;ln.prototype.get=Mle;ln.prototype.has=Ple;ln.prototype.set=qle;function ma(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Lle(){this.size=0,this.__data__={hash:new ga,map:new(Nf||ln),string:new ga}}function Ble(t){var e=eg(this,t).delete(t);return this.size-=e?1:0,e}function jle(t){return eg(this,t).get(t)}function $le(t){return eg(this,t).has(t)}function Ule(t,e){var r=eg(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}ma.prototype.clear=Lle;ma.prototype.delete=Ble;ma.prototype.get=jle;ma.prototype.has=$le;ma.prototype.set=Ule;function Zp(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ma;++e<r;)this.add(t[e])}function Wle(t){return this.__data__.set(t,SS),this}function Hle(t){return this.__data__.has(t)}Zp.prototype.add=Zp.prototype.push=Wle;Zp.prototype.has=Hle;function ss(t){var e=this.__data__=new ln(t);this.size=e.size}function zle(){this.__data__=new ln,this.size=0}function Xle(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Vle(t){return this.__data__.get(t)}function Gle(t){return this.__data__.has(t)}function Zle(t,e){var r=this.__data__;if(r instanceof ln){var i=r.__data__;if(!Nf||i.length<$oe-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new ma(i)}return r.set(t,e),this.size=r.size,this}ss.prototype.clear=zle;ss.prototype.delete=Xle;ss.prototype.get=Vle;ss.prototype.has=Gle;ss.prototype.set=Zle;function Yle(t,e){var r=Yp(t),i=!r&&cue(t),n=!r&&!i&&xS(t),s=!r&&!i&&!n&&YB(t),a=r||i||n||s,o=a?fle(t.length,String):[],u=o.length;for(var f in t)(e||Oi.call(t,f))&&!(a&&(f=="length"||n&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||aue(f,u)))&&o.push(f);return o}function Jp(t,e){for(var r=t.length;r--;)if(XB(t[r][0],e))return r;return-1}function Kle(t,e,r){var i=e(t);return Yp(t)?i:lle(i,r(t))}function Mf(t){return t==null?t===void 0?Voe:Hoe:pa&&pa in Object(t)?nue(t):fue(t)}function CB(t){return Ff(t)&&Mf(t)==Hp}function HB(t,e,r,i,n){return t===e?!0:t==null||e==null||!Ff(t)&&!Ff(e)?t!==t&&e!==e:Qle(t,e,r,i,HB,n)}function Qle(t,e,r,i,n,s){var a=Yp(t),o=Yp(e),u=a?mS:ns(t),f=o?mS:ns(e);u=u==Hp?Go:u,f=f==Hp?Go:f;var c=u==Go,h=f==Go,d=u==f;if(d&&xS(t)){if(!xS(e))return!1;a=!0,c=!1}if(d&&!c)return s||(s=new ss),a||YB(t)?zB(t,e,r,i,n,s):rue(t,e,u,r,i,n,s);if(!(r&Kp)){var p=c&&Oi.call(t,"__wrapped__"),g=h&&Oi.call(e,"__wrapped__");if(p||g){var y=p?t.value():t,v=g?e.value():e;return s||(s=new ss),n(y,v,r,i,s)}}return d?(s||(s=new ss),iue(t,e,r,i,n,s)):!1}function Jle(t){if(!ZB(t)||lue(t))return!1;var e=VB(t)?_le:nle;return e.test(ya(t))}function eue(t){return Ff(t)&&GB(t.length)&&!!st[Mf(t)]}function tue(t){if(!uue(t))return xle(t);var e=[];for(var r in Object(t))Oi.call(t,r)&&r!="constructor"&&e.push(r);return e}function zB(t,e,r,i,n,s){var a=r&Kp,o=t.length,u=e.length;if(o!=u&&!(a&&u>o))return!1;var f=s.get(t);if(f&&s.get(e))return f==e;var c=-1,h=!0,d=r&RB?new Zp:void 0;for(s.set(t,e),s.set(e,t);++c<o;){var p=t[c],g=e[c];if(i)var y=a?i(g,p,c,e,t,s):i(p,g,c,t,e,s);if(y!==void 0){if(y)continue;h=!1;break}if(d){if(!ule(e,function(v,b){if(!hle(d,b)&&(p===v||n(p,v,r,i,s)))return d.push(b)})){h=!1;break}}else if(!(p===g||n(p,g,r,i,s))){h=!1;break}}return s.delete(t),s.delete(e),h}function rue(t,e,r,i,n,s,a){switch(r){case Vp:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case qB:return!(t.byteLength!=e.byteLength||!s(new SB(t),new SB(e)));case OB:case IB:case FB:return XB(+t,+e);case NB:return t.name==e.name&&t.message==e.message;case MB:case PB:return t==e+"";case zp:var o=ple;case Xp:var u=i&Kp;if(o||(o=mle),t.size!=e.size&&!u)return!1;var f=a.get(t);if(f)return f==e;i|=RB,a.set(t,e);var c=zB(o(t),o(e),i,n,s,a);return a.delete(t),c;case Xoe:if(gS)return gS.call(t)==gS.call(e)}return!1}function iue(t,e,r,i,n,s){var a=r&Kp,o=kB(t),u=o.length,f=kB(e),c=f.length;if(u!=c&&!a)return!1;for(var h=u;h--;){var d=o[h];if(!(a?d in e:Oi.call(e,d)))return!1}var p=s.get(t);if(p&&s.get(e))return p==e;var g=!0;s.set(t,e),s.set(e,t);for(var y=a;++h<u;){d=o[h];var v=t[d],b=e[d];if(i)var k=a?i(b,v,d,e,t,s):i(v,b,d,t,e,s);if(!(k===void 0?v===b||n(v,b,r,i,s):k)){g=!1;break}y||(y=d=="constructor")}if(g&&!y){var N=t.constructor,E=e.constructor;N!=E&&"constructor"in t&&"constructor"in e&&!(typeof N=="function"&&N instanceof N&&typeof E=="function"&&E instanceof E)&&(g=!1)}return s.delete(t),s.delete(e),g}function kB(t){return Kle(t,pue,sue)}function eg(t,e){var r=t.__data__;return oue(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Yo(t,e){var r=dle(t,e);return Jle(r)?r:void 0}function nue(t){var e=Oi.call(t,pa),r=t[pa];try{t[pa]=void 0;var i=!0}catch{}var n=UB.call(t);return i&&(e?t[pa]=r:delete t[pa]),n}var sue=EB?function(t){return t==null?[]:(t=Object(t),ole(EB(t),function(e){return WB.call(t,e)}))}:gue,ns=Mf;(vS&&ns(new vS(new ArrayBuffer(1)))!=Vp||Nf&&ns(new Nf)!=zp||_S&&ns(_S.resolve())!=yB||wS&&ns(new wS)!=Xp||bS&&ns(new bS)!=yS)&&(ns=function(t){var e=Mf(t),r=e==Go?t.constructor:void 0,i=r?ya(r):"";if(i)switch(i){case Sle:return Vp;case Ele:return zp;case Tle:return yB;case Cle:return Xp;case kle:return yS}return e});function aue(t,e){return e=e??AB,!!e&&(typeof t=="number"||sle.test(t))&&t>-1&&t%1==0&&t<e}function oue(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function lue(t){return!!bB&&bB in t}function uue(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Qp;return t===r}function fue(t){return UB.call(t)}function ya(t){if(t!=null){try{return $B.call(t)}catch{}try{return t+""}catch{}}return""}function XB(t,e){return t===e||t!==t&&e!==e}var cue=CB((function(){return arguments})())?CB:function(t){return Ff(t)&&Oi.call(t,"callee")&&!WB.call(t,"callee")},Yp=Array.isArray;function hue(t){return t!=null&&GB(t.length)&&!VB(t)}var xS=ble||mue;function due(t,e){return HB(t,e)}function VB(t){if(!ZB(t))return!1;var e=Mf(t);return e==DB||e==Woe||e==Uoe||e==zoe}function GB(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=AB}function ZB(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ff(t){return t!=null&&typeof t=="object"}var YB=wB?cle(wB):eue;function pue(t){return hue(t)?Yle(t):tue(t)}function gue(){return[]}function mue(){return!1}Zo.exports=due});var JB=w((TNe,QB)=>{var yue="[object Boolean]",vue=Object.prototype,_ue=vue.toString;function wue(t){return t===!0||t===!1||bue(t)&&_ue.call(t)==yue}function bue(t){return!!t&&typeof t=="object"}QB.exports=wue});var ES=w((CNe,ej)=>{function xue(t){return t==null}ej.exports=xue});var TS=w((kNe,sj)=>{var Sue=1/0,Eue="[object Symbol]",nj=/[\\^$.*+?()[\]{}|]/g,Tue=RegExp(nj.source),Cue=typeof global=="object"&&global&&global.Object===Object&&global,kue=typeof self=="object"&&self&&self.Object===Object&&self,Rue=Cue||kue||Function("return this")(),Aue=Object.prototype,Oue=Aue.toString,tj=Rue.Symbol,rj=tj?tj.prototype:void 0,ij=rj?rj.toString:void 0;function Iue(t){if(typeof t=="string")return t;if(Due(t))return ij?ij.call(t):"";var e=t+"";return e=="0"&&1/t==-Sue?"-0":e}function Nue(t){return!!t&&typeof t=="object"}function Due(t){return typeof t=="symbol"||Nue(t)&&Oue.call(t)==Eue}function Fue(t){return t==null?"":Iue(t)}function Mue(t){return t=Fue(t),t&&Tue.test(t)?t.replace(nj,"\\$&"):t}sj.exports=Mue});var RS=w(Ko=>{"use strict";var kS=Ko&&Ko.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ko,"__esModule",{value:!0});Ko.FieldFormatter=void 0;var Pue=kS(JB()),que=kS(ES()),Lue=kS(TS()),CS=class{constructor(e){this._headers=null,this.formatterOptions=e,e.headers!==null&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");let r=`[${e.delimiter}${Lue.default(e.rowDelimiter)}|\r|
21
+ ]`;this.ESCAPE_REGEXP=new RegExp(r)}set headers(e){this._headers=e}shouldQuote(e,r){let i=r?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return Pue.default(i)?i:Array.isArray(i)?i[e]:this._headers!==null?i[this._headers[e]]:!1}format(e,r,i){let n=`${que.default(e)?"":e}`.replace(/\0/g,""),{formatterOptions:s}=this;return s.quote!==""&&n.indexOf(s.quote)!==-1?this.quoteField(n.replace(this.REPLACE_REGEXP,s.escapedQuote)):n.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(r,i)?this.quoteField(n):n}quoteField(e){let{quote:r}=this.formatterOptions;return`${r}${e}${r}`}};Ko.FieldFormatter=CS});var AS=w(tg=>{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});tg.isSyncTransform=void 0;tg.isSyncTransform=t=>t.length===1});var oj=w(Qo=>{"use strict";var aj=Qo&&Qo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.RowFormatter=void 0;var Bue=aj(Wp()),jue=aj(KB()),$ue=RS(),Uue=AS(),OS=class t{constructor(e){this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new $ue.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}static isRowHashArray(e){return Array.isArray(e)?Array.isArray(e[0])&&e[0].length===2:!1}static isRowArray(e){return Array.isArray(e)&&!this.isRowHashArray(e)}static gatherHeaders(e){return t.isRowHashArray(e)?e.map(r=>r[0]):Array.isArray(e)?e:Object.keys(e)}static createTransform(e){return Uue.isSyncTransform(e)?(r,i)=>{let n=null;try{n=e(r)}catch(s){return i(s)}return i(null,n)}:(r,i)=>{e(r,i)}}set rowTransform(e){if(!Bue.default(e))throw new TypeError("The transform should be a function");this._rowTransform=t.createTransform(e)}format(e,r){this.callTransformer(e,(i,n)=>{if(i)return r(i);if(!e)return r(null);let s=[];if(n){let{shouldFormatColumns:a,headers:o}=this.checkHeaders(n);if(this.shouldWriteHeaders&&o&&!this.hasWrittenHeaders&&(s.push(this.formatColumns(o,!0)),this.hasWrittenHeaders=!0),a){let u=this.gatherColumns(n);s.push(this.formatColumns(u,!1))}}return r(null,s)})}finish(e){let r=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return e(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));r.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&r.push(this.formatterOptions.rowDelimiter),e(null,r)}checkHeaders(e){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};let r=t.gatherHeaders(e);return this.headers=r,this.fieldFormatter.headers=r,this.shouldWriteHeaders?{shouldFormatColumns:!jue.default(r,e),headers:r}:{shouldFormatColumns:!0,headers:null}}gatherColumns(e){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(e)?t.isRowHashArray(e)?this.headers.map((r,i)=>{let n=e[i];return n?n[1]:""}):t.isRowArray(e)&&!this.shouldWriteHeaders?e:this.headers.map((r,i)=>e[i]):this.headers.map(r=>e[r])}callTransformer(e,r){return this._rowTransform?this._rowTransform(e,r):r(null,e)}formatColumns(e,r){let i=e.map((s,a)=>this.fieldFormatter.format(s,a,r)).join(this.formatterOptions.delimiter),{rowCount:n}=this;return this.rowCount+=1,n?[this.formatterOptions.rowDelimiter,i].join(""):i}};Qo.RowFormatter=OS});var lj=w(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.FieldFormatter=Jo.RowFormatter=void 0;var Wue=oj();Object.defineProperty(Jo,"RowFormatter",{enumerable:!0,get:function(){return Wue.RowFormatter}});var Hue=RS();Object.defineProperty(Jo,"FieldFormatter",{enumerable:!0,get:function(){return Hue.FieldFormatter}})});var NS=w(rg=>{"use strict";Object.defineProperty(rg,"__esModule",{value:!0});rg.CsvFormatterStream=void 0;var zue=Y("stream"),Xue=lj(),IS=class extends zue.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new Xue.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,r,i){let n=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,(s,a)=>s?(n=!0,i(s)):(a&&a.forEach(o=>{this.push(Buffer.from(o,"utf8"))}),n=!0,i()))}catch(s){if(n)throw s;i(s)}}_flush(e){this.rowFormatter.finish((r,i)=>r?e(r):(i&&i.forEach(n=>{this.push(Buffer.from(n,"utf8"))}),e()))}};rg.CsvFormatterStream=IS});var fj=w(qe=>{"use strict";var uj=qe&&qe.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),Vue=qe&&qe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Gue=qe&&qe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&uj(e,t,r);return Vue(e,t),e},Zue=qe&&qe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&uj(e,t,r)};Object.defineProperty(qe,"__esModule",{value:!0});qe.writeToPath=qe.writeToString=qe.writeToBuffer=qe.writeToStream=qe.write=qe.format=qe.FormatterOptions=qe.CsvFormatterStream=void 0;var Yue=Y("util"),Kue=Y("stream"),Que=Gue(Y("fs")),Jue=hS(),efe=NS();Zue(AS(),qe);var tfe=NS();Object.defineProperty(qe,"CsvFormatterStream",{enumerable:!0,get:function(){return tfe.CsvFormatterStream}});var rfe=hS();Object.defineProperty(qe,"FormatterOptions",{enumerable:!0,get:function(){return rfe.FormatterOptions}});qe.format=t=>new efe.CsvFormatterStream(new Jue.FormatterOptions(t));qe.write=(t,e)=>{let r=qe.format(e),i=Yue.promisify((n,s)=>{r.write(n,void 0,s)});return t.reduce((n,s)=>n.then(()=>i(s)),Promise.resolve()).then(()=>r.end()).catch(n=>{r.emit("error",n)}),r};qe.writeToStream=(t,e,r)=>qe.write(e,r).pipe(t);qe.writeToBuffer=(t,e={})=>{let r=[],i=new Kue.Writable({write(n,s,a){r.push(n),a()}});return new Promise((n,s)=>{i.on("error",s).on("finish",()=>n(Buffer.concat(r))),qe.write(t,e).pipe(i)})};qe.writeToString=(t,e)=>qe.writeToBuffer(t,e).then(r=>r.toString());qe.writeToPath=(t,e,r)=>{let i=Que.createWriteStream(t,{encoding:"utf8"});return qe.write(e,r).pipe(i)}});var FS=w(el=>{"use strict";var cj=el&&el.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(el,"__esModule",{value:!0});el.ParserOptions=void 0;var ife=cj(TS()),nfe=cj(ES()),DS=class{constructor(e){var r;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,e||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=ife.default(this.delimiter),this.escapeChar=(r=this.escape)!==null&&r!==void 0?r:this.quote,this.supportsComments=!nfe.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}};el.ParserOptions=DS});var MS=w(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.isSyncValidate=tl.isSyncTransform=void 0;tl.isSyncTransform=t=>t.length===1;tl.isSyncValidate=t=>t.length===1});var pj=w(rl=>{"use strict";var sfe=rl&&rl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rl,"__esModule",{value:!0});rl.RowTransformerValidator=void 0;var hj=sfe(Wp()),dj=MS(),PS=class t{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(e){return dj.isSyncTransform(e)?(r,i)=>{let n=null;try{n=e(r)}catch(s){return i(s)}return i(null,n)}:e}static createValidator(e){return dj.isSyncValidate(e)?(r,i)=>{i(null,{row:r,isValid:e(r)})}:(r,i)=>{e(r,(n,s,a)=>n?i(n):s?i(null,{row:r,isValid:s,reason:a}):i(null,{row:r,isValid:!1,reason:a}))}}set rowTransform(e){if(!hj.default(e))throw new TypeError("The transform should be a function");this._rowTransform=t.createTransform(e)}set rowValidator(e){if(!hj.default(e))throw new TypeError("The validate should be a function");this._rowValidator=t.createValidator(e)}transformAndValidate(e,r){return this.callTransformer(e,(i,n)=>i?r(i):n?this.callValidator(n,(s,a)=>s?r(s):a&&!a.isValid?r(null,{row:n,isValid:!1,reason:a.reason}):r(null,{row:n,isValid:!0})):r(null,{row:null,isValid:!0}))}callTransformer(e,r){return this._rowTransform?this._rowTransform(e,r):r(null,e)}callValidator(e,r){return this._rowValidator?this._rowValidator(e,r):r(null,{row:e,isValid:!0})}};rl.RowTransformerValidator=PS});var mj=w((qNe,gj)=>{function afe(t){return t===void 0}gj.exports=afe});var Sj=w((LNe,xj)=>{var ofe=200,BS="__lodash_hash_undefined__",lfe=1/0,ufe="[object Function]",ffe="[object GeneratorFunction]",cfe=/[\\^$.*+?()[\]{}|]/g,hfe=/^\[object .+?Constructor\]$/,dfe=typeof global=="object"&&global&&global.Object===Object&&global,pfe=typeof self=="object"&&self&&self.Object===Object&&self,jS=dfe||pfe||Function("return this")();function gfe(t,e){var r=t?t.length:0;return!!r&&vfe(t,e,0)>-1}function mfe(t,e,r){for(var i=-1,n=t?t.length:0;++i<n;)if(r(e,t[i]))return!0;return!1}function yfe(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function vfe(t,e,r){if(e!==e)return yfe(t,_fe,r);for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}function _fe(t){return t!==t}function wfe(t,e){return t.has(e)}function bfe(t,e){return t?.[e]}function xfe(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function vj(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var Sfe=Array.prototype,Efe=Function.prototype,_j=Object.prototype,qS=jS["__core-js_shared__"],yj=(function(){var t=/[^.]+$/.exec(qS&&qS.keys&&qS.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),wj=Efe.toString,$S=_j.hasOwnProperty,Tfe=_j.toString,Cfe=RegExp("^"+wj.call($S).replace(cfe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kfe=Sfe.splice,Rfe=US(jS,"Map"),LS=US(jS,"Set"),Pf=US(Object,"create");function va(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Afe(){this.__data__=Pf?Pf(null):{}}function Ofe(t){return this.has(t)&&delete this.__data__[t]}function Ife(t){var e=this.__data__;if(Pf){var r=e[t];return r===BS?void 0:r}return $S.call(e,t)?e[t]:void 0}function Nfe(t){var e=this.__data__;return Pf?e[t]!==void 0:$S.call(e,t)}function Dfe(t,e){var r=this.__data__;return r[t]=Pf&&e===void 0?BS:e,this}va.prototype.clear=Afe;va.prototype.delete=Ofe;va.prototype.get=Ife;va.prototype.has=Nfe;va.prototype.set=Dfe;function il(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Ffe(){this.__data__=[]}function Mfe(t){var e=this.__data__,r=ng(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():kfe.call(e,r,1),!0}function Pfe(t){var e=this.__data__,r=ng(e,t);return r<0?void 0:e[r][1]}function qfe(t){return ng(this.__data__,t)>-1}function Lfe(t,e){var r=this.__data__,i=ng(r,t);return i<0?r.push([t,e]):r[i][1]=e,this}il.prototype.clear=Ffe;il.prototype.delete=Mfe;il.prototype.get=Pfe;il.prototype.has=qfe;il.prototype.set=Lfe;function nl(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Bfe(){this.__data__={hash:new va,map:new(Rfe||il),string:new va}}function jfe(t){return sg(this,t).delete(t)}function $fe(t){return sg(this,t).get(t)}function Ufe(t){return sg(this,t).has(t)}function Wfe(t,e){return sg(this,t).set(t,e),this}nl.prototype.clear=Bfe;nl.prototype.delete=jfe;nl.prototype.get=$fe;nl.prototype.has=Ufe;nl.prototype.set=Wfe;function ig(t){var e=-1,r=t?t.length:0;for(this.__data__=new nl;++e<r;)this.add(t[e])}function Hfe(t){return this.__data__.set(t,BS),this}function zfe(t){return this.__data__.has(t)}ig.prototype.add=ig.prototype.push=Hfe;ig.prototype.has=zfe;function ng(t,e){for(var r=t.length;r--;)if(Jfe(t[r][0],e))return r;return-1}function Xfe(t){if(!bj(t)||Yfe(t))return!1;var e=ece(t)||xfe(t)?Cfe:hfe;return e.test(Kfe(t))}function Vfe(t,e,r){var i=-1,n=gfe,s=t.length,a=!0,o=[],u=o;if(r)a=!1,n=mfe;else if(s>=ofe){var f=e?null:Gfe(t);if(f)return vj(f);a=!1,n=wfe,u=new ig}else u=e?[]:o;e:for(;++i<s;){var c=t[i],h=e?e(c):c;if(c=r||c!==0?c:0,a&&h===h){for(var d=u.length;d--;)if(u[d]===h)continue e;e&&u.push(h),o.push(c)}else n(u,h,r)||(u!==o&&u.push(h),o.push(c))}return o}var Gfe=LS&&1/vj(new LS([,-0]))[1]==lfe?function(t){return new LS(t)}:tce;function sg(t,e){var r=t.__data__;return Zfe(e)?r[typeof e=="string"?"string":"hash"]:r.map}function US(t,e){var r=bfe(t,e);return Xfe(r)?r:void 0}function Zfe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Yfe(t){return!!yj&&yj in t}function Kfe(t){if(t!=null){try{return wj.call(t)}catch{}try{return t+""}catch{}}return""}function Qfe(t){return t&&t.length?Vfe(t):[]}function Jfe(t,e){return t===e||t!==t&&e!==e}function ece(t){var e=bj(t)?Tfe.call(t):"";return e==ufe||e==ffe}function bj(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function tce(){}xj.exports=Qfe});var r6=w((qf,al)=>{var rce=200,ice="Expected a function",QS="__lodash_hash_undefined__",dg=1,ol=2,Dj=1/0,Fj=9007199254740991,ag="[object Arguments]",zS="[object Array]",Mj="[object Boolean]",Pj="[object Date]",qj="[object Error]",Lj="[object Function]",nce="[object GeneratorFunction]",og="[object Map]",Bj="[object Number]",sl="[object Object]",Ej="[object Promise]",jj="[object RegExp]",lg="[object Set]",$j="[object String]",Uj="[object Symbol]",XS="[object WeakMap]",Wj="[object ArrayBuffer]",ug="[object DataView]",sce="[object Float32Array]",ace="[object Float64Array]",oce="[object Int8Array]",lce="[object Int16Array]",uce="[object Int32Array]",fce="[object Uint8Array]",cce="[object Uint8ClampedArray]",hce="[object Uint16Array]",dce="[object Uint32Array]",pce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gce=/^\w*$/,mce=/^\./,yce=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vce=/[\\^$.*+?()[\]{}|]/g,_ce=/\\(\\)?/g,wce=/^\[object .+?Constructor\]$/,bce=/^(?:0|[1-9]\d*)$/,at={};at[sce]=at[ace]=at[oce]=at[lce]=at[uce]=at[fce]=at[cce]=at[hce]=at[dce]=!0;at[ag]=at[zS]=at[Wj]=at[Mj]=at[ug]=at[Pj]=at[qj]=at[Lj]=at[og]=at[Bj]=at[sl]=at[jj]=at[lg]=at[$j]=at[XS]=!1;var Hj=typeof global=="object"&&global&&global.Object===Object&&global,xce=typeof self=="object"&&self&&self.Object===Object&&self,ls=Hj||xce||Function("return this")(),zj=typeof qf=="object"&&qf&&!qf.nodeType&&qf,Tj=zj&&typeof al=="object"&&al&&!al.nodeType&&al,Sce=Tj&&Tj.exports===zj,Cj=Sce&&Hj.process,kj=(function(){try{return Cj&&Cj.binding("util")}catch{}})(),Rj=kj&&kj.isTypedArray;function Ece(t,e,r,i){for(var n=-1,s=t?t.length:0;++n<s;){var a=t[n];e(i,a,r(a),t)}return i}function Tce(t,e){for(var r=-1,i=t?t.length:0;++r<i;)if(e(t[r],r,t))return!0;return!1}function Cce(t){return function(e){return e?.[t]}}function kce(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}function Rce(t){return function(e){return t(e)}}function Ace(t,e){return t?.[e]}function VS(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function Oce(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}function Ice(t,e){return function(r){return t(e(r))}}function Nce(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var Dce=Array.prototype,Fce=Function.prototype,pg=Object.prototype,WS=ls["__core-js_shared__"],Aj=(function(){var t=/[^.]+$/.exec(WS&&WS.keys&&WS.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),Xj=Fce.toString,Ii=pg.hasOwnProperty,ll=pg.toString,Mce=RegExp("^"+Xj.call(Ii).replace(vce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oj=ls.Symbol,Ij=ls.Uint8Array,Pce=pg.propertyIsEnumerable,qce=Dce.splice,Lce=Ice(Object.keys,Object),GS=ul(ls,"DataView"),Lf=ul(ls,"Map"),ZS=ul(ls,"Promise"),YS=ul(ls,"Set"),KS=ul(ls,"WeakMap"),Bf=ul(Object,"create"),Bce=wa(GS),jce=wa(Lf),$ce=wa(ZS),Uce=wa(YS),Wce=wa(KS),fg=Oj?Oj.prototype:void 0,HS=fg?fg.valueOf:void 0,Nj=fg?fg.toString:void 0;function _a(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Hce(){this.__data__=Bf?Bf(null):{}}function zce(t){return this.has(t)&&delete this.__data__[t]}function Xce(t){var e=this.__data__;if(Bf){var r=e[t];return r===QS?void 0:r}return Ii.call(e,t)?e[t]:void 0}function Vce(t){var e=this.__data__;return Bf?e[t]!==void 0:Ii.call(e,t)}function Gce(t,e){var r=this.__data__;return r[t]=Bf&&e===void 0?QS:e,this}_a.prototype.clear=Hce;_a.prototype.delete=zce;_a.prototype.get=Xce;_a.prototype.has=Vce;_a.prototype.set=Gce;function fn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Zce(){this.__data__=[]}function Yce(t){var e=this.__data__,r=gg(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():qce.call(e,r,1),!0}function Kce(t){var e=this.__data__,r=gg(e,t);return r<0?void 0:e[r][1]}function Qce(t){return gg(this.__data__,t)>-1}function Jce(t,e){var r=this.__data__,i=gg(r,t);return i<0?r.push([t,e]):r[i][1]=e,this}fn.prototype.clear=Zce;fn.prototype.delete=Yce;fn.prototype.get=Kce;fn.prototype.has=Qce;fn.prototype.set=Jce;function cn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function ehe(){this.__data__={hash:new _a,map:new(Lf||fn),string:new _a}}function the(t){return mg(this,t).delete(t)}function rhe(t){return mg(this,t).get(t)}function ihe(t){return mg(this,t).has(t)}function nhe(t,e){return mg(this,t).set(t,e),this}cn.prototype.clear=ehe;cn.prototype.delete=the;cn.prototype.get=rhe;cn.prototype.has=ihe;cn.prototype.set=nhe;function cg(t){var e=-1,r=t?t.length:0;for(this.__data__=new cn;++e<r;)this.add(t[e])}function she(t){return this.__data__.set(t,QS),this}function ahe(t){return this.__data__.has(t)}cg.prototype.add=cg.prototype.push=she;cg.prototype.has=ahe;function un(t){this.__data__=new fn(t)}function ohe(){this.__data__=new fn}function lhe(t){return this.__data__.delete(t)}function uhe(t){return this.__data__.get(t)}function fhe(t){return this.__data__.has(t)}function che(t,e){var r=this.__data__;if(r instanceof fn){var i=r.__data__;if(!Lf||i.length<rce-1)return i.push([t,e]),this;r=this.__data__=new cn(i)}return r.set(t,e),this}un.prototype.clear=ohe;un.prototype.delete=lhe;un.prototype.get=uhe;un.prototype.has=fhe;un.prototype.set=che;function hhe(t,e){var r=os(t)||e6(t)?kce(t.length,String):[],i=r.length,n=!!i;for(var s in t)(e||Ii.call(t,s))&&!(n&&(s=="length"||Yj(s,i)))&&r.push(s);return r}function gg(t,e){for(var r=t.length;r--;)if(Jj(t[r][0],e))return r;return-1}function dhe(t,e,r,i){return phe(t,function(n,s,a){e(i,n,r(n),a)}),i}var phe=Ohe(mhe),ghe=Ihe();function mhe(t,e){return t&&ghe(t,e,hg)}function Vj(t,e){e=yg(e,t)?[e]:Gj(e);for(var r=0,i=e.length;t!=null&&r<i;)t=t[vg(e[r++])];return r&&r==i?t:void 0}function yhe(t){return ll.call(t)}function vhe(t,e){return t!=null&&e in Object(t)}function JS(t,e,r,i,n){return t===e?!0:t==null||e==null||!_g(t)&&!wg(e)?t!==t&&e!==e:_he(t,e,JS,r,i,n)}function _he(t,e,r,i,n,s){var a=os(t),o=os(e),u=zS,f=zS;a||(u=as(t),u=u==ag?sl:u),o||(f=as(e),f=f==ag?sl:f);var c=u==sl&&!VS(t),h=f==sl&&!VS(e),d=u==f;if(d&&!c)return s||(s=new un),a||Uhe(t)?Zj(t,e,r,i,n,s):Nhe(t,e,u,r,i,n,s);if(!(n&ol)){var p=c&&Ii.call(t,"__wrapped__"),g=h&&Ii.call(e,"__wrapped__");if(p||g){var y=p?t.value():t,v=g?e.value():e;return s||(s=new un),r(y,v,i,n,s)}}return d?(s||(s=new un),Dhe(t,e,r,i,n,s)):!1}function whe(t,e,r,i){var n=r.length,s=n,a=!i;if(t==null)return!s;for(t=Object(t);n--;){var o=r[n];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<s;){o=r[n];var u=o[0],f=t[u],c=o[1];if(a&&o[2]){if(f===void 0&&!(u in t))return!1}else{var h=new un;if(i)var d=i(f,c,u,t,e,h);if(!(d===void 0?JS(c,f,i,dg|ol,h):d))return!1}}return!0}function bhe(t){if(!_g(t)||qhe(t))return!1;var e=t6(t)||VS(t)?Mce:wce;return e.test(wa(t))}function xhe(t){return wg(t)&&rE(t.length)&&!!at[ll.call(t)]}function She(t){return typeof t=="function"?t:t==null?Xhe:typeof t=="object"?os(t)?Che(t[0],t[1]):The(t):Vhe(t)}function Ehe(t){if(!Lhe(t))return Lce(t);var e=[];for(var r in Object(t))Ii.call(t,r)&&r!="constructor"&&e.push(r);return e}function The(t){var e=Fhe(t);return e.length==1&&e[0][2]?Qj(e[0][0],e[0][1]):function(r){return r===t||whe(r,t,e)}}function Che(t,e){return yg(t)&&Kj(e)?Qj(vg(t),e):function(r){var i=Hhe(r,t);return i===void 0&&i===e?zhe(r,t):JS(e,i,void 0,dg|ol)}}function khe(t){return function(e){return Vj(e,t)}}function Rhe(t){if(typeof t=="string")return t;if(iE(t))return Nj?Nj.call(t):"";var e=t+"";return e=="0"&&1/t==-Dj?"-0":e}function Gj(t){return os(t)?t:Bhe(t)}function Ahe(t,e){return function(r,i){var n=os(r)?Ece:dhe,s=e?e():{};return n(r,t,She(i,2),s)}}function Ohe(t,e){return function(r,i){if(r==null)return r;if(!tE(r))return t(r,i);for(var n=r.length,s=e?n:-1,a=Object(r);(e?s--:++s<n)&&i(a[s],s,a)!==!1;);return r}}function Ihe(t){return function(e,r,i){for(var n=-1,s=Object(e),a=i(e),o=a.length;o--;){var u=a[t?o:++n];if(r(s[u],u,s)===!1)break}return e}}function Zj(t,e,r,i,n,s){var a=n&ol,o=t.length,u=e.length;if(o!=u&&!(a&&u>o))return!1;var f=s.get(t);if(f&&s.get(e))return f==e;var c=-1,h=!0,d=n&dg?new cg:void 0;for(s.set(t,e),s.set(e,t);++c<o;){var p=t[c],g=e[c];if(i)var y=a?i(g,p,c,e,t,s):i(p,g,c,t,e,s);if(y!==void 0){if(y)continue;h=!1;break}if(d){if(!Tce(e,function(v,b){if(!d.has(b)&&(p===v||r(p,v,i,n,s)))return d.add(b)})){h=!1;break}}else if(!(p===g||r(p,g,i,n,s))){h=!1;break}}return s.delete(t),s.delete(e),h}function Nhe(t,e,r,i,n,s,a){switch(r){case ug:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Wj:return!(t.byteLength!=e.byteLength||!i(new Ij(t),new Ij(e)));case Mj:case Pj:case Bj:return Jj(+t,+e);case qj:return t.name==e.name&&t.message==e.message;case jj:case $j:return t==e+"";case og:var o=Oce;case lg:var u=s&ol;if(o||(o=Nce),t.size!=e.size&&!u)return!1;var f=a.get(t);if(f)return f==e;s|=dg,a.set(t,e);var c=Zj(o(t),o(e),i,n,s,a);return a.delete(t),c;case Uj:if(HS)return HS.call(t)==HS.call(e)}return!1}function Dhe(t,e,r,i,n,s){var a=n&ol,o=hg(t),u=o.length,f=hg(e),c=f.length;if(u!=c&&!a)return!1;for(var h=u;h--;){var d=o[h];if(!(a?d in e:Ii.call(e,d)))return!1}var p=s.get(t);if(p&&s.get(e))return p==e;var g=!0;s.set(t,e),s.set(e,t);for(var y=a;++h<u;){d=o[h];var v=t[d],b=e[d];if(i)var k=a?i(b,v,d,e,t,s):i(v,b,d,t,e,s);if(!(k===void 0?v===b||r(v,b,i,n,s):k)){g=!1;break}y||(y=d=="constructor")}if(g&&!y){var N=t.constructor,E=e.constructor;N!=E&&"constructor"in t&&"constructor"in e&&!(typeof N=="function"&&N instanceof N&&typeof E=="function"&&E instanceof E)&&(g=!1)}return s.delete(t),s.delete(e),g}function mg(t,e){var r=t.__data__;return Phe(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Fhe(t){for(var e=hg(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,Kj(n)]}return e}function ul(t,e){var r=Ace(t,e);return bhe(r)?r:void 0}var as=yhe;(GS&&as(new GS(new ArrayBuffer(1)))!=ug||Lf&&as(new Lf)!=og||ZS&&as(ZS.resolve())!=Ej||YS&&as(new YS)!=lg||KS&&as(new KS)!=XS)&&(as=function(t){var e=ll.call(t),r=e==sl?t.constructor:void 0,i=r?wa(r):void 0;if(i)switch(i){case Bce:return ug;case jce:return og;case $ce:return Ej;case Uce:return lg;case Wce:return XS}return e});function Mhe(t,e,r){e=yg(e,t)?[e]:Gj(e);for(var i,n=-1,a=e.length;++n<a;){var s=vg(e[n]);if(!(i=t!=null&&r(t,s)))break;t=t[s]}if(i)return i;var a=t?t.length:0;return!!a&&rE(a)&&Yj(s,a)&&(os(t)||e6(t))}function Yj(t,e){return e=e??Fj,!!e&&(typeof t=="number"||bce.test(t))&&t>-1&&t%1==0&&t<e}function yg(t,e){if(os(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||iE(t)?!0:gce.test(t)||!pce.test(t)||e!=null&&t in Object(e)}function Phe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qhe(t){return!!Aj&&Aj in t}function Lhe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||pg;return t===r}function Kj(t){return t===t&&!_g(t)}function Qj(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var Bhe=eE(function(t){t=Whe(t);var e=[];return mce.test(t)&&e.push(""),t.replace(yce,function(r,i,n,s){e.push(n?s.replace(_ce,"$1"):i||r)}),e});function vg(t){if(typeof t=="string"||iE(t))return t;var e=t+"";return e=="0"&&1/t==-Dj?"-0":e}function wa(t){if(t!=null){try{return Xj.call(t)}catch{}try{return t+""}catch{}}return""}var jhe=Ahe(function(t,e,r){Ii.call(t,r)?t[r].push(e):t[r]=[e]});function eE(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(ice);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=t.apply(this,i);return r.cache=s.set(n,a),a};return r.cache=new(eE.Cache||cn),r}eE.Cache=cn;function Jj(t,e){return t===e||t!==t&&e!==e}function e6(t){return $he(t)&&Ii.call(t,"callee")&&(!Pce.call(t,"callee")||ll.call(t)==ag)}var os=Array.isArray;function tE(t){return t!=null&&rE(t.length)&&!t6(t)}function $he(t){return wg(t)&&tE(t)}function t6(t){var e=_g(t)?ll.call(t):"";return e==Lj||e==nce}function rE(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Fj}function _g(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function wg(t){return!!t&&typeof t=="object"}function iE(t){return typeof t=="symbol"||wg(t)&&ll.call(t)==Uj}var Uhe=Rj?Rce(Rj):xhe;function Whe(t){return t==null?"":Rhe(t)}function Hhe(t,e,r){var i=t==null?void 0:Vj(t,e);return i===void 0?r:i}function zhe(t,e){return t!=null&&Mhe(t,e,vhe)}function hg(t){return tE(t)?hhe(t):Ehe(t)}function Xhe(t){return t}function Vhe(t){return yg(t)?Cce(vg(t)):khe(t)}al.exports=jhe});var n6=w(fl=>{"use strict";var bg=fl&&fl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fl,"__esModule",{value:!0});fl.HeaderTransformer=void 0;var i6=bg(mj()),Ghe=bg(Wp()),Zhe=bg(Sj()),Yhe=bg(r6()),nE=class{constructor(e){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=e,e.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(e.headers)?this.setHeaders(e.headers):Ghe.default(e.headers)&&(this.headersTransform=e.headers)}transform(e,r){return this.shouldMapRow(e)?r(null,this.processRow(e)):r(null,{row:null,isValid:!0})}shouldMapRow(e){let{parserOptions:r}=this;if(!this.headersTransform&&r.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(e)){if(this.headersTransform)this.setHeaders(this.headersTransform(e));else if(this.shouldUseFirstRow)this.setHeaders(e);else return!0;return!1}return!0}processRow(e){if(!this.headers)return{row:e,isValid:!0};let{parserOptions:r}=this;if(!r.discardUnmappedColumns&&e.length>this.headersLength){if(!r.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${e.length}`);return{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}}return r.strictColumnHandling&&e.length<this.headersLength?{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}:{row:this.mapHeaders(e),isValid:!0}}mapHeaders(e){let r={},{headers:i,headersLength:n}=this;for(let s=0;s<n;s+=1){let a=i[s];if(!i6.default(a)){let o=e[s];i6.default(o)?r[a]="":r[a]=o}}return r}setHeaders(e){var r;let i=e.filter(n=>!!n);if(Zhe.default(i).length!==i.length){let n=Yhe.default(i),s=Object.keys(n).filter(a=>n[a].length>1);throw new Error(`Duplicate headers found ${JSON.stringify(s)}`)}this.headers=e,this.receivedHeaders=!0,this.headersLength=((r=this.headers)===null||r===void 0?void 0:r.length)||0}};fl.HeaderTransformer=nE});var s6=w(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.HeaderTransformer=cl.RowTransformerValidator=void 0;var Khe=pj();Object.defineProperty(cl,"RowTransformerValidator",{enumerable:!0,get:function(){return Khe.RowTransformerValidator}});var Qhe=n6();Object.defineProperty(cl,"HeaderTransformer",{enumerable:!0,get:function(){return Qhe.HeaderTransformer}})});var us=w(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});xg.Token=void 0;var sE=class{constructor(e){this.token=e.token,this.startCursor=e.startCursor,this.endCursor=e.endCursor}static isTokenRowDelimiter(e){let r=e.token;return r==="\r"||r===`
22
+ `||r===`\r
23
+ `}static isTokenCarriageReturn(e,r){return e.token===r.carriageReturn}static isTokenComment(e,r){return r.supportsComments&&!!e&&e.token===r.comment}static isTokenEscapeCharacter(e,r){return e.token===r.escapeChar}static isTokenQuote(e,r){return e.token===r.quote}static isTokenDelimiter(e,r){return e.token===r.delimiter}};xg.Token=sE});var oE=w(Sg=>{"use strict";Object.defineProperty(Sg,"__esModule",{value:!0});Sg.Scanner=void 0;var a6=us(),Jhe=/((?:\r\n)|\n|\r)/,aE=class{constructor(e){this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor:e}=this,r=this.parserOptions.NEXT_TOKEN_REGEXP;if(e.search(r)===-1)return null;let i=r.exec(e);if(i==null)return null;let n=i[1],s=this.cursor+(i.index||0);return new a6.Token({token:n,startCursor:s,endCursor:s+n.length-1})}get nextCharacterToken(){let{cursor:e,lineLength:r}=this;return r<=e?null:new a6.Token({token:this.line[e],startCursor:e,endCursor:e})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let e=Jhe.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(e){return this.cursor=e,this}advanceToToken(e){return this.cursor=e.startCursor,this}advancePastToken(e){return this.cursor=e.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}};Sg.Scanner=aE});var Tg=w(Eg=>{"use strict";Object.defineProperty(Eg,"__esModule",{value:!0});Eg.ColumnFormatter=void 0;var lE=class{constructor(e){e.trim?this.format=r=>r.trim():e.ltrim?this.format=r=>r.trimLeft():e.rtrim?this.format=r=>r.trimRight():this.format=r=>r}};Eg.ColumnFormatter=lE});var fE=w(Cg=>{"use strict";Object.defineProperty(Cg,"__esModule",{value:!0});Cg.NonQuotedColumnParser=void 0;var ede=Tg(),o6=us(),uE=class{constructor(e){this.parserOptions=e,this.columnFormatter=new ede.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;let{parserOptions:r}=this,i=[],n=e.nextCharacterToken;for(;n&&!(o6.Token.isTokenDelimiter(n,r)||o6.Token.isTokenRowDelimiter(n));n=e.nextCharacterToken)i.push(n.token),e.advancePastToken(n);return this.columnFormatter.format(i.join(""))}};Cg.NonQuotedColumnParser=uE});var hE=w(kg=>{"use strict";Object.defineProperty(kg,"__esModule",{value:!0});kg.QuotedColumnParser=void 0;var tde=Tg(),hl=us(),cE=class{constructor(e){this.parserOptions=e,this.columnFormatter=new tde.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;let r=e.cursor,{foundClosingQuote:i,col:n}=this.gatherDataBetweenQuotes(e);if(!i){if(e.advanceTo(r),!e.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${e.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(e),n}gatherDataBetweenQuotes(e){let{parserOptions:r}=this,i=!1,n=!1,s=[],a=e.nextCharacterToken;for(;!n&&a!==null;a=e.nextCharacterToken){let o=hl.Token.isTokenQuote(a,r);if(!i&&o)i=!0;else if(i)if(hl.Token.isTokenEscapeCharacter(a,r)){e.advancePastToken(a);let u=e.nextCharacterToken;u!==null&&(hl.Token.isTokenQuote(u,r)||hl.Token.isTokenEscapeCharacter(u,r))?(s.push(u.token),a=u):o?n=!0:s.push(a.token)}else o?n=!0:s.push(a.token);e.advancePastToken(a)}return{col:this.columnFormatter.format(s.join("")),foundClosingQuote:n}}checkForMalformedColumn(e){let{parserOptions:r}=this,{nextNonSpaceToken:i}=e;if(i){let n=hl.Token.isTokenDelimiter(i,r),s=hl.Token.isTokenRowDelimiter(i);if(!(n||s)){let a=e.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${r.escapedDelimiter}' OR new line got: '${i.token}'. at '${a}`)}e.advanceToToken(i)}else e.hasMoreData||e.advancePastLine()}};kg.QuotedColumnParser=cE});var l6=w(Rg=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});Rg.ColumnParser=void 0;var rde=fE(),ide=hE(),nde=us(),dE=class{constructor(e){this.parserOptions=e,this.quotedColumnParser=new ide.QuotedColumnParser(e),this.nonQuotedColumnParser=new rde.NonQuotedColumnParser(e)}parse(e){let{nextNonSpaceToken:r}=e;return r!==null&&nde.Token.isTokenQuote(r,this.parserOptions)?(e.advanceToToken(r),this.quotedColumnParser.parse(e)):this.nonQuotedColumnParser.parse(e)}};Rg.ColumnParser=dE});var pE=w(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.ColumnFormatter=Ni.QuotedColumnParser=Ni.NonQuotedColumnParser=Ni.ColumnParser=void 0;var sde=l6();Object.defineProperty(Ni,"ColumnParser",{enumerable:!0,get:function(){return sde.ColumnParser}});var ade=fE();Object.defineProperty(Ni,"NonQuotedColumnParser",{enumerable:!0,get:function(){return ade.NonQuotedColumnParser}});var ode=hE();Object.defineProperty(Ni,"QuotedColumnParser",{enumerable:!0,get:function(){return ode.QuotedColumnParser}});var lde=Tg();Object.defineProperty(Ni,"ColumnFormatter",{enumerable:!0,get:function(){return lde.ColumnFormatter}})});var yE=w(Ag=>{"use strict";Object.defineProperty(Ag,"__esModule",{value:!0});Ag.RowParser=void 0;var ude=pE(),dl=us(),gE="",mE=class{constructor(e){this.parserOptions=e,this.columnParser=new ude.ColumnParser(e)}static isEmptyRow(e){return e.join(gE).replace(/\s+/g,gE)===gE}parse(e){let{parserOptions:r}=this,{hasMoreData:i}=e,n=e,s=[],a=this.getStartToken(n,s);for(;a;){if(dl.Token.isTokenRowDelimiter(a))return n.advancePastToken(a),!n.hasMoreCharacters&&dl.Token.isTokenCarriageReturn(a,r)&&i?null:(n.truncateToCursor(),s);if(!this.shouldSkipColumnParse(n,a,s)){let o=this.columnParser.parse(n);if(o===null)return null;s.push(o)}a=n.nextNonSpaceToken}return i?null:(n.truncateToCursor(),s)}getStartToken(e,r){let i=e.nextNonSpaceToken;return i!==null&&dl.Token.isTokenDelimiter(i,this.parserOptions)?(r.push(""),e.nextNonSpaceToken):i}shouldSkipColumnParse(e,r,i){let{parserOptions:n}=this;if(dl.Token.isTokenDelimiter(r,n)){e.advancePastToken(r);let s=e.nextCharacterToken;if(!e.hasMoreCharacters||s!==null&&dl.Token.isTokenRowDelimiter(s)||s!==null&&dl.Token.isTokenDelimiter(s,n))return i.push(""),!0}return!1}};Ag.RowParser=mE});var f6=w(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});Og.Parser=void 0;var fde=oE(),u6=yE(),cde=us(),vE=class t{constructor(e){this.parserOptions=e,this.rowParser=new u6.RowParser(this.parserOptions)}static removeBOM(e){return e&&e.charCodeAt(0)===65279?e.slice(1):e}parse(e,r){let i=new fde.Scanner({line:t.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:r});return this.parserOptions.supportsComments?this.parseWithComments(i):this.parseWithoutComments(i)}parseWithoutComments(e){let r=[],i=!0;for(;i;)i=this.parseRow(e,r);return{line:e.line,rows:r}}parseWithComments(e){let{parserOptions:r}=this,i=[];for(let n=e.nextCharacterToken;n!==null;n=e.nextCharacterToken)if(cde.Token.isTokenComment(n,r)){if(e.advancePastLine()===null)return{line:e.lineFromCursor,rows:i};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:i};e.truncateToCursor()}else if(!this.parseRow(e,i))break;return{line:e.line,rows:i}}parseRow(e,r){if(!e.nextNonSpaceToken)return!1;let n=this.rowParser.parse(e);return n===null?!1:(this.parserOptions.ignoreEmpty&&u6.RowParser.isEmptyRow(n)||r.push(n),!0)}};Og.Parser=vE});var c6=w(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.QuotedColumnParser=or.NonQuotedColumnParser=or.ColumnParser=or.Token=or.Scanner=or.RowParser=or.Parser=void 0;var hde=f6();Object.defineProperty(or,"Parser",{enumerable:!0,get:function(){return hde.Parser}});var dde=yE();Object.defineProperty(or,"RowParser",{enumerable:!0,get:function(){return dde.RowParser}});var pde=oE();Object.defineProperty(or,"Scanner",{enumerable:!0,get:function(){return pde.Scanner}});var gde=us();Object.defineProperty(or,"Token",{enumerable:!0,get:function(){return gde.Token}});var _E=pE();Object.defineProperty(or,"ColumnParser",{enumerable:!0,get:function(){return _E.ColumnParser}});Object.defineProperty(or,"NonQuotedColumnParser",{enumerable:!0,get:function(){return _E.NonQuotedColumnParser}});Object.defineProperty(or,"QuotedColumnParser",{enumerable:!0,get:function(){return _E.QuotedColumnParser}})});var bE=w(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});Ig.CsvParserStream=void 0;var mde=Y("string_decoder"),yde=Y("stream"),h6=s6(),vde=c6(),wE=class t extends yde.Transform{constructor(e){super({objectMode:e.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=e,this.parser=new vde.Parser(e),this.headerTransformer=new h6.HeaderTransformer(e),this.decoder=new mde.StringDecoder(e.encoding),this.rowTransformerValidator=new h6.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(e){return this.rowTransformerValidator.rowTransform=e,this}validate(e){return this.rowTransformerValidator.rowValidator=e,this}emit(e,...r){return e==="end"?(this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1):super.emit(e,...r)}_transform(e,r,i){if(this.hasHitRowLimit)return i();let n=t.wrapDoneCallback(i);try{let{lines:s}=this,a=s+this.decoder.write(e),o=this.parse(a,!0);return this.processRows(o,n)}catch(s){return n(s)}}_flush(e){let r=t.wrapDoneCallback(e);if(this.hasHitRowLimit)return r();try{let i=this.lines+this.decoder.end(),n=this.parse(i,!1);return this.processRows(n,r)}catch(i){return r(i)}}parse(e,r){if(!e)return[];let{line:i,rows:n}=this.parser.parse(e,r);return this.lines=i,n}processRows(e,r){let i=e.length,n=s=>{let a=f=>{if(f)return r(f);if(s%100===0){setImmediate(()=>n(s+1));return}return n(s+1)};if(this.checkAndEmitHeaders(),s>=i||this.hasHitRowLimit)return r();if(this.parsedLineCount+=1,this.shouldSkipLine)return a();let o=e[s];this.rowCount+=1,this.parsedRowCount+=1;let u=this.rowCount;return this.transformRow(o,(f,c)=>{if(f)return this.rowCount-=1,a(f);if(!c)return a(new Error("expected transform result"));if(!c.isValid)this.emit("data-invalid",c.row,u,c.reason);else if(c.row)return this.pushRow(c.row,a);return a()})};n(0)}transformRow(e,r){try{this.headerTransformer.transform(e,(i,n)=>i?r(i):n?n.isValid?n.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(n.row,r):this.skipRow(r):(this.rowCount-=1,this.parsedRowCount-=1,r(null,{row:null,isValid:!0})):this.shouldEmitRows?r(null,{isValid:!1,row:e}):this.skipRow(r):r(new Error("Expected result from header transform")))}catch(i){r(i)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(e){return this.rowCount-=1,e(null,{row:null,isValid:!0})}pushRow(e,r){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),r()}catch(i){r(i)}}static wrapDoneCallback(e){let r=!1;return(i,...n)=>{if(i){if(r)throw i;r=!0,e(i);return}e(...n)}}};Ig.CsvParserStream=wE});var p6=w(vt=>{"use strict";var d6=vt&&vt.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),_de=vt&&vt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wde=vt&&vt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&d6(e,t,r);return _de(e,t),e},bde=vt&&vt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&d6(e,t,r)};Object.defineProperty(vt,"__esModule",{value:!0});vt.parseString=vt.parseFile=vt.parseStream=vt.parse=vt.ParserOptions=vt.CsvParserStream=void 0;var xde=wde(Y("fs")),Sde=Y("stream"),Ng=FS(),Dg=bE();bde(MS(),vt);var Ede=bE();Object.defineProperty(vt,"CsvParserStream",{enumerable:!0,get:function(){return Ede.CsvParserStream}});var Tde=FS();Object.defineProperty(vt,"ParserOptions",{enumerable:!0,get:function(){return Tde.ParserOptions}});vt.parse=t=>new Dg.CsvParserStream(new Ng.ParserOptions(t));vt.parseStream=(t,e)=>t.pipe(new Dg.CsvParserStream(new Ng.ParserOptions(e)));vt.parseFile=(t,e={})=>xde.createReadStream(t).pipe(new Dg.CsvParserStream(new Ng.ParserOptions(e)));vt.parseString=(t,e)=>{let r=new Sde.Readable;return r.push(t),r.push(null),r.pipe(new Dg.CsvParserStream(new Ng.ParserOptions(e)))}});var g6=w(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.CsvParserStream=Ge.ParserOptions=Ge.parseFile=Ge.parseStream=Ge.parseString=Ge.parse=Ge.FormatterOptions=Ge.CsvFormatterStream=Ge.writeToPath=Ge.writeToString=Ge.writeToBuffer=Ge.writeToStream=Ge.write=Ge.format=void 0;var fs=fj();Object.defineProperty(Ge,"format",{enumerable:!0,get:function(){return fs.format}});Object.defineProperty(Ge,"write",{enumerable:!0,get:function(){return fs.write}});Object.defineProperty(Ge,"writeToStream",{enumerable:!0,get:function(){return fs.writeToStream}});Object.defineProperty(Ge,"writeToBuffer",{enumerable:!0,get:function(){return fs.writeToBuffer}});Object.defineProperty(Ge,"writeToString",{enumerable:!0,get:function(){return fs.writeToString}});Object.defineProperty(Ge,"writeToPath",{enumerable:!0,get:function(){return fs.writeToPath}});Object.defineProperty(Ge,"CsvFormatterStream",{enumerable:!0,get:function(){return fs.CsvFormatterStream}});Object.defineProperty(Ge,"FormatterOptions",{enumerable:!0,get:function(){return fs.FormatterOptions}});var pl=p6();Object.defineProperty(Ge,"parse",{enumerable:!0,get:function(){return pl.parse}});Object.defineProperty(Ge,"parseString",{enumerable:!0,get:function(){return pl.parseString}});Object.defineProperty(Ge,"parseStream",{enumerable:!0,get:function(){return pl.parseStream}});Object.defineProperty(Ge,"parseFile",{enumerable:!0,get:function(){return pl.parseFile}});Object.defineProperty(Ge,"ParserOptions",{enumerable:!0,get:function(){return pl.ParserOptions}});Object.defineProperty(Ge,"CsvParserStream",{enumerable:!0,get:function(){return pl.CsvParserStream}})});var m6=w((xE,SE)=>{(function(t,e){typeof xE=="object"&&typeof SE<"u"?SE.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(xE,(function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,n=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},o=function(g){return(g=+g)+(g>68?1900:2e3)},u=function(g){return function(y){this[g]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),b=60*v[1]+(+v[2]||0);return b===0?0:v[0]==="+"?-b:b})(g)}],c=function(g){var y=a[g];return y&&(y.indexOf?y:y.s.concat(y.f))},h=function(g,y){var v,b=a.meridiem;if(b){for(var k=1;k<=24;k+=1)if(g.indexOf(b(k,0,y))>-1){v=k>12;break}}else v=g===(y?"pm":"PM");return v},d={A:[s,function(g){this.afternoon=h(g,!1)}],a:[s,function(g){this.afternoon=h(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[i,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[i,u("day")],Do:[s,function(g){var y=a.ordinal,v=g.match(/\d+/);if(this.day=v[0],y)for(var b=1;b<=31;b+=1)y(b).replace(/\[|\]/g,"")===g&&(this.day=b)}],w:[n,u("week")],ww:[i,u("week")],M:[n,u("month")],MM:[i,u("month")],MMM:[s,function(g){var y=c("months"),v=(c("monthsShort")||y.map((function(b){return b.slice(0,3)}))).indexOf(g)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[s,function(g){var y=c("months").indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[i,function(g){this.year=o(g)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function p(g){var y,v;y=g,v=a&&a.formats;for(var b=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(L,I,Z){var H=Z&&Z.toUpperCase();return I||v[Z]||t[Z]||v[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(O,q,B){return q||B.slice(1)}))}))).match(e),k=b.length,N=0;N<k;N+=1){var E=b[N],U=d[E],ee=U&&U[0],F=U&&U[1];b[N]=F?{regex:ee,parser:F}:E.replace(/^\[|\]$/g,"")}return function(L){for(var I={},Z=0,H=0;Z<k;Z+=1){var O=b[Z];if(typeof O=="string")H+=O.length;else{var q=O.regex,B=O.parser,J=L.slice(H),T=q.exec(J)[0];B.call(I,T),L=L.replace(T,"")}}return(function(M){var $=M.afternoon;if($!==void 0){var z=M.hours;$?z<12&&(M.hours+=12):z===12&&(M.hours=0),delete M.afternoon}})(I),I}}return function(g,y,v){v.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(o=g.parseTwoDigitYear);var b=y.prototype,k=b.parse;b.parse=function(N){var E=N.date,U=N.utc,ee=N.args;this.$u=U;var F=ee[1];if(typeof F=="string"){var L=ee[2]===!0,I=ee[3]===!0,Z=L||I,H=ee[2];I&&(H=ee[2]),a=this.$locale(),!L&&H&&(a=v.Ls[H]),this.$d=(function(J,T,M,$){try{if(["x","X"].indexOf(T)>-1)return new Date((T==="X"?1e3:1)*J);var z=p(T)(J),re=z.year,se=z.month,ue=z.day,pe=z.hours,Ye=z.minutes,Se=z.seconds,Be=z.milliseconds,je=z.zone,Ae=z.week,Ke=new Date,pt=ue||(re||se?1:Ke.getDate()),Nt=re||Ke.getFullYear(),Br=0;re&&!se||(Br=se>0?se-1:Ke.getMonth());var ti,Ui=pe||0,ri=Ye||0,jr=Se||0,Wi=Be||0;return je?new Date(Date.UTC(Nt,Br,pt,Ui,ri,jr,Wi+60*je.offset*1e3)):M?new Date(Date.UTC(Nt,Br,pt,Ui,ri,jr,Wi)):(ti=new Date(Nt,Br,pt,Ui,ri,jr,Wi),Ae&&(ti=$(ti).week(Ae).toDate()),ti)}catch{return new Date("")}})(E,F,U,v),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),Z&&E!=this.format(F)&&(this.$d=new Date("")),a={}}else if(F instanceof Array)for(var O=F.length,q=1;q<=O;q+=1){ee[1]=F[q-1];var B=v.apply(this,ee);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}q===O&&(this.$d=new Date(""))}else k.call(this,N)}}}))});var y6=w((EE,TE)=>{(function(t,e){typeof EE=="object"&&typeof TE<"u"?TE.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_utc=e()})(EE,(function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(i,n,s){var a=n.prototype;s.utc=function(p){var g={date:p,utc:!0,args:arguments};return new n(g)},a.utc=function(p){var g=s(this.toDate(),{locale:this.$L,utc:!0});return p?g.add(this.utcOffset(),t):g},a.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=a.parse;a.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),o.call(this,p)};var u=a.init;a.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else u.call(this)};var f=a.utcOffset;a.utcOffset=function(p,g){var y=this.$utils().u;if(y(p))return this.$u?0:y(this.$offset)?f.call(this):this.$offset;if(typeof p=="string"&&(p=(function(N){N===void 0&&(N="");var E=N.match(e);if(!E)return null;var U=(""+E[0]).match(r)||["-",0,0],ee=U[0],F=60*+U[1]+ +U[2];return F===0?0:ee==="+"?F:-F})(p),p===null))return this;var v=Math.abs(p)<=16?60*p:p;if(v===0)return this.utc(g);var b=this.clone();if(g)return b.$offset=v,b.$u=!1,b;var k=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(b=this.local().add(v+k,t)).$offset=v,b.$x.$localOffset=k,b};var c=a.format;a.format=function(p){var g=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,g)},a.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var h=a.toDate;a.toDate=function(p){return p==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var d=a.diff;a.diff=function(p,g,y){if(p&&this.$u===p.$u)return d.call(this,p,g,y);var v=this.local(),b=s(p).local();return d.call(v,b,g,y)}}}))});var v6=w((CE,kE)=>{(function(t,e){typeof CE=="object"&&typeof kE<"u"?kE.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(CE,(function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",n="second",s="minute",a="hour",o="day",u="week",f="month",c="quarter",h="year",d="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var q=["th","st","nd","rd"],B=O%100;return"["+O+(q[(B-20)%10]||q[B]||q[0])+"]"}},b=function(O,q,B){var J=String(O);return!J||J.length>=q?O:""+Array(q+1-J.length).join(B)+O},k={s:b,z:function(O){var q=-O.utcOffset(),B=Math.abs(q),J=Math.floor(B/60),T=B%60;return(q<=0?"+":"-")+b(J,2,"0")+":"+b(T,2,"0")},m:function O(q,B){if(q.date()<B.date())return-O(B,q);var J=12*(B.year()-q.year())+(B.month()-q.month()),T=q.clone().add(J,f),M=B-T<0,$=q.clone().add(J+(M?-1:1),f);return+(-(J+(B-T)/(M?T-$:$-T))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:f,y:h,w:u,d:o,D:d,h:a,m:s,s:n,ms:i,Q:c}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},N="en",E={};E[N]=v;var U="$isDayjsObject",ee=function(O){return O instanceof Z||!(!O||!O[U])},F=function O(q,B,J){var T;if(!q)return N;if(typeof q=="string"){var M=q.toLowerCase();E[M]&&(T=M),B&&(E[M]=B,T=M);var $=q.split("-");if(!T&&$.length>1)return O($[0])}else{var z=q.name;E[z]=q,T=z}return!J&&T&&(N=T),T||!J&&N},L=function(O,q){if(ee(O))return O.clone();var B=typeof q=="object"?q:{};return B.date=O,B.args=arguments,new Z(B)},I=k;I.l=F,I.i=ee,I.w=function(O,q){return L(O,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var Z=(function(){function O(B){this.$L=F(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[U]=!0}var q=O.prototype;return q.parse=function(B){this.$d=(function(J){var T=J.date,M=J.utc;if(T===null)return new Date(NaN);if(I.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var $=T.match(g);if($){var z=$[2]-1||0,re=($[7]||"0").substring(0,3);return M?new Date(Date.UTC($[1],z,$[3]||1,$[4]||0,$[5]||0,$[6]||0,re)):new Date($[1],z,$[3]||1,$[4]||0,$[5]||0,$[6]||0,re)}}return new Date(T)})(B),this.init()},q.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},q.$utils=function(){return I},q.isValid=function(){return this.$d.toString()!==p},q.isSame=function(B,J){var T=L(B);return this.startOf(J)<=T&&T<=this.endOf(J)},q.isAfter=function(B,J){return L(B)<this.startOf(J)},q.isBefore=function(B,J){return this.endOf(J)<L(B)},q.$g=function(B,J,T){return I.u(B)?this[J]:this.set(T,B)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(B,J){var T=this,M=!!I.u(J)||J,$=I.p(B),z=function(je,Ae){var Ke=I.w(T.$u?Date.UTC(T.$y,Ae,je):new Date(T.$y,Ae,je),T);return M?Ke:Ke.endOf(o)},re=function(je,Ae){return I.w(T.toDate()[je].apply(T.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(Ae)),T)},se=this.$W,ue=this.$M,pe=this.$D,Ye="set"+(this.$u?"UTC":"");switch($){case h:return M?z(1,0):z(31,11);case f:return M?z(1,ue):z(0,ue+1);case u:var Se=this.$locale().weekStart||0,Be=(se<Se?se+7:se)-Se;return z(M?pe-Be:pe+(6-Be),ue);case o:case d:return re(Ye+"Hours",0);case a:return re(Ye+"Minutes",1);case s:return re(Ye+"Seconds",2);case n:return re(Ye+"Milliseconds",3);default:return this.clone()}},q.endOf=function(B){return this.startOf(B,!1)},q.$set=function(B,J){var T,M=I.p(B),$="set"+(this.$u?"UTC":""),z=(T={},T[o]=$+"Date",T[d]=$+"Date",T[f]=$+"Month",T[h]=$+"FullYear",T[a]=$+"Hours",T[s]=$+"Minutes",T[n]=$+"Seconds",T[i]=$+"Milliseconds",T)[M],re=M===o?this.$D+(J-this.$W):J;if(M===f||M===h){var se=this.clone().set(d,1);se.$d[z](re),se.init(),this.$d=se.set(d,Math.min(this.$D,se.daysInMonth())).$d}else z&&this.$d[z](re);return this.init(),this},q.set=function(B,J){return this.clone().$set(B,J)},q.get=function(B){return this[I.p(B)]()},q.add=function(B,J){var T,M=this;B=Number(B);var $=I.p(J),z=function(ue){var pe=L(M);return I.w(pe.date(pe.date()+Math.round(ue*B)),M)};if($===f)return this.set(f,this.$M+B);if($===h)return this.set(h,this.$y+B);if($===o)return z(1);if($===u)return z(7);var re=(T={},T[s]=e,T[a]=r,T[n]=t,T)[$]||1,se=this.$d.getTime()+B*re;return I.w(se,this)},q.subtract=function(B,J){return this.add(-1*B,J)},q.format=function(B){var J=this,T=this.$locale();if(!this.isValid())return T.invalidDate||p;var M=B||"YYYY-MM-DDTHH:mm:ssZ",$=I.z(this),z=this.$H,re=this.$m,se=this.$M,ue=T.weekdays,pe=T.months,Ye=T.meridiem,Se=function(Ae,Ke,pt,Nt){return Ae&&(Ae[Ke]||Ae(J,M))||pt[Ke].slice(0,Nt)},Be=function(Ae){return I.s(z%12||12,Ae,"0")},je=Ye||function(Ae,Ke,pt){var Nt=Ae<12?"AM":"PM";return pt?Nt.toLowerCase():Nt};return M.replace(y,(function(Ae,Ke){return Ke||(function(pt){switch(pt){case"YY":return String(J.$y).slice(-2);case"YYYY":return I.s(J.$y,4,"0");case"M":return se+1;case"MM":return I.s(se+1,2,"0");case"MMM":return Se(T.monthsShort,se,pe,3);case"MMMM":return Se(pe,se);case"D":return J.$D;case"DD":return I.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return Se(T.weekdaysMin,J.$W,ue,2);case"ddd":return Se(T.weekdaysShort,J.$W,ue,3);case"dddd":return ue[J.$W];case"H":return String(z);case"HH":return I.s(z,2,"0");case"h":return Be(1);case"hh":return Be(2);case"a":return je(z,re,!0);case"A":return je(z,re,!1);case"m":return String(re);case"mm":return I.s(re,2,"0");case"s":return String(J.$s);case"ss":return I.s(J.$s,2,"0");case"SSS":return I.s(J.$ms,3,"0");case"Z":return $}return null})(Ae)||$.replace(":","")}))},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(B,J,T){var M,$=this,z=I.p(J),re=L(B),se=(re.utcOffset()-this.utcOffset())*e,ue=this-re,pe=function(){return I.m($,re)};switch(z){case h:M=pe()/12;break;case f:M=pe();break;case c:M=pe()/3;break;case u:M=(ue-se)/6048e5;break;case o:M=(ue-se)/864e5;break;case a:M=ue/r;break;case s:M=ue/e;break;case n:M=ue/t;break;default:M=ue}return T?M:I.a(M)},q.daysInMonth=function(){return this.endOf(f).$D},q.$locale=function(){return E[this.$L]},q.locale=function(B,J){if(!B)return this.$L;var T=this.clone(),M=F(B,J,!0);return M&&(T.$L=M),T},q.clone=function(){return I.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},O})(),H=Z.prototype;return L.prototype=H,[["$ms",i],["$s",n],["$m",s],["$H",a],["$W",o],["$M",f],["$y",h],["$D",d]].forEach((function(O){H[O[1]]=function(q){return this.$g(q,O[0],O[1])}})),L.extend=function(O,q){return O.$i||(O(q,Z,L),O.$i=!0),L},L.locale=F,L.isDayjs=ee,L.unix=function(O){return L(1e3*O)},L.en=E[N],L.Ls=E,L.p={},L}))});var x6=w((eDe,b6)=>{var _6=Y("fs"),w6=g6(),Cde=m6(),kde=y6(),jf=v6().extend(Cde).extend(kde),Rde=yf(),{fs:{exists:Ade}}=sr(),Ode={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}},RE=class{constructor(e){this.workbook=e,this.worksheet=null}async readFile(e,r){if(r=r||{},!await Ade(e))throw new Error(`File not found: ${e}`);let i=_6.createReadStream(e),n=await this.read(i,r);return i.close(),n}read(e,r){return r=r||{},new Promise((i,n)=>{let s=this.workbook.addWorksheet(r.sheetName),a=r.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],o=r.map||function(f){if(f==="")return null;let c=Number(f);if(!Number.isNaN(c)&&c!==1/0)return c;let h=a.reduce((p,g)=>{if(p)return p;let y=jf(f,g,!0);return y.isValid()?y:null},null);if(h)return new Date(h.valueOf());let d=Ode[f];return d!==void 0?d:f},u=w6.parse(r.parserOptions).on("data",f=>{s.addRow(f.map(o))}).on("end",()=>{u.emit("worksheet",s)});u.on("worksheet",i).on("error",n),e.pipe(u)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(e,r){return new Promise((i,n)=>{r=r||{};let s=this.workbook.getWorksheet(r.sheetName||r.sheetId),a=w6.format(r.formatterOptions);e.on("finish",()=>{i()}),a.on("error",n),a.pipe(e);let{dateFormat:o,dateUTC:u}=r,f=r.map||(d=>{if(d){if(d.text||d.hyperlink)return d.hyperlink||d.text||"";if(d.formula||d.result)return d.result||"";if(d instanceof Date)return o?u?jf.utc(d).format(o):jf(d).format(o):u?jf.utc(d).format():jf(d).format();if(d.error)return d.error;if(typeof d=="object")return JSON.stringify(d)}return d}),c=r.includeEmptyRows===void 0||r.includeEmptyRows,h=1;s&&s.eachRow((d,p)=>{if(c)for(;h++<p-1;)a.write([]);let{values:g}=d;g.shift(),a.write(g.map(f)),h=p}),a.end()})}writeFile(e,r){r=r||{};let i={encoding:r.encoding||"utf8"},n=_6.createWriteStream(e,i);return this.write(n,r)}async writeBuffer(e){let r=new Rde;return await this.write(r,e),r.read()}};b6.exports=RE});var T6=w((tDe,E6)=>{"use strict";var S6=LA(),Ide=Sv(),Nde=fS(),Dde=x6(),AE=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new Ide}get xlsx(){return this._xlsx||(this._xlsx=new Nde(this)),this._xlsx}get csv(){return this._csv||(this._csv=new Dde(this)),this._csv}get nextId(){for(let e=1;e<this._worksheets.length;e++)if(!this._worksheets[e])return e;return this._worksheets.length||1}addWorksheet(e,r){let i=this.nextId;r&&(typeof r=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),r={properties:{tabColor:{argb:r}}}):(r.argb||r.theme||r.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),r={properties:{tabColor:r}}));let n=this._worksheets.reduce((o,u)=>(u&&u.orderNo)>o?u.orderNo:o,0),s=Object.assign({},r,{id:i,name:e,orderNo:n+1,workbook:this}),a=new S6(s);return this._worksheets[i]=a,a}removeWorksheetEx(e){delete this._worksheets[e.id]}removeWorksheet(e){let r=this.getWorksheet(e);r&&r.destroy()}getWorksheet(e){if(e===void 0)return this._worksheets.find(Boolean);if(typeof e=="number")return this._worksheets[e];if(typeof e=="string")return this._worksheets.find(r=>r&&r.name===e)}get worksheets(){return this._worksheets.slice(1).sort((e,r)=>e.orderNo-r.orderNo).filter(Boolean)}eachSheet(e){this.worksheets.forEach(r=>{e(r,r.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(e){let r=this.media.length;return this.media.push(Object.assign({},e,{type:"image"})),r}getImage(e){return this.media[e]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(e=>e.model),sheets:this.worksheets.map(e=>e.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(e){this.creator=e.creator,this.lastModifiedBy=e.lastModifiedBy,this.lastPrinted=e.lastPrinted,this.created=e.created,this.modified=e.modified,this.company=e.company,this.manager=e.manager,this.title=e.title,this.subject=e.subject,this.keywords=e.keywords,this.category=e.category,this.description=e.description,this.language=e.language,this.revision=e.revision,this.contentStatus=e.contentStatus,this.properties=e.properties,this.calcProperties=e.calcProperties,this._worksheets=[],e.worksheets.forEach(r=>{let{id:i,name:n,state:s}=r,a=e.sheets&&e.sheets.findIndex(u=>u.id===i),o=this._worksheets[i]=new S6({id:i,name:n,orderNo:a,state:s,workbook:this});o.model=r}),this._definedNames.model=e.definedNames,this.views=e.views,this._themes=e.themes,this.media=e.media||[]}};E6.exports=AE});var k6=w((rDe,C6)=>{"use strict";var Fde=fS(),OE=class{constructor(e){this.model=e}get xlsx(){return this._xlsx||(this._xlsx=new Fde(this)),this._xlsx}};C6.exports=OE});var A6=w((iDe,R6)=>{var Mde=typeof process=="object"&&process&&process.platform==="win32";R6.exports=Mde?{sep:"\\"}:{sep:"/"}});var IE=w((nDe,D6)=>{"use strict";D6.exports=I6;function I6(t,e,r){t instanceof RegExp&&(t=O6(t,r)),e instanceof RegExp&&(e=O6(e,r));var i=N6(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function O6(t,e){var r=e.match(t);return r?r[0]:null}I6.range=N6;function N6(t,e,r){var i,n,s,a,o,u=r.indexOf(t),f=r.indexOf(e,u+1),c=u;if(u>=0&&f>0){if(t===e)return[u,f];for(i=[],s=r.length;c>=0&&!o;)c==u?(i.push(c),u=r.indexOf(t,c+1)):i.length==1?o=[i.pop(),f]:(n=i.pop(),n<s&&(s=n,a=f),f=r.indexOf(e,c+1)),c=u<f&&u>=0?u:f;i.length&&(o=[s,a])}return o}});var $6=w((sDe,j6)=>{var F6=IE();j6.exports=Lde;var M6="\0SLASH"+Math.random()+"\0",P6="\0OPEN"+Math.random()+"\0",DE="\0CLOSE"+Math.random()+"\0",q6="\0COMMA"+Math.random()+"\0",L6="\0PERIOD"+Math.random()+"\0";function NE(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function Pde(t){return t.split("\\\\").join(M6).split("\\{").join(P6).split("\\}").join(DE).split("\\,").join(q6).split("\\.").join(L6)}function qde(t){return t.split(M6).join("\\").split(P6).join("{").split(DE).join("}").split(q6).join(",").split(L6).join(".")}function B6(t){if(!t)return[""];var e=[],r=F6("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=B6(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function Lde(t,e){if(!t)return[];e=e||{};var r=e.max==null?1/0:e.max;return t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),$f(Pde(t),r,!0).map(qde)}function Bde(t){return"{"+t+"}"}function jde(t){return/^-?0\d/.test(t)}function $de(t,e){return t<=e}function Ude(t,e){return t>=e}function $f(t,e,r){var i=[],n=F6("{","}",t);if(!n)return[t];var s=n.pre,a=n.post.length?$f(n.post,e,!1):[""];if(/\$$/.test(n.pre))for(var o=0;o<a.length&&o<e;o++){var u=s+"{"+n.body+"}"+a[o];i.push(u)}else{var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),h=f||c,d=n.body.indexOf(",")>=0;if(!h&&!d)return n.post.match(/,(?!,).*\}/)?(t=n.pre+"{"+n.body+DE+n.post,$f(t,e,!0)):[t];var p;if(h)p=n.body.split(/\.\./);else if(p=B6(n.body),p.length===1&&(p=$f(p[0],e,!1).map(Bde),p.length===1))return a.map(function(H){return n.pre+p[0]+H});var g;if(h){var y=NE(p[0]),v=NE(p[1]),b=Math.max(p[0].length,p[1].length),k=p.length==3?Math.max(Math.abs(NE(p[2])),1):1,N=$de,E=v<y;E&&(k*=-1,N=Ude);var U=p.some(jde);g=[];for(var ee=y;N(ee,v)&&g.length<e;ee+=k){var F;if(c)F=String.fromCharCode(ee),F==="\\"&&(F="");else if(F=String(ee),U){var L=b-F.length;if(L>0){var I=new Array(L+1).join("0");ee<0?F="-"+I+F.slice(1):F=I+F}}g.push(F)}}else{g=[];for(var Z=0;Z<p.length;Z++)g.push.apply(g,$f(p[Z],e,!1))}for(var Z=0;Z<g.length;Z++)for(var o=0;o<a.length&&i.length<e;o++){var u=s+g[Z]+a[o];(!r||h||u)&&i.push(u)}}return i}});var V6=w((oDe,LE)=>{var Fr=LE.exports=(t,e,r={})=>(Fg(e),!r.nocomment&&e.charAt(0)==="#"?!1:new gl(e,r).match(t));LE.exports=Fr;var PE=A6();Fr.sep=PE.sep;var pr=Symbol("globstar **");Fr.GLOBSTAR=pr;var Wde=$6(),U6={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},qE="[^/]",FE=qE+"*?",Hde="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",zde="(?:(?!(?:\\/|^)\\.).)*?",z6=t=>t.split("").reduce((e,r)=>(e[r]=!0,e),{}),W6=z6("().*{}+?[]^$\\!"),Xde=z6("[.("),H6=/\/+/;Fr.filter=(t,e={})=>(r,i,n)=>Fr(r,t,e);var cs=(t,e={})=>{let r={};return Object.keys(t).forEach(i=>r[i]=t[i]),Object.keys(e).forEach(i=>r[i]=e[i]),r};Fr.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Fr;let e=Fr,r=(i,n,s)=>e(i,n,cs(t,s));return r.Minimatch=class extends e.Minimatch{constructor(n,s){super(n,cs(t,s))}},r.Minimatch.defaults=i=>e.defaults(cs(t,i)).Minimatch,r.filter=(i,n)=>e.filter(i,cs(t,n)),r.defaults=i=>e.defaults(cs(t,i)),r.makeRe=(i,n)=>e.makeRe(i,cs(t,n)),r.braceExpand=(i,n)=>e.braceExpand(i,cs(t,n)),r.match=(i,n,s)=>e.match(i,n,cs(t,s)),r};Fr.braceExpand=(t,e)=>X6(t,e);var X6=(t,e={})=>(Fg(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Wde(t)),Vde=1024*64,Fg=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>Vde)throw new TypeError("pattern is too long")},ME=Symbol("subparse");Fr.makeRe=(t,e)=>new gl(t,e||{}).makeRe();Fr.match=(t,e,r={})=>{let i=new gl(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};var Gde=t=>t.replace(/\\(.)/g,"$1"),Zde=t=>t.replace(/\\([^-\]])/g,"$1"),Yde=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kde=t=>t.replace(/[[\]\\]/g,"\\$&"),gl=class{constructor(e,r){Fg(e),r||(r={}),this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion!==void 0?r.maxGlobstarRecursion:200,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let i=this.globSet=this.braceExpand();r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,i),i=this.globParts=i.map(n=>n.split(H6)),this.debug(this.pattern,i),i=i.map((n,s,a)=>n.map(this.parse,this)),this.debug(this.pattern,i),i=i.filter(n=>n.indexOf(!1)===-1),this.debug(this.pattern,i),this.set=i}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i){return r.indexOf(pr)!==-1?this._matchGlobstar(e,r,i,0,0):this._matchOne(e,r,i,0,0)}_matchGlobstar(e,r,i,n,s){let a=-1;for(let k=s;k<r.length;k++)if(r[k]===pr){a=k;break}let o=-1;for(let k=r.length-1;k>=0;k--)if(r[k]===pr){o=k;break}let u=r.slice(s,a),f=i?r.slice(a+1):r.slice(a+1,o),c=i?[]:r.slice(o+1);if(u.length){let k=e.slice(n,n+u.length);if(!this._matchOne(k,u,i,0,0))return!1;n+=u.length}let h=0;if(c.length){if(c.length+n>e.length)return!1;let k=e.length-c.length;if(this._matchOne(e,c,i,k,0))h=c.length;else{if(e[e.length-1]!==""||n+c.length===e.length||!this._matchOne(e,c,i,k-1,0))return!1;h=c.length+1}}if(!f.length){let k=!!h;for(let N=n;N<e.length-h;N++){let E=String(e[N]);if(k=!0,E==="."||E===".."||!this.options.dot&&E.charAt(0)===".")return!1}return i||k}let d=[[[],0]],p=d[0],g=0,y=[0];for(let k of f)k===pr?(y.push(g),p=[[],0],d.push(p)):(p[0].push(k),g++);let v=d.length-1,b=e.length-h;for(let k of d)k[1]=b-(y[v--]+k[0].length);return!!this._matchGlobStarBodySections(e,d,n,0,i,0,!!h)}_matchGlobStarBodySections(e,r,i,n,s,a,o){let u=r[n];if(!u){for(let h=i;h<e.length;h++){o=!0;let d=e[h];if(d==="."||d===".."||!this.options.dot&&d.charAt(0)===".")return!1}return o}let[f,c]=u;for(;i<=c;){if(this._matchOne(e.slice(0,i+f.length),f,s,i,0)&&a<this.maxGlobstarRecursion){let p=this._matchGlobStarBodySections(e,r,i+f.length,n+1,s,a+1,o);if(p!==!1)return p}let d=e[i];if(d==="."||d===".."||!this.options.dot&&d.charAt(0)===".")return!1;i++}return s||null}_matchOne(e,r,i,n,s){let a,o,u,f;for(a=n,o=s,u=e.length,f=r.length;a<u&&o<f;a++,o++){this.debug("matchOne loop");let c=r[o],h=e[a];if(this.debug(r,c,h),c===!1||c===pr)return!1;let d;if(typeof c=="string"?(d=h===c,this.debug("string match",c,h,d)):(d=h.match(c),this.debug("pattern match",c,h,d)),!d)return!1}if(a===u&&o===f)return!0;if(a===u)return i;if(o===f)return a===u-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return X6(this.pattern,this.options)}parse(e,r){Fg(e);let i=this.options;if(e==="**")if(i.noglobstar)e="*";else return pr;if(e==="")return"";let n="",s=!1,a=!1,o=[],u=[],f,c=!1,h=-1,d=-1,p,g,y,v=e.charAt(0)===".",b=i.dot||v,k=()=>v?"":b?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",N=F=>F.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E=()=>{if(f){switch(f){case"*":n+=FE,s=!0;break;case"?":n+=qE,s=!0;break;default:n+="\\"+f;break}this.debug("clearStateChar %j %j",f,n),f=!1}};for(let F=0,L;F<e.length&&(L=e.charAt(F));F++){if(this.debug("%s %s %s %j",e,F,n,L),a){if(L==="/")return!1;W6[L]&&(n+="\\"),n+=L,a=!1;continue}switch(L){case"/":return!1;case"\\":if(c&&e.charAt(F+1)==="-"){n+=L;continue}E(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,F,n,L),c){this.debug(" in class"),L==="!"&&F===d+1&&(L="^"),n+=L;continue}if(L==="*"&&f==="*")continue;this.debug("call clearStateChar %j",f),E(),f=L,i.noext&&E();continue;case"(":{if(c){n+="(";continue}if(!f){n+="\\(";continue}let I={type:f,start:F-1,reStart:n.length,open:U6[f].open,close:U6[f].close};this.debug(this.pattern," ",I),o.push(I),n+=I.open,I.start===0&&I.type!=="!"&&(v=!0,n+=N(e.slice(F+1))),this.debug("plType %j %j",f,n),f=!1;continue}case")":{let I=o[o.length-1];if(c||!I){n+="\\)";continue}o.pop(),E(),s=!0,g=I,n+=g.close,g.type==="!"&&u.push(Object.assign(g,{reEnd:n.length}));continue}case"|":{let I=o[o.length-1];if(c||!I){n+="\\|";continue}E(),n+="|",I.start===0&&I.type!=="!"&&(v=!0,n+=N(e.slice(F+1)));continue}case"[":if(E(),c){n+="\\"+L;continue}c=!0,d=F,h=n.length,n+=L;continue;case"]":if(F===d+1||!c){n+="\\"+L;continue}p=e.substring(d+1,F);try{RegExp("["+Kde(Zde(p))+"]"),n+=L}catch{n=n.substring(0,h)+"(?:$.)"}s=!0,c=!1;continue;default:E(),W6[L]&&!(L==="^"&&c)&&(n+="\\"),n+=L;break}}for(c&&(p=e.slice(d+1),y=this.parse(p,ME),n=n.substring(0,h)+"\\["+y[0],s=s||y[1]),g=o.pop();g;g=o.pop()){let F;F=n.slice(g.reStart+g.open.length),this.debug("setting tail",n,g),F=F.replace(/((?:\\{2}){0,64})(\\?)\|/g,(I,Z,H)=>(H||(H="\\"),Z+Z+H+"|")),this.debug(`tail=%j
24
+ %s`,F,F,g,n);let L=g.type==="*"?FE:g.type==="?"?qE:"\\"+g.type;s=!0,n=n.slice(0,g.reStart)+L+"\\("+F}E(),a&&(n+="\\\\");let U=Xde[n.charAt(0)];for(let F=u.length-1;F>-1;F--){let L=u[F],I=n.slice(0,L.reStart),Z=n.slice(L.reStart,L.reEnd-8),H=n.slice(L.reEnd),O=n.slice(L.reEnd-8,L.reEnd)+H,q=I.split(")").length,B=I.split("(").length-q,J=H;for(let M=0;M<B;M++)J=J.replace(/\)[+*?]?/,"");H=J;let T=H===""&&r!==ME?"(?:$|\\/)":"";n=I+Z+H+T+O}if(n!==""&&s&&(n="(?=.)"+n),U&&(n=k()+n),r===ME)return[n,s];if(i.nocase&&!s&&(s=e.toUpperCase()!==e.toLowerCase()),!s)return Gde(e);let ee=i.nocase?"i":"";try{return Object.assign(new RegExp("^"+n+"$",ee),{_glob:e,_src:n})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?FE:r.dot?Hde:zde,n=r.nocase?"i":"",s=e.map(a=>(a=a.map(o=>typeof o=="string"?Yde(o):o===pr?pr:o._src).reduce((o,u)=>(o[o.length-1]===pr&&u===pr||o.push(u),o),[]),a.forEach((o,u)=>{o!==pr||a[u-1]===pr||(u===0?a.length>1?a[u+1]="(?:\\/|"+i+"\\/)?"+a[u+1]:a[u]=i:u===a.length-1?a[u-1]+="(?:\\/|"+i+")?":(a[u-1]+="(?:\\/|\\/"+i+"\\/)"+a[u+1],a[u+1]=pr))}),a.filter(o=>o!==pr).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;PE.sep!=="/"&&(e=e.split(PE.sep).join("/")),e=e.split(H6),this.debug(this.pattern,"split",e);let n=this.set;this.debug(this.pattern,"set",n);let s;for(let a=e.length-1;a>=0&&(s=e[a],!s);a--);for(let a=0;a<n.length;a++){let o=n[a],u=e;if(i.matchBase&&o.length===1&&(u=[s]),this.matchOne(u,o,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Fr.defaults(e).Minimatch}};Fr.Minimatch=gl});var Q6=w((lDe,K6)=>{K6.exports=Y6;var jE=Y("fs"),{EventEmitter:Qde}=Y("events"),{Minimatch:BE}=V6(),{resolve:Jde}=Y("path");function epe(t,e){return new Promise((r,i)=>{jE.readdir(t,{withFileTypes:!0},(n,s)=>{if(n)switch(n.code){case"ENOTDIR":e?i(n):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:i(n);break}else r(s)})})}function G6(t,e){return new Promise((r,i)=>{(e?jE.stat:jE.lstat)(t,(s,a)=>{s?s.code==="ENOENT"?r(e?G6(t,!1):null):r(null):r(a)})})}async function*Z6(t,e,r,i,n,s){let a=await epe(e+t,s);for(let o of a){let u=o.name;u===void 0&&(u=o,i=!0);let f=t+"/"+u,c=f.slice(1),h=e+"/"+c,d=null;(i||r)&&(d=await G6(h,r)),!d&&o.name!==void 0&&(d=o),d===null&&(d={isDirectory:()=>!1}),d.isDirectory()?n(c)||(yield{relative:c,absolute:h,stats:d},yield*Z6(f,e,r,i,n,!1)):yield{relative:c,absolute:h,stats:d}}}async function*tpe(t,e,r,i){yield*Z6("",t,e,r,i,!0)}function rpe(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var Mg=class extends Qde{constructor(e,r,i){if(super(),typeof r=="function"&&(i=r,r=null),this.options=rpe(r||{}),this.matchers=[],this.options.pattern){let n=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=n.map(s=>new BE(s,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let n=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=n.map(s=>new BE(s,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let n=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=n.map(s=>new BE(s,{dot:!0}))}this.iterator=tpe(Jde(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,i&&(this._matches=[],this.on("match",n=>this._matches.push(this.options.absolute?n.absolute:n.relative)),this.on("error",n=>i(n)),this.on("end",()=>i(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let i=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(n=>n.match(i)))&&!this.ignoreMatchers.some(n=>n.match(i))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let i=e.value.relative,n=e.value.absolute;this.options.mark&&r&&(i+="/",n+="/"),this.options.stat?this.emit("match",{relative:i,absolute:n,stat:e.value.stats}):this.emit("match",{relative:i,absolute:n})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function Y6(t,e,r){return new Mg(t,e,r)}Y6.ReaddirGlob=Mg});var e4=w((Pg,J6)=>{(function(t,e){typeof Pg=="object"&&typeof J6<"u"?e(Pg):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.async={}))})(Pg,(function(t){"use strict";function e(C,...S){return(...R)=>C(...S,...R)}function r(C){return function(...S){var R=S.pop();return C.call(this,S,R)}}var i=typeof queueMicrotask=="function"&&queueMicrotask,n=typeof setImmediate=="function"&&setImmediate,s=typeof process=="object"&&typeof process.nextTick=="function";function a(C){setTimeout(C,0)}function o(C){return(S,...R)=>C(()=>S(...R))}var u;i?u=queueMicrotask:n?u=setImmediate:s?u=process.nextTick:u=a;var f=o(u);function c(C){return p(C)?function(...S){let R=S.pop(),P=C.apply(this,S);return h(P,R)}:r(function(S,R){var P;try{P=C.apply(this,S)}catch(G){return R(G)}if(P&&typeof P.then=="function")return h(P,R);R(null,P)})}function h(C,S){return C.then(R=>{d(S,null,R)},R=>{d(S,R&&(R instanceof Error||R.message)?R:new Error(R))})}function d(C,S,R){try{C(S,R)}catch(P){f(G=>{throw G},P)}}function p(C){return C[Symbol.toStringTag]==="AsyncFunction"}function g(C){return C[Symbol.toStringTag]==="AsyncGenerator"}function y(C){return typeof C[Symbol.asyncIterator]=="function"}function v(C){if(typeof C!="function")throw new Error("expected a function");return p(C)?c(C):C}function b(C,S){if(S||(S=C.length),!S)throw new Error("arity is undefined");function R(...P){return typeof P[S-1]=="function"?C.apply(this,P):new Promise((G,K)=>{P[S-1]=(te,...ie)=>{if(te)return K(te);G(ie.length>1?ie:ie[0])},C.apply(this,P)})}return R}function k(C){return function(R,...P){return b(function(K){var te=this;return C(R,(ie,ae)=>{v(ie).apply(te,P.concat(ae))},K)})}}function N(C,S,R,P){S=S||[];var G=[],K=0,te=v(R);return C(S,(ie,ae,de)=>{var ke=K++;te(ie,(Fe,Oe)=>{G[ke]=Oe,de(Fe)})},ie=>{P(ie,G)})}function E(C){return C&&typeof C.length=="number"&&C.length>=0&&C.length%1===0}let U={};function ee(C){function S(...R){if(C!==null){var P=C;C=null,P.apply(this,R)}}return Object.assign(S,C),S}function F(C){return C[Symbol.iterator]&&C[Symbol.iterator]()}function L(C){var S=-1,R=C.length;return function(){return++S<R?{value:C[S],key:S}:null}}function I(C){var S=-1;return function(){var P=C.next();return P.done?null:(S++,{value:P.value,key:S})}}function Z(C){var S=C?Object.keys(C):[],R=-1,P=S.length;return function G(){var K=S[++R];return K==="__proto__"?G():R<P?{value:C[K],key:K}:null}}function H(C){if(E(C))return L(C);var S=F(C);return S?I(S):Z(C)}function O(C){return function(...S){if(C===null)throw new Error("Callback was already called.");var R=C;C=null,R.apply(this,S)}}function q(C,S,R,P){let G=!1,K=!1,te=!1,ie=0,ae=0;function de(){ie>=S||te||G||(te=!0,C.next().then(({value:Oe,done:$r})=>{if(!(K||G)){if(te=!1,$r){G=!0,ie<=0&&P(null);return}ie++,R(Oe,ae,ke),ae++,de()}}).catch(Fe))}function ke(Oe,$r){if(ie-=1,!K){if(Oe)return Fe(Oe);if(Oe===!1){G=!0,K=!0;return}if($r===U||G&&ie<=0)return G=!0,P(null);de()}}function Fe(Oe){K||(te=!1,G=!0,P(Oe))}de()}var B=C=>(S,R,P)=>{if(P=ee(P),C<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!S)return P(null);if(g(S))return q(S,C,R,P);if(y(S))return q(S[Symbol.asyncIterator](),C,R,P);var G=H(S),K=!1,te=!1,ie=0,ae=!1;function de(Fe,Oe){if(!te)if(ie-=1,Fe)K=!0,P(Fe);else if(Fe===!1)K=!0,te=!0;else{if(Oe===U||K&&ie<=0)return K=!0,P(null);ae||ke()}}function ke(){for(ae=!0;ie<C&&!K;){var Fe=G();if(Fe===null){K=!0,ie<=0&&P(null);return}ie+=1,R(Fe.value,Fe.key,O(de))}ae=!1}ke()};function J(C,S,R,P){return B(S)(C,v(R),P)}var T=b(J,4);function M(C,S,R){R=ee(R);var P=0,G=0,{length:K}=C,te=!1;K===0&&R(null);function ie(ae,de){ae===!1&&(te=!0),te!==!0&&(ae?R(ae):(++G===K||de===U)&&R(null))}for(;P<K;P++)S(C[P],P,O(ie))}function $(C,S,R){return T(C,1/0,S,R)}function z(C,S,R){var P=E(C)?M:$;return P(C,v(S),R)}var re=b(z,3);function se(C,S,R){return N(re,C,S,R)}var ue=b(se,3),pe=k(ue);function Ye(C,S,R){return T(C,1,S,R)}var Se=b(Ye,3);function Be(C,S,R){return N(Se,C,S,R)}var je=b(Be,3),Ae=k(je);let Ke=Symbol("promiseCallback");function pt(){let C,S;function R(P,...G){if(P)return S(P);C(G.length>1?G:G[0])}return R[Ke]=new Promise((P,G)=>{C=P,S=G}),R}function Nt(C,S,R){typeof S!="number"&&(R=S,S=null),R=ee(R||pt());var P=Object.keys(C).length;if(!P)return R(null);S||(S=P);var G={},K=0,te=!1,ie=!1,ae=Object.create(null),de=[],ke=[],Fe={};Object.keys(C).forEach(ce=>{var ye=C[ce];if(!Array.isArray(ye)){Oe(ce,[ye]),ke.push(ce);return}var Ie=ye.slice(0,ye.length-1),ct=Ie.length;if(ct===0){Oe(ce,ye),ke.push(ce);return}Fe[ce]=ct,Ie.forEach(Lt=>{if(!C[Lt])throw new Error("async.auto task `"+ce+"` has a non-existent dependency `"+Lt+"` in "+Ie.join(", "));Qa(Lt,()=>{ct--,ct===0&&Oe(ce,ye)})})}),Me(),$r();function Oe(ce,ye){de.push(()=>gu(ce,ye))}function $r(){if(!te){if(de.length===0&&K===0)return R(null,G);for(;de.length&&K<S;){var ce=de.shift();ce()}}}function Qa(ce,ye){var Ie=ae[ce];Ie||(Ie=ae[ce]=[]),Ie.push(ye)}function Is(ce){var ye=ae[ce]||[];ye.forEach(Ie=>Ie()),$r()}function gu(ce,ye){if(!ie){var Ie=O((Lt,...Ur)=>{if(K--,Lt===!1){te=!0;return}if(Ur.length<2&&([Ur]=Ur),Lt){var Ja={};if(Object.keys(G).forEach(Ns=>{Ja[Ns]=G[Ns]}),Ja[ce]=Ur,ie=!0,ae=Object.create(null),te)return;R(Lt,Ja)}else G[ce]=Ur,Is(ce)});K++;var ct=v(ye[ye.length-1]);ye.length>1?ct(G,Ie):ct(Ie)}}function Me(){for(var ce,ye=0;ke.length;)ce=ke.pop(),ye++,me(ce).forEach(Ie=>{--Fe[Ie]===0&&ke.push(Ie)});if(ye!==P)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function me(ce){var ye=[];return Object.keys(C).forEach(Ie=>{let ct=C[Ie];Array.isArray(ct)&&ct.indexOf(ce)>=0&&ye.push(Ie)}),ye}return R[Ke]}var Br=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,ti=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,Ui=/,/,ri=/(=.+)?(\s*)$/;function jr(C){let S="",R=0,P=C.indexOf("*/");for(;R<C.length;)if(C[R]==="/"&&C[R+1]==="/"){let G=C.indexOf(`
25
+ `,R);R=G===-1?C.length:G}else if(P!==-1&&C[R]==="/"&&C[R+1]==="*"){let G=C.indexOf("*/",R);G!==-1?(R=G+2,P=C.indexOf("*/",R)):(S+=C[R],R++)}else S+=C[R],R++;return S}function Wi(C){let S=jr(C.toString()),R=S.match(Br);if(R||(R=S.match(ti)),!R)throw new Error(`could not parse args in autoInject
26
+ Source:
27
+ `+S);let[,P]=R;return P.replace(/\s/g,"").split(Ui).map(G=>G.replace(ri,"").trim())}function Cr(C,S){var R={};return Object.keys(C).forEach(P=>{var G=C[P],K,te=p(G),ie=!te&&G.length===1||te&&G.length===0;if(Array.isArray(G))K=[...G],G=K.pop(),R[P]=K.concat(K.length>0?ae:G);else if(ie)R[P]=G;else{if(K=Wi(G),G.length===0&&!te&&K.length===0)throw new Error("autoInject task functions require explicit parameters.");te||K.pop(),R[P]=K.concat(ae)}function ae(de,ke){var Fe=K.map(Oe=>de[Oe]);Fe.push(ke),v(G)(...Fe)}}),Nt(R,S)}class Ka{constructor(){this.head=this.tail=null,this.length=0}removeLink(S){return S.prev?S.prev.next=S.next:this.head=S.next,S.next?S.next.prev=S.prev:this.tail=S.prev,S.prev=S.next=null,this.length-=1,S}empty(){for(;this.head;)this.shift();return this}insertAfter(S,R){R.prev=S,R.next=S.next,S.next?S.next.prev=R:this.tail=R,S.next=R,this.length+=1}insertBefore(S,R){R.prev=S.prev,R.next=S,S.prev?S.prev.next=R:this.head=R,S.prev=R,this.length+=1}unshift(S){this.head?this.insertBefore(this.head,S):kr(this,S)}push(S){this.tail?this.insertAfter(this.tail,S):kr(this,S)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var S=this.head;S;)yield S.data,S=S.next}remove(S){for(var R=this.head;R;){var{next:P}=R;S(R)&&this.removeLink(R),R=P}return this}}function kr(C,S){C.length=1,C.head=C.tail=S}function On(C,S,R){if(S==null)S=1;else if(S===0)throw new RangeError("Concurrency must not be zero");var P=v(C),G=0,K=[];let te={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function ie(me,ce){te[me].push(ce)}function ae(me,ce){let ye=(...Ie)=>{de(me,ye),ce(...Ie)};te[me].push(ye)}function de(me,ce){if(!me)return Object.keys(te).forEach(ye=>te[ye]=[]);if(!ce)return te[me]=[];te[me]=te[me].filter(ye=>ye!==ce)}function ke(me,...ce){te[me].forEach(ye=>ye(...ce))}var Fe=!1;function Oe(me,ce,ye,Ie){if(Ie!=null&&typeof Ie!="function")throw new Error("task callback must be a function");Me.started=!0;var ct,Lt;function Ur(Ns,...mu){if(Ns)return ye?Lt(Ns):ct();if(mu.length<=1)return ct(mu[0]);ct(mu)}var Ja=Me._createTaskItem(me,ye?Ur:Ie||Ur);if(ce?Me._tasks.unshift(Ja):Me._tasks.push(Ja),Fe||(Fe=!0,f(()=>{Fe=!1,Me.process()})),ye||!Ie)return new Promise((Ns,mu)=>{ct=Ns,Lt=mu})}function $r(me){return function(ce,...ye){G-=1;for(var Ie=0,ct=me.length;Ie<ct;Ie++){var Lt=me[Ie],Ur=K.indexOf(Lt);Ur===0?K.shift():Ur>0&&K.splice(Ur,1),Lt.callback(ce,...ye),ce!=null&&ke("error",ce,Lt.data)}G<=Me.concurrency-Me.buffer&&ke("unsaturated"),Me.idle()&&ke("drain"),Me.process()}}function Qa(me){return me.length===0&&Me.idle()?(f(()=>ke("drain")),!0):!1}let Is=me=>ce=>{if(!ce)return new Promise((ye,Ie)=>{ae(me,(ct,Lt)=>{if(ct)return Ie(ct);ye(Lt)})});de(me),ie(me,ce)};var gu=!1,Me={_tasks:new Ka,_createTaskItem(me,ce){return{data:me,callback:ce}},*[Symbol.iterator](){yield*Me._tasks[Symbol.iterator]()},concurrency:S,payload:R,buffer:S/4,started:!1,paused:!1,push(me,ce){return Array.isArray(me)?Qa(me)?void 0:me.map(ye=>Oe(ye,!1,!1,ce)):Oe(me,!1,!1,ce)},pushAsync(me,ce){return Array.isArray(me)?Qa(me)?void 0:me.map(ye=>Oe(ye,!1,!0,ce)):Oe(me,!1,!0,ce)},kill(){de(),Me._tasks.empty()},unshift(me,ce){return Array.isArray(me)?Qa(me)?void 0:me.map(ye=>Oe(ye,!0,!1,ce)):Oe(me,!0,!1,ce)},unshiftAsync(me,ce){return Array.isArray(me)?Qa(me)?void 0:me.map(ye=>Oe(ye,!0,!0,ce)):Oe(me,!0,!0,ce)},remove(me){Me._tasks.remove(me)},process(){if(!gu){for(gu=!0;!Me.paused&&G<Me.concurrency&&Me._tasks.length;){var me=[],ce=[],ye=Me._tasks.length;Me.payload&&(ye=Math.min(ye,Me.payload));for(var Ie=0;Ie<ye;Ie++){var ct=Me._tasks.shift();me.push(ct),K.push(ct),ce.push(ct.data)}G+=1,Me._tasks.length===0&&ke("empty"),G===Me.concurrency&&ke("saturated");var Lt=O($r(me));P(ce,Lt)}gu=!1}},length(){return Me._tasks.length},running(){return G},workersList(){return K},idle(){return Me._tasks.length+G===0},pause(){Me.paused=!0},resume(){Me.paused!==!1&&(Me.paused=!1,f(Me.process))}};return Object.defineProperties(Me,{saturated:{writable:!1,value:Is("saturated")},unsaturated:{writable:!1,value:Is("unsaturated")},empty:{writable:!1,value:Is("empty")},drain:{writable:!1,value:Is("drain")},error:{writable:!1,value:Is("error")}}),Me}function le(C,S){return On(C,1,S)}function W(C,S,R){return On(C,S,R)}function m(C,S,R,P){P=ee(P);var G=v(R);return Se(C,(K,te,ie)=>{G(S,K,(ae,de)=>{S=de,ie(ae)})},K=>P(K,S))}var x=b(m,4);function A(...C){var S=C.map(v);return function(...R){var P=this,G=R[R.length-1];return typeof G=="function"?R.pop():G=pt(),x(S,R,(K,te,ie)=>{te.apply(P,K.concat((ae,...de)=>{ie(ae,de)}))},(K,te)=>G(K,...te)),G[Ke]}}function D(...C){return A(...C.reverse())}function X(C,S,R,P){return N(B(S),C,R,P)}var j=b(X,4);function V(C,S,R,P){var G=v(R);return j(C,S,(K,te)=>{G(K,(ie,...ae)=>ie?te(ie):te(ie,ae))},(K,te)=>{for(var ie=[],ae=0;ae<te.length;ae++)te[ae]&&(ie=ie.concat(...te[ae]));return P(K,ie)})}var Q=b(V,4);function ne(C,S,R){return Q(C,1/0,S,R)}var he=b(ne,3);function we(C,S,R){return Q(C,1,S,R)}var ve=b(we,3);function Ce(...C){return function(...S){var R=S.pop();return R(null,...C)}}function gt(C,S){return(R,P,G,K)=>{var te=!1,ie;let ae=v(G);R(P,(de,ke,Fe)=>{ae(de,(Oe,$r)=>{if(Oe||Oe===!1)return Fe(Oe);if(C($r)&&!ie)return te=!0,ie=S(!0,de),Fe(null,U);Fe()})},de=>{if(de)return K(de);K(null,te?ie:S(!1))})}}function er(C,S,R){return gt(P=>P,(P,G)=>G)(re,C,S,R)}var In=b(er,3);function fu(C,S,R,P){return gt(G=>G,(G,K)=>K)(B(S),C,R,P)}var ah=b(fu,4);function f7(C,S,R){return gt(P=>P,(P,G)=>G)(B(1),C,S,R)}var oh=b(f7,3);function Zk(C){return(S,...R)=>v(S)(...R,(P,...G)=>{typeof console=="object"&&(P?console.error&&console.error(P):console[C]&&G.forEach(K=>console[C](K)))})}var Yk=Zk("dir");function c7(C,S,R){R=O(R);var P=v(C),G=v(S),K;function te(ae,...de){if(ae)return R(ae);ae!==!1&&(K=de,G(...de,ie))}function ie(ae,de){if(ae)return R(ae);if(ae!==!1){if(!de)return R(null,...K);P(te)}}return ie(null,!0)}var cu=b(c7,3);function Kk(C,S,R){let P=v(S);return cu(C,(...G)=>{let K=G.pop();P(...G,(te,ie)=>K(te,!ie))},R)}function Qk(C){return(S,R,P)=>C(S,P)}function h7(C,S,R){return re(C,Qk(v(S)),R)}var lh=b(h7,3);function d7(C,S,R,P){return B(S)(C,Qk(v(R)),P)}var hu=b(d7,4);function p7(C,S,R){return hu(C,1,S,R)}var du=b(p7,3);function qy(C){return p(C)?C:function(...S){var R=S.pop(),P=!0;S.push((...G)=>{P?f(()=>R(...G)):R(...G)}),C.apply(this,S),P=!1}}function g7(C,S,R){return gt(P=>!P,P=>!P)(re,C,S,R)}var uh=b(g7,3);function m7(C,S,R,P){return gt(G=>!G,G=>!G)(B(S),C,R,P)}var fh=b(m7,4);function y7(C,S,R){return gt(P=>!P,P=>!P)(Se,C,S,R)}var ch=b(y7,3);function v7(C,S,R,P){var G=new Array(S.length);C(S,(K,te,ie)=>{R(K,(ae,de)=>{G[te]=!!de,ie(ae)})},K=>{if(K)return P(K);for(var te=[],ie=0;ie<S.length;ie++)G[ie]&&te.push(S[ie]);P(null,te)})}function _7(C,S,R,P){var G=[];C(S,(K,te,ie)=>{R(K,(ae,de)=>{if(ae)return ie(ae);de&&G.push({index:te,value:K}),ie(ae)})},K=>{if(K)return P(K);P(null,G.sort((te,ie)=>te.index-ie.index).map(te=>te.value))})}function hh(C,S,R,P){var G=E(S)?v7:_7;return G(C,S,v(R),P)}function w7(C,S,R){return hh(re,C,S,R)}var dh=b(w7,3);function b7(C,S,R,P){return hh(B(S),C,R,P)}var ph=b(b7,4);function x7(C,S,R){return hh(Se,C,S,R)}var gh=b(x7,3);function S7(C,S){var R=O(S),P=v(qy(C));function G(K){if(K)return R(K);K!==!1&&P(G)}return G()}var Jk=b(S7,2);function E7(C,S,R,P){var G=v(R);return j(C,S,(K,te)=>{G(K,(ie,ae)=>ie?te(ie):te(ie,{key:ae,val:K}))},(K,te)=>{for(var ie={},{hasOwnProperty:ae}=Object.prototype,de=0;de<te.length;de++)if(te[de]){var{key:ke}=te[de],{val:Fe}=te[de];ae.call(ie,ke)?ie[ke].push(Fe):ie[ke]=[Fe]}return P(K,ie)})}var mh=b(E7,4);function eR(C,S,R){return mh(C,1/0,S,R)}function tR(C,S,R){return mh(C,1,S,R)}var rR=Zk("log");function T7(C,S,R,P){P=ee(P);var G={},K=v(R);return B(S)(C,(te,ie,ae)=>{K(te,ie,(de,ke)=>{if(de)return ae(de);G[ie]=ke,ae(de)})},te=>P(te,G))}var yh=b(T7,4);function iR(C,S,R){return yh(C,1/0,S,R)}function nR(C,S,R){return yh(C,1,S,R)}function sR(C,S=R=>R){var R=Object.create(null),P=Object.create(null),G=v(C),K=r((te,ie)=>{var ae=S(...te);ae in R?f(()=>ie(null,...R[ae])):ae in P?P[ae].push(ie):(P[ae]=[ie],G(...te,(de,...ke)=>{de||(R[ae]=ke);var Fe=P[ae];delete P[ae];for(var Oe=0,$r=Fe.length;Oe<$r;Oe++)Fe[Oe](de,...ke)}))});return K.memo=R,K.unmemoized=C,K}var vh;s?vh=process.nextTick:n?vh=setImmediate:vh=a;var aR=o(vh),Ly=b((C,S,R)=>{var P=E(S)?[]:{};C(S,(G,K,te)=>{v(G)((ie,...ae)=>{ae.length<2&&([ae]=ae),P[K]=ae,te(ie)})},G=>R(G,P))},3);function oR(C,S){return Ly(re,C,S)}function lR(C,S,R){return Ly(B(S),C,R)}function By(C,S){var R=v(C);return On((P,G)=>{R(P[0],G)},S,1)}class C7{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(S){let R;for(;S>0&&jy(this.heap[S],this.heap[R=uR(S)]);){let P=this.heap[S];this.heap[S]=this.heap[R],this.heap[R]=P,S=R}}percDown(S){let R;for(;(R=k7(S))<this.heap.length&&(R+1<this.heap.length&&jy(this.heap[R+1],this.heap[R])&&(R=R+1),!jy(this.heap[S],this.heap[R]));){let P=this.heap[S];this.heap[S]=this.heap[R],this.heap[R]=P,S=R}}push(S){S.pushCount=++this.pushCount,this.heap.push(S),this.percUp(this.heap.length-1)}unshift(S){return this.heap.push(S)}shift(){let[S]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),S}toArray(){return[...this]}*[Symbol.iterator](){for(let S=0;S<this.heap.length;S++)yield this.heap[S].data}remove(S){let R=0;for(let P=0;P<this.heap.length;P++)S(this.heap[P])||(this.heap[R]=this.heap[P],R++);this.heap.splice(R);for(let P=uR(this.heap.length-1);P>=0;P--)this.percDown(P);return this}}function k7(C){return(C<<1)+1}function uR(C){return(C+1>>1)-1}function jy(C,S){return C.priority!==S.priority?C.priority<S.priority:C.pushCount<S.pushCount}function fR(C,S){var R=By(C,S),{push:P,pushAsync:G}=R;R._tasks=new C7,R._createTaskItem=({data:te,priority:ie},ae)=>({data:te,priority:ie,callback:ae});function K(te,ie){return Array.isArray(te)?te.map(ae=>({data:ae,priority:ie})):{data:te,priority:ie}}return R.push=function(te,ie=0,ae){return P(K(te,ie),ae)},R.pushAsync=function(te,ie=0,ae){return G(K(te,ie),ae)},delete R.unshift,delete R.unshiftAsync,R}function R7(C,S){if(S=ee(S),!Array.isArray(C))return S(new TypeError("First argument to race must be an array of functions"));if(!C.length)return S();for(var R=0,P=C.length;R<P;R++)v(C[R])(S)}var cR=b(R7,2);function _h(C,S,R,P){var G=[...C].reverse();return x(G,S,R,P)}function wh(C){var S=v(C);return r(function(P,G){return P.push((K,...te)=>{let ie={};if(K&&(ie.error=K),te.length>0){var ae=te;te.length<=1&&([ae]=te),ie.value=ae}G(null,ie)}),S.apply(this,P)})}function hR(C){var S;return Array.isArray(C)?S=C.map(wh):(S={},Object.keys(C).forEach(R=>{S[R]=wh.call(this,C[R])})),S}function $y(C,S,R,P){let G=v(R);return hh(C,S,(K,te)=>{G(K,(ie,ae)=>{te(ie,!ae)})},P)}function A7(C,S,R){return $y(re,C,S,R)}var dR=b(A7,3);function O7(C,S,R,P){return $y(B(S),C,R,P)}var pR=b(O7,4);function I7(C,S,R){return $y(Se,C,S,R)}var gR=b(I7,3);function mR(C){return function(){return C}}let Uy=5,yR=0;function bh(C,S,R){var P={times:Uy,intervalFunc:mR(yR)};if(arguments.length<3&&typeof C=="function"?(R=S||pt(),S=C):(N7(P,C),R=R||pt()),typeof S!="function")throw new Error("Invalid arguments for async.retry");var G=v(S),K=1;function te(){G((ie,...ae)=>{ie!==!1&&(ie&&K++<P.times&&(typeof P.errorFilter!="function"||P.errorFilter(ie))?setTimeout(te,P.intervalFunc(K-1)):R(ie,...ae))})}return te(),R[Ke]}function N7(C,S){if(typeof S=="object")C.times=+S.times||Uy,C.intervalFunc=typeof S.interval=="function"?S.interval:mR(+S.interval||yR),C.errorFilter=S.errorFilter;else if(typeof S=="number"||typeof S=="string")C.times=+S||Uy;else throw new Error("Invalid arguments for async.retry")}function vR(C,S){S||(S=C,C=null);let R=C&&C.arity||S.length;p(S)&&(R+=1);var P=v(S);return r((G,K)=>{(G.length<R-1||K==null)&&(G.push(K),K=pt());function te(ie){P(...G,ie)}return C?bh(C,te,K):bh(te,K),K[Ke]})}function _R(C,S){return Ly(Se,C,S)}function D7(C,S,R){return gt(Boolean,P=>P)(re,C,S,R)}var xh=b(D7,3);function F7(C,S,R,P){return gt(Boolean,G=>G)(B(S),C,R,P)}var Sh=b(F7,4);function M7(C,S,R){return gt(Boolean,P=>P)(Se,C,S,R)}var Eh=b(M7,3);function P7(C,S,R){var P=v(S);return ue(C,(K,te)=>{P(K,(ie,ae)=>{if(ie)return te(ie);te(ie,{value:K,criteria:ae})})},(K,te)=>{if(K)return R(K);R(null,te.sort(G).map(ie=>ie.value))});function G(K,te){var ie=K.criteria,ae=te.criteria;return ie<ae?-1:ie>ae?1:0}}var wR=b(P7,3);function bR(C,S,R){var P=v(C);return r((G,K)=>{var te=!1,ie;function ae(){var de=C.name||"anonymous",ke=new Error('Callback function "'+de+'" timed out.');ke.code="ETIMEDOUT",R&&(ke.info=R),te=!0,K(ke)}G.push((...de)=>{te||(K(...de),clearTimeout(ie))}),ie=setTimeout(ae,S),P(...G)})}function q7(C){for(var S=Array(C);C--;)S[C]=C;return S}function Th(C,S,R,P){var G=v(R);return j(q7(C),S,G,P)}function xR(C,S,R){return Th(C,1/0,S,R)}function SR(C,S,R){return Th(C,1,S,R)}function ER(C,S,R,P){arguments.length<=3&&typeof S=="function"&&(P=R,R=S,S=Array.isArray(C)?[]:{}),P=ee(P||pt());var G=v(R);return re(C,(K,te,ie)=>{G(S,K,te,ie)},K=>P(K,S)),P[Ke]}function L7(C,S){var R=null,P;return du(C,(G,K)=>{v(G)((te,...ie)=>{if(te===!1)return K(te);ie.length<2?[P]=ie:P=ie,R=te,K(te?null:{})})},()=>S(R,P))}var TR=b(L7);function CR(C){return(...S)=>(C.unmemoized||C)(...S)}function B7(C,S,R){R=O(R);var P=v(S),G=v(C),K=[];function te(ae,...de){if(ae)return R(ae);K=de,ae!==!1&&G(ie)}function ie(ae,de){if(ae)return R(ae);if(ae!==!1){if(!de)return R(null,...K);P(te)}}return G(ie)}var pu=b(B7,3);function kR(C,S,R){let P=v(C);return pu(G=>P((K,te)=>G(K,!te)),S,R)}function j7(C,S){if(S=ee(S),!Array.isArray(C))return S(new Error("First argument to waterfall must be an array of functions"));if(!C.length)return S();var R=0;function P(K){var te=v(C[R++]);te(...K,O(G))}function G(K,...te){if(K!==!1){if(K||R===C.length)return S(K,...te);P(te)}}P([])}var RR=b(j7),$7={apply:e,applyEach:pe,applyEachSeries:Ae,asyncify:c,auto:Nt,autoInject:Cr,cargo:le,cargoQueue:W,compose:D,concat:he,concatLimit:Q,concatSeries:ve,constant:Ce,detect:In,detectLimit:ah,detectSeries:oh,dir:Yk,doUntil:Kk,doWhilst:cu,each:lh,eachLimit:hu,eachOf:re,eachOfLimit:T,eachOfSeries:Se,eachSeries:du,ensureAsync:qy,every:uh,everyLimit:fh,everySeries:ch,filter:dh,filterLimit:ph,filterSeries:gh,forever:Jk,groupBy:eR,groupByLimit:mh,groupBySeries:tR,log:rR,map:ue,mapLimit:j,mapSeries:je,mapValues:iR,mapValuesLimit:yh,mapValuesSeries:nR,memoize:sR,nextTick:aR,parallel:oR,parallelLimit:lR,priorityQueue:fR,queue:By,race:cR,reduce:x,reduceRight:_h,reflect:wh,reflectAll:hR,reject:dR,rejectLimit:pR,rejectSeries:gR,retry:bh,retryable:vR,seq:A,series:_R,setImmediate:f,some:xh,someLimit:Sh,someSeries:Eh,sortBy:wR,timeout:bR,times:xR,timesLimit:Th,timesSeries:SR,transform:ER,tryEach:TR,unmemoize:CR,until:kR,waterfall:RR,whilst:pu,all:uh,allLimit:fh,allSeries:ch,any:xh,anyLimit:Sh,anySeries:Eh,find:In,findLimit:ah,findSeries:oh,flatMap:he,flatMapLimit:Q,flatMapSeries:ve,forEach:lh,forEachSeries:du,forEachLimit:hu,forEachOf:re,forEachOfSeries:Se,forEachOfLimit:T,inject:x,foldl:x,foldr:_h,select:dh,selectLimit:ph,selectSeries:gh,wrapSync:c,during:pu,doDuring:cu};t.all=uh,t.allLimit=fh,t.allSeries=ch,t.any=xh,t.anyLimit=Sh,t.anySeries=Eh,t.apply=e,t.applyEach=pe,t.applyEachSeries=Ae,t.asyncify=c,t.auto=Nt,t.autoInject=Cr,t.cargo=le,t.cargoQueue=W,t.compose=D,t.concat=he,t.concatLimit=Q,t.concatSeries=ve,t.constant=Ce,t.default=$7,t.detect=In,t.detectLimit=ah,t.detectSeries=oh,t.dir=Yk,t.doDuring=cu,t.doUntil=Kk,t.doWhilst=cu,t.during=pu,t.each=lh,t.eachLimit=hu,t.eachOf=re,t.eachOfLimit=T,t.eachOfSeries=Se,t.eachSeries=du,t.ensureAsync=qy,t.every=uh,t.everyLimit=fh,t.everySeries=ch,t.filter=dh,t.filterLimit=ph,t.filterSeries=gh,t.find=In,t.findLimit=ah,t.findSeries=oh,t.flatMap=he,t.flatMapLimit=Q,t.flatMapSeries=ve,t.foldl=x,t.foldr=_h,t.forEach=lh,t.forEachLimit=hu,t.forEachOf=re,t.forEachOfLimit=T,t.forEachOfSeries=Se,t.forEachSeries=du,t.forever=Jk,t.groupBy=eR,t.groupByLimit=mh,t.groupBySeries=tR,t.inject=x,t.log=rR,t.map=ue,t.mapLimit=j,t.mapSeries=je,t.mapValues=iR,t.mapValuesLimit=yh,t.mapValuesSeries=nR,t.memoize=sR,t.nextTick=aR,t.parallel=oR,t.parallelLimit=lR,t.priorityQueue=fR,t.queue=By,t.race=cR,t.reduce=x,t.reduceRight=_h,t.reflect=wh,t.reflectAll=hR,t.reject=dR,t.rejectLimit=pR,t.rejectSeries=gR,t.retry=bh,t.retryable=vR,t.select=dh,t.selectLimit=ph,t.selectSeries=gh,t.seq=A,t.series=_R,t.setImmediate=f,t.some=xh,t.someLimit=Sh,t.someSeries=Eh,t.sortBy=wR,t.timeout=bR,t.times=xR,t.timesLimit=Th,t.timesSeries=SR,t.transform=ER,t.tryEach=TR,t.unmemoize=CR,t.until=kR,t.waterfall=RR,t.whilst=pu,t.wrapSync=c,Object.defineProperty(t,"__esModule",{value:!0})}))});var r4=w((uDe,t4)=>{var hs=Y("constants"),ipe=process.cwd,qg=null,npe=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return qg||(qg=ipe.call(process)),qg};try{process.cwd()}catch{}typeof process.chdir=="function"&&($E=process.chdir,process.chdir=function(t){qg=null,$E.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,$E));var $E;t4.exports=spe;function spe(t){hs.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=i(t.chmod),t.fchmod=i(t.fchmod),t.lchmod=i(t.lchmod),t.chownSync=a(t.chownSync),t.fchownSync=a(t.fchownSync),t.lchownSync=a(t.lchownSync),t.chmodSync=n(t.chmodSync),t.fchmodSync=n(t.fchmodSync),t.lchmodSync=n(t.lchmodSync),t.stat=o(t.stat),t.fstat=o(t.fstat),t.lstat=o(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,h,d){d&&process.nextTick(d)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,h,d,p){p&&process.nextTick(p)},t.lchownSync=function(){}),npe==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:(function(c){function h(d,p,g){var y=Date.now(),v=0;c(d,p,function b(k){if(k&&(k.code==="EACCES"||k.code==="EPERM"||k.code==="EBUSY")&&Date.now()-y<6e4){setTimeout(function(){t.stat(p,function(N,E){N&&N.code==="ENOENT"?c(d,p,b):g(k)})},v),v<100&&(v+=10);return}g&&g(k)})}return Object.setPrototypeOf&&Object.setPrototypeOf(h,c),h})(t.rename)),t.read=typeof t.read!="function"?t.read:(function(c){function h(d,p,g,y,v,b){var k;if(b&&typeof b=="function"){var N=0;k=function(E,U,ee){if(E&&E.code==="EAGAIN"&&N<10)return N++,c.call(t,d,p,g,y,v,k);b.apply(this,arguments)}}return c.call(t,d,p,g,y,v,k)}return Object.setPrototypeOf&&Object.setPrototypeOf(h,c),h})(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:(function(c){return function(h,d,p,g,y){for(var v=0;;)try{return c.call(t,h,d,p,g,y)}catch(b){if(b.code==="EAGAIN"&&v<10){v++;continue}throw b}}})(t.readSync);function e(c){c.lchmod=function(h,d,p){c.open(h,hs.O_WRONLY|hs.O_SYMLINK,d,function(g,y){if(g){p&&p(g);return}c.fchmod(y,d,function(v){c.close(y,function(b){p&&p(v||b)})})})},c.lchmodSync=function(h,d){var p=c.openSync(h,hs.O_WRONLY|hs.O_SYMLINK,d),g=!0,y;try{y=c.fchmodSync(p,d),g=!1}finally{if(g)try{c.closeSync(p)}catch{}else c.closeSync(p)}return y}}function r(c){hs.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(h,d,p,g){c.open(h,hs.O_SYMLINK,function(y,v){if(y){g&&g(y);return}c.futimes(v,d,p,function(b){c.close(v,function(k){g&&g(b||k)})})})},c.lutimesSync=function(h,d,p){var g=c.openSync(h,hs.O_SYMLINK),y,v=!0;try{y=c.futimesSync(g,d,p),v=!1}finally{if(v)try{c.closeSync(g)}catch{}else c.closeSync(g)}return y}):c.futimes&&(c.lutimes=function(h,d,p,g){g&&process.nextTick(g)},c.lutimesSync=function(){})}function i(c){return c&&function(h,d,p){return c.call(t,h,d,function(g){f(g)&&(g=null),p&&p.apply(this,arguments)})}}function n(c){return c&&function(h,d){try{return c.call(t,h,d)}catch(p){if(!f(p))throw p}}}function s(c){return c&&function(h,d,p,g){return c.call(t,h,d,p,function(y){f(y)&&(y=null),g&&g.apply(this,arguments)})}}function a(c){return c&&function(h,d,p){try{return c.call(t,h,d,p)}catch(g){if(!f(g))throw g}}}function o(c){return c&&function(h,d,p){typeof d=="function"&&(p=d,d=null);function g(y,v){v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),p&&p.apply(this,arguments)}return d?c.call(t,h,d,g):c.call(t,h,g)}}function u(c){return c&&function(h,d){var p=d?c.call(t,h,d):c.call(t,h);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function f(c){if(!c||c.code==="ENOSYS")return!0;var h=!process.getuid||process.getuid()!==0;return!!(h&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var s4=w((fDe,n4)=>{var i4=Y("stream").Stream;n4.exports=ape;function ape(t){return{ReadStream:e,WriteStream:r};function e(i,n){if(!(this instanceof e))return new e(i,n);i4.call(this);var s=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var a=Object.keys(n),o=0,u=a.length;o<u;o++){var f=a[o];this[f]=n[f]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(c,h){if(c){s.emit("error",c),s.readable=!1;return}s.fd=h,s.emit("open",h),s._read()})}function r(i,n){if(!(this instanceof r))return new r(i,n);i4.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),a=0,o=s.length;a<o;a++){var u=s[a];this[u]=n[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var o4=w((cDe,a4)=>{"use strict";a4.exports=lpe;var ope=Object.getPrototypeOf||function(t){return t.__proto__};function lpe(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:ope(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var Er=w((hDe,HE)=>{var _t=Y("fs"),upe=r4(),fpe=s4(),cpe=o4(),Lg=Y("util"),Gt,jg;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Gt=Symbol.for("graceful-fs.queue"),jg=Symbol.for("graceful-fs.previous")):(Gt="___graceful-fs.queue",jg="___graceful-fs.previous");function hpe(){}function f4(t,e){Object.defineProperty(t,Gt,{get:function(){return e}})}var ba=hpe;Lg.debuglog?ba=Lg.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(ba=function(){var t=Lg.format.apply(Lg,arguments);t="GFS4: "+t.split(/\n/).join(`
28
+ GFS4: `),console.error(t)});_t[Gt]||(l4=global[Gt]||[],f4(_t,l4),_t.close=(function(t){function e(r,i){return t.call(_t,r,function(n){n||u4(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(e,jg,{value:t}),e})(_t.close),_t.closeSync=(function(t){function e(r){t.apply(_t,arguments),u4()}return Object.defineProperty(e,jg,{value:t}),e})(_t.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){ba(_t[Gt]),Y("assert").equal(_t[Gt].length,0)}));var l4;global[Gt]||f4(global,_t[Gt]);HE.exports=UE(cpe(_t));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!_t.__patched&&(HE.exports=UE(_t),_t.__patched=!0);function UE(t){upe(t),t.gracefulify=UE,t.createReadStream=U,t.createWriteStream=ee;var e=t.readFile;t.readFile=r;function r(I,Z,H){return typeof Z=="function"&&(H=Z,Z=null),O(I,Z,H);function O(q,B,J,T){return e(q,B,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?ml([O,[q,B,J],M,T||Date.now(),Date.now()]):typeof J=="function"&&J.apply(this,arguments)})}}var i=t.writeFile;t.writeFile=n;function n(I,Z,H,O){return typeof H=="function"&&(O=H,H=null),q(I,Z,H,O);function q(B,J,T,M,$){return i(B,J,T,function(z){z&&(z.code==="EMFILE"||z.code==="ENFILE")?ml([q,[B,J,T,M],z,$||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=a);function a(I,Z,H,O){return typeof H=="function"&&(O=H,H=null),q(I,Z,H,O);function q(B,J,T,M,$){return s(B,J,T,function(z){z&&(z.code==="EMFILE"||z.code==="ENFILE")?ml([q,[B,J,T,M],z,$||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var o=t.copyFile;o&&(t.copyFile=u);function u(I,Z,H,O){return typeof H=="function"&&(O=H,H=0),q(I,Z,H,O);function q(B,J,T,M,$){return o(B,J,T,function(z){z&&(z.code==="EMFILE"||z.code==="ENFILE")?ml([q,[B,J,T,M],z,$||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var f=t.readdir;t.readdir=h;var c=/^v[0-5]\./;function h(I,Z,H){typeof Z=="function"&&(H=Z,Z=null);var O=c.test(process.version)?function(J,T,M,$){return f(J,q(J,T,M,$))}:function(J,T,M,$){return f(J,T,q(J,T,M,$))};return O(I,Z,H);function q(B,J,T,M){return function($,z){$&&($.code==="EMFILE"||$.code==="ENFILE")?ml([O,[B,J,T],$,M||Date.now(),Date.now()]):(z&&z.sort&&z.sort(),typeof T=="function"&&T.call(this,$,z))}}}if(process.version.substr(0,4)==="v0.8"){var d=fpe(t);b=d.ReadStream,N=d.WriteStream}var p=t.ReadStream;p&&(b.prototype=Object.create(p.prototype),b.prototype.open=k);var g=t.WriteStream;g&&(N.prototype=Object.create(g.prototype),N.prototype.open=E),Object.defineProperty(t,"ReadStream",{get:function(){return b},set:function(I){b=I},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return N},set:function(I){N=I},enumerable:!0,configurable:!0});var y=b;Object.defineProperty(t,"FileReadStream",{get:function(){return y},set:function(I){y=I},enumerable:!0,configurable:!0});var v=N;Object.defineProperty(t,"FileWriteStream",{get:function(){return v},set:function(I){v=I},enumerable:!0,configurable:!0});function b(I,Z){return this instanceof b?(p.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function k(){var I=this;L(I.path,I.flags,I.mode,function(Z,H){Z?(I.autoClose&&I.destroy(),I.emit("error",Z)):(I.fd=H,I.emit("open",H),I.read())})}function N(I,Z){return this instanceof N?(g.apply(this,arguments),this):N.apply(Object.create(N.prototype),arguments)}function E(){var I=this;L(I.path,I.flags,I.mode,function(Z,H){Z?(I.destroy(),I.emit("error",Z)):(I.fd=H,I.emit("open",H))})}function U(I,Z){return new t.ReadStream(I,Z)}function ee(I,Z){return new t.WriteStream(I,Z)}var F=t.open;t.open=L;function L(I,Z,H,O){return typeof H=="function"&&(O=H,H=null),q(I,Z,H,O);function q(B,J,T,M,$){return F(B,J,T,function(z,re){z&&(z.code==="EMFILE"||z.code==="ENFILE")?ml([q,[B,J,T,M],z,$||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function ml(t){ba("ENQUEUE",t[0].name,t[1]),_t[Gt].push(t),WE()}var Bg;function u4(){for(var t=Date.now(),e=0;e<_t[Gt].length;++e)_t[Gt][e].length>2&&(_t[Gt][e][3]=t,_t[Gt][e][4]=t);WE()}function WE(){if(clearTimeout(Bg),Bg=void 0,_t[Gt].length!==0){var t=_t[Gt].shift(),e=t[0],r=t[1],i=t[2],n=t[3],s=t[4];if(n===void 0)ba("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-n>=6e4){ba("TIMEOUT",e.name,r);var a=r.pop();typeof a=="function"&&a.call(null,i)}else{var o=Date.now()-s,u=Math.max(s-n,1),f=Math.min(u*1.2,100);o>=f?(ba("RETRY",e.name,r),e.apply(null,r.concat([n]))):_t[Gt].push(t)}Bg===void 0&&(Bg=setTimeout(WE,0))}}});var zE=w((dDe,c4)=>{c4.exports=Y("stream")});var Uf=w((XE,d4)=>{var $g=Y("buffer"),hn=$g.Buffer;function h4(t,e){for(var r in t)e[r]=t[r]}hn.from&&hn.alloc&&hn.allocUnsafe&&hn.allocUnsafeSlow?d4.exports=$g:(h4($g,XE),XE.Buffer=yl);function yl(t,e,r){return hn(t,e,r)}h4(hn,yl);yl.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return hn(t,e,r)};yl.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=hn(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};yl.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return hn(t)};yl.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return $g.SlowBuffer(t)}});var g4=w((pDe,VE)=>{"use strict";function dpe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var p4=Uf().Buffer,Wf=Y("util");function ppe(t,e,r){t.copy(e,r)}VE.exports=(function(){function t(){dpe(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return p4.alloc(0);for(var i=p4.allocUnsafe(r>>>0),n=this.head,s=0;n;)ppe(n.data,i,s),s+=n.data.length,n=n.next;return i},t})();Wf&&Wf.inspect&&Wf.inspect.custom&&(VE.exports.prototype[Wf.inspect.custom]=function(){var t=Wf.inspect({length:this.length});return this.constructor.name+" "+t})});var GE=w((gDe,m4)=>{"use strict";var Ug=St();function gpe(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ug.nextTick(Wg,this,t)):Ug.nextTick(Wg,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,Ug.nextTick(Wg,r,s)):Ug.nextTick(Wg,r,s):e&&e(s)}),this)}function mpe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Wg(t,e){t.emit("error",e)}m4.exports={destroy:gpe,undestroy:mpe}});var YE=w((mDe,E4)=>{"use strict";var xa=St();E4.exports=kt;function v4(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Fpe(e,t)}}var ype=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:xa.nextTick,vl;kt.WritableState=zf;var _4=Object.create(et());_4.inherits=be();var vpe={deprecate:Ls()},w4=zE(),zg=Uf().Buffer,_pe=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function wpe(t){return zg.from(t)}function bpe(t){return zg.isBuffer(t)||t instanceof _pe}var b4=GE();_4.inherits(kt,w4);function xpe(){}function zf(t,e){vl=vl||Sa(),t=t||{};var r=e instanceof vl;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){Ape(e,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new v4(this)}zf.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(zf.prototype,"buffer",{get:vpe.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Hg;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Hg=Function.prototype[Symbol.hasInstance],Object.defineProperty(kt,Symbol.hasInstance,{value:function(t){return Hg.call(this,t)?!0:this!==kt?!1:t&&t._writableState instanceof zf}})):Hg=function(t){return t instanceof this};function kt(t){if(vl=vl||Sa(),!Hg.call(kt,this)&&!(this instanceof vl))return new kt(t);this._writableState=new zf(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),w4.call(this)}kt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Spe(t,e){var r=new Error("write after end");t.emit("error",r),xa.nextTick(e,r)}function Epe(t,e,r,i){var n=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),xa.nextTick(i,s),n=!1),n}kt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&bpe(t);return s&&!zg.isBuffer(t)&&(t=wpe(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=xpe),i.ended?Spe(this,r):(s||Epe(this,i,t,r))&&(i.pendingcb++,n=Cpe(this,i,s,t,e,r)),n};kt.prototype.cork=function(){var t=this._writableState;t.corked++};kt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&x4(this,t))};kt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function Tpe(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=zg.from(e,r)),e}Object.defineProperty(kt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Cpe(t,e,r,i,n,s){if(!r){var a=Tpe(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else ZE(t,e,!1,o,i,n,s);return u}function ZE(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function kpe(t,e,r,i,n){--e.pendingcb,r?(xa.nextTick(n,i),xa.nextTick(Hf,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),Hf(t,e))}function Rpe(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function Ape(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(Rpe(r),e)kpe(t,r,i,e,n);else{var s=S4(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&x4(t,r),i?ype(y4,t,r,s,n):y4(t,r,s,n)}}function y4(t,e,r,i){r||Ope(t,e),e.pendingcb--,i(),Hf(t,e)}function Ope(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function x4(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,ZE(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new v4(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,c=r.callback,h=e.objectMode?1:u.length;if(ZE(t,e,!1,h,u,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}kt.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};kt.prototype._writev=null;kt.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||Dpe(this,i,r)};function S4(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Ipe(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Hf(t,e)})}function Npe(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,xa.nextTick(Ipe,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Hf(t,e){var r=S4(e);return r&&(Npe(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function Dpe(t,e,r){e.ending=!0,Hf(t,e),r&&(e.finished?xa.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Fpe(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(kt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});kt.prototype.destroy=b4.destroy;kt.prototype._undestroy=b4.undestroy;kt.prototype._destroy=function(t,e){this.end(),e(t)}});var Sa=w((yDe,R4)=>{"use strict";var T4=St(),Mpe=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};R4.exports=dn;var C4=Object.create(et());C4.inherits=be();var k4=JE(),QE=YE();C4.inherits(dn,k4);for(KE=Mpe(QE.prototype),Xg=0;Xg<KE.length;Xg++)Vg=KE[Xg],dn.prototype[Vg]||(dn.prototype[Vg]=QE.prototype[Vg]);var KE,Vg,Xg;function dn(t){if(!(this instanceof dn))return new dn(t);k4.call(this,t),QE.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Ppe)}Object.defineProperty(dn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ppe(){this.allowHalfOpen||this._writableState.ended||T4.nextTick(qpe,this)}function qpe(t){t.end()}Object.defineProperty(dn.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});dn.prototype._destroy=function(t,e){this.push(null),this.end(),T4.nextTick(e,t)}});var rT=w(O4=>{"use strict";var tT=Uf().Buffer,A4=tT.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Lpe(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Bpe(t){var e=Lpe(t);if(typeof e!="string"&&(tT.isEncoding===A4||!A4(t)))throw new Error("Unknown encoding: "+t);return e||t}O4.StringDecoder=Xf;function Xf(t){this.encoding=Bpe(t);var e;switch(this.encoding){case"utf16le":this.text=zpe,this.end=Xpe,e=4;break;case"utf8":this.fillLast=Upe,e=4;break;case"base64":this.text=Vpe,this.end=Gpe,e=3;break;default:this.write=Zpe,this.end=Ype;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=tT.allocUnsafe(e)}Xf.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Xf.prototype.end=Hpe;Xf.prototype.text=Wpe;Xf.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function eT(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function jpe(t,e,r){var i=e.length-1;if(i<r)return 0;var n=eT(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=eT(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=eT(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function $pe(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Upe(t){var e=this.lastTotal-this.lastNeed,r=$pe(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Wpe(t,e){var r=jpe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Hpe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function zpe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Xpe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Vpe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Gpe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Zpe(t){return t.toString(this.encoding)}function Ype(t){return t&&t.length?this.write(t):""}});var JE=w((wDe,U4)=>{"use strict";var wl=St();U4.exports=ot;var Kpe=no(),Vf;ot.ReadableState=q4;var _De=Y("events").EventEmitter,F4=function(t,e){return t.listeners(e).length},oT=zE(),Gf=Uf().Buffer,Qpe=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Jpe(t){return Gf.from(t)}function ege(t){return Gf.isBuffer(t)||t instanceof Qpe}var M4=Object.create(et());M4.inherits=be();var iT=Y("util"),Ue=void 0;iT&&iT.debuglog?Ue=iT.debuglog("stream"):Ue=function(){};var tge=g4(),P4=GE(),_l;M4.inherits(ot,oT);var nT=["error","close","destroy","pause","resume"];function rge(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Kpe(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function q4(t,e){Vf=Vf||Sa(),t=t||{};var r=e instanceof Vf;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new tge,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(_l||(_l=rT().StringDecoder),this.decoder=new _l(t.encoding),this.encoding=t.encoding)}function ot(t){if(Vf=Vf||Sa(),!(this instanceof ot))return new ot(t);this._readableState=new q4(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),oT.call(this)}Object.defineProperty(ot.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ot.prototype.destroy=P4.destroy;ot.prototype._undestroy=P4.undestroy;ot.prototype._destroy=function(t,e){this.push(null),e(t)};ot.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Gf.from(t,e),e=""),i=!0),L4(this,t,e,!1,i)};ot.prototype.unshift=function(t){return L4(this,t,null,!0,!1)};function L4(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,age(t,s);else{var a;n||(a=ige(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Gf.prototype&&(e=Jpe(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):sT(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?sT(t,s,e,!1):B4(t,s)):sT(t,s,e,!1))):i||(s.reading=!1)}return nge(s)}function sT(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Gg(t)),B4(t,e)}function ige(t,e){var r;return!ege(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function nge(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ot.prototype.isPaused=function(){return this._readableState.flowing===!1};ot.prototype.setEncoding=function(t){return _l||(_l=rT().StringDecoder),this._readableState.decoder=new _l(t),this._readableState.encoding=t,this};var I4=8388608;function sge(t){return t>=I4?t=I4:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function N4(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=sge(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ot.prototype.read=function(t){Ue("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Ue("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?aT(this):Gg(this),null;if(t=N4(t,e),t===0&&e.ended)return e.length===0&&aT(this),null;var i=e.needReadable;Ue("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ue("length less than watermark",i)),e.ended||e.reading?(i=!1,Ue("reading or ended",i)):i&&(Ue("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=N4(r,e)));var n;return t>0?n=j4(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&aT(this)),n!==null&&this.emit("data",n),n};function age(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Gg(t)}}function Gg(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Ue("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?wl.nextTick(D4,t):D4(t))}function D4(t){Ue("emit readable"),t.emit("readable"),lT(t)}function B4(t,e){e.readingMore||(e.readingMore=!0,wl.nextTick(oge,t,e))}function oge(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Ue("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}ot.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ot.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ue("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:v;i.endEmitted?wl.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(b,k){Ue("onunpipe"),b===r&&k&&k.hasUnpiped===!1&&(k.hasUnpiped=!0,c())}function o(){Ue("onend"),t.end()}var u=lge(r);t.on("drain",u);var f=!1;function c(){Ue("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",v),r.removeListener("data",d),f=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var h=!1;r.on("data",d);function d(b){Ue("ondata"),h=!1;var k=t.write(b);k===!1&&!h&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&$4(i.pipes,t)!==-1)&&!f&&(Ue("false write response, pause",i.awaitDrain),i.awaitDrain++,h=!0),r.pause())}function p(b){Ue("onerror",b),v(),t.removeListener("error",p),F4(t,"error")===0&&t.emit("error",b)}rge(t,"error",p);function g(){t.removeListener("finish",y),v()}t.once("close",g);function y(){Ue("onfinish"),t.removeListener("close",g),v()}t.once("finish",y);function v(){Ue("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ue("pipe resume"),r.resume()),t};function lge(t){return function(){var e=t._readableState;Ue("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&F4(t,"data")&&(e.flowing=!0,lT(t))}}ot.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=$4(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ot.prototype.on=function(t,e){var r=oT.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Gg(this):wl.nextTick(uge,this))}return r};ot.prototype.addListener=ot.prototype.on;function uge(t){Ue("readable nexttick read 0"),t.read(0)}ot.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ue("resume"),t.flowing=!0,fge(this,t)),this};function fge(t,e){e.resumeScheduled||(e.resumeScheduled=!0,wl.nextTick(cge,t,e))}function cge(t,e){e.reading||(Ue("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),lT(t),e.flowing&&!e.reading&&t.read(0)}ot.prototype.pause=function(){return Ue("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ue("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function lT(t){var e=t._readableState;for(Ue("flow",e.flowing);e.flowing&&t.read()!==null;);}ot.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ue("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(Ue("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<nT.length;s++)t.on(nT[s],this.emit.bind(this,nT[s]));return this._read=function(a){Ue("wrapped _read",a),i&&(i=!1,t.resume())},this};Object.defineProperty(ot.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ot._fromList=j4;function j4(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=hge(t,e.buffer,e.decoder),r}function hge(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?dge(t,e):pge(t,e),i}function dge(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var s=r.data,a=t>s.length?s.length:t;if(a===s.length?n+=s:n+=s.slice(0,t),t-=a,t===0){a===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(a));break}++i}return e.length-=i,n}function pge(t,e){var r=Gf.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var s=i.data,a=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,a),t-=a,t===0){a===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(a));break}++n}return e.length-=n,r}function aT(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,wl.nextTick(gge,e,t))}function gge(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function $4(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var uT=w((bDe,z4)=>{"use strict";z4.exports=pn;var Zg=Sa(),H4=Object.create(et());H4.inherits=be();H4.inherits(pn,Zg);function mge(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function pn(t){if(!(this instanceof pn))return new pn(t);Zg.call(this,t),this._transformState={afterTransform:mge.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",yge)}function yge(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){W4(t,e,r)}):W4(this,null,null)}pn.prototype.push=function(t,e){return this._transformState.needTransform=!1,Zg.prototype.push.call(this,t,e)};pn.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};pn.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};pn.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};pn.prototype._destroy=function(t,e){var r=this;Zg.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function W4(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Z4=w((xDe,G4)=>{"use strict";G4.exports=Zf;var X4=uT(),V4=Object.create(et());V4.inherits=be();V4.inherits(Zf,X4);function Zf(t){if(!(this instanceof Zf))return new Zf(t);X4.call(this,t)}Zf.prototype._transform=function(t,e,r){r(null,t)}});var Y4=w((Zt,Yg)=>{var Di=Y("stream");process.env.READABLE_STREAM==="disable"&&Di?(Yg.exports=Di,Zt=Yg.exports=Di.Readable,Zt.Readable=Di.Readable,Zt.Writable=Di.Writable,Zt.Duplex=Di.Duplex,Zt.Transform=Di.Transform,Zt.PassThrough=Di.PassThrough,Zt.Stream=Di):(Zt=Yg.exports=JE(),Zt.Stream=Di||Zt,Zt.Readable=Zt,Zt.Writable=YE(),Zt.Duplex=Sa(),Zt.Transform=uT(),Zt.PassThrough=Z4())});var Q4=w((SDe,K4)=>{K4.exports=Y4().PassThrough});var fT=w((EDe,t3)=>{var J4=Y("util"),Jg=Q4();t3.exports={Readable:Kg,Writable:Qg};J4.inherits(Kg,Jg);J4.inherits(Qg,Jg);function e3(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function Kg(t,e){if(!(this instanceof Kg))return new Kg(t,e);Jg.call(this,e),e3(this,"_read",function(){var r=t.call(this,e),i=this.emit.bind(this,"error");r.on("error",i),r.pipe(this)}),this.emit("readable")}function Qg(t,e){if(!(this instanceof Qg))return new Qg(t,e);Jg.call(this,e),e3(this,"_write",function(){var r=t.call(this,e),i=this.emit.bind(this,"error");r.on("error",i),this.pipe(r)}),this.emit("writable")}});var em=w((TDe,r3)=>{r3.exports=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var r=t.length;if(r<=1)return t;var i="";if(r>4&&t[3]==="\\"){var n=t[2];(n==="?"||n===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),i="//")}var s=t.split(/[/\\]+/);return e!==!1&&s[s.length-1]===""&&s.pop(),i+s.join("/")}});var pT=w((CDe,u3)=>{var n3=9007199254740991,vge="[object Arguments]",_ge="[object Function]",wge="[object GeneratorFunction]",bge=/^(?:0|[1-9]\d*)$/;function s3(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function xge(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var Yf=Object.prototype,Kf=Yf.hasOwnProperty,a3=Yf.toString,Sge=Yf.propertyIsEnumerable,i3=Math.max;function Ege(t,e){var r=Fge(t)||Dge(t)?xge(t.length,String):[],i=r.length,n=!!i;for(var s in t)(e||Kf.call(t,s))&&!(n&&(s=="length"||l3(s,i)))&&r.push(s);return r}function Tge(t,e,r,i){return t===void 0||cT(t,Yf[r])&&!Kf.call(i,r)?e:t}function Cge(t,e,r){var i=t[e];(!(Kf.call(t,e)&&cT(i,r))||r===void 0&&!(e in t))&&(t[e]=r)}function kge(t){if(!dT(t))return Nge(t);var e=Ige(t),r=[];for(var i in t)i=="constructor"&&(e||!Kf.call(t,i))||r.push(i);return r}function o3(t,e){return e=i3(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,n=i3(r.length-e,0),s=Array(n);++i<n;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=s,s3(t,this,a)}}function Rge(t,e,r,i){r||(r={});for(var n=-1,s=e.length;++n<s;){var a=e[n],o=i?i(r[a],t[a],a,r,t):void 0;Cge(r,a,o===void 0?t[a]:o)}return r}function Age(t){return o3(function(e,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(n--,s):void 0,a&&Oge(r[0],r[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var o=r[i];o&&t(e,o,i,s)}return e})}function l3(t,e){return e=e??n3,!!e&&(typeof t=="number"||bge.test(t))&&t>-1&&t%1==0&&t<e}function Oge(t,e,r){if(!dT(r))return!1;var i=typeof e;return(i=="number"?hT(r)&&l3(e,r.length):i=="string"&&e in r)?cT(r[e],t):!1}function Ige(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Yf;return t===r}function Nge(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}function cT(t,e){return t===e||t!==t&&e!==e}function Dge(t){return Mge(t)&&Kf.call(t,"callee")&&(!Sge.call(t,"callee")||a3.call(t)==vge)}var Fge=Array.isArray;function hT(t){return t!=null&&qge(t.length)&&!Pge(t)}function Mge(t){return Lge(t)&&hT(t)}function Pge(t){var e=dT(t)?a3.call(t):"";return e==_ge||e==wge}function qge(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=n3}function dT(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Lge(t){return!!t&&typeof t=="object"}var Bge=Age(function(t,e,r,i){Rge(e,$ge(e),t,i)}),jge=o3(function(t){return t.push(void 0,Tge),s3(Bge,void 0,t)});function $ge(t){return hT(t)?Ege(t,!0):kge(t)}u3.exports=jge});var gT=w((kDe,f3)=>{f3.exports=Y("stream")});var Qf=w((mT,h3)=>{var tm=Y("buffer"),gn=tm.Buffer;function c3(t,e){for(var r in t)e[r]=t[r]}gn.from&&gn.alloc&&gn.allocUnsafe&&gn.allocUnsafeSlow?h3.exports=tm:(c3(tm,mT),mT.Buffer=bl);function bl(t,e,r){return gn(t,e,r)}c3(gn,bl);bl.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return gn(t,e,r)};bl.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=gn(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};bl.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return gn(t)};bl.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return tm.SlowBuffer(t)}});var p3=w((RDe,yT)=>{"use strict";function Uge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var d3=Qf().Buffer,Jf=Y("util");function Wge(t,e,r){t.copy(e,r)}yT.exports=(function(){function t(){Uge(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return d3.alloc(0);for(var i=d3.allocUnsafe(r>>>0),n=this.head,s=0;n;)Wge(n.data,i,s),s+=n.data.length,n=n.next;return i},t})();Jf&&Jf.inspect&&Jf.inspect.custom&&(yT.exports.prototype[Jf.inspect.custom]=function(){var t=Jf.inspect({length:this.length});return this.constructor.name+" "+t})});var vT=w((ADe,g3)=>{"use strict";var rm=St();function Hge(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,rm.nextTick(im,this,t)):rm.nextTick(im,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,rm.nextTick(im,r,s)):rm.nextTick(im,r,s):e&&e(s)}),this)}function zge(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function im(t,e){t.emit("error",e)}g3.exports={destroy:Hge,undestroy:zge}});var wT=w((ODe,S3)=>{"use strict";var Ea=St();S3.exports=Rt;function y3(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ume(e,t)}}var Xge=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Ea.nextTick,xl;Rt.WritableState=tc;var v3=Object.create(et());v3.inherits=be();var Vge={deprecate:Ls()},_3=gT(),sm=Qf().Buffer,Gge=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Zge(t){return sm.from(t)}function Yge(t){return sm.isBuffer(t)||t instanceof Gge}var w3=vT();v3.inherits(Rt,_3);function Kge(){}function tc(t,e){xl=xl||Ta(),t=t||{};var r=e instanceof xl;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){nme(e,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new y3(this)}tc.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(tc.prototype,"buffer",{get:Vge.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var nm;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(nm=Function.prototype[Symbol.hasInstance],Object.defineProperty(Rt,Symbol.hasInstance,{value:function(t){return nm.call(this,t)?!0:this!==Rt?!1:t&&t._writableState instanceof tc}})):nm=function(t){return t instanceof this};function Rt(t){if(xl=xl||Ta(),!nm.call(Rt,this)&&!(this instanceof xl))return new Rt(t);this._writableState=new tc(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),_3.call(this)}Rt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Qge(t,e){var r=new Error("write after end");t.emit("error",r),Ea.nextTick(e,r)}function Jge(t,e,r,i){var n=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),Ea.nextTick(i,s),n=!1),n}Rt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Yge(t);return s&&!sm.isBuffer(t)&&(t=Zge(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Kge),i.ended?Qge(this,r):(s||Jge(this,i,t,r))&&(i.pendingcb++,n=tme(this,i,s,t,e,r)),n};Rt.prototype.cork=function(){var t=this._writableState;t.corked++};Rt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&b3(this,t))};Rt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function eme(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=sm.from(e,r)),e}Object.defineProperty(Rt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function tme(t,e,r,i,n,s){if(!r){var a=eme(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _T(t,e,!1,o,i,n,s);return u}function _T(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function rme(t,e,r,i,n){--e.pendingcb,r?(Ea.nextTick(n,i),Ea.nextTick(ec,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),ec(t,e))}function ime(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function nme(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(ime(r),e)rme(t,r,i,e,n);else{var s=x3(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&b3(t,r),i?Xge(m3,t,r,s,n):m3(t,r,s,n)}}function m3(t,e,r,i){r||sme(t,e),e.pendingcb--,i(),ec(t,e)}function sme(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function b3(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,_T(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new y3(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,c=r.callback,h=e.objectMode?1:u.length;if(_T(t,e,!1,h,u,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Rt.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Rt.prototype._writev=null;Rt.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||lme(this,i,r)};function x3(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function ame(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),ec(t,e)})}function ome(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,Ea.nextTick(ame,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function ec(t,e){var r=x3(e);return r&&(ome(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function lme(t,e,r){e.ending=!0,ec(t,e),r&&(e.finished?Ea.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function ume(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Rt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Rt.prototype.destroy=w3.destroy;Rt.prototype._undestroy=w3.undestroy;Rt.prototype._destroy=function(t,e){this.end(),e(t)}});var Ta=w((IDe,k3)=>{"use strict";var E3=St(),fme=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};k3.exports=mn;var T3=Object.create(et());T3.inherits=be();var C3=ST(),xT=wT();T3.inherits(mn,C3);for(bT=fme(xT.prototype),am=0;am<bT.length;am++)om=bT[am],mn.prototype[om]||(mn.prototype[om]=xT.prototype[om]);var bT,om,am;function mn(t){if(!(this instanceof mn))return new mn(t);C3.call(this,t),xT.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",cme)}Object.defineProperty(mn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function cme(){this.allowHalfOpen||this._writableState.ended||E3.nextTick(hme,this)}function hme(t){t.end()}Object.defineProperty(mn.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});mn.prototype._destroy=function(t,e){this.push(null),this.end(),E3.nextTick(e,t)}});var CT=w(A3=>{"use strict";var TT=Qf().Buffer,R3=TT.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function dme(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function pme(t){var e=dme(t);if(typeof e!="string"&&(TT.isEncoding===R3||!R3(t)))throw new Error("Unknown encoding: "+t);return e||t}A3.StringDecoder=rc;function rc(t){this.encoding=pme(t);var e;switch(this.encoding){case"utf16le":this.text=wme,this.end=bme,e=4;break;case"utf8":this.fillLast=yme,e=4;break;case"base64":this.text=xme,this.end=Sme,e=3;break;default:this.write=Eme,this.end=Tme;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=TT.allocUnsafe(e)}rc.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};rc.prototype.end=_me;rc.prototype.text=vme;rc.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function ET(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function gme(t,e,r){var i=e.length-1;if(i<r)return 0;var n=ET(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=ET(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=ET(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function mme(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function yme(t){var e=this.lastTotal-this.lastNeed,r=mme(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function vme(t,e){var r=gme(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function _me(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function wme(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function bme(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function xme(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Sme(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Eme(t){return t.toString(this.encoding)}function Tme(t){return t&&t.length?this.write(t):""}});var ST=w((FDe,$3)=>{"use strict";var El=St();$3.exports=lt;var Cme=no(),ic;lt.ReadableState=P3;var DDe=Y("events").EventEmitter,D3=function(t,e){return t.listeners(e).length},IT=gT(),nc=Qf().Buffer,kme=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Rme(t){return nc.from(t)}function Ame(t){return nc.isBuffer(t)||t instanceof kme}var F3=Object.create(et());F3.inherits=be();var kT=Y("util"),We=void 0;kT&&kT.debuglog?We=kT.debuglog("stream"):We=function(){};var Ome=p3(),M3=vT(),Sl;F3.inherits(lt,IT);var RT=["error","close","destroy","pause","resume"];function Ime(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Cme(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function P3(t,e){ic=ic||Ta(),t=t||{};var r=e instanceof ic;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Ome,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Sl||(Sl=CT().StringDecoder),this.decoder=new Sl(t.encoding),this.encoding=t.encoding)}function lt(t){if(ic=ic||Ta(),!(this instanceof lt))return new lt(t);this._readableState=new P3(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),IT.call(this)}Object.defineProperty(lt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});lt.prototype.destroy=M3.destroy;lt.prototype._undestroy=M3.undestroy;lt.prototype._destroy=function(t,e){this.push(null),e(t)};lt.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=nc.from(t,e),e=""),i=!0),q3(this,t,e,!1,i)};lt.prototype.unshift=function(t){return q3(this,t,null,!0,!1)};function q3(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,Mme(t,s);else{var a;n||(a=Nme(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==nc.prototype&&(e=Rme(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):AT(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?AT(t,s,e,!1):L3(t,s)):AT(t,s,e,!1))):i||(s.reading=!1)}return Dme(s)}function AT(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&lm(t)),L3(t,e)}function Nme(t,e){var r;return!Ame(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Dme(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}lt.prototype.isPaused=function(){return this._readableState.flowing===!1};lt.prototype.setEncoding=function(t){return Sl||(Sl=CT().StringDecoder),this._readableState.decoder=new Sl(t),this._readableState.encoding=t,this};var O3=8388608;function Fme(t){return t>=O3?t=O3:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function I3(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Fme(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}lt.prototype.read=function(t){We("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return We("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?OT(this):lm(this),null;if(t=I3(t,e),t===0&&e.ended)return e.length===0&&OT(this),null;var i=e.needReadable;We("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,We("length less than watermark",i)),e.ended||e.reading?(i=!1,We("reading or ended",i)):i&&(We("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=I3(r,e)));var n;return t>0?n=B3(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&OT(this)),n!==null&&this.emit("data",n),n};function Mme(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,lm(t)}}function lm(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(We("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?El.nextTick(N3,t):N3(t))}function N3(t){We("emit readable"),t.emit("readable"),NT(t)}function L3(t,e){e.readingMore||(e.readingMore=!0,El.nextTick(Pme,t,e))}function Pme(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(We("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}lt.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};lt.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,We("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:v;i.endEmitted?El.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(b,k){We("onunpipe"),b===r&&k&&k.hasUnpiped===!1&&(k.hasUnpiped=!0,c())}function o(){We("onend"),t.end()}var u=qme(r);t.on("drain",u);var f=!1;function c(){We("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",v),r.removeListener("data",d),f=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var h=!1;r.on("data",d);function d(b){We("ondata"),h=!1;var k=t.write(b);k===!1&&!h&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&j3(i.pipes,t)!==-1)&&!f&&(We("false write response, pause",i.awaitDrain),i.awaitDrain++,h=!0),r.pause())}function p(b){We("onerror",b),v(),t.removeListener("error",p),D3(t,"error")===0&&t.emit("error",b)}Ime(t,"error",p);function g(){t.removeListener("finish",y),v()}t.once("close",g);function y(){We("onfinish"),t.removeListener("close",g),v()}t.once("finish",y);function v(){We("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(We("pipe resume"),r.resume()),t};function qme(t){return function(){var e=t._readableState;We("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&D3(t,"data")&&(e.flowing=!0,NT(t))}}lt.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=j3(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};lt.prototype.on=function(t,e){var r=IT.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&lm(this):El.nextTick(Lme,this))}return r};lt.prototype.addListener=lt.prototype.on;function Lme(t){We("readable nexttick read 0"),t.read(0)}lt.prototype.resume=function(){var t=this._readableState;return t.flowing||(We("resume"),t.flowing=!0,Bme(this,t)),this};function Bme(t,e){e.resumeScheduled||(e.resumeScheduled=!0,El.nextTick(jme,t,e))}function jme(t,e){e.reading||(We("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),NT(t),e.flowing&&!e.reading&&t.read(0)}lt.prototype.pause=function(){return We("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(We("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function NT(t){var e=t._readableState;for(We("flow",e.flowing);e.flowing&&t.read()!==null;);}lt.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(We("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(We("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<RT.length;s++)t.on(RT[s],this.emit.bind(this,RT[s]));return this._read=function(a){We("wrapped _read",a),i&&(i=!1,t.resume())},this};Object.defineProperty(lt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});lt._fromList=B3;function B3(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=$me(t,e.buffer,e.decoder),r}function $me(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?Ume(t,e):Wme(t,e),i}function Ume(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var s=r.data,a=t>s.length?s.length:t;if(a===s.length?n+=s:n+=s.slice(0,t),t-=a,t===0){a===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(a));break}++i}return e.length-=i,n}function Wme(t,e){var r=nc.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var s=i.data,a=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,a),t-=a,t===0){a===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(a));break}++n}return e.length-=n,r}function OT(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,El.nextTick(Hme,e,t))}function Hme(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j3(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var DT=w((MDe,H3)=>{"use strict";H3.exports=yn;var um=Ta(),W3=Object.create(et());W3.inherits=be();W3.inherits(yn,um);function zme(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function yn(t){if(!(this instanceof yn))return new yn(t);um.call(this,t),this._transformState={afterTransform:zme.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Xme)}function Xme(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){U3(t,e,r)}):U3(this,null,null)}yn.prototype.push=function(t,e){return this._transformState.needTransform=!1,um.prototype.push.call(this,t,e)};yn.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};yn.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};yn.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};yn.prototype._destroy=function(t,e){var r=this;um.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function U3(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var G3=w((PDe,V3)=>{"use strict";V3.exports=sc;var z3=DT(),X3=Object.create(et());X3.inherits=be();X3.inherits(sc,z3);function sc(t){if(!(this instanceof sc))return new sc(t);z3.call(this,t)}sc.prototype._transform=function(t,e,r){r(null,t)}});var Z3=w((Yt,fm)=>{var Fi=Y("stream");process.env.READABLE_STREAM==="disable"&&Fi?(fm.exports=Fi,Yt=fm.exports=Fi.Readable,Yt.Readable=Fi.Readable,Yt.Writable=Fi.Writable,Yt.Duplex=Fi.Duplex,Yt.Transform=Fi.Transform,Yt.PassThrough=Fi.PassThrough,Yt.Stream=Fi):(Yt=fm.exports=ST(),Yt.Stream=Fi||Yt,Yt.Readable=Yt,Yt.Writable=wT(),Yt.Duplex=Ta(),Yt.Transform=DT(),Yt.PassThrough=G3())});var MT=w((qDe,e8)=>{var Vme=9007199254740991,Gme="[object Arguments]",Zme="[object Function]",Yme="[object GeneratorFunction]",Kme=typeof global=="object"&&global&&global.Object===Object&&global,Qme=typeof self=="object"&&self&&self.Object===Object&&self,Jme=Kme||Qme||Function("return this")();function eye(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var FT=Object.prototype,tye=FT.hasOwnProperty,Q3=FT.toString,Y3=Jme.Symbol,rye=FT.propertyIsEnumerable,K3=Y3?Y3.isConcatSpreadable:void 0;function J3(t,e,r,i,n){var s=-1,a=t.length;for(r||(r=iye),n||(n=[]);++s<a;){var o=t[s];e>0&&r(o)?e>1?J3(o,e-1,r,i,n):eye(n,o):i||(n[n.length]=o)}return n}function iye(t){return aye(t)||sye(t)||!!(K3&&t&&t[K3])}function nye(t){var e=t?t.length:0;return e?J3(t,1):[]}function sye(t){return lye(t)&&tye.call(t,"callee")&&(!rye.call(t,"callee")||Q3.call(t)==Gme)}var aye=Array.isArray;function oye(t){return t!=null&&fye(t.length)&&!uye(t)}function lye(t){return hye(t)&&oye(t)}function uye(t){var e=cye(t)?Q3.call(t):"";return e==Zme||e==Yme}function fye(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Vme}function cye(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function hye(t){return!!t&&typeof t=="object"}e8.exports=nye});var $T=w((LDe,c8)=>{var dye=200,LT="__lodash_hash_undefined__",pye=9007199254740991,gye="[object Arguments]",mye="[object Function]",yye="[object GeneratorFunction]",vye=/[\\^$.*+?()[\]{}|]/g,_ye=/^\[object .+?Constructor\]$/,wye=typeof global=="object"&&global&&global.Object===Object&&global,bye=typeof self=="object"&&self&&self.Object===Object&&self,BT=wye||bye||Function("return this")();function xye(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Sye(t,e){var r=t?t.length:0;return!!r&&Rye(t,e,0)>-1}function Eye(t,e,r){for(var i=-1,n=t?t.length:0;++i<n;)if(r(e,t[i]))return!0;return!1}function Tye(t,e){for(var r=-1,i=t?t.length:0,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}function Cye(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}function kye(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function Rye(t,e,r){if(e!==e)return kye(t,Aye,r);for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}function Aye(t){return t!==t}function Oye(t){return function(e){return t(e)}}function Iye(t,e){return t.has(e)}function Nye(t,e){return t?.[e]}function Dye(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var Fye=Array.prototype,Mye=Function.prototype,jT=Object.prototype,PT=BT["__core-js_shared__"],t8=(function(){var t=/[^.]+$/.exec(PT&&PT.keys&&PT.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),s8=Mye.toString,hm=jT.hasOwnProperty,a8=jT.toString,Pye=RegExp("^"+s8.call(hm).replace(vye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),r8=BT.Symbol,qye=jT.propertyIsEnumerable,Lye=Fye.splice,i8=r8?r8.isConcatSpreadable:void 0,n8=Math.max,Bye=l8(BT,"Map"),ac=l8(Object,"create");function Ca(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function jye(){this.__data__=ac?ac(null):{}}function $ye(t){return this.has(t)&&delete this.__data__[t]}function Uye(t){var e=this.__data__;if(ac){var r=e[t];return r===LT?void 0:r}return hm.call(e,t)?e[t]:void 0}function Wye(t){var e=this.__data__;return ac?e[t]!==void 0:hm.call(e,t)}function Hye(t,e){var r=this.__data__;return r[t]=ac&&e===void 0?LT:e,this}Ca.prototype.clear=jye;Ca.prototype.delete=$ye;Ca.prototype.get=Uye;Ca.prototype.has=Wye;Ca.prototype.set=Hye;function Tl(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function zye(){this.__data__=[]}function Xye(t){var e=this.__data__,r=dm(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():Lye.call(e,r,1),!0}function Vye(t){var e=this.__data__,r=dm(e,t);return r<0?void 0:e[r][1]}function Gye(t){return dm(this.__data__,t)>-1}function Zye(t,e){var r=this.__data__,i=dm(r,t);return i<0?r.push([t,e]):r[i][1]=e,this}Tl.prototype.clear=zye;Tl.prototype.delete=Xye;Tl.prototype.get=Vye;Tl.prototype.has=Gye;Tl.prototype.set=Zye;function Cl(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Yye(){this.__data__={hash:new Ca,map:new(Bye||Tl),string:new Ca}}function Kye(t){return pm(this,t).delete(t)}function Qye(t){return pm(this,t).get(t)}function Jye(t){return pm(this,t).has(t)}function eve(t,e){return pm(this,t).set(t,e),this}Cl.prototype.clear=Yye;Cl.prototype.delete=Kye;Cl.prototype.get=Qye;Cl.prototype.has=Jye;Cl.prototype.set=eve;function cm(t){var e=-1,r=t?t.length:0;for(this.__data__=new Cl;++e<r;)this.add(t[e])}function tve(t){return this.__data__.set(t,LT),this}function rve(t){return this.__data__.has(t)}cm.prototype.add=cm.prototype.push=tve;cm.prototype.has=rve;function dm(t,e){for(var r=t.length;r--;)if(cve(t[r][0],e))return r;return-1}function ive(t,e,r,i){var n=-1,s=Sye,a=!0,o=t.length,u=[],f=e.length;if(!o)return u;r&&(e=Tye(e,Oye(r))),i?(s=Eye,a=!1):e.length>=dye&&(s=Iye,a=!1,e=new cm(e));e:for(;++n<o;){var c=t[n],h=r?r(c):c;if(c=i||c!==0?c:0,a&&h===h){for(var d=f;d--;)if(e[d]===h)continue e;u.push(c)}else s(e,h,i)||u.push(c)}return u}function o8(t,e,r,i,n){var s=-1,a=t.length;for(r||(r=ave),n||(n=[]);++s<a;){var o=t[s];e>0&&r(o)?e>1?o8(o,e-1,r,i,n):Cye(n,o):i||(n[n.length]=o)}return n}function nve(t){if(!f8(t)||lve(t))return!1;var e=u8(t)||Dye(t)?Pye:_ye;return e.test(uve(t))}function sve(t,e){return e=n8(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,n=n8(r.length-e,0),s=Array(n);++i<n;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=s,xye(t,this,a)}}function pm(t,e){var r=t.__data__;return ove(e)?r[typeof e=="string"?"string":"hash"]:r.map}function l8(t,e){var r=Nye(t,e);return nve(r)?r:void 0}function ave(t){return dve(t)||hve(t)||!!(i8&&t&&t[i8])}function ove(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function lve(t){return!!t8&&t8 in t}function uve(t){if(t!=null){try{return s8.call(t)}catch{}try{return t+""}catch{}}return""}var fve=sve(function(t,e){return qT(t)?ive(t,o8(e,1,qT,!0)):[]});function cve(t,e){return t===e||t!==t&&e!==e}function hve(t){return qT(t)&&hm.call(t,"callee")&&(!qye.call(t,"callee")||a8.call(t)==gye)}var dve=Array.isArray;function pve(t){return t!=null&&gve(t.length)&&!u8(t)}function qT(t){return mve(t)&&pve(t)}function u8(t){var e=f8(t)?a8.call(t):"";return e==mye||e==yye}function gve(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=pye}function f8(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function mve(t){return!!t&&typeof t=="object"}c8.exports=fve});var VT=w((BDe,S8)=>{var yve=200,HT="__lodash_hash_undefined__",vve=1/0,_ve=9007199254740991,wve="[object Arguments]",bve="[object Function]",xve="[object GeneratorFunction]",Sve=/[\\^$.*+?()[\]{}|]/g,Eve=/^\[object .+?Constructor\]$/,Tve=typeof global=="object"&&global&&global.Object===Object&&global,Cve=typeof self=="object"&&self&&self.Object===Object&&self,mm=Tve||Cve||Function("return this")();function kve(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Rve(t,e){var r=t?t.length:0;return!!r&&Nve(t,e,0)>-1}function Ave(t,e,r){for(var i=-1,n=t?t.length:0;++i<n;)if(r(e,t[i]))return!0;return!1}function Ove(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}function Ive(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function Nve(t,e,r){if(e!==e)return Ive(t,Dve,r);for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}function Dve(t){return t!==t}function Fve(t,e){return t.has(e)}function Mve(t,e){return t?.[e]}function Pve(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function m8(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var qve=Array.prototype,Lve=Function.prototype,zT=Object.prototype,UT=mm["__core-js_shared__"],h8=(function(){var t=/[^.]+$/.exec(UT&&UT.keys&&UT.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),y8=Lve.toString,ym=zT.hasOwnProperty,v8=zT.toString,Bve=RegExp("^"+y8.call(ym).replace(Sve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),d8=mm.Symbol,jve=zT.propertyIsEnumerable,$ve=qve.splice,p8=d8?d8.isConcatSpreadable:void 0,g8=Math.max,Uve=XT(mm,"Map"),WT=XT(mm,"Set"),oc=XT(Object,"create");function ka(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Wve(){this.__data__=oc?oc(null):{}}function Hve(t){return this.has(t)&&delete this.__data__[t]}function zve(t){var e=this.__data__;if(oc){var r=e[t];return r===HT?void 0:r}return ym.call(e,t)?e[t]:void 0}function Xve(t){var e=this.__data__;return oc?e[t]!==void 0:ym.call(e,t)}function Vve(t,e){var r=this.__data__;return r[t]=oc&&e===void 0?HT:e,this}ka.prototype.clear=Wve;ka.prototype.delete=Hve;ka.prototype.get=zve;ka.prototype.has=Xve;ka.prototype.set=Vve;function kl(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Gve(){this.__data__=[]}function Zve(t){var e=this.__data__,r=vm(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():$ve.call(e,r,1),!0}function Yve(t){var e=this.__data__,r=vm(e,t);return r<0?void 0:e[r][1]}function Kve(t){return vm(this.__data__,t)>-1}function Qve(t,e){var r=this.__data__,i=vm(r,t);return i<0?r.push([t,e]):r[i][1]=e,this}kl.prototype.clear=Gve;kl.prototype.delete=Zve;kl.prototype.get=Yve;kl.prototype.has=Kve;kl.prototype.set=Qve;function Rl(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Jve(){this.__data__={hash:new ka,map:new(Uve||kl),string:new ka}}function e_e(t){return _m(this,t).delete(t)}function t_e(t){return _m(this,t).get(t)}function r_e(t){return _m(this,t).has(t)}function i_e(t,e){return _m(this,t).set(t,e),this}Rl.prototype.clear=Jve;Rl.prototype.delete=e_e;Rl.prototype.get=t_e;Rl.prototype.has=r_e;Rl.prototype.set=i_e;function gm(t){var e=-1,r=t?t.length:0;for(this.__data__=new Rl;++e<r;)this.add(t[e])}function n_e(t){return this.__data__.set(t,HT),this}function s_e(t){return this.__data__.has(t)}gm.prototype.add=gm.prototype.push=n_e;gm.prototype.has=s_e;function vm(t,e){for(var r=t.length;r--;)if(g_e(t[r][0],e))return r;return-1}function _8(t,e,r,i,n){var s=-1,a=t.length;for(r||(r=f_e),n||(n=[]);++s<a;){var o=t[s];e>0&&r(o)?e>1?_8(o,e-1,r,i,n):Ove(n,o):i||(n[n.length]=o)}return n}function a_e(t){if(!x8(t)||h_e(t))return!1;var e=b8(t)||Pve(t)?Bve:Eve;return e.test(d_e(t))}function o_e(t,e){return e=g8(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,n=g8(r.length-e,0),s=Array(n);++i<n;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=s,kve(t,this,a)}}function l_e(t,e,r){var i=-1,n=Rve,s=t.length,a=!0,o=[],u=o;if(r)a=!1,n=Ave;else if(s>=yve){var f=e?null:u_e(t);if(f)return m8(f);a=!1,n=Fve,u=new gm}else u=e?[]:o;e:for(;++i<s;){var c=t[i],h=e?e(c):c;if(c=r||c!==0?c:0,a&&h===h){for(var d=u.length;d--;)if(u[d]===h)continue e;e&&u.push(h),o.push(c)}else n(u,h,r)||(u!==o&&u.push(h),o.push(c))}return o}var u_e=WT&&1/m8(new WT([,-0]))[1]==vve?function(t){return new WT(t)}:b_e;function _m(t,e){var r=t.__data__;return c_e(e)?r[typeof e=="string"?"string":"hash"]:r.map}function XT(t,e){var r=Mve(t,e);return a_e(r)?r:void 0}function f_e(t){return y_e(t)||m_e(t)||!!(p8&&t&&t[p8])}function c_e(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function h_e(t){return!!h8&&h8 in t}function d_e(t){if(t!=null){try{return y8.call(t)}catch{}try{return t+""}catch{}}return""}var p_e=o_e(function(t){return l_e(_8(t,1,w8,!0))});function g_e(t,e){return t===e||t!==t&&e!==e}function m_e(t){return w8(t)&&ym.call(t,"callee")&&(!jve.call(t,"callee")||v8.call(t)==wve)}var y_e=Array.isArray;function v_e(t){return t!=null&&__e(t.length)&&!b8(t)}function w8(t){return w_e(t)&&v_e(t)}function b8(t){var e=x8(t)?v8.call(t):"";return e==bve||e==xve}function __e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=_ve}function x8(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function w_e(t){return!!t&&typeof t=="object"}function b_e(){}S8.exports=p_e});var GT=w((jDe,C8)=>{var x_e="[object Object]";function S_e(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function E_e(t,e){return function(r){return t(e(r))}}var T_e=Function.prototype,E8=Object.prototype,T8=T_e.toString,C_e=E8.hasOwnProperty,k_e=T8.call(Object),R_e=E8.toString,A_e=E_e(Object.getPrototypeOf,Object);function O_e(t){return!!t&&typeof t=="object"}function I_e(t){if(!O_e(t)||R_e.call(t)!=x_e||S_e(t))return!1;var e=A_e(t);if(e===null)return!0;var r=C_e.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&T8.call(r)==k_e}C8.exports=I_e});var k8=w(ZT=>{var Ra=Y("path"),ps=process.platform==="win32",ds=Y("fs"),N_e=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function D_e(){var t;if(N_e){var e=new Error;t=r}else t=i;return t;function r(n){n&&(e.message=n.message,n=e,i(n))}function i(n){if(n){if(process.throwDeprecation)throw n;if(!process.noDeprecation){var s="fs: missing callback "+(n.stack||n.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function F_e(t){return typeof t=="function"?t:D_e()}var $De=Ra.normalize;ps?vn=/(.*?)(?:[\/\\]+|$)/g:vn=/(.*?)(?:[\/]+|$)/g;var vn;ps?lc=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:lc=/^[\/]*/;var lc;ZT.realpathSync=function(e,r){if(e=Ra.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];var i=e,n={},s={},a,o,u,f;c();function c(){var v=lc.exec(e);a=v[0].length,o=v[0],u=v[0],f="",ps&&!s[u]&&(ds.lstatSync(u),s[u]=!0)}for(;a<e.length;){vn.lastIndex=a;var h=vn.exec(e);if(f=o,o+=h[0],u=f+h[1],a=vn.lastIndex,!(s[u]||r&&r[u]===u)){var d;if(r&&Object.prototype.hasOwnProperty.call(r,u))d=r[u];else{var p=ds.lstatSync(u);if(!p.isSymbolicLink()){s[u]=!0,r&&(r[u]=u);continue}var g=null;if(!ps){var y=p.dev.toString(32)+":"+p.ino.toString(32);n.hasOwnProperty(y)&&(g=n[y])}g===null&&(ds.statSync(u),g=ds.readlinkSync(u)),d=Ra.resolve(f,g),r&&(r[u]=d),ps||(n[y]=g)}e=Ra.resolve(d,e.slice(a)),c()}}return r&&(r[i]=e),e};ZT.realpath=function(e,r,i){if(typeof i!="function"&&(i=F_e(r),r=null),e=Ra.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return process.nextTick(i.bind(null,null,r[e]));var n=e,s={},a={},o,u,f,c;h();function h(){var v=lc.exec(e);o=v[0].length,u=v[0],f=v[0],c="",ps&&!a[f]?ds.lstat(f,function(b){if(b)return i(b);a[f]=!0,d()}):process.nextTick(d)}function d(){if(o>=e.length)return r&&(r[n]=e),i(null,e);vn.lastIndex=o;var v=vn.exec(e);return c=u,u+=v[0],f=c+v[1],o=vn.lastIndex,a[f]||r&&r[f]===f?process.nextTick(d):r&&Object.prototype.hasOwnProperty.call(r,f)?y(r[f]):ds.lstat(f,p)}function p(v,b){if(v)return i(v);if(!b.isSymbolicLink())return a[f]=!0,r&&(r[f]=f),process.nextTick(d);if(!ps){var k=b.dev.toString(32)+":"+b.ino.toString(32);if(s.hasOwnProperty(k))return g(null,s[k],f)}ds.stat(f,function(N){if(N)return i(N);ds.readlink(f,function(E,U){ps||(s[k]=U),g(E,U)})})}function g(v,b,k){if(v)return i(v);var N=Ra.resolve(c,b);r&&(r[k]=N),y(N)}function y(v){e=Ra.resolve(v,e.slice(o)),h()}}});var JT=w((WDe,I8)=>{I8.exports=gs;gs.realpath=gs;gs.sync=QT;gs.realpathSync=QT;gs.monkeypatch=P_e;gs.unmonkeypatch=q_e;var Al=Y("fs"),YT=Al.realpath,KT=Al.realpathSync,M_e=process.version,R8=/^v[0-5]\./.test(M_e),A8=k8();function O8(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function gs(t,e,r){if(R8)return YT(t,e,r);typeof e=="function"&&(r=e,e=null),YT(t,e,function(i,n){O8(i)?A8.realpath(t,e,r):r(i,n)})}function QT(t,e){if(R8)return KT(t,e);try{return KT(t,e)}catch(r){if(O8(r))return A8.realpathSync(t,e);throw r}}function P_e(){Al.realpath=gs,Al.realpathSync=QT}function q_e(){Al.realpath=YT,Al.realpathSync=KT}});var D8=w((HDe,N8)=>{N8.exports=function(t,e){for(var r=[],i=0;i<t.length;i++){var n=e(t[i],i);L_e(n)?r.push.apply(r,n):r.push(n)}return r};var L_e=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}});var $8=w((zDe,j8)=>{var B_e=D8(),F8=IE();j8.exports=U_e;var M8="\0SLASH"+Math.random()+"\0",P8="\0OPEN"+Math.random()+"\0",t1="\0CLOSE"+Math.random()+"\0",q8="\0COMMA"+Math.random()+"\0",L8="\0PERIOD"+Math.random()+"\0";function e1(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function j_e(t){return t.split("\\\\").join(M8).split("\\{").join(P8).split("\\}").join(t1).split("\\,").join(q8).split("\\.").join(L8)}function $_e(t){return t.split(M8).join("\\").split(P8).join("{").split(t1).join("}").split(q8).join(",").split(L8).join(".")}function B8(t){if(!t)return[""];var e=[],r=F8("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=B8(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function U_e(t,e){if(!t)return[];e=e||{};var r=e.max==null?1/0:e.max;return t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),Ol(j_e(t),r,!0).map($_e)}function W_e(t){return"{"+t+"}"}function H_e(t){return/^-?0\d/.test(t)}function z_e(t,e){return t<=e}function X_e(t,e){return t>=e}function Ol(t,e,r){var i=[],n=F8("{","}",t);if(!n||/\$$/.test(n.pre))return[t];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),o=s||a,u=n.body.indexOf(",")>=0;if(!o&&!u)return n.post.match(/,(?!,).*\}/)?(t=n.pre+"{"+n.body+t1+n.post,Ol(t,e,!0)):[t];var f;if(o)f=n.body.split(/\.\./);else if(f=B8(n.body),f.length===1&&(f=Ol(f[0],e,!1).map(W_e),f.length===1)){var h=n.post.length?Ol(n.post,e,!1):[""];return h.map(function(O){return n.pre+f[0]+O})}var c=n.pre,h=n.post.length?Ol(n.post,e,!1):[""],d;if(o){var p=e1(f[0]),g=e1(f[1]),y=Math.max(f[0].length,f[1].length),v=f.length==3?Math.max(Math.abs(e1(f[2])),1):1,b=z_e,k=g<p;k&&(v*=-1,b=X_e);var N=f.some(H_e);d=[];for(var E=p;b(E,g)&&d.length<e;E+=v){var U;if(a)U=String.fromCharCode(E),U==="\\"&&(U="");else if(U=String(E),N){var ee=y-U.length;if(ee>0){var F=new Array(ee+1).join("0");E<0?U="-"+F+U.slice(1):U=F+U}}d.push(U)}}else d=B_e(f,function(H){return Ol(H,e,!1)});for(var L=0;L<d.length;L++)for(var I=0;I<h.length&&i.length<e;I++){var Z=c+d[L]+h[I];(!r||o||Z)&&i.push(Z)}return i}});var xm=w((XDe,X8)=>{X8.exports=Mr;Mr.Minimatch=At;var uc=(function(){try{return Y("path")}catch{}})()||{sep:"/"};Mr.sep=uc.sep;var Aa=Mr.GLOBSTAR=At.GLOBSTAR={},V_e=$8(),U8={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},r1="[^/]",i1=r1+"*?",G_e="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Z_e="(?:(?!(?:\\/|^)\\.).)*?",W8=Y_e("().*{}+?[]^$\\!");function Y_e(t){return t.split("").reduce(function(e,r){return e[r]=!0,e},{})}var H8=/\/+/;Mr.filter=K_e;function K_e(t,e){return e=e||{},function(r,i,n){return Mr(r,t,e)}}function ms(t,e){e=e||{};var r={};return Object.keys(t).forEach(function(i){r[i]=t[i]}),Object.keys(e).forEach(function(i){r[i]=e[i]}),r}Mr.defaults=function(t){if(!t||typeof t!="object"||!Object.keys(t).length)return Mr;var e=Mr,r=function(n,s,a){return e(n,s,ms(t,a))};return r.Minimatch=function(n,s){return new e.Minimatch(n,ms(t,s))},r.Minimatch.defaults=function(n){return e.defaults(ms(t,n)).Minimatch},r.filter=function(n,s){return e.filter(n,ms(t,s))},r.defaults=function(n){return e.defaults(ms(t,n))},r.makeRe=function(n,s){return e.makeRe(n,ms(t,s))},r.braceExpand=function(n,s){return e.braceExpand(n,ms(t,s))},r.match=function(i,n,s){return e.match(i,n,ms(t,s))},r};At.defaults=function(t){return Mr.defaults(t).Minimatch};function Mr(t,e,r){return bm(e),r||(r={}),!r.nocomment&&e.charAt(0)==="#"?!1:new At(e,r).match(t)}function At(t,e){if(!(this instanceof At))return new At(t,e);bm(t),e||(e={}),t=t.trim(),!e.allowWindowsEscape&&uc.sep!=="/"&&(t=t.split(uc.sep).join("/")),this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion!==void 0?e.maxGlobstarRecursion:200,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}At.prototype.debug=function(){};At.prototype.make=Q_e;function Q_e(){var t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(i){return i.split(H8)}),this.debug(this.pattern,r),r=r.map(function(i,n,s){return i.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(i){return i.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}At.prototype.parseNegate=J_e;function J_e(){var t=this.pattern,e=!1,r=this.options,i=0;if(!r.nonegate){for(var n=0,s=t.length;n<s&&t.charAt(n)==="!";n++)e=!e,i++;i&&(this.pattern=t.substr(i)),this.negate=e}}Mr.braceExpand=function(t,e){return z8(t,e)};At.prototype.braceExpand=z8;function z8(t,e){return e||(this instanceof At?e=this.options:e={}),t=typeof t>"u"?this.pattern:t,bm(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:V_e(t)}var ewe=1024*64,bm=function(t){if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>ewe)throw new TypeError("pattern is too long")};At.prototype.parse=twe;var wm={};function twe(t,e){bm(t);var r=this.options;if(t==="**")if(r.noglobstar)t="*";else return Aa;if(t==="")return"";var i="",n=!!r.nocase,s=!1,a=[],o=[],u,f=!1,c=-1,h=-1,d=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",p=this;function g(){if(u){switch(u){case"*":i+=i1,n=!0;break;case"?":i+=r1,n=!0;break;default:i+="\\"+u;break}p.debug("clearStateChar %j %j",u,i),u=!1}}for(var y=0,v=t.length,b;y<v&&(b=t.charAt(y));y++){if(this.debug("%s %s %s %j",t,y,i,b),s&&W8[b]){i+="\\"+b,s=!1;continue}switch(b){case"/":return!1;case"\\":g(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",t,y,i,b),f){this.debug(" in class"),b==="!"&&y===h+1&&(b="^"),i+=b;continue}if(b==="*"&&u==="*")continue;p.debug("call clearStateChar %j",u),g(),u=b,r.noext&&g();continue;case"(":if(f){i+="(";continue}if(!u){i+="\\(";continue}a.push({type:u,start:y-1,reStart:i.length,open:U8[u].open,close:U8[u].close}),i+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,i),u=!1;continue;case")":if(f||!a.length){i+="\\)";continue}g(),n=!0;var k=a.pop();i+=k.close,k.type==="!"&&o.push(k),k.reEnd=i.length;continue;case"|":if(f||!a.length||s){i+="\\|",s=!1;continue}g(),i+="|";continue;case"[":if(g(),f){i+="\\"+b;continue}f=!0,h=y,c=i.length,i+=b;continue;case"]":if(y===h+1||!f){i+="\\"+b,s=!1;continue}var N=t.substring(h+1,y);try{RegExp("["+N+"]")}catch{var E=this.parse(N,wm);i=i.substr(0,c)+"\\["+E[0]+"\\]",n=n||E[1],f=!1;continue}n=!0,f=!1,i+=b;continue;default:g(),s?s=!1:W8[b]&&!(b==="^"&&f)&&(i+="\\"),i+=b}}for(f&&(N=t.substr(h+1),E=this.parse(N,wm),i=i.substr(0,c)+"\\["+E[0],n=n||E[1]),k=a.pop();k;k=a.pop()){var U=i.slice(k.reStart+k.open.length);this.debug("setting tail",i,k),U=U.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(re,se,ue){return ue||(ue="\\"),se+se+ue+"|"}),this.debug(`tail=%j
29
+ %s`,U,U,k,i);var ee=k.type==="*"?i1:k.type==="?"?r1:"\\"+k.type;n=!0,i=i.slice(0,k.reStart)+ee+"\\("+U}g(),s&&(i+="\\\\");var F=!1;switch(i.charAt(0)){case"[":case".":case"(":F=!0}for(var L=o.length-1;L>-1;L--){var I=o[L],Z=i.slice(0,I.reStart),H=i.slice(I.reStart,I.reEnd-8),O=i.slice(I.reEnd-8,I.reEnd),q=i.slice(I.reEnd);O+=q;var B=Z.split("(").length-1,J=q;for(y=0;y<B;y++)J=J.replace(/\)[+*?]?/,"");q=J;var T="";q===""&&e!==wm&&(T="$");var M=Z+H+q+T+O;i=M}if(i!==""&&n&&(i="(?=.)"+i),F&&(i=d+i),e===wm)return[i,n];if(!n)return iwe(t);var $=r.nocase?"i":"";try{var z=new RegExp("^"+i+"$",$)}catch{return new RegExp("$.")}return z._glob=t,z._src=i,z}Mr.makeRe=function(t,e){return new At(t,e||{}).makeRe()};At.prototype.makeRe=rwe;function rwe(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?i1:e.dot?G_e:Z_e,i=e.nocase?"i":"",n=t.map(function(s){return s.map(function(a){return a===Aa?r:typeof a=="string"?nwe(a):a._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,i)}catch{this.regexp=!1}return this.regexp}Mr.match=function(t,e,r){r=r||{};var i=new At(e,r);return t=t.filter(function(n){return i.match(n)}),i.options.nonull&&!t.length&&t.push(e),t};At.prototype.match=function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var i=this.options;uc.sep!=="/"&&(e=e.split(uc.sep).join("/")),e=e.split(H8),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,a;for(a=e.length-1;a>=0&&(s=e[a],!s);a--);for(a=0;a<n.length;a++){var o=n[a],u=e;i.matchBase&&o.length===1&&(u=[s]);var f=this.matchOne(u,o,r);if(f)return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate};At.prototype.matchOne=function(t,e,r){return e.indexOf(Aa)!==-1?this._matchGlobstar(t,e,r,0,0):this._matchOne(t,e,r,0,0)};At.prototype._matchGlobstar=function(t,e,r,i,n){var s,a=-1;for(s=n;s<e.length;s++)if(e[s]===Aa){a=s;break}var o=-1;for(s=e.length-1;s>=0;s--)if(e[s]===Aa){o=s;break}var u=e.slice(n,a),f=r?e.slice(a+1):e.slice(a+1,o),c=r?[]:e.slice(o+1);if(u.length){var h=t.slice(i,i+u.length);if(!this._matchOne(h,u,r,0,0))return!1;i+=u.length}var d=0;if(c.length){if(c.length+i>t.length)return!1;var p=t.length-c.length;if(this._matchOne(t,c,r,p,0))d=c.length;else{if(t[t.length-1]!==""||i+c.length===t.length||(p--,!this._matchOne(t,c,r,p,0)))return!1;d=c.length+1}}if(!f.length){var g=!!d;for(s=i;s<t.length-d;s++){var y=String(t[s]);if(g=!0,y==="."||y===".."||!this.options.dot&&y.charAt(0)===".")return!1}return r||g}for(var v=[[[],0]],b=v[0],k=0,N=[0],E=0;E<f.length;E++){var U=f[E];U===Aa?(N.push(k),b=[[],0],v.push(b)):(b[0].push(U),k++)}for(var ee=v.length-1,F=t.length-d,L=0;L<v.length;L++)v[L][1]=F-(N[ee--]+v[L][0].length);return!!this._matchGlobStarBodySections(t,v,i,0,r,0,!!d)};At.prototype._matchGlobStarBodySections=function(t,e,r,i,n,s,a){var o=e[i];if(!o){for(var u=r;u<t.length;u++){a=!0;var f=t[u];if(f==="."||f===".."||!this.options.dot&&f.charAt(0)===".")return!1}return a}for(var c=o[0],h=o[1];r<=h;){var d=this._matchOne(t.slice(0,r+c.length),c,n,r,0);if(d&&s<this.maxGlobstarRecursion){var p=this._matchGlobStarBodySections(t,e,r+c.length,i+1,n,s+1,a);if(p!==!1)return p}var f=t[r];if(f==="."||f===".."||!this.options.dot&&f.charAt(0)===".")return!1;r++}return n||null};At.prototype._matchOne=function(t,e,r,i,n){var s,a,o,u;for(s=i,a=n,o=t.length,u=e.length;s<o&&a<u;s++,a++){this.debug("matchOne loop");var f=e[a],c=t[s];if(this.debug(e,f,c),f===!1||f===Aa)return!1;var h;if(typeof f=="string"?(h=c===f,this.debug("string match",f,c,h)):(h=c.match(f),this.debug("pattern match",f,c,h)),!h)return!1}if(s===o&&a===u)return!0;if(s===o)return r;if(a===u)return s===o-1&&t[s]==="";throw new Error("wtf?")};function iwe(t){return t.replace(/\\(.)/g,"$1")}function nwe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var Em=w((VDe,Sm)=>{"use strict";function V8(t){return t.charAt(0)==="/"}function G8(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=e.exec(t),i=r[1]||"",n=!!(i&&i.charAt(1)!==":");return!!(r[2]||n)}Sm.exports=process.platform==="win32"?G8:V8;Sm.exports.posix=V8;Sm.exports.win32=G8});var s1=w(ys=>{ys.setopts=fwe;ys.ownProp=Z8;ys.makeAbs=fc;ys.finish=cwe;ys.mark=hwe;ys.isIgnored=K8;ys.childrenIgnored=dwe;function Z8(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var swe=Y("fs"),Il=Y("path"),awe=xm(),Y8=Em(),n1=awe.Minimatch;function owe(t,e){return t.localeCompare(e,"en")}function lwe(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]),t.ignore.length&&(t.ignore=t.ignore.map(uwe))}function uwe(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new n1(r,{dot:!0})}return{matcher:new n1(t,{dot:!0}),gmatcher:e}}function fwe(t,e,r){if(r||(r={}),r.matchBase&&e.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.silent=!!r.silent,t.pattern=e,t.strict=r.strict!==!1,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0),t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.fs=r.fs||swe,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),lwe(t,r),t.changedCwd=!1;var i=process.cwd();Z8(r,"cwd")?(t.cwd=Il.resolve(r.cwd),t.changedCwd=t.cwd!==i):t.cwd=i,t.root=r.root||Il.resolve(t.cwd,"/"),t.root=Il.resolve(t.root),process.platform==="win32"&&(t.root=t.root.replace(/\\/g,"/")),t.cwdAbs=Y8(t.cwd)?t.cwd:fc(t,t.cwd),process.platform==="win32"&&(t.cwdAbs=t.cwdAbs.replace(/\\/g,"/")),t.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,r.allowWindowsEscape=!1,t.minimatch=new n1(e,r),t.options=t.minimatch.options}function cwe(t){for(var e=t.nounique,r=e?[]:Object.create(null),i=0,n=t.matches.length;i<n;i++){var s=t.matches[i];if(!s||Object.keys(s).length===0){if(t.nonull){var a=t.minimatch.globSet[i];e?r.push(a):r[a]=!0}}else{var o=Object.keys(s);e?r.push.apply(r,o):o.forEach(function(u){r[u]=!0})}}if(e||(r=Object.keys(r)),t.nosort||(r=r.sort(owe)),t.mark){for(var i=0;i<r.length;i++)r[i]=t._mark(r[i]);t.nodir&&(r=r.filter(function(u){var f=!/\/$/.test(u),c=t.cache[u]||t.cache[fc(t,u)];return f&&c&&(f=c!=="DIR"&&!Array.isArray(c)),f}))}t.ignore.length&&(r=r.filter(function(u){return!K8(t,u)})),t.found=r}function hwe(t,e){var r=fc(t,e),i=t.cache[r],n=e;if(i){var s=i==="DIR"||Array.isArray(i),a=e.slice(-1)==="/";if(s&&!a?n+="/":!s&&a&&(n=n.slice(0,-1)),n!==e){var o=fc(t,n);t.statCache[o]=t.statCache[r],t.cache[o]=t.cache[r]}}return n}function fc(t,e){var r=e;return e.charAt(0)==="/"?r=Il.join(t.root,e):Y8(e)||e===""?r=e:t.changedCwd?r=Il.resolve(t.cwd,e):r=Il.resolve(e),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}function K8(t,e){return t.ignore.length?t.ignore.some(function(r){return r.matcher.match(e)||!!(r.gmatcher&&r.gmatcher.match(e))}):!1}function dwe(t,e){return t.ignore.length?t.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(e))}):!1}});var r$=w((QDe,t$)=>{t$.exports=e$;e$.GlobSync=Mt;var pwe=JT(),Q8=xm(),ZDe=Q8.Minimatch,YDe=cc().Glob,KDe=Y("util"),a1=Y("path"),J8=Y("assert"),Tm=Em(),Oa=s1(),gwe=Oa.setopts,o1=Oa.ownProp,mwe=Oa.childrenIgnored,ywe=Oa.isIgnored;function e$(t,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
30
+ See: https://github.com/isaacs/node-glob/issues/167`);return new Mt(t,e).found}function Mt(t,e){if(!t)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
31
+ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof Mt))return new Mt(t,e);if(gwe(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;i<r;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}Mt.prototype._finish=function(){if(J8.ok(this instanceof Mt),this.realpath){var t=this;this.matches.forEach(function(e,r){var i=t.matches[r]=Object.create(null);for(var n in e)try{n=t._makeAbs(n);var s=pwe.realpathSync(n,t.realpathCache);i[s]=!0}catch(a){if(a.syscall==="stat")i[t._makeAbs(n)]=!0;else throw a}})}Oa.finish(this)};Mt.prototype._process=function(t,e,r){J8.ok(this instanceof Mt);for(var i=0;typeof t[i]=="string";)i++;var n;switch(i){case t.length:this._processSimple(t.join("/"),e);return;case 0:n=null;break;default:n=t.slice(0,i).join("/");break}var s=t.slice(i),a;n===null?a=".":((Tm(n)||Tm(t.map(function(f){return typeof f=="string"?f:"[*]"}).join("/")))&&(!n||!Tm(n))&&(n="/"+n),a=n);var o=this._makeAbs(a);if(!mwe(this,a)){var u=s[0]===Q8.GLOBSTAR;u?this._processGlobStar(n,a,o,s,e,r):this._processReaddir(n,a,o,s,e,r)}};Mt.prototype._processReaddir=function(t,e,r,i,n,s){var a=this._readdir(r,s);if(a){for(var o=i[0],u=!!this.minimatch.negate,f=o._glob,c=this.dot||f.charAt(0)===".",h=[],d=0;d<a.length;d++){var p=a[d];if(p.charAt(0)!=="."||c){var g;u&&!t?g=!p.match(o):g=p.match(o),g&&h.push(p)}}var y=h.length;if(y!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var d=0;d<y;d++){var p=h[d];t&&(t.slice(-1)!=="/"?p=t+"/"+p:p=t+p),p.charAt(0)==="/"&&!this.nomount&&(p=a1.join(this.root,p)),this._emitMatch(n,p)}return}i.shift();for(var d=0;d<y;d++){var p=h[d],v;t?v=[t,p]:v=[p],this._process(v.concat(i),n,s)}}}};Mt.prototype._emitMatch=function(t,e){if(!ywe(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}};Mt.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r,i;try{r=this.fs.lstatSync(t)}catch(s){if(s.code==="ENOENT")return null}var n=r&&r.isSymbolicLink();return this.symlinks[t]=n,!n&&r&&!r.isDirectory()?this.cache[t]="FILE":e=this._readdir(t,!1),e};Mt.prototype._readdir=function(t,e){var r;if(e&&!o1(this.symlinks,t))return this._readdirInGlobStar(t);if(o1(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(n){return this._readdirError(t,n),null}};Mt.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var i=e[r];t==="/"?i=t+i:i=t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,e};Mt.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=e.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};Mt.prototype._processGlobStar=function(t,e,r,i,n,s){var a=this._readdir(r,s);if(a){var o=i.slice(1),u=t?[t]:[],f=u.concat(o);this._process(f,n,!1);var c=a.length,h=this.symlinks[r];if(!(h&&s))for(var d=0;d<c;d++){var p=a[d];if(!(p.charAt(0)==="."&&!this.dot)){var g=u.concat(a[d],o);this._process(g,n,!0);var y=u.concat(a[d],i);this._process(y,n,!0)}}}};Mt.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!r){if(t&&Tm(t)&&!this.nomount){var i=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=a1.join(this.root,t):(t=a1.resolve(this.root,t),i&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}};Mt.prototype._stat=function(t){var e=this._makeAbs(t),r=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&o1(this.cache,e)){var a=this.cache[e];if(Array.isArray(a)&&(a="DIR"),!r||a==="DIR")return a;if(r&&a==="FILE")return!1}var i,n=this.statCache[e];if(!n){var s;try{s=this.fs.lstatSync(e)}catch(o){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{n=this.fs.statSync(e)}catch{n=s}else n=s}this.statCache[e]=n;var a=!0;return n&&(a=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||a,r&&a==="FILE"?!1:a};Mt.prototype._mark=function(t){return Oa.mark(this,t)};Mt.prototype._makeAbs=function(t){return Oa.makeAbs(this,t)}});var l1=w((JDe,n$)=>{n$.exports=i$;function i$(t,e){if(t&&e)return i$(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(i){r[i]=t[i]}),r;function r(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];var s=t.apply(this,i),a=i[i.length-1];return typeof s=="function"&&s!==a&&Object.keys(a).forEach(function(o){s[o]=a[o]}),s}}});var km=w((eFe,u1)=>{var s$=l1();u1.exports=s$(Cm);u1.exports.strict=s$(a$);Cm.proto=Cm(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Cm(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return a$(this)},configurable:!0})});function Cm(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function a$(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});var l$=w((tFe,o$)=>{var vwe=l1(),hc=Object.create(null),_we=km();o$.exports=vwe(wwe);function wwe(t,e){return hc[t]?(hc[t].push(e),null):(hc[t]=[e],bwe(t))}function bwe(t){return _we(function e(){var r=hc[t],i=r.length,n=xwe(arguments);try{for(var s=0;s<i;s++)r[s].apply(null,n)}finally{r.length>i?(r.splice(0,i),process.nextTick(function(){e.apply(null,n)})):delete hc[t]}})}function xwe(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i]=t[i];return r}});var cc=w((nFe,f$)=>{f$.exports=Ia;var Swe=JT(),u$=xm(),rFe=u$.Minimatch,Ewe=be(),Twe=Y("events").EventEmitter,f1=Y("path"),c1=Y("assert"),dc=Em(),d1=r$(),Na=s1(),Cwe=Na.setopts,h1=Na.ownProp,p1=l$(),iFe=Y("util"),kwe=Na.childrenIgnored,Rwe=Na.isIgnored,Awe=km();function Ia(t,e,r){if(typeof e=="function"&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return d1(t,e)}return new Ze(t,e,r)}Ia.sync=d1;var Owe=Ia.GlobSync=d1.GlobSync;Ia.glob=Ia;function Iwe(t,e){if(e===null||typeof e!="object")return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}Ia.hasMagic=function(t,e){var r=Iwe({},e);r.noprocess=!0;var i=new Ze(t,r),n=i.minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var s=0;s<n[0].length;s++)if(typeof n[0][s]!="string")return!0;return!1};Ia.Glob=Ze;Ewe(Ze,Twe);function Ze(t,e,r){if(typeof e=="function"&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new Owe(t,e)}if(!(this instanceof Ze))return new Ze(t,e,r);Cwe(this,t,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof r=="function"&&(r=Awe(r),this.on("error",r),this.on("end",function(u){r(null,u)}));var n=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return o();for(var s=!0,a=0;a<i;a++)this._process(this.minimatch.set[a],a,!1,o);s=!1;function o(){--n._processing,n._processing<=0&&(s?process.nextTick(function(){n._finish()}):n._finish())}}Ze.prototype._finish=function(){if(c1(this instanceof Ze),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Na.finish(this),this.emit("end",this.found)}};Ze.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var t=this.matches.length;if(t===0)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,i);function i(){--t===0&&e._finish()}};Ze.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var i=Object.keys(r),n=this,s=i.length;if(s===0)return e();var a=this.matches[t]=Object.create(null);i.forEach(function(o,u){o=n._makeAbs(o),Swe.realpath(o,n.realpathCache,function(f,c){f?f.syscall==="stat"?a[o]=!0:n.emit("error",f):a[c]=!0,--s===0&&(n.matches[t]=a,e())})})};Ze.prototype._mark=function(t){return Na.mark(this,t)};Ze.prototype._makeAbs=function(t){return Na.makeAbs(this,t)};Ze.prototype.abort=function(){this.aborted=!0,this.emit("abort")};Ze.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};Ze.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<i.length;e++){var n=i[e];this._processing--,this._process(n[0],n[1],n[2],n[3])}}}};Ze.prototype._process=function(t,e,r,i){if(c1(this instanceof Ze),c1(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([t,e,r,i]);return}for(var n=0;typeof t[n]=="string";)n++;var s;switch(n){case t.length:this._processSimple(t.join("/"),e,i);return;case 0:s=null;break;default:s=t.slice(0,n).join("/");break}var a=t.slice(n),o;s===null?o=".":((dc(s)||dc(t.map(function(c){return typeof c=="string"?c:"[*]"}).join("/")))&&(!s||!dc(s))&&(s="/"+s),o=s);var u=this._makeAbs(o);if(kwe(this,o))return i();var f=a[0]===u$.GLOBSTAR;f?this._processGlobStar(s,o,u,a,e,r,i):this._processReaddir(s,o,u,a,e,r,i)}};Ze.prototype._processReaddir=function(t,e,r,i,n,s,a){var o=this;this._readdir(r,s,function(u,f){return o._processReaddir2(t,e,r,i,n,s,f,a)})};Ze.prototype._processReaddir2=function(t,e,r,i,n,s,a,o){if(!a)return o();for(var u=i[0],f=!!this.minimatch.negate,c=u._glob,h=this.dot||c.charAt(0)===".",d=[],p=0;p<a.length;p++){var g=a[p];if(g.charAt(0)!=="."||h){var y;f&&!t?y=!g.match(u):y=g.match(u),y&&d.push(g)}}var v=d.length;if(v===0)return o();if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var p=0;p<v;p++){var g=d[p];t&&(t!=="/"?g=t+"/"+g:g=t+g),g.charAt(0)==="/"&&!this.nomount&&(g=f1.join(this.root,g)),this._emitMatch(n,g)}return o()}i.shift();for(var p=0;p<v;p++){var g=d[p],b;t&&(t!=="/"?g=t+"/"+g:g=t+g),this._process([g].concat(i),n,s,o)}o()};Ze.prototype._emitMatch=function(t,e){if(!this.aborted&&!Rwe(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var r=dc(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0;var n=this.statCache[r];n&&this.emit("stat",e,n),this.emit("match",e)}}};Ze.prototype._readdirInGlobStar=function(t,e){if(this.aborted)return;if(this.follow)return this._readdir(t,!1,e);var r="lstat\0"+t,i=this,n=p1(r,s);n&&i.fs.lstat(t,n);function s(a,o){if(a&&a.code==="ENOENT")return e();var u=o&&o.isSymbolicLink();i.symlinks[t]=u,!u&&o&&!o.isDirectory()?(i.cache[t]="FILE",e()):i._readdir(t,!1,e)}};Ze.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=p1("readdir\0"+t+"\0"+e,r),!!r)){if(e&&!h1(this.symlinks,t))return this._readdirInGlobStar(t,r);if(h1(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return r();if(Array.isArray(i))return r(null,i)}var n=this;n.fs.readdir(t,Nwe(this,t,r))}};function Nwe(t,e,r){return function(i,n){i?t._readdirError(e,i,r):t._readdirEntries(e,n,r)}}Ze.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<e.length;i++){var n=e[i];t==="/"?n=t+n:n=t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,r(null,e)}};Ze.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(t);if(this.cache[i]="FILE",i===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);n.path=this.cwd,n.code=e.code,this.emit("error",n),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return r()}};Ze.prototype._processGlobStar=function(t,e,r,i,n,s,a){var o=this;this._readdir(r,s,function(u,f){o._processGlobStar2(t,e,r,i,n,s,f,a)})};Ze.prototype._processGlobStar2=function(t,e,r,i,n,s,a,o){if(!a)return o();var u=i.slice(1),f=t?[t]:[],c=f.concat(u);this._process(c,n,!1,o);var h=this.symlinks[r],d=a.length;if(h&&s)return o();for(var p=0;p<d;p++){var g=a[p];if(!(g.charAt(0)==="."&&!this.dot)){var y=f.concat(a[p],u);this._process(y,n,!0,o);var v=f.concat(a[p],i);this._process(v,n,!0,o)}}o()};Ze.prototype._processSimple=function(t,e,r){var i=this;this._stat(t,function(n,s){i._processSimple2(t,e,n,s,r)})};Ze.prototype._processSimple2=function(t,e,r,i,n){if(this.matches[e]||(this.matches[e]=Object.create(null)),!i)return n();if(t&&dc(t)&&!this.nomount){var s=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=f1.join(this.root,t):(t=f1.resolve(this.root,t),s&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),n()};Ze.prototype._stat=function(t,e){var r=this._makeAbs(t),i=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&h1(this.cache,r)){var n=this.cache[r];if(Array.isArray(n)&&(n="DIR"),!i||n==="DIR")return e(null,n);if(i&&n==="FILE")return e()}var s,a=this.statCache[r];if(a!==void 0){if(a===!1)return e(null,a);var o=a.isDirectory()?"DIR":"FILE";return i&&o==="FILE"?e():e(null,o,a)}var u=this,f=p1("stat\0"+r,c);f&&u.fs.lstat(r,f);function c(h,d){if(d&&d.isSymbolicLink())return u.fs.stat(r,function(p,g){p?u._stat2(t,r,null,d,e):u._stat2(t,r,p,g,e)});u._stat2(t,r,h,d,e)}};Ze.prototype._stat2=function(t,e,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return this.statCache[e]=!1,n();var s=t.slice(-1)==="/";if(this.statCache[e]=i,e.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,!1,i);var a=!0;return i&&(a=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||a,s&&a==="FILE"?n():n(null,a,i)}});var p$=w((sFe,d$)=>{var h$=Er(),Nl=Y("path"),g1=MT(),Dwe=$T(),Fwe=VT(),Mwe=GT(),Pwe=cc(),Da=d$.exports={},c$=/[\/\\]/g,qwe=function(t,e){var r=[];return g1(t).forEach(function(i){var n=i.indexOf("!")===0;n&&(i=i.slice(1));var s=e(i);n?r=Dwe(r,s):r=Fwe(r,s)}),r};Da.exists=function(){var t=Nl.join.apply(Nl,arguments);return h$.existsSync(t)};Da.expand=function(...t){var e=Mwe(t[0])?t.shift():{},r=Array.isArray(t[0])?t[0]:t;if(r.length===0)return[];var i=qwe(r,function(n){return Pwe.sync(n,e)});return e.filter&&(i=i.filter(function(n){n=Nl.join(e.cwd||"",n);try{return typeof e.filter=="function"?e.filter(n):h$.statSync(n)[e.filter]()}catch{return!1}})),i};Da.expandMapping=function(t,e,r){r=Object.assign({rename:function(s,a){return Nl.join(s||"",a)}},r);var i=[],n={};return Da.expand(r,t).forEach(function(s){var a=s;r.flatten&&(a=Nl.basename(a)),r.ext&&(a=a.replace(/(\.[^\/]*)?$/,r.ext));var o=r.rename(e,a,r);r.cwd&&(s=Nl.join(r.cwd,s)),o=o.replace(c$,"/"),s=s.replace(c$,"/"),n[o]?n[o].src.push(s):(i.push({src:[s],dest:o}),n[o]=i[i.length-1])}),i};Da.normalizeFilesArray=function(t){var e=[];return t.forEach(function(r){var i;("src"in r||"dest"in r)&&e.push(r)}),e.length===0?[]:(e=_(e).chain().forEach(function(r){!("src"in r)||!r.src||(Array.isArray(r.src)?r.src=g1(r.src):r.src=[r.src])}).map(function(r){var i=Object.assign({},r);if(delete i.src,delete i.dest,r.expand)return Da.expandMapping(r.src,r.dest,i).map(function(s){var a=Object.assign({},r);return a.orig=Object.assign({},r),a.src=s.src,a.dest=s.dest,["expand","cwd","flatten","rename","ext"].forEach(function(o){delete a[o]}),a});var n=Object.assign({},r);return n.orig=Object.assign({},r),"src"in n&&Object.defineProperty(n,"src",{enumerable:!0,get:function s(){var a;return"result"in s||(a=r.src,a=Array.isArray(a)?g1(a):[a],s.result=Da.expand(i,a)),s.result}}),"dest"in n&&(n.dest=r.dest),n}).flatten().value(),e)}});var pc=w((oFe,y$)=>{var m1=Er(),g$=Y("path"),aFe=Y("util"),Lwe=fT(),m$=em(),Bwe=pT(),jwe=Y("stream").Stream,$we=Z3().PassThrough,Pr=y$.exports={};Pr.file=p$();Pr.collectStream=function(t,e){var r=[],i=0;t.on("error",e),t.on("data",function(n){r.push(n),i+=n.length}),t.on("end",function(){var n=new Buffer(i),s=0;r.forEach(function(a){a.copy(n,s),s+=a.length}),e(null,n)})};Pr.dateify=function(t){return t=t||new Date,t instanceof Date?t=t:typeof t=="string"?t=new Date(t):t=new Date,t};Pr.defaults=function(t,e,r){var i=arguments;return i[0]=i[0]||{},Bwe(...i)};Pr.isStream=function(t){return t instanceof jwe};Pr.lazyReadStream=function(t){return new Lwe.Readable(function(){return m1.createReadStream(t)})};Pr.normalizeInputSource=function(t){if(t===null)return new Buffer(0);if(typeof t=="string")return new Buffer(t);if(Pr.isStream(t)&&!t._readableState){var e=new $we;return t.pipe(e),e}return t};Pr.sanitizePath=function(t){return m$(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};Pr.trailingSlashIt=function(t){return t.slice(-1)!=="/"?t+"/":t};Pr.unixifyPath=function(t){return m$(t,!1).replace(/^\w+:/,"")};Pr.walkdir=function(t,e,r){var i=[];typeof e=="function"&&(r=e,e=t),m1.readdir(t,function(n,s){var a=0,o,u;if(n)return r(n);(function f(){if(o=s[a++],!o)return r(null,i);u=g$.join(t,o),m1.stat(u,function(c,h){i.push({path:u,relative:g$.relative(e,u).replace(/\\/g,"/"),stats:h}),h&&h.isDirectory()?Pr.walkdir(u,e,function(d,p){p.forEach(function(g){i.push(g)}),f()}):f()})})()})}});var b$=w((_$,w$)=>{var Uwe=Y("util"),Wwe={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function v$(t,e){Error.captureStackTrace(this,this.constructor),this.message=Wwe[t]||t,this.code=t,this.data=e}Uwe.inherits(v$,Error);_$=w$.exports=v$});var C$=w((lFe,T$)=>{var _1=Y("fs"),S$=Q6(),x$=e4(),y1=Y("path"),Mi=pc(),Hwe=Y("util").inherits,xt=b$(),E$=nr().Transform,v1=process.platform==="win32",Le=function(t,e){if(!(this instanceof Le))return new Le(t,e);typeof t!="string"&&(e=t,t="zip"),e=this.options=Mi.defaults(e,{highWaterMark:1024*1024,statConcurrency:4}),E$.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=x$.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=x$.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};Hwe(Le,E$);Le.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()};Le.prototype._append=function(t,e){e=e||{};var r={source:null,filepath:t};e.name||(e.name=t),e.sourcePath=t,r.data=e,this._entriesCount++,e.stats&&e.stats instanceof _1.Stats?(r=this._updateQueueTaskWithStats(r,e.stats),r&&(e.stats.size&&(this._fsEntriesTotalBytes+=e.stats.size),this._queue.push(r))):this._statQueue.push(r)};Le.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)};Le.prototype._maybeFinalize=function(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1};Le.prototype._moduleAppend=function(t,e,r){if(this._state.aborted){r();return}this._module.append(t,e,function(i){if(this._task=null,this._state.aborted){this._shutdown();return}if(i){this.emit("error",i),setImmediate(r);return}this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}.bind(this))};Le.prototype._moduleFinalize=function(){typeof this._module.finalize=="function"?this._module.finalize():typeof this._module.end=="function"?this._module.end():this.emit("error",new xt("NOENDMETHOD"))};Le.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0};Le.prototype._moduleSupports=function(t){return!this._module.supports||!this._module.supports[t]?!1:this._module.supports[t]};Le.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1};Le.prototype._normalizeEntryData=function(t,e){t=Mi.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&t.stats===!1&&(t.stats=e);var r=t.type==="directory";return t.name&&(typeof t.prefix=="string"&&t.prefix!==""&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=Mi.sanitizePath(t.name),t.type!=="symlink"&&t.name.slice(-1)==="/"?(r=!0,t.type="directory"):r&&(t.name+="/")),typeof t.mode=="number"?v1?t.mode&=511:t.mode&=4095:t.stats&&t.mode===null?(v1?t.mode=t.stats.mode&511:t.mode=t.stats.mode&4095,v1&&r&&(t.mode=493)):t.mode===null&&(t.mode=r?493:420),t.stats&&t.date===null?t.date=t.stats.mtime:t.date=Mi.dateify(t.date),t};Le.prototype._onModuleError=function(t){this.emit("error",t)};Le.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()};Le.prototype._onQueueTask=function(t,e){var r=()=>{t.data.callback&&t.data.callback(),e()};if(this._state.finalizing||this._state.finalized||this._state.aborted){r();return}this._task=t,this._moduleAppend(t.source,t.data,r)};Le.prototype._onStatQueueTask=function(t,e){if(this._state.finalizing||this._state.finalized||this._state.aborted){e();return}_1.lstat(t.filepath,function(r,i){if(this._state.aborted){setImmediate(e);return}if(r){this._entriesCount--,this.emit("warning",r),setImmediate(e);return}t=this._updateQueueTaskWithStats(t,i),t&&(i.size&&(this._fsEntriesTotalBytes+=i.size),this._queue.push(t)),setImmediate(e)}.bind(this))};Le.prototype._shutdown=function(){this._moduleUnpipe(),this.end()};Le.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)};Le.prototype._updateQueueTaskWithStats=function(t,e){if(e.isFile())t.data.type="file",t.data.sourceType="stream",t.source=Mi.lazyReadStream(t.filepath);else if(e.isDirectory()&&this._moduleSupports("directory"))t.data.name=Mi.trailingSlashIt(t.data.name),t.data.type="directory",t.data.sourcePath=Mi.trailingSlashIt(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else if(e.isSymbolicLink()&&this._moduleSupports("symlink")){var r=_1.readlinkSync(t.filepath),i=y1.dirname(t.filepath);t.data.type="symlink",t.data.linkname=y1.relative(i,y1.resolve(i,r)),t.data.sourceType="buffer",t.source=Buffer.concat([])}else return e.isDirectory()?this.emit("warning",new xt("DIRECTORYNOTSUPPORTED",t.data)):e.isSymbolicLink()?this.emit("warning",new xt("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new xt("ENTRYNOTSUPPORTED",t.data)),null;return t.data=this._normalizeEntryData(t.data,e),t};Le.prototype.abort=function(){return this._state.aborted||this._state.finalized?this:(this._abort(),this)};Le.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new xt("QUEUECLOSED")),this;if(e=this._normalizeEntryData(e),typeof e.name!="string"||e.name.length===0)return this.emit("error",new xt("ENTRYNAMEREQUIRED")),this;if(e.type==="directory"&&!this._moduleSupports("directory"))return this.emit("error",new xt("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=Mi.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else if(Mi.isStream(t))e.sourceType="stream";else return this.emit("error",new xt("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;return this._entriesCount++,this._queue.push({data:e,source:t}),this};Le.prototype.directory=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new xt("QUEUECLOSED")),this;if(typeof t!="string"||t.length===0)return this.emit("error",new xt("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,e===!1?e="":typeof e!="string"&&(e=t);var i=!1;typeof r=="function"?(i=r,r={}):typeof r!="object"&&(r={});var n={stat:!0,dot:!0};function s(){this._pending--,this._maybeFinalize()}function a(f){this.emit("error",f)}function o(f){u.pause();var c=!1,h=Object.assign({},r);h.name=f.relative,h.prefix=e,h.stats=f.stat,h.callback=u.resume.bind(u);try{if(i){if(h=i(h),h===!1)c=!0;else if(typeof h!="object")throw new xt("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}}catch(d){this.emit("error",d);return}if(c){u.resume();return}this._append(f.absolute,h)}var u=S$(t,n);return u.on("error",a.bind(this)),u.on("match",o.bind(this)),u.on("end",s.bind(this)),this};Le.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new xt("QUEUECLOSED")),this):typeof t!="string"||t.length===0?(this.emit("error",new xt("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)};Le.prototype.glob=function(t,e,r){this._pending++,e=Mi.defaults(e,{stat:!0,pattern:t});function i(){this._pending--,this._maybeFinalize()}function n(o){this.emit("error",o)}function s(o){a.pause();var u=Object.assign({},r);u.callback=a.resume.bind(a),u.stats=o.stat,u.name=o.relative,this._append(o.absolute,u)}var a=S$(e.cwd||".",e);return a.on("error",n.bind(this)),a.on("match",s.bind(this)),a.on("end",i.bind(this)),this};Le.prototype.finalize=function(){if(this._state.aborted){var t=new xt("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new xt("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise(function(i,n){var s;r._module.on("end",function(){s||i()}),r._module.on("error",function(a){s=!0,n(a)})})};Le.prototype.setFormat=function(t){return this._format?(this.emit("error",new xt("FORMATSET")),this):(this._format=t,this)};Le.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new xt("ABORTED")),this):this._state.module?(this.emit("error",new xt("MODULESET")),this):(this._module=t,this._modulePipe(),this)};Le.prototype.symlink=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new xt("QUEUECLOSED")),this;if(typeof t!="string"||t.length===0)return this.emit("error",new xt("SYMLINKFILEPATHREQUIRED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new xt("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new xt("SYMLINKNOTSUPPORTED",{filepath:t})),this;var i={};return i.type="symlink",i.name=t.replace(/\\/g,"/"),i.linkname=e.replace(/\\/g,"/"),i.sourceType="buffer",typeof r=="number"&&(i.mode=r),this._entriesCount++,this._queue.push({data:i,source:Buffer.concat([])}),this};Le.prototype.pointer=function(){return this._pointer};Le.prototype.use=function(t){return this._streams.push(t),this};T$.exports=Le});var Am=w((uFe,k$)=>{var Rm=k$.exports=function(){};Rm.prototype.getName=function(){};Rm.prototype.getSize=function(){};Rm.prototype.getLastModifiedDate=function(){};Rm.prototype.isDirectory=function(){}});var Om=w((fFe,R$)=>{var Qr=R$.exports={};Qr.dateToDos=function(t,e){e=e||!1;var r=e?t.getFullYear():t.getUTCFullYear();if(r<1980)return 2162688;if(r>=2044)return 2141175677;var i={year:r,month:e?t.getMonth():t.getUTCMonth(),date:e?t.getDate():t.getUTCDate(),hours:e?t.getHours():t.getUTCHours(),minutes:e?t.getMinutes():t.getUTCMinutes(),seconds:e?t.getSeconds():t.getUTCSeconds()};return i.year-1980<<25|i.month+1<<21|i.date<<16|i.hours<<11|i.minutes<<5|i.seconds/2};Qr.dosToDate=function(t){return new Date((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(t&31)<<1)};Qr.fromDosTime=function(t){return Qr.dosToDate(t.readUInt32LE(0))};Qr.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e};Qr.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((t&65535)>>>0,0),e};Qr.getShortBytesValue=function(t,e){return t.readUInt16LE(e)};Qr.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((t&4294967295)>>>0,0),e};Qr.getLongBytesValue=function(t,e){return t.readUInt32LE(e)};Qr.toDosTime=function(t){return Qr.getLongBytes(Qr.dateToDos(t))}});var w1=w((cFe,F$)=>{var A$=Om(),O$=8,I$=1,zwe=4,Xwe=2,N$=64,D$=2048,Kt=F$.exports=function(){return this instanceof Kt?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new Kt};Kt.prototype.encode=function(){return A$.getShortBytes((this.descriptor?O$:0)|(this.utf8?D$:0)|(this.encryption?I$:0)|(this.strongEncryption?N$:0))};Kt.prototype.parse=function(t,e){var r=A$.getShortBytesValue(t,e),i=new Kt;return i.useDataDescriptor((r&O$)!==0),i.useUTF8ForNames((r&D$)!==0),i.useStrongEncryption((r&N$)!==0),i.useEncryption((r&I$)!==0),i.setSlidingDictionarySize((r&Xwe)!==0?8192:4096),i.setNumberOfShannonFanoTrees((r&zwe)!==0?3:2),i};Kt.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t};Kt.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees};Kt.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t};Kt.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize};Kt.prototype.useDataDescriptor=function(t){this.descriptor=t};Kt.prototype.usesDataDescriptor=function(){return this.descriptor};Kt.prototype.useEncryption=function(t){this.encryption=t};Kt.prototype.usesEncryption=function(){return this.encryption};Kt.prototype.useStrongEncryption=function(t){this.strongEncryption=t};Kt.prototype.usesStrongEncryption=function(){return this.strongEncryption};Kt.prototype.useUTF8ForNames=function(t){this.utf8=t};Kt.prototype.usesUTF8ForNames=function(){return this.utf8}});var P$=w((hFe,M$)=>{M$.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}});var b1=w((dFe,q$)=>{q$.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}});var x1=w((pFe,U$)=>{var Vwe=Y("util").inherits,Gwe=em(),B$=Am(),j$=w1(),L$=P$(),gr=b1(),$$=Om(),Te=U$.exports=function(t){if(!(this instanceof Te))return new Te(t);B$.call(this),this.platform=gr.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new j$,this.crc=0,this.time=-1,this.minver=gr.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};Vwe(Te,B$);Te.prototype.getCentralDirectoryExtra=function(){return this.getExtra()};Te.prototype.getComment=function(){return this.comment!==null?this.comment:""};Te.prototype.getCompressedSize=function(){return this.csize};Te.prototype.getCrc=function(){return this.crc};Te.prototype.getExternalAttributes=function(){return this.exattr};Te.prototype.getExtra=function(){return this.extra!==null?this.extra:gr.EMPTY};Te.prototype.getGeneralPurposeBit=function(){return this.gpb};Te.prototype.getInternalAttributes=function(){return this.inattr};Te.prototype.getLastModifiedDate=function(){return this.getTime()};Te.prototype.getLocalFileDataExtra=function(){return this.getExtra()};Te.prototype.getMethod=function(){return this.method};Te.prototype.getName=function(){return this.name};Te.prototype.getPlatform=function(){return this.platform};Te.prototype.getSize=function(){return this.size};Te.prototype.getTime=function(){return this.time!==-1?$$.dosToDate(this.time):-1};Te.prototype.getTimeDos=function(){return this.time!==-1?this.time:0};Te.prototype.getUnixMode=function(){return this.platform!==gr.PLATFORM_UNIX?0:this.getExternalAttributes()>>gr.SHORT_SHIFT&gr.SHORT_MASK};Te.prototype.getVersionNeededToExtract=function(){return this.minver};Te.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t};Te.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t};Te.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t};Te.prototype.setExternalAttributes=function(t){this.exattr=t>>>0};Te.prototype.setExtra=function(t){this.extra=t};Te.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof j$))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t};Te.prototype.setInternalAttributes=function(t){this.inattr=t};Te.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t};Te.prototype.setName=function(t,e=!1){t=Gwe(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),e&&(t=`/${t}`),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t};Te.prototype.setPlatform=function(t){this.platform=t};Te.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t};Te.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=$$.dateToDos(t,e)};Te.prototype.setUnixMode=function(t){t|=this.isDirectory()?gr.S_IFDIR:gr.S_IFREG;var e=0;e|=t<<gr.SHORT_SHIFT|(this.isDirectory()?gr.S_DOS_D:gr.S_DOS_A),this.setExternalAttributes(e),this.mode=t&gr.MODE_MASK,this.platform=gr.PLATFORM_UNIX};Te.prototype.setVersionNeededToExtract=function(t){this.minver=t};Te.prototype.isDirectory=function(){return this.getName().slice(-1)==="/"};Te.prototype.isUnixSymlink=function(){return(this.getUnixMode()&L$.FILE_TYPE_FLAG)===L$.LINK_FLAG};Te.prototype.isZip64=function(){return this.csize>gr.ZIP64_MAGIC||this.size>gr.ZIP64_MAGIC}});var E1=w((gFe,W$)=>{var Zwe=Y("stream").Stream,Ywe=nr().PassThrough,S1=W$.exports={};S1.isStream=function(t){return t instanceof Zwe};S1.normalizeInputSource=function(t){if(t===null)return Buffer.alloc(0);if(typeof t=="string")return Buffer.from(t);if(S1.isStream(t)&&!t._readableState){var e=new Ywe;return t.pipe(e),e}return t}});var C1=w((mFe,z$)=>{var Kwe=Y("util").inherits,T1=nr().Transform,Qwe=Am(),H$=E1(),qr=z$.exports=function(t){if(!(this instanceof qr))return new qr(t);T1.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};Kwe(qr,T1);qr.prototype._appendBuffer=function(t,e,r){};qr.prototype._appendStream=function(t,e,r){};qr.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)};qr.prototype._finish=function(t){};qr.prototype._normalizeEntry=function(t){};qr.prototype._transform=function(t,e,r){r(null,t)};qr.prototype.entry=function(t,e,r){if(e=e||null,typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),!(t instanceof Qwe)){r(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){r(new Error("unacceptable entry after finish"));return}if(this._archive.processing){r(new Error("already processing an entry"));return}if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,e=H$.normalizeInputSource(e),Buffer.isBuffer(e))this._appendBuffer(t,e,r);else if(H$.isStream(e))this._appendStream(t,e,r);else{this._archive.processing=!1,r(new Error("input source must be valid Stream or Buffer instance"));return}return this};qr.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()};qr.prototype.getBytesWritten=function(){return this.offset};qr.prototype.write=function(t,e){return t&&(this.offset+=t.length),T1.prototype.write.call(this,t,e)}});var O1=w((yFe,V$)=>{var vs=Y("buffer").Buffer,k1=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(k1=new Int32Array(k1));function X$(t){if(vs.isBuffer(t))return t;var e=typeof vs.alloc=="function"&&typeof vs.from=="function";if(typeof t=="number")return e?vs.alloc(t):new vs(t);if(typeof t=="string")return e?vs.from(t):new vs(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function Jwe(t){var e=X$(4);return e.writeInt32BE(t,0),e}function R1(t,e){t=X$(t),vs.isBuffer(e)&&(e=e.readUInt32BE(0));for(var r=~~e^-1,i=0;i<t.length;i++)r=k1[(r^t[i])&255]^r>>>8;return r^-1}function A1(){return Jwe(R1.apply(null,arguments))}A1.signed=function(){return R1.apply(null,arguments)};A1.unsigned=function(){return R1.apply(null,arguments)>>>0};V$.exports=A1});var N1=w(I1=>{var G$;(function(t){typeof DO_NOT_EXPORT_CRC>"u"?typeof I1=="object"?t(I1):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(G$={}):t(G$={})})(function(t){t.version="1.2.2";function e(){for(var F=0,L=new Array(256),I=0;I!=256;++I)F=I,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,L[I]=F;return typeof Int32Array<"u"?new Int32Array(L):L}var r=e();function i(F){var L=0,I=0,Z=0,H=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(Z=0;Z!=256;++Z)H[Z]=F[Z];for(Z=0;Z!=256;++Z)for(I=F[Z],L=256+Z;L<4096;L+=256)I=H[L]=I>>>8^F[I&255];var O=[];for(Z=1;Z!=16;++Z)O[Z-1]=typeof Int32Array<"u"?H.subarray(Z*256,Z*256+256):H.slice(Z*256,Z*256+256);return O}var n=i(r),s=n[0],a=n[1],o=n[2],u=n[3],f=n[4],c=n[5],h=n[6],d=n[7],p=n[8],g=n[9],y=n[10],v=n[11],b=n[12],k=n[13],N=n[14];function E(F,L){for(var I=L^-1,Z=0,H=F.length;Z<H;)I=I>>>8^r[(I^F.charCodeAt(Z++))&255];return~I}function U(F,L){for(var I=L^-1,Z=F.length-15,H=0;H<Z;)I=N[F[H++]^I&255]^k[F[H++]^I>>8&255]^b[F[H++]^I>>16&255]^v[F[H++]^I>>>24]^y[F[H++]]^g[F[H++]]^p[F[H++]]^d[F[H++]]^h[F[H++]]^c[F[H++]]^f[F[H++]]^u[F[H++]]^o[F[H++]]^a[F[H++]]^s[F[H++]]^r[F[H++]];for(Z+=15;H<Z;)I=I>>>8^r[(I^F[H++])&255];return~I}function ee(F,L){for(var I=L^-1,Z=0,H=F.length,O=0,q=0;Z<H;)O=F.charCodeAt(Z++),O<128?I=I>>>8^r[(I^O)&255]:O<2048?(I=I>>>8^r[(I^(192|O>>6&31))&255],I=I>>>8^r[(I^(128|O&63))&255]):O>=55296&&O<57344?(O=(O&1023)+64,q=F.charCodeAt(Z++)&1023,I=I>>>8^r[(I^(240|O>>8&7))&255],I=I>>>8^r[(I^(128|O>>2&63))&255],I=I>>>8^r[(I^(128|q>>6&15|(O&3)<<4))&255],I=I>>>8^r[(I^(128|q&63))&255]):(I=I>>>8^r[(I^(224|O>>12&15))&255],I=I>>>8^r[(I^(128|O>>6&63))&255],I=I>>>8^r[(I^(128|O&63))&255]);return~I}t.table=r,t.bstr=E,t.buf=U,t.str=ee})});var Y$=w((_Fe,Z$)=>{"use strict";var{Transform:e0e}=nr(),t0e=N1(),D1=class extends e0e{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,r,i){e&&(this.checksum=t0e.buf(e,this.checksum)>>>0,this.rawSize+=e.length),i(null,e)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};Z$.exports=D1});var Q$=w((wFe,K$)=>{"use strict";var{DeflateRaw:r0e}=Y("zlib"),i0e=N1(),F1=class extends r0e{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,r){return e&&(this.compressedSize+=e.length),super.push(e,r)}_transform(e,r,i){e&&(this.checksum=i0e.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,r,i)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}};K$.exports=F1});var M1=w((bFe,J$)=>{"use strict";J$.exports={CRC32Stream:Y$(),DeflateCRC32Stream:Q$()}});var rU=w((TFe,tU)=>{var n0e=Y("util").inherits,s0e=O1(),{CRC32Stream:a0e}=M1(),{DeflateCRC32Stream:o0e}=M1(),eU=C1(),xFe=x1(),SFe=w1(),xe=b1(),EFe=E1(),ge=Om(),Bt=tU.exports=function(t){if(!(this instanceof Bt))return new Bt(t);t=this.options=this._defaults(t),eU.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};n0e(Bt,eU);Bt.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()};Bt.prototype._appendBuffer=function(t,e,r){e.length===0&&t.setMethod(xe.METHOD_STORED);var i=t.getMethod();if(i===xe.METHOD_STORED&&(t.setSize(e.length),t.setCompressedSize(e.length),t.setCrc(s0e.unsigned(e))),this._writeLocalFileHeader(t),i===xe.METHOD_STORED){this.write(e),this._afterAppend(t),r(null,t);return}else if(i===xe.METHOD_DEFLATED){this._smartStream(t,r).end(e);return}else{r(new Error("compression method "+i+" not implemented"));return}};Bt.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(xe.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var i=this._smartStream(t,r);e.once("error",function(n){i.emit("error",n),i.end()}),e.pipe(i)};Bt.prototype._defaults=function(t){return typeof t!="object"&&(t={}),typeof t.zlib!="object"&&(t.zlib={}),typeof t.zlib.level!="number"&&(t.zlib.level=xe.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t};Bt.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()};Bt.prototype._normalizeEntry=function(t){t.getMethod()===-1&&t.setMethod(xe.METHOD_DEFLATED),t.getMethod()===xe.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(xe.MIN_VERSION_DATA_DESCRIPTOR)),t.getTime()===-1&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}};Bt.prototype._smartStream=function(t,e){var r=t.getMethod()===xe.METHOD_DEFLATED,i=r?new o0e(this.options.zlib):new a0e,n=null;function s(){var a=i.digest().readUInt32BE(0);t.setCrc(a),t.setSize(i.size()),t.setCompressedSize(i.size(!0)),this._afterAppend(t),e(n,t)}return i.once("end",s.bind(this)),i.once("error",function(a){n=a}),i.pipe(this,{end:!1}),i};Bt.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=xe.ZIP64_MAGIC_SHORT,e=xe.ZIP64_MAGIC,r=xe.ZIP64_MAGIC),this.write(ge.getLongBytes(xe.SIG_EOCD)),this.write(xe.SHORT_ZERO),this.write(xe.SHORT_ZERO),this.write(ge.getShortBytes(t)),this.write(ge.getShortBytes(t)),this.write(ge.getLongBytes(e)),this.write(ge.getLongBytes(r));var i=this.getComment(),n=Buffer.byteLength(i);this.write(ge.getShortBytes(n)),this.write(i)};Bt.prototype._writeCentralDirectoryZip64=function(){this.write(ge.getLongBytes(xe.SIG_ZIP64_EOCD)),this.write(ge.getEightBytes(44)),this.write(ge.getShortBytes(xe.MIN_VERSION_ZIP64)),this.write(ge.getShortBytes(xe.MIN_VERSION_ZIP64)),this.write(xe.LONG_ZERO),this.write(xe.LONG_ZERO),this.write(ge.getEightBytes(this._entries.length)),this.write(ge.getEightBytes(this._entries.length)),this.write(ge.getEightBytes(this._archive.centralLength)),this.write(ge.getEightBytes(this._archive.centralOffset)),this.write(ge.getLongBytes(xe.SIG_ZIP64_EOCD_LOC)),this.write(xe.LONG_ZERO),this.write(ge.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(ge.getLongBytes(1))};Bt.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),i=t._offsets,n=t.getSize(),s=t.getCompressedSize();if(t.isZip64()||i.file>xe.ZIP64_MAGIC){n=xe.ZIP64_MAGIC,s=xe.ZIP64_MAGIC,t.setVersionNeededToExtract(xe.MIN_VERSION_ZIP64);var a=Buffer.concat([ge.getShortBytes(xe.ZIP64_EXTRA_ID),ge.getShortBytes(24),ge.getEightBytes(t.getSize()),ge.getEightBytes(t.getCompressedSize()),ge.getEightBytes(i.file)],28);t.setExtra(a)}this.write(ge.getLongBytes(xe.SIG_CFH)),this.write(ge.getShortBytes(t.getPlatform()<<8|xe.VERSION_MADEBY)),this.write(ge.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(ge.getShortBytes(r)),this.write(ge.getLongBytes(t.getTimeDos())),this.write(ge.getLongBytes(t.getCrc())),this.write(ge.getLongBytes(s)),this.write(ge.getLongBytes(n));var o=t.getName(),u=t.getComment(),f=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(o=Buffer.from(o),u=Buffer.from(u)),this.write(ge.getShortBytes(o.length)),this.write(ge.getShortBytes(f.length)),this.write(ge.getShortBytes(u.length)),this.write(xe.SHORT_ZERO),this.write(ge.getShortBytes(t.getInternalAttributes())),this.write(ge.getLongBytes(t.getExternalAttributes())),i.file>xe.ZIP64_MAGIC?this.write(ge.getLongBytes(xe.ZIP64_MAGIC)):this.write(ge.getLongBytes(i.file)),this.write(o),this.write(f),this.write(u)};Bt.prototype._writeDataDescriptor=function(t){this.write(ge.getLongBytes(xe.SIG_DD)),this.write(ge.getLongBytes(t.getCrc())),t.isZip64()?(this.write(ge.getEightBytes(t.getCompressedSize())),this.write(ge.getEightBytes(t.getSize()))):(this.write(ge.getLongBytes(t.getCompressedSize())),this.write(ge.getLongBytes(t.getSize())))};Bt.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),i=t.getName(),n=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(xe.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(i=Buffer.from(i)),t._offsets.file=this.offset,this.write(ge.getLongBytes(xe.SIG_LFH)),this.write(ge.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(ge.getShortBytes(r)),this.write(ge.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(xe.LONG_ZERO),this.write(xe.LONG_ZERO),this.write(xe.LONG_ZERO)):(this.write(ge.getLongBytes(t.getCrc())),this.write(ge.getLongBytes(t.getCompressedSize())),this.write(ge.getLongBytes(t.getSize()))),this.write(ge.getShortBytes(i.length)),this.write(ge.getShortBytes(n.length)),this.write(i),this.write(n),t._offsets.contents=this.offset};Bt.prototype.getComment=function(t){return this._archive.comment!==null?this._archive.comment:""};Bt.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>xe.ZIP64_MAGIC_SHORT||this._archive.centralLength>xe.ZIP64_MAGIC||this._archive.centralOffset>xe.ZIP64_MAGIC};Bt.prototype.setComment=function(t){this._archive.comment=t}});var P1=w((CFe,iU)=>{iU.exports={ArchiveEntry:Am(),ZipArchiveEntry:x1(),ArchiveOutputStream:C1(),ZipArchiveOutputStream:rU()}});var oU=w((kFe,aU)=>{var sU=Er(),Dl=Y("path"),q1=MT(),l0e=$T(),u0e=VT(),f0e=GT(),c0e=cc(),Fa=aU.exports={},nU=/[\/\\]/g,h0e=function(t,e){var r=[];return q1(t).forEach(function(i){var n=i.indexOf("!")===0;n&&(i=i.slice(1));var s=e(i);n?r=l0e(r,s):r=u0e(r,s)}),r};Fa.exists=function(){var t=Dl.join.apply(Dl,arguments);return sU.existsSync(t)};Fa.expand=function(...t){var e=f0e(t[0])?t.shift():{},r=Array.isArray(t[0])?t[0]:t;if(r.length===0)return[];var i=h0e(r,function(n){return c0e.sync(n,e)});return e.filter&&(i=i.filter(function(n){n=Dl.join(e.cwd||"",n);try{return typeof e.filter=="function"?e.filter(n):sU.statSync(n)[e.filter]()}catch{return!1}})),i};Fa.expandMapping=function(t,e,r){r=Object.assign({rename:function(s,a){return Dl.join(s||"",a)}},r);var i=[],n={};return Fa.expand(r,t).forEach(function(s){var a=s;r.flatten&&(a=Dl.basename(a)),r.ext&&(a=a.replace(/(\.[^\/]*)?$/,r.ext));var o=r.rename(e,a,r);r.cwd&&(s=Dl.join(r.cwd,s)),o=o.replace(nU,"/"),s=s.replace(nU,"/"),n[o]?n[o].src.push(s):(i.push({src:[s],dest:o}),n[o]=i[i.length-1])}),i};Fa.normalizeFilesArray=function(t){var e=[];return t.forEach(function(r){var i;("src"in r||"dest"in r)&&e.push(r)}),e.length===0?[]:(e=_(e).chain().forEach(function(r){!("src"in r)||!r.src||(Array.isArray(r.src)?r.src=q1(r.src):r.src=[r.src])}).map(function(r){var i=Object.assign({},r);if(delete i.src,delete i.dest,r.expand)return Fa.expandMapping(r.src,r.dest,i).map(function(s){var a=Object.assign({},r);return a.orig=Object.assign({},r),a.src=s.src,a.dest=s.dest,["expand","cwd","flatten","rename","ext"].forEach(function(o){delete a[o]}),a});var n=Object.assign({},r);return n.orig=Object.assign({},r),"src"in n&&Object.defineProperty(n,"src",{enumerable:!0,get:function s(){var a;return"result"in s||(a=r.src,a=Array.isArray(a)?q1(a):[a],s.result=Fa.expand(i,a)),s.result}}),"dest"in n&&(n.dest=r.dest),n}).flatten().value(),e)}});var cU=w((RFe,fU)=>{var L1=Er(),lU=Y("path"),d0e=fT(),uU=em(),p0e=pT(),g0e=Y("stream").Stream,m0e=nr().PassThrough,Lr=fU.exports={};Lr.file=oU();Lr.collectStream=function(t,e){var r=[],i=0;t.on("error",e),t.on("data",function(n){r.push(n),i+=n.length}),t.on("end",function(){var n=Buffer.alloc(i),s=0;r.forEach(function(a){a.copy(n,s),s+=a.length}),e(null,n)})};Lr.dateify=function(t){return t=t||new Date,t instanceof Date?t=t:typeof t=="string"?t=new Date(t):t=new Date,t};Lr.defaults=function(t,e,r){var i=arguments;return i[0]=i[0]||{},p0e(...i)};Lr.isStream=function(t){return t instanceof g0e};Lr.lazyReadStream=function(t){return new d0e.Readable(function(){return L1.createReadStream(t)})};Lr.normalizeInputSource=function(t){return t===null?Buffer.alloc(0):typeof t=="string"?Buffer.from(t):Lr.isStream(t)?t.pipe(new m0e):t};Lr.sanitizePath=function(t){return uU(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};Lr.trailingSlashIt=function(t){return t.slice(-1)!=="/"?t+"/":t};Lr.unixifyPath=function(t){return uU(t,!1).replace(/^\w+:/,"")};Lr.walkdir=function(t,e,r){var i=[];typeof e=="function"&&(r=e,e=t),L1.readdir(t,function(n,s){var a=0,o,u;if(n)return r(n);(function f(){if(o=s[a++],!o)return r(null,i);u=lU.join(t,o),L1.stat(u,function(c,h){i.push({path:u,relative:lU.relative(e,u).replace(/\\/g,"/"),stats:h}),h&&h.isDirectory()?Lr.walkdir(u,e,function(d,p){p.forEach(function(g){i.push(g)}),f()}):f()})})()})}});var dU=w((AFe,hU)=>{var y0e=Y("util").inherits,j1=P1().ZipArchiveOutputStream,v0e=P1().ZipArchiveEntry,B1=cU(),Fl=hU.exports=function(t){if(!(this instanceof Fl))return new Fl(t);t=this.options=t||{},t.zlib=t.zlib||{},j1.call(this,t),typeof t.level=="number"&&t.level>=0&&(t.zlib.level=t.level,delete t.level),!t.forceZip64&&typeof t.zlib.level=="number"&&t.zlib.level===0&&(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,t.comment&&t.comment.length>0&&this.setComment(t.comment)};y0e(Fl,j1);Fl.prototype._normalizeFileData=function(t){t=B1.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var e=t.type==="directory",r=t.type==="symlink";return t.name&&(t.name=B1.sanitizePath(t.name),!r&&t.name.slice(-1)==="/"?(e=!0,t.type="directory"):e&&(t.name+="/")),(e||r)&&(t.store=!0),t.date=B1.dateify(t.date),t};Fl.prototype.entry=function(t,e,r){if(typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),e=this._normalizeFileData(e),e.type!=="file"&&e.type!=="directory"&&e.type!=="symlink"){r(new Error(e.type+" entries not currently supported"));return}if(typeof e.name!="string"||e.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(e.type==="symlink"&&typeof e.linkname!="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var i=new v0e(e.name);return i.setTime(e.date,this.options.forceLocalTime),e.namePrependSlash&&i.setName(e.name,!0),e.store&&i.setMethod(0),e.comment.length>0&&i.setComment(e.comment),e.type==="symlink"&&typeof e.mode!="number"&&(e.mode=40960),typeof e.mode=="number"&&(e.type==="symlink"&&(e.mode|=40960),i.setUnixMode(e.mode)),e.type==="symlink"&&typeof e.linkname=="string"&&(t=Buffer.from(e.linkname)),j1.prototype.entry.call(this,i,t,r)};Fl.prototype.finalize=function(){this.finish()}});var gU=w((OFe,pU)=>{var _0e=dU(),w0e=pc(),_s=function(t){if(!(this instanceof _s))return new _s(t);t=this.options=w0e.defaults(t,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new _0e(t)};_s.prototype.append=function(t,e,r){this.engine.entry(t,e,r)};_s.prototype.finalize=function(){this.engine.finalize()};_s.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};_s.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)};_s.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};pU.exports=_s});var vU=w((IFe,yU)=>{"use strict";var{Buffer:di}=Y("buffer"),mU=Symbol.for("BufferList");function rt(t){if(!(this instanceof rt))return new rt(t);rt._init.call(this,t)}rt._init=function(e){Object.defineProperty(this,mU,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};rt.prototype._new=function(e){return new rt(e)};rt.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let i=0;i<this._bufs.length;i++){let n=r+this._bufs[i].length;if(e<n||i===this._bufs.length-1)return[i,e-r];r=n}};rt.prototype._reverseOffset=function(t){let e=t[0],r=t[1];for(let i=0;i<e;i++)r+=this._bufs[i].length;return r};rt.prototype.get=function(e){if(e>this.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};rt.prototype.slice=function(e,r){return typeof e=="number"&&e<0&&(e+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};rt.prototype.copy=function(e,r,i,n){if((typeof i!="number"||i<0)&&(i=0),(typeof n!="number"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return e||di.alloc(0);let s=!!e,a=this._offset(i),o=n-i,u=o,f=s&&r||0,c=a[1];if(i===0&&n===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:di.concat(this._bufs,this.length);for(let h=0;h<this._bufs.length;h++)this._bufs[h].copy(e,f),f+=this._bufs[h].length;return e}if(u<=this._bufs[a[0]].length-c)return s?this._bufs[a[0]].copy(e,r,c,c+u):this._bufs[a[0]].slice(c,c+u);s||(e=di.allocUnsafe(o));for(let h=a[0];h<this._bufs.length;h++){let d=this._bufs[h].length-c;if(u>d)this._bufs[h].copy(e,f,c),f+=d;else{this._bufs[h].copy(e,f,c,c+u),f+=d;break}u-=d,c&&(c=0)}return e.length>f?e.slice(0,f):e};rt.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!="number"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let i=this._offset(e),n=this._offset(r),s=this._bufs.slice(i[0],n[0]+1);return n[1]===0?s.pop():s[s.length-1]=s[s.length-1].slice(0,n[1]),i[1]!==0&&(s[0]=s[0].slice(i[1])),this._new(s)};rt.prototype.toString=function(e,r,i){return this.slice(r,i).toString(e)};rt.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};rt.prototype.duplicate=function(){let e=this._new();for(let r=0;r<this._bufs.length;r++)e.append(this._bufs[r]);return e};rt.prototype.append=function(e){if(e==null)return this;if(e.buffer)this._appendBuffer(di.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let r=0;r<e.length;r++)this.append(e[r]);else if(this._isBufferList(e))for(let r=0;r<e._bufs.length;r++)this.append(e._bufs[r]);else typeof e=="number"&&(e=e.toString()),this._appendBuffer(di.from(e));return this};rt.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length};rt.prototype.indexOf=function(t,e,r){if(r===void 0&&typeof e=="string"&&(r=e,e=void 0),typeof t=="function"||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t=="number"?t=di.from([t]):typeof t=="string"?t=di.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=di.from(t.buffer,t.byteOffset,t.byteLength):di.isBuffer(t)||(t=di.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let i=this._offset(e),n=i[0],s=i[1];for(;n<this._bufs.length;n++){let a=this._bufs[n];for(;s<a.length;)if(a.length-s>=t.length){let u=a.indexOf(t,s);if(u!==-1)return this._reverseOffset([n,u]);s=a.length-t.length+1}else{let u=this._reverseOffset([n,s]);if(this._match(u,t))return u;s++}s=0}return-1};rt.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0};(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(r){t[r]===null?rt.prototype[r]=function(i,n){return this.slice(i,i+n)[r](0,n)}:rt.prototype[r]=function(i=0){return this.slice(i,i+t[r])[r](0)}})(e)})();rt.prototype._isBufferList=function(e){return e instanceof rt||rt.isBufferList(e)};rt.isBufferList=function(e){return e!=null&&e[mU]};yU.exports=rt});var _U=w((NFe,Im)=>{"use strict";var $1=nr().Duplex,b0e=be(),gc=vU();function lr(t){if(!(this instanceof lr))return new lr(t);if(typeof t=="function"){this._callback=t;let e=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",e)}),this.on("unpipe",function(i){i.removeListener("error",e)}),t=null}gc._init.call(this,t),$1.call(this)}b0e(lr,$1);Object.assign(lr.prototype,gc.prototype);lr.prototype._new=function(e){return new lr(e)};lr.prototype._write=function(e,r,i){this._appendBuffer(e),typeof i=="function"&&i()};lr.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};lr.prototype.end=function(e){$1.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};lr.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};lr.prototype._isBufferList=function(e){return e instanceof lr||e instanceof gc||lr.isBufferList(e)};lr.isBufferList=gc.isBufferList;Im.exports=lr;Im.exports.BufferListStream=lr;Im.exports.BufferList=gc});var H1=w(Pl=>{var x0e=Buffer.alloc,S0e="0000000000000000000",E0e="7777777777777777777",wU=48,bU=Buffer.from("ustar\0","binary"),T0e=Buffer.from("00","binary"),C0e=Buffer.from("ustar ","binary"),k0e=Buffer.from(" \0","binary"),R0e=parseInt("7777",8),mc=257,W1=263,A0e=function(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)},O0e=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},I0e=function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},xU=function(t,e,r,i){for(;r<i;r++)if(t[r]===e)return r;return i},SU=function(t){for(var e=256,r=0;r<148;r++)e+=t[r];for(var i=156;i<512;i++)e+=t[i];return e},ws=function(t,e){return t=t.toString(8),t.length>e?E0e.slice(0,e)+" ":S0e.slice(0,e-t.length)+t+" "};function N0e(t){var e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;for(var r=[],i=t.length-1;i>0;i--){var n=t[i];e?r.push(n):r.push(255-n)}var s=0,a=r.length;for(i=0;i<a;i++)s+=r[i]*Math.pow(256,i);return e?s:-1*s}var bs=function(t,e,r){if(t=t.slice(e,e+r),e=0,t[e]&128)return N0e(t);for(;e<t.length&&t[e]===32;)e++;for(var i=A0e(xU(t,32,e,t.length),t.length,t.length);e<i&&t[e]===0;)e++;return i===e?0:parseInt(t.slice(e,i).toString(),8)},Ml=function(t,e,r,i){return t.slice(e,xU(t,0,e,e+r)).toString(i)},U1=function(t){var e=Buffer.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t};Pl.decodeLongPath=function(t,e){return Ml(t,0,t.length,e)};Pl.encodePax=function(t){var e="";t.name&&(e+=U1(" path="+t.name+`
32
+ `)),t.linkname&&(e+=U1(" linkpath="+t.linkname+`
33
+ `));var r=t.pax;if(r)for(var i in r)e+=U1(" "+i+"="+r[i]+`
34
+ `);return Buffer.from(e)};Pl.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var i=parseInt(t.slice(0,r).toString(),10);if(!i)return e;var n=t.slice(r+1,i-1).toString(),s=n.indexOf("=");if(s===-1)return e;e[n.slice(0,s)]=n.slice(s+1),t=t.slice(i)}return e};Pl.encode=function(t){var e=x0e(512),r=t.name,i="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var n=r.indexOf("/");if(n===-1)return null;i+=i?"/"+r.slice(0,n):r.slice(0,n),r=r.slice(n+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(i)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(ws(t.mode&R0e,6),100),e.write(ws(t.uid,6),108),e.write(ws(t.gid,6),116),e.write(ws(t.size,11),124),e.write(ws(t.mtime.getTime()/1e3|0,11),136),e[156]=wU+I0e(t.type),t.linkname&&e.write(t.linkname,157),bU.copy(e,mc),T0e.copy(e,W1),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(ws(t.devmajor||0,6),329),e.write(ws(t.devminor||0,6),337),i&&e.write(i,345),e.write(ws(SU(e),6),148),e)};Pl.decode=function(t,e,r){var i=t[156]===0?0:t[156]-wU,n=Ml(t,0,100,e),s=bs(t,100,8),a=bs(t,108,8),o=bs(t,116,8),u=bs(t,124,12),f=bs(t,136,12),c=O0e(i),h=t[157]===0?null:Ml(t,157,100,e),d=Ml(t,265,32),p=Ml(t,297,32),g=bs(t,329,8),y=bs(t,337,8),v=SU(t);if(v===256)return null;if(v!==bs(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(bU.compare(t,mc,mc+6)===0)t[345]&&(n=Ml(t,345,155,e)+"/"+n);else if(!(C0e.compare(t,mc,mc+6)===0&&k0e.compare(t,W1,W1+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return i===0&&n&&n[n.length-1]==="/"&&(i=5),{name:n,mode:s,uid:a,gid:o,size:u,mtime:new Date(1e3*f),type:c,linkname:h,uname:d,gname:p,devmajor:g,devminor:y}}});var OU=w((FFe,AU)=>{var TU=Y("util"),D0e=_U(),yc=H1(),CU=nr().Writable,kU=nr().PassThrough,RU=function(){},EU=function(t){return t&=511,t&&512-t},F0e=function(t,e){var r=new Nm(t,e);return r.end(),r},M0e=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},Nm=function(t,e){this._parent=t,this.offset=e,kU.call(this,{autoDestroy:!1})};TU.inherits(Nm,kU);Nm.prototype.destroy=function(t){this._parent.destroy(t)};var _n=function(t){if(!(this instanceof _n))return new _n(t);CU.call(this,t),t=t||{},this._offset=0,this._buffer=D0e(),this._missing=0,this._partial=!1,this._onparse=RU,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,i=function(){e._continue()},n=function(d){if(e._locked=!1,d)return e.destroy(d);e._stream||i()},s=function(){e._stream=null;var d=EU(e._header.size);d?e._parse(d,a):e._parse(512,h),e._locked||i()},a=function(){e._buffer.consume(EU(e._header.size)),e._parse(512,h),i()},o=function(){var d=e._header.size;e._paxGlobal=yc.decodePax(r.slice(0,d)),r.consume(d),s()},u=function(){var d=e._header.size;e._pax=yc.decodePax(r.slice(0,d)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(d),s()},f=function(){var d=e._header.size;this._gnuLongPath=yc.decodeLongPath(r.slice(0,d),t.filenameEncoding),r.consume(d),s()},c=function(){var d=e._header.size;this._gnuLongLinkPath=yc.decodeLongPath(r.slice(0,d),t.filenameEncoding),r.consume(d),s()},h=function(){var d=e._offset,p;try{p=e._header=yc.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(g){e.emit("error",g)}if(r.consume(512),!p){e._parse(512,h),i();return}if(p.type==="gnu-long-path"){e._parse(p.size,f),i();return}if(p.type==="gnu-long-link-path"){e._parse(p.size,c),i();return}if(p.type==="pax-global-header"){e._parse(p.size,o),i();return}if(p.type==="pax-header"){e._parse(p.size,u),i();return}if(e._gnuLongPath&&(p.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(p.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=p=M0e(p,e._pax),e._pax=null),e._locked=!0,!p.size||p.type==="directory"){e._parse(512,h),e.emit("entry",p,F0e(e,d),n);return}e._stream=new Nm(e,d),e.emit("entry",p,e._stream,n),e._parse(p.size,s),i()};this._onheader=h,this._parse(512,h)};TU.inherits(_n,CU);_n.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};_n.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};_n.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=RU,this._overflow?this._write(this._overflow,void 0,t):t()}};_n.prototype._write=function(t,e,r){if(!this._destroyed){var i=this._stream,n=this._buffer,s=this._missing;if(t.length&&(this._partial=!0),t.length<s)return this._missing-=t.length,this._overflow=null,i?i.write(t,r):(n.append(t),r());this._cb=r,this._missing=0;var a=null;t.length>s&&(a=t.slice(s),t=t.slice(0,s)),i?i.end(t):n.append(t),this._overflow=a,this._onparse()}};_n.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()};AU.exports=_n});var NU=w((MFe,IU)=>{IU.exports=Y("fs").constants||Y("constants")});var MU=w((PFe,FU)=>{var P0e=km(),q0e=function(){},L0e=global.Bare?queueMicrotask:process.nextTick.bind(process),B0e=function(t){return t.setHeader&&typeof t.abort=="function"},j0e=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},DU=function(t,e,r){if(typeof e=="function")return DU(t,null,e);e||(e={}),r=P0e(r||q0e);var i=t._writableState,n=t._readableState,s=e.readable||e.readable!==!1&&t.readable,a=e.writable||e.writable!==!1&&t.writable,o=!1,u=function(){t.writable||f()},f=function(){a=!1,s||r.call(t)},c=function(){s=!1,a||r.call(t)},h=function(v){r.call(t,v?new Error("exited with error code: "+v):null)},d=function(v){r.call(t,v)},p=function(){L0e(g)},g=function(){if(!o){if(s&&!(n&&n.ended&&!n.destroyed))return r.call(t,new Error("premature close"));if(a&&!(i&&i.ended&&!i.destroyed))return r.call(t,new Error("premature close"))}},y=function(){t.req.on("finish",f)};return B0e(t)?(t.on("complete",f),t.on("abort",p),t.req?y():t.on("request",y)):a&&!i&&(t.on("end",u),t.on("close",u)),j0e(t)&&t.on("exit",h),t.on("end",c),t.on("finish",f),e.error!==!1&&t.on("error",d),t.on("close",p),function(){o=!0,t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",y),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("exit",h),t.removeListener("end",c),t.removeListener("error",d),t.removeListener("close",p)}};FU.exports=DU});var jU=w((qFe,BU)=>{var ql=NU(),PU=MU(),Fm=be(),$0e=Buffer.alloc,qU=nr().Readable,Ll=nr().Writable,U0e=Y("string_decoder").StringDecoder,Dm=H1(),W0e=parseInt("755",8),H0e=parseInt("644",8),LU=$0e(1024),X1=function(){},z1=function(t,e){e&=511,e&&t.push(LU.slice(0,512-e))};function z0e(t){switch(t&ql.S_IFMT){case ql.S_IFBLK:return"block-device";case ql.S_IFCHR:return"character-device";case ql.S_IFDIR:return"directory";case ql.S_IFIFO:return"fifo";case ql.S_IFLNK:return"symlink"}return"file"}var Mm=function(t){Ll.call(this),this.written=0,this._to=t,this._destroyed=!1};Fm(Mm,Ll);Mm.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r};Mm.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Pm=function(){Ll.call(this),this.linkname="",this._decoder=new U0e("utf-8"),this._destroyed=!1};Fm(Pm,Ll);Pm.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()};Pm.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var vc=function(){Ll.call(this),this._destroyed=!1};Fm(vc,Ll);vc.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))};vc.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Pi=function(t){if(!(this instanceof Pi))return new Pi(t);qU.call(this,t),this._drain=X1,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};Fm(Pi,qU);Pi.prototype.entry=function(t,e,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof e=="function"&&(r=e,e=null),r||(r=X1);var i=this;if((!t.size||t.type==="symlink")&&(t.size=0),t.type||(t.type=z0e(t.mode)),t.mode||(t.mode=t.type==="directory"?W0e:H0e),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),typeof e=="string"&&(e=Buffer.from(e)),Buffer.isBuffer(e)){t.size=e.length,this._encode(t);var n=this.push(e);return z1(i,t.size),n?process.nextTick(r):this._drain=r,new vc}if(t.type==="symlink"&&!t.linkname){var s=new Pm;return PU(s,function(o){if(o)return i.destroy(),r(o);t.linkname=s.linkname,i._encode(t),r()}),s}if(this._encode(t),t.type!=="file"&&t.type!=="contiguous-file")return process.nextTick(r),new vc;var a=new Mm(this);return this._stream=a,PU(a,function(o){if(i._stream=null,o)return i.destroy(),r(o);if(a.written!==t.size)return i.destroy(),r(new Error("size mismatch"));z1(i,t.size),i._finalizing&&i.finalize(),r()}),a}};Pi.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(LU),this.push(null))};Pi.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};Pi.prototype._encode=function(t){if(!t.pax){var e=Dm.encode(t);if(e){this.push(e);return}}this._encodePax(t)};Pi.prototype._encodePax=function(t){var e=Dm.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(Dm.encode(r)),this.push(e),z1(this,e.length),r.size=t.size,r.type=t.type,this.push(Dm.encode(r))};Pi.prototype._read=function(t){var e=this._drain;this._drain=X1,e()};BU.exports=Pi});var $U=w(V1=>{V1.extract=OU();V1.pack=jU()});var HU=w((BFe,WU)=>{var X0e=Y("zlib"),V0e=$U(),UU=pc(),wn=function(t){if(!(this instanceof wn))return new wn(t);t=this.options=UU.defaults(t,{gzip:!1}),typeof t.gzipOptions!="object"&&(t.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=V0e.pack(t),this.compressor=!1,t.gzip&&(this.compressor=X0e.createGzip(t.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};wn.prototype._onCompressorError=function(t){this.engine.emit("error",t)};wn.prototype.append=function(t,e,r){var i=this;e.mtime=e.date;function n(a,o){if(a){r(a);return}i.engine.entry(e,o,function(u){r(u,e)})}if(e.sourceType==="buffer")n(null,t);else if(e.sourceType==="stream"&&e.stats){e.size=e.stats.size;var s=i.engine.entry(e,function(a){r(a,e)});t.pipe(s)}else e.sourceType==="stream"&&UU.collectStream(t,n)};wn.prototype.finalize=function(){this.engine.finalize()};wn.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};wn.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)};wn.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)};WU.exports=wn});var GU=w((jFe,VU)=>{var G0e=Y("util").inherits,zU=nr().Transform,Z0e=O1(),XU=pc(),xs=function(t){if(!(this instanceof xs))return new xs(t);t=this.options=XU.defaults(t,{}),zU.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};G0e(xs,zU);xs.prototype._transform=function(t,e,r){r(null,t)};xs.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)};xs.prototype.append=function(t,e,r){var i=this;e.crc32=0;function n(s,a){if(s){r(s);return}e.size=a.length||0,e.crc32=Z0e.unsigned(a),i.files.push(e),r(null,e)}e.sourceType==="buffer"?n(null,t):e.sourceType==="stream"&&XU.collectStream(t,n)};xs.prototype.finalize=function(){this._writeStringified(),this.end()};VU.exports=xs});var YU=w(($Fe,ZU)=>{var Y0e=C$(),_c={},Ss=function(t,e){return Ss.create(t,e)};Ss.create=function(t,e){if(_c[t]){var r=new Y0e(t,e);return r.setFormat(t),r.setModule(new _c[t](e)),r}else throw new Error("create("+t+"): format not registered")};Ss.registerFormat=function(t,e){if(_c[t])throw new Error("register("+t+"): format already registered");if(typeof e!="function")throw new Error("register("+t+"): format module invalid");if(typeof e.prototype.append!="function"||typeof e.prototype.finalize!="function")throw new Error("register("+t+"): format module missing methods");_c[t]=e};Ss.isRegisteredFormat=function(t){return!!_c[t]};Ss.registerFormat("zip",gU());Ss.registerFormat("tar",HU());Ss.registerFormat("json",GU());ZU.exports=Ss});var QU=w((UFe,KU)=>{var G1=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 r=this._hash[e];return r===void 0&&(r=this._hash[e]=this._values.length,this._values.push(e)),this._totalRefs++,r}};KU.exports=G1});var eW=w((WFe,JU)=>{var K0e=sr(),Q0e=es(),Z1=class{constructor(e){this.writer=e}push(e){this.writer.addHyperlink(e)}},Y1=class{constructor(e){this.id=e.id,this.count=0,this._hyperlinks=[],this._workbook=e.workbook}get stream(){return this._stream||(this._stream=this._workbook._openStream(`/xl/worksheets/_rels/sheet${this.id}.xml.rels`)),this._stream}get length(){return this._hyperlinks.length}each(e){return this._hyperlinks.forEach(e)}get hyperlinksProxy(){return this._hyperlinksProxy||(this._hyperlinksProxy=new Z1(this))}addHyperlink(e){let r={Target:e.target,Type:Q0e.Hyperlink,TargetMode:"External"},i=this._writeRelationship(r);this._hyperlinks.push({rId:i,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"?>
35
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">`)}_writeRelationship(e){this.count||this._writeOpen();let r=`rId${++this.count}`;return e.TargetMode?this.stream.write(`<Relationship Id="${r}" Type="${e.Type}" Target="${K0e.xmlEncode(e.Target)}" TargetMode="${e.TargetMode}"/>`):this.stream.write(`<Relationship Id="${r}" Type="${e.Type}" Target="${e.Target}"/>`),r}_writeClose(){this.stream.write("</Relationships>")}};JU.exports=Y1});var nW=w((HFe,iW)=>{var tW=zt(),rW=es(),J0e=mt(),ebe=Gx(),tbe=tS(),K1=class{constructor(e,r,i){this.id=i.id,this.count=0,this._worksheet=e,this._workbook=i.workbook,this._sheetRelsWriter=r}get commentsStream(){return this._commentsStream||(this._commentsStream=this._workbook._openStream(`/xl/comments${this.id}.xml`)),this._commentsStream}get vmlStream(){return this._vmlStream||(this._vmlStream=this._workbook._openStream(`xl/drawings/vmlDrawing${this.id}.vml`)),this._vmlStream}_addRelationships(){let e={Type:rW.Comments,Target:`../comments${this.id}.xml`};this._sheetRelsWriter.addRelationship(e);let r={Type:rW.VmlDrawing,Target:`../drawings/vmlDrawing${this.id}.vml`};this.vmlRelId=this._sheetRelsWriter.addRelationship(r)}_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,r){let i=new ebe,n=new tW;i.render(n,e),this.commentsStream.write(n.xml);let s=new tbe,a=new tW;s.render(a,e,r),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(),this.startedData=!0),e.forEach(r=>{r.refAddress=J0e.decodeAddress(r.ref)}),e.forEach(r=>{this._writeComment(r,this.count),this.count+=1}))}commit(){this.count&&(this._writeClose(),this.commentsStream.end(),this.vmlStream.end())}};iW.exports=K1});var uW=w((zFe,lW)=>{var rbe=wt(),ibe=es(),Q1=mt(),sW=vv(),aW=Vi(),nbe=Ww(),oW=Lh(),J1=Bh(),sbe=eW(),abe=nW(),obe=mv(),jt=new nbe,eC=Kn(),lbe=_b(),ube=Sb(),fbe=Tb(),cbe=cb(),hbe=lb(),dbe=pb(),pbe=kb(),gbe=Ab(),mbe=Ib(),ybe=Db(),vbe=Pb(),_be=Lb(),wbe=sx(),bbe=zb(),xbe=Wb(),$t={dataValidations:new lbe,sheetProperties:new ube,sheetFormatProperties:new fbe,columns:new eC({tag:"cols",length:!1,childXform:new cbe}),row:new hbe,hyperlinks:new eC({tag:"hyperlinks",length:!1,childXform:new dbe}),sheetViews:new eC({tag:"sheetViews",length:!1,childXform:new pbe}),sheetProtection:new gbe,pageMargins:new mbe,pageSeteup:new ybe,autoFilter:new vbe,picture:new _be,conditionalFormattings:new wbe,headerFooter:new bbe,rowBreaks:new xbe},tC=class{constructor(e){this.id=e.id,this.name=e.name||`Sheet${this.id}`,this.state=e.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges=[],this._merges.add=function(){},this._sheetRelsWriter=new sbe(e),this._sheetCommentsWriter=new abe(this,this._sheetRelsWriter,e),this._dimensions=new aW,this._rowZero=1,this.committed=!1,this.dataValidations=new obe,this._formulae={},this._siFormulae=0,this.conditionalFormatting=[],this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,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.sheetProtection=null,this._writeOpenWorksheet(),this.startedData=!1}get workbook(){return this._workbook}get stream(){return this._stream||(this._stream=this._workbook._openStream(`/xl/worksheets/sheet${this.id}.xml`),this._stream.pause()),this._stream}destroy(){throw new Error("Invalid Operation: destroy")}commit(){this.committed||(this._rows.forEach(e=>{e&&this._writeRow(e)}),this._rows=null,this.startedData||this._writeOpenSheetData(),this._writeCloseSheetData(),this._writeAutoFilter(),this._writeMergeCells(),this._writeHyperlinks(),this._writeConditionalFormatting(),this._writeDataValidations(),this._writeSheetProtection(),this._writePageMargins(),this._writePageSetup(),this._writeBackground(),this._writeHeaderFooter(),this._writeRowBreaks(),this._writeLegacyData(),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((n,s)=>{let a=s.header&&1||s.headers&&s.headers.length||0;return Math.max(n,a)},0);let r=1,i=this._columns=[];e.forEach(n=>{let s=new J1(this,r++,!1);i.push(s),s.defn=n})}getColumnKey(e){return this._keys[e]}setColumnKey(e,r){this._keys[e]=r}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){rbe.each(this._keys,e)}getColumn(e){if(typeof e=="string"){let r=this._keys[e];if(r)return r;e=Q1.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){let r=this._columns.length+1;for(;r<=e;)this._columns.push(new J1(this,r++))}return this._columns[e-1]}get _nextRow(){return this._rowZero+this._rows.length}eachRow(e,r){if(r||(r=e,e=void 0),e&&e.includeEmpty){let i=this._nextRow;for(let n=this._rowZero;n<i;n++)r(this.getRow(n),n)}else this._rows.forEach(i=>{i.hasValues&&r(i,i.number)})}_commitRow(e){let r=!1;for(;this._rows.length&&!r;){let i=this._rows.shift();this._rowZero++,i&&(this._writeRow(i),r=i.number===e.number,this._rowZero=i.number+1)}}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(e){let r=e-this._rowZero;return this._rows[r]}getRow(e){let r=e-this._rowZero;if(r<0)throw new Error("Out of bounds: this row has been committed");let i=this._rows[r];return i||(this._rows[r]=i=new oW(this,e)),i}addRow(e){let r=new oW(this,this._nextRow);return this._rows[r.number-this._rowZero]=r,r.values=e,r}findCell(e,r){let i=Q1.getAddress(e,r),n=this.findRow(i.row);return n?n.findCell(i.column):void 0}getCell(e,r){let i=Q1.getAddress(e,r);return this.getRow(i.row).getCellEx(i)}mergeCells(...e){let r=new aW(e);this._merges.forEach(n=>{if(n.intersects(r))throw new Error("Cannot merge already merged cells")});let i=this.getCell(r.top,r.left);for(let n=r.top;n<=r.bottom;n++)for(let s=r.left;s<=r.right;s++)(n>r.top||s>r.left)&&this.getCell(n,s).merge(i);this._merges.push(r)}addConditionalFormatting(e){this.conditionalFormatting.push(e)}removeConditionalFormatting(e){typeof e=="number"?this.conditionalFormatting.splice(e,1):e instanceof Function?this.conditionalFormatting=this.conditionalFormatting.filter(e):this.conditionalFormatting=[]}addBackgroundImage(e){this._background={imageId:e}}getBackgroundImageId(){return this._background&&this._background.imageId}protect(e,r){return new Promise(i=>{this.sheetProtection={sheet:!0},r&&"spinCount"in r&&(r.spinCount=Number.isFinite(r.spinCount)?Math.round(Math.max(0,r.spinCount)):1e5),e&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=sW.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=r&&"spinCount"in r?r.spinCount:1e5,this.sheetProtection.hashValue=sW.convertPasswordToHash(e,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),r&&(this.sheetProtection=Object.assign(this.sheetProtection,r),!e&&"spinCount"in r&&delete this.sheetProtection.spinCount),i()})}unprotect(){this.sheetProtection=null}_write(e){jt.reset(),jt.addText(e),this.stream.write(jt)}_writeSheetProperties(e,r,i){let n={outlineProperties:r&&r.outlineProperties,tabColor:r&&r.tabColor,pageSetup:i&&i.fitToPage?{fitToPage:i.fitToPage}:void 0};e.addText($t.sheetProperties.toXml(n))}_writeSheetFormatProperties(e,r){let i=r?{defaultRowHeight:r.defaultRowHeight,dyDescent:r.dyDescent,outlineLevelCol:r.outlineLevelCol,outlineLevelRow:r.outlineLevelRow}:void 0;r.defaultColWidth&&(i.defaultColWidth=r.defaultColWidth),e.addText($t.sheetFormatProperties.toXml(i))}_writeOpenWorksheet(){jt.reset(),jt.addText('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'),jt.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(jt,this.properties,this.pageSetup),jt.addText($t.sheetViews.toXml(this.views)),this._writeSheetFormatProperties(jt,this.properties),this.stream.write(jt)}_writeColumns(){let e=J1.toModel(this.columns);e&&($t.columns.prepare(e,{styles:this._workbook.styles}),this.stream.write($t.columns.toXml(e)))}_writeOpenSheetData(){this._write("<sheetData>")}_writeRow(e){if(this.startedData||(this._writeColumns(),this._writeOpenSheetData(),this.startedData=!0),e.hasValues||e.height){let{model:r}=e,i={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:[]};$t.row.prepare(r,i),this.stream.write($t.row.toXml(r)),i.comments.length&&(this.hasComments=!0,this._sheetCommentsWriter.addComments(i.comments))}}_writeCloseSheetData(){this._write("</sheetData>")}_writeMergeCells(){this._merges.length&&(jt.reset(),jt.addText(`<mergeCells count="${this._merges.length}">`),this._merges.forEach(e=>{jt.addText(`<mergeCell ref="${e}"/>`)}),jt.addText("</mergeCells>"),this.stream.write(jt))}_writeHyperlinks(){this.stream.write($t.hyperlinks.toXml(this._sheetRelsWriter._hyperlinks))}_writeConditionalFormatting(){let e={styles:this._workbook.styles};$t.conditionalFormattings.prepare(this.conditionalFormatting,e),this.stream.write($t.conditionalFormattings.toXml(this.conditionalFormatting))}_writeRowBreaks(){this.stream.write($t.rowBreaks.toXml(this.rowBreaks))}_writeDataValidations(){this.stream.write($t.dataValidations.toXml(this.dataValidations.model))}_writeSheetProtection(){this.stream.write($t.sheetProtection.toXml(this.sheetProtection))}_writePageMargins(){this.stream.write($t.pageMargins.toXml(this.pageSetup.margins))}_writePageSetup(){this.stream.write($t.pageSeteup.toXml(this.pageSetup))}_writeHeaderFooter(){this.stream.write($t.headerFooter.toXml(this.headerFooter))}_writeAutoFilter(){this.stream.write($t.autoFilter.toXml(this.autoFilter))}_writeBackground(){if(this._background){if(this._background.imageId!==void 0){let e=this._workbook.getImage(this._background.imageId),r=this._sheetRelsWriter.addMedia({Target:`../media/${e.name}`,Type:ibe.Image});this._background={...this._background,rId:r}}this.stream.write($t.picture.toXml({rId:this._background.rId}))}}_writeLegacyData(){this.hasComments&&(jt.reset(),jt.addText(`<legacyDrawing r:id="${this._sheetCommentsWriter.vmlRelId}"/>`),this.stream.write(jt))}_writeDimensions(){}_writeCloseWorksheet(){this._write("</worksheet>")}};lW.exports=tC});var pW=w((XFe,dW)=>{var Sbe=Y("fs"),Ebe=YU(),fW=yf(),Ma=es(),cW=mp(),Tbe=QU(),Cbe=Sv(),kbe=j0(),hW=wp(),Rbe=V0(),Abe=Y0(),Obe=xp(),Ibe=z0(),Nbe=uW(),Dbe=rS(),rC=class{constructor(e){e=e||{},this.created=e.created||new Date,this.modified=e.modified||this.created,this.creator=e.creator||"ExcelJS",this.lastModifiedBy=e.lastModifiedBy||"ExcelJS",this.lastPrinted=e.lastPrinted,this.useSharedStrings=e.useSharedStrings||!1,this.sharedStrings=new Tbe,this.styles=e.useStyles?new cW(!0):new cW.Mock(!0),this._definedNames=new Cbe,this._worksheets=[],this.views=[],this.zipOptions=e.zip,this.media=[],this.commentRefs=[],this.zip=Ebe("zip",this.zipOptions),e.stream?this.stream=e.stream:e.filename?this.stream=Sbe.createWriteStream(e.filename):this.stream=new fW,this.zip.pipe(this.stream),this.promise=Promise.all([this.addThemes(),this.addOfficeRels()])}get definedNames(){return this._definedNames}_openStream(e){let r=new fW({bufSize:65536,batch:!0});return this.zip.append(r,{name:e}),r.on("finish",()=>{r.emit("zipped")}),r}_commitWorksheets(){let e=function(i){return i.committed?Promise.resolve():new Promise(n=>{i.stream.on("zipped",()=>{n()}),i.commit()})},r=this._worksheets.map(e);return r.length?Promise.all(r):Promise.resolve()}async commit(){return await this.promise,await this.addMedia(),await this._commitWorksheets(),await Promise.all([this.addContentTypes(),this.addApp(),this.addCore(),this.addSharedStrings(),this.addStyles(),this.addWorkbookRels()]),await this.addWorkbook(),this._finalize()}get nextId(){let e;for(e=1;e<this._worksheets.length;e++)if(!this._worksheets[e])return e;return this._worksheets.length||1}addImage(e){let r=this.media.length,i=Object.assign({},e,{type:"image",name:`image${r}.${e.extension}`});return this.media.push(i),r}getImage(e){return this.media[e]}addWorksheet(e,r){r=r||{};let i=r.useSharedStrings!==void 0?r.useSharedStrings:this.useSharedStrings;r.tabColor&&(console.trace("tabColor option has moved to { properties: tabColor: {...} }"),r.properties=Object.assign({tabColor:r.tabColor},r.properties));let n=this.nextId;e=e||`sheet${n}`;let s=new Nbe({id:n,name:e,workbook:this,useSharedStrings:i,properties:r.properties,state:r.state,pageSetup:r.pageSetup,views:r.views,autoFilter:r.autoFilter,headerFooter:r.headerFooter});return this._worksheets[n]=s,s}getWorksheet(e){if(e===void 0)return this._worksheets.find(()=>!0);if(typeof e=="number")return this._worksheets[e];if(typeof e=="string")return this._worksheets.find(r=>r&&r.name===e)}addStyles(){return new Promise(e=>{this.zip.append(this.styles.xml,{name:"xl/styles.xml"}),e()})}addThemes(){return new Promise(e=>{this.zip.append(Dbe,{name:"xl/theme/theme1.xml"}),e()})}addOfficeRels(){return new Promise(e=>{let i=new hW().toXml([{Id:"rId1",Type:Ma.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:Ma.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:Ma.ExtenderProperties,Target:"docProps/app.xml"}]);this.zip.append(i,{name:"/_rels/.rels"}),e()})}addContentTypes(){return new Promise(e=>{let r={worksheets:this._worksheets.filter(Boolean),sharedStrings:this.sharedStrings,commentRefs:this.commentRefs,media:this.media},n=new Rbe().toXml(r);this.zip.append(n,{name:"[Content_Types].xml"}),e()})}addMedia(){return Promise.all(this.media.map(e=>{if(e.type==="image"){let r=`xl/media/${e.name}`;if(e.filename)return this.zip.file(e.filename,{name:r});if(e.buffer)return this.zip.append(e.buffer,{name:r});if(e.base64){let i=e.base64,n=i.substring(i.indexOf(",")+1);return this.zip.append(n,{name:r,base64:!0})}}throw new Error("Unsupported media")}))}addApp(){return new Promise(e=>{let r={worksheets:this._worksheets.filter(Boolean)},n=new Abe().toXml(r);this.zip.append(n,{name:"docProps/app.xml"}),e()})}addCore(){return new Promise(e=>{let i=new kbe().toXml(this);this.zip.append(i,{name:"docProps/core.xml"}),e()})}addSharedStrings(){return this.sharedStrings.count?new Promise(e=>{let i=new Ibe().toXml(this.sharedStrings);this.zip.append(i,{name:"/xl/sharedStrings.xml"}),e()}):Promise.resolve()}addWorkbookRels(){let e=1,r=[{Id:`rId${e++}`,Type:Ma.Styles,Target:"styles.xml"},{Id:`rId${e++}`,Type:Ma.Theme,Target:"theme/theme1.xml"}];return this.sharedStrings.count&&r.push({Id:`rId${e++}`,Type:Ma.SharedStrings,Target:"sharedStrings.xml"}),this._worksheets.forEach(i=>{i&&(i.rId=`rId${e++}`,r.push({Id:i.rId,Type:Ma.Worksheet,Target:`worksheets/sheet${i.id}.xml`}))}),new Promise(i=>{let s=new hW().toXml(r);this.zip.append(s,{name:"/xl/_rels/workbook.xml.rels"}),i()})}addWorkbook(){let{zip:e}=this,r={worksheets:this._worksheets.filter(Boolean),definedNames:this._definedNames.model,views:this.views,properties:{},calcProperties:{}};return new Promise(i=>{let n=new Obe;n.prepare(r),e.append(n.toXml(r),{name:"/xl/workbook.xml"}),i()})}_finalize(){return new Promise((e,r)=>{this.stream.on("error",r),this.stream.on("finish",()=>{e(this)}),this.zip.on("error",r),this.zip.finalize()})}};dW.exports=rC});var mW=w((VFe,gW)=>{"use strict";var iC=Y("events").listenerCount;iC=iC||function(t,e){var r=t&&t._events&&t._events[e];return Array.isArray(r)?r.length:typeof r=="function"?1:0};gW.exports=iC});var vW=w((GFe,yW)=>{yW.exports=function(e){var r=process&&process.version?process.version:"v5.0.0",i=r.split(".")[0].replace("v","");return i<6?new Buffer(e):Buffer.from(e)}});var wW=w(()=>{"use strict";var wc=vW();Buffer.prototype.indexOf||(Buffer.prototype.indexOf=function(t,e){e=e||0,typeof t=="string"||t instanceof String?t=wc(t):(typeof t=="number"||t instanceof Number)&&(t=wc([t]));for(var r=t.length,i=e;i<=this.length-r;i++){for(var n=!1,s=0;s<r;s++)if(this[i+s]!=t[s]){n=!0;break}if(!n)return i}return-1});function _W(t,e){typeof t=="string"||t instanceof String?t=wc(t):(typeof t=="number"||t instanceof Number)&&(t=wc([t]));var r=t.length;e=e||this.length-r;for(var i=e;i>=0;i--){for(var n=!1,s=0;s<r;s++)if(this[i+s]!=t[s]){n=!0;break}if(!n)return i}return-1}Buffer.prototype.lastIndexOf?wc("ABC").lastIndexOf("ABC")===-1&&(Buffer.prototype.lastIndexOf=_W):Buffer.prototype.lastIndexOf=_W});var EW=w((KFe,SW)=>{SW.exports=ur;function ur(t){if(!(this instanceof ur))return new ur(t);this.value=t}ur.prototype.get=function(t){for(var e=this.value,r=0;r<t.length;r++){var i=t[r];if(!Object.hasOwnProperty.call(e,i)){e=void 0;break}e=e[i]}return e};ur.prototype.set=function(t,e){for(var r=this.value,i=0;i<t.length-1;i++){var n=t[i];Object.hasOwnProperty.call(r,n)||(r[n]={}),r=r[n]}return r[t[i]]=e,e};ur.prototype.map=function(t){return bW(this.value,t,!0)};ur.prototype.forEach=function(t){return this.value=bW(this.value,t,!1),this.value};ur.prototype.reduce=function(t,e){var r=arguments.length===1,i=r?this.value:e;return this.forEach(function(n){(!this.isRoot||!r)&&(i=t.call(this,i,n))}),i};ur.prototype.deepEqual=function(t){if(arguments.length!==1)throw new Error("deepEqual requires exactly one object to compare against");var e=!0,r=t;return this.forEach(function(i){var n=(function(){e=!1}).bind(this);if(!this.isRoot){if(typeof r!="object")return n();r=r[this.key]}var s=r;this.post(function(){r=s});var a=function(h){return Object.prototype.toString.call(h)};if(this.circular)ur(t).get(this.circular.path)!==s&&n();else if(typeof s!=typeof i)n();else if(s===null||i===null||s===void 0||i===void 0)s!==i&&n();else if(s.__proto__!==i.__proto__)n();else if(s!==i){if(typeof s=="function")s instanceof RegExp?s.toString()!=i.toString()&&n():s!==i&&n();else if(typeof s=="object")if(a(i)==="[object Arguments]"||a(s)==="[object Arguments]")a(s)!==a(i)&&n();else if(s instanceof Date||i instanceof Date)(!(s instanceof Date)||!(i instanceof Date)||s.getTime()!==i.getTime())&&n();else{var o=Object.keys(s),u=Object.keys(i);if(o.length!==u.length)return n();for(var f=0;f<o.length;f++){var c=o[f];Object.hasOwnProperty.call(i,c)||n()}}}}),e};ur.prototype.paths=function(){var t=[];return this.forEach(function(e){t.push(this.path)}),t};ur.prototype.nodes=function(){var t=[];return this.forEach(function(e){t.push(this.node)}),t};ur.prototype.clone=function(){var t=[],e=[];return(function r(i){for(var n=0;n<t.length;n++)if(t[n]===i)return e[n];if(typeof i=="object"&&i!==null){var s=xW(i);return t.push(i),e.push(s),Object.keys(i).forEach(function(a){s[a]=r(i[a])}),t.pop(),e.pop(),s}else return i})(this.value)};function bW(t,e,r){var i=[],n=[],s=!0;return(function a(o){var u=r?xW(o):o,f={},c={node:u,node_:o,path:[].concat(i),parent:n.slice(-1)[0],key:i.slice(-1)[0],isRoot:i.length===0,level:i.length,circular:null,update:function(g){c.isRoot||(c.parent.node[c.key]=g),c.node=g},delete:function(){delete c.parent.node[c.key]},remove:function(){Array.isArray(c.parent.node)?c.parent.node.splice(c.key,1):delete c.parent.node[c.key]},before:function(g){f.before=g},after:function(g){f.after=g},pre:function(g){f.pre=g},post:function(g){f.post=g},stop:function(){s=!1}};if(!s)return c;if(typeof u=="object"&&u!==null){c.isLeaf=Object.keys(u).length==0;for(var h=0;h<n.length;h++)if(n[h].node_===o){c.circular=n[h];break}}else c.isLeaf=!0;c.notLeaf=!c.isLeaf,c.notRoot=!c.isRoot;var d=e.call(c,c.node);if(d!==void 0&&c.update&&c.update(d),f.before&&f.before.call(c,c.node),typeof c.node=="object"&&c.node!==null&&!c.circular){n.push(c);var p=Object.keys(c.node);p.forEach(function(g,y){i.push(g),f.pre&&f.pre.call(c,c.node[g],g);var v=a(c.node[g]);r&&Object.hasOwnProperty.call(c.node,g)&&(c.node[g]=v.node),v.isLast=y==p.length-1,v.isFirst=y==0,f.post&&f.post.call(c,v),i.pop()}),n.pop()}return f.after&&f.after.call(c,c.node),c})(t).node}Object.keys(ur.prototype).forEach(function(t){ur[t]=function(e){var r=[].slice.call(arguments,1),i=ur(e);return i[t].apply(i,r)}});function xW(t){if(typeof t=="object"&&t!==null){var e;return Array.isArray(t)?e=[]:t instanceof Date?e=new Date(t):t instanceof Boolean?e=new Boolean(t):t instanceof Number?e=new Number(t):t instanceof String?e=new String(t):e=Object.create(Object.getPrototypeOf(t)),Object.keys(t).forEach(function(r){e[r]=t[r]}),e}else return t}});var CW=w((QFe,TW)=>{var Fbe=EW(),Mbe=Y("events").EventEmitter;TW.exports=Bl;function Bl(t){var e=Bl.saw(t,{}),r=t.call(e.handlers,e);return r!==void 0&&(e.handlers=r),e.record(),e.chain()}Bl.light=function(e){var r=Bl.saw(e,{}),i=e.call(r.handlers,r);return i!==void 0&&(r.handlers=i),r.chain()};Bl.saw=function(t,e){var r=new Mbe;return r.handlers=e,r.actions=[],r.chain=function(){var i=Fbe(r.handlers).map(function(n){if(this.isRoot)return n;var s=this.path;typeof n=="function"&&this.update(function(){return r.actions.push({path:s,args:[].slice.call(arguments)}),i})});return process.nextTick(function(){r.emit("begin"),r.next()}),i},r.pop=function(){return r.actions.shift()},r.next=function(){var i=r.pop();if(!i)r.emit("end");else if(!i.trap){var n=r.handlers;i.path.forEach(function(s){n=n[s]}),n.apply(r.handlers,i.args)}},r.nest=function(i){var n=[].slice.call(arguments,1),s=!0;if(typeof i=="boolean"){var s=i;i=n.shift()}var a=Bl.saw(t,{}),o=t.call(a.handlers,a);o!==void 0&&(a.handlers=o),typeof r.step<"u"&&a.record(),i.apply(a.chain(),n),s!==!1&&a.on("end",r.next)},r.record=function(){Pbe(r)},["trap","down","jump"].forEach(function(i){r[i]=function(){throw new Error("To use the trap, down and jump features, please call record() first to start recording actions.")}}),r};function Pbe(t){t.step=0,t.pop=function(){return t.actions[t.step++]},t.trap=function(e,r){var i=Array.isArray(e)?e:[e];t.actions.push({path:i,step:t.step,cb:r,trap:!0})},t.down=function(e){var r=(Array.isArray(e)?e:[e]).join("/"),i=t.actions.slice(t.step).map(function(s){return s.trap&&s.step<=t.step?!1:s.path.join("/")==r}).indexOf(!0);i>=0?t.step+=i:t.step=t.actions.length;var n=t.actions[t.step-1];n&&n.trap?(t.step=n.step,n.cb()):t.next()},t.jump=function(e){t.step=e,t.next()}}});var RW=w((JFe,kW)=>{kW.exports=mr;function mr(t){if(!(this instanceof mr))return new mr(t);this.buffers=t||[],this.length=this.buffers.reduce(function(e,r){return e+r.length},0)}mr.prototype.push=function(){for(var t=0;t<arguments.length;t++)if(!Buffer.isBuffer(arguments[t]))throw new TypeError("Tried to push a non-buffer");for(var t=0;t<arguments.length;t++){var e=arguments[t];this.buffers.push(e),this.length+=e.length}return this.length};mr.prototype.unshift=function(){for(var t=0;t<arguments.length;t++)if(!Buffer.isBuffer(arguments[t]))throw new TypeError("Tried to unshift a non-buffer");for(var t=0;t<arguments.length;t++){var e=arguments[t];this.buffers.unshift(e),this.length+=e.length}return this.length};mr.prototype.copy=function(t,e,r,i){return this.slice(r,i).copy(t,e,0,i-r)};mr.prototype.splice=function(t,e){var r=this.buffers,i=t>=0?t:this.length-t,n=[].slice.call(arguments,2);e===void 0?e=this.length-i:e>this.length-i&&(e=this.length-i);for(var t=0;t<n.length;t++)this.length+=n[t].length;for(var s=new mr,a=0,o=0,u=0;u<r.length&&o+r[u].length<i;u++)o+=r[u].length;if(i-o>0){var f=i-o;if(f+e<r[u].length){s.push(r[u].slice(f,f+e));for(var c=r[u],h=new Buffer(f),t=0;t<f;t++)h[t]=c[t];for(var d=new Buffer(c.length-f-e),t=f+e;t<c.length;t++)d[t-e-f]=c[t];if(n.length>0){var p=n.slice();p.unshift(h),p.push(d),r.splice.apply(r,[u,1].concat(p)),u+=p.length,n=[]}else r.splice(u,1,h,d),u+=2}else s.push(r[u].slice(f)),r[u]=r[u].slice(0,f),u++}for(n.length>0&&(r.splice.apply(r,[u,0].concat(n)),u+=n.length);s.length<e;){var g=r[u],y=g.length,v=Math.min(y,e-s.length);v===y?(s.push(g),r.splice(u,1)):(s.push(g.slice(0,v)),r[u]=r[u].slice(v))}return this.length-=s.length,s};mr.prototype.slice=function(t,e){var r=this.buffers;e===void 0&&(e=this.length),t===void 0&&(t=0),e>this.length&&(e=this.length);for(var i=0,n=0;n<r.length&&i+r[n].length<=t;n++)i+=r[n].length;for(var s=new Buffer(e-t),a=0,o=n;a<e-t&&o<r.length;o++){var u=r[o].length,f=a===0?t-i:0,c=a+u>=e-t?Math.min(f+(e-t)-a,u):u;r[o].copy(s,a,f,c),a+=c-f}return s};mr.prototype.pos=function(t){if(t<0||t>=this.length)throw new Error("oob");for(var e=t,r=0,i=null;;){if(i=this.buffers[r],e<i.length)return{buf:r,offset:e};e-=i.length,r++}};mr.prototype.get=function(e){var r=this.pos(e);return this.buffers[r.buf].get(r.offset)};mr.prototype.set=function(e,r){var i=this.pos(e);return this.buffers[i.buf].set(i.offset,r)};mr.prototype.indexOf=function(t,e){if(typeof t=="string")t=new Buffer(t);else if(!(t instanceof Buffer))throw new Error("Invalid type for a search string");if(!t.length)return 0;if(!this.length)return-1;var r=0,i=0,n=0,s,a=0;if(e){var o=this.pos(e);r=o.buf,i=o.offset,a=e}for(;;){for(;i>=this.buffers[r].length;)if(i=0,r++,r>=this.buffers.length)return-1;var u=this.buffers[r][i];if(u==t[n]){if(n==0&&(s={i:r,j:i,pos:a}),n++,n==t.length)return s.pos}else n!=0&&(r=s.i,i=s.j,a=s.pos,n=0);i++,a++}};mr.prototype.toBuffer=function(){return this.slice()};mr.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)}});var OW=w((eMe,AW)=>{AW.exports=function(t){function e(i,n){var s=r.store,a=i.split(".");a.slice(0,-1).forEach(function(u){s[u]===void 0&&(s[u]={}),s=s[u]});var o=a[a.length-1];return arguments.length==1?s[o]:s[o]=n}var r={get:function(i){return e(i)},set:function(i,n){return e(i,n)},store:t||{}};return r}});var bc=w((Pa,MW)=>{var qbe=CW(),IW=Y("events").EventEmitter,Lbe=RW(),qm=OW(),Bbe=Y("stream").Stream;Pa=MW.exports=function(t,e){if(Buffer.isBuffer(t))return Pa.parse(t);var r=Pa.stream();return t&&t.pipe?t.pipe(r):t&&(t.on(e||"data",function(i){r.write(i)}),t.on("end",function(){r.end()})),r};Pa.stream=function(t){if(t)return Pa.apply(null,arguments);var e=null;function r(h,d,p){e={bytes:h,skip:p,cb:function(g){e=null,d(g)}},n()}var i=null;function n(){if(!e){c&&(f=!0);return}if(typeof e=="function")e();else{var h=i+e.bytes;if(o.length>=h){var d;i==null?(d=o.splice(0,h),e.skip||(d=d.slice())):(e.skip||(d=o.slice(i,h)),i=h),e.skip?e.cb():e.cb(d)}}}function s(h){function d(){f||h.next()}var p=FW(function(g,y){return function(v){r(g,function(b){u.set(v,y(b)),d()})}});return p.tap=function(g){h.nest(g,u.store)},p.into=function(g,y){u.get(g)||u.set(g,{});var v=u;u=qm(v.get(g)),h.nest(function(){y.apply(this,arguments),this.tap(function(){u=v})},u.store)},p.flush=function(){u.store={},d()},p.loop=function(g){var y=!1;h.nest(!1,function v(){this.vars=u.store,g.call(this,function(){y=!0,d()},u.store),this.tap(function(){y?h.next():v.call(this)}.bind(this))},u.store)},p.buffer=function(g,y){typeof y=="string"&&(y=u.get(y)),r(y,function(v){u.set(g,v),d()})},p.skip=function(g){typeof g=="string"&&(g=u.get(g)),r(g,function(){d()})},p.scan=function(y,v){if(typeof v=="string")v=new Buffer(v);else if(!Buffer.isBuffer(v))throw new Error("search must be a Buffer or a string");var b=0;e=function(){var k=o.indexOf(v,i+b),N=k-i-b;k!==-1?(e=null,i!=null?(u.set(y,o.slice(i,i+b+N)),i+=b+N+v.length):(u.set(y,o.slice(0,b+N)),o.splice(0,b+N+v.length)),d(),n()):N=Math.max(o.length-v.length-i-b,0),b+=N},n()},p.peek=function(g){i=0,h.nest(function(){g.call(this,u.store),this.tap(function(){i=null})})},p}var a=qbe.light(s);a.writable=!0;var o=Lbe();a.write=function(h){o.push(h),n()};var u=qm(),f=!1,c=!1;return a.end=function(){c=!0},a.pipe=Bbe.prototype.pipe,Object.getOwnPropertyNames(IW.prototype).forEach(function(h){a[h]=IW.prototype[h]}),a};Pa.parse=function(e){var r=FW(function(s,a){return function(o){if(i+s<=e.length){var u=e.slice(i,i+s);i+=s,n.set(o,a(u))}else n.set(o,null);return r}}),i=0,n=qm();return r.vars=n.store,r.tap=function(s){return s.call(r,n.store),r},r.into=function(s,a){n.get(s)||n.set(s,{});var o=n;return n=qm(o.get(s)),a.call(r,n.store),n=o,r},r.loop=function(s){for(var a=!1,o=function(){a=!0};a===!1;)s.call(r,o,n.store);return r},r.buffer=function(s,a){typeof a=="string"&&(a=n.get(a));var o=e.slice(i,Math.min(e.length,i+a));return i+=a,n.set(s,o),r},r.skip=function(s){return typeof s=="string"&&(s=n.get(s)),i+=s,r},r.scan=function(s,a){if(typeof a=="string")a=new Buffer(a);else if(!Buffer.isBuffer(a))throw new Error("search must be a Buffer or a string");n.set(s,null);for(var o=0;o+i<=e.length-a.length+1;o++){for(var u=0;u<a.length&&e[i+o+u]===a[u];u++);if(u===a.length)break}return n.set(s,e.slice(i,i+o)),i+=o+a.length,r},r.peek=function(s){var a=i;return s.call(r,n.store),i=a,r},r.flush=function(){return n.store={},r},r.eof=function(){return i>=e.length},r};function NW(t){for(var e=0,r=0;r<t.length;r++)e+=Math.pow(256,r)*t[r];return e}function DW(t){for(var e=0,r=0;r<t.length;r++)e+=Math.pow(256,t.length-r-1)*t[r];return e}function jbe(t){var e=DW(t);return(t[0]&128)==128&&(e-=Math.pow(256,t.length)),e}function $be(t){var e=NW(t);return(t[t.length-1]&128)==128&&(e-=Math.pow(256,t.length)),e}function FW(t){var e={};return[1,2,4,8].forEach(function(r){var i=r*8;e["word"+i+"le"]=e["word"+i+"lu"]=t(r,NW),e["word"+i+"ls"]=t(r,$be),e["word"+i+"be"]=e["word"+i+"bu"]=t(r,DW),e["word"+i+"bs"]=t(r,jbe)}),e.word8=e.word8u=e.word8be,e.word8s=e.word8bs,e}});var qa=w((tMe,aC)=>{var nC=(function(){"use strict";return this===void 0})();nC?aC.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:nC,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!!(!r||r.writable||r.set)}}:(PW={}.hasOwnProperty,qW={}.toString,LW={}.constructor.prototype,sC=function(t){var e=[];for(var r in t)PW.call(t,r)&&e.push(r);return e},BW=function(t,e){return{value:t[e]}},jW=function(t,e,r){return t[e]=r.value,t},$W=function(t){return t},UW=function(t){try{return Object(t).constructor.prototype}catch{return LW}},WW=function(t){try{return qW.call(t)==="[object Array]"}catch{return!1}},aC.exports={isArray:WW,keys:sC,names:sC,defineProperty:jW,getDescriptor:BW,freeze:$W,getPrototypeOf:UW,isES5:nC,propertyIsWritable:function(){return!0}});var PW,qW,LW,sC,BW,jW,$W,UW,WW});var Je=w((exports,module)=>{"use strict";var es5=qa(),canEvaluate=typeof navigator>"u",errorObj={e:{}},tryCatchTarget,globalObject=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:exports!==void 0?exports:null;function tryCatcher(){try{var t=tryCatchTarget;return tryCatchTarget=null,t.apply(this,arguments)}catch(e){return errorObj.e=e,errorObj}}function tryCatch(t){return tryCatchTarget=t,tryCatcher}var inherits=function(t,e){var r={}.hasOwnProperty;function i(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&n.charAt(n.length-1)!=="$"&&(this[n+"$"]=e.prototype[n])}return i.prototype=e.prototype,t.prototype=new i,t.prototype};function isPrimitive(t){return t==null||t===!0||t===!1||typeof t=="string"||typeof t=="number"}function isObject(t){return typeof t=="function"||typeof t=="object"&&t!==null}function maybeWrapAsError(t){return isPrimitive(t)?new Error(safeToString(t)):t}function withAppended(t,e){var r=t.length,i=new Array(r+1),n;for(n=0;n<r;++n)i[n]=t[n];return i[n]=e,i}function getDataPropertyOrDefault(t,e,r){if(es5.isES5){var i=Object.getOwnPropertyDescriptor(t,e);if(i!=null)return i.get==null&&i.set==null?i.value:r}else return{}.hasOwnProperty.call(t,e)?t[e]:void 0}function notEnumerableProp(t,e,r){if(isPrimitive(t))return t;var i={value:r,configurable:!0,enumerable:!1,writable:!0};return es5.defineProperty(t,e,i),t}function thrower(t){throw t}var inheritedDataKeys=(function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(n){for(var s=0;s<t.length;++s)if(t[s]===n)return!0;return!1};if(es5.isES5){var r=Object.getOwnPropertyNames;return function(n){for(var s=[],a=Object.create(null);n!=null&&!e(n);){var o;try{o=r(n)}catch{return s}for(var u=0;u<o.length;++u){var f=o[u];if(!a[f]){a[f]=!0;var c=Object.getOwnPropertyDescriptor(n,f);c!=null&&c.get==null&&c.set==null&&s.push(f)}}n=es5.getPrototypeOf(n)}return s}}else{var i={}.hasOwnProperty;return function(n){if(e(n))return[];var s=[];e:for(var a in n)if(i.call(n,a))s.push(a);else{for(var o=0;o<t.length;++o)if(i.call(t[o],a))continue e;s.push(a)}return s}}})(),thisAssignmentPattern=/this\s*\.\s*\S+\s*=/;function isClass(t){try{if(typeof t=="function"){var e=es5.names(t.prototype),r=es5.isES5&&e.length>1,i=e.length>0&&!(e.length===1&&e[0]==="constructor"),n=thisAssignmentPattern.test(t+"")&&es5.names(t).length>0;if(r||i||n)return!0}return!1}catch{return!1}}function toFastProperties(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;for(var l=8;l--;)new FakeConstructor;return obj}var rident=/^[a-z$_][a-z$_0-9]*$/i;function isIdentifier(t){return rident.test(t)}function filledRange(t,e,r){for(var i=new Array(t),n=0;n<t;++n)i[n]=e+n+r;return i}function safeToString(t){try{return t+""}catch{return"[no string representation]"}}function isError(t){return t!==null&&typeof t=="object"&&typeof t.message=="string"&&typeof t.name=="string"}function markAsOriginatingFromRejection(t){try{notEnumerableProp(t,"isOperational",!0)}catch{}}function originatesFromRejection(t){return t==null?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function canAttachTrace(t){return isError(t)&&es5.propertyIsWritable(t,"stack")}var ensureErrorObject=(function(){return"stack"in new Error?function(t){return canAttachTrace(t)?t:new Error(safeToString(t))}:function(t){if(canAttachTrace(t))return t;try{throw new Error(safeToString(t))}catch(e){return e}}})();function classString(t){return{}.toString.call(t)}function copyDescriptors(t,e,r){for(var i=es5.names(t),n=0;n<i.length;++n){var s=i[n];if(r(s))try{es5.defineProperty(e,s,es5.getDescriptor(t,s))}catch{}}}var asArray=function(t){return es5.isArray(t)?t:null};typeof Symbol<"u"&&Symbol.iterator&&(ArrayFrom=typeof Array.from=="function"?function(t){return Array.from(t)}:function(t){for(var e=[],r=t[Symbol.iterator](),i;!(i=r.next()).done;)e.push(i.value);return e},asArray=function(t){return es5.isArray(t)?t:t!=null&&typeof t[Symbol.iterator]=="function"?ArrayFrom(t):null});var ArrayFrom,isNode=typeof process<"u"&&classString(process).toLowerCase()==="[object process]",hasEnvVariables=typeof process<"u"&&typeof process.env<"u";function env(t){return hasEnvVariables?process.env[t]:void 0}function getNativePromise(){if(typeof Promise=="function")try{var t=new Promise(function(){});if({}.toString.call(t)==="[object Promise]")return Promise}catch{}}function domainBind(t,e){return t.bind(e)}var ret={isClass,isIdentifier,inheritedDataKeys,getDataPropertyOrDefault,thrower,isArray:es5.isArray,asArray,notEnumerableProp,isPrimitive,isObject,isError,canEvaluate,errorObj,tryCatch,inherits,withAppended,maybeWrapAsError,toFastProperties,filledRange,toString:safeToString,canAttachTrace,ensureErrorObject,originatesFromRejection,markAsOriginatingFromRejection,classString,copyDescriptors,hasDevTools:typeof chrome<"u"&&chrome&&typeof chrome.loadTimes=="function",isNode,hasEnvVariables,env,global:globalObject,getNativePromise,domainBind};ret.isRecentNode=ret.isNode&&(function(){var t=process.versions.node.split(".").map(Number);return t[0]===0&&t[1]>10||t[0]>0})();ret.isNode&&ret.toFastProperties(process);try{throw new Error}catch(t){ret.lastLineError=t}module.exports=ret});var GW=w((rMe,VW)=>{"use strict";var lC=Je(),La,Ube=function(){throw new Error(`No async scheduler available
36
+
37
+ See http://goo.gl/MqrFmX
38
+ `)},oC=lC.getNativePromise();lC.isNode&&typeof MutationObserver>"u"?(HW=global.setImmediate,zW=process.nextTick,La=lC.isRecentNode?function(t){HW.call(global,t)}:function(t){zW.call(process,t)}):typeof oC=="function"&&typeof oC.resolve=="function"?(XW=oC.resolve(),La=function(t){XW.then(t)}):typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova))?La=(function(){var t=document.createElement("div"),e={attributes:!0},r=!1,i=document.createElement("div"),n=new MutationObserver(function(){t.classList.toggle("foo"),r=!1});n.observe(i,e);var s=function(){r||(r=!0,i.classList.toggle("foo"))};return function(o){var u=new MutationObserver(function(){u.disconnect(),o()});u.observe(t,e),s()}})():typeof setImmediate<"u"?La=function(t){setImmediate(t)}:typeof setTimeout<"u"?La=function(t){setTimeout(t,0)}:La=Ube;var HW,zW,XW;VW.exports=La});var YW=w((iMe,ZW)=>{"use strict";function Wbe(t,e,r,i,n){for(var s=0;s<n;++s)r[s+i]=t[s+e],t[s+e]=void 0}function Es(t){this._capacity=t,this._length=0,this._front=0}Es.prototype._willBeOverCapacity=function(t){return this._capacity<t};Es.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var r=this._front+e&this._capacity-1;this[r]=t,this._length=e+1};Es.prototype.push=function(t,e,r){var i=this.length()+3;if(this._willBeOverCapacity(i)){this._pushOne(t),this._pushOne(e),this._pushOne(r);return}var n=this._front+i-3;this._checkCapacity(i);var s=this._capacity-1;this[n+0&s]=t,this[n+1&s]=e,this[n+2&s]=r,this._length=i};Es.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e};Es.prototype.length=function(){return this._length};Es.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)};Es.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var r=this._front,i=this._length,n=r+i&e-1;Wbe(this,0,this,e,n)};ZW.exports=Es});var iH=w((nMe,uC)=>{"use strict";var tH;try{throw new Error}catch(t){tH=t}var Hbe=GW(),KW=YW(),rH=Je();function Ut(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new KW(16),this._normalQueue=new KW(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=Hbe}Ut.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e};Ut.prototype.hasCustomScheduler=function(){return this._customScheduler};Ut.prototype.enableTrampoline=function(){this._trampolineEnabled=!0};Ut.prototype.disableTrampolineIfNecessary=function(){rH.hasDevTools&&(this._trampolineEnabled=!1)};Ut.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};Ut.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+`
39
+ `),process.exit(2)):this.throwLater(t)};Ut.prototype.throwLater=function(t,e){if(arguments.length===1&&(e=t,t=function(){throw e}),typeof setTimeout<"u")setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch{throw new Error(`No async scheduler available
40
+
41
+ See http://goo.gl/MqrFmX
42
+ `)}};function QW(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function JW(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function eH(t){this._normalQueue._pushOne(t),this._queueTick()}rH.hasDevTools?(Ut.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?QW.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},Ut.prototype.invoke=function(t,e,r){this._trampolineEnabled?JW.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},Ut.prototype.settlePromises=function(t){this._trampolineEnabled?eH.call(this,t):this._schedule(function(){t._settlePromises()})}):(Ut.prototype.invokeLater=QW,Ut.prototype.invoke=JW,Ut.prototype.settlePromises=eH);Ut.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if(typeof e!="function"){e._settlePromises();continue}var r=t.shift(),i=t.shift();e.call(r,i)}};Ut.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)};Ut.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))};Ut.prototype._reset=function(){this._isTickUsed=!1};uC.exports=Ut;uC.exports.firstLineError=tH});var bn=w((sMe,aH)=>{"use strict";var hC=qa(),zbe=hC.freeze,nH=Je(),sH=nH.inherits,$l=nH.notEnumerableProp;function Ul(t,e){function r(i){if(!(this instanceof r))return new r(i);$l(this,"message",typeof i=="string"?i:e),$l(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return sH(r,Error),r}var fC,cC,Xbe=Ul("Warning","warning"),Vbe=Ul("CancellationError","cancellation error"),Gbe=Ul("TimeoutError","timeout error"),Sc=Ul("AggregateError","aggregate error");try{fC=TypeError,cC=RangeError}catch{fC=Ul("TypeError","type error"),cC=Ul("RangeError","range error")}var Lm="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");for(jl=0;jl<Lm.length;++jl)typeof Array.prototype[Lm[jl]]=="function"&&(Sc.prototype[Lm[jl]]=Array.prototype[Lm[jl]]);var jl;hC.defineProperty(Sc.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});Sc.prototype.isOperational=!0;var Bm=0;Sc.prototype.toString=function(){var t=Array(Bm*4+1).join(" "),e=`
43
+ `+t+`AggregateError of:
44
+ `;Bm++,t=Array(Bm*4+1).join(" ");for(var r=0;r<this.length;++r){for(var i=this[r]===this?"[Circular AggregateError]":this[r]+"",n=i.split(`
45
+ `),s=0;s<n.length;++s)n[s]=t+n[s];i=n.join(`
46
+ `),e+=i+`
47
+ `}return Bm--,e};function xc(t){if(!(this instanceof xc))return new xc(t);$l(this,"name","OperationalError"),$l(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?($l(this,"message",t.message),$l(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}sH(xc,Error);var Ba=Error.__BluebirdErrorTypes__;Ba||(Ba=zbe({CancellationError:Vbe,TimeoutError:Gbe,OperationalError:xc,RejectionError:xc,AggregateError:Sc}),hC.defineProperty(Error,"__BluebirdErrorTypes__",{value:Ba,writable:!1,enumerable:!1,configurable:!1}));aH.exports={Error,TypeError:fC,RangeError:cC,CancellationError:Ba.CancellationError,OperationalError:Ba.OperationalError,TimeoutError:Ba.TimeoutError,AggregateError:Ba.AggregateError,Warning:Xbe}});var lH=w((aMe,oH)=>{"use strict";oH.exports=function(t,e){var r=Je(),i=r.errorObj,n=r.isObject;function s(h,d){if(n(h)){if(h instanceof t)return h;var p=o(h);if(p===i){d&&d._pushContext();var g=t.reject(p.e);return d&&d._popContext(),g}else if(typeof p=="function"){if(f(h)){var g=new t(e);return h._then(g._fulfill,g._reject,void 0,g,null),g}return c(h,p,d)}}return h}function a(h){return h.then}function o(h){try{return a(h)}catch(d){return i.e=d,i}}var u={}.hasOwnProperty;function f(h){try{return u.call(h,"_promise0")}catch{return!1}}function c(h,d,p){var g=new t(e),y=g;p&&p._pushContext(),g._captureStackTrace(),p&&p._popContext();var v=!0,b=r.tryCatch(d).call(h,k,N);v=!1,g&&b===i&&(g._rejectCallback(b.e,!0,!0),g=null);function k(E){g&&(g._resolveCallback(E),g=null)}function N(E){g&&(g._rejectCallback(E,v,!0),g=null)}return y}return s}});var fH=w((oMe,uH)=>{"use strict";uH.exports=function(t,e,r,i,n){var s=Je(),a=s.isArray;function o(f){switch(f){case-2:return[];case-3:return{}}}function u(f){var c=this._promise=new t(e);f instanceof t&&c._propagateFrom(f,3),c._setOnCancel(this),this._values=f,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.inherits(u,n),u.prototype.length=function(){return this._length},u.prototype.promise=function(){return this._promise},u.prototype._init=function f(c,h){var d=r(this._values,this._promise);if(d instanceof t){d=d._target();var p=d._bitField;if(this._values=d,(p&50397184)===0)return this._promise._setAsyncGuaranteed(),d._then(f,this._reject,void 0,this,h);if((p&33554432)!==0)d=d._value();else return(p&16777216)!==0?this._reject(d._reason()):this._cancel()}if(d=s.asArray(d),d===null){var g=i("expecting an array or an iterable object but got "+s.classString(d)).reason();this._promise._rejectCallback(g,!1);return}if(d.length===0){h===-5?this._resolveEmptyArray():this._resolve(o(h));return}this._iterate(d)},u.prototype._iterate=function(f){var c=this.getActualLength(f.length);this._length=c,this._values=this.shouldCopyValues()?new Array(c):this._values;for(var h=this._promise,d=!1,p=null,g=0;g<c;++g){var y=r(f[g],h);y instanceof t?(y=y._target(),p=y._bitField):p=null,d?p!==null&&y.suppressUnhandledRejections():p!==null?(p&50397184)===0?(y._proxy(this,g),this._values[g]=y):(p&33554432)!==0?d=this._promiseFulfilled(y._value(),g):(p&16777216)!==0?d=this._promiseRejected(y._reason(),g):d=this._promiseCancelled(g):d=this._promiseFulfilled(y,g)}d||h._setAsyncGuaranteed()},u.prototype._isResolved=function(){return this._values===null},u.prototype._resolve=function(f){this._values=null,this._promise._fulfill(f)},u.prototype._cancel=function(){this._isResolved()||!this._promise._isCancellable()||(this._values=null,this._promise._cancel())},u.prototype._reject=function(f){this._values=null,this._promise._rejectCallback(f,!1)},u.prototype._promiseFulfilled=function(f,c){this._values[c]=f;var h=++this._totalResolved;return h>=this._length?(this._resolve(this._values),!0):!1},u.prototype._promiseCancelled=function(){return this._cancel(),!0},u.prototype._promiseRejected=function(f){return this._totalResolved++,this._reject(f),!0},u.prototype._resultCancelled=function(){if(!this._isResolved()){var f=this._values;if(this._cancel(),f instanceof t)f.cancel();else for(var c=0;c<f.length;++c)f[c]instanceof t&&f[c].cancel()}},u.prototype.shouldCopyValues=function(){return!0},u.prototype.getActualLength=function(f){return f},u}});var hH=w((lMe,cH)=>{"use strict";cH.exports=function(t){var e=!1,r=[];t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){};function i(){this._trace=new i.CapturedTrace(s())}i.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,r.push(this._trace))},i.prototype._popContext=function(){if(this._trace!==void 0){var a=r.pop(),o=a._promiseCreated;return a._promiseCreated=null,o}return null};function n(){if(e)return new i}function s(){var a=r.length-1;if(a>=0)return r[a]}return i.CapturedTrace=null,i.create=n,i.deactivateLongStackTraces=function(){},i.activateLongStackTraces=function(){var a=t.prototype._pushContext,o=t.prototype._popContext,u=t._peekContext,f=t.prototype._peekContext,c=t.prototype._promiseCreated;i.deactivateLongStackTraces=function(){t.prototype._pushContext=a,t.prototype._popContext=o,t._peekContext=u,t.prototype._peekContext=f,t.prototype._promiseCreated=c,e=!1},e=!0,t.prototype._pushContext=i.prototype._pushContext,t.prototype._popContext=i.prototype._popContext,t._peekContext=t.prototype._peekContext=s,t.prototype._promiseCreated=function(){var h=this._peekContext();h&&h._promiseCreated==null&&(h._promiseCreated=this)}},i}});var pH=w((uMe,dH)=>{"use strict";dH.exports=function(t,e){var r=t._getDomain,i=t._async,n=bn().Warning,s=Je(),a=s.canAttachTrace,o,u,f=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,c=/\((?:timers\.js):\d+:\d+\)/,h=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,d=null,p=null,g=!1,y,v=!!(s.env("BLUEBIRD_DEBUG")!=0&&(s.env("BLUEBIRD_DEBUG")||s.env("NODE_ENV")==="development")),b=!!(s.env("BLUEBIRD_WARNINGS")!=0&&(v||s.env("BLUEBIRD_WARNINGS"))),k=!!(s.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(v||s.env("BLUEBIRD_LONG_STACK_TRACES"))),N=s.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(b||!!s.env("BLUEBIRD_W_FORGOTTEN_RETURN"));t.prototype.suppressUnhandledRejections=function(){var W=this._target();W._bitField=W._bitField&-1048577|524288},t.prototype._ensurePossibleRejectionHandled=function(){(this._bitField&524288)===0&&(this._setRejectionIsUnhandled(),i.invokeLater(this._notifyUnhandledRejection,this,void 0))},t.prototype._notifyUnhandledRejectionIsHandled=function(){Br("rejectionHandled",o,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=this._bitField|268435456},t.prototype._returnedNonUndefined=function(){return(this._bitField&268435456)!==0},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var W=this._settledValue();this._setUnhandledRejectionIsNotified(),Br("unhandledRejection",u,W,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=this._bitField|262144},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},t.prototype._isUnhandledRejectionNotified=function(){return(this._bitField&262144)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0},t.prototype._warn=function(W,m,x){return Ye(W,m,x||this)},t.onPossiblyUnhandledRejection=function(W){var m=r();u=typeof W=="function"?m===null?W:s.domainBind(m,W):void 0},t.onUnhandledRejectionHandled=function(W){var m=r();o=typeof W=="function"?m===null?W:s.domainBind(m,W):void 0};var E=function(){};t.longStackTraces=function(){if(i.haveItemsQueued()&&!le.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created
48
+
49
+ See http://goo.gl/MqrFmX
50
+ `);if(!le.longStackTraces&&ri()){var W=t.prototype._captureStackTrace,m=t.prototype._attachExtraTrace;le.longStackTraces=!0,E=function(){if(i.haveItemsQueued()&&!le.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created
51
+
52
+ See http://goo.gl/MqrFmX
53
+ `);t.prototype._captureStackTrace=W,t.prototype._attachExtraTrace=m,e.deactivateLongStackTraces(),i.enableTrampoline(),le.longStackTraces=!1},t.prototype._captureStackTrace=re,t.prototype._attachExtraTrace=se,e.activateLongStackTraces(),i.disableTrampolineIfNecessary()}},t.hasLongStackTraces=function(){return le.longStackTraces&&ri()};var U=(function(){try{if(typeof CustomEvent=="function"){var W=new CustomEvent("CustomEvent");return s.global.dispatchEvent(W),function(m,x){var A=new CustomEvent(m.toLowerCase(),{detail:x,cancelable:!0});return!s.global.dispatchEvent(A)}}else if(typeof Event=="function"){var W=new Event("CustomEvent");return s.global.dispatchEvent(W),function(x,A){var D=new Event(x.toLowerCase(),{cancelable:!0});return D.detail=A,!s.global.dispatchEvent(D)}}else{var W=document.createEvent("CustomEvent");return W.initCustomEvent("testingtheevent",!1,!0,{}),s.global.dispatchEvent(W),function(x,A){var D=document.createEvent("CustomEvent");return D.initCustomEvent(x.toLowerCase(),!1,!0,A),!s.global.dispatchEvent(D)}}}catch{}return function(){return!1}})(),ee=(function(){return s.isNode?function(){return process.emit.apply(process,arguments)}:s.global?function(W){var m="on"+W.toLowerCase(),x=s.global[m];return x?(x.apply(s.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}})();function F(W,m){return{promise:m}}var L={promiseCreated:F,promiseFulfilled:F,promiseRejected:F,promiseResolved:F,promiseCancelled:F,promiseChained:function(W,m,x){return{promise:m,child:x}},warning:function(W,m){return{warning:m}},unhandledRejection:function(W,m,x){return{reason:m,promise:x}},rejectionHandled:F},I=function(W){var m=!1;try{m=ee.apply(null,arguments)}catch(A){i.throwLater(A),m=!0}var x=!1;try{x=U(W,L[W].apply(null,arguments))}catch(A){i.throwLater(A),x=!0}return x||m};t.config=function(W){if(W=Object(W),"longStackTraces"in W&&(W.longStackTraces?t.longStackTraces():!W.longStackTraces&&t.hasLongStackTraces()&&E()),"warnings"in W){var m=W.warnings;le.warnings=!!m,N=le.warnings,s.isObject(m)&&"wForgottenReturn"in m&&(N=!!m.wForgottenReturn)}if("cancellation"in W&&W.cancellation&&!le.cancellation){if(i.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=J,t.prototype._propagateFrom=T,t.prototype._onCancel=q,t.prototype._setOnCancel=B,t.prototype._attachCancellationCallback=O,t.prototype._execute=H,$=T,le.cancellation=!0}return"monitoring"in W&&(W.monitoring&&!le.monitoring?(le.monitoring=!0,t.prototype._fireEvent=I):!W.monitoring&&le.monitoring&&(le.monitoring=!1,t.prototype._fireEvent=Z)),t};function Z(){return!1}t.prototype._fireEvent=Z,t.prototype._execute=function(W,m,x){try{W(m,x)}catch(A){return A}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(W){},t.prototype._attachCancellationCallback=function(W){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(W,m){};function H(W,m,x){var A=this;try{W(m,x,function(D){if(typeof D!="function")throw new TypeError("onCancel must be a function, got: "+s.toString(D));A._attachCancellationCallback(D)})}catch(D){return D}}function O(W){if(!this._isCancellable())return this;var m=this._onCancel();m!==void 0?s.isArray(m)?m.push(W):this._setOnCancel([m,W]):this._setOnCancel(W)}function q(){return this._onCancelField}function B(W){this._onCancelField=W}function J(){this._cancellationParent=void 0,this._onCancelField=void 0}function T(W,m){if((m&1)!==0){this._cancellationParent=W;var x=W._branchesRemainingToCancel;x===void 0&&(x=0),W._branchesRemainingToCancel=x+1}(m&2)!==0&&W._isBound()&&this._setBoundTo(W._boundTo)}function M(W,m){(m&2)!==0&&W._isBound()&&this._setBoundTo(W._boundTo)}var $=M;function z(){var W=this._boundTo;return W!==void 0&&W instanceof t?W.isFulfilled()?W.value():void 0:W}function re(){this._trace=new kr(this._peekContext())}function se(W,m){if(a(W)){var x=this._trace;if(x!==void 0&&m&&(x=x._parent),x!==void 0)x.attachExtraTrace(W);else if(!W.__stackCleaned__){var A=pt(W);s.notEnumerableProp(W,"stack",A.message+`
54
+ `+A.stack.join(`
55
+ `)),s.notEnumerableProp(W,"__stackCleaned__",!0)}}}function ue(W,m,x,A,D){if(W===void 0&&m!==null&&N){if(D!==void 0&&D._returnedNonUndefined()||(A._bitField&65535)===0)return;x&&(x=x+" ");var X="",j="";if(m._trace){for(var V=m._trace.stack.split(`
56
+ `),Q=Ae(V),ne=Q.length-1;ne>=0;--ne){var he=Q[ne];if(!c.test(he)){var we=he.match(h);we&&(X="at "+we[1]+":"+we[2]+":"+we[3]+" ");break}}if(Q.length>0){for(var ve=Q[0],ne=0;ne<V.length;++ne)if(V[ne]===ve){ne>0&&(j=`
57
+ `+V[ne-1]);break}}}var Ce="a promise was created in a "+x+"handler "+X+"but was not returned from it, see http://goo.gl/rRqMUw"+j;A._warn(Ce,!0,m)}}function pe(W,m){var x=W+" is deprecated and will be removed in a future version.";return m&&(x+=" Use "+m+" instead."),Ye(x)}function Ye(W,m,x){if(le.warnings){var A=new n(W),D;if(m)x._attachExtraTrace(A);else if(le.longStackTraces&&(D=t._peekContext()))D.attachExtraTrace(A);else{var X=pt(A);A.stack=X.message+`
58
+ `+X.stack.join(`
59
+ `)}I("warning",A)||Nt(A,"",!0)}}function Se(W,m){for(var x=0;x<m.length-1;++x)m[x].push("From previous event:"),m[x]=m[x].join(`
60
+ `);return x<m.length&&(m[x]=m[x].join(`
61
+ `)),W+`
62
+ `+m.join(`
63
+ `)}function Be(W){for(var m=0;m<W.length;++m)(W[m].length===0||m+1<W.length&&W[m][0]===W[m+1][0])&&(W.splice(m,1),m--)}function je(W){for(var m=W[0],x=1;x<W.length;++x){for(var A=W[x],D=m.length-1,X=m[D],j=-1,V=A.length-1;V>=0;--V)if(A[V]===X){j=V;break}for(var V=j;V>=0;--V){var Q=A[V];if(m[D]===Q)m.pop(),D--;else break}m=A}}function Ae(W){for(var m=[],x=0;x<W.length;++x){var A=W[x],D=A===" (No stack trace)"||d.test(A),X=D&&jr(A);D&&!X&&(g&&A.charAt(0)!==" "&&(A=" "+A),m.push(A))}return m}function Ke(W){for(var m=W.stack.replace(/\s+$/g,"").split(`
64
+ `),x=0;x<m.length;++x){var A=m[x];if(A===" (No stack trace)"||d.test(A))break}return x>0&&W.name!="SyntaxError"&&(m=m.slice(x)),m}function pt(W){var m=W.stack,x=W.toString();return m=typeof m=="string"&&m.length>0?Ke(W):[" (No stack trace)"],{message:x,stack:W.name=="SyntaxError"?m:Ae(m)}}function Nt(W,m,x){if(typeof console<"u"){var A;if(s.isObject(W)){var D=W.stack;A=m+p(D,W)}else A=m+String(W);typeof y=="function"?y(A,x):(typeof console.log=="function"||typeof console.log=="object")&&console.log(A)}}function Br(W,m,x,A){var D=!1;try{typeof m=="function"&&(D=!0,W==="rejectionHandled"?m(A):m(x,A))}catch(X){i.throwLater(X)}W==="unhandledRejection"?!I(W,x,A)&&!D&&Nt(x,"Unhandled rejection "):I(W,A)}function ti(W){var m;if(typeof W=="function")m="[function "+(W.name||"anonymous")+"]";else{m=W&&typeof W.toString=="function"?W.toString():s.toString(W);var x=/\[object [a-zA-Z0-9$_]+\]/;if(x.test(m))try{var A=JSON.stringify(W);m=A}catch{}m.length===0&&(m="(empty array)")}return"(<"+Ui(m)+">, no stack trace)"}function Ui(W){var m=41;return W.length<m?W:W.substr(0,m-3)+"..."}function ri(){return typeof On=="function"}var jr=function(){return!1},Wi=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Cr(W){var m=W.match(Wi);if(m)return{fileName:m[1],line:parseInt(m[2],10)}}function Ka(W,m){if(ri()){for(var x=W.stack.split(`
65
+ `),A=m.stack.split(`
66
+ `),D=-1,X=-1,j,V,Q=0;Q<x.length;++Q){var ne=Cr(x[Q]);if(ne){j=ne.fileName,D=ne.line;break}}for(var Q=0;Q<A.length;++Q){var ne=Cr(A[Q]);if(ne){V=ne.fileName,X=ne.line;break}}D<0||X<0||!j||!V||j!==V||D>=X||(jr=function(he){if(f.test(he))return!0;var we=Cr(he);return!!(we&&we.fileName===j&&D<=we.line&&we.line<=X)})}}function kr(W){this._parent=W,this._promisesCreated=0;var m=this._length=1+(W===void 0?0:W._length);On(this,kr),m>32&&this.uncycle()}s.inherits(kr,Error),e.CapturedTrace=kr,kr.prototype.uncycle=function(){var W=this._length;if(!(W<2)){for(var m=[],x={},A=0,D=this;D!==void 0;++A)m.push(D),D=D._parent;W=this._length=A;for(var A=W-1;A>=0;--A){var X=m[A].stack;x[X]===void 0&&(x[X]=A)}for(var A=0;A<W;++A){var j=m[A].stack,V=x[j];if(V!==void 0&&V!==A){V>0&&(m[V-1]._parent=void 0,m[V-1]._length=1),m[A]._parent=void 0,m[A]._length=1;var Q=A>0?m[A-1]:this;V<W-1?(Q._parent=m[V+1],Q._parent.uncycle(),Q._length=Q._parent._length+1):(Q._parent=void 0,Q._length=1);for(var ne=Q._length+1,he=A-2;he>=0;--he)m[he]._length=ne,ne++;return}}}},kr.prototype.attachExtraTrace=function(W){if(!W.__stackCleaned__){this.uncycle();for(var m=pt(W),x=m.message,A=[m.stack],D=this;D!==void 0;)A.push(Ae(D.stack.split(`
67
+ `))),D=D._parent;je(A),Be(A),s.notEnumerableProp(W,"stack",Se(x,A)),s.notEnumerableProp(W,"__stackCleaned__",!0)}};var On=(function(){var m=/^\s*at\s*/,x=function(j,V){return typeof j=="string"?j:V.name!==void 0&&V.message!==void 0?V.toString():ti(V)};if(typeof Error.stackTraceLimit=="number"&&typeof Error.captureStackTrace=="function"){Error.stackTraceLimit+=6,d=m,p=x;var A=Error.captureStackTrace;return jr=function(j){return f.test(j)},function(j,V){Error.stackTraceLimit+=6,A(j,V),Error.stackTraceLimit-=6}}var D=new Error;if(typeof D.stack=="string"&&D.stack.split(`
68
+ `)[0].indexOf("stackDetection@")>=0)return d=/@/,p=x,g=!0,function(V){V.stack=new Error().stack};var X;try{throw new Error}catch(j){X="stack"in j}return!("stack"in D)&&X&&typeof Error.stackTraceLimit=="number"?(d=m,p=x,function(V){Error.stackTraceLimit+=6;try{throw new Error}catch(Q){V.stack=Q.stack}Error.stackTraceLimit-=6}):(p=function(j,V){return typeof j=="string"?j:(typeof V=="object"||typeof V=="function")&&V.name!==void 0&&V.message!==void 0?V.toString():ti(V)},null)})([]);typeof console<"u"&&typeof console.warn<"u"&&(y=function(W){console.warn(W)},s.isNode&&process.stderr.isTTY?y=function(W,m){var x=m?"\x1B[33m":"\x1B[31m";console.warn(x+W+`\x1B[0m
69
+ `)}:!s.isNode&&typeof new Error().stack=="string"&&(y=function(W,m){console.warn("%c"+W,m?"color: darkorange":"color: red")}));var le={warnings:b,longStackTraces:!1,cancellation:!1,monitoring:!1};return k&&t.longStackTraces(),{longStackTraces:function(){return le.longStackTraces},warnings:function(){return le.warnings},cancellation:function(){return le.cancellation},monitoring:function(){return le.monitoring},propagateFromFunction:function(){return $},boundValueFunction:function(){return z},checkForgottenReturns:ue,setBounds:Ka,warn:Ye,deprecated:pe,CapturedTrace:kr,fireDomEvent:U,fireGlobalEvent:ee}}});var mH=w((fMe,gH)=>{"use strict";gH.exports=function(t,e){var r=Je(),i=t.CancellationError,n=r.errorObj;function s(h,d,p){this.promise=h,this.type=d,this.handler=p,this.called=!1,this.cancelPromise=null}s.prototype.isFinallyHandler=function(){return this.type===0};function a(h){this.finallyHandler=h}a.prototype._resultCancelled=function(){o(this.finallyHandler)};function o(h,d){return h.cancelPromise!=null?(arguments.length>1?h.cancelPromise._reject(d):h.cancelPromise._cancel(),h.cancelPromise=null,!0):!1}function u(){return c.call(this,this.promise._target()._settledValue())}function f(h){if(!o(this,h))return n.e=h,n}function c(h){var d=this.promise,p=this.handler;if(!this.called){this.called=!0;var g=this.isFinallyHandler()?p.call(d._boundValue()):p.call(d._boundValue(),h);if(g!==void 0){d._setReturnedNonUndefined();var y=e(g,d);if(y instanceof t){if(this.cancelPromise!=null)if(y._isCancelled()){var v=new i("late cancellation observer");return d._attachExtraTrace(v),n.e=v,n}else y.isPending()&&y._attachCancellationCallback(new a(this));return y._then(u,f,void 0,this,void 0)}}}return d.isRejected()?(o(this),n.e=h,n):(o(this),h)}return t.prototype._passThrough=function(h,d,p,g){return typeof h!="function"?this.then():this._then(p,g,void 0,new s(this,d,h),void 0)},t.prototype.lastly=t.prototype.finally=function(h){return this._passThrough(h,0,c,c)},t.prototype.tap=function(h){return this._passThrough(h,1,c)},s}});var vH=w((cMe,yH)=>{"use strict";yH.exports=function(t){var e=Je(),r=qa().keys,i=e.tryCatch,n=e.errorObj;function s(a,o,u){return function(f){var c=u._boundValue();e:for(var h=0;h<a.length;++h){var d=a[h];if(d===Error||d!=null&&d.prototype instanceof Error){if(f instanceof d)return i(o).call(c,f)}else if(typeof d=="function"){var p=i(d).call(c,f);if(p===n)return p;if(p)return i(o).call(c,f)}else if(e.isObject(f)){for(var g=r(d),y=0;y<g.length;++y){var v=g[y];if(d[v]!=f[v])continue e}return i(o).call(c,f)}}return t}}return s}});var dC=w((hMe,bH)=>{"use strict";var _H=Je(),Zbe=_H.maybeWrapAsError,Ybe=bn(),Kbe=Ybe.OperationalError,wH=qa();function Qbe(t){return t instanceof Error&&wH.getPrototypeOf(t)===Error.prototype}var Jbe=/^(?:name|message|stack|cause)$/;function exe(t){var e;if(Qbe(t)){e=new Kbe(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var r=wH.keys(t),i=0;i<r.length;++i){var n=r[i];Jbe.test(n)||(e[n]=t[n])}return e}return _H.markAsOriginatingFromRejection(t),t}function txe(t,e){return function(r,i){if(t!==null){if(r){var n=exe(Zbe(r));t._attachExtraTrace(n),t._reject(n)}else if(!e)t._fulfill(i);else{for(var s=arguments.length,a=new Array(Math.max(s-1,0)),o=1;o<s;++o)a[o-1]=arguments[o];t._fulfill(a)}t=null}}}bH.exports=txe});var SH=w((dMe,xH)=>{"use strict";xH.exports=function(t,e,r,i,n){var s=Je(),a=s.tryCatch;t.method=function(o){if(typeof o!="function")throw new t.TypeError("expecting a function but got "+s.classString(o));return function(){var u=new t(e);u._captureStackTrace(),u._pushContext();var f=a(o).apply(this,arguments),c=u._popContext();return n.checkForgottenReturns(f,c,"Promise.method",u),u._resolveFromSyncValue(f),u}},t.attempt=t.try=function(o){if(typeof o!="function")return i("expecting a function but got "+s.classString(o));var u=new t(e);u._captureStackTrace(),u._pushContext();var f;if(arguments.length>1){n.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],h=arguments[2];f=s.isArray(c)?a(o).apply(h,c):a(o).call(h,c)}else f=a(o)();var d=u._popContext();return n.checkForgottenReturns(f,d,"Promise.try",u),u._resolveFromSyncValue(f),u},t.prototype._resolveFromSyncValue=function(o){o===s.errorObj?this._rejectCallback(o.e,!1):this._resolveCallback(o,!0)}}});var TH=w((pMe,EH)=>{"use strict";EH.exports=function(t,e,r,i){var n=!1,s=function(f,c){this._reject(c)},a=function(f,c){c.promiseRejectionQueued=!0,c.bindingPromise._then(s,s,null,this,f)},o=function(f,c){(this._bitField&50397184)===0&&this._resolveCallback(c.target)},u=function(f,c){c.promiseRejectionQueued||this._reject(f)};t.prototype.bind=function(f){n||(n=!0,t.prototype._propagateFrom=i.propagateFromFunction(),t.prototype._boundValue=i.boundValueFunction());var c=r(f),h=new t(e);h._propagateFrom(this,1);var d=this._target();if(h._setBoundTo(c),c instanceof t){var p={promiseRejectionQueued:!1,promise:h,target:d,bindingPromise:c};d._then(e,a,void 0,h,p),c._then(o,u,void 0,h,p),h._setOnCancel(c)}else h._resolveCallback(d);return h},t.prototype._setBoundTo=function(f){f!==void 0?(this._bitField=this._bitField|2097152,this._boundTo=f):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return(this._bitField&2097152)===2097152},t.bind=function(f,c){return t.resolve(c).bind(f)}}});var kH=w((gMe,CH)=>{"use strict";CH.exports=function(t,e,r,i){var n=Je(),s=n.tryCatch,a=n.errorObj,o=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var u=this,f=u;u._isCancellable();){if(!u._cancelBy(f)){f._isFollowing()?f._followee().cancel():f._cancelBranched();break}var c=u._cancellationParent;if(c==null||!c._isCancellable()){u._isFollowing()?u._followee().cancel():u._cancelBranched();break}else u._isFollowing()&&u._followee().cancel(),u._setWillBeCancelled(),f=u,u=c}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(u){return u===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),o.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(u,f){if(n.isArray(u))for(var c=0;c<u.length;++c)this._doInvokeOnCancel(u[c],f);else if(u!==void 0)if(typeof u=="function"){if(!f){var h=s(u).call(this._boundValue());h===a&&(this._attachExtraTrace(h.e),o.throwLater(h.e))}}else u._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var u=this._onCancel();this._unsetOnCancel(),o.invoke(this._doInvokeOnCancel,this,u)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}});var AH=w((mMe,RH)=>{"use strict";RH.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(i){return i instanceof t&&i.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:i},void 0)},t.prototype.throw=t.prototype.thenThrow=function(i){return this._then(r,void 0,void 0,{reason:i},void 0)},t.prototype.catchThrow=function(i){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:i},void 0);var n=arguments[1],s=function(){throw n};return this.caught(i,s)},t.prototype.catchReturn=function(i){if(arguments.length<=1)return i instanceof t&&i.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:i},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();var s=function(){return n};return this.caught(i,s)}}});var IH=w((yMe,OH)=>{"use strict";OH.exports=function(t){function e(u){u!==void 0?(u=u._target(),this._bitField=u._bitField,this._settledValueField=u._isFateSealed()?u._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise
70
+
71
+ See http://goo.gl/MqrFmX
72
+ `);return this._settledValue()},i=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise
73
+
74
+ See http://goo.gl/MqrFmX
75
+ `);return this._settledValue()},n=e.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},s=e.prototype.isRejected=function(){return(this._bitField&16777216)!==0},a=e.prototype.isPending=function(){return(this._bitField&50397184)===0},o=e.prototype.isResolved=function(){return(this._bitField&50331648)!==0};e.prototype.isCancelled=function(){return(this._bitField&8454144)!==0},t.prototype.__isCancelled=function(){return(this._bitField&65536)===65536},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return s.call(this._target())},t.prototype.isFulfilled=function(){return n.call(this._target())},t.prototype.isResolved=function(){return o.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var u=this._target();return u._unsetRejectionIsUnhandled(),i.call(u)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}});var DH=w((vMe,NH)=>{"use strict";NH.exports=function(t,e,r,i,n,s){var a=Je(),o=a.canEvaluate,u=a.tryCatch,f=a.errorObj,c;if(o){for(var h=function(k){return new Function("value","holder",`
76
+ 'use strict';
77
+ holder.pIndex = value;
78
+ holder.checkFulfillment(this);
79
+ `.replace(/Index/g,k))},d=function(k){return new Function("promise","holder",`
80
+ 'use strict';
81
+ holder.pIndex = promise;
82
+ `.replace(/Index/g,k))},p=function(k){for(var N=new Array(k),E=0;E<N.length;++E)N[E]="this.p"+(E+1);var U=N.join(" = ")+" = null;",ee=`var promise;
83
+ `+N.map(function(Z){return`
84
+ promise = `+Z+`;
85
+ if (promise instanceof Promise) {
86
+ promise.cancel();
87
+ }
88
+ `}).join(`
89
+ `),F=N.join(", "),L="Holder$"+k,I=`return function(tryCatch, errorObj, Promise, async) {
90
+ 'use strict';
91
+ function [TheName](fn) {
92
+ [TheProperties]
93
+ this.fn = fn;
94
+ this.asyncNeeded = true;
95
+ this.now = 0;
96
+ }
97
+
98
+ [TheName].prototype._callFunction = function(promise) {
99
+ promise._pushContext();
100
+ var ret = tryCatch(this.fn)([ThePassedArguments]);
101
+ promise._popContext();
102
+ if (ret === errorObj) {
103
+ promise._rejectCallback(ret.e, false);
104
+ } else {
105
+ promise._resolveCallback(ret);
106
+ }
107
+ };
108
+
109
+ [TheName].prototype.checkFulfillment = function(promise) {
110
+ var now = ++this.now;
111
+ if (now === [TheTotal]) {
112
+ if (this.asyncNeeded) {
113
+ async.invoke(this._callFunction, this, promise);
114
+ } else {
115
+ this._callFunction(promise);
116
+ }
117
+
118
+ }
119
+ };
120
+
121
+ [TheName].prototype._resultCancelled = function() {
122
+ [CancellationCode]
123
+ };
124
+
125
+ return [TheName];
126
+ }(tryCatch, errorObj, Promise, async);
127
+ `;return I=I.replace(/\[TheName\]/g,L).replace(/\[TheTotal\]/g,k).replace(/\[ThePassedArguments\]/g,F).replace(/\[TheProperties\]/g,U).replace(/\[CancellationCode\]/g,ee),new Function("tryCatch","errorObj","Promise","async",I)(u,f,t,n)},g=[],y=[],v=[],b=0;b<8;++b)g.push(p(b+1)),y.push(h(b+1)),v.push(d(b+1));c=function(k){this._reject(k)}}t.join=function(){var k=arguments.length-1,N;if(k>0&&typeof arguments[k]=="function"&&(N=arguments[k],k<=8&&o)){var B=new t(i);B._captureStackTrace();for(var E=g[k-1],U=new E(N),ee=y,F=0;F<k;++F){var L=r(arguments[F],B);if(L instanceof t){L=L._target();var I=L._bitField;(I&50397184)===0?(L._then(ee[F],c,void 0,B,U),v[F](L,U),U.asyncNeeded=!1):(I&33554432)!==0?ee[F].call(B,L._value(),U):(I&16777216)!==0?B._reject(L._reason()):B._cancel()}else ee[F].call(B,L,U)}if(!B._isFateSealed()){if(U.asyncNeeded){var Z=s();Z!==null&&(U.fn=a.domainBind(Z,U.fn))}B._setAsyncGuaranteed(),B._setOnCancel(U)}return B}for(var H=arguments.length,O=new Array(H),q=0;q<H;++q)O[q]=arguments[q];N&&O.pop();var B=new e(O).promise();return N!==void 0?B.spread(N):B}}});var MH=w((_Me,FH)=>{"use strict";FH.exports=function(t,e,r,i,n,s){var a=t._getDomain,o=Je(),u=o.tryCatch,f=o.errorObj,c=t._async;function h(p,g,y,v){this.constructor$(p),this._promise._captureStackTrace();var b=a();this._callback=b===null?g:o.domainBind(b,g),this._preservedValues=v===n?new Array(this.length()):null,this._limit=y,this._inFlight=0,this._queue=[],c.invoke(this._asyncInit,this,void 0)}o.inherits(h,e),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(p,g){var y=this._values,v=this.length(),b=this._preservedValues,k=this._limit;if(g<0){if(g=g*-1-1,y[g]=p,k>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(k>=1&&this._inFlight>=k)return y[g]=p,this._queue.push(g),!1;b!==null&&(b[g]=p);var N=this._promise,E=this._callback,U=N._boundValue();N._pushContext();var ee=u(E).call(U,p,g,v),F=N._popContext();if(s.checkForgottenReturns(ee,F,b!==null?"Promise.filter":"Promise.map",N),ee===f)return this._reject(ee.e),!0;var L=i(ee,this._promise);if(L instanceof t){L=L._target();var I=L._bitField;if((I&50397184)===0)return k>=1&&this._inFlight++,y[g]=L,L._proxy(this,(g+1)*-1),!1;if((I&33554432)!==0)ee=L._value();else return(I&16777216)!==0?(this._reject(L._reason()),!0):(this._cancel(),!0)}y[g]=ee}var Z=++this._totalResolved;return Z>=v?(b!==null?this._filter(y,b):this._resolve(y),!0):!1},h.prototype._drainQueue=function(){for(var p=this._queue,g=this._limit,y=this._values;p.length>0&&this._inFlight<g;){if(this._isResolved())return;var v=p.pop();this._promiseFulfilled(y[v],v)}},h.prototype._filter=function(p,g){for(var y=g.length,v=new Array(y),b=0,k=0;k<y;++k)p[k]&&(v[b++]=g[k]);v.length=b,this._resolve(v)},h.prototype.preservedValues=function(){return this._preservedValues};function d(p,g,y,v){if(typeof g!="function")return r("expecting a function but got "+o.classString(g));var b=0;if(y!==void 0)if(typeof y=="object"&&y!==null){if(typeof y.concurrency!="number")return t.reject(new TypeError("'concurrency' must be a number but it is "+o.classString(y.concurrency)));b=y.concurrency}else return t.reject(new TypeError("options argument must be an object but it is "+o.classString(y)));return b=typeof b=="number"&&isFinite(b)&&b>=1?b:0,new h(p,g,b,v).promise()}t.prototype.map=function(p,g){return d(this,p,g,null)},t.map=function(p,g,y,v){return d(p,g,y,v)}}});var qH=w((wMe,PH)=>{"use strict";var pC=Object.create;pC&&(gC=pC(null),mC=pC(null),gC[" size"]=mC[" size"]=0);var gC,mC;PH.exports=function(t){var e=Je(),r=e.canEvaluate,i=e.isIdentifier,n,s,a=function(p){return new Function("ensureMethod",`
128
+ return function(obj) {
129
+ 'use strict'
130
+ var len = this.length;
131
+ ensureMethod(obj, 'methodName');
132
+ switch(len) {
133
+ case 1: return obj.methodName(this[0]);
134
+ case 2: return obj.methodName(this[0], this[1]);
135
+ case 3: return obj.methodName(this[0], this[1], this[2]);
136
+ case 0: return obj.methodName();
137
+ default:
138
+ return obj.methodName.apply(obj, this);
139
+ }
140
+ };
141
+ `.replace(/methodName/g,p))(f)},o=function(p){return new Function("obj",`
142
+ 'use strict';
143
+ return obj.propertyName;
144
+ `.replace("propertyName",p))},u=function(p,g,y){var v=y[p];if(typeof v!="function"){if(!i(p))return null;if(v=g(p),y[p]=v,y[" size"]++,y[" size"]>512){for(var b=Object.keys(y),k=0;k<256;++k)delete y[b[k]];y[" size"]=b.length-256}}return v};n=function(p){return u(p,a,gC)},s=function(p){return u(p,o,mC)};function f(p,g){var y;if(p!=null&&(y=p[g]),typeof y!="function"){var v="Object "+e.classString(p)+" has no method '"+e.toString(g)+"'";throw new t.TypeError(v)}return y}function c(p){var g=this.pop(),y=f(p,g);return y.apply(p,this)}t.prototype.call=function(p){for(var g=arguments.length,y=new Array(Math.max(g-1,0)),v=1;v<g;++v)y[v-1]=arguments[v];if(r){var b=n(p);if(b!==null)return this._then(b,void 0,void 0,y,void 0)}return y.push(p),this._then(c,void 0,void 0,y,void 0)};function h(p){return p[this]}function d(p){var g=+this;return g<0&&(g=Math.max(0,g+p.length)),p[g]}t.prototype.get=function(p){var g=typeof p=="number",y;if(g)y=d;else if(r){var v=s(p);y=v!==null?v:h}else y=h;return this._then(y,void 0,void 0,p,void 0)}}});var BH=w((bMe,LH)=>{"use strict";LH.exports=function(t,e,r,i,n,s){var a=Je(),o=bn().TypeError,u=Je().inherits,f=a.errorObj,c=a.tryCatch,h={};function d(N){setTimeout(function(){throw N},0)}function p(N){var E=r(N);return E!==N&&typeof N._isDisposable=="function"&&typeof N._getDisposer=="function"&&N._isDisposable()&&E._setDisposable(N._getDisposer()),E}function g(N,E){var U=0,ee=N.length,F=new t(n);function L(){if(U>=ee)return F._fulfill();var I=p(N[U++]);if(I instanceof t&&I._isDisposable()){try{I=r(I._getDisposer().tryDispose(E),N.promise)}catch(Z){return d(Z)}if(I instanceof t)return I._then(L,d,null,null,null)}L()}return L(),F}function y(N,E,U){this._data=N,this._promise=E,this._context=U}y.prototype.data=function(){return this._data},y.prototype.promise=function(){return this._promise},y.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},y.prototype.tryDispose=function(N){var E=this.resource(),U=this._context;U!==void 0&&U._pushContext();var ee=E!==h?this.doDispose(E,N):null;return U!==void 0&&U._popContext(),this._promise._unsetDisposable(),this._data=null,ee},y.isDisposer=function(N){return N!=null&&typeof N.resource=="function"&&typeof N.tryDispose=="function"};function v(N,E,U){this.constructor$(N,E,U)}u(v,y),v.prototype.doDispose=function(N,E){var U=this.data();return U.call(N,N,E)};function b(N){return y.isDisposer(N)?(this.resources[this.index]._setDisposable(N),N.promise()):N}function k(N){this.length=N,this.promise=null,this[N-1]=null}k.prototype._resultCancelled=function(){for(var N=this.length,E=0;E<N;++E){var U=this[E];U instanceof t&&U.cancel()}},t.using=function(){var N=arguments.length;if(N<2)return e("you must pass at least 2 arguments to Promise.using");var E=arguments[N-1];if(typeof E!="function")return e("expecting a function but got "+a.classString(E));var U,ee=!0;N===2&&Array.isArray(arguments[0])?(U=arguments[0],N=U.length,ee=!1):(U=arguments,N--);for(var F=new k(N),L=0;L<N;++L){var I=U[L];if(y.isDisposer(I)){var Z=I;I=I.promise(),I._setDisposable(Z)}else{var H=r(I);H instanceof t&&(I=H._then(b,null,null,{resources:F,index:L},void 0))}F[L]=I}for(var O=new Array(F.length),L=0;L<O.length;++L)O[L]=t.resolve(F[L]).reflect();var q=t.all(O).then(function(J){for(var T=0;T<J.length;++T){var M=J[T];if(M.isRejected())return f.e=M.error(),f;if(!M.isFulfilled()){q.cancel();return}J[T]=M.value()}B._pushContext(),E=c(E);var $=ee?E.apply(void 0,J):E(J),z=B._popContext();return s.checkForgottenReturns($,z,"Promise.using",B),$}),B=q.lastly(function(){var J=new t.PromiseInspection(q);return g(F,J)});return F.promise=B,B._setOnCancel(F),B},t.prototype._setDisposable=function(N){this._bitField=this._bitField|131072,this._disposer=N},t.prototype._isDisposable=function(){return(this._bitField&131072)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},t.prototype.disposer=function(N){if(typeof N=="function")return new v(N,this,i());throw new o}}});var $H=w((xMe,jH)=>{"use strict";jH.exports=function(t,e,r){var i=Je(),n=t.TimeoutError;function s(h){this.handle=h}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(h){return o(+this).thenReturn(h)},o=t.delay=function(h,d){var p,g;return d!==void 0?(p=t.resolve(d)._then(a,null,null,h,void 0),r.cancellation()&&d instanceof t&&p._setOnCancel(d)):(p=new t(e),g=setTimeout(function(){p._fulfill()},+h),r.cancellation()&&p._setOnCancel(new s(g)),p._captureStackTrace()),p._setAsyncGuaranteed(),p};t.prototype.delay=function(h){return o(h,this)};var u=function(h,d,p){var g;typeof d!="string"?d instanceof Error?g=d:g=new n("operation timed out"):g=new n(d),i.markAsOriginatingFromRejection(g),h._attachExtraTrace(g),h._reject(g),p?.cancel()};function f(h){return clearTimeout(this.handle),h}function c(h){throw clearTimeout(this.handle),h}t.prototype.timeout=function(h,d){h=+h;var p,g,y=new s(setTimeout(function(){p.isPending()&&u(p,d,g)},h));return r.cancellation()?(g=this.then(),p=g._then(f,c,void 0,y,void 0),p._setOnCancel(y)):p=this._then(f,c,void 0,y,void 0),p}}});var WH=w((SMe,UH)=>{"use strict";UH.exports=function(t,e,r,i,n,s){var a=bn(),o=a.TypeError,u=Je(),f=u.errorObj,c=u.tryCatch,h=[];function d(g,y,v){for(var b=0;b<y.length;++b){v._pushContext();var k=c(y[b])(g);if(v._popContext(),k===f){v._pushContext();var N=t.reject(f.e);return v._popContext(),N}var E=i(k,v);if(E instanceof t)return E}return null}function p(g,y,v,b){if(s.cancellation()){var k=new t(r),N=this._finallyPromise=new t(r);this._promise=k.lastly(function(){return N}),k._captureStackTrace(),k._setOnCancel(this)}else{var E=this._promise=new t(r);E._captureStackTrace()}this._stack=b,this._generatorFunction=g,this._receiver=y,this._generator=void 0,this._yieldHandlers=typeof v=="function"?[v].concat(h):h,this._yieldedPromise=null,this._cancellationPhase=!1}u.inherits(p,n),p.prototype._isResolved=function(){return this._promise===null},p.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&this._finallyPromise!==null&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},p.prototype._promiseCancelled=function(){if(!this._isResolved()){var g=typeof this._generator.return<"u",y;if(g)this._promise._pushContext(),y=c(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var v=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=v,this._promise._attachExtraTrace(v),this._promise._pushContext(),y=c(this._generator.throw).call(this._generator,v),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(y)}},p.prototype._promiseFulfilled=function(g){this._yieldedPromise=null,this._promise._pushContext();var y=c(this._generator.next).call(this._generator,g);this._promise._popContext(),this._continue(y)},p.prototype._promiseRejected=function(g){this._yieldedPromise=null,this._promise._attachExtraTrace(g),this._promise._pushContext();var y=c(this._generator.throw).call(this._generator,g);this._promise._popContext(),this._continue(y)},p.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var g=this._yieldedPromise;this._yieldedPromise=null,g.cancel()}},p.prototype.promise=function(){return this._promise},p.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},p.prototype._continue=function(g){var y=this._promise;if(g===f)return this._cleanup(),this._cancellationPhase?y.cancel():y._rejectCallback(g.e,!1);var v=g.value;if(g.done===!0)return this._cleanup(),this._cancellationPhase?y.cancel():y._resolveCallback(v);var b=i(v,this._promise);if(!(b instanceof t)&&(b=d(b,this._yieldHandlers,this._promise),b===null)){this._promiseRejected(new o(`A value %s was yielded that could not be treated as a promise
145
+
146
+ See http://goo.gl/MqrFmX
147
+
148
+ `.replace("%s",v)+`From coroutine:
149
+ `+this._stack.split(`
150
+ `).slice(1,-7).join(`
151
+ `)));return}b=b._target();var k=b._bitField;(k&50397184)===0?(this._yieldedPromise=b,b._proxy(this,null)):(k&33554432)!==0?t._async.invoke(this._promiseFulfilled,this,b._value()):(k&16777216)!==0?t._async.invoke(this._promiseRejected,this,b._reason()):this._promiseCancelled()},t.coroutine=function(g,y){if(typeof g!="function")throw new o(`generatorFunction must be a function
152
+
153
+ See http://goo.gl/MqrFmX
154
+ `);var v=Object(y).yieldHandler,b=p,k=new Error().stack;return function(){var N=g.apply(this,arguments),E=new b(void 0,void 0,v,k),U=E.promise();return E._generator=N,E._promiseFulfilled(void 0),U}},t.coroutine.addYieldHandler=function(g){if(typeof g!="function")throw new o("expecting a function but got "+u.classString(g));h.push(g)},t.spawn=function(g){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),typeof g!="function")return e(`generatorFunction must be a function
155
+
156
+ See http://goo.gl/MqrFmX
157
+ `);var y=new p(g,this),v=y.promise();return y._run(t.spawn),v}}});var zH=w((EMe,HH)=>{"use strict";HH.exports=function(t){var e=Je(),r=t._async,i=e.tryCatch,n=e.errorObj;function s(u,f){var c=this;if(!e.isArray(u))return a.call(c,u,f);var h=i(f).apply(c._boundValue(),[null].concat(u));h===n&&r.throwLater(h.e)}function a(u,f){var c=this,h=c._boundValue(),d=u===void 0?i(f).call(h,null):i(f).call(h,null,u);d===n&&r.throwLater(d.e)}function o(u,f){var c=this;if(!u){var h=new Error(u+"");h.cause=u,u=h}var d=i(f).call(c._boundValue(),u);d===n&&r.throwLater(d.e)}t.prototype.asCallback=t.prototype.nodeify=function(u,f){if(typeof u=="function"){var c=a;f!==void 0&&Object(f).spread&&(c=s),this._then(c,o,void 0,this,u)}return this}}});var VH=w((TMe,XH)=>{"use strict";XH.exports=function(t,e){var r={},i=Je(),n=dC(),s=i.withAppended,a=i.maybeWrapAsError,o=i.canEvaluate,u=bn().TypeError,f="Async",c={__isPromisified__:!0},h=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],d=new RegExp("^(?:"+h.join("|")+")$"),p=function(q){return i.isIdentifier(q)&&q.charAt(0)!=="_"&&q!=="constructor"};function g(q){return!d.test(q)}function y(q){try{return q.__isPromisified__===!0}catch{return!1}}function v(q,B,J){var T=i.getDataPropertyOrDefault(q,B+J,c);return T?y(T):!1}function b(q,B,J){for(var T=0;T<q.length;T+=2){var M=q[T];if(J.test(M)){for(var $=M.replace(J,""),z=0;z<q.length;z+=2)if(q[z]===$)throw new u(`Cannot promisify an API that has normal methods with '%s'-suffix
158
+
159
+ See http://goo.gl/MqrFmX
160
+ `.replace("%s",B))}}}function k(q,B,J,T){for(var M=i.inheritedDataKeys(q),$=[],z=0;z<M.length;++z){var re=M[z],se=q[re],ue=T===p?!0:p(re,se,q);typeof se=="function"&&!y(se)&&!v(q,re,B)&&T(re,se,q,ue)&&$.push(re,se)}return b($,B,J),$}var N=function(q){return q.replace(/([$])/,"\\$")},E,U=function(q){for(var B=[q],J=Math.max(0,q-1-3),T=q-1;T>=J;--T)B.push(T);for(var T=q+1;T<=3;++T)B.push(T);return B},ee=function(q){return i.filledRange(q,"_arg","")},F=function(q){return i.filledRange(Math.max(q,3),"_arg","")},L=function(q){return typeof q.length=="number"?Math.max(Math.min(q.length,1024),0):0};E=function(q,B,J,T,M,$){var z=Math.max(0,L(T)-1),re=U(z),se=typeof q=="string"||B===r;function ue(Be){var je=ee(Be).join(", "),Ae=Be>0?", ":"",Ke;return se?Ke=`ret = callback.call(this, {{args}}, nodeback); break;
161
+ `:Ke=B===void 0?`ret = callback({{args}}, nodeback); break;
162
+ `:`ret = callback.call(receiver, {{args}}, nodeback); break;
163
+ `,Ke.replace("{{args}}",je).replace(", ",Ae)}function pe(){for(var Be="",je=0;je<re.length;++je)Be+="case "+re[je]+":"+ue(re[je]);return Be+=`
164
+ default:
165
+ var args = new Array(len + 1);
166
+ var i = 0;
167
+ for (var i = 0; i < len; ++i) {
168
+ args[i] = arguments[i];
169
+ }
170
+ args[i] = nodeback;
171
+ [CodeForCall]
172
+ break;
173
+ `.replace("[CodeForCall]",se?`ret = callback.apply(this, args);
174
+ `:`ret = callback.apply(receiver, args);
175
+ `),Be}var Ye=typeof q=="string"?"this != null ? this['"+q+"'] : fn":"fn",Se=`'use strict';
176
+ var ret = function (Parameters) {
177
+ 'use strict';
178
+ var len = arguments.length;
179
+ var promise = new Promise(INTERNAL);
180
+ promise._captureStackTrace();
181
+ var nodeback = nodebackForPromise(promise, `+$+`);
182
+ var ret;
183
+ var callback = tryCatch([GetFunctionCode]);
184
+ switch(len) {
185
+ [CodeForSwitchCase]
186
+ }
187
+ if (ret === errorObj) {
188
+ promise._rejectCallback(maybeWrapAsError(ret.e), true, true);
189
+ }
190
+ if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
191
+ return promise;
192
+ };
193
+ notEnumerableProp(ret, '__isPromisified__', true);
194
+ return ret;
195
+ `.replace("[CodeForSwitchCase]",pe()).replace("[GetFunctionCode]",Ye);return Se=Se.replace("Parameters",F(z)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",Se)(t,T,B,s,a,n,i.tryCatch,i.errorObj,i.notEnumerableProp,e)};function I(q,B,J,T,M,$){var z=(function(){return this})(),re=q;typeof re=="string"&&(q=T);function se(){var ue=B;B===r&&(ue=this);var pe=new t(e);pe._captureStackTrace();var Ye=typeof re=="string"&&this!==z?this[re]:q,Se=n(pe,$);try{Ye.apply(ue,s(arguments,Se))}catch(Be){pe._rejectCallback(a(Be),!0,!0)}return pe._isFateSealed()||pe._setAsyncGuaranteed(),pe}return i.notEnumerableProp(se,"__isPromisified__",!0),se}var Z=o?E:I;function H(q,B,J,T,M){for(var $=new RegExp(N(B)+"$"),z=k(q,B,$,J),re=0,se=z.length;re<se;re+=2){var ue=z[re],pe=z[re+1],Ye=ue+B;if(T===Z)q[Ye]=Z(ue,r,ue,pe,B,M);else{var Se=T(pe,function(){return Z(ue,r,ue,pe,B,M)});i.notEnumerableProp(Se,"__isPromisified__",!0),q[Ye]=Se}}return i.toFastProperties(q),q}function O(q,B,J){return Z(q,B,void 0,q,null,J)}t.promisify=function(q,B){if(typeof q!="function")throw new u("expecting a function but got "+i.classString(q));if(y(q))return q;B=Object(B);var J=B.context===void 0?r:B.context,T=!!B.multiArgs,M=O(q,J,T);return i.copyDescriptors(q,M,g),M},t.promisifyAll=function(q,B){if(typeof q!="function"&&typeof q!="object")throw new u(`the target of promisifyAll must be an object or a function
196
+
197
+ See http://goo.gl/MqrFmX
198
+ `);B=Object(B);var J=!!B.multiArgs,T=B.suffix;typeof T!="string"&&(T=f);var M=B.filter;typeof M!="function"&&(M=p);var $=B.promisifier;if(typeof $!="function"&&($=Z),!i.isIdentifier(T))throw new RangeError(`suffix must be a valid identifier
199
+
200
+ See http://goo.gl/MqrFmX
201
+ `);for(var z=i.inheritedDataKeys(q),re=0;re<z.length;++re){var se=q[z[re]];z[re]!=="constructor"&&i.isClass(se)&&(H(se.prototype,T,M,$,J),H(se,T,M,$,J))}return H(q,T,M,$,J)}}});var ZH=w((CMe,GH)=>{"use strict";GH.exports=function(t,e,r,i){var n=Je(),s=n.isObject,a=qa(),o;typeof Map=="function"&&(o=Map);var u=(function(){var d=0,p=0;function g(y,v){this[d]=y,this[d+p]=v,d++}return function(v){p=v.size,d=0;var b=new Array(v.size*2);return v.forEach(g,b),b}})(),f=function(d){for(var p=new o,g=d.length/2|0,y=0;y<g;++y){var v=d[g+y],b=d[y];p.set(v,b)}return p};function c(d){var p=!1,g;if(o!==void 0&&d instanceof o)g=u(d),p=!0;else{var y=a.keys(d),v=y.length;g=new Array(v*2);for(var b=0;b<v;++b){var k=y[b];g[b]=d[k],g[b+v]=k}}this.constructor$(g),this._isMap=p,this._init$(void 0,-3)}n.inherits(c,e),c.prototype._init=function(){},c.prototype._promiseFulfilled=function(d,p){this._values[p]=d;var g=++this._totalResolved;if(g>=this._length){var y;if(this._isMap)y=f(this._values);else{y={};for(var v=this.length(),b=0,k=this.length();b<k;++b)y[this._values[b+v]]=this._values[b]}return this._resolve(y),!0}return!1},c.prototype.shouldCopyValues=function(){return!1},c.prototype.getActualLength=function(d){return d>>1};function h(d){var p,g=r(d);if(s(g))g instanceof t?p=g._then(t.props,void 0,void 0,void 0,void 0):p=new c(g).promise();else return i(`cannot await properties of a non-object
202
+
203
+ See http://goo.gl/MqrFmX
204
+ `);return g instanceof t&&p._propagateFrom(g,2),p}t.prototype.props=function(){return h(this)},t.props=function(d){return h(d)}}});var KH=w((kMe,YH)=>{"use strict";YH.exports=function(t,e,r,i){var n=Je(),s=function(o){return o.then(function(u){return a(u,o)})};function a(o,u){var f=r(o);if(f instanceof t)return s(f);if(o=n.asArray(o),o===null)return i("expecting an array or an iterable object but got "+n.classString(o));var c=new t(e);u!==void 0&&c._propagateFrom(u,3);for(var h=c._fulfill,d=c._reject,p=0,g=o.length;p<g;++p){var y=o[p];y===void 0&&!(p in o)||t.cast(y)._then(h,d,void 0,c,null)}return c}t.race=function(o){return a(o,void 0)},t.prototype.race=function(){return a(this,void 0)}}});var JH=w((RMe,QH)=>{"use strict";QH.exports=function(t,e,r,i,n,s){var a=t._getDomain,o=Je(),u=o.tryCatch;function f(g,y,v,b){this.constructor$(g);var k=a();this._fn=k===null?y:o.domainBind(k,y),v!==void 0&&(v=t.resolve(v),v._attachCancellationCallback(this)),this._initialValue=v,this._currentCancellable=null,b===n?this._eachValues=Array(this._length):b===0?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}o.inherits(f,e),f.prototype._gotAccum=function(g){this._eachValues!==void 0&&this._eachValues!==null&&g!==n&&this._eachValues.push(g)},f.prototype._eachComplete=function(g){return this._eachValues!==null&&this._eachValues.push(g),this._eachValues},f.prototype._init=function(){},f.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},f.prototype.shouldCopyValues=function(){return!1},f.prototype._resolve=function(g){this._promise._resolveCallback(g),this._values=null},f.prototype._resultCancelled=function(g){if(g===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},f.prototype._iterate=function(g){this._values=g;var y,v,b=g.length;if(this._initialValue!==void 0?(y=this._initialValue,v=0):(y=t.resolve(g[0]),v=1),this._currentCancellable=y,!y.isRejected())for(;v<b;++v){var k={accum:null,value:g[v],index:v,length:b,array:this};y=y._then(d,void 0,void 0,k,void 0)}this._eachValues!==void 0&&(y=y._then(this._eachComplete,void 0,void 0,this,void 0)),y._then(c,c,void 0,y,this)},t.prototype.reduce=function(g,y){return h(this,g,y,null)},t.reduce=function(g,y,v,b){return h(g,y,v,b)};function c(g,y){this.isFulfilled()?y._resolve(g):y._reject(g)}function h(g,y,v,b){if(typeof y!="function")return r("expecting a function but got "+o.classString(y));var k=new f(g,y,v,b);return k.promise()}function d(g){this.accum=g,this.array._gotAccum(g);var y=i(this.value,this.array._promise);return y instanceof t?(this.array._currentCancellable=y,y._then(p,void 0,void 0,this,void 0)):p.call(this,y)}function p(g){var y=this.array,v=y._promise,b=u(y._fn);v._pushContext();var k;y._eachValues!==void 0?k=b.call(v._boundValue(),g,this.index,this.length):k=b.call(v._boundValue(),this.accum,g,this.index,this.length),k instanceof t&&(y._currentCancellable=k);var N=v._popContext();return s.checkForgottenReturns(k,N,y._eachValues!==void 0?"Promise.each":"Promise.reduce",v),k}}});var tz=w((AMe,ez)=>{"use strict";ez.exports=function(t,e,r){var i=t.PromiseInspection,n=Je();function s(a){this.constructor$(a)}n.inherits(s,e),s.prototype._promiseResolved=function(a,o){this._values[a]=o;var u=++this._totalResolved;return u>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseFulfilled=function(a,o){var u=new i;return u._bitField=33554432,u._settledValueField=a,this._promiseResolved(o,u)},s.prototype._promiseRejected=function(a,o){var u=new i;return u._bitField=16777216,u._settledValueField=a,this._promiseResolved(o,u)},t.settle=function(a){return r.deprecated(".settle()",".reflect()"),new s(a).promise()},t.prototype.settle=function(){return t.settle(this)}}});var iz=w((OMe,rz)=>{"use strict";rz.exports=function(t,e,r){var i=Je(),n=bn().RangeError,s=bn().AggregateError,a=i.isArray,o={};function u(c){this.constructor$(c),this._howMany=0,this._unwrap=!1,this._initialized=!1}i.inherits(u,e),u.prototype._init=function(){if(this._initialized){if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var c=a(this._values);!this._isResolved()&&c&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},u.prototype.init=function(){this._initialized=!0,this._init()},u.prototype.setUnwrap=function(){this._unwrap=!0},u.prototype.howMany=function(){return this._howMany},u.prototype.setHowMany=function(c){this._howMany=c},u.prototype._promiseFulfilled=function(c){return this._addFulfilled(c),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},u.prototype._promiseRejected=function(c){return this._addRejected(c),this._checkOutcome()},u.prototype._promiseCancelled=function(){return this._values instanceof t||this._values==null?this._cancel():(this._addRejected(o),this._checkOutcome())},u.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var c=new s,h=this.length();h<this._values.length;++h)this._values[h]!==o&&c.push(this._values[h]);return c.length>0?this._reject(c):this._cancel(),!0}return!1},u.prototype._fulfilled=function(){return this._totalResolved},u.prototype._rejected=function(){return this._values.length-this.length()},u.prototype._addRejected=function(c){this._values.push(c)},u.prototype._addFulfilled=function(c){this._values[this._totalResolved++]=c},u.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},u.prototype._getRangeError=function(c){var h="Input array must contain at least "+this._howMany+" items but contains only "+c+" items";return new n(h)},u.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function f(c,h){if((h|0)!==h||h<0)return r(`expecting a positive integer
205
+
206
+ See http://goo.gl/MqrFmX
207
+ `);var d=new u(c),p=d.promise();return d.setHowMany(h),d.init(),p}t.some=function(c,h){return f(c,h)},t.prototype.some=function(c){return f(this,c)},t._SomePromiseArray=u}});var sz=w((IMe,nz)=>{"use strict";nz.exports=function(t,e){var r=t.map;t.prototype.filter=function(i,n){return r(this,i,n,e)},t.filter=function(i,n,s){return r(i,n,s,e)}}});var oz=w((NMe,az)=>{"use strict";az.exports=function(t,e){var r=t.reduce,i=t.all;function n(){return i(this)}function s(a,o){return r(a,o,e,e)}t.prototype.each=function(a){return r(this,a,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(a){return r(this,a,e,e)},t.each=function(a,o){return r(a,o,e,0)._then(n,void 0,void 0,a,void 0)},t.mapSeries=s}});var uz=w((DMe,lz)=>{"use strict";lz.exports=function(t){var e=t._SomePromiseArray;function r(i){var n=new e(i),s=n.promise();return n.setHowMany(1),n.setUnwrap(),n.init(),s}t.any=function(i){return r(i)},t.prototype.any=function(){return r(this)}}});var fz=w((FMe,yC)=>{"use strict";yC.exports=function(){var t=function(){return new h(`circular promise resolution chain
208
+
209
+ See http://goo.gl/MqrFmX
210
+ `)},e=function(){return new O.PromiseInspection(this._target())},r=function(T){return O.reject(new h(T))};function i(){}var n={},s=Je(),a;s.isNode?a=function(){var T=process.domain;return T===void 0&&(T=null),T}:a=function(){return null},s.notEnumerableProp(O,"_getDomain",a);var o=qa(),u=iH(),f=new u;o.defineProperty(O,"_async",{value:f});var c=bn(),h=O.TypeError=c.TypeError;O.RangeError=c.RangeError;var d=O.CancellationError=c.CancellationError;O.TimeoutError=c.TimeoutError,O.OperationalError=c.OperationalError,O.RejectionError=c.OperationalError,O.AggregateError=c.AggregateError;var p=function(){},g={},y={},v=lH()(O,p),b=fH()(O,p,v,r,i),k=hH()(O),N=k.create,E=pH()(O,k),U=E.CapturedTrace,ee=mH()(O,v),F=vH()(y),L=dC(),I=s.errorObj,Z=s.tryCatch;function H(T,M){if(typeof M!="function")throw new h("expecting a function but got "+s.classString(M));if(T.constructor!==O)throw new h(`the promise constructor cannot be invoked directly
211
+
212
+ See http://goo.gl/MqrFmX
213
+ `)}function O(T){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,T!==p&&(H(this,T),this._resolveFromExecutor(T)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}O.prototype.toString=function(){return"[object Promise]"},O.prototype.caught=O.prototype.catch=function(T){var M=arguments.length;if(M>1){var $=new Array(M-1),z=0,re;for(re=0;re<M-1;++re){var se=arguments[re];if(s.isObject(se))$[z++]=se;else return r("expecting an object but got A catch statement predicate "+s.classString(se))}return $.length=z,T=arguments[re],this.then(void 0,F($,T,this))}return this.then(void 0,T)},O.prototype.reflect=function(){return this._then(e,e,void 0,this,void 0)},O.prototype.then=function(T,M){if(E.warnings()&&arguments.length>0&&typeof T!="function"&&typeof M!="function"){var $=".then() only accepts functions but was passed: "+s.classString(T);arguments.length>1&&($+=", "+s.classString(M)),this._warn($)}return this._then(T,M,void 0,void 0,void 0)},O.prototype.done=function(T,M){var $=this._then(T,M,void 0,void 0,void 0);$._setIsFinal()},O.prototype.spread=function(T){return typeof T!="function"?r("expecting a function but got "+s.classString(T)):this.all()._then(T,void 0,void 0,g,void 0)},O.prototype.toJSON=function(){var T={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(T.fulfillmentValue=this.value(),T.isFulfilled=!0):this.isRejected()&&(T.rejectionReason=this.reason(),T.isRejected=!0),T},O.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new b(this).promise()},O.prototype.error=function(T){return this.caught(s.originatesFromRejection,T)},O.getNewLibraryCopy=yC.exports,O.is=function(T){return T instanceof O},O.fromNode=O.fromCallback=function(T){var M=new O(p);M._captureStackTrace();var $=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,z=Z(T)(L(M,$));return z===I&&M._rejectCallback(z.e,!0),M._isFateSealed()||M._setAsyncGuaranteed(),M},O.all=function(T){return new b(T).promise()},O.cast=function(T){var M=v(T);return M instanceof O||(M=new O(p),M._captureStackTrace(),M._setFulfilled(),M._rejectionHandler0=T),M},O.resolve=O.fulfilled=O.cast,O.reject=O.rejected=function(T){var M=new O(p);return M._captureStackTrace(),M._rejectCallback(T,!0),M},O.setScheduler=function(T){if(typeof T!="function")throw new h("expecting a function but got "+s.classString(T));return f.setScheduler(T)},O.prototype._then=function(T,M,$,z,re){var se=re!==void 0,ue=se?re:new O(p),pe=this._target(),Ye=pe._bitField;se||(ue._propagateFrom(this,3),ue._captureStackTrace(),z===void 0&&(this._bitField&2097152)!==0&&((Ye&50397184)!==0?z=this._boundValue():z=pe===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,ue));var Se=a();if((Ye&50397184)!==0){var Be,je,Ae=pe._settlePromiseCtx;(Ye&33554432)!==0?(je=pe._rejectionHandler0,Be=T):(Ye&16777216)!==0?(je=pe._fulfillmentHandler0,Be=M,pe._unsetRejectionIsUnhandled()):(Ae=pe._settlePromiseLateCancellationObserver,je=new d("late cancellation observer"),pe._attachExtraTrace(je),Be=M),f.invoke(Ae,pe,{handler:Se===null?Be:typeof Be=="function"&&s.domainBind(Se,Be),promise:ue,receiver:z,value:je})}else pe._addCallbacks(T,M,ue,z,Se);return ue},O.prototype._length=function(){return this._bitField&65535},O.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},O.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},O.prototype._setLength=function(T){this._bitField=this._bitField&-65536|T&65535},O.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},O.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},O.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},O.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},O.prototype._isFinal=function(){return(this._bitField&4194304)>0},O.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},O.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},O.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},O.prototype._setAsyncGuaranteed=function(){f.hasCustomScheduler()||(this._bitField=this._bitField|134217728)},O.prototype._receiverAt=function(T){var M=T===0?this._receiver0:this[T*4-4+3];if(M!==n)return M===void 0&&this._isBound()?this._boundValue():M},O.prototype._promiseAt=function(T){return this[T*4-4+2]},O.prototype._fulfillmentHandlerAt=function(T){return this[T*4-4+0]},O.prototype._rejectionHandlerAt=function(T){return this[T*4-4+1]},O.prototype._boundValue=function(){},O.prototype._migrateCallback0=function(T){var M=T._bitField,$=T._fulfillmentHandler0,z=T._rejectionHandler0,re=T._promise0,se=T._receiverAt(0);se===void 0&&(se=n),this._addCallbacks($,z,re,se,null)},O.prototype._migrateCallbackAt=function(T,M){var $=T._fulfillmentHandlerAt(M),z=T._rejectionHandlerAt(M),re=T._promiseAt(M),se=T._receiverAt(M);se===void 0&&(se=n),this._addCallbacks($,z,re,se,null)},O.prototype._addCallbacks=function(T,M,$,z,re){var se=this._length();if(se>=65531&&(se=0,this._setLength(0)),se===0)this._promise0=$,this._receiver0=z,typeof T=="function"&&(this._fulfillmentHandler0=re===null?T:s.domainBind(re,T)),typeof M=="function"&&(this._rejectionHandler0=re===null?M:s.domainBind(re,M));else{var ue=se*4-4;this[ue+2]=$,this[ue+3]=z,typeof T=="function"&&(this[ue+0]=re===null?T:s.domainBind(re,T)),typeof M=="function"&&(this[ue+1]=re===null?M:s.domainBind(re,M))}return this._setLength(se+1),se},O.prototype._proxy=function(T,M){this._addCallbacks(void 0,void 0,M,T,null)},O.prototype._resolveCallback=function(T,M){if((this._bitField&117506048)===0){if(T===this)return this._rejectCallback(t(),!1);var $=v(T,this);if(!($ instanceof O))return this._fulfill(T);M&&this._propagateFrom($,2);var z=$._target();if(z===this){this._reject(t());return}var re=z._bitField;if((re&50397184)===0){var se=this._length();se>0&&z._migrateCallback0(this);for(var ue=1;ue<se;++ue)z._migrateCallbackAt(this,ue);this._setFollowing(),this._setLength(0),this._setFollowee(z)}else if((re&33554432)!==0)this._fulfill(z._value());else if((re&16777216)!==0)this._reject(z._reason());else{var pe=new d("late cancellation observer");z._attachExtraTrace(pe),this._reject(pe)}}},O.prototype._rejectCallback=function(T,M,$){var z=s.ensureErrorObject(T),re=z===T;if(!re&&!$&&E.warnings()){var se="a promise was rejected with a non-error: "+s.classString(T);this._warn(se,!0)}this._attachExtraTrace(z,M?re:!1),this._reject(T)},O.prototype._resolveFromExecutor=function(T){var M=this;this._captureStackTrace(),this._pushContext();var $=!0,z=this._execute(T,function(re){M._resolveCallback(re)},function(re){M._rejectCallback(re,$)});$=!1,this._popContext(),z!==void 0&&M._rejectCallback(z,!0)},O.prototype._settlePromiseFromHandler=function(T,M,$,z){var re=z._bitField;if((re&65536)===0){z._pushContext();var se;M===g?!$||typeof $.length!="number"?(se=I,se.e=new h("cannot .spread() a non-array: "+s.classString($))):se=Z(T).apply(this._boundValue(),$):se=Z(T).call(M,$);var ue=z._popContext();re=z._bitField,(re&65536)===0&&(se===y?z._reject($):se===I?z._rejectCallback(se.e,!1):(E.checkForgottenReturns(se,ue,"",z,this),z._resolveCallback(se)))}},O.prototype._target=function(){for(var T=this;T._isFollowing();)T=T._followee();return T},O.prototype._followee=function(){return this._rejectionHandler0},O.prototype._setFollowee=function(T){this._rejectionHandler0=T},O.prototype._settlePromise=function(T,M,$,z){var re=T instanceof O,se=this._bitField,ue=(se&134217728)!==0;(se&65536)!==0?(re&&T._invokeInternalOnCancel(),$ instanceof ee&&$.isFinallyHandler()?($.cancelPromise=T,Z(M).call($,z)===I&&T._reject(I.e)):M===e?T._fulfill(e.call($)):$ instanceof i?$._promiseCancelled(T):re||T instanceof b?T._cancel():$.cancel()):typeof M=="function"?re?(ue&&T._setAsyncGuaranteed(),this._settlePromiseFromHandler(M,$,z,T)):M.call($,z,T):$ instanceof i?$._isResolved()||((se&33554432)!==0?$._promiseFulfilled(z,T):$._promiseRejected(z,T)):re&&(ue&&T._setAsyncGuaranteed(),(se&33554432)!==0?T._fulfill(z):T._reject(z))},O.prototype._settlePromiseLateCancellationObserver=function(T){var M=T.handler,$=T.promise,z=T.receiver,re=T.value;typeof M=="function"?$ instanceof O?this._settlePromiseFromHandler(M,z,re,$):M.call(z,re,$):$ instanceof O&&$._reject(re)},O.prototype._settlePromiseCtx=function(T){this._settlePromise(T.promise,T.handler,T.receiver,T.value)},O.prototype._settlePromise0=function(T,M,$){var z=this._promise0,re=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(z,T,re,M)},O.prototype._clearCallbackDataAtIndex=function(T){var M=T*4-4;this[M+2]=this[M+3]=this[M+0]=this[M+1]=void 0},O.prototype._fulfill=function(T){var M=this._bitField;if(!((M&117506048)>>>16)){if(T===this){var $=t();return this._attachExtraTrace($),this._reject($)}this._setFulfilled(),this._rejectionHandler0=T,(M&65535)>0&&((M&134217728)!==0?this._settlePromises():f.settlePromises(this))}},O.prototype._reject=function(T){var M=this._bitField;if(!((M&117506048)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=T,this._isFinal())return f.fatalError(T,s.isNode);(M&65535)>0?f.settlePromises(this):this._ensurePossibleRejectionHandled()}},O.prototype._fulfillPromises=function(T,M){for(var $=1;$<T;$++){var z=this._fulfillmentHandlerAt($),re=this._promiseAt($),se=this._receiverAt($);this._clearCallbackDataAtIndex($),this._settlePromise(re,z,se,M)}},O.prototype._rejectPromises=function(T,M){for(var $=1;$<T;$++){var z=this._rejectionHandlerAt($),re=this._promiseAt($),se=this._receiverAt($);this._clearCallbackDataAtIndex($),this._settlePromise(re,z,se,M)}},O.prototype._settlePromises=function(){var T=this._bitField,M=T&65535;if(M>0){if((T&16842752)!==0){var $=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,$,T),this._rejectPromises(M,$)}else{var z=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,z,T),this._fulfillPromises(M,z)}this._setLength(0)}this._clearCancellationData()},O.prototype._settledValue=function(){var T=this._bitField;if((T&33554432)!==0)return this._rejectionHandler0;if((T&16777216)!==0)return this._fulfillmentHandler0};function q(T){this.promise._resolveCallback(T)}function B(T){this.promise._rejectCallback(T,!1)}O.defer=O.pending=function(){E.deprecated("Promise.defer","new Promise");var T=new O(p);return{promise:T,resolve:q,reject:B}},s.notEnumerableProp(O,"_makeSelfResolutionError",t),SH()(O,p,v,r,E),TH()(O,p,v,E),kH()(O,b,r,E),AH()(O),IH()(O),DH()(O,b,v,p,f,a),O.Promise=O,O.version="3.4.7",MH()(O,b,r,v,p,E),qH()(O),BH()(O,r,v,N,p,E),$H()(O,p,E),WH()(O,r,p,v,i,E),zH()(O),VH()(O,p),ZH()(O,b,v,r),KH()(O,p,v,r),JH()(O,b,r,v,p,E),tz()(O,b,E),iz()(O,b,r),sz()(O,p),oz()(O,p),uz()(O),s.toFastProperties(O),s.toFastProperties(O.prototype);function J(T){var M=new O(p);M._fulfillmentHandler0=T,M._rejectionHandler0=T,M._promise0=T,M._receiver0=T}return J({a:1}),J({b:2}),J({c:3}),J(1),J(function(){}),J(void 0),J(!1),J(new O(p)),E.setBounds(u.firstLineError,s.lastLineError),O}});var Ts=w((MMe,hz)=>{"use strict";var cz;typeof Promise<"u"&&(cz=Promise);function rxe(){try{Promise===jm&&(Promise=cz)}catch{}return jm}var jm=fz()();jm.noConflict=rxe;hz.exports=jm});var Hl=w((PMe,dz)=>{var Wl=Y("buffer").Buffer;Wl.from===void 0&&(Wl.from=function(t,e,r){return new Wl(t,e,r)},Wl.alloc=Wl.from);dz.exports=Wl});var vC=w((qMe,pz)=>{pz.exports=Y("stream")});var Ec=w((_C,mz)=>{var $m=Y("buffer"),xn=$m.Buffer;function gz(t,e){for(var r in t)e[r]=t[r]}xn.from&&xn.alloc&&xn.allocUnsafe&&xn.allocUnsafeSlow?mz.exports=$m:(gz($m,_C),_C.Buffer=zl);function zl(t,e,r){return xn(t,e,r)}gz(xn,zl);zl.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return xn(t,e,r)};zl.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=xn(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};zl.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return xn(t)};zl.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return $m.SlowBuffer(t)}});var vz=w((LMe,wC)=>{"use strict";function ixe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var yz=Ec().Buffer,Tc=Y("util");function nxe(t,e,r){t.copy(e,r)}wC.exports=(function(){function t(){ixe(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return yz.alloc(0);for(var i=yz.allocUnsafe(r>>>0),n=this.head,s=0;n;)nxe(n.data,i,s),s+=n.data.length,n=n.next;return i},t})();Tc&&Tc.inspect&&Tc.inspect.custom&&(wC.exports.prototype[Tc.inspect.custom]=function(){var t=Tc.inspect({length:this.length});return this.constructor.name+" "+t})});var bC=w((BMe,_z)=>{"use strict";var Um=St();function sxe(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Um.nextTick(Wm,this,t)):Um.nextTick(Wm,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,Um.nextTick(Wm,r,s)):Um.nextTick(Wm,r,s):e&&e(s)}),this)}function axe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Wm(t,e){t.emit("error",e)}_z.exports={destroy:sxe,undestroy:axe}});var SC=w((jMe,kz)=>{"use strict";var ja=St();kz.exports=Ot;function bz(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Exe(e,t)}}var oxe=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:ja.nextTick,Xl;Ot.WritableState=kc;var xz=Object.create(et());xz.inherits=be();var lxe={deprecate:Ls()},Sz=vC(),zm=Ec().Buffer,uxe=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function fxe(t){return zm.from(t)}function cxe(t){return zm.isBuffer(t)||t instanceof uxe}var Ez=bC();xz.inherits(Ot,Sz);function hxe(){}function kc(t,e){Xl=Xl||$a(),t=t||{};var r=e instanceof Xl;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){_xe(e,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new bz(this)}kc.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(kc.prototype,"buffer",{get:lxe.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Hm;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Hm=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ot,Symbol.hasInstance,{value:function(t){return Hm.call(this,t)?!0:this!==Ot?!1:t&&t._writableState instanceof kc}})):Hm=function(t){return t instanceof this};function Ot(t){if(Xl=Xl||$a(),!Hm.call(Ot,this)&&!(this instanceof Xl))return new Ot(t);this._writableState=new kc(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Sz.call(this)}Ot.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function dxe(t,e){var r=new Error("write after end");t.emit("error",r),ja.nextTick(e,r)}function pxe(t,e,r,i){var n=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),ja.nextTick(i,s),n=!1),n}Ot.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&cxe(t);return s&&!zm.isBuffer(t)&&(t=fxe(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=hxe),i.ended?dxe(this,r):(s||pxe(this,i,t,r))&&(i.pendingcb++,n=mxe(this,i,s,t,e,r)),n};Ot.prototype.cork=function(){var t=this._writableState;t.corked++};Ot.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Tz(this,t))};Ot.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function gxe(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=zm.from(e,r)),e}Object.defineProperty(Ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function mxe(t,e,r,i,n,s){if(!r){var a=gxe(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xC(t,e,!1,o,i,n,s);return u}function xC(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function yxe(t,e,r,i,n){--e.pendingcb,r?(ja.nextTick(n,i),ja.nextTick(Cc,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),Cc(t,e))}function vxe(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function _xe(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(vxe(r),e)yxe(t,r,i,e,n);else{var s=Cz(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Tz(t,r),i?oxe(wz,t,r,s,n):wz(t,r,s,n)}}function wz(t,e,r,i){r||wxe(t,e),e.pendingcb--,i(),Cc(t,e)}function wxe(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Tz(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,xC(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new bz(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,c=r.callback,h=e.objectMode?1:u.length;if(xC(t,e,!1,h,u,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ot.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Ot.prototype._writev=null;Ot.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||Sxe(this,i,r)};function Cz(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function bxe(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Cc(t,e)})}function xxe(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,ja.nextTick(bxe,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Cc(t,e){var r=Cz(e);return r&&(xxe(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function Sxe(t,e,r){e.ending=!0,Cc(t,e),r&&(e.finished?ja.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Exe(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Ot.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Ot.prototype.destroy=Ez.destroy;Ot.prototype._undestroy=Ez.undestroy;Ot.prototype._destroy=function(t,e){this.end(),e(t)}});var $a=w(($Me,Iz)=>{"use strict";var Rz=St(),Txe=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Iz.exports=Sn;var Az=Object.create(et());Az.inherits=be();var Oz=CC(),TC=SC();Az.inherits(Sn,Oz);for(EC=Txe(TC.prototype),Xm=0;Xm<EC.length;Xm++)Vm=EC[Xm],Sn.prototype[Vm]||(Sn.prototype[Vm]=TC.prototype[Vm]);var EC,Vm,Xm;function Sn(t){if(!(this instanceof Sn))return new Sn(t);Oz.call(this,t),TC.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Cxe)}Object.defineProperty(Sn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Cxe(){this.allowHalfOpen||this._writableState.ended||Rz.nextTick(kxe,this)}function kxe(t){t.end()}Object.defineProperty(Sn.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Sn.prototype._destroy=function(t,e){this.push(null),this.end(),Rz.nextTick(e,t)}});var AC=w(Dz=>{"use strict";var RC=Ec().Buffer,Nz=RC.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Rxe(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Axe(t){var e=Rxe(t);if(typeof e!="string"&&(RC.isEncoding===Nz||!Nz(t)))throw new Error("Unknown encoding: "+t);return e||t}Dz.StringDecoder=Rc;function Rc(t){this.encoding=Axe(t);var e;switch(this.encoding){case"utf16le":this.text=Mxe,this.end=Pxe,e=4;break;case"utf8":this.fillLast=Nxe,e=4;break;case"base64":this.text=qxe,this.end=Lxe,e=3;break;default:this.write=Bxe,this.end=jxe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=RC.allocUnsafe(e)}Rc.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Rc.prototype.end=Fxe;Rc.prototype.text=Dxe;Rc.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function kC(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Oxe(t,e,r){var i=e.length-1;if(i<r)return 0;var n=kC(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=kC(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=kC(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Ixe(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Nxe(t){var e=this.lastTotal-this.lastNeed,r=Ixe(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Dxe(t,e){var r=Oxe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Fxe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Mxe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Pxe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function qxe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Lxe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Bxe(t){return t.toString(this.encoding)}function jxe(t){return t&&t.length?this.write(t):""}});var CC=w((HMe,zz)=>{"use strict";var Gl=St();zz.exports=ut;var $xe=no(),Ac;ut.ReadableState=jz;var WMe=Y("events").EventEmitter,qz=function(t,e){return t.listeners(e).length},FC=vC(),Oc=Ec().Buffer,Uxe=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Wxe(t){return Oc.from(t)}function Hxe(t){return Oc.isBuffer(t)||t instanceof Uxe}var Lz=Object.create(et());Lz.inherits=be();var OC=Y("util"),He=void 0;OC&&OC.debuglog?He=OC.debuglog("stream"):He=function(){};var zxe=vz(),Bz=bC(),Vl;Lz.inherits(ut,FC);var IC=["error","close","destroy","pause","resume"];function Xxe(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):$xe(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function jz(t,e){Ac=Ac||$a(),t=t||{};var r=e instanceof Ac;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new zxe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Vl||(Vl=AC().StringDecoder),this.decoder=new Vl(t.encoding),this.encoding=t.encoding)}function ut(t){if(Ac=Ac||$a(),!(this instanceof ut))return new ut(t);this._readableState=new jz(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),FC.call(this)}Object.defineProperty(ut.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ut.prototype.destroy=Bz.destroy;ut.prototype._undestroy=Bz.undestroy;ut.prototype._destroy=function(t,e){this.push(null),e(t)};ut.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Oc.from(t,e),e=""),i=!0),$z(this,t,e,!1,i)};ut.prototype.unshift=function(t){return $z(this,t,null,!0,!1)};function $z(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,Yxe(t,s);else{var a;n||(a=Vxe(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Oc.prototype&&(e=Wxe(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):NC(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?NC(t,s,e,!1):Uz(t,s)):NC(t,s,e,!1))):i||(s.reading=!1)}return Gxe(s)}function NC(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Gm(t)),Uz(t,e)}function Vxe(t,e){var r;return!Hxe(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Gxe(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ut.prototype.isPaused=function(){return this._readableState.flowing===!1};ut.prototype.setEncoding=function(t){return Vl||(Vl=AC().StringDecoder),this._readableState.decoder=new Vl(t),this._readableState.encoding=t,this};var Fz=8388608;function Zxe(t){return t>=Fz?t=Fz:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Mz(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Zxe(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ut.prototype.read=function(t){He("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return He("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?DC(this):Gm(this),null;if(t=Mz(t,e),t===0&&e.ended)return e.length===0&&DC(this),null;var i=e.needReadable;He("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,He("length less than watermark",i)),e.ended||e.reading?(i=!1,He("reading or ended",i)):i&&(He("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Mz(r,e)));var n;return t>0?n=Wz(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&DC(this)),n!==null&&this.emit("data",n),n};function Yxe(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Gm(t)}}function Gm(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(He("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Gl.nextTick(Pz,t):Pz(t))}function Pz(t){He("emit readable"),t.emit("readable"),MC(t)}function Uz(t,e){e.readingMore||(e.readingMore=!0,Gl.nextTick(Kxe,t,e))}function Kxe(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(He("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}ut.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ut.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,He("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:v;i.endEmitted?Gl.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(b,k){He("onunpipe"),b===r&&k&&k.hasUnpiped===!1&&(k.hasUnpiped=!0,c())}function o(){He("onend"),t.end()}var u=Qxe(r);t.on("drain",u);var f=!1;function c(){He("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",v),r.removeListener("data",d),f=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var h=!1;r.on("data",d);function d(b){He("ondata"),h=!1;var k=t.write(b);k===!1&&!h&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Hz(i.pipes,t)!==-1)&&!f&&(He("false write response, pause",i.awaitDrain),i.awaitDrain++,h=!0),r.pause())}function p(b){He("onerror",b),v(),t.removeListener("error",p),qz(t,"error")===0&&t.emit("error",b)}Xxe(t,"error",p);function g(){t.removeListener("finish",y),v()}t.once("close",g);function y(){He("onfinish"),t.removeListener("close",g),v()}t.once("finish",y);function v(){He("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(He("pipe resume"),r.resume()),t};function Qxe(t){return function(){var e=t._readableState;He("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&qz(t,"data")&&(e.flowing=!0,MC(t))}}ut.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Hz(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ut.prototype.on=function(t,e){var r=FC.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Gm(this):Gl.nextTick(Jxe,this))}return r};ut.prototype.addListener=ut.prototype.on;function Jxe(t){He("readable nexttick read 0"),t.read(0)}ut.prototype.resume=function(){var t=this._readableState;return t.flowing||(He("resume"),t.flowing=!0,eSe(this,t)),this};function eSe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Gl.nextTick(tSe,t,e))}function tSe(t,e){e.reading||(He("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),MC(t),e.flowing&&!e.reading&&t.read(0)}ut.prototype.pause=function(){return He("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(He("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function MC(t){var e=t._readableState;for(He("flow",e.flowing);e.flowing&&t.read()!==null;);}ut.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(He("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(He("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<IC.length;s++)t.on(IC[s],this.emit.bind(this,IC[s]));return this._read=function(a){He("wrapped _read",a),i&&(i=!1,t.resume())},this};Object.defineProperty(ut.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ut._fromList=Wz;function Wz(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=rSe(t,e.buffer,e.decoder),r}function rSe(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?iSe(t,e):nSe(t,e),i}function iSe(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var s=r.data,a=t>s.length?s.length:t;if(a===s.length?n+=s:n+=s.slice(0,t),t-=a,t===0){a===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(a));break}++i}return e.length-=i,n}function nSe(t,e){var r=Oc.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var s=i.data,a=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,a),t-=a,t===0){a===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(a));break}++n}return e.length-=n,r}function DC(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Gl.nextTick(sSe,e,t))}function sSe(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Hz(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var PC=w((zMe,Gz)=>{"use strict";Gz.exports=En;var Zm=$a(),Vz=Object.create(et());Vz.inherits=be();Vz.inherits(En,Zm);function aSe(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function En(t){if(!(this instanceof En))return new En(t);Zm.call(this,t),this._transformState={afterTransform:aSe.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",oSe)}function oSe(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){Xz(t,e,r)}):Xz(this,null,null)}En.prototype.push=function(t,e){return this._transformState.needTransform=!1,Zm.prototype.push.call(this,t,e)};En.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};En.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};En.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};En.prototype._destroy=function(t,e){var r=this;Zm.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function Xz(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Qz=w((XMe,Kz)=>{"use strict";Kz.exports=Ic;var Zz=PC(),Yz=Object.create(et());Yz.inherits=be();Yz.inherits(Ic,Zz);function Ic(t){if(!(this instanceof Ic))return new Ic(t);Zz.call(this,t)}Ic.prototype._transform=function(t,e,r){r(null,t)}});var Tn=w((Qt,Ym)=>{var qi=Y("stream");process.env.READABLE_STREAM==="disable"&&qi?(Ym.exports=qi,Qt=Ym.exports=qi.Readable,Qt.Readable=qi.Readable,Qt.Writable=qi.Writable,Qt.Duplex=qi.Duplex,Qt.Transform=qi.Transform,Qt.PassThrough=qi.PassThrough,Qt.Stream=qi):(Qt=Ym.exports=CC(),Qt.Stream=qi||Qt,Qt.Readable=Qt,Qt.Writable=SC(),Qt.Duplex=$a(),Qt.Transform=PC(),Qt.PassThrough=Qz())});var Qm=w((VMe,Jz)=>{var Ua=Y("stream"),qC=Ts(),lSe=Y("util"),Km=Hl(),uSe="function";(!Ua.Writable||!Ua.Writable.prototype.destroy)&&(Ua=Tn());function Cs(){if(!(this instanceof Cs))return new Cs;Ua.Duplex.call(this,{decodeStrings:!1,objectMode:!0}),this.buffer=Km.from("");var t=this;t.on("finish",function(){t.finished=!0,t.emit("chunk",!1)})}lSe.inherits(Cs,Ua.Duplex);Cs.prototype._write=function(t,e,r){this.buffer=Km.concat([this.buffer,t]),this.cb=r,this.emit("chunk")};Cs.prototype.stream=function(t,e){var r=Ua.PassThrough(),i,n=this;function s(){if(typeof n.cb===uSe){var o=n.cb;return n.cb=void 0,o()}}function a(){var o;if(n.buffer&&n.buffer.length){if(typeof t=="number")o=n.buffer.slice(0,t),n.buffer=n.buffer.slice(t),t-=o.length,i=!t;else{var u=n.buffer.indexOf(t);if(u!==-1)n.match=u,e&&(u=u+t.length),o=n.buffer.slice(0,u),n.buffer=n.buffer.slice(u),i=!0;else{var f=n.buffer.length-t.length;f<=0?s():(o=n.buffer.slice(0,f),n.buffer=n.buffer.slice(f))}}o&&r.write(o,function(){(n.buffer.length===0||t.length&&n.buffer.length<=t.length)&&s()})}if(i)n.removeListener("chunk",a),r.end();else if(n.finished){n.removeListener("chunk",a),n.emit("error",new Error("FILE_ENDED"));return}}return n.on("chunk",a),a(),r};Cs.prototype.pull=function(t,e){if(t===0)return qC.resolve("");if(!isNaN(t)&&this.buffer.length>t){var r=this.buffer.slice(0,t);return this.buffer=this.buffer.slice(t),qC.resolve(r)}var i=Km.from(""),n=this,s=Ua.Transform();s._transform=function(u,f,c){i=Km.concat([i,u]),c()};var a,o;return new qC(function(u,f){if(a=f,o=function(c){n.__emittedError=c,f(c)},n.finished)return f(new Error("FILE_ENDED"));n.once("error",o),n.stream(t,e).on("error",f).pipe(s).on("finish",function(){u(i)}).on("error",f)}).finally(function(){n.removeListener("error",a),n.removeListener("error",o)})};Cs.prototype._read=function(){};Jz.exports=Cs});var t5=w((GMe,e5)=>{var Nc=Y("stream"),fSe=Y("util");(!Nc.Writable||!Nc.Writable.prototype.destroy)&&(Nc=Tn());function Dc(){if(!(this instanceof Dc))return new Dc;Nc.Transform.call(this)}fSe.inherits(Dc,Nc.Transform);Dc.prototype._transform=function(t,e,r){r()};e5.exports=Dc});var ey=w((ZMe,r5)=>{var cSe=Ts(),Jm=Y("stream"),hSe=Hl();(!Jm.Writable||!Jm.Writable.prototype.destroy)&&(Jm=Tn());r5.exports=function(t){return new cSe(function(e,r){var i=[],n=Jm.Transform().on("finish",function(){e(hSe.concat(i))}).on("error",r);n._transform=function(s,a,o){i.push(s),o()},t.on("error",r).pipe(n)})}});var ty=w((YMe,i5)=>{var dSe=bc();i5.exports=function(t,e){for(var r;!r&&t&&t.length;){var i=dSe.parse(t).word16lu("signature").word16lu("partsize").word64lu("uncompressedSize").word64lu("compressedSize").word64lu("offset").word64lu("disknum").vars;i.signature===1?r=i:t=t.slice(i.partsize+4)}return r=r||{},e.compressedSize===4294967295&&(e.compressedSize=r.compressedSize),e.uncompressedSize===4294967295&&(e.uncompressedSize=r.uncompressedSize),e.offsetToLocalFileHeader===4294967295&&(e.offsetToLocalFileHeader=r.offset),r}});var ry=w((KMe,n5)=>{n5.exports=function(e,r){let i=e&31,n=e>>5&15,s=(e>>9&127)+1980,a=r?(r&31)*2:0,o=r?r>>5&63:0,u=r?r>>11:0;return new Date(Date.UTC(s,n-1,i,u,o,a))}});var iy=w((QMe,l5)=>{var pSe=Y("util"),gSe=Y("zlib"),Fc=Y("stream"),Mc=bc(),LC=Ts(),s5=Qm(),mSe=t5(),ySe=ey(),vSe=ty(),a5=Hl(),_Se=ry();(!Fc.Writable||!Fc.Writable.prototype.destroy)&&(Fc=Tn());var o5=a5.alloc(4);o5.writeUInt32LE(101010256,0);function pi(t){if(!(this instanceof pi))return new pi(t);var e=this;e._opts=t||{verbose:!1},s5.call(e,e._opts),e.on("finish",function(){e.emit("end"),e.emit("close")}),e._readRecord().catch(function(r){(!e.__emittedError||e.__emittedError!==r)&&e.emit("error",r)})}pSe.inherits(pi,s5);pi.prototype._readRecord=function(){var t=this;return t.pull(4).then(function(e){if(e.length!==0){var r=e.readUInt32LE(0);if(r===875721283)return t._readCrxHeader();if(r===67324752)return t._readFile();if(r===33639248)return t.reachedCD=!0,t._readCentralDirectoryFileHeader();if(r===101010256)return t._readEndOfCentralDirectoryRecord();if(t.reachedCD){var i=!0;return t.pull(o5,i).then(function(){return t._readEndOfCentralDirectoryRecord()})}else t.emit("error",new Error("invalid signature: 0x"+r.toString(16)))}})};pi.prototype._readCrxHeader=function(){var t=this;return t.pull(12).then(function(e){return t.crxHeader=Mc.parse(e).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars,t.pull(t.crxHeader.pubKeyLength+t.crxHeader.signatureLength)}).then(function(e){return t.crxHeader.publicKey=e.slice(0,t.crxHeader.pubKeyLength),t.crxHeader.signature=e.slice(t.crxHeader.pubKeyLength),t.emit("crx-header",t.crxHeader),t._readRecord()})};pi.prototype._readFile=function(){var t=this;return t.pull(26).then(function(e){var r=Mc.parse(e).word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;return r.lastModifiedDateTime=_Se(r.lastModifiedDate,r.lastModifiedTime),t.crxHeader&&(r.crxHeader=t.crxHeader),t.pull(r.fileNameLength).then(function(i){var n=i.toString("utf8"),s=Fc.PassThrough(),a=!1;return s.autodrain=function(){a=!0;var o=s.pipe(mSe());return o.promise=function(){return new LC(function(u,f){o.on("finish",u),o.on("error",f)})},o},s.buffer=function(){return ySe(s)},s.path=n,s.props={},s.props.path=n,s.props.pathBuffer=i,s.props.flags={isUnicode:(r.flags&2048)!=0},s.type=r.uncompressedSize===0&&/[\/\\]$/.test(n)?"Directory":"File",t._opts.verbose&&(s.type==="Directory"?console.log(" creating:",n):s.type==="File"&&(r.compressionMethod===0?console.log(" extracting:",n):console.log(" inflating:",n))),t.pull(r.extraFieldLength).then(function(o){var u=vSe(o,r);s.vars=r,s.extra=u,t._opts.forceStream?t.push(s):(t.emit("entry",s),(t._readableState.pipesCount||t._readableState.pipes&&t._readableState.pipes.length)&&t.push(s)),t._opts.verbose&&console.log({filename:n,vars:r,extra:u});var f=!(r.flags&8)||r.compressedSize>0,c;s.__autodraining=a;var h=r.compressionMethod&&!a?gSe.createInflateRaw():Fc.PassThrough();return f?(s.size=r.uncompressedSize,c=r.compressedSize):(c=a5.alloc(4),c.writeUInt32LE(134695760,0)),new LC(function(d,p){t.stream(c).pipe(h).on("error",function(g){t.emit("error",g)}).pipe(s).on("finish",function(){return f?t._readRecord().then(d).catch(p):t._processDataDescriptor(s).then(d).catch(p)})})})})})};pi.prototype._processDataDescriptor=function(t){var e=this;return e.pull(16).then(function(r){var i=Mc.parse(r).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars;return t.size=i.uncompressedSize,e._readRecord()})};pi.prototype._readCentralDirectoryFileHeader=function(){var t=this;return t.pull(42).then(function(e){var r=Mc.parse(e).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return t.pull(r.fileNameLength).then(function(i){return r.fileName=i.toString("utf8"),t.pull(r.extraFieldLength)}).then(function(i){return t.pull(r.fileCommentLength)}).then(function(i){return t._readRecord()})})};pi.prototype._readEndOfCentralDirectoryRecord=function(){var t=this;return t.pull(18).then(function(e){var r=Mc.parse(e).word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;return t.pull(r.commentLength).then(function(i){i=i.toString("utf8"),t.end(),t.push(null)})})};pi.prototype.promise=function(){var t=this;return new LC(function(e,r){t.on("finish",e),t.on("error",r)})};l5.exports=pi});var BC=w((JMe,u5)=>{u5.exports=Y("stream")});var Pc=w((jC,c5)=>{var ny=Y("buffer"),Cn=ny.Buffer;function f5(t,e){for(var r in t)e[r]=t[r]}Cn.from&&Cn.alloc&&Cn.allocUnsafe&&Cn.allocUnsafeSlow?c5.exports=ny:(f5(ny,jC),jC.Buffer=Zl);function Zl(t,e,r){return Cn(t,e,r)}f5(Cn,Zl);Zl.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Cn(t,e,r)};Zl.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Cn(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Zl.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Cn(t)};Zl.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ny.SlowBuffer(t)}});var d5=w((ePe,$C)=>{"use strict";function wSe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var h5=Pc().Buffer,qc=Y("util");function bSe(t,e,r){t.copy(e,r)}$C.exports=(function(){function t(){wSe(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return h5.alloc(0);for(var i=h5.allocUnsafe(r>>>0),n=this.head,s=0;n;)bSe(n.data,i,s),s+=n.data.length,n=n.next;return i},t})();qc&&qc.inspect&&qc.inspect.custom&&($C.exports.prototype[qc.inspect.custom]=function(){var t=qc.inspect({length:this.length});return this.constructor.name+" "+t})});var UC=w((tPe,p5)=>{"use strict";var sy=St();function xSe(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,sy.nextTick(ay,this,t)):sy.nextTick(ay,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,sy.nextTick(ay,r,s)):sy.nextTick(ay,r,s):e&&e(s)}),this)}function SSe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function ay(t,e){t.emit("error",e)}p5.exports={destroy:xSe,undestroy:SSe}});var HC=w((rPe,x5)=>{"use strict";var Wa=St();x5.exports=It;function m5(t){var e=this;this.next=null,this.entry=null,this.finish=function(){$Se(e,t)}}var ESe=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Wa.nextTick,Yl;It.WritableState=Bc;var y5=Object.create(et());y5.inherits=be();var TSe={deprecate:Ls()},v5=BC(),ly=Pc().Buffer,CSe=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function kSe(t){return ly.from(t)}function RSe(t){return ly.isBuffer(t)||t instanceof CSe}var _5=UC();y5.inherits(It,v5);function ASe(){}function Bc(t,e){Yl=Yl||Ha(),t=t||{};var r=e instanceof Yl;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){PSe(e,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new m5(this)}Bc.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Bc.prototype,"buffer",{get:TSe.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var oy;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(oy=Function.prototype[Symbol.hasInstance],Object.defineProperty(It,Symbol.hasInstance,{value:function(t){return oy.call(this,t)?!0:this!==It?!1:t&&t._writableState instanceof Bc}})):oy=function(t){return t instanceof this};function It(t){if(Yl=Yl||Ha(),!oy.call(It,this)&&!(this instanceof Yl))return new It(t);this._writableState=new Bc(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),v5.call(this)}It.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function OSe(t,e){var r=new Error("write after end");t.emit("error",r),Wa.nextTick(e,r)}function ISe(t,e,r,i){var n=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),Wa.nextTick(i,s),n=!1),n}It.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&RSe(t);return s&&!ly.isBuffer(t)&&(t=kSe(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=ASe),i.ended?OSe(this,r):(s||ISe(this,i,t,r))&&(i.pendingcb++,n=DSe(this,i,s,t,e,r)),n};It.prototype.cork=function(){var t=this._writableState;t.corked++};It.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&w5(this,t))};It.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function NSe(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=ly.from(e,r)),e}Object.defineProperty(It.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function DSe(t,e,r,i,n,s){if(!r){var a=NSe(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else WC(t,e,!1,o,i,n,s);return u}function WC(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function FSe(t,e,r,i,n){--e.pendingcb,r?(Wa.nextTick(n,i),Wa.nextTick(Lc,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),Lc(t,e))}function MSe(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function PSe(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(MSe(r),e)FSe(t,r,i,e,n);else{var s=b5(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&w5(t,r),i?ESe(g5,t,r,s,n):g5(t,r,s,n)}}function g5(t,e,r,i){r||qSe(t,e),e.pendingcb--,i(),Lc(t,e)}function qSe(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function w5(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,WC(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new m5(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,c=r.callback,h=e.objectMode?1:u.length;if(WC(t,e,!1,h,u,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}It.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};It.prototype._writev=null;It.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||jSe(this,i,r)};function b5(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function LSe(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Lc(t,e)})}function BSe(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,Wa.nextTick(LSe,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Lc(t,e){var r=b5(e);return r&&(BSe(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function jSe(t,e,r){e.ending=!0,Lc(t,e),r&&(e.finished?Wa.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function $Se(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(It.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});It.prototype.destroy=_5.destroy;It.prototype._undestroy=_5.undestroy;It.prototype._destroy=function(t,e){this.end(),e(t)}});var Ha=w((iPe,C5)=>{"use strict";var S5=St(),USe=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};C5.exports=kn;var E5=Object.create(et());E5.inherits=be();var T5=VC(),XC=HC();E5.inherits(kn,T5);for(zC=USe(XC.prototype),uy=0;uy<zC.length;uy++)fy=zC[uy],kn.prototype[fy]||(kn.prototype[fy]=XC.prototype[fy]);var zC,fy,uy;function kn(t){if(!(this instanceof kn))return new kn(t);T5.call(this,t),XC.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",WSe)}Object.defineProperty(kn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function WSe(){this.allowHalfOpen||this._writableState.ended||S5.nextTick(HSe,this)}function HSe(t){t.end()}Object.defineProperty(kn.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});kn.prototype._destroy=function(t,e){this.push(null),this.end(),S5.nextTick(e,t)}});var YC=w(R5=>{"use strict";var ZC=Pc().Buffer,k5=ZC.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function zSe(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function XSe(t){var e=zSe(t);if(typeof e!="string"&&(ZC.isEncoding===k5||!k5(t)))throw new Error("Unknown encoding: "+t);return e||t}R5.StringDecoder=jc;function jc(t){this.encoding=XSe(t);var e;switch(this.encoding){case"utf16le":this.text=QSe,this.end=JSe,e=4;break;case"utf8":this.fillLast=ZSe,e=4;break;case"base64":this.text=eEe,this.end=tEe,e=3;break;default:this.write=rEe,this.end=iEe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ZC.allocUnsafe(e)}jc.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};jc.prototype.end=KSe;jc.prototype.text=YSe;jc.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function GC(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function VSe(t,e,r){var i=e.length-1;if(i<r)return 0;var n=GC(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=GC(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=GC(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function GSe(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function ZSe(t){var e=this.lastTotal-this.lastNeed,r=GSe(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function YSe(t,e){var r=VSe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function KSe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function QSe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function JSe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function eEe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function tEe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function rEe(t){return t.toString(this.encoding)}function iEe(t){return t&&t.length?this.write(t):""}});var VC=w((aPe,j5)=>{"use strict";var Ql=St();j5.exports=ft;var nEe=no(),$c;ft.ReadableState=M5;var sPe=Y("events").EventEmitter,N5=function(t,e){return t.listeners(e).length},tk=BC(),Uc=Pc().Buffer,sEe=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function aEe(t){return Uc.from(t)}function oEe(t){return Uc.isBuffer(t)||t instanceof sEe}var D5=Object.create(et());D5.inherits=be();var KC=Y("util"),ze=void 0;KC&&KC.debuglog?ze=KC.debuglog("stream"):ze=function(){};var lEe=d5(),F5=UC(),Kl;D5.inherits(ft,tk);var QC=["error","close","destroy","pause","resume"];function uEe(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):nEe(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function M5(t,e){$c=$c||Ha(),t=t||{};var r=e instanceof $c;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new lEe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Kl||(Kl=YC().StringDecoder),this.decoder=new Kl(t.encoding),this.encoding=t.encoding)}function ft(t){if($c=$c||Ha(),!(this instanceof ft))return new ft(t);this._readableState=new M5(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),tk.call(this)}Object.defineProperty(ft.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ft.prototype.destroy=F5.destroy;ft.prototype._undestroy=F5.undestroy;ft.prototype._destroy=function(t,e){this.push(null),e(t)};ft.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Uc.from(t,e),e=""),i=!0),P5(this,t,e,!1,i)};ft.prototype.unshift=function(t){return P5(this,t,null,!0,!1)};function P5(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,dEe(t,s);else{var a;n||(a=fEe(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Uc.prototype&&(e=aEe(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):JC(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?JC(t,s,e,!1):q5(t,s)):JC(t,s,e,!1))):i||(s.reading=!1)}return cEe(s)}function JC(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&cy(t)),q5(t,e)}function fEe(t,e){var r;return!oEe(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function cEe(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ft.prototype.isPaused=function(){return this._readableState.flowing===!1};ft.prototype.setEncoding=function(t){return Kl||(Kl=YC().StringDecoder),this._readableState.decoder=new Kl(t),this._readableState.encoding=t,this};var A5=8388608;function hEe(t){return t>=A5?t=A5:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function O5(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=hEe(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ft.prototype.read=function(t){ze("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return ze("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ek(this):cy(this),null;if(t=O5(t,e),t===0&&e.ended)return e.length===0&&ek(this),null;var i=e.needReadable;ze("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,ze("length less than watermark",i)),e.ended||e.reading?(i=!1,ze("reading or ended",i)):i&&(ze("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=O5(r,e)));var n;return t>0?n=L5(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ek(this)),n!==null&&this.emit("data",n),n};function dEe(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,cy(t)}}function cy(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(ze("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Ql.nextTick(I5,t):I5(t))}function I5(t){ze("emit readable"),t.emit("readable"),rk(t)}function q5(t,e){e.readingMore||(e.readingMore=!0,Ql.nextTick(pEe,t,e))}function pEe(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(ze("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}ft.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ft.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,ze("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:v;i.endEmitted?Ql.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(b,k){ze("onunpipe"),b===r&&k&&k.hasUnpiped===!1&&(k.hasUnpiped=!0,c())}function o(){ze("onend"),t.end()}var u=gEe(r);t.on("drain",u);var f=!1;function c(){ze("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",v),r.removeListener("data",d),f=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var h=!1;r.on("data",d);function d(b){ze("ondata"),h=!1;var k=t.write(b);k===!1&&!h&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&B5(i.pipes,t)!==-1)&&!f&&(ze("false write response, pause",i.awaitDrain),i.awaitDrain++,h=!0),r.pause())}function p(b){ze("onerror",b),v(),t.removeListener("error",p),N5(t,"error")===0&&t.emit("error",b)}uEe(t,"error",p);function g(){t.removeListener("finish",y),v()}t.once("close",g);function y(){ze("onfinish"),t.removeListener("close",g),v()}t.once("finish",y);function v(){ze("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(ze("pipe resume"),r.resume()),t};function gEe(t){return function(){var e=t._readableState;ze("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&N5(t,"data")&&(e.flowing=!0,rk(t))}}ft.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=B5(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ft.prototype.on=function(t,e){var r=tk.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&cy(this):Ql.nextTick(mEe,this))}return r};ft.prototype.addListener=ft.prototype.on;function mEe(t){ze("readable nexttick read 0"),t.read(0)}ft.prototype.resume=function(){var t=this._readableState;return t.flowing||(ze("resume"),t.flowing=!0,yEe(this,t)),this};function yEe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Ql.nextTick(vEe,t,e))}function vEe(t,e){e.reading||(ze("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),rk(t),e.flowing&&!e.reading&&t.read(0)}ft.prototype.pause=function(){return ze("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ze("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function rk(t){var e=t._readableState;for(ze("flow",e.flowing);e.flowing&&t.read()!==null;);}ft.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(ze("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(ze("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<QC.length;s++)t.on(QC[s],this.emit.bind(this,QC[s]));return this._read=function(a){ze("wrapped _read",a),i&&(i=!1,t.resume())},this};Object.defineProperty(ft.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ft._fromList=L5;function L5(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=_Ee(t,e.buffer,e.decoder),r}function _Ee(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?wEe(t,e):bEe(t,e),i}function wEe(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var s=r.data,a=t>s.length?s.length:t;if(a===s.length?n+=s:n+=s.slice(0,t),t-=a,t===0){a===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(a));break}++i}return e.length-=i,n}function bEe(t,e){var r=Uc.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var s=i.data,a=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,a),t-=a,t===0){a===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(a));break}++n}return e.length-=n,r}function ek(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Ql.nextTick(xEe,e,t))}function xEe(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function B5(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ik=w((oPe,W5)=>{"use strict";W5.exports=Rn;var hy=Ha(),U5=Object.create(et());U5.inherits=be();U5.inherits(Rn,hy);function SEe(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Rn(t){if(!(this instanceof Rn))return new Rn(t);hy.call(this,t),this._transformState={afterTransform:SEe.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",EEe)}function EEe(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){$5(t,e,r)}):$5(this,null,null)}Rn.prototype.push=function(t,e){return this._transformState.needTransform=!1,hy.prototype.push.call(this,t,e)};Rn.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Rn.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Rn.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Rn.prototype._destroy=function(t,e){var r=this;hy.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function $5(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var V5=w((lPe,X5)=>{"use strict";X5.exports=Wc;var H5=ik(),z5=Object.create(et());z5.inherits=be();z5.inherits(Wc,H5);function Wc(t){if(!(this instanceof Wc))return new Wc(t);H5.call(this,t)}Wc.prototype._transform=function(t,e,r){r(null,t)}});var G5=w((Jt,dy)=>{var Li=Y("stream");process.env.READABLE_STREAM==="disable"&&Li?(dy.exports=Li,Jt=dy.exports=Li.Readable,Jt.Readable=Li.Readable,Jt.Writable=Li.Writable,Jt.Duplex=Li.Duplex,Jt.Transform=Li.Transform,Jt.PassThrough=Li.PassThrough,Jt.Stream=Li):(Jt=dy.exports=VC(),Jt.Stream=Li||Jt,Jt.Readable=Jt,Jt.Writable=HC(),Jt.Duplex=Ha(),Jt.Transform=ik(),Jt.PassThrough=V5())});var ak=w((uPe,sk)=>{"use strict";var nk=G5();function Jl(t,e,r){typeof r>"u"&&(r=e,e=t,t=null),nk.Duplex.call(this,t),typeof r.read!="function"&&(r=new nk.Readable(t).wrap(r)),this._writable=e,this._readable=r,this._waiting=!1;var i=this;e.once("finish",function(){i.end()}),this.once("finish",function(){e.end()}),r.on("readable",function(){i._waiting&&(i._waiting=!1,i._read())}),r.once("end",function(){i.push(null)}),(!t||typeof t.bubbleErrors>"u"||t.bubbleErrors)&&(e.on("error",function(n){i.emit("error",n)}),r.on("error",function(n){i.emit("error",n)}))}Jl.prototype=Object.create(nk.Duplex.prototype,{constructor:{value:Jl}});Jl.prototype._write=function(e,r,i){this._writable.write(e,r,i)};Jl.prototype._read=function(){for(var e,r=0;(e=this._readable.read())!==null;)this.push(e),r++;r===0&&(this._waiting=!0)};sk.exports=function(e,r,i){return new Jl(e,r,i)};sk.exports.DuplexWrapper=Jl});var Y5=w((fPe,Z5)=>{var eu=Y("stream"),TEe=iy(),CEe=ak(),kEe=ey();(!eu.Writable||!eu.Writable.prototype.destroy)&&(eu=Tn());function REe(t,e){var r=eu.PassThrough({objectMode:!0}),i=eu.PassThrough(),n=eu.Transform({objectMode:!0}),s=t instanceof RegExp?t:t&&new RegExp(t),a;n._transform=function(u,f,c){if(a||s&&!s.exec(u.path))return u.autodrain(),c();a=!0,o.emit("entry",u),u.on("error",function(h){i.emit("error",h)}),u.pipe(i).on("error",function(h){c(h)}).on("finish",function(h){c(null,h)})},r.pipe(TEe(e)).on("error",function(u){i.emit("error",u)}).pipe(n).on("error",Object).on("finish",function(){a?i.end():i.emit("error",new Error("PATTERN_NOT_FOUND"))});var o=CEe(r,i);return o.buffer=function(){return kEe(i)},o}Z5.exports=REe});var py=w((cPe,Q5)=>{Q5.exports=ks;var ok=Y("stream").Stream,AEe=be();function ks(){ok.call(this)}AEe(ks,ok);ks.prototype.on=function(t,e){return t==="ready"&&this.ready?process.nextTick(e.bind(this)):ok.prototype.on.call(this,t,e),this};ks.prototype.abort=function(){this._aborted=!0,this.emit("abort")};ks.prototype.destroy=function(){};ks.prototype.warn=function(t,e){var r=this,i=K5(t,e,r);r.listeners("warn")?r.emit("warn",i):console.error(`%s %s
214
+ path = %s
215
+ syscall = %s
216
+ fstream_type = %s
217
+ fstream_path = %s
218
+ fstream_unc_path = %s
219
+ fstream_class = %s
220
+ fstream_stack =
221
+ %s
222
+ `,e||"UNKNOWN",i.stack,i.path,i.syscall,i.fstream_type,i.fstream_path,i.fstream_unc_path,i.fstream_class,i.fstream_stack.join(`
223
+ `))};ks.prototype.info=function(t,e){this.emit("info",t,e)};ks.prototype.error=function(t,e,r){var i=K5(t,e,this);if(r)throw i;this.emit("error",i)};function K5(t,e,r){return t instanceof Error||(t=new Error(t)),t.code=t.code||e,t.path=t.path||r.path,t.fstream_type=t.fstream_type||r.type,t.fstream_path=t.fstream_path||r.path,r._path!==r.path&&(t.fstream_unc_path=t.fstream_unc_path||r._path),r.linkpath&&(t.fstream_linkpath=t.fstream_linkpath||r.linkpath),t.fstream_class=t.fstream_class||r.constructor.name,t.fstream_stack=t.fstream_stack||new Error().stack.split(/\n/).slice(3).map(function(i){return i.replace(/^ {4}at /,"")}),t}});var Hc=w((hPe,J5)=>{J5.exports=OEe;function OEe(t){var e=["Directory","File","SymbolicLink","Link","BlockDevice","CharacterDevice","FIFO","Socket"],r;if(t.type&&e.indexOf(t.type)!==-1)return t[t.type]=!0,t.type;for(var i=0,n=e.length;i<n;i++){r=e[i];var s=t[r]||t["is"+r];if(typeof s=="function"&&(s=s.call(t)),s)return t[r]=!0,t.type=r,r}return null}});var uk=w((dPe,eX)=>{eX.exports=zc;var IEe=Er(),NEe=be(),lk=za();NEe(zc,lk);function zc(t){var e=this;if(!(e instanceof zc))throw new Error("LinkReader must be called as constructor.");if(!(t.type==="Link"&&t.Link||t.type==="SymbolicLink"&&t.SymbolicLink))throw new Error("Non-link type "+t.type);lk.call(e,t)}zc.prototype._stat=function(t){var e=this;IEe.readlink(e._path,function(r,i){if(r)return e.error(r);e.linkpath=e.props.linkpath=i,e.emit("linkpath",i),lk.prototype._stat.call(e,t)})};zc.prototype._read=function(){var t=this;t._paused||t._ended||(t.emit("end"),t.emit("close"),t._ended=!0)}});var ck=w((pPe,iX)=>{iX.exports=Bi;var rX=Er(),DEe=be(),Xc=Y("path"),fk=za(),tX=Y("assert").ok;DEe(Bi,fk);function Bi(t){var e=this;if(!(e instanceof Bi))throw new Error("DirReader must be called as constructor.");if(t.type!=="Directory"||!t.Directory)throw new Error("Non-directory type "+t.type);e.entries=null,e._index=-1,e._paused=!1,e._length=-1,t.sort&&(this.sort=t.sort),fk.call(this,t)}Bi.prototype._getEntries=function(){var t=this;t._gotEntries||(t._gotEntries=!0,rX.readdir(t._path,function(e,r){if(e)return t.error(e);t.entries=r,t.emit("entries",r),t._paused?t.once("resume",i):i();function i(){t._length=t.entries.length,typeof t.sort=="function"&&(t.entries=t.entries.sort(t.sort.bind(t))),t._read()}}))};Bi.prototype._read=function(){var t=this;if(!t.entries)return t._getEntries();if(!(t._paused||t._currentEntry||t._aborted)){if(t._index++,t._index>=t.entries.length){t._ended||(t._ended=!0,t.emit("end"),t.emit("close"));return}var e=Xc.resolve(t._path,t.entries[t._index]);tX(e!==t._path),tX(t.entries[t._index]),t._currentEntry=e,rX[t.props.follow?"stat":"lstat"](e,function(r,i){if(r)return t.error(r);var n=t._proxy||t;i.path=e,i.basename=Xc.basename(e),i.dirname=Xc.dirname(e);var s=t.getChildProps.call(n,i);s.path=e,s.basename=Xc.basename(e),s.dirname=Xc.dirname(e);var a=fk(s,i);t._currentEntry=a,a.on("pause",function(f){!t._paused&&!a._disowned&&t.pause(f)}),a.on("resume",function(f){t._paused&&!a._disowned&&t.resume(f)}),a.on("stat",function(f){t.emit("_entryStat",a,f),!a._aborted&&(a._paused?a.once("resume",function(){t.emit("entryStat",a,f)}):t.emit("entryStat",a,f))}),a.on("ready",function f(){if(t._paused)return a.pause(t),t.once("resume",f);a.type==="Socket"?t.emit("socket",a):t.emitEntry(a)});var o=!1;a.on("close",u),a.on("disown",u);function u(){o||(o=!0,t.emit("childEnd",a),t.emit("entryEnd",a),t._currentEntry=null,t._paused||t._read())}a.on("error",function(f){a._swallowErrors?(t.warn(f),a.emit("end"),a.emit("close")):t.emit("error",f)}),["child","childEnd","warn"].forEach(function(f){a.on(f,t.emit.bind(t,f))})})}};Bi.prototype.disown=function(t){t.emit("beforeDisown"),t._disowned=!0,t.parent=t.root=null,t===this._currentEntry&&(this._currentEntry=null),t.emit("disown")};Bi.prototype.getChildProps=function(){return{depth:this.depth+1,root:this.root||this,parent:this,follow:this.follow,filter:this.filter,sort:this.props.sort,hardlinks:this.props.hardlinks}};Bi.prototype.pause=function(t){var e=this;e._paused||(t=t||e,e._paused=!0,e._currentEntry&&e._currentEntry.pause&&e._currentEntry.pause(t),e.emit("pause",t))};Bi.prototype.resume=function(t){var e=this;e._paused&&(t=t||e,e._paused=!1,e.emit("resume",t),!e._paused&&(e._currentEntry?e._currentEntry.resume&&e._currentEntry.resume(t):e._read()))};Bi.prototype.emitEntry=function(t){this.emit("entry",t),this.emit("child",t)}});var hk=w((gPe,oX)=>{oX.exports=Xa;var FEe=Er(),MEe=be(),nX=za(),sX={EOF:!0},aX={CLOSE:!0};MEe(Xa,nX);function Xa(t){var e=this;if(!(e instanceof Xa))throw new Error("FileReader must be called as constructor.");if(!(t.type==="Link"&&t.Link||t.type==="File"&&t.File))throw new Error("Non-file type "+t.type);e._buffer=[],e._bytesEmitted=0,nX.call(e,t)}Xa.prototype._getStream=function(){var t=this,e=t._stream=FEe.createReadStream(t._path,t.props);t.props.blksize&&(e.bufferSize=t.props.blksize),e.on("open",t.emit.bind(t,"open")),e.on("data",function(r){if(t._bytesEmitted+=r.length,r.length)t._paused||t._buffer.length?(t._buffer.push(r),t._read()):t.emit("data",r);else return}),e.on("end",function(){t._paused||t._buffer.length?(t._buffer.push(sX),t._read()):t.emit("end"),t._bytesEmitted!==t.props.size&&t.error(`Didn't get expected byte count
224
+ expect: `+t.props.size+`
225
+ actual: `+t._bytesEmitted)}),e.on("close",function(){t._paused||t._buffer.length?(t._buffer.push(aX),t._read()):t.emit("close")}),e.on("error",function(r){t.emit("error",r)}),t._read()};Xa.prototype._read=function(){var t=this;if(!t._paused){if(!t._stream)return t._getStream();if(t._buffer.length){for(var e=t._buffer,r=0,i=e.length;r<i;r++){var n=e[r];if(n===sX?t.emit("end"):n===aX?t.emit("close"):t.emit("data",n),t._paused){t._buffer=e.slice(r);return}}t._buffer.length=0}}};Xa.prototype.pause=function(t){var e=this;e._paused||(t=t||e,e._paused=!0,e._stream&&e._stream.pause(),e.emit("pause",t))};Xa.prototype.resume=function(t){var e=this;e._paused&&(t=t||e,e.emit("resume",t),e._paused=!1,e._stream&&e._stream.resume(),e._read())}});var fX=w((mPe,uX)=>{uX.exports=gy;var PEe=be(),lX=za();PEe(gy,lX);function gy(t){var e=this;if(!(e instanceof gy))throw new Error("SocketReader must be called as constructor.");if(!(t.type==="Socket"&&t.Socket))throw new Error("Non-socket type "+t.type);lX.call(e,t)}gy.prototype._read=function(){var t=this;t._paused||t._ended||(t.emit("end"),t.emit("close"),t._ended=!0)}});var pk=w((yPe,cX)=>{cX.exports=Va;var dk=za(),qEe=Hc(),LEe=be(),BEe=Er();LEe(Va,dk);function Va(t){var e=this;if(!(e instanceof Va))throw new Error("ProxyReader must be called as constructor.");e.props=t,e._buffer=[],e.ready=!1,dk.call(e,t)}Va.prototype._stat=function(){var t=this,e=t.props,r=e.follow?"stat":"lstat";BEe[r](e.path,function(i,n){var s;i||!n?s="File":s=qEe(n),e[s]=!0,e.type=t.type=s,t._old=n,t._addProxy(dk(e,n))})};Va.prototype._addProxy=function(t){var e=this;if(e._proxyTarget)return e.error("proxy already set");e._proxyTarget=t,t._proxy=e,["error","data","end","close","linkpath","entry","entryEnd","child","childEnd","warn","stat"].forEach(function(i){t.on(i,e.emit.bind(e,i))}),e.emit("proxy",t),t.on("ready",function(){e.ready=!0,e.emit("ready")});var r=e._buffer;e._buffer.length=0,r.forEach(function(i){t[i[0]].apply(t,i[1])})};Va.prototype.pause=function(){return this._proxyTarget?this._proxyTarget.pause():!1};Va.prototype.resume=function(){return this._proxyTarget?this._proxyTarget.resume():!1}});var za=w((vPe,pX)=>{pX.exports=gi;var jEe=Er(),$Ee=Y("stream").Stream,UEe=be(),gk=Y("path"),mk=Hc(),my=gi.hardLinks={},hX=py();UEe(gi,hX);var dX=uk();function gi(t,e){var r=this;if(!(r instanceof gi))return new gi(t,e);typeof t=="string"&&(t={path:t});var i,n;switch(t.type&&typeof t.type=="function"?(i=t.type,n=i):(i=mk(t),n=gi),e&&!i&&(i=mk(e),t[i]=!0,t.type=i),i){case"Directory":n=ck();break;case"Link":case"File":n=hk();break;case"SymbolicLink":n=dX;break;case"Socket":n=fX();break;case null:n=pk();break}if(!(r instanceof n))return new n(t);hX.call(r),t.path||r.error("Must provide a path",null,!0),r.readable=!0,r.writable=!1,r.type=i,r.props=t,r.depth=t.depth=t.depth||0,r.parent=t.parent||null,r.root=t.root||t.parent&&t.parent.root||r,r._path=r.path=gk.resolve(t.path),process.platform==="win32"&&(r.path=r._path=r.path.replace(/\?/g,"_"),r._path.length>=260&&(r._swallowErrors=!0,r._path="\\\\?\\"+r.path.replace(/\//g,"\\"))),r.basename=t.basename=gk.basename(r.path),r.dirname=t.dirname=gk.dirname(r.path),t.parent=t.root=null,r.size=t.size,r.filter=typeof t.filter=="function"?t.filter:null,t.sort==="alpha"&&(t.sort=WEe),r._stat(e)}function WEe(t,e){return t===e?0:t.toLowerCase()>e.toLowerCase()?1:t.toLowerCase()<e.toLowerCase()?-1:t>e?1:-1}gi.prototype._stat=function(t){var e=this,r=e.props,i=r.follow?"stat":"lstat";t?process.nextTick(n.bind(null,null,t)):jEe[i](e._path,n);function n(s,a){if(s)return e.error(s);if(Object.keys(a).forEach(function(p){r[p]=a[p]}),e.size!==void 0&&r.size!==e.size)return e.error("incorrect size");e.size=r.size;var o=mk(r),u=r.hardlinks!==!1;if(u&&o!=="Directory"&&r.nlink&&r.nlink>1){var f=r.dev+":"+r.ino;my[f]===e._path||!my[f]?my[f]=e._path:(o=e.type=e.props.type="Link",e.Link=e.props.Link=!0,e.linkpath=e.props.linkpath=my[f],e._stat=e._read=dX.prototype._read)}if(e.type&&e.type!==o&&e.error("Unexpected type: "+o),e.filter){var c=e._proxy||e;if(!e.filter.call(c,c,r)){e._disowned||(e.abort(),e.emit("end"),e.emit("close"));return}}var h=["_stat","stat","ready"],d=0;(function p(){if(e._aborted){e.emit("end"),e.emit("close");return}if(e._paused&&e.type!=="Directory"){e.once("resume",p);return}var g=h[d++];if(!g)return e._read();e.emit(g,r),p()})()}};gi.prototype.pipe=function(t){var e=this;return typeof t.add=="function"&&e.on("entry",function(r){var i=t.add(r);i===!1&&e.pause()}),$Ee.prototype.pipe.apply(this,arguments)};gi.prototype.pause=function(t){this._paused=!0,t=t||this,this.emit("pause",t),this._stream&&this._stream.pause(t)};gi.prototype.resume=function(t){this._paused=!1,t=t||this,this.emit("resume",t),this._stream&&this._stream.resume(t),this._read()};gi.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}});var wk=w((_Pe,xX)=>{xX.exports=_k;_k.sync=bX;var Xe=Y("assert"),vX=Y("path"),gX=Y("fs"),tu=void 0;try{tu=cc()}catch{}var _X=parseInt("666",8),HEe={nosort:!0,silent:!0},yk=0,Vc=process.platform==="win32";function wX(t){var e=["unlink","chmod","stat","lstat","rmdir","readdir"];if(e.forEach(function(r){t[r]=t[r]||gX[r],r=r+"Sync",t[r]=t[r]||gX[r]}),t.maxBusyTries=t.maxBusyTries||3,t.emfileWait=t.emfileWait||1e3,t.glob===!1&&(t.disableGlob=!0),t.disableGlob!==!0&&tu===void 0)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");t.disableGlob=t.disableGlob||!1,t.glob=t.glob||HEe}function _k(t,e,r){typeof e=="function"&&(r=e,e={}),Xe(t,"rimraf: missing path"),Xe.equal(typeof t,"string","rimraf: path should be a string"),Xe.equal(typeof r,"function","rimraf: callback function required"),Xe(e,"rimraf: invalid options argument provided"),Xe.equal(typeof e,"object","rimraf: options should be object"),wX(e);var i=0,n=null,s=0;if(e.disableGlob||!tu.hasMagic(t))return o(null,[t]);e.lstat(t,function(u,f){if(!u)return o(null,[t]);tu(t,e.glob,o)});function a(u){n=n||u,--s===0&&r(n)}function o(u,f){if(u)return r(u);if(s=f.length,s===0)return r();f.forEach(function(c){vk(c,e,function h(d){if(d){if((d.code==="EBUSY"||d.code==="ENOTEMPTY"||d.code==="EPERM")&&i<e.maxBusyTries){i++;var p=i*100;return setTimeout(function(){vk(c,e,h)},p)}if(d.code==="EMFILE"&&yk<e.emfileWait)return setTimeout(function(){vk(c,e,h)},yk++);d.code==="ENOENT"&&(d=null)}yk=0,a(d)})})}}function vk(t,e,r){Xe(t),Xe(e),Xe(typeof r=="function"),e.lstat(t,function(i,n){if(i&&i.code==="ENOENT")return r(null);if(i&&i.code==="EPERM"&&Vc&&mX(t,e,i,r),n&&n.isDirectory())return yy(t,e,i,r);e.unlink(t,function(s){if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return Vc?mX(t,e,s,r):yy(t,e,s,r);if(s.code==="EISDIR")return yy(t,e,s,r)}return r(s)})})}function mX(t,e,r,i){Xe(t),Xe(e),Xe(typeof i=="function"),r&&Xe(r instanceof Error),e.chmod(t,_X,function(n){n?i(n.code==="ENOENT"?null:r):e.stat(t,function(s,a){s?i(s.code==="ENOENT"?null:r):a.isDirectory()?yy(t,e,r,i):e.unlink(t,i)})})}function yX(t,e,r){Xe(t),Xe(e),r&&Xe(r instanceof Error);try{e.chmodSync(t,_X)}catch(n){if(n.code==="ENOENT")return;throw r}try{var i=e.statSync(t)}catch(n){if(n.code==="ENOENT")return;throw r}i.isDirectory()?vy(t,e,r):e.unlinkSync(t)}function yy(t,e,r,i){Xe(t),Xe(e),r&&Xe(r instanceof Error),Xe(typeof i=="function"),e.rmdir(t,function(n){n&&(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")?zEe(t,e,i):n&&n.code==="ENOTDIR"?i(r):i(n)})}function zEe(t,e,r){Xe(t),Xe(e),Xe(typeof r=="function"),e.readdir(t,function(i,n){if(i)return r(i);var s=n.length;if(s===0)return e.rmdir(t,r);var a;n.forEach(function(o){_k(vX.join(t,o),e,function(u){if(!a){if(u)return r(a=u);--s===0&&e.rmdir(t,r)}})})})}function bX(t,e){e=e||{},wX(e),Xe(t,"rimraf: missing path"),Xe.equal(typeof t,"string","rimraf: path should be a string"),Xe(e,"rimraf: missing options"),Xe.equal(typeof e,"object","rimraf: options should be object");var r;if(e.disableGlob||!tu.hasMagic(t))r=[t];else try{e.lstatSync(t),r=[t]}catch{r=tu.sync(t,e.glob)}if(r.length)for(var i=0;i<r.length;i++){var t=r[i];try{var n=e.lstatSync(t)}catch(a){if(a.code==="ENOENT")return;a.code==="EPERM"&&Vc&&yX(t,e,a)}try{n&&n.isDirectory()?vy(t,e,null):e.unlinkSync(t)}catch(a){if(a.code==="ENOENT")return;if(a.code==="EPERM")return Vc?yX(t,e,a):vy(t,e,a);if(a.code!=="EISDIR")throw a;vy(t,e,a)}}}function vy(t,e,r){Xe(t),Xe(e),r&&Xe(r instanceof Error);try{e.rmdirSync(t)}catch(i){if(i.code==="ENOENT")return;if(i.code==="ENOTDIR")throw r;(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")&&XEe(t,e)}}function XEe(t,e){Xe(t),Xe(e),e.readdirSync(t).forEach(function(a){bX(vX.join(t,a),e)});var r=Vc?100:1,i=0;do{var n=!0;try{var s=e.rmdirSync(t,e);return n=!1,s}finally{if(++i<r&&n)continue}}while(!0)}});var bk=w((wPe,TX)=>{var Gc=Y("path"),SX=Y("fs"),EX=parseInt("0777",8);TX.exports=ru.mkdirp=ru.mkdirP=ru;function ru(t,e,r,i){typeof e=="function"?(r=e,e={}):(!e||typeof e!="object")&&(e={mode:e});var n=e.mode,s=e.fs||SX;n===void 0&&(n=EX),i||(i=null);var a=r||function(){};t=Gc.resolve(t),s.mkdir(t,n,function(o){if(!o)return i=i||t,a(null,i);switch(o.code){case"ENOENT":if(Gc.dirname(t)===t)return a(o);ru(Gc.dirname(t),e,function(u,f){u?a(u,f):ru(t,e,a,f)});break;default:s.stat(t,function(u,f){u||!f.isDirectory()?a(o,i):a(null,i)});break}})}ru.sync=function t(e,r,i){(!r||typeof r!="object")&&(r={mode:r});var n=r.mode,s=r.fs||SX;n===void 0&&(n=EX),i||(i=null),e=Gc.resolve(e);try{s.mkdirSync(e,n),i=i||e}catch(o){switch(o.code){case"ENOENT":i=t(Gc.dirname(e),r,i),t(e,r,i);break;default:var a;try{a=s.statSync(e)}catch{throw o}if(!a.isDirectory())throw o;break}}return i}});var _y=w((bPe,CX)=>{CX.exports=xk;function xk(t){if(t._collected)return;if(t._paused)return t.on("resume",xk.bind(null,t));t._collected=!0,t.pause(),t.on("data",r),t.on("end",r);var e=[];function r(a){typeof a=="string"&&(a=new Buffer(a)),!(Buffer.isBuffer(a)&&!a.length)&&e.push(a)}t.on("entry",n);var i=[];function n(a){xk(a),i.push(a)}t.on("proxy",s);function s(a){a.pause()}t.pipe=(function(a){return function(o){var u=0;(function c(){var h=i[u++];if(!h)return f();h.on("end",c),o?o.add(h):t.emit("entry",h)})();function f(){t.removeListener("entry",n),t.removeListener("data",r),t.removeListener("end",r),t.pipe=a,o&&t.pipe(o),e.forEach(function(c){c?t.emit("data",c):t.emit("end")}),t.resume()}return o}})(t.pipe)}});var Sk=w((xPe,RX)=>{RX.exports=Rs;var wy=iu(),VEe=be(),GEe=bk(),kX=Y("path"),ZEe=_y();VEe(Rs,wy);function Rs(t){var e=this;e instanceof Rs||e.error("DirWriter must be called as constructor.",null,!0),(t.type!=="Directory"||!t.Directory)&&e.error("Non-directory type "+t.type+" "+JSON.stringify(t),null,!0),wy.call(this,t)}Rs.prototype._create=function(){var t=this;GEe(t._path,wy.dirmode,function(e){if(e)return t.error(e);t.ready=!0,t.emit("ready"),t._process()})};Rs.prototype.write=function(){return!0};Rs.prototype.end=function(){this._ended=!0,this._process()};Rs.prototype.add=function(t){var e=this;return ZEe(t),!e.ready||e._currentEntry?(e._buffer.push(t),!1):e._ended?e.error("add after end"):(e._buffer.push(t),e._process(),this._buffer.length===0)};Rs.prototype._process=function(){var t=this;if(t._processing)return;var e=t._buffer.shift();if(!e){t.emit("drain"),t._ended&&t._finish();return}t._processing=!0,t.emit("entry",e);var r=e,i;do{if(i=r._path||r.path,i===t.root._path||i===t._path||i&&i.indexOf(t._path)===0)return t._processing=!1,e._collected&&e.pipe(),t._process();r=r.parent}while(r);var n={parent:t,root:t.root||t,type:e.type,depth:t.depth+1};i=e._path||e.path||e.props.path,e.parent&&(i=i.substr(e.parent._path.length+1)),n.path=kX.join(t.path,kX.join("/",i)),n.filter=t.filter,Object.keys(e.props).forEach(function(u){n.hasOwnProperty(u)||(n[u]=e.props[u])});var s=t._currentChild=new wy(n);s.on("ready",function(){e.pipe(s),e.resume()}),s.on("error",function(u){s._swallowErrors?(t.warn(u),s.emit("end"),s.emit("close")):t.emit("error",u)}),s.on("close",o);var a=!1;function o(){a||(a=!0,t._currentChild=null,t._processing=!1,t._process())}}});var Ek=w((SPe,DX)=>{DX.exports=Zc;var OX=Er(),IX=iu(),YEe=be(),KEe=Y("path"),QEe=wk();YEe(Zc,IX);function Zc(t){var e=this;if(!(e instanceof Zc))throw new Error("LinkWriter must be called as constructor.");if(!(t.type==="Link"&&t.Link||t.type==="SymbolicLink"&&t.SymbolicLink))throw new Error("Non-link type "+t.type);t.linkpath===""&&(t.linkpath="."),t.linkpath||e.error("Need linkpath property to create "+t.type),IX.call(this,t)}Zc.prototype._create=function(){var t=this,e=t.type==="Link"||process.platform==="win32",r=e?"link":"symlink",i=e?KEe.resolve(t.dirname,t.linkpath):t.linkpath;if(e)return AX(t,i,r);OX.readlink(t._path,function(n,s){if(s&&s===i)return NX(t);AX(t,i,r)})};function AX(t,e,r){QEe(t._path,function(i){if(i)return t.error(i);JEe(t,e,r)})}function JEe(t,e,r){OX[r](e,t._path,function(i){if(i)if((i.code==="ENOENT"||i.code==="EACCES"||i.code==="EPERM")&&process.platform==="win32")t.ready=!0,t.emit("ready"),t.emit("end"),t.emit("close"),t.end=t._finish=function(){};else return t.error(i);NX(t)})}function NX(t){t.ready=!0,t.emit("ready"),t._ended&&!t._finished&&t._finish()}Zc.prototype.end=function(){this._ended=!0,this.ready&&(this._finished=!0,this._finish())}});var Tk=w((EPe,MX)=>{MX.exports=Ga;var eTe=Er(),by=iu(),tTe=be(),FX={};tTe(Ga,by);function Ga(t){var e=this;if(!(e instanceof Ga))throw new Error("FileWriter must be called as constructor.");if(t.type!=="File"||!t.File)throw new Error("Non-file type "+t.type);e._buffer=[],e._bytesWritten=0,by.call(this,t)}Ga.prototype._create=function(){var t=this;if(!t._stream){var e={};t.props.flags&&(e.flags=t.props.flags),e.mode=by.filemode,t._old&&t._old.blksize&&(e.bufferSize=t._old.blksize),t._stream=eTe.createWriteStream(t._path,e),t._stream.on("open",function(){t.ready=!0,t._buffer.forEach(function(r){r===FX?t._stream.end():t._stream.write(r)}),t.emit("ready"),t.emit("drain")}),t._stream.on("error",function(r){t.emit("error",r)}),t._stream.on("drain",function(){t.emit("drain")}),t._stream.on("close",function(){t._finish()})}};Ga.prototype.write=function(t){var e=this;if(e._bytesWritten+=t.length,!e.ready){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new Error("invalid write data");return e._buffer.push(t),!1}var r=e._stream.write(t);return r===!1&&e._stream._queue?e._stream._queue.length<=2:r};Ga.prototype.end=function(t){var e=this;return t&&e.write(t),e.ready?e._stream.end():(e._buffer.push(FX),!1)};Ga.prototype._finish=function(){var t=this;typeof t.size=="number"&&t._bytesWritten!==t.size&&t.error(`Did not get expected byte count.
226
+ expect: `+t.size+`
227
+ actual: `+t._bytesWritten),by.prototype._finish.call(t)}});var kk=w((TPe,PX)=>{PX.exports=As;var Ck=iu(),rTe=Hc(),iTe=be(),nTe=_y(),sTe=Y("fs");iTe(As,Ck);function As(t){var e=this;if(!(e instanceof As))throw new Error("ProxyWriter must be called as constructor.");e.props=t,e._needDrain=!1,Ck.call(e,t)}As.prototype._stat=function(){var t=this,e=t.props,r=e.follow?"stat":"lstat";sTe[r](e.path,function(i,n){var s;i||!n?s="File":s=rTe(n),e[s]=!0,e.type=t.type=s,t._old=n,t._addProxy(Ck(e,n))})};As.prototype._addProxy=function(t){var e=this;if(e._proxy)return e.error("proxy already set");e._proxy=t,["ready","error","close","pipe","drain","warn"].forEach(function(i){t.on(i,e.emit.bind(e,i))}),e.emit("proxy",t);var r=e._buffer;r.forEach(function(i){t[i[0]].apply(t,i[1])}),e._buffer.length=0,e._needsDrain&&e.emit("drain")};As.prototype.add=function(t){return nTe(t),this._proxy?this._proxy.add(t):(this._buffer.push(["add",[t]]),this._needDrain=!0,!1)};As.prototype.write=function(t){return this._proxy?this._proxy.write(t):(this._buffer.push(["write",[t]]),this._needDrain=!0,!1)};As.prototype.end=function(t){return this._proxy?this._proxy.end(t):(this._buffer.push(["end",[t]]),!1)}});var iu=w((CPe,zX)=>{zX.exports=ei;var Jr=Er(),aTe=be(),oTe=wk(),lTe=bk(),Yc=Y("path"),LX=process.platform==="win32"?0:process.umask(),BX=Hc(),jX=py();aTe(ei,jX);ei.dirmode=parseInt("0777",8)&~LX;ei.filemode=parseInt("0666",8)&~LX;var uTe=Sk(),fTe=Ek(),cTe=Tk(),hTe=kk();function ei(t,e){var r=this;typeof t=="string"&&(t={path:t});var i=BX(t),n=ei;switch(i){case"Directory":n=uTe;break;case"File":n=cTe;break;case"Link":case"SymbolicLink":n=fTe;break;default:n=hTe;break}if(!(r instanceof n))return new n(t);jX.call(r),t.path||r.error("Must provide a path",null,!0),r.type=t.type,r.props=t,r.depth=t.depth||0,r.clobber=t.clobber===!1?t.clobber:!0,r.parent=t.parent||null,r.root=t.root||t.parent&&t.parent.root||r,r._path=r.path=Yc.resolve(t.path),process.platform==="win32"&&(r.path=r._path=r.path.replace(/\?/g,"_"),r._path.length>=260&&(r._swallowErrors=!0,r._path="\\\\?\\"+r.path.replace(/\//g,"\\"))),r.basename=Yc.basename(t.path),r.dirname=Yc.dirname(t.path),r.linkpath=t.linkpath||null,t.parent=t.root=null,r.size=t.size,typeof t.mode=="string"&&(t.mode=parseInt(t.mode,8)),r.readable=!1,r.writable=!0,r._buffer=[],r.ready=!1,r.filter=typeof t.filter=="function"?t.filter:null,r._stat(e)}ei.prototype._create=function(){var t=this;Jr[t.props.follow?"stat":"lstat"](t._path,function(e){if(e)return t.warn("Cannot create "+t._path+`
228
+ Unsupported type: `+t.type,"ENOTSUP");t._finish()})};ei.prototype._stat=function(t){var e=this,r=e.props,i=r.follow?"stat":"lstat",n=e._proxy||e;t?s(null,t):Jr[i](e._path,s);function s(a,o){if(e.filter&&!e.filter.call(n,n,o)){e._aborted=!0,e.emit("end"),e.emit("close");return}if(a||!o)return Rk(e);e._old=o;var u=BX(o);if(u!==e.type||e.type==="File"&&o.nlink>1)return oTe(e._path,function(f){if(f)return e.error(f);e._old=null,Rk(e)});Rk(e)}};function Rk(t){lTe(Yc.dirname(t._path),ei.dirmode,function(e,r){return e?t.error(e):(t._madeDir=r,t._create())})}function $X(t,e,r,i,n){var s=e.mode,a=e.follow||t.type!=="SymbolicLink"?"chmod":"lchmod";if(!Jr[a]||typeof s!="number")return n();var o=r.mode&parseInt("0777",8);if(s=s&parseInt("0777",8),s===o)return n();Jr[a](i,s,n)}function UX(t,e,r,i,n){if(process.platform==="win32"||!process.getuid||process.getuid()!==0||typeof e.uid!="number"&&typeof e.gid!="number"||r.uid===e.uid&&r.gid===e.gid)return n();var s=t.props.follow||t.type!=="SymbolicLink"?"chown":"lchown";if(!Jr[s])return n();typeof e.uid!="number"&&(e.uid=r.uid),typeof e.gid!="number"&&(e.gid=r.gid),Jr[s](i,e.uid,e.gid,n)}function WX(t,e,r,i,n){if(!Jr.utimes||process.platform==="win32")return n();var s=e.follow||t.type!=="SymbolicLink"?"utimes":"lutimes";if(s==="lutimes"&&!Jr[s]&&(s="utimes"),!Jr[s])return n();var a=r.atime,o=r.mtime,u=e.atime,f=e.mtime;if(u===void 0&&(u=a),f===void 0&&(f=o),qX(u)||(u=new Date(u)),qX(f)||(u=new Date(f)),u.getTime()===a.getTime()&&f.getTime()===o.getTime())return n();Jr[s](i,u,f,n)}ei.prototype._finish=function(){var t=this;if(t._finishing)return;t._finishing=!0;var e=0,r=null,i=!1;if(t._old)t._old.atime=new Date(0),t._old.mtime=new Date(0),s(t._old);else{var n=t.props.follow?"stat":"lstat";Jr[n](t._path,function(o,u){if(o)if(o.code==="ENOENT"&&(t.type==="Link"||t.type==="SymbolicLink")&&process.platform==="win32"){t.ready=!0,t.emit("ready"),t.emit("end"),t.emit("close"),t.end=t._finish=function(){};return}else return t.error(o);s(t._old=u)})}return;function s(o){e+=3,$X(t,t.props,o,t._path,a("chmod")),UX(t,t.props,o,t._path,a("chown")),WX(t,t.props,o,t._path,a("utimes"))}function a(o){return function(u){if(r)return;if(u)return u.fstream_finish_call=o,t.error(r=u);if(--e>0||i)return;if(i=!0,t._madeDir)HX(t,t._path,f);else return f();function f(c){if(c)return c.fstream_finish_call="setupMadeDir",t.error(c);t.emit("end"),t.emit("close")}}}};function HX(t,e,r){var i=t._madeDir,n=Yc.dirname(e);dTe(t,n,function(s){if(s)return r(s);if(n===i)return r();HX(t,n,r)})}function dTe(t,e,r){var i={};Object.keys(t.props).forEach(function(o){i[o]=t.props[o],o==="mode"&&t.type!=="Directory"&&(i[o]=i[o]|parseInt("0111",8))});var n=3,s=null;Jr.stat(e,function(o,u){if(o)return r(s=o);$X(t,i,u,e,a),UX(t,i,u,e,a),WX(t,i,u,e,a)});function a(o){if(!s){if(o)return r(s=o);if(--n===0)return r()}}}ei.prototype.pipe=function(){this.error("Can't pipe from writable stream")};ei.prototype.add=function(){this.error("Can't add to non-Directory type")};ei.prototype.write=function(){return!0};function pTe(t){return Object.prototype.toString.call(t)}function qX(t){return typeof t=="object"&&pTe(t)==="[object Date]"}});var Ak=w(De=>{De.Abstract=py();De.Reader=za();De.Writer=iu();De.File={Reader:hk(),Writer:Tk()};De.Dir={Reader:ck(),Writer:Sk()};De.Link={Reader:uk(),Writer:Ek()};De.Proxy={Reader:pk(),Writer:kk()};De.Reader.Dir=De.DirReader=De.Dir.Reader;De.Reader.File=De.FileReader=De.File.Reader;De.Reader.Link=De.LinkReader=De.Link.Reader;De.Reader.Proxy=De.ProxyReader=De.Proxy.Reader;De.Writer.Dir=De.DirWriter=De.Dir.Writer;De.Writer.File=De.FileWriter=De.File.Writer;De.Writer.Link=De.LinkWriter=De.Link.Writer;De.Writer.Proxy=De.ProxyWriter=De.Proxy.Writer;De.collect=_y()});var VX=w((RPe,XX)=>{XX.exports=wTe;var gTe=iy(),mTe=Ak().Writer,Ok=Y("path"),yTe=Y("stream"),vTe=ak(),_Te=Ts();function wTe(t){t.path=Ok.resolve(Ok.normalize(t.path));var e=new gTe(t),r=new yTe.Writable({objectMode:!0});r._write=function(n,s,a){if(n.type=="Directory")return a();var o=Ok.join(t.path,n.path);if(o.indexOf(t.path)!=0)return a();let u=t.getWriter?t.getWriter({path:o}):mTe({path:o});n.pipe(u).on("error",a).on("close",a)};var i=vTe(e,r);return e.once("crx-header",function(n){i.crxHeader=n}),e.pipe(r).on("finish",function(){i.emit("close")}),i.promise=function(){return new _Te(function(n,s){i.on("close",n),i.on("error",s)})},i}});var GX=w((APe,xy)=>{var Pt=(function(t){"use strict";var e=1e7,r=7,i=9007199254740992,n=d(i),s="0123456789abcdefghijklmnopqrstuvwxyz",a=typeof BigInt=="function";function o(m,x,A,D){return typeof m>"u"?o[0]:typeof x<"u"?+x==10&&!A?le(m):ri(m,x,A,D):le(m)}function u(m,x){this.value=m,this.sign=x,this.isSmall=!1}u.prototype=Object.create(o.prototype);function f(m){this.value=m,this.sign=m<0,this.isSmall=!0}f.prototype=Object.create(o.prototype);function c(m){this.value=m}c.prototype=Object.create(o.prototype);function h(m){return-i<m&&m<i}function d(m){return m<1e7?[m]:m<1e14?[m%1e7,Math.floor(m/1e7)]:[m%1e7,Math.floor(m/1e7)%1e7,Math.floor(m/1e14)]}function p(m){g(m);var x=m.length;if(x<4&&$(m,n)<0)switch(x){case 0:return 0;case 1:return m[0];case 2:return m[0]+m[1]*e;default:return m[0]+(m[1]+m[2]*e)*e}return m}function g(m){for(var x=m.length;m[--x]===0;);m.length=x+1}function y(m){for(var x=new Array(m),A=-1;++A<m;)x[A]=0;return x}function v(m){return m>0?Math.floor(m):Math.ceil(m)}function b(m,x){var A=m.length,D=x.length,X=new Array(A),j=0,V=e,Q,ne;for(ne=0;ne<D;ne++)Q=m[ne]+x[ne]+j,j=Q>=V?1:0,X[ne]=Q-j*V;for(;ne<A;)Q=m[ne]+j,j=Q===V?1:0,X[ne++]=Q-j*V;return j>0&&X.push(j),X}function k(m,x){return m.length>=x.length?b(m,x):b(x,m)}function N(m,x){var A=m.length,D=new Array(A),X=e,j,V;for(V=0;V<A;V++)j=m[V]-X+x,x=Math.floor(j/X),D[V]=j-x*X,x+=1;for(;x>0;)D[V++]=x%X,x=Math.floor(x/X);return D}u.prototype.add=function(m){var x=le(m);if(this.sign!==x.sign)return this.subtract(x.negate());var A=this.value,D=x.value;return x.isSmall?new u(N(A,Math.abs(D)),this.sign):new u(k(A,D),this.sign)},u.prototype.plus=u.prototype.add,f.prototype.add=function(m){var x=le(m),A=this.value;if(A<0!==x.sign)return this.subtract(x.negate());var D=x.value;if(x.isSmall){if(h(A+D))return new f(A+D);D=d(Math.abs(D))}return new u(N(D,Math.abs(A)),A<0)},f.prototype.plus=f.prototype.add,c.prototype.add=function(m){return new c(this.value+le(m).value)},c.prototype.plus=c.prototype.add;function E(m,x){var A=m.length,D=x.length,X=new Array(A),j=0,V=e,Q,ne;for(Q=0;Q<D;Q++)ne=m[Q]-j-x[Q],ne<0?(ne+=V,j=1):j=0,X[Q]=ne;for(Q=D;Q<A;Q++){if(ne=m[Q]-j,ne<0)ne+=V;else{X[Q++]=ne;break}X[Q]=ne}for(;Q<A;Q++)X[Q]=m[Q];return g(X),X}function U(m,x,A){var D;return $(m,x)>=0?D=E(m,x):(D=E(x,m),A=!A),D=p(D),typeof D=="number"?(A&&(D=-D),new f(D)):new u(D,A)}function ee(m,x,A){var D=m.length,X=new Array(D),j=-x,V=e,Q,ne;for(Q=0;Q<D;Q++)ne=m[Q]+j,j=Math.floor(ne/V),ne%=V,X[Q]=ne<0?ne+V:ne;return X=p(X),typeof X=="number"?(A&&(X=-X),new f(X)):new u(X,A)}u.prototype.subtract=function(m){var x=le(m);if(this.sign!==x.sign)return this.add(x.negate());var A=this.value,D=x.value;return x.isSmall?ee(A,Math.abs(D),this.sign):U(A,D,this.sign)},u.prototype.minus=u.prototype.subtract,f.prototype.subtract=function(m){var x=le(m),A=this.value;if(A<0!==x.sign)return this.add(x.negate());var D=x.value;return x.isSmall?new f(A-D):ee(D,Math.abs(A),A>=0)},f.prototype.minus=f.prototype.subtract,c.prototype.subtract=function(m){return new c(this.value-le(m).value)},c.prototype.minus=c.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},f.prototype.negate=function(){var m=this.sign,x=new f(-this.value);return x.sign=!m,x},c.prototype.negate=function(){return new c(-this.value)},u.prototype.abs=function(){return new u(this.value,!1)},f.prototype.abs=function(){return new f(Math.abs(this.value))},c.prototype.abs=function(){return new c(this.value>=0?this.value:-this.value)};function F(m,x){var A=m.length,D=x.length,X=A+D,j=y(X),V=e,Q,ne,he,we,ve;for(he=0;he<A;++he){we=m[he];for(var Ce=0;Ce<D;++Ce)ve=x[Ce],Q=we*ve+j[he+Ce],ne=Math.floor(Q/V),j[he+Ce]=Q-ne*V,j[he+Ce+1]+=ne}return g(j),j}function L(m,x){var A=m.length,D=new Array(A),X=e,j=0,V,Q;for(Q=0;Q<A;Q++)V=m[Q]*x+j,j=Math.floor(V/X),D[Q]=V-j*X;for(;j>0;)D[Q++]=j%X,j=Math.floor(j/X);return D}function I(m,x){for(var A=[];x-- >0;)A.push(0);return A.concat(m)}function Z(m,x){var A=Math.max(m.length,x.length);if(A<=30)return F(m,x);A=Math.ceil(A/2);var D=m.slice(A),X=m.slice(0,A),j=x.slice(A),V=x.slice(0,A),Q=Z(X,V),ne=Z(D,j),he=Z(k(X,D),k(V,j)),we=k(k(Q,I(E(E(he,Q),ne),A)),I(ne,2*A));return g(we),we}function H(m,x){return-.012*m-.012*x+15e-6*m*x>0}u.prototype.multiply=function(m){var x=le(m),A=this.value,D=x.value,X=this.sign!==x.sign,j;if(x.isSmall){if(D===0)return o[0];if(D===1)return this;if(D===-1)return this.negate();if(j=Math.abs(D),j<e)return new u(L(A,j),X);D=d(j)}return H(A.length,D.length)?new u(Z(A,D),X):new u(F(A,D),X)},u.prototype.times=u.prototype.multiply;function O(m,x,A){return m<e?new u(L(x,m),A):new u(F(x,d(m)),A)}f.prototype._multiplyBySmall=function(m){return h(m.value*this.value)?new f(m.value*this.value):O(Math.abs(m.value),d(Math.abs(this.value)),this.sign!==m.sign)},u.prototype._multiplyBySmall=function(m){return m.value===0?o[0]:m.value===1?this:m.value===-1?this.negate():O(Math.abs(m.value),this.value,this.sign!==m.sign)},f.prototype.multiply=function(m){return le(m)._multiplyBySmall(this)},f.prototype.times=f.prototype.multiply,c.prototype.multiply=function(m){return new c(this.value*le(m).value)},c.prototype.times=c.prototype.multiply;function q(m){var x=m.length,A=y(x+x),D=e,X,j,V,Q,ne;for(V=0;V<x;V++){Q=m[V],j=0-Q*Q;for(var he=V;he<x;he++)ne=m[he],X=2*(Q*ne)+A[V+he]+j,j=Math.floor(X/D),A[V+he]=X-j*D;A[V+x]=j}return g(A),A}u.prototype.square=function(){return new u(q(this.value),!1)},f.prototype.square=function(){var m=this.value*this.value;return h(m)?new f(m):new u(q(d(Math.abs(this.value))),!1)},c.prototype.square=function(m){return new c(this.value*this.value)};function B(m,x){var A=m.length,D=x.length,X=e,j=y(x.length),V=x[D-1],Q=Math.ceil(X/(2*V)),ne=L(m,Q),he=L(x,Q),we,ve,Ce,gt,er,In,fu;for(ne.length<=A&&ne.push(0),he.push(0),V=he[D-1],ve=A-D;ve>=0;ve--){for(we=X-1,ne[ve+D]!==V&&(we=Math.floor((ne[ve+D]*X+ne[ve+D-1])/V)),Ce=0,gt=0,In=he.length,er=0;er<In;er++)Ce+=we*he[er],fu=Math.floor(Ce/X),gt+=ne[ve+er]-(Ce-fu*X),Ce=fu,gt<0?(ne[ve+er]=gt+X,gt=-1):(ne[ve+er]=gt,gt=0);for(;gt!==0;){for(we-=1,Ce=0,er=0;er<In;er++)Ce+=ne[ve+er]-X+he[er],Ce<0?(ne[ve+er]=Ce+X,Ce=0):(ne[ve+er]=Ce,Ce=1);gt+=Ce}j[ve]=we}return ne=T(ne,Q)[0],[p(j),p(ne)]}function J(m,x){for(var A=m.length,D=x.length,X=[],j=[],V=e,Q,ne,he,we,ve;A;){if(j.unshift(m[--A]),g(j),$(j,x)<0){X.push(0);continue}ne=j.length,he=j[ne-1]*V+j[ne-2],we=x[D-1]*V+x[D-2],ne>D&&(he=(he+1)*V),Q=Math.ceil(he/we);do{if(ve=L(x,Q),$(ve,j)<=0)break;Q--}while(Q);X.push(Q),j=E(j,ve)}return X.reverse(),[p(X),p(j)]}function T(m,x){var A=m.length,D=y(A),X=e,j,V,Q,ne;for(Q=0,j=A-1;j>=0;--j)ne=Q*X+m[j],V=v(ne/x),Q=ne-V*x,D[j]=V|0;return[D,Q|0]}function M(m,x){var A,D=le(x);if(a)return[new c(m.value/D.value),new c(m.value%D.value)];var X=m.value,j=D.value,V;if(j===0)throw new Error("Cannot divide by zero");if(m.isSmall)return D.isSmall?[new f(v(X/j)),new f(X%j)]:[o[0],m];if(D.isSmall){if(j===1)return[m,o[0]];if(j==-1)return[m.negate(),o[0]];var Q=Math.abs(j);if(Q<e){A=T(X,Q),V=p(A[0]);var ne=A[1];return m.sign&&(ne=-ne),typeof V=="number"?(m.sign!==D.sign&&(V=-V),[new f(V),new f(ne)]):[new u(V,m.sign!==D.sign),new f(ne)]}j=d(Q)}var he=$(X,j);if(he===-1)return[o[0],m];if(he===0)return[o[m.sign===D.sign?1:-1],o[0]];X.length+j.length<=200?A=B(X,j):A=J(X,j),V=A[0];var we=m.sign!==D.sign,ve=A[1],Ce=m.sign;return typeof V=="number"?(we&&(V=-V),V=new f(V)):V=new u(V,we),typeof ve=="number"?(Ce&&(ve=-ve),ve=new f(ve)):ve=new u(ve,Ce),[V,ve]}u.prototype.divmod=function(m){var x=M(this,m);return{quotient:x[0],remainder:x[1]}},c.prototype.divmod=f.prototype.divmod=u.prototype.divmod,u.prototype.divide=function(m){return M(this,m)[0]},c.prototype.over=c.prototype.divide=function(m){return new c(this.value/le(m).value)},f.prototype.over=f.prototype.divide=u.prototype.over=u.prototype.divide,u.prototype.mod=function(m){return M(this,m)[1]},c.prototype.mod=c.prototype.remainder=function(m){return new c(this.value%le(m).value)},f.prototype.remainder=f.prototype.mod=u.prototype.remainder=u.prototype.mod,u.prototype.pow=function(m){var x=le(m),A=this.value,D=x.value,X,j,V;if(D===0)return o[1];if(A===0)return o[0];if(A===1)return o[1];if(A===-1)return x.isEven()?o[1]:o[-1];if(x.sign)return o[0];if(!x.isSmall)throw new Error("The exponent "+x.toString()+" is too large.");if(this.isSmall&&h(X=Math.pow(A,D)))return new f(v(X));for(j=this,V=o[1];D&!0&&(V=V.times(j),--D),D!==0;)D/=2,j=j.square();return V},f.prototype.pow=u.prototype.pow,c.prototype.pow=function(m){var x=le(m),A=this.value,D=x.value,X=BigInt(0),j=BigInt(1),V=BigInt(2);if(D===X)return o[1];if(A===X)return o[0];if(A===j)return o[1];if(A===BigInt(-1))return x.isEven()?o[1]:o[-1];if(x.isNegative())return new c(X);for(var Q=this,ne=o[1];(D&j)===j&&(ne=ne.times(Q),--D),D!==X;)D/=V,Q=Q.square();return ne},u.prototype.modPow=function(m,x){if(m=le(m),x=le(x),x.isZero())throw new Error("Cannot take modPow with modulus 0");var A=o[1],D=this.mod(x);for(m.isNegative()&&(m=m.multiply(o[-1]),D=D.modInv(x));m.isPositive();){if(D.isZero())return o[0];m.isOdd()&&(A=A.multiply(D).mod(x)),m=m.divide(2),D=D.square().mod(x)}return A},c.prototype.modPow=f.prototype.modPow=u.prototype.modPow;function $(m,x){if(m.length!==x.length)return m.length>x.length?1:-1;for(var A=m.length-1;A>=0;A--)if(m[A]!==x[A])return m[A]>x[A]?1:-1;return 0}u.prototype.compareAbs=function(m){var x=le(m),A=this.value,D=x.value;return x.isSmall?1:$(A,D)},f.prototype.compareAbs=function(m){var x=le(m),A=Math.abs(this.value),D=x.value;return x.isSmall?(D=Math.abs(D),A===D?0:A>D?1:-1):-1},c.prototype.compareAbs=function(m){var x=this.value,A=le(m).value;return x=x>=0?x:-x,A=A>=0?A:-A,x===A?0:x>A?1:-1},u.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var x=le(m),A=this.value,D=x.value;return this.sign!==x.sign?x.sign?1:-1:x.isSmall?this.sign?-1:1:$(A,D)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,f.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var x=le(m),A=this.value,D=x.value;return x.isSmall?A==D?0:A>D?1:-1:A<0!==x.sign?A<0?-1:1:A<0?1:-1},f.prototype.compareTo=f.prototype.compare,c.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var x=this.value,A=le(m).value;return x===A?0:x>A?1:-1},c.prototype.compareTo=c.prototype.compare,u.prototype.equals=function(m){return this.compare(m)===0},c.prototype.eq=c.prototype.equals=f.prototype.eq=f.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(m){return this.compare(m)!==0},c.prototype.neq=c.prototype.notEquals=f.prototype.neq=f.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(m){return this.compare(m)>0},c.prototype.gt=c.prototype.greater=f.prototype.gt=f.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(m){return this.compare(m)<0},c.prototype.lt=c.prototype.lesser=f.prototype.lt=f.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(m){return this.compare(m)>=0},c.prototype.geq=c.prototype.greaterOrEquals=f.prototype.geq=f.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(m){return this.compare(m)<=0},c.prototype.leq=c.prototype.lesserOrEquals=f.prototype.leq=f.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return(this.value[0]&1)===0},f.prototype.isEven=function(){return(this.value&1)===0},c.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},u.prototype.isOdd=function(){return(this.value[0]&1)===1},f.prototype.isOdd=function(){return(this.value&1)===1},c.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},u.prototype.isPositive=function(){return!this.sign},f.prototype.isPositive=function(){return this.value>0},c.prototype.isPositive=f.prototype.isPositive,u.prototype.isNegative=function(){return this.sign},f.prototype.isNegative=function(){return this.value<0},c.prototype.isNegative=f.prototype.isNegative,u.prototype.isUnit=function(){return!1},f.prototype.isUnit=function(){return Math.abs(this.value)===1},c.prototype.isUnit=function(){return this.abs().value===BigInt(1)},u.prototype.isZero=function(){return!1},f.prototype.isZero=function(){return this.value===0},c.prototype.isZero=function(){return this.value===BigInt(0)},u.prototype.isDivisibleBy=function(m){var x=le(m);return x.isZero()?!1:x.isUnit()?!0:x.compareAbs(2)===0?this.isEven():this.mod(x).isZero()},c.prototype.isDivisibleBy=f.prototype.isDivisibleBy=u.prototype.isDivisibleBy;function z(m){var x=m.abs();if(x.isUnit())return!1;if(x.equals(2)||x.equals(3)||x.equals(5))return!0;if(x.isEven()||x.isDivisibleBy(3)||x.isDivisibleBy(5))return!1;if(x.lesser(49))return!0}function re(m,x){for(var A=m.prev(),D=A,X=0,j,V,Q,ne;D.isEven();)D=D.divide(2),X++;e:for(Q=0;Q<x.length;Q++)if(!m.lesser(x[Q])&&(ne=Pt(x[Q]).modPow(D,m),!(ne.isUnit()||ne.equals(A)))){for(j=X-1;j!=0;j--){if(ne=ne.square().mod(m),ne.isUnit())return!1;if(ne.equals(A))continue e}return!1}return!0}u.prototype.isPrime=function(m){var x=z(this);if(x!==t)return x;var A=this.abs(),D=A.bitLength();if(D<=64)return re(A,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var X=Math.log(2)*D.toJSNumber(),j=Math.ceil(m===!0?2*Math.pow(X,2):X),V=[],Q=0;Q<j;Q++)V.push(Pt(Q+2));return re(A,V)},c.prototype.isPrime=f.prototype.isPrime=u.prototype.isPrime,u.prototype.isProbablePrime=function(m,x){var A=z(this);if(A!==t)return A;for(var D=this.abs(),X=m===t?5:m,j=[],V=0;V<X;V++)j.push(Pt.randBetween(2,D.minus(2),x));return re(D,j)},c.prototype.isProbablePrime=f.prototype.isProbablePrime=u.prototype.isProbablePrime,u.prototype.modInv=function(m){for(var x=Pt.zero,A=Pt.one,D=le(m),X=this.abs(),j,V,Q;!X.isZero();)j=D.divide(X),V=x,Q=D,x=A,D=X,A=V.subtract(j.multiply(A)),X=Q.subtract(j.multiply(X));if(!D.isUnit())throw new Error(this.toString()+" and "+m.toString()+" are not co-prime");return x.compare(0)===-1&&(x=x.add(m)),this.isNegative()?x.negate():x},c.prototype.modInv=f.prototype.modInv=u.prototype.modInv,u.prototype.next=function(){var m=this.value;return this.sign?ee(m,1,this.sign):new u(N(m,1),this.sign)},f.prototype.next=function(){var m=this.value;return m+1<i?new f(m+1):new u(n,!1)},c.prototype.next=function(){return new c(this.value+BigInt(1))},u.prototype.prev=function(){var m=this.value;return this.sign?new u(N(m,1),!0):ee(m,1,this.sign)},f.prototype.prev=function(){var m=this.value;return m-1>-i?new f(m-1):new u(n,!0)},c.prototype.prev=function(){return new c(this.value-BigInt(1))};for(var se=[1];2*se[se.length-1]<=e;)se.push(2*se[se.length-1]);var ue=se.length,pe=se[ue-1];function Ye(m){return Math.abs(m)<=e}u.prototype.shiftLeft=function(m){var x=le(m).toJSNumber();if(!Ye(x))throw new Error(String(x)+" is too large for shifting.");if(x<0)return this.shiftRight(-x);var A=this;if(A.isZero())return A;for(;x>=ue;)A=A.multiply(pe),x-=ue-1;return A.multiply(se[x])},c.prototype.shiftLeft=f.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(m){var x,A=le(m).toJSNumber();if(!Ye(A))throw new Error(String(A)+" is too large for shifting.");if(A<0)return this.shiftLeft(-A);for(var D=this;A>=ue;){if(D.isZero()||D.isNegative()&&D.isUnit())return D;x=M(D,pe),D=x[1].isNegative()?x[0].prev():x[0],A-=ue-1}return x=M(D,se[A]),x[1].isNegative()?x[0].prev():x[0]},c.prototype.shiftRight=f.prototype.shiftRight=u.prototype.shiftRight;function Se(m,x,A){x=le(x);for(var D=m.isNegative(),X=x.isNegative(),j=D?m.not():m,V=X?x.not():x,Q=0,ne=0,he=null,we=null,ve=[];!j.isZero()||!V.isZero();)he=M(j,pe),Q=he[1].toJSNumber(),D&&(Q=pe-1-Q),we=M(V,pe),ne=we[1].toJSNumber(),X&&(ne=pe-1-ne),j=he[0],V=we[0],ve.push(A(Q,ne));for(var Ce=A(D?1:0,X?1:0)!==0?Pt(-1):Pt(0),gt=ve.length-1;gt>=0;gt-=1)Ce=Ce.multiply(pe).add(Pt(ve[gt]));return Ce}u.prototype.not=function(){return this.negate().prev()},c.prototype.not=f.prototype.not=u.prototype.not,u.prototype.and=function(m){return Se(this,m,function(x,A){return x&A})},c.prototype.and=f.prototype.and=u.prototype.and,u.prototype.or=function(m){return Se(this,m,function(x,A){return x|A})},c.prototype.or=f.prototype.or=u.prototype.or,u.prototype.xor=function(m){return Se(this,m,function(x,A){return x^A})},c.prototype.xor=f.prototype.xor=u.prototype.xor;var Be=1<<30,je=(e&-e)*(e&-e)|Be;function Ae(m){var x=m.value,A=typeof x=="number"?x|Be:typeof x=="bigint"?x|BigInt(Be):x[0]+x[1]*e|je;return A&-A}function Ke(m,x){if(x.compareTo(m)<=0){var A=Ke(m,x.square(x)),D=A.p,X=A.e,j=D.multiply(x);return j.compareTo(m)<=0?{p:j,e:X*2+1}:{p:D,e:X*2}}return{p:Pt(1),e:0}}u.prototype.bitLength=function(){var m=this;return m.compareTo(Pt(0))<0&&(m=m.negate().subtract(Pt(1))),m.compareTo(Pt(0))===0?Pt(0):Pt(Ke(m,Pt(2)).e).add(Pt(1))},c.prototype.bitLength=f.prototype.bitLength=u.prototype.bitLength;function pt(m,x){return m=le(m),x=le(x),m.greater(x)?m:x}function Nt(m,x){return m=le(m),x=le(x),m.lesser(x)?m:x}function Br(m,x){if(m=le(m).abs(),x=le(x).abs(),m.equals(x))return m;if(m.isZero())return x;if(x.isZero())return m;for(var A=o[1],D,X;m.isEven()&&x.isEven();)D=Nt(Ae(m),Ae(x)),m=m.divide(D),x=x.divide(D),A=A.multiply(D);for(;m.isEven();)m=m.divide(Ae(m));do{for(;x.isEven();)x=x.divide(Ae(x));m.greater(x)&&(X=x,x=m,m=X),x=x.subtract(m)}while(!x.isZero());return A.isUnit()?m:m.multiply(A)}function ti(m,x){return m=le(m).abs(),x=le(x).abs(),m.divide(Br(m,x)).multiply(x)}function Ui(m,x,A){m=le(m),x=le(x);var D=A||Math.random,X=Nt(m,x),j=pt(m,x),V=j.subtract(X).add(1);if(V.isSmall)return X.add(Math.floor(D()*V));for(var Q=Cr(V,e).value,ne=[],he=!0,we=0;we<Q.length;we++){var ve=he?Q[we]+(we+1<Q.length?Q[we+1]/e:0):e,Ce=v(D()*ve);ne.push(Ce),Ce<Q[we]&&(he=!1)}return X.add(o.fromArray(ne,e,!1))}var ri=function(m,x,A,D){A=A||s,m=String(m),D||(m=m.toLowerCase(),A=A.toLowerCase());var X=m.length,j,V=Math.abs(x),Q={};for(j=0;j<A.length;j++)Q[A[j]]=j;for(j=0;j<X;j++){var ne=m[j];if(ne!=="-"&&ne in Q&&Q[ne]>=V){if(ne==="1"&&V===1)continue;throw new Error(ne+" is not a valid digit in base "+x+".")}}x=le(x);var he=[],we=m[0]==="-";for(j=we?1:0;j<m.length;j++){var ne=m[j];if(ne in Q)he.push(le(Q[ne]));else if(ne==="<"){var ve=j;do j++;while(m[j]!==">"&&j<m.length);he.push(le(m.slice(ve+1,j)))}else throw new Error(ne+" is not a valid character")}return jr(he,x,we)};function jr(m,x,A){var D=o[0],X=o[1],j;for(j=m.length-1;j>=0;j--)D=D.add(m[j].times(X)),X=X.times(x);return A?D.negate():D}function Wi(m,x){return x=x||s,m<x.length?x[m]:"<"+m+">"}function Cr(m,x){if(x=Pt(x),x.isZero()){if(m.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(x.equals(-1)){if(m.isZero())return{value:[0],isNegative:!1};if(m.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-m.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var A=Array.apply(null,Array(m.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return A.unshift([1]),{value:[].concat.apply([],A),isNegative:!1}}var D=!1;if(m.isNegative()&&x.isPositive()&&(D=!0,m=m.abs()),x.isUnit())return m.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(m.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:D};for(var X=[],j=m,V;j.isNegative()||j.compareAbs(x)>=0;){V=j.divmod(x),j=V.quotient;var Q=V.remainder;Q.isNegative()&&(Q=x.minus(Q).abs(),j=j.next()),X.push(Q.toJSNumber())}return X.push(j.toJSNumber()),{value:X.reverse(),isNegative:D}}function Ka(m,x,A){var D=Cr(m,x);return(D.isNegative?"-":"")+D.value.map(function(X){return Wi(X,A)}).join("")}u.prototype.toArray=function(m){return Cr(this,m)},f.prototype.toArray=function(m){return Cr(this,m)},c.prototype.toArray=function(m){return Cr(this,m)},u.prototype.toString=function(m,x){if(m===t&&(m=10),m!==10||x)return Ka(this,m,x);for(var A=this.value,D=A.length,X=String(A[--D]),j="0000000",V;--D>=0;)V=String(A[D]),X+=j.slice(V.length)+V;var Q=this.sign?"-":"";return Q+X},f.prototype.toString=function(m,x){return m===t&&(m=10),m!=10||x?Ka(this,m,x):String(this.value)},c.prototype.toString=f.prototype.toString,c.prototype.toJSON=u.prototype.toJSON=f.prototype.toJSON=function(){return this.toString()},u.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf,f.prototype.valueOf=function(){return this.value},f.prototype.toJSNumber=f.prototype.valueOf,c.prototype.valueOf=c.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function kr(m){if(h(+m)){var x=+m;if(x===v(x))return a?new c(BigInt(x)):new f(x);throw new Error("Invalid integer: "+m)}var A=m[0]==="-";A&&(m=m.slice(1));var D=m.split(/e/i);if(D.length>2)throw new Error("Invalid integer: "+D.join("e"));if(D.length===2){var X=D[1];if(X[0]==="+"&&(X=X.slice(1)),X=+X,X!==v(X)||!h(X))throw new Error("Invalid integer: "+X+" is not a valid exponent.");var j=D[0],V=j.indexOf(".");if(V>=0&&(X-=j.length-V-1,j=j.slice(0,V)+j.slice(V+1)),X<0)throw new Error("Cannot include negative exponent part for integers");j+=new Array(X+1).join("0"),m=j}var Q=/^([0-9][0-9]*)$/.test(m);if(!Q)throw new Error("Invalid integer: "+m);if(a)return new c(BigInt(A?"-"+m:m));for(var ne=[],he=m.length,we=r,ve=he-we;he>0;)ne.push(+m.slice(ve,he)),ve-=we,ve<0&&(ve=0),he-=we;return g(ne),new u(ne,A)}function On(m){if(a)return new c(BigInt(m));if(h(m)){if(m!==v(m))throw new Error(m+" is not an integer.");return new f(m)}return kr(m.toString())}function le(m){return typeof m=="number"?On(m):typeof m=="string"?kr(m):typeof m=="bigint"?new c(m):m}for(var W=0;W<1e3;W++)o[W]=le(W),W>0&&(o[-W]=le(-W));return o.one=o[1],o.zero=o[0],o.minusOne=o[-1],o.max=pt,o.min=Nt,o.gcd=Br,o.lcm=ti,o.isInstance=function(m){return m instanceof u||m instanceof f||m instanceof c},o.randBetween=Ui,o.fromArray=function(m,x,A){return jr(m.map(le),le(x||10),A)},o})();typeof xy<"u"&&xy.hasOwnProperty("exports")&&(xy.exports=Pt);typeof define=="function"&&define.amd&&define(function(){return Pt})});var KX=w((OPe,YX)=>{var Os=GX(),Sy=Y("stream");(!Sy.Writable||!Sy.Writable.prototype.destroy)&&(Sy=Tn());var Ey;function bTe(){var t=3988292384,e,r,i;for(Ey=[],r=0;r<256;r++){for(e=r,i=0;i<8;i++)e=e&1?t^e>>>1:e=e>>>1;Ey[r]=e>>>0}}function ZX(t,e){return Ey||bTe(),t.charCodeAt&&(t=t.charCodeAt(0)),Os(e).shiftRight(8).and(16777215).xor(Ey[Os(e).xor(t).and(255)]).value}function nu(){if(!(this instanceof nu))return new nu;this.key0=305419896,this.key1=591751049,this.key2=878082192}nu.prototype.update=function(t){this.key0=ZX(t,this.key0),this.key1=Os(this.key0).and(255).and(4294967295).add(this.key1),this.key1=Os(this.key1).multiply(134775813).add(1).and(4294967295).value,this.key2=ZX(Os(this.key1).shiftRight(24).and(255),this.key2)};nu.prototype.decryptByte=function(t){var e=Os(this.key2).or(2);return t=t^Os(e).multiply(Os(e^1)).shiftRight(8).and(255),this.update(t),t};nu.prototype.stream=function(){var t=Sy.Transform(),e=this;return t._transform=function(r,i,n){for(var s=0;s<r.length;s++)r[s]=e.decryptByte(r[s]);this.push(r),n()},t};YX.exports=nu});var JX=w((IPe,QX)=>{var xTe=Ts(),STe=KX(),ETe=Qm(),Kc=Y("stream"),TTe=bc(),CTe=Y("zlib"),kTe=ty(),RTe=Hl(),ATe=ry();(!Kc.Writable||!Kc.Writable.prototype.destroy)&&(Kc=Tn());QX.exports=function(e,r,i,n){var s=ETe(),a=Kc.PassThrough(),o=e.stream(r);return o.pipe(s).on("error",function(u){a.emit("error",u)}),a.vars=s.pull(30).then(function(u){var f=TTe.parse(u).word32lu("signature").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;return f.lastModifiedDateTime=ATe(f.lastModifiedDate,f.lastModifiedTime),s.pull(f.fileNameLength).then(function(c){return f.fileName=c.toString("utf8"),s.pull(f.extraFieldLength)}).then(function(c){var h;return f.extra=kTe(c,f),n&&n.compressedSize&&(f=n),f.flags&1&&(h=s.pull(12).then(function(d){if(!i)throw new Error("MISSING_PASSWORD");var p=STe();String(i).split("").forEach(function(v){p.update(v)});for(var g=0;g<d.length;g++)d[g]=p.decryptByte(d[g]);f.decrypt=p,f.compressedSize-=12;var y=f.flags&8?f.lastModifiedTime>>8&255:f.crc32>>24&255;if(d[11]!==y)throw new Error("BAD_PASSWORD");return f})),xTe.resolve(h).then(function(){return a.emit("vars",f),f})})}),a.vars.then(function(u){var f=!(u.flags&8)||u.compressedSize>0,c,h=u.compressionMethod?CTe.createInflateRaw():Kc.PassThrough();f?(a.size=u.uncompressedSize,c=u.compressedSize):(c=RTe.alloc(4),c.writeUInt32LE(134695760,0));var d=s.stream(c);u.decrypt&&(d=d.pipe(u.decrypt.stream())),d.pipe(h).on("error",function(p){a.emit("error",p)}).pipe(a).on("finish",function(){o.destroy?o.destroy():o.abort?o.abort():o.close?o.close():o.push?o.push():console.log("warning - unable to close stream")})}).catch(function(u){a.emit("error",u)}),a}});var rV=w((NPe,tV)=>{var eh=bc(),Jc=Qm(),OTe=JX(),Qc=Ts(),ITe=ey(),NTe=ty(),DTe=Hl(),Ik=Y("path"),FTe=Ak().Writer,MTe=ry(),eV=DTe.alloc(4);eV.writeUInt32LE(101010256,0);function PTe(t){var e=t.stream(0).pipe(Jc());return e.pull(4).then(function(r){var i=r.readUInt32LE(0);if(i===875721283){var n;return e.pull(12).then(function(s){n=eh.parse(s).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars}).then(function(){return e.pull(n.pubKeyLength+n.signatureLength)}).then(function(s){return n.publicKey=s.slice(0,n.pubKeyLength),n.signature=s.slice(n.pubKeyLength),n.size=16+n.pubKeyLength+n.signatureLength,n})}})}function qTe(t,e){var r=eh.parse(e).word32lu("signature").word32lu("diskNumber").word64lu("offsetToStartOfCentralDirectory").word32lu("numberOfDisks").vars;if(r.signature!=117853008)throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+r.signature.toString(16));var i=Jc();return t.stream(r.offsetToStartOfCentralDirectory).pipe(i),i.pull(56)}function LTe(t){var e=eh.parse(t).word32lu("signature").word64lu("sizeOfCentralDirectory").word16lu("version").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskStart").word64lu("numberOfRecordsOnDisk").word64lu("numberOfRecords").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars;if(e.signature!=101075792)throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+e.signature.toString(16));return e}tV.exports=function(e,r){var i=Jc(),n=Jc(),s=r&&r.tailSize||80,a,o,u,f;return r&&r.crx&&(o=PTe(e)),e.size().then(function(c){return a=c,e.stream(Math.max(0,c-s)).on("error",function(h){i.emit("error",h)}).pipe(i),i.pull(eV)}).then(function(){return Qc.props({directory:i.pull(22),crxHeader:o})}).then(function(c){var h=c.directory;if(u=c.crxHeader&&c.crxHeader.size||0,f=eh.parse(h).word32lu("signature").word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars,f.numberOfRecords==65535||f.numberOfRecords==65535||f.offsetToStartOfCentralDirectory==4294967295){let p=a-(s-i.match+20),g=Jc();return e.stream(p).pipe(g),g.pull(20).then(function(y){return qTe(e,y)}).then(function(y){f=LTe(y)})}else f.offsetToStartOfCentralDirectory+=u}).then(function(){if(f.commentLength)return i.pull(f.commentLength).then(function(c){f.comment=c.toString("utf8")})}).then(function(){return e.stream(f.offsetToStartOfCentralDirectory).pipe(n),f.extract=function(c){if(!c||!c.path)throw new Error("PATH_MISSING");return c.path=Ik.resolve(Ik.normalize(c.path)),f.files.then(function(h){return Qc.map(h,function(d){if(d.type!="Directory"){var p=Ik.join(c.path,d.path);if(p.indexOf(c.path)==0){var g=c.getWriter?c.getWriter({path:p}):FTe({path:p});return new Qc(function(y,v){d.stream(c.password).on("error",v).pipe(g).on("close",y).on("error",v)})}}},{concurrency:c.concurrency>1?c.concurrency:1})})},f.files=Qc.mapSeries(Array(f.numberOfRecords),function(){return n.pull(46).then(function(c){var h=eh.parse(c).word32lu("signature").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return h.offsetToLocalFileHeader+=u,h.lastModifiedDateTime=MTe(h.lastModifiedDate,h.lastModifiedTime),n.pull(h.fileNameLength).then(function(d){return h.pathBuffer=d,h.path=d.toString("utf8"),h.isUnicode=(h.flags&2048)!=0,n.pull(h.extraFieldLength)}).then(function(d){return h.extra=NTe(d,h),n.pull(h.fileCommentLength)}).then(function(d){return h.comment=d,h.type=h.uncompressedSize===0&&/[\/\\]$/.test(h.path)?"Directory":"File",h.stream=function(p){return OTe(e,h.offsetToLocalFileHeader,p,h)},h.buffer=function(p){return ITe(h.stream(p))},h})})}),Qc.props(f)})}});var sV=w((DPe,nV)=>{var iV=Er(),Ty=Ts(),th=rV(),Cy=Y("stream");(!Cy.Writable||!Cy.Writable.prototype.destroy)&&(Cy=Tn());nV.exports={buffer:function(t,e){var r={stream:function(i,n){var s=Cy.PassThrough();return s.end(t.slice(i,n)),s},size:function(){return Ty.resolve(t.length)}};return th(r,e)},file:function(t,e){var r={stream:function(i,n){return iV.createReadStream(t,{start:i,end:n&&i+n})},size:function(){return new Ty(function(i,n){iV.stat(t,function(s,a){s?n(s):i(a.size)})})}};return th(r,e)},url:function(t,e,r){if(typeof e=="string"&&(e={url:e}),!e.url)throw"URL missing";e.headers=e.headers||{};var i={stream:function(n,s){var a=Object.create(e);return a.headers=Object.create(e.headers),a.headers.range="bytes="+n+"-"+(s||""),t(a)},size:function(){return new Ty(function(n,s){var a=t(e);a.on("response",function(o){a.abort(),o.headers["content-length"]?n(o.headers["content-length"]):s(new Error("Missing content length header"))}).on("error",s)})}};return th(i,r)},s3:function(t,e,r){var i={size:function(){return new Ty(function(n,s){t.headObject(e,function(a,o){a?s(a):n(o.ContentLength)})})},stream:function(n,s){var a={};for(var o in e)a[o]=e[o];return a.Range="bytes="+n+"-"+(s||""),t.getObject(a).createReadStream()}};return th(i,r)},custom:function(t,e){return th(t,e)}}});var aV=w(rh=>{"use strict";mW();wW();s_();rh.Parse=iy();rh.ParseOne=Y5();rh.Extract=VX();rh.Open=sV()});var EV=w((MPe,An)=>{var Qe=Y("fs"),Ry=Y("os"),qt=Y("path"),oV=Y("crypto"),ji={fs:Qe.constants,os:Ry.constants},lV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",hV=/XXXXXX/,BTe=3,dV=(ji.O_CREAT||ji.fs.O_CREAT)|(ji.O_EXCL||ji.fs.O_EXCL)|(ji.O_RDWR||ji.fs.O_RDWR),jTe=Ry.platform()==="win32",$Te=ji.EBADF||ji.os.errno.EBADF,UTe=ji.ENOENT||ji.os.errno.ENOENT,pV=448,gV=384,WTe="exit",su=[],mV=Qe.rmdirSync.bind(Qe),yV=!1;function HTe(t,e){return Qe.rm(t,{recursive:!0},e)}function vV(t){return Qe.rmSync(t,{recursive:!0})}function Mk(t,e){let r=au(t,e),i=r[0],n=r[1];e1e(i,function(s,a){if(s)return n(s);let o=a.tries;(function u(){try{let f=wV(a);Qe.stat(f,function(c){if(!c)return o-- >0?u():n(new Error("Could not get a unique tmp filename, max tries reached "+f));n(null,f)})}catch(f){n(f)}})()})}function Pk(t){let e=au(t),r=e[0],i=t1e(r),n=i.tries;do{let s=wV(i);try{Qe.statSync(s)}catch{return s}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function zTe(t,e){let r=au(t,e),i=r[0],n=r[1];Mk(i,function(a,o){if(a)return n(a);Qe.open(o,dV,i.mode||gV,function(f,c){if(f)return n(f);if(i.discardDescriptor)return Qe.close(c,function(d){return n(d,o,void 0,Dk(o,-1,i,!1))});{let h=i.discardDescriptor||i.detachDescriptor;n(null,o,c,Dk(o,h?-1:c,i,!1))}})})}function XTe(t){let e=au(t),r=e[0],i=r.discardDescriptor||r.detachDescriptor,n=Pk(r),s=Qe.openSync(n,dV,r.mode||gV);return r.discardDescriptor&&(Qe.closeSync(s),s=void 0),{name:n,fd:s,removeCallback:Dk(n,i?-1:s,r,!0)}}function VTe(t,e){let r=au(t,e),i=r[0],n=r[1];Mk(i,function(a,o){if(a)return n(a);Qe.mkdir(o,i.mode||pV,function(f){if(f)return n(f);n(null,o,_V(o,i,!1))})})}function GTe(t){let e=au(t),r=e[0],i=Pk(r);return Qe.mkdirSync(i,r.mode||pV),{name:i,removeCallback:_V(i,r,!0)}}function ZTe(t,e){let r=function(i){if(i&&!Fk(i))return e(i);e()};0<=t[0]?Qe.close(t[0],function(){Qe.unlink(t[1],r)}):Qe.unlink(t[1],r)}function YTe(t){let e=null;try{0<=t[0]&&Qe.closeSync(t[0])}catch(r){if(!r1e(r)&&!Fk(r))throw r}finally{try{Qe.unlinkSync(t[1])}catch(r){Fk(r)||(e=r)}}if(e!==null)throw e}function Dk(t,e,r,i){let n=ky(YTe,[e,t],i),s=ky(ZTe,[e,t],i,n);return r.keep||su.unshift(n),i?n:s}function _V(t,e,r){let i=e.unsafeCleanup?HTe:Qe.rmdir.bind(Qe),n=e.unsafeCleanup?vV:mV,s=ky(n,t,r),a=ky(i,t,r,s);return e.keep||su.unshift(s),r?s:a}function ky(t,e,r,i){let n=!1;return function s(a){if(!n){let o=i||s,u=su.indexOf(o);return u>=0&&su.splice(u,1),n=!0,r||t===mV||t===vV?t(e):t(e,a||function(){})}}}function KTe(){if(yV)for(;su.length;)try{su[0]()}catch{}}function uV(t){let e=[],r=null;try{r=oV.randomBytes(t)}catch{r=oV.pseudoRandomBytes(t)}for(let i=0;i<t;i++)e.push(lV[r[i]%lV.length]);return e.join("")}function Tr(t){return typeof t>"u"}function au(t,e){if(typeof t=="function")return[{},t];if(Tr(t))return[{},e];let r={};for(let i of Object.getOwnPropertyNames(t))r[i]=t[i];return[r,e]}function QTe(t,e,r){let i=qt.isAbsolute(t)?t:qt.join(e,t);Qe.stat(i,function(n){n?Qe.realpath(qt.dirname(i),function(s,a){if(s)return r(s);r(null,qt.join(a,qt.basename(i)))}):Qe.realpath(i,r)})}function JTe(t,e){let r=qt.isAbsolute(t)?t:qt.join(e,t);try{return Qe.statSync(r),Qe.realpathSync(r)}catch{let n=Qe.realpathSync(qt.dirname(r));return qt.join(n,qt.basename(r))}}function wV(t){let e=t.tmpdir;if(!Tr(t.name))return qt.join(e,t.dir,t.name);if(!Tr(t.template))return qt.join(e,t.dir,t.template).replace(hV,uV(6));let r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",uV(12),t.postfix?"-"+t.postfix:""].join("");return qt.join(e,t.dir,r)}function Nk(t,e){if(typeof e!="string")throw new Error(`${t} option must be a string, got "${typeof e}".`);if(e.includes(".."))throw new Error("Relative value not allowed");return e}function bV(t){if(!Tr(t.name)){let e=t.name;if(qt.isAbsolute(e))throw new Error(`name option must not contain an absolute path, found "${e}".`);let r=qt.basename(e);if(r===".."||r==="."||r!==e)throw new Error(`name option must not contain a path, found "${e}".`)}if(!Tr(t.template)){if(typeof t.template!="string")throw new Error(`template option must be a string, got "${typeof t.template}".`);if(!t.template.match(hV))throw new Error(`Invalid template, found "${t.template}".`)}if(!Tr(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=Tr(t.name)?t.tries||BTe:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.prefix=Tr(t.prefix)?"":Nk("prefix",t.prefix),t.postfix=Tr(t.postfix)?"":Nk("postfix",t.postfix),t.template=Tr(t.template)?void 0:Nk("template",t.template)}function fV(t,e,r,i){if(Tr(e))return i(null);QTe(e,r,function(n,s){if(n)return i(n);let a=qt.relative(r,s);if(a.startsWith("..")||qt.isAbsolute(a))return i(new Error(`${t} option must be relative to "${r}", found "${a}".`));i(null,a)})}function cV(t,e,r){if(Tr(e))return;let i=JTe(e,r),n=qt.relative(r,i);if(n.startsWith("..")||qt.isAbsolute(n))throw new Error(`${t} option must be relative to "${r}", found "${n}".`);return n}function e1e(t,e){n1e(t,function(r,i){if(r)return e(r);t.tmpdir=i;try{bV(t,i)}catch(n){return e(n)}fV("dir",t.dir,i,function(n,s){if(n)return e(n);t.dir=Tr(s)?"":s,fV("template",t.template,i,function(a,o){if(a)return e(a);t.template=o,e(null,t)})})})}function t1e(t){let e=t.tmpdir=SV(t);bV(t,e);let r=cV("dir",t.dir,e);return t.dir=Tr(r)?"":r,t.template=cV("template",t.template,e),t}function r1e(t){return xV(t,-$Te,"EBADF")}function Fk(t){return xV(t,-UTe,"ENOENT")}function xV(t,e,r){return jTe?t.code===r:t.code===r&&t.errno===e}function i1e(){yV=!0}function n1e(t,e){return Qe.realpath(t&&t.tmpdir||Ry.tmpdir(),e)}function SV(t){return Qe.realpathSync(t&&t.tmpdir||Ry.tmpdir())}process.addListener(WTe,KTe);Object.defineProperty(An.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return SV()}});An.exports.dir=VTe;An.exports.dirSync=GTe;An.exports.file=zTe;An.exports.fileSync=XTe;An.exports.tmpName=Mk;An.exports.tmpNameSync=Pk;An.exports.setGracefulCleanup=i1e});var CV=w((PPe,TV)=>{TV.exports=async function*(e){let r=[];e.on("data",o=>r.push(o));let i,n=new Promise(o=>i=o),s=!1;e.on("end",()=>{s=!0,i()});let a=!1;for(e.on("error",o=>{a=o,i()});!s||r.length>0;)if(r.length===0?(e.resume(),await Promise.race([s1e(e,"data"),n])):(e.pause(),yield r.shift()),a)throw a;i()};function s1e(t,e){return new Promise(r=>{let i=!1,n=()=>{i||(i=!0,t.removeListener(e,n),r())};t.addListener(e,n)})}});var OV=w((qPe,AV)=>{var{EventEmitter:a1e}=Y("events"),o1e=bf(),l1e=wt(),Ay=sr(),kV=mt(),u1e=Vi(),f1e=Lh(),RV=Bh(),qk=class extends a1e{constructor({workbook:e,id:r,iterator:i,options:n}){super(),this.workbook=e,this.id=r,this.iterator=i,this.options=n||{},this.name=`Sheet${this.id}`,this._columns=null,this._keys={},this._dimensions=new u1e}destroy(){throw new Error("Invalid Operation: destroy")}get dimensions(){return this._dimensions}get columns(){return this._columns}getColumn(e){if(typeof e=="string"){let r=this._keys[e];if(r)return r;e=kV.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){let r=this._columns.length+1;for(;r<=e;)this._columns.push(new RV(this,r++))}return this._columns[e-1]}getColumnKey(e){return this._keys[e]}setColumnKey(e,r){this._keys[e]=r}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){l1e.each(this._keys,e)}async read(){try{for await(let e of this.parse())for(let{eventType:r,value:i}of e)this.emit(r,i);this.emit("finished")}catch(e){this.emit("error",e)}}async*[Symbol.asyncIterator](){for await(let e of this.parse())for(let{eventType:r,value:i}of e)r==="row"&&(yield i)}async*parse(){let{iterator:e,options:r}=this,i=!1,n=!1,s=null;switch(r.worksheets){case"emit":i=!0;break;case"prep":break;default:break}switch(r.hyperlinks){case"emit":n=!0;break;case"cache":this.hyperlinks=s={};break;default:break}if(!i&&!n&&!s)return;let{sharedStrings:a,styles:o,properties:u}=this.workbook,f=!1,c=!1,h=!1,d=null,p=null,g=null,y=null;for await(let v of o1e(e)){let b=[];for(let{eventType:k,value:N}of v)if(k==="opentag"){let E=N;if(i)switch(E.name){case"cols":f=!0,d=[];break;case"sheetData":c=!0;break;case"col":f&&d.push({min:parseInt(E.attributes.min,10),max:parseInt(E.attributes.max,10),width:parseFloat(E.attributes.width),styleId:parseInt(E.attributes.style||"0",10)});break;case"row":if(c){let U=parseInt(E.attributes.r,10);if(p=new f1e(this,U),E.attributes.ht&&(p.height=parseFloat(E.attributes.ht)),E.attributes.s){let ee=parseInt(E.attributes.s,10),F=o.getStyleModel(ee);F&&(p.style=F)}}break;case"c":p&&(g={ref:E.attributes.r,s:parseInt(E.attributes.s,10),t:E.attributes.t});break;case"f":g&&(y=g.f={text:""});break;case"v":g&&(y=g.v={text:""});break;case"is":case"t":g&&(y=g.v={text:""});break;case"mergeCell":break;default:break}if(n||s)switch(E.name){case"hyperlinks":h=!0;break;case"hyperlink":if(h){let U={ref:E.attributes.ref,rId:E.attributes["r:id"]};n?b.push({eventType:"hyperlink",value:U}):s[U.ref]=U}break;default:break}}else if(k==="text")i&&y&&(y.text+=N);else if(k==="closetag"){let E=N;if(i)switch(E.name){case"cols":f=!1,this._columns=RV.fromModel(d);break;case"sheetData":c=!1;break;case"row":this._dimensions.expandRow(p),b.push({eventType:"row",value:p}),p=null;break;case"c":if(p&&g){let U=kV.decodeAddress(g.ref),ee=p.getCell(U.col);if(g.s){let F=o.getStyleModel(g.s);F&&(ee.style=F)}if(g.f){let F={formula:g.f.text};g.v&&(g.t==="str"?F.result=Ay.xmlDecode(g.v.text):F.result=parseFloat(g.v.text)),ee.value=F}else if(g.v)switch(g.t){case"s":{let F=parseInt(g.v.text,10);a?ee.value=a[F]:ee.value={sharedString:F};break}case"inlineStr":case"str":ee.value=Ay.xmlDecode(g.v.text);break;case"e":ee.value={error:g.v.text};break;case"b":ee.value=parseInt(g.v.text,10)!==0;break;default:Ay.isDateFmt(ee.numFmt)?ee.value=Ay.excelToDate(parseFloat(g.v.text),u.model&&u.model.date1904):ee.value=parseFloat(g.v.text);break}if(s){let F=s[g.ref];F&&(ee.text=ee.value,ee.value=void 0,ee.hyperlink=F)}g=null}break;default:break}(n||s)&&E.name==="hyperlinks"&&(h=!1)}b.length>0&&(yield b)}}};AV.exports=qk});var NV=w((LPe,IV)=>{var{EventEmitter:c1e}=Y("events"),h1e=bf(),d1e=ni(),p1e=es(),Lk=class extends c1e{constructor({workbook:e,id:r,iterator:i,options:n}){super(),this.workbook=e,this.id=r,this.iterator=i,this.options=n}get count(){return this.hyperlinks&&this.hyperlinks.length||0}each(e){return this.hyperlinks.forEach(e)}async read(){let{iterator:e,options:r}=this,i=!1,n=null;switch(r.hyperlinks){case"emit":i=!0;break;case"cache":this.hyperlinks=n={};break;default:break}if(!i&&!n){this.emit("finished");return}try{for await(let s of h1e(e))for(let{eventType:a,value:o}of s)if(a==="opentag"){let u=o;if(u.name==="Relationship"){let f=u.attributes.Id;switch(u.attributes.Type){case p1e.Hyperlink:{let c={type:d1e.RelationshipType.Styles,rId:f,target:u.attributes.Target,targetMode:u.attributes.TargetMode};i?this.emit("hyperlink",c):n[c.rId]=c}break;default:break}}}this.emit("finished")}catch(s){this.emit("error",s)}}};IV.exports=Lk});var PV=w((BPe,MV)=>{var Bk=Y("fs"),{EventEmitter:g1e}=Y("events"),{PassThrough:m1e,Readable:y1e}=nr(),v1e=Y("stream"),_1e=aV(),FV=EV(),Za=CV(),w1e=bf(),DV=mp(),b1e=xp(),x1e=wp(),S1e=OV(),E1e=NV();FV.setGracefulCleanup();var Oy=class extends g1e{constructor(e,r={}){super(),this.input=e,this.options={worksheets:"emit",sharedStrings:"cache",hyperlinks:"ignore",styles:"ignore",entries:"ignore",...r},this.styles=new DV,this.styles.init()}_getStream(e){if(e instanceof v1e.Readable||e instanceof y1e)return e;if(typeof e=="string")return Bk.createReadStream(e);throw new Error(`Could not recognise input: ${e}`)}async read(e,r){try{for await(let{eventType:i,value:n}of this.parse(e,r))switch(i){case"shared-strings":this.emit(i,n);break;case"worksheet":this.emit(i,n),await n.read();break;case"hyperlinks":this.emit(i,n);break}this.emit("end"),this.emit("finished")}catch(i){this.emit("error",i)}}async*[Symbol.asyncIterator](){for await(let{eventType:e,value:r}of this.parse())e==="worksheet"&&(yield r)}async*parse(e,r){r&&(this.options=r);let i=this.stream=this._getStream(e||this.input),n=_1e.Parse({forceStream:!0});i.pipe(n);let s=[];for await(let a of Za(n)){let o,u;switch(a.path){case"_rels/.rels":break;case"xl/_rels/workbook.xml.rels":await this._parseRels(a);break;case"xl/workbook.xml":await this._parseWorkbook(a);break;case"xl/sharedStrings.xml":yield*this._parseSharedStrings(a);break;case"xl/styles.xml":await this._parseStyles(a);break;default:a.path.match(/xl\/worksheets\/sheet\d+[.]xml/)?(o=a.path.match(/xl\/worksheets\/sheet(\d+)[.]xml/),u=o[1],this.sharedStrings&&this.workbookRels?yield*this._parseWorksheet(Za(a),u):await new Promise((f,c)=>{FV.file((h,d,p,g)=>{if(h)return c(h);s.push({sheetNo:u,path:d,tempFileCleanupCallback:g});let y=Bk.createWriteStream(d);return y.on("error",c),a.pipe(y),y.on("finish",()=>f())})})):a.path.match(/xl\/worksheets\/_rels\/sheet\d+[.]xml.rels/)&&(o=a.path.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),u=o[1],yield*this._parseHyperlinks(Za(a),u));break}a.autodrain()}for(let{sheetNo:a,path:o,tempFileCleanupCallback:u}of s){let f=Bk.createReadStream(o);f[Symbol.asyncIterator]||(f=f.pipe(new m1e)),yield*this._parseWorksheet(f,a),u()}}_emitEntry(e){this.options.entries==="emit"&&this.emit("entry",e)}async _parseRels(e){let r=new x1e;this.workbookRels=await r.parseStream(Za(e))}async _parseWorkbook(e){this._emitEntry({type:"workbook"});let r=new b1e;await r.parseStream(Za(e)),this.properties=r.map.workbookPr,this.model=r.model}async*_parseSharedStrings(e){switch(this._emitEntry({type:"shared-strings"}),this.options.sharedStrings){case"cache":this.sharedStrings=[];break;case"emit":break;default:return}let r=null,i=[],n=0,s=null;for await(let a of w1e(Za(e)))for(let{eventType:o,value:u}of a)if(o==="opentag"){let f=u;switch(f.name){case"b":s=s||{},s.bold=!0;break;case"charset":s=s||{},s.charset=parseInt(f.attributes.charset,10);break;case"color":s=s||{},s.color={},f.attributes.rgb&&(s.color.argb=f.attributes.argb),f.attributes.val&&(s.color.argb=f.attributes.val),f.attributes.theme&&(s.color.theme=f.attributes.theme);break;case"family":s=s||{},s.family=parseInt(f.attributes.val,10);break;case"i":s=s||{},s.italic=!0;break;case"outline":s=s||{},s.outline=!0;break;case"rFont":s=s||{},s.name=f.value;break;case"si":s=null,i=[],r=null;break;case"sz":s=s||{},s.size=parseInt(f.attributes.val,10);break;case"strike":break;case"t":r=null;break;case"u":s=s||{},s.underline=!0;break;case"vertAlign":s=s||{},s.vertAlign=f.attributes.val;break}}else if(o==="text")r=r?r+u:u;else if(o==="closetag")switch(u.name){case"r":i.push({font:s,text:r}),s=null,r=null;break;case"si":this.options.sharedStrings==="cache"?this.sharedStrings.push(i.length?{richText:i}:r):this.options.sharedStrings==="emit"&&(yield{index:n++,text:i.length?{richText:i}:r}),i=[],s=null,r=null;break}}async _parseStyles(e){this._emitEntry({type:"styles"}),this.options.styles==="cache"&&(this.styles=new DV,await this.styles.parseStream(Za(e)))}*_parseWorksheet(e,r){this._emitEntry({type:"worksheet",id:r});let i=new S1e({workbook:this,id:r,iterator:e,options:this.options}),n=(this.workbookRels||[]).find(a=>a.Target===`worksheets/sheet${r}.xml`),s=n&&(this.model.sheets||[]).find(a=>a.rId===n.Id);s&&(i.id=s.id,i.name=s.name,i.state=s.state),this.options.worksheets==="emit"&&(yield{eventType:"worksheet",value:i})}*_parseHyperlinks(e,r){this._emitEntry({type:"hyperlinks",id:r});let i=new E1e({workbook:this,id:r,iterator:e,options:this.options});this.options.hyperlinks==="emit"&&(yield{eventType:"hyperlinks",value:i})}};Oy.Options={worksheets:["emit","ignore"],sharedStrings:["cache","emit","ignore"],hyperlinks:["cache","emit","ignore"],styles:["cache","ignore"],entries:["emit","ignore"]};MV.exports=Oy});var BV=w((jPe,LV)=>{var qV={Workbook:T6(),ModelContainer:k6(),stream:{xlsx:{WorkbookWriter:pW(),WorkbookReader:PV()}}};Object.assign(qV,ni());LV.exports=qV});var $V=w(($Pe,jV)=>{if(parseInt(process.versions.node.split(".")[0],10)<10)throw new Error("For node versions older than 10, please use the ES5 Import: https://github.com/exceljs/exceljs#es5-imports");jV.exports=BV()});import{StdioServerTransport as dCe}from"@modelcontextprotocol/sdk/server/stdio.js";import{createServer as pCe}from"inistate-mcp";import{homedir as Y7}from"node:os";import{join as K7}from"node:path";function Q7(){return K7(Y7(),".inistate","core.db")}function Ds(t){let e=t.trim();if(e==="memory"||e===":memory:")return"memory";let r=/^([a-z][a-z0-9+.-]*):\/\//i.exec(e);return r?r[1].toLowerCase():"sqlite"}function OR(t=process.env){let e=(t.INISTATE_CORE_DB||"").trim()||Q7(),r,i=(t.INISTATE_CORE_CONNECTIONS||"").trim();if(i){let u;try{u=JSON.parse(i)}catch(f){throw new Error(`INISTATE_CORE_CONNECTIONS is not valid JSON: ${f instanceof Error?f.message:String(f)}`)}if(!u||typeof u!="object"||Array.isArray(u))throw new Error('INISTATE_CORE_CONNECTIONS must be a JSON object mapping module names to connection targets, e.g. {"NEC":"notion://<dbId>"}.');r=u}let n=r?"connections":Ds(e),a=(t.INISTATE_MCP_MODE||"").trim().toLowerCase()==="configure"?"configure":"runtime",o=t.INISTATE_LOG!=="0";return{dbTarget:e,scheme:n,mode:a,logEnabled:o,connections:r}}function yr(t){return(e,r)=>{if(!t)return;let i={ts:new Date().toISOString(),msg:e,...r};console.error(JSON.stringify(i))}}import{resolve as Q1e}from"node:path";import{pathToFileURL as J1e}from"node:url";var Fs=class t extends Error{code;details;constructor(e,r,i){super(r),this.name="EngineError",this.code=e,i&&(this.details=i),Object.setPrototypeOf(this,t.prototype)}};function ii(t){return new Fs("NOT_FOUND",t)}function kh(t,e="One or more fields failed validation"){return new Fs("VALIDATION_FAILED",e,t)}function IR(t){return new Fs("ILLEGAL_TRANSITION",t)}function NR(t){return new Fs("CONFLICT",t)}function DR(t){return t instanceof Fs}function MR(t){if(!t)return;let e=t.indexOf("(");return e===-1?t:t.slice(0,e)}function Wy(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:!1}function J7(t){let e=t.trim();return e===""?!1:!Number.isNaN(Number(e))}function e9(t){return typeof t=="string"&&t.includes("@")&&t.includes(".")}function t9(t){if(typeof t!="string")return!1;try{let e=new URL(t);return!!e.protocol&&!!e.host}catch{return!1}}function Nn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function FR(t,e){return typeof t[e]=="string"&&t[e].length>0}function PR(t,e,r){switch(e){case"Integer":return typeof r=="number"&&Number.isInteger(r)||typeof r=="string"&&/^[-+]?\d+$/.test(r.trim())?null:`${t} must be a whole number`;case"Number":case"Currency":return typeof r=="number"&&Number.isFinite(r)||typeof r=="string"&&J7(r)?null:`${t} must be a number`;case"Date":return typeof r=="string"&&!Number.isNaN(Date.parse(r))?null:`${t} must be a valid date (e.g. 2026-03-01)`;case"DateTime":return typeof r=="string"&&!Number.isNaN(Date.parse(r))?null:`${t} must be a valid date-time (ISO 8601)`;case"DateRange":return Nn(r)&&typeof r.from=="string"&&typeof r.to=="string"&&!Number.isNaN(Date.parse(r.from))&&!Number.isNaN(Date.parse(r.to))?null:`${t} must have a valid from and to date`;case"YesNo":return typeof r=="boolean"||typeof r=="string"&&["true","false","yes","no"].includes(r.trim().toLowerCase())?null:`${t} must be true or false`;case"Email":{let i=Array.isArray(r)?r:[r];for(let n of i)if(!e9(n))return`${t} contains an invalid email address: ${String(n)}`;return null}case"Link":return t9(r)?null:`${t} must be a valid URL`;case"Image":case"File":return Nn(r)&&FR(r,"path")?null:`${t} must be a file object with a path (e.g. { name, path })`;case"Images":case"Files":{if(!Array.isArray(r))return`${t} must be an array of file objects (e.g. [{ name, path }])`;for(let i of r)if(!Nn(i)||!FR(i,"path"))return`${t} entries must be file objects with a path (e.g. { name, path })`;return null}case"Module":return Nn(r)&&"id"in r&&"value"in r?null:`${t} must be a reference object { value, id }`;case"Modules":{if(!Array.isArray(r))return`${t} must be an array of reference objects { value, id }`;for(let i of r)if(!Nn(i)||!("id"in i)||!("value"in i))return`${t} entries must be reference objects { value, id }`;return null}case"User":return Nn(r)&&"id"in r&&"value"in r&&"username"in r?null:`${t} must be a user reference { value, id, username }`;case"Users":{if(!Array.isArray(r))return`${t} must be an array of user references { value, id, username }`;for(let i of r)if(!Nn(i)||!("id"in i)||!("value"in i)||!("username"in i))return`${t} entries must be user references { value, id, username }`;return null}default:return null}}function qR(t){let e=new Map;for(let r of t)r?.name&&e.set(r.name,r);return e}function r9(t){return t?.fields?t.fields.map(e=>typeof e=="string"?{name:e}:e):[]}function Rh(t,e,r,i){let n=[],s=qR(t.information),a=t.activities.find(f=>f.name===e),o=r9(a);for(let[f,c]of Object.entries(r)){if(Wy(c))continue;let h=s.get(f);if(!h?.type)continue;let d=MR(h.type);if(d==="Table"){let g=i9(f,h,c);n.push(...g);continue}let p=PR(f,d,c);p&&n.push({field:f,message:p})}let u={...i,...r};for(let f of o)f.required&&Wy(u[f.name])&&n.push({field:f.name,message:`${f.name} is required`});return n}function i9(t,e,r){if(!Array.isArray(r))return[{field:t,message:`${t} must be a table (an array of rows)`}];let i=qR(e.fields??[]),n=[];return r.forEach((s,a)=>{if(!Nn(s)){n.push({field:`${t}[${a}]`,message:`${t}[${a}] must be a row object`});return}for(let[o,u]of Object.entries(s)){if(Wy(u))continue;let f=i.get(o);if(!f?.type)continue;let c=MR(f.type);if(c==="Table")continue;let h=`${t}[${a}].${o}`,d=PR(h,c,u);d&&n.push({field:h,message:d})}}),n}function n9(){return new Date().toISOString()}function Ah(t){return{name:String(t.name??""),information:Array.isArray(t.information)?t.information:[],states:Array.isArray(t.states)?t.states:[],activities:Array.isArray(t.activities)?t.activities:[],flows:Array.isArray(t.flows)?t.flows:[]}}function LR(t){return t.states.length>0}function Hy(t){return LR(t)?(t.states.find(r=>r.initial===!0)??t.states[0])?.name??null:null}function s9(t,e,r){let i=e===null||e==="";for(let n of t.flows)if(n.activity===r&&(i||n.from===""||n.from===e))return n;return null}function Ih(t,e){let r={},i=e===null||e==="";for(let n of t.flows)(i||n.from===""||n.from===e)&&(r[n.activity]??=[]).push(n.to);return{currentState:e,transitions:r}}var Oh=class{constructor(e){this.store=e}store;capabilities(){return{workspaces:!1,governedHistory:!1,files:!1,authorization:!1}}listModuleDefinitions(){return this.store.listModules().map(e=>e.definition)}getModuleDefinition(e){return this.store.getModule(e)?.definition??null}getStructure(e){let r=this.getModuleDefinition(e);return r?Ah(r):null}putModuleDefinition(e,r){this.store.putModule({name:e,definition:r})}renameModule(e,r){this.store.renameModule(e,r)}getEntry(e,r){return this.store.getEntry(e,r)}queryEntries(e,r){return this.store.queryEntries(e,r)}transitionsFor(e,r){let i=this.getStructure(e);return i?Ih(i,r):{currentState:r,transitions:{}}}submitActivity(e){let r=this.store.getModule(e.module);if(!r)throw ii(`Module not found: ${e.module}`);let i=Ah(r.definition);if(e.idempotencyKey){let o=this.store.getIdempotent(e.idempotencyKey);if(o!==void 0)return o}let n=e.activity,s=e.input??{},a=e.entryId===void 0||n==="create";return this.store.transaction(o=>{let u=n9(),f;if(a){let c=Rh(i,n,s,{});if(c.length)throw kh(c);let h=o.insertEntry({module:e.module,state:Hy(i),version:1,data:s,createdAt:u,updatedAt:u});f={module:e.module,activity:n,entry:h,created:!0,deleted:!1}}else{let c=o.getEntry(e.module,e.entryId);if(!c)throw ii(`Entry not found: ${String(e.entryId)}`);if(e.expectedVersion!==void 0&&c.version!==e.expectedVersion)throw NR(`Version conflict on entry ${String(e.entryId)}: expected ${e.expectedVersion}, found ${c.version}`);if(n==="delete")o.deleteEntry(e.module,e.entryId),f={module:e.module,activity:n,entry:null,created:!1,deleted:!0};else if(n==="edit"||!LR(i)){let h=Rh(i,n,s,c.data);if(h.length)throw kh(h);let d={...c,data:{...c.data,...s},version:c.version+1,updatedAt:u};o.updateEntry(d),f={module:e.module,activity:n,entry:d,created:!1,deleted:!1}}else{let h=s9(i,c.state,n);if(!h)throw IR(`No flow permits activity '${n}' from state '${c.state??"\u2014"}' in module '${e.module}'`);let d=Rh(i,n,s,c.data);if(d.length)throw kh(d);let p={...c,data:{...c.data,...s},state:h.to,version:c.version+1,updatedAt:u};o.updateEntry(p),f={module:e.module,activity:n,entry:p,created:!1,deleted:!1}}}return e.idempotencyKey&&o.recordIdempotent(e.idempotencyKey,f),f})}submitActivities(e,r,i){return i.map(n=>{try{let s=this.submitActivity({module:e,activity:r,entryId:n.entryId,input:n.input,idempotencyKey:n.idempotencyKey,expectedVersion:n.expectedVersion});return{ok:!0,clientRef:n.clientRef,result:s}}catch(s){let a=s;return{ok:!1,clientRef:n.clientRef,code:a.code??"ERROR",message:a.message??String(s),details:a.details}}})}};import{readFileSync as jR,existsSync as $R}from"node:fs";import{dirname as UR,resolve as yu}from"node:path";import{fileURLToPath as a9}from"node:url";var o9=UR(a9(import.meta.url));function l9(t){let e=t;for(let r=0;r<8;r++){let i=yu(e,"data");if($R(yu(i,"inistate-schema.json")))return i;let n=UR(e);if(n===e)break;e=n}return yu(t,"../../data")}var WR=l9(o9),u9=yu(WR,"inistate-schema.json"),BR=yu(WR,"facts-module-design-guide.md"),Hi=JSON.parse(jR(u9,"utf-8")),DCe=$R(BR)?jR(BR,"utf-8"):"The FACTS Module Design Guide is not available in this distribution.",HR=["FieldType","FieldDefinition","SubFieldDefinition","StateDefinition","FileFieldValue","FileFieldInput","ModuleFieldValue","UserFieldValue","ErrorResponse"],f9=[...HR,"EntryData","Entry","EntryList","ActivityForm","ActivitySubmission","AvailableActivities","ActivityResult","FilterOperators"],c9=[...HR,"ActivityDefinition","ActivityFieldRef","FlowDefinition","ModuleSchema"];function h9(t,e){let r={};if(!t)return r;for(let i of e)i in t&&(r[i]=t[i]);return r}function zR(t){return{$schema:Hi.$schema,title:Hi.title,description:Hi.description,version:Hi.version,definitions:h9(Hi.definitions,t)}}var FCe=zR(f9),MCe=zR(c9),Xy=Hi.definitions?.FieldType?.enum??["Text","MultiText","Integer","Number","Currency","Date","DateTime","DateRange","Selection","Tag","YesNo","Email","Phone","Link","Image","Images","File","Files","Module","Modules","User","Users","Table","Signature","Formula"],d9=Hi.definitions?.ActivityDefinition?.properties?.actor?.enum??["human","ai","hybrid"],p9=Hi.workflow_guide?.state_color_system?.palette??{},Nh=Object.keys(p9),zy=Hi.workflow_guide?.state_color_system?.keyword_hints??{};function Vy(t){return t.startsWith("Selection(")&&t.endsWith(")")?!0:Xy.includes(t)}function XR(t){return Nh.length===0?/^#[0-9A-Fa-f]{6}$/.test(t):Nh.includes(t)}function VR(t){return d9.includes(t)}function GR(t){let e=t.toLowerCase();if((zy["#1E6B45"]||[]).some(s=>e.includes(s)))return"#1E6B45";if((zy["#8B2D2D"]||[]).some(s=>e.includes(s)))return"#8B2D2D";let n=["#2A7B50","#C0392B","#A07828","#6B4D91","#2968A8","#5A6070"];for(let s of n)if((zy[s]||[]).some(o=>e.includes(o)))return s;return"#2968A8"}function vu(t,e="create"){let r=[],i=[],n=t.name||"",s=t.information||[],a=t.states||[],o=t.activities||[],u=t.flows||[],f=a.length>0;!n&&e==="create"&&r.push("Module name is required.");let c=new Set;for(let h of s)c.has(h.name)&&r.push(`Duplicate field name: '${h.name}'.`),c.add(h.name);for(let h of s)if(h.type&&!Vy(h.type)&&r.push(`Field '${h.name}' has invalid type '${h.type}'. Valid types: ${Xy.join(", ")}.`),h.type==="Table")if(!h.fields||!Array.isArray(h.fields)||h.fields.length===0)r.push(`Table field '${h.name}' has no sub-fields defined.`);else for(let d of h.fields)d.type&&!Vy(d.type)&&r.push(`Table field '${h.name}' sub-field '${d.name}' has invalid type '${d.type}'.`);if(f){let h=a.filter(E=>E.initial===!0);h.length===0?r.push("No initial state defined \u2014 exactly one state must have initial: true."):h.length>1&&r.push(`Multiple initial states: ${h.map(E=>`'${E.name}'`).join(", ")}. Exactly one is allowed.`);let d=new Set;for(let E of a)d.has(E.name)&&r.push(`Duplicate state name: '${E.name}'.`),d.add(E.name);for(let E of a)E.color&&!XR(E.color)&&r.push(`State '${E.name}' has invalid color '${E.color}'. Valid colors: ${Nh.join(", ")}.`),E.color||i.push(`State '${E.name}' has no color \u2014 will use default.`);let p=new Set;for(let E of o)p.has(E.name)&&r.push(`Duplicate activity name: '${E.name}'.`),p.add(E.name);for(let E of o){if(E.actor&&!VR(E.actor)&&r.push(`Activity '${E.name}' has invalid actor '${E.actor}'. Valid: human, ai, hybrid.`),E.confidence_threshold!==void 0&&E.confidence_threshold!==null&&(E.confidence_threshold<0||E.confidence_threshold>1)&&r.push(`Activity '${E.name}' confidence_threshold must be between 0 and 1.`),E.fields&&Array.isArray(E.fields))for(let U of E.fields){let ee=typeof U=="string"?U:U.name;c.has(ee)||r.push(`Activity '${E.name}' references field '${ee}' which is not defined in information. Available fields: ${[...c].join(", ")}.`)}E.actor==="ai"&&(!E.confidence_threshold&&E.confidence_threshold!==0&&i.push(`Activity '${E.name}' has no confidence_threshold \u2014 AI agents will not be gated on this activity.`),E.ai_hint||i.push(`Activity '${E.name}' has actor 'ai' but no ai_hint \u2014 agents may struggle to execute correctly.`))}for(let E of u)E.from!==""&&!d.has(E.from)&&r.push(`Flow references state '${E.from}' (from) which is not defined. Available states: ${[...d].join(", ")}.`),d.has(E.to)||r.push(`Flow references state '${E.to}' (to) which is not defined. Available states: ${[...d].join(", ")}.`),p.has(E.activity)||r.push(`Flow from '${E.from}' to '${E.to}' references activity '${E.activity}' which is not defined in activities. Available activities: ${[...p].join(", ")}.`);let g=h.length>0?h[0].name:"",y=new Set(u.map(E=>E.to));for(let E of a)E.name!==g&&!y.has(E.name)&&i.push(`State '${E.name}' is unreachable \u2014 no flows lead to it.`);let v=new Set(u.map(E=>E.activity));for(let E of o)v.has(E.name)||i.push(`Activity '${E.name}' is not used in any flow.`);let b=new Set(u.map(E=>E.from)),k=a.filter(E=>!b.has(E.name));k.length===0&&i.push("No terminal states \u2014 process may run indefinitely.");let N={field_count:s.length,state_count:a.length,activity_count:o.length,flow_count:u.length,initial_state:g,terminal_states:k.map(E=>E.name),ai_activities:o.filter(E=>E.actor==="ai").length,hybrid_activities:o.filter(E=>E.actor==="hybrid").length,gated_activities:o.filter(E=>E.confidence_threshold&&E.confidence_threshold>0).length};return{valid:r.length===0,errors:r,warnings:i,summary:r.length===0?N:null}}return{valid:r.length===0,errors:r,warnings:i,summary:r.length===0?{field_count:s.length,module_type:"record_list"}:null}}var Rr=class t extends Error{structured;constructor(e){super(e.message),this.name="StructuredError",this.structured=e,Object.setPrototypeOf(this,t.prototype)}};function eo(t,e){let r=t?.[e];return Array.isArray(r)?r:[]}function mi(t){if(t instanceof Rr)return t;if(DR(t))switch(t.code){case"NOT_FOUND":return new Rr({error:"Not found",message:t.message,agent_action:"Verify the module name or entry ID. Do not retry with the same values."});case"VALIDATION_FAILED":return new Rr({error:"Validation failed",message:t.message,details:t.details,agent_action:"Surface details[].field and details[].message, correct the input, and retry."});case"ILLEGAL_TRANSITION":return new Rr({error:"Illegal transition",message:t.message,agent_action:"This activity is not legal from the entry's current state. Call get_form or get_entry to see availableActivities, then submit a permitted activity."});case"CONFLICT":return new Rr({error:"Conflict",message:t.message,agent_action:"The entry changed since you read it. Re-read it with get_entry and retry with the new version."})}return new Rr({error:"Request failed",message:t instanceof Error?t.message:String(t),agent_action:"Unexpected error. Report to the user."})}function Gy(t,e){let r=Ih(t,e);return{standard:["edit","delete"],custom:Object.keys(r.transitions),stateFlow:{currentState:r.currentState,transitions:r.transitions}}}function ZR(t,e,r){return{module:t,entryId:e.id,documentId:e.documentId,state:e.state,date:e.createdAt,data:e.data,version:e.version,createdDate:e.createdAt,updatedDate:e.updatedAt,availableActivities:Gy(r,e.state)}}var Dh=class{kind="local";engine;constructor(e){this.engine=e}capabilities(){let e=this.engine.capabilities();return{workspaces:e.workspaces,governedHistory:e.governedHistory,files:e.files,authorization:e.authorization,modes:["runtime","configure"]}}async listModules(){try{let r=this.engine.listModuleDefinitions().map(i=>{let n=Ah(i);return{name:n.name,icon:i.icon??null,description:i.description??null,type:n.states.length>0?"workflow":"record_list"}});return{list:r,totalItems:r.length}}catch(e){throw mi(e)}}async getModuleSchema(e){try{let r=this.engine.getModuleDefinition(e.module);if(!r)throw ii(`Module not found: ${e.module}`);let i={name:r.name,icon:r.icon,description:r.description,information:eo(r,"information"),states:eo(r,"states")};return e.tier==="extended"?{...i,activities:eo(r,"activities"),flows:eo(r,"flows")}:i}catch(r){throw mi(r)}}async getModuleCanvas(e){try{let r=this.engine.getModuleDefinition(e.module);if(!r)throw ii(`Module not found: ${e.module}`);return{id:r.id??r.name,...r}}catch(r){throw mi(r)}}async createModule(e){try{let r=vu(e,"create");if(!r.valid)throw new Rr({error:"Validation failed",message:r.errors.join(" ")||"Schema validation failed",details:r.errors.map(n=>({field:"schema",message:n})),agent_action:"Fix the schema errors and retry. Call validate_design to check before submitting."});let i=String(e.name??"");if(this.engine.getModuleDefinition(i))throw new Rr({error:"Module already exists",message:`A module named '${i}' already exists.`,agent_action:"Use update_module to modify it, or choose a different name."});return this.engine.putModuleDefinition(i,e),{id:i,name:i,message:`Module '${i}' created`,warnings:r.warnings,summary:r.summary}}catch(r){throw mi(r)}}async updateModule(e){try{let r=String(e.id),i=this.engine.getModuleDefinition(r);if(!i)throw ii(`Module not found: ${r}`);let n={...i};for(let o of["icon","description","information","states","activities","flows"])o in e.patch&&(n[o]=e.patch[o]);let s=e.patch.name!==void 0?String(e.patch.name):r;n.name=s;let a=vu(n,"update");if(!a.valid)throw new Rr({error:"Validation failed",message:a.errors.join(" ")||"Schema validation failed",details:a.errors.map(o=>({field:"schema",message:o})),agent_action:"Fix the schema errors and retry. Call validate_design to check before submitting."});if(s!==r){if(this.engine.getModuleDefinition(s))throw new Rr({error:"Validation failed",message:`Cannot rename to '${s}' \u2014 a module with that name already exists.`,agent_action:"Choose a different name."});this.engine.renameModule(r,s)}return this.engine.putModuleDefinition(s,n),{id:s,name:s,message:`Module '${s}' updated`,warnings:a.warnings}}catch(r){throw mi(r)}}async listEntries(e){try{let r=this.engine.getStructure(e.module);if(!r)throw ii(`Module not found: ${e.module}`);let{items:i,total:n}=this.engine.queryEntries(e.module,{state:e.state,search:e.search,filters:e.filters,sortBy:e.sortBy,sortDirection:e.sortDirection,page:e.currentPage,pageSize:e.pageSize,fields:e.fields});return{moduleId:e.module,page:e.currentPage??0,pageSize:e.pageSize??50,totalItems:n,list:i.map(s=>ZR(e.module,s,r))}}catch(r){throw mi(r)}}async getEntry(e){try{let r=this.engine.getStructure(e.module);if(!r)throw ii(`Module not found: ${e.module}`);let i=this.engine.getEntry(e.module,e.entryId);if(!i)throw ii(`Entry not found: ${String(e.entryId)}`);return ZR(e.module,i,r)}catch(r){throw mi(r)}}async getForm(e){try{let r=this.engine.getModuleDefinition(e.module),i=this.engine.getStructure(e.module);if(!r||!i)throw ii(`Module not found: ${e.module}`);let n=eo(r,"information"),s=new Map(n.map(y=>[String(y.name),y])),a=eo(r,"activities").find(y=>y.name===e.activity),o=Array.isArray(a?.fields)?a.fields:[],f=(o.length>0?o.map(y=>typeof y=="string"?{name:y}:y):n.map(y=>({name:String(y.name)}))).map(y=>{let v=s.get(y.name)??{},b={type:v.type,required:y.required??!1,readOnly:y.readOnly??!1},k=y.options??v.options;return k&&(b.options=k),v.fields&&(b.fields=v.fields),{[y.name]:b}}),c={},h,d=Hy(i);if(e.entryId!==void 0&&e.entryId!==null){let y=this.engine.getEntry(e.module,e.entryId);y&&(c=y.data,h=y.documentId,d=y.state)}let g=Ih(i,d).transitions[e.activity]??[];return{module:e.module,activity:e.activity,entryId:e.entryId??null,documentId:h,form:f,defaults:c,states:g,availableActivities:Gy(i,d)}}catch(r){throw mi(r)}}async submitActivity(e){try{let r=this.engine.submitActivity({module:e.module,activity:e.activity,entryId:e.entryId,input:e.input,idempotencyKey:e.idempotencyKey,expectedVersion:e.expectedVersion});if(r.deleted)return{module:e.module,activity:e.activity,entryId:e.entryId,deleted:!0,message:null};let i=r.entry,n=this.engine.getStructure(e.module);return{module:e.module,activity:e.activity,entryId:i.id,documentId:i.documentId,state:i.state,version:i.version,message:null,availableActivities:Gy(n,i.state)}}catch(r){throw mi(r)}}async submitActivities(e){try{let r=this.engine.submitActivities(e.module,e.activity,e.items),i=0,n=0,s=r.map(a=>{if(a.ok){i++;let o=a.result;if(o.deleted)return{success:!0,clientRef:a.clientRef,deleted:!0};let u=o.entry;return{success:!0,clientRef:a.clientRef,entryId:u.id,documentId:u.documentId,state:u.state,version:u.version}}return n++,{success:!1,clientRef:a.clientRef,error:a.code,message:a.message,details:a.details}});return{module:e.module,activity:e.activity,results:s,summary:{total:r.length,succeeded:i,failed:n}}}catch(r){throw mi(r)}}};function g9(t){let e=t.split(/[^A-Za-z0-9]+/).filter(Boolean);return e.length>=2?e.map(i=>i[0]).join("").slice(0,4).toUpperCase():((e[0]??"REC").replace(/[^A-Za-z0-9]/g,"").slice(0,3)||"REC").toUpperCase()}function Ms(t,e){return`${g9(t)}-${String(e).padStart(4,"0")}`}function tr(t){return String(t??"").toLowerCase()}function Ar(t){if(typeof t=="number")return t;if(typeof t=="string"&&t.trim()!==""&&!Number.isNaN(Number(t)))return Number(t);if(typeof t=="string"){let e=Date.parse(t);if(!Number.isNaN(e))return e}return null}function m9(t,e){for(let[r,i]of Object.entries(e))switch(r){case"is":if(t!==i)return!1;break;case"not":if(t===i)return!1;break;case"contains":if(!tr(t).includes(tr(i)))return!1;break;case"startsWith":if(!tr(t).startsWith(tr(i)))return!1;break;case"endsWith":if(!tr(t).endsWith(tr(i)))return!1;break;case"min":case"after":{let n=Ar(t),s=Ar(i);if(n===null||s===null||n<s)return!1;break}case"max":case"before":{let n=Ar(t),s=Ar(i);if(n===null||s===null||n>s)return!1;break}case"above":{let n=Ar(t),s=Ar(i);if(n===null||s===null||n<=s)return!1;break}case"below":{let n=Ar(t),s=Ar(i);if(n===null||s===null||n>=s)return!1;break}case"between":{if(!Array.isArray(i)||i.length!==2)return!1;let n=Ar(t),s=Ar(i[0]),a=Ar(i[1]);if(n===null||s===null||a===null||n<s||n>a)return!1;break}case"empty":{let n=t==null||t===""||Array.isArray(t)&&t.length===0;if(!!i!==n)return!1;break}case"exists":{let n=t!=null;if(!!i!==n)return!1;break}case"excludes":if(tr(t).includes(tr(i)))return!1;break;case"yes":if(!(t===!0||tr(t)==="true"||tr(t)==="yes"))return!1;break;case"no":if(!(t===!1||tr(t)==="false"||tr(t)==="no"))return!1;break;default:break}return!0}function y9(t,e,r){let i=t.data[e];return r!==null&&typeof r=="object"&&!Array.isArray(r)?m9(i,r):typeof i=="string"||typeof r=="string"?tr(i)===tr(r):i===r}function YR(t,e){for(let[r,i]of Object.entries(e)){if(r==="or"&&Array.isArray(i)){if(!i.some(s=>s&&typeof s=="object"&&YR(t,s)))return!1;continue}if(!y9(t,r,i))return!1}return!0}function v9(t,e){let r=e.toLowerCase();if(t.documentId.toLowerCase().includes(r))return!0;for(let i of Object.values(t.data))if(typeof i=="string"&&i.toLowerCase().includes(r))return!0;return!1}function to(t,e){let r=t;e.state&&(r=r.filter(u=>u.state===e.state)),e.search&&(r=r.filter(u=>v9(u,e.search))),e.filters&&(r=r.filter(u=>YR(u,e.filters)));let i=r.length;if(e.sortBy){let u=e.sortDirection==="desc"?-1:1,f=e.sortBy;r=[...r].sort((c,h)=>{let d=c.data[f],p=h.data[f],g=Ar(d),y=Ar(p);return g!==null&&y!==null?(g-y)*u:tr(d).localeCompare(tr(p))*u})}let n=e.pageSize&&e.pageSize>0?Math.min(e.pageSize,500):50,a=(e.page&&e.page>0?e.page:0)*n,o=r.slice(a,a+n);if(e.fields&&e.fields.length>0){let u=new Set(e.fields);o=o.map(f=>({...f,data:Object.fromEntries(Object.entries(f.data).filter(([c])=>u.has(c)))}))}return{items:o,total:i}}var Or=t=>structuredClone(t);function _9(t){let e=new Map;for(let[r,i]of t)e.set(r,new Map([...i].map(([n,s])=>[n,Or(s)])));return e}var ro=class{modules=new Map;entries=new Map;idem=new Map;counters=new Map;init(){}close(){}getModule(e){let r=this.modules.get(e);return r?Or(r):null}listModules(){return[...this.modules.values()].map(Or)}putModule(e){this.modules.set(e.name,Or(e))}renameModule(e,r){if(e===r)return;let i=this.modules.get(e);i&&(this.modules.delete(e),this.modules.set(r,{...i,name:r}));let n=this.entries.get(e);if(n){this.entries.delete(e);for(let a of n.values())a.module=r;this.entries.set(r,n)}let s=this.counters.get(e);s!==void 0&&(this.counters.delete(e),this.counters.set(r,s))}getEntry(e,r){let i=this.entries.get(e)?.get(String(r));return i?Or(i):null}queryEntries(e,r){let i=[...this.entries.get(e)?.values()??[]].map(Or);return to(i,r)}getIdempotent(e){return this.idem.has(e)?Or(this.idem.get(e)):void 0}transaction(e){let r={entries:_9(this.entries),idem:new Map(this.idem),counters:new Map(this.counters)},n=e({getEntry:(s,a)=>{let o=r.entries.get(s)?.get(String(a));return o?Or(o):null},insertEntry:s=>{let a=(r.counters.get(s.module)??0)+1;r.counters.set(s.module,a);let o={id:a,documentId:Ms(s.module,a),module:s.module,state:s.state,version:s.version,data:Or(s.data),createdAt:s.createdAt,updatedAt:s.updatedAt},u=r.entries.get(s.module);return u||(u=new Map,r.entries.set(s.module,u)),u.set(String(a),o),Or(o)},updateEntry:s=>{let a=r.entries.get(s.module);if(!a)throw new Error(`module not loaded: ${s.module}`);return a.set(String(s.id),Or(s)),Or(s)},deleteEntry:(s,a)=>{r.entries.get(s)?.delete(String(a))},recordIdempotent:(s,a)=>{r.idem.set(s,Or(a))}});return this.entries=r.entries,this.idem=r.idem,this.counters=r.counters,n}};import w9 from"better-sqlite3";import{mkdirSync as b9}from"node:fs";import{dirname as x9}from"node:path";function KR(t){return{id:t.id,documentId:t.document_id,module:t.module,state:t.state,version:t.version,data:JSON.parse(t.data),createdAt:t.created_at,updatedAt:t.updated_at}}var Ps=class{db;constructor(e){e!==":memory:"&&b9(x9(e),{recursive:!0}),this.db=new w9(e),this.db.pragma("journal_mode = WAL"),this.db.pragma("synchronous = NORMAL"),this.db.pragma("foreign_keys = ON"),this.init()}init(){this.db.exec(`
229
+ CREATE TABLE IF NOT EXISTS modules (
230
+ name TEXT PRIMARY KEY,
231
+ definition TEXT NOT NULL
232
+ );
233
+ CREATE TABLE IF NOT EXISTS entries (
234
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
235
+ module TEXT NOT NULL,
236
+ document_id TEXT NOT NULL,
237
+ state TEXT,
238
+ version INTEGER NOT NULL,
239
+ data TEXT NOT NULL,
240
+ created_at TEXT NOT NULL,
241
+ updated_at TEXT NOT NULL
242
+ );
243
+ CREATE INDEX IF NOT EXISTS idx_entries_module ON entries(module);
244
+ CREATE INDEX IF NOT EXISTS idx_entries_module_state ON entries(module, state);
245
+ CREATE TABLE IF NOT EXISTS doc_seq (
246
+ module TEXT PRIMARY KEY,
247
+ n INTEGER NOT NULL
248
+ );
249
+ CREATE TABLE IF NOT EXISTS idempotency (
250
+ key TEXT PRIMARY KEY,
251
+ result TEXT NOT NULL
252
+ );
253
+ `)}close(){this.db.close()}getModule(e){let r=this.db.prepare("SELECT name, definition FROM modules WHERE name = ?").get(e);return r?{name:r.name,definition:JSON.parse(r.definition)}:null}listModules(){return this.db.prepare("SELECT name, definition FROM modules ORDER BY name").all().map(r=>({name:r.name,definition:JSON.parse(r.definition)}))}putModule(e){this.db.prepare(`INSERT INTO modules (name, definition) VALUES (?, ?)
254
+ ON CONFLICT(name) DO UPDATE SET definition = excluded.definition`).run(e.name,JSON.stringify(e.definition))}renameModule(e,r){if(e===r)return;this.db.transaction(()=>{this.db.prepare("UPDATE modules SET name = ? WHERE name = ?").run(r,e),this.db.prepare("UPDATE entries SET module = ? WHERE module = ?").run(r,e),this.db.prepare("UPDATE doc_seq SET module = ? WHERE module = ?").run(r,e)}).immediate()}getEntry(e,r){let i=Number(r);if(!Number.isInteger(i))return null;let n=this.db.prepare("SELECT * FROM entries WHERE id = ? AND module = ?").get(i,e);return n?KR(n):null}queryEntries(e,r){let i=this.db.prepare("SELECT * FROM entries WHERE module = ?").all(e);return to(i.map(KR),r)}getIdempotent(e){let r=this.db.prepare("SELECT result FROM idempotency WHERE key = ?").get(e);return r?JSON.parse(r.result):void 0}transaction(e){let r={getEntry:(n,s)=>this.getEntry(n,s),insertEntry:n=>this.insertEntry(n),updateEntry:n=>this.updateEntry(n),deleteEntry:(n,s)=>{let a=Number(s);this.db.prepare("DELETE FROM entries WHERE id = ? AND module = ?").run(a,n)},recordIdempotent:(n,s)=>{this.db.prepare(`INSERT INTO idempotency (key, result) VALUES (?, ?)
255
+ ON CONFLICT(key) DO UPDATE SET result = excluded.result`).run(n,JSON.stringify(s))}};return this.db.transaction(()=>e(r)).immediate()}insertEntry(e){let i=(this.db.prepare("SELECT n FROM doc_seq WHERE module = ?").get(e.module)?.n??0)+1;this.db.prepare(`INSERT INTO doc_seq (module, n) VALUES (?, ?)
256
+ ON CONFLICT(module) DO UPDATE SET n = excluded.n`).run(e.module,i);let n=Ms(e.module,i),s=this.db.prepare(`INSERT INTO entries (module, document_id, state, version, data, created_at, updated_at)
257
+ VALUES (?, ?, ?, ?, ?, ?, ?)`).run(e.module,n,e.state,e.version,JSON.stringify(e.data),e.createdAt,e.updatedAt);return{id:Number(s.lastInsertRowid),documentId:n,module:e.module,state:e.state,version:e.version,data:e.data,createdAt:e.createdAt,updatedAt:e.updatedAt}}updateEntry(e){return this.db.prepare(`UPDATE entries SET state = ?, version = ?, data = ?, updated_at = ?
258
+ WHERE id = ? AND module = ?`).run(e.state,e.version,JSON.stringify(e.data),e.updatedAt,Number(e.id),e.module),e}};import{homedir as S9}from"node:os";import{join as E9}from"node:path";function Wr(t,e,r){if(r==="memory"||r===":memory:")return new ro;if(r)return new Ps(r);let i=`${t}-${e}`.replace(/[^a-zA-Z0-9._-]/g,"_").slice(0,80)||t;return new Ps(E9(S9(),".inistate",`${i}.db`))}var yi=t=>structuredClone(t),QR=t=>`substrate-idmap${t}`;function T9(t){let e=Array.isArray(t.information)?t.information:[],r=Array.isArray(t.states)?t.states:[],i=[];for(let s of e){let a=String(s.name??"");if(!a)continue;let o={name:a,type:String(s.type??"Text")};Array.isArray(s.options)&&s.options.length>0&&(o.options=s.options.map(String)),i.push(o)}let n=r.map(s=>String(s.name??"")).filter(Boolean);return{fields:i,states:n.length>0?n:void 0}}var vr=class{constructor(e,r,i,n=!0){this.meta=r;this.log=i;this.provision=n;if(e.length===0)throw new Error("ExternalSubstrateAdapter requires at least one module\u2192substrate binding.");for(let s of e)this.bound.set(s.module,{module:s.module,driver:s.driver,provision:s.provision??n,entries:new Map,idMap:new Map,counter:0,queue:[],pendingSchema:null,draining:null})}meta;log;provision;bound=new Map;async init(){if(await this.meta.init(),this.bound.size===1){let[[e,r]]=[...this.bound.entries()];if(!this.meta.getModule(e)){let i=this.meta.listModules();i.length===1&&i[0].name!==e&&(this.bound.delete(e),r.module=i[0].name,this.bound.set(r.module,r))}}for(let e of this.bound.values()){let r=this.meta.getIdempotent(QR(e.module)),i=new Map,n=r?.counter??0;for(let[a,o]of Object.entries(r?.idMap??{})){let u=Number(a);i.set(o,u),u>n&&(n=u)}let s=await e.driver.list();e.entries.clear(),e.idMap.clear();for(let a of s){let o=i.get(a.recordId)??++n,u=String(o);e.entries.set(u,{id:o,documentId:Ms(e.module,o),module:e.module,state:a.state??null,version:1,data:yi(a.fields),createdAt:"",updatedAt:""}),e.idMap.set(u,a.recordId)}e.counter=n,this.persistIdMap(e),this.log?.("substrate_hydrated",{substrate:e.driver.label,module:e.module,records:s.length})}}persistIdMap(e){let r={counter:e.counter,idMap:Object.fromEntries(e.idMap)};this.meta.transaction(i=>i.recordIdempotent(QR(e.module),r))}async close(){await this.flush(),await this.meta.close()}async flush(){let e=[...this.bound.values()].map(r=>r.draining).filter(Boolean);for(;e.length>0;)await Promise.all(e),e=[...this.bound.values()].map(r=>r.draining).filter(Boolean)}boundModules(){return[...this.bound.keys()]}getModule(e){return this.meta.getModule(e)}listModules(){return this.boundModules().map(e=>this.meta.getModule(e)).filter(e=>e!==null)}putModule(e){let r=this.bound.get(e.name);if(!r&&this.bound.size===1){let[[i,n]]=[...this.bound.entries()];if(!this.meta.getModule(n.module)){this.bound.delete(i),n.module=e.name;for(let s of n.entries.values())s.module=e.name;this.bound.set(e.name,n),r=n,this.persistIdMap(n)}}if(!r)throw new Error(`No substrate table is configured for module '${e.name}'. Configured modules: ${this.boundModules().join(", ")||"(none)"}.`);this.meta.putModule(e),r.provision&&r.driver.ensureColumns&&(r.pendingSchema=T9(e.definition),this.kick(r))}renameModule(e,r){let i=this.bound.get(e);if(!(!i||e===r)){this.bound.delete(e),i.module=r;for(let n of i.entries.values())n.module=r;this.bound.set(r,i),this.meta.renameModule(e,r),this.persistIdMap(i)}}getEntry(e,r){let i=this.bound.get(e)?.entries.get(String(r));return i?yi(i):null}queryEntries(e,r){let i=this.bound.get(e);return i?to([...i.entries.values()].map(yi),r):{items:[],total:0}}getIdempotent(e){return this.meta.getIdempotent(e)}transaction(e){let r=new Map,i=new Map,n=[],s=[],a=f=>{let c=this.bound.get(f);if(!c)throw new Error(`No substrate table is configured for module '${f}'.`);return r.has(f)||(r.set(f,new Map([...c.entries].map(([h,d])=>[h,yi(d)]))),i.set(f,c.counter)),c},u=e({getEntry:(f,c)=>{a(f);let h=r.get(f).get(String(c));return h?yi(h):null},insertEntry:f=>{a(f.module);let c=i.get(f.module)+1;i.set(f.module,c);let h={id:c,documentId:Ms(f.module,c),module:f.module,state:f.state,version:f.version,data:yi(f.data),createdAt:f.createdAt,updatedAt:f.updatedAt};return r.get(f.module).set(String(c),h),s.push({module:f.module,op:{kind:"create",localId:c}}),yi(h)},updateEntry:f=>(a(f.module),r.get(f.module).set(String(f.id),yi(f)),s.push({module:f.module,op:{kind:"update",localId:f.id}}),yi(f)),deleteEntry:(f,c)=>{a(f),r.get(f).delete(String(c)),s.push({module:f,op:{kind:"delete",localId:c}})},recordIdempotent:(f,c)=>{n.push([f,yi(c)])}});for(let[f,c]of r){let h=this.bound.get(f);h.entries=c,h.counter=i.get(f)}n.length>0&&this.meta.transaction(f=>{for(let[c,h]of n)f.recordIdempotent(c,h)});for(let{module:f,op:c}of s){let h=this.bound.get(f);h.queue.push(c),this.kick(h)}return u}kick(e){e.draining||(e.draining=this.drain(e).finally(()=>e.draining=null))}async drain(e){for(;e.pendingSchema||e.queue.length>0;){if(e.pendingSchema&&e.driver.ensureColumns){let i=e.pendingSchema;e.pendingSchema=null;try{let{added:n}=await e.driver.ensureColumns(i);n.length>0&&this.log?.("substrate_columns_added",{substrate:e.driver.label,module:e.module,added:n})}catch(n){this.log?.("substrate_schema_failed",{substrate:e.driver.label,module:e.module,error:n instanceof Error?n.message:String(n)})}continue}let r=e.queue.shift();try{await this.apply(e,r)}catch(i){this.log?.("substrate_writeback_failed",{substrate:e.driver.label,module:e.module,kind:r.kind,localId:r.localId,error:i instanceof Error?i.message:String(i)})}}}async apply(e,r){let i=String(r.localId);if(r.kind==="delete"){let o=e.idMap.get(i);o&&(await e.driver.remove(o),e.idMap.delete(i),this.persistIdMap(e));return}let n=e.entries.get(i);if(!n)return;let s={state:n.state,fields:n.data},a=e.idMap.get(i);if(a)await e.driver.update(a,s);else{let{recordId:o}=await e.driver.create(s);e.idMap.set(i,o),this.persistIdMap(e)}}};var C9="2022-06-28",k9="https://api.notion.com/v1",R9=new Set(["files","formula","rollup","created_time","created_by","last_edited_time","last_edited_by","unique_id","button","verification"]);function A9(t){return Array.isArray(t)?t.map(e=>e&&typeof e=="object"?String(e.plain_text??""):"").join(""):""}function O9(t){let e=String(t.type??""),r=t[e];switch(e){case"title":case"rich_text":return A9(r);case"number":return typeof r=="number"?r:null;case"select":case"status":return r&&typeof r=="object"?r.name??null:null;case"multi_select":return Array.isArray(r)?r.map(i=>i.name):[];case"checkbox":return!!r;case"date":return r&&typeof r=="object"?r.start??null:null;case"url":case"email":case"phone_number":return r??null;default:return r??null}}function JR(t,e){switch(t){case"title":return{title:[{type:"text",text:{content:String(e??"")}}]};case"rich_text":return{rich_text:[{type:"text",text:{content:String(e??"")}}]};case"number":return{number:e==null||e===""?null:Number(e)};case"select":return{select:e?{name:String(e)}:null};case"status":return{status:e?{name:String(e)}:null};case"multi_select":return{multi_select:(Array.isArray(e)?e:e?[e]:[]).map(r=>({name:String(r)}))};case"checkbox":return{checkbox:e===!0||e==="true"||e==="yes"};case"date":return{date:e?{start:String(e)}:null};case"url":return{url:e?String(e):null};case"email":return{email:e?String(e):null};case"phone_number":return{phone_number:e?String(e):null};default:return{rich_text:[{type:"text",text:{content:String(e??"")}}]}}}function I9(t,e){switch(t.includes("(")?t.slice(0,t.indexOf("(")):t){case"Number":case"Currency":case"Integer":return{number:{}};case"Selection":return{select:{options:(e??[]).map(i=>({name:i}))}};case"Tag":return{multi_select:{options:(e??[]).map(i=>({name:i}))}};case"YesNo":return{checkbox:{}};case"Date":case"DateTime":return{date:{}};case"Link":return{url:{}};case"Email":return{email:{}};case"Phone":return{phone_number:{}};default:return{rich_text:{}}}}var _u=class{constructor(e){this.cfg=e;this.fetchImpl=e.fetchImpl??fetch,this.label=`Notion database ${e.databaseId}`}cfg;label;fetchImpl;propTypes={};headers(){return{Authorization:`Bearer ${this.cfg.token}`,"Notion-Version":C9,"Content-Type":"application/json"}}async req(e,r,i){let n=await this.fetchImpl(`${k9}${r}`,{method:e,headers:this.headers(),body:i!==void 0?JSON.stringify(i):void 0}),s=await n.text();if(!n.ok)throw new Error(`Notion ${e} ${r} \u2192 ${n.status}: ${s.slice(0,300)}`);return s?JSON.parse(s):{}}async loadSchema(){let r=(await this.req("GET",`/databases/${this.cfg.databaseId}`)).properties??{};this.propTypes={};for(let[i,n]of Object.entries(r))this.propTypes[i]=String(n.type??"rich_text")}splitState(e){let r={},i=null;for(let[n,s]of Object.entries(e)){let a=O9(s);n===this.cfg.stateProperty?i=a:r[n]=a}return Object.assign(r,{__state:i})}buildProperties(e){let r={};for(let[i,n]of Object.entries(e.fields)){let s=this.propTypes[i]??"rich_text";R9.has(s)||(r[i]=JR(s,n))}if(e.state!==void 0&&e.state!==null&&this.cfg.stateProperty){let i=this.propTypes[this.cfg.stateProperty]??"select";r[this.cfg.stateProperty]=JR(i,e.state)}return r}async list(){await this.loadSchema();let e=[],r;do{let i=await this.req("POST",`/databases/${this.cfg.databaseId}/query`,{start_cursor:r,page_size:100}),n=Array.isArray(i.results)?i.results:[];for(let s of n){let a=s.properties??{},o=this.splitState(a),{__state:u,...f}=o;e.push({recordId:String(s.id),state:u??null,fields:f})}r=i.has_more?String(i.next_cursor):void 0}while(r);return e}async create(e){let r=await this.req("POST","/pages",{parent:{database_id:this.cfg.databaseId},properties:this.buildProperties(e)});return{recordId:String(r.id)}}async update(e,r){await this.req("PATCH",`/pages/${e}`,{properties:this.buildProperties(r)})}async remove(e){await this.req("PATCH",`/pages/${e}`,{archived:!0})}async ensureColumns(e){let i=(await this.req("GET",`/databases/${this.cfg.databaseId}`)).properties??{},n={},s=[],a=(o,u,f)=>{let c=i[o]?.[u],h=new Set((c?.options??[]).map(g=>g.name)),d=f.filter(g=>!h.has(g));if(d.length===0)return;let p=[...(c?.options??[]).map(g=>g.id?{id:g.id,name:g.name}:{name:g.name}),...d.map(g=>({name:g}))];n[o]={[u]:{options:p}}};for(let o of e.fields){let u=i[o.name];if(u){let f=String(u.type);(f==="select"||f==="multi_select")&&o.options?.length&&a(o.name,f,o.options);continue}n[o.name]=I9(o.type,o.options),s.push(o.name)}if(e.states?.length&&this.cfg.stateProperty){let o=i[this.cfg.stateProperty];o?String(o.type)==="select"&&a(this.cfg.stateProperty,"select",e.states):(n[this.cfg.stateProperty]={select:{options:e.states.map(u=>({name:u}))}},s.push(this.cfg.stateProperty))}return Object.keys(n).length>0&&await this.req("PATCH",`/databases/${this.cfg.databaseId}`,{properties:n}),{added:s}}},N9=new Set(["module","state","title","table"]);function eA(t){let e=process.env.INISTATE_NOTION_TOKEN?.trim();if(!e)throw new Error("Notion adapter requires INISTATE_NOTION_TOKEN (your Notion internal integration token). External substrates are opt-in and use your own credentials (\xA713).");let r=t.replace(/^notion:\/\//,""),[i,n]=r.split("?"),s=new URLSearchParams(n??""),a=s.get("state")||process.env.INISTATE_NOTION_STATE||"Status",o=s.get("title")||process.env.INISTATE_NOTION_TITLE||"Name",u=g=>new _u({token:e,databaseId:g,stateProperty:a,titleProperty:o}),f=[],c;if(i){let g=s.get("module")||process.env.INISTATE_NOTION_MODULE||"Records";f.push({module:g,driver:u(i)}),c=i}else{let g={},y=process.env.INISTATE_NOTION_DATABASES?.trim();y&&Object.assign(g,JSON.parse(y));for(let[b,k]of s.entries())N9.has(b)||(g[b]=k);let v=Object.entries(g);if(v.length===0)throw new Error("Notion adapter target must be notion://<databaseId> (single) or notion://?Module=<databaseId>&\u2026 / INISTATE_NOTION_DATABASES JSON (multi).");for(let[b,k]of v)f.push({module:b,driver:u(k)});c=`multi-${Object.keys(g).sort().join(".")}`}let h=Wr("notion",c,s.get("meta")),d=yr(process.env.INISTATE_LOG!=="0"),p=!["off","false","0"].includes((s.get("provision")??"").toLowerCase());return new vr(f,h,d,p)}var D9="https://api.airtable.com/v0",tA="https://api.airtable.com/v0/meta";function F9(t,e){switch(t.includes("(")?t.slice(0,t.indexOf("(")):t){case"Number":case"Currency":return{type:"number",options:{precision:2}};case"Integer":return{type:"number",options:{precision:0}};case"Selection":return{type:"singleSelect",options:{choices:(e??[]).map(i=>({name:i}))}};case"Tag":return{type:"multipleSelects",options:{choices:(e??[]).map(i=>({name:i}))}};case"YesNo":return{type:"checkbox",options:{icon:"check",color:"greenBright"}};case"Date":case"DateTime":return{type:"date",options:{dateFormat:{name:"iso"}}};case"Email":return{type:"email"};case"Link":return{type:"url"};case"Phone":return{type:"phoneNumber"};default:return{type:"singleLineText"}}}var wu=class{constructor(e){this.cfg=e;this.fetchImpl=e.fetchImpl??fetch,this.label=`Airtable ${e.baseId}/${e.table}`}cfg;label;fetchImpl;url(e=""){return`${D9}/${this.cfg.baseId}/${encodeURIComponent(this.cfg.table)}${e}`}async req(e,r,i){let n=await this.fetchImpl(r,{method:e,headers:{Authorization:`Bearer ${this.cfg.token}`,"Content-Type":"application/json"},body:i!==void 0?JSON.stringify(i):void 0}),s=await n.text();if(!n.ok)throw new Error(`Airtable ${e} \u2192 ${n.status}: ${s.slice(0,300)}`);return s?JSON.parse(s):{}}split(e){let r={},i=null;for(let[n,s]of Object.entries(e))n===this.cfg.stateField?i=s:r[n]=s;return{state:i,data:r}}merge(e){let r={...e.fields};return e.state!==void 0&&e.state!==null&&this.cfg.stateField&&(r[this.cfg.stateField]=e.state),r}async list(){let e=[],r;do{let i=new URLSearchParams({pageSize:"100"});r&&i.set("offset",r);let n=await this.req("GET",`${this.url()}?${i.toString()}`),s=Array.isArray(n.records)?n.records:[];for(let a of s){let{state:o,data:u}=this.split(a.fields??{});e.push({recordId:String(a.id),state:o??null,fields:u})}r=n.offset?String(n.offset):void 0}while(r);return e}async create(e){let r=await this.req("POST",this.url(),{fields:this.merge(e),typecast:!0});return{recordId:String(r.id)}}async update(e,r){await this.req("PATCH",this.url(`/${e}`),{fields:this.merge(r),typecast:!0})}async remove(e){await this.req("DELETE",this.url(`/${e}`))}async ensureColumns(e){let r=await this.req("GET",`${tA}/bases/${this.cfg.baseId}/tables`),n=(Array.isArray(r.tables)?r.tables:[]).find(u=>u.id===this.cfg.table||u.name===this.cfg.table);if(!n)throw new Error(`Airtable table '${this.cfg.table}' not found via the Metadata API.`);let s=new Set((n.fields??[]).map(u=>u.name)),a=[],o=`${tA}/bases/${this.cfg.baseId}/tables/${n.id}/fields`;for(let u of e.fields){if(s.has(u.name))continue;let f=F9(u.type,u.options);await this.req("POST",o,{name:u.name,...f}),a.push(u.name)}return e.states?.length&&this.cfg.stateField&&!s.has(this.cfg.stateField)&&(await this.req("POST",o,{name:this.cfg.stateField,type:"singleSelect",options:{choices:e.states.map(u=>({name:u}))}}),a.push(this.cfg.stateField)),{added:a}}},M9=new Set(["module","state","table","title"]);function rA(t){let e=process.env.INISTATE_AIRTABLE_TOKEN?.trim();if(!e)throw new Error("Airtable adapter requires INISTATE_AIRTABLE_TOKEN (your Airtable personal access token). External substrates are opt-in and use your own credentials (\xA713).");let r=t.replace(/^airtable:\/\//,""),[i,n]=r.split("?"),s=(i??"").split("/").filter(Boolean),a=s[0],o=new URLSearchParams(n??""),u=o.get("state")||process.env.INISTATE_AIRTABLE_STATE||"Status";if(!a)throw new Error("Airtable adapter target must start with airtable://<baseId>.");let f=v=>new wu({token:e,baseId:a,table:v,stateField:u}),c=[],h,d=s[1]||o.get("table")||process.env.INISTATE_AIRTABLE_TABLE;if(d){let v=o.get("module")||process.env.INISTATE_AIRTABLE_MODULE||"Records";c.push({module:v,driver:f(d)}),h=`${a}.${d}`}else{let v={},b=process.env.INISTATE_AIRTABLE_TABLES?.trim();b&&Object.assign(v,JSON.parse(b));for(let[N,E]of o.entries())M9.has(N)||(v[N]=E);let k=Object.entries(v);if(k.length===0)throw new Error("Airtable adapter target must be airtable://<baseId>/<table> (single) or airtable://<baseId>?Module=<tableId>&\u2026 / INISTATE_AIRTABLE_TABLES JSON (multi).");for(let[N,E]of k)c.push({module:N,driver:f(E)});h=`${a}.multi`}let p=Wr("airtable",h,o.get("meta")),g=yr(process.env.INISTATE_LOG!=="0"),y=!["off","false","0"].includes((o.get("provision")??"").toLowerCase());return new vr(c,p,g,y)}import{randomUUID as iA}from"node:crypto";var P9="https://sheets.googleapis.com/v4/spreadsheets";function Fh(t){let e=t+1,r="";for(;e>0;){let i=(e-1)%26;r=String.fromCharCode(65+i)+r,e=Math.floor((e-1)/26)}return r}function q9(t){return t==null?"":typeof t=="object"?JSON.stringify(t):t}var bu=class{constructor(e){this.cfg=e;this.fetchImpl=e.fetchImpl??fetch,this.label=`Google Sheet ${e.spreadsheetId}/${e.sheetTitle}`}cfg;label;fetchImpl;header=null;sheetId=null;a1(e){let r=`'${this.cfg.sheetTitle.replace(/'/g,"''")}'`;return encodeURIComponent(`${r}!${e}`)}async req(e,r,i){let n=await this.fetchImpl(`${P9}/${this.cfg.spreadsheetId}${r}`,{method:e,headers:{Authorization:`Bearer ${this.cfg.token}`,"Content-Type":"application/json"},body:i!==void 0?JSON.stringify(i):void 0}),s=await n.text();if(!n.ok)throw new Error(`Sheets ${e} \u2192 ${n.status}: ${s.slice(0,300)}`);return s?JSON.parse(s):{}}async readGrid(){let e=await this.req("GET",`/values/${this.a1("A:ZZ")}`);return(Array.isArray(e.values)?e.values:[]).map(i=>i.map(n=>n==null?"":String(n)))}async rowOf(e){this.header||await this.ensureHeader();let r=this.header.indexOf(this.cfg.idColumn);if(r<0)return null;let i=await this.req("GET",`/values/${this.a1(`${Fh(r)}:${Fh(r)}`)}`),n=Array.isArray(i.values)?i.values:[];for(let s=1;s<n.length;s++)if(String(n[s]?.[0]??"")===e)return s+1;return null}async ensureHeader(){if(this.header)return this.header;let e=await this.req("GET",`/values/${this.a1("1:1")}`),r=Array.isArray(e.values)?e.values:[];return this.header=(r[0]??[]).map(i=>String(i??"")),this.header}async loadSheetId(){if(this.sheetId!==null)return this.sheetId;let e=await this.req("GET","?fields=sheets.properties"),i=(Array.isArray(e.sheets)?e.sheets:[]).find(n=>n.properties?.title===this.cfg.sheetTitle);if(!i?.properties||i.properties.sheetId===void 0)throw new Error(`Google Sheet tab '${this.cfg.sheetTitle}' not found in spreadsheet ${this.cfg.spreadsheetId}.`);return this.sheetId=i.properties.sheetId,this.sheetId}buildRow(e,r){return(this.header??[]).map(n=>n===this.cfg.idColumn?r:n===this.cfg.stateColumn?e.state??"":q9(e.fields[n]))}async list(){let e=await this.readGrid(),r=(e[0]??[]).slice(),i=r.indexOf(this.cfg.idColumn),n=!1;i<0&&(i=r.length,r.push(this.cfg.idColumn),n=!0);let s=r.indexOf(this.cfg.stateColumn);this.header=r;let a=[],o=[];for(let u=1;u<e.length;u++){let f=e[u],c=f[i]??"";c||(c=iA(),o.push({range:this.a1(`${Fh(i)}${u+1}`),values:[[c]]}));let h={};for(let p=0;p<r.length;p++){let g=r[p];p===i||g===this.cfg.stateColumn||!g||(h[g]=f[p]??"")}let d=s>=0?f[s]??null:null;a.push({recordId:c,state:d===""?null:d,fields:h})}return n&&await this.req("PUT",`/values/${this.a1("1:1")}?valueInputOption=RAW`,{values:[r]}),o.length>0&&await this.req("POST","/values:batchUpdate",{valueInputOption:"RAW",data:o.map(u=>({range:decodeURIComponent(u.range),values:u.values}))}),a}async create(e){await this.ensureHeader();let r=iA(),i=this.buildRow(e,r);return await this.req("POST",`/values/${this.a1("A1")}:append?valueInputOption=RAW&insertDataOption=INSERT_ROWS`,{values:[i]}),{recordId:r}}async update(e,r){let i=await this.rowOf(e);if(i===null)throw new Error(`Sheets update: row for record '${e}' not found (out-of-band delete?).`);let n=this.buildRow(r,e),s=Fh(Math.max(0,(this.header?.length??1)-1));await this.req("PUT",`/values/${this.a1(`A${i}:${s}${i}`)}?valueInputOption=RAW`,{values:[n]})}async remove(e){let r=await this.rowOf(e);if(r===null)return;let i=await this.loadSheetId();await this.req("POST",":batchUpdate",{requests:[{deleteDimension:{range:{sheetId:i,dimension:"ROWS",startIndex:r-1,endIndex:r}}}]})}async ensureColumns(e){let r=(await this.ensureHeader()).slice(),i=[],n=[...e.fields.map(s=>s.name),...e.states?.length?[this.cfg.stateColumn]:[],this.cfg.idColumn];for(let s of n)s&&!r.includes(s)&&(r.push(s),i.push(s));return i.length>0&&(await this.req("PUT",`/values/${this.a1("1:1")}?valueInputOption=RAW`,{values:[r]}),this.header=r),{added:i}}},L9=new Set(["module","state","title","table","id","sheet"]);function nA(t){let e=process.env.INISTATE_GOOGLE_TOKEN?.trim();if(!e)throw new Error("Google Sheets adapter requires INISTATE_GOOGLE_TOKEN (an OAuth2 access token with the spreadsheets scope). External substrates are opt-in and use your own credentials (\xA713).");let r=t.replace(/^sheets:\/\//,""),[i,n]=r.split("?"),s=(i??"").split("/").filter(Boolean),a=s[0];if(!a)throw new Error("Sheets adapter target must start with sheets://<spreadsheetId>.");let o=new URLSearchParams(n??""),u=o.get("state")||process.env.INISTATE_SHEETS_STATE||"Status",f=o.get("id")||process.env.INISTATE_SHEETS_ID||"_id",c=b=>new bu({token:e,spreadsheetId:a,sheetTitle:b,stateColumn:u,idColumn:f}),h=[],d,p=s[1]||o.get("sheet")||process.env.INISTATE_SHEETS_TAB;if(p){let b=o.get("module")||process.env.INISTATE_SHEETS_MODULE||"Records";h.push({module:b,driver:c(decodeURIComponent(p))}),d=`${a}.${p}`}else{let b={},k=process.env.INISTATE_SHEETS_TABS?.trim();k&&Object.assign(b,JSON.parse(k));for(let[E,U]of o.entries())L9.has(E)||(b[E]=U);let N=Object.entries(b);if(N.length===0)throw new Error("Sheets adapter target must be sheets://<spreadsheetId>/<sheetTitle> (single) or sheets://<spreadsheetId>?Module=<sheetTitle>&\u2026 / INISTATE_SHEETS_TABS JSON (multi).");for(let[E,U]of N)h.push({module:E,driver:c(U)});d=`${a}.multi`}let g=Wr("sheets",d,o.get("meta")),y=yr(process.env.INISTATE_LOG!=="0"),v=!["off","false","0"].includes((o.get("provision")??"").toLowerCase());return new vr(h,g,y,v)}import{existsSync as UV,mkdirSync as T1e}from"node:fs";import{dirname as C1e,resolve as k1e}from"node:path";import{randomUUID as sA}from"node:crypto";function B9(t){return t==null?"":typeof t=="object"?JSON.stringify(t):String(t)}var zi=class{label;io;stateColumn;idColumn;constructor(e){this.io=e.io,this.label=e.label,this.stateColumn=e.stateColumn,this.idColumn=e.idColumn}buildRow(e,r,i){return e.map(n=>n===this.idColumn?i:n===this.stateColumn?r.state??"":B9(r.fields[n]))}async list(){let e=await this.io.read(),r=(e[0]??[]).slice(),i=r.indexOf(this.idColumn),n=!1;i<0&&(i=r.length,r.push(this.idColumn),n=!0);let s=r.indexOf(this.stateColumn),a=e.slice(1).map(u=>u.slice()),o=[];for(let u of a){let f=u[i]??"";f||(f=sA(),u[i]=f,n=!0);let c={};for(let d=0;d<r.length;d++){let p=r[d];d===i||p===this.stateColumn||!p||(c[p]=u[d]??"")}let h=s>=0?u[s]??null:null;o.push({recordId:f,state:h===""?null:h,fields:c})}return n&&await this.io.write([r,...a]),o}async create(e){let r=await this.io.read(),i=(r[0]??[]).slice();if(i.length===0)i=[...Object.keys(e.fields),this.stateColumn,this.idColumn],r.push(i);else{for(let s of[this.stateColumn,this.idColumn])i.includes(s)||i.push(s);r[0]=i}let n=sA();return r.push(this.buildRow(i,e,n)),await this.io.write(r),{recordId:n}}async update(e,r){let i=await this.io.read(),n=i[0]??[],s=n.indexOf(this.idColumn);if(s<0)throw new Error(`${this.label}: no '${this.idColumn}' column to locate record '${e}'.`);let a=i.findIndex((o,u)=>u>0&&o[s]===e);if(a<0)throw new Error(`${this.label}: row for record '${e}' not found (out-of-band delete?).`);i[a]=this.buildRow(n,r,e),await this.io.write(i)}async remove(e){let r=await this.io.read(),n=(r[0]??[]).indexOf(this.idColumn);if(n<0)return;let s=r.filter((a,o)=>o===0||a[n]!==e);s.length!==r.length&&await this.io.write(s)}async ensureColumns(e){let r=await this.io.read(),i=(r[0]??[]).slice(),n=[],s=[...e.fields.map(a=>a.name),...e.states?.length?[this.stateColumn]:[],this.idColumn];for(let a of s)a&&!i.includes(a)&&(i.push(a),n.push(a));return n.length>0&&(r.length===0?r.push(i):r[0]=i,await this.io.write(r)),{added:n}}};var ih=class{constructor(e,r){this.filePath=e;this.sheetName=r}filePath;sheetName;async lib(){try{let e=await Promise.resolve().then(()=>G7($V(),1));return e.default??e}catch{throw new Error("The excel:// adapter needs the optional 'exceljs' package. Install it with: npm install exceljs")}}async read(){if(!UV(this.filePath))return[];let e=await this.lib(),r=new e.Workbook;await r.xlsx.readFile(this.filePath);let i=r.getWorksheet(this.sheetName);if(!i)return[];let n=[];return i.eachRow({includeEmpty:!1},s=>{let a=s.values,o=[];for(let u=1;u<a.length;u++){let f=a[u];o.push(f==null?"":String(typeof f=="object"?f.text??f.result??f.hyperlink??"":f))}n.push(o)}),n}async write(e){let r=await this.lib(),i=new r.Workbook;UV(this.filePath)&&await i.xlsx.readFile(this.filePath);let n=i.getWorksheet(this.sheetName);n&&i.removeWorksheet(n.id);let s=i.addWorksheet(this.sheetName);for(let a of e)s.addRow(a);T1e(C1e(this.filePath),{recursive:!0}),await i.xlsx.writeFile(this.filePath)}},R1e=new Set(["module","state","title","table","id","sheet","meta","provision"]);function WV(t){let e=t.replace(/^excel:\/\//,""),r=e.indexOf("?"),i=r>=0?e.slice(0,r):e,n=r>=0?e.slice(r+1):"";if(!i)throw new Error("Excel adapter target must be excel://<path-to-.xlsx>.");let s=k1e(process.cwd(),decodeURIComponent(i)),a=new URLSearchParams(n),o=a.get("state")||process.env.INISTATE_EXCEL_STATE||"Status",u=a.get("id")||process.env.INISTATE_EXCEL_ID||"_id",f=b=>new zi({io:new ih(s,b),label:`Excel ${s} [${b}]`,stateColumn:o,idColumn:u}),c=[],h,d={},p=process.env.INISTATE_EXCEL_SHEETS?.trim();p&&Object.assign(d,JSON.parse(p));for(let[b,k]of a.entries())R1e.has(b)||(d[b]=k);if(Object.keys(d).length>0){for(let[b,k]of Object.entries(d))c.push({module:b,driver:f(k)});h=`${i}.multi`}else{let b=a.get("module")||process.env.INISTATE_EXCEL_MODULE||"Records",k=a.get("sheet")||process.env.INISTATE_EXCEL_SHEET||"Sheet1";c.push({module:b,driver:f(k)}),h=`${i}.${k}`}let g=Wr("excel",h,a.get("meta")),y=yr(process.env.INISTATE_LOG!=="0"),v=!["off","false","0"].includes((a.get("provision")??"").toLowerCase());return new vr(c,g,y,v)}import{existsSync as A1e,mkdirSync as O1e,readFileSync as I1e,writeFileSync as N1e}from"node:fs";import{dirname as D1e,resolve as F1e}from"node:path";function M1e(t){let e=t;e.charCodeAt(0)===65279&&(e=e.slice(1));let r=[],i=[],n="",s=!1,a=0;for(;a<e.length;){let o=e[a];if(s){o==='"'?e[a+1]==='"'?(n+='"',a+=2):(s=!1,a+=1):(n+=o,a+=1);continue}o==='"'?(s=!0,a+=1):o===","?(i.push(n),n="",a+=1):o===`
259
+ `||o==="\r"?(i.push(n),r.push(i),i=[],n="",a+=o==="\r"&&e[a+1]===`
260
+ `?2:1):(n+=o,a+=1)}return(n!==""||i.length>0)&&(i.push(n),r.push(i)),r}function P1e(t){let e=r=>{let i=r??"";return/[",\r\n]/.test(i)?`"${i.replace(/"/g,'""')}"`:i};return t.length===0?"":t.map(r=>r.map(e).join(",")).join(`
261
+ `)+`
262
+ `}var nh=class{constructor(e){this.filePath=e}filePath;async read(){return A1e(this.filePath)?M1e(I1e(this.filePath,"utf8")):[]}async write(e){O1e(D1e(this.filePath),{recursive:!0}),N1e(this.filePath,P1e(e),"utf8")}};function HV(t){let e=t.replace(/^csv:\/\//,""),r=e.indexOf("?"),i=r>=0?e.slice(0,r):e,n=r>=0?e.slice(r+1):"";if(!i)throw new Error("CSV adapter target must be csv://<path-to-.csv>.");let s=F1e(process.cwd(),decodeURIComponent(i)),a=new URLSearchParams(n),o=a.get("state")||process.env.INISTATE_CSV_STATE||"Status",u=a.get("id")||process.env.INISTATE_CSV_ID||"_id",c=[{module:a.get("module")||process.env.INISTATE_CSV_MODULE||"Records",driver:new zi({io:new nh(s),label:`CSV ${s}`,stateColumn:o,idColumn:u})}],h=Wr("csv",i,a.get("meta")),d=yr(process.env.INISTATE_LOG!=="0"),p=!["off","false","0"].includes((a.get("provision")??"").toLowerCase());return new vr(c,h,d,p)}var jk=new Map;function $i(t){let e=t.scheme?.trim().toLowerCase();if(!e||e.includes("://")||/\s/.test(e))throw new Error(`Invalid adapter scheme: ${JSON.stringify(t.scheme)} (use a bare scheme like "notion").`);if(typeof t.create!="function")throw new Error(`Adapter for scheme '${e}' must provide a create(target) function.`);jk.set(e,{...t,scheme:e})}function zV(t){return jk.get(t.trim().toLowerCase())}function $k(){return[...jk.keys()].sort()}$i({scheme:"sqlite",description:"SQLite \u2014 the default, zero-config local store (durable, full present-state guarantee).",create:t=>new Ps(t)});$i({scheme:"memory",description:"In-memory store \u2014 non-durable across restarts; tests and a dependency-free fallback.",create:()=>new ro});$i({scheme:"notion",external:!0,description:"EXPOSURE TIER \u2014 runs a governed workflow on an existing Notion database. Needs INISTATE_NOTION_TOKEN. Guarantee: no illegal move through Core (\xA75.5).",create:t=>eA(t)});$i({scheme:"airtable",external:!0,description:"EXPOSURE TIER \u2014 runs a governed workflow on an existing Airtable table. Needs INISTATE_AIRTABLE_TOKEN. Guarantee: no illegal move through Core (\xA75.5).",create:t=>rA(t)});$i({scheme:"sheets",external:!0,description:"EXPOSURE TIER \u2014 runs a governed workflow on an existing Google Sheet. Needs INISTATE_GOOGLE_TOKEN. Guarantee: no illegal move through Core (\xA75.5).",create:t=>nA(t)});$i({scheme:"excel",external:!0,description:"EXPOSURE TIER \u2014 runs a governed workflow on a local Excel .xlsx workbook. No credentials (local file); needs the optional 'exceljs' package. Guarantee: no illegal move through Core (\xA75.5).",create:t=>WV(t)});$i({scheme:"csv",external:!0,description:"EXPOSURE TIER \u2014 runs a governed workflow on a local CSV file. No credentials, no dependencies. Guarantee: no illegal move through Core (\xA75.5).",create:t=>HV(t)});import{resolve as YV}from"node:path";import{createPublicKey as q1e,verify as L1e}from"node:crypto";import{existsSync as B1e,mkdirSync as j1e,readFileSync as $1e,writeFileSync as U1e}from"node:fs";import{homedir as W1e}from"node:os";import{dirname as H1e,join as z1e}from"node:path";var X1e="MCowBQYDK2VwAyEA0c0s4d36HfibD2eDiV1Z/CgrSuTbFZI6vRXwL/ej/5s=",Iy="https://buy.stripe.com/REPLACE_WITH_YOUR_PAYMENT_LINK",V1e="core-plus";function Ny(t=process.env){return(t.INISTATE_CORE_PLUS_KEYFILE||"").trim()||z1e(W1e(),".inistate","core-plus.key")}function G1e(t){let e=(t.INISTATE_CORE_PLUS_KEY||"").trim();if(e)return e;try{let r=Ny(t);if(B1e(r))return $1e(r,"utf8").trim()}catch{}return""}function Z1e(t){let e=(t.INISTATE_CORE_PLUS_PUBKEY||X1e).trim();if(!e||e.startsWith("<"))return null;try{return q1e({key:Buffer.from(e,"base64"),format:"der",type:"spki"})}catch{return null}}function XV(t,e=process.env){if(!t)return null;let r=Z1e(e);if(!r)return null;let i=t.indexOf(".");if(i<=0)return null;try{let n=Buffer.from(t.slice(0,i),"base64url"),s=Buffer.from(t.slice(i+1),"base64url");if(!L1e(null,n,r,s))return null;let a=JSON.parse(n.toString("utf8"));return a.feature!==V1e||typeof a.exp=="number"&&Date.now()/1e3>a.exp?null:a}catch{return null}}function Uk(t=process.env){return XV(G1e(t),t)}function VV(t=process.env){return Uk(t)!==null}function GV(t,e=process.env){let r=(t||"").trim(),i=XV(r,e);if(!i)return{ok:!1,error:"That key is not a valid Core Plus license (mistyped, for a different signing key, or expired)."};let n=Ny(e);try{j1e(H1e(n),{recursive:!0}),U1e(n,`${r}
263
+ `,{mode:384})}catch(s){return{ok:!1,error:`Could not write the license file at ${n}: ${s instanceof Error?s.message:String(s)}`}}return{ok:!0,sub:i.sub,path:n}}function Y1e(t){return{error:"core_plus_required",feature:"multiple-connectors",connections:t,message:`Inistate Core runs one backend type at a time; this configuration mixes ${t} different kinds of backend at once. Connecting multiple kinds of backend simultaneously is an Inistate Core Plus feature.`,upgrade:`Unlock Inistate Core Plus (one-time $9.99) at ${Iy} \u2014 then run \`inistate-core activate <key>\` (or set INISTATE_CORE_PLUS_KEY).`}}function ZV(t){let e=Y1e(t);return new Error(`${e.message} ${e.upgrade}`)}function sh(t){return!["off","false","0"].includes((t.get("provision")??"").toLowerCase())}function Wk(t,e,r){let i=t?.trim();if(!i)throw new Error(`${r} connection requires ${e} (your own credentials, \xA713).`);return i}function KV(t,e){let r=t.slice(`${e}://`.length),i=r.indexOf("?"),n=i>=0?r.slice(0,i):r,s=i>=0?r.slice(i+1):"";if(!n)throw new Error(`${e} connection must be ${e}://<path>.`);return{rawPath:n,params:new URLSearchParams(s)}}function K1e(t){let e=Ds(t);switch(e){case"notion":{let r=Wk(process.env.INISTATE_NOTION_TOKEN,"INISTATE_NOTION_TOKEN","Notion"),[i,n]=t.slice(9).split("?"),s=i;if(!s)throw new Error("notion connection must be notion://<databaseId>.");let a=new URLSearchParams(n??""),o=a.get("state")||process.env.INISTATE_NOTION_STATE||"Status",u=a.get("title")||process.env.INISTATE_NOTION_TITLE||"Name";return{driver:new _u({token:r,databaseId:s,stateProperty:o,titleProperty:u}),provision:sh(a),connectionKey:"notion"}}case"airtable":{let r=Wk(process.env.INISTATE_AIRTABLE_TOKEN,"INISTATE_AIRTABLE_TOKEN","Airtable"),[i,n]=t.slice(11).split("?"),s=(i??"").split("/").filter(Boolean),a=new URLSearchParams(n??""),o=s[0],u=s[1]||a.get("table")||void 0;if(!o||!u)throw new Error("airtable connection must be airtable://<baseId>/<table>.");let f=a.get("state")||process.env.INISTATE_AIRTABLE_STATE||"Status";return{driver:new wu({token:r,baseId:o,table:u,stateField:f}),provision:sh(a),connectionKey:"airtable"}}case"sheets":{let r=Wk(process.env.INISTATE_GOOGLE_TOKEN,"INISTATE_GOOGLE_TOKEN","Google Sheets"),[i,n]=t.slice(9).split("?"),s=(i??"").split("/").filter(Boolean),a=s[0];if(!a)throw new Error("sheets connection must be sheets://<spreadsheetId>/<sheetTitle>.");let o=new URLSearchParams(n??""),u=(s[1]?decodeURIComponent(s[1]):"")||o.get("sheet")||"Sheet1",f=o.get("state")||process.env.INISTATE_SHEETS_STATE||"Status",c=o.get("id")||process.env.INISTATE_SHEETS_ID||"_id";return{driver:new bu({token:r,spreadsheetId:a,sheetTitle:u,stateColumn:f,idColumn:c}),provision:sh(o),connectionKey:"sheets"}}case"excel":{let{rawPath:r,params:i}=KV(t,"excel"),n=YV(process.cwd(),decodeURIComponent(r)),s=i.get("sheet")||process.env.INISTATE_EXCEL_SHEET||"Sheet1",a=i.get("state")||process.env.INISTATE_EXCEL_STATE||"Status",o=i.get("id")||process.env.INISTATE_EXCEL_ID||"_id";return{driver:new zi({io:new ih(n,s),label:`Excel ${n} [${s}]`,stateColumn:a,idColumn:o}),provision:sh(i),connectionKey:"excel"}}case"csv":{let{rawPath:r,params:i}=KV(t,"csv"),n=YV(process.cwd(),decodeURIComponent(r)),s=i.get("state")||process.env.INISTATE_CSV_STATE||"Status",a=i.get("id")||process.env.INISTATE_CSV_ID||"_id";return{driver:new zi({io:new nh(n),label:`CSV ${n}`,stateColumn:s,idColumn:a}),provision:sh(i),connectionKey:"csv"}}default:throw new Error(`Per-module connections support external substrates only (notion, airtable, sheets, excel, csv); got scheme '${e}' from '${t}'.`)}}function QV(t,e){let r=Object.entries(t).filter(([f,c])=>f&&typeof c=="string"&&c.trim());if(r.length===0)throw new Error("INISTATE_CORE_CONNECTIONS must map at least one module to a connection target.");let i=r.map(([f,c])=>{let{driver:h,provision:d,connectionKey:p}=K1e(c.trim());return{module:f,driver:h,provision:d,connectionKey:p}}),n=new Set(i.map(f=>f.connectionKey)).size;if(n>1&&!VV())throw ZV(n);let s=i.map(({module:f,driver:c,provision:h})=>({module:f,driver:c,provision:h})),a=e?.metaParam??((process.env.INISTATE_CORE_META||"").trim()||null),o=Wr("connections",r.map(([f])=>f).sort().join("."),a),u=yr(process.env.INISTATE_LOG!=="0");return new vr(s,o,u)}var eCe={postgres:"The shared-Postgres adapter is on the roadmap (\xA75.3) but not bundled in this build.",postgresql:"The shared-Postgres adapter is on the roadmap (\xA75.3) but not bundled in this build."};function tCe(t){let e=eCe[t];return new Error(`No storage adapter is registered for scheme '${t}'.`+(e?` ${e}`:"")+` Available schemes: ${$k().join(", ")}. Add your own with INISTATE_CORE_ADAPTER=<module> (binary) or registerAdapter({ scheme, create }) (library).`)}async function JV(t,e){let r;if(e?.adapter)r=e.adapter;else if(t.connections)r=QV(t.connections);else{let s=zV(t.scheme);if(!s)throw tCe(t.scheme);r=s.create(t.dbTarget)}await r.init();let i=new Oh(r);return{backend:new Dh(i),engine:i,store:r,close:async()=>{await r.close()}}}function rCe(t){return t.startsWith(".")||t.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(t)||t.includes("/")||t.includes("\\")||/\.(c|m)?js$/.test(t)?J1e(Q1e(process.cwd(),t)).href:t}async function e7(t,e){let i=await import(rCe(t));if(typeof i.register=="function")i.register({registerAdapter:$i});else if(i.default&&typeof i.default=="object"){let n=Array.isArray(i.default)?i.default:[i.default];for(let s of n)$i(s)}else throw new Error(`Adapter module '${t}' must export register(api) or a default { scheme, create } (or an array of them).`);e?.("adapter_loaded",{specifier:t,schemes:$k()})}import r7 from"better-sqlite3";var lu=/^(status|state|stage|phase)$/i,iCe=/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2})?/;function nCe(t){return typeof t=="string"&&/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(t)}var i7="2022-06-28";function sCe(t){switch(t){case"title":case"rich_text":return"Text";case"number":return"Number";case"select":return"Selection";case"multi_select":return"Tag";case"checkbox":return"YesNo";case"date":return"Date";case"url":return"Link";case"email":return"Email";case"phone_number":return"Phone";case"files":return"Files";default:return"Text"}}function t7(t){let e=t?.options;return Array.isArray(e)?e.map(r=>String(r.name??"")).filter(Boolean):[]}async function aCe(t,e,r=fetch){let i=await r(`https://api.notion.com/v1/databases/${t}`,{headers:{Authorization:`Bearer ${e}`,"Notion-Version":i7}}),n=await i.text();if(!i.ok)throw new Error(`Notion introspect \u2192 ${i.status}: ${n.slice(0,300)}`);let s=JSON.parse(n),a=[],o;for(let[f,c]of Object.entries(s.properties??{})){let h=String(c.type??"");if(h==="status"||h==="select"&&lu.test(f)){o={name:f,values:t7(c[h])};continue}let d={name:f,type:sCe(h)};if(h==="select"||h==="multi_select"){let p=t7(c[h]);p.length&&(d.options=p)}a.push(d)}return{name:(s.title??[]).map(f=>f.plain_text??"").join("").trim()||"Module",source:`Notion database ${t}`,fields:a,state:o}}function oCe(t){let e=t.find(r=>r!=null);if(typeof e=="boolean")return{type:"YesNo"};if(typeof e=="number")return{type:"Number"};if(Array.isArray(e)){let r=[...new Set(t.flatMap(i=>Array.isArray(i)?i.map(String):[]))];return{type:"Tag",options:r.length?r:void 0}}return nCe(e)?{type:"Email"}:typeof e=="string"&&iCe.test(e)?{type:"Date"}:{type:"Text"}}async function lCe(t,e,r,i=fetch){let n=`https://api.airtable.com/v0/${t}/${encodeURIComponent(e)}?pageSize=100`,s=await i(n,{headers:{Authorization:`Bearer ${r}`}}),a=await s.text();if(!s.ok)throw new Error(`Airtable introspect \u2192 ${s.status}: ${a.slice(0,300)}`);let o=JSON.parse(a),u=new Map;for(let h of o.records??[])for(let[d,p]of Object.entries(h.fields??{})){let g=u.get(d);g||(g=[],u.set(d,g)),g.push(p)}let f=[],c;for(let[h,d]of u){if(lu.test(h)){let y=[...new Set(d.filter(v=>typeof v=="string").map(String))];c={name:h,values:y};continue}let p=oCe(d),g={name:h,type:p.type};p.options&&(g.options=p.options),f.push(g)}return{name:e,source:`Airtable ${t}/${e}`,fields:f,state:c}}function uCe(t){let e=(t||"").toUpperCase();return e.includes("INT")?"Integer":e.includes("REAL")||e.includes("FLOA")||e.includes("DOUB")||e.includes("NUM")||e.includes("DEC")?"Number":e.includes("BOOL")?"YesNo":e.includes("DATE")||e.includes("TIME")?"DateTime":"Text"}var ou=t=>`"${t.replace(/"/g,'""')}"`;function fCe(t,e){let r=new r7(t,{readonly:!0});try{let i=r.prepare(`PRAGMA table_info(${ou(e)})`).all();if(i.length===0)throw new Error(`Table '${e}' not found in ${t}.`);let n=[],s;for(let a of i){if(lu.test(a.name)){let o=r.prepare(`SELECT DISTINCT ${ou(a.name)} AS v FROM ${ou(e)} WHERE ${ou(a.name)} IS NOT NULL LIMIT 50`).all();s={name:a.name,values:o.map(u=>String(u.v))};continue}n.push({name:a.name,type:uCe(a.type)})}return{name:e,source:`SQLite ${t} \xB7 table ${e}`,fields:n,state:s}}finally{r.close()}}function n7(t){let e=new r7(t,{readonly:!0});try{return e.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%' ORDER BY name").all().map(({name:i})=>{let n=e.prepare(`PRAGMA table_info(${ou(i)})`).all(),{n:s}=e.prepare(`SELECT COUNT(*) AS n FROM ${ou(i)}`).get(),a=n.map(o=>o.name);return{name:i,columns:a,rows:s,hasState:a.some(o=>lu.test(o))}})}finally{e.close()}}function Dy(t,e={}){let[r,i]=t.replace(/^sqlite:(\/\/)?/,"").split("?"),n=new URLSearchParams(i??"");return{path:r??"",table:e.table??n.get("table")??void 0}}function Hk(t){return{databaseId:t.replace(/^notion:\/\//,"").split("?")[0]||void 0}}function zk(t,e={}){let[r,i]=t.replace(/^airtable:\/\//,"").split("?"),n=(r??"").split("/").filter(Boolean),s=new URLSearchParams(i??"");return{baseId:n[0],table:n[1]??e.table??s.get("table")??void 0}}function Xk(){let t=process.env.INISTATE_NOTION_TOKEN?.trim();if(!t)throw new Error("Set INISTATE_NOTION_TOKEN (your Notion integration token) to scaffold from Notion (\xA713).");return t}function Vk(){let t=process.env.INISTATE_AIRTABLE_TOKEN?.trim();if(!t)throw new Error("Set INISTATE_AIRTABLE_TOKEN (your Airtable PAT) to scaffold from Airtable (\xA713).");return t}async function s7(t,e=fetch){let r=[],i;do{let n=await e("https://api.notion.com/v1/search",{method:"POST",headers:{Authorization:`Bearer ${t}`,"Notion-Version":i7,"Content-Type":"application/json"},body:JSON.stringify({filter:{value:"database",property:"object"},start_cursor:i,page_size:100})}),s=await n.text();if(!n.ok)throw new Error(`Notion search \u2192 ${n.status}: ${s.slice(0,300)}`);let a=JSON.parse(s);for(let o of a.results??[]){let u=o.properties??{},f=Object.keys(u),c=Object.entries(u).some(([d,p])=>p.type==="status"||p.type==="select"&&lu.test(d)),h=(o.title??[]).map(d=>d.plain_text??"").join("").trim();r.push({name:h||"Untitled",id:String(o.id??""),columns:f,hasState:c})}i=a.has_more?String(a.next_cursor):void 0}while(i);return r}async function a7(t,e,r=fetch){let i=await r(`https://api.airtable.com/v0/meta/bases/${t}/tables`,{headers:{Authorization:`Bearer ${e}`}}),n=await i.text();if(!i.ok){let a=i.status===403?" \u2014 the token may be missing the 'schema.bases:read' scope needed to list tables.":"";throw new Error(`Airtable list tables \u2192 ${i.status}: ${n.slice(0,200)}${a}`)}return(JSON.parse(n).tables??[]).map(a=>{let o=(a.fields??[]).map(u=>String(u.name??"")).filter(Boolean);return{name:String(a.name??""),id:String(a.id??""),columns:o,hasState:o.some(u=>lu.test(u))}})}async function Fy(t,e={}){let r=Ds(t);if(r==="notion"){let i=Xk(),{databaseId:n}=Hk(t);if(!n)throw new Error("Target must be notion://<databaseId> \u2014 omit it to discover the databases shared with your integration.");return aCe(n,i)}if(r==="airtable"){let i=Vk(),{baseId:n,table:s}=zk(t,e);if(!n)throw new Error("Target must start with airtable://<baseId>.");if(!s)throw new Error("Specify a table \u2014 omit it to discover the tables in this base (or pass airtable://<baseId>/<tableIdOrName>).");return lCe(n,s,i)}if(r==="sqlite"){let{path:i,table:n}=Dy(t,e);if(!i)throw new Error("Provide a SQLite database path.");if(!n)throw new Error("Specify a table \u2014 a SQLite database can hold many tables.");return fCe(i,n)}throw new Error(`scaffold supports notion://, airtable://, and sqlite (path) targets \u2014 got scheme '${r}'.`)}function My(t,e={}){let r=t.fields.slice(),i=t.state?.name,n=t.state?.values??[];if(e.state){let h=r.find(d=>d.name.toLowerCase()===e.state.toLowerCase());h?(i=h.name,n=h.options??[],r=r.filter(d=>d!==h)):t.state&&t.state.name.toLowerCase()===e.state.toLowerCase()||(i=e.state,n=[])}let s=e.name||t.name||"Module",a=r.map(h=>{let d={name:h.name,type:h.type};return h.options&&h.options.length>0&&(d.options=h.options),d}),o=!!i&&n.length>0,u={name:s,information:a};o&&(u.states=n.map((h,d)=>({name:h,color:GR(h),initial:d===0})),u.activities=[],u.flows=[]);let f=vu(u,"create"),c=o?[`Detected state column '${i}' with ${n.length} states; '${n[0]}' was marked initial.`,"Define activities and the flows (from \u2192 activity \u2192 to) that govern the transitions \u2014 this is what Core enforces on top of the substrate. Tip: design_workflow can scaffold a pattern.","Review the inferred field types in information[] and adjust any that defaulted to Text.","Then create_module with this schema, point Core at the same substrate, and illegal moves are rejected."]:["No state column detected \u2014 scaffolded as a record-list module (fields only).","To make it a workflow, pass --state <Column> or add states/activities/flows.","Review the inferred field types, then create_module."];return{schema:u,validation:f,suggestions:{module_type:o?"workflow":"record_list",detected_state:o?i:void 0,source:t.source,next_steps:c}}}function Gk(t,e,r){return{discovery:!0,source:t,tables:e.map(i=>({...i,scaffold_source:r(i)})),next_step:e.length===0?"No tables found here.":"Show these to the user and ask which one(s) to model. For each chosen table call scaffold_module again with its `scaffold_source` as `source`; map several tables to model several modules over one base/database/workspace. A table with hasState:true can become a workflow."}}function Ya(t){throw new Error(`${t} is not available on the local runtime. This should have been gated by capabilities(); reaching it is a bug.`)}var Py=class{constructor(e){this.inner=e}inner;kind="local";capabilities(){return{workspaces:!1,governedHistory:!1,files:!1,authorization:!1,governance:!1,scaffold:!0,modes:["runtime","configure"]}}setActiveWorkspace(){}listWorkspaces(){return Ya("list_workspaces")}getWorkspace(){return Ya("set_workspace")}getEntryHistory(e){return Ya("get_entry_history")}uploadFile(e){return Ya("upload_file")}downloadFile(e){return Ya("download_file")}requestUploadUrl(e){return Ya("request_upload_url")}confirmUpload(e){return Ya("confirm_upload")}listModules(){return this.inner.listModules()}getModuleSchema(e,r){return this.inner.getModuleSchema({module:e,tier:r})}getModuleCanvas(e){return this.inner.getModuleCanvas({module:e})}createModule(e){return this.inner.createModule(e)}updateModule(e){let{id:r,...i}=e;return this.inner.updateModule({id:r,patch:i})}listEntries(e){return this.inner.listEntries(e)}getEntry(e){return this.inner.getEntry({module:e.module,entryId:e.entryId})}getForm(e){return this.inner.getForm({module:e.module,activity:e.activity,entryId:e.entryId??null})}submitActivity(e){let r=e;return this.inner.submitActivity({module:r.module,activity:r.activity,entryId:r.entryId,input:r.input,idempotencyKey:r.idempotencyKey,expectedVersion:r.expectedVersion})}submitActivities(e){let r=e,i=(r.items??[]).map(n=>({entryId:n.entryId,input:n.input,clientRef:n.clientRef}));return this.inner.submitActivities({module:r.module,activity:r.activity,items:i})}async scaffoldModule(e){let{source:r,table:i,name:n,state:s}=e,a=Ds(r);if(a==="sqlite"&&!Dy(r,{table:i}).table){let{path:u}=Dy(r,{table:i});if(!u)throw new Error("Provide a SQLite database path.");let f=n7(u);return Gk(`SQLite ${u}`,f,c=>`${u}?table=${encodeURIComponent(c.name)}`)}if(a==="notion"&&!Hk(r).databaseId){let u=await s7(Xk());return Gk("Notion (databases shared with your integration)",u,f=>`notion://${f.id}`)}if(a==="airtable"){let{baseId:u,table:f}=zk(r,{table:i});if(u&&!f){let c=await a7(u,Vk());return Gk(`Airtable base ${u}`,c,h=>`airtable://${u}/${h.id}`)}}let o=await Fy(r,{table:i});return My(o,{name:n,state:s})}};var cCe=`# inistate-core \u2014 the local runtime
264
+
265
+ You are connected to the **local Core backend**, not the Inistate Platform.
266
+
267
+ **What Core does:** it runs FACTSOps workflows on local persistence and enforces
268
+ the *present state* of each record \u2014 only legal transitions, validated forms,
269
+ atomic writes. The reliability invariants (atomicity, illegal-transition
270
+ rejection, idempotency, optimistic concurrency, crash durability) are the
271
+ product.
272
+
273
+ **What Core does not do \u2014 and why (substrate physics, not withholding):**
274
+ - **No governed history / audit trail.** A local store keeps the current state
275
+ of a record, not an accountable, append-only record of how it changed.
276
+ - **No confidence/intention gating.** Submissions either commit a legal
277
+ transition or are rejected. There is no "flagged for review" outcome here.
278
+ - **No authentication / authorization.** Core runs in a local trust boundary
279
+ with no user identity.
280
+ - **No workspaces, no files.** Single local store; no file storage.
281
+
282
+ **AGENT INSTRUCTION:** When a tool returns \`{ "error": "capability_unavailable" }\`,
283
+ report the limitation plainly and relay the \`upgrade\` line. NEVER fabricate
284
+ history, authorization outcomes, confidence gating, or file handling the local
285
+ backend does not provide. Because Core has no governance gate, apply your own
286
+ caution: confirm with the user before consequential changes \u2014 Core will not
287
+ stop you.
288
+
289
+ **Optimistic concurrency & retries:** \`get_entry\` returns a \`version\`. Pass it
290
+ as \`expectedVersion\` on submit_activity to avoid lost updates; pass an
291
+ \`idempotencyKey\` to make retries safe.
292
+
293
+ To gain people, UI, governed history, authorization, and the Teammate, run
294
+ \`inistate-core connect\` to move to the Platform \u2014 same schema, same tools, a
295
+ backend swap, not a migration.
296
+ `;function o7(t){t.registerResource("core","inistate://core",{description:"READ FIRST on the local runtime. Explains the active backend (Core), the present-state boundary, and the standing instruction to never fabricate history/governance the backend cannot provide.",mimeType:"text/markdown"},async e=>({contents:[{uri:e.href,text:cCe}]}))}function l7(t){let e=t.find(n=>!n.startsWith("-"))??"<YOUR_INISTATE_API_TOKEN>",i=["","inistate connect \u2014 move to the Inistate Platform","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","","This is a backend swap, not a migration. The schema and the MCP tools are","identical on both sides \u2014 only the backend changes, from the local engine","(LocalBackend) to the Platform API (CloudBackend). Your workflows, vocabulary,","and agent integrations carry over unchanged.","","What you gain by connecting (additive, never remedial):"," \u2022 Human collaboration, web/mobile UI, and app generation"," \u2022 Governed history & audit \u2014 the accountable record of how state changed"," \u2022 Authentication, roles, and escalation"," \u2022 Files, workspaces, and the integrated AI Teammate","","A team can keep running on local Core forever at no cost. Connect when the","need is new and different \u2014 people and governance \u2014 not because Core ran out","of road.","","To re-point the same MCP interface at the Platform, replace the inistate-core","entry in your MCP client config with the open Platform server:","",JSON.stringify({mcpServers:{inistate:{command:"npx",args:["-y","inistate-mcp"],env:{INISTATE_API_TOKEN:e}}}},null,2),"","Get an API token from your Inistate workspace, then restart your MCP client.",""];console.log(i.join(`
297
+ `))}function hCe(t){let e={};for(let r=0;r<t.length;r++){let i=t[r],n=i.startsWith("--")?i.indexOf("="):-1,s=i.startsWith("--")?i.slice(2,n===-1?void 0:n):null,a=n===-1?void 0:i.slice(n+1);s==="name"||s==="state"||s==="table"?e[s]=a??t[++r]:!i.startsWith("--")&&!e.target&&(e.target=i)}return e}async function u7(t){let{target:e,name:r,state:i,table:n}=hCe(t);if(!e){console.error("Usage: inistate-core scaffold <notion://db | airtable://base/table | ./file.db --table T> [--name M] [--state Col]"),process.exitCode=1;return}let s=await Fy(e,{table:n}),a=My(s,{name:r,state:i}),{suggestions:o,validation:u}=a;console.error(`
298
+ Scaffolded from ${o.source}`),console.error(`Module: ${a.schema.name} \xB7 type: ${o.module_type}${o.detected_state?` \xB7 state column: ${o.detected_state}`:""}`),console.error(`Fields: ${a.schema.information.length}${o.module_type==="workflow"?` \xB7 states: ${a.schema.states.length}`:""}`),console.error(`validate_design: ${u.valid?"valid":"INVALID"}${u.errors.length?` \u2014 ${u.errors.length} error(s)`:""}${u.warnings.length?` \xB7 ${u.warnings.length} warning(s)`:""}`);for(let f of u.errors)console.error(` error: ${f}`);for(let f of u.warnings)console.error(` warning: ${f}`);console.error(`
299
+ Next steps:`);for(let f of o.next_steps)console.error(` \u2022 ${f}`);console.error(`
300
+ --- ModuleSchema (stdout) ---`),console.log(JSON.stringify(a.schema,null,2))}var uu="0.1.0";function gCe(){console.log(`inistate-core ${uu} \u2014 free, local runtime for FACTSOps workflows
301
+
302
+ Usage:
303
+ inistate-core Run the MCP server on stdio (default)
304
+ inistate-core run Run the MCP server on stdio
305
+ inistate-core scaffold T Generate a module schema from an existing table/database
306
+ inistate-core upgrade Explain Core Plus (mix multiple backend types at once) + how to buy
307
+ inistate-core activate KEY Store a Core Plus license key so the runtime unlocks it
308
+ inistate-core connect Explain and print the Platform upgrade config
309
+ inistate-core --version Print the version
310
+ inistate-core --help Show this help
311
+
312
+ Scaffold a schema from an existing substrate (prints ModuleSchema JSON to stdout):
313
+ inistate-core scaffold notion://<databaseId> [--name M] [--state Col]
314
+ inistate-core scaffold airtable://<baseId>/<table> [--name M] [--state Col]
315
+ inistate-core scaffold ./core.db --table <name> [--name M] [--state Col]
316
+
317
+ Environment (all optional \u2014 defaults give a working SQLite deployment):
318
+ INISTATE_CORE_DB SQLite path or adapter URL (default ~/.inistate/core.db;
319
+ "memory" for in-memory; "<scheme>://\u2026" for a registered adapter)
320
+ INISTATE_CORE_CONNECTIONS Optional JSON mapping module \u2192 external-substrate target for
321
+ per-module connections, e.g. {"NEC":"notion://<dbId>","Tasks":"csv://./tasks.csv"}.
322
+ When set, each module uses its own connection (notion/airtable/sheets/excel/csv);
323
+ when unset, INISTATE_CORE_DB is used as a single connection.
324
+ INISTATE_CORE_ADAPTER Module to load that registers a custom persistence adapter
325
+ (a path or package; exports register(api) or default { scheme, create })
326
+ INISTATE_CORE_PLUS_KEY Core Plus license (one-time $9.99) \u2014 unlocks mixing multiple backend types at once
327
+ (or run: inistate-core activate <key>)
328
+ INISTATE_MCP_MODE runtime (default) | configure
329
+ INISTATE_LOG set to 0 to silence stderr logs`)}function mCe(){console.log(`
330
+ inistate-core upgrade \u2014 Inistate Core Plus (one-time $9.99)
331
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
332
+
333
+ Inistate Core is free and runs one backend type at a time (any number of resources
334
+ of that kind \u2014 e.g. several Excel workbooks \u2014 is free). Core Plus unlocks MIXING
335
+ MULTIPLE backend types at once \u2014 route different modules to different kinds of tool
336
+ (Notion, Airtable, Google Sheets, Excel, CSV, \u2026) in one runtime:
337
+
338
+ INISTATE_CORE_CONNECTIONS='{"NEC":"notion://<dbId>","Tasks":"csv://./tasks.csv"}'
339
+
340
+ How to upgrade:
341
+ 1. Buy Core Plus (one-time $9.99): ${Iy}
342
+ 2. You'll get a license key by email and on the confirmation page.
343
+ 3. Apply it: inistate-core activate <key>
344
+ (stores it at ${Ny()})
345
+ \u2026or set the environment variable INISTATE_CORE_PLUS_KEY=<key>.
346
+ 4. Restart \u2014 multiple backend types now run at once.
347
+
348
+ A single backend type is always free; nothing here is needed for one kind of backend.
349
+ `)}function yCe(t){let e=t.find(i=>!i.startsWith("-"));e||(console.error(`Usage: inistate-core activate <key>
350
+ Get a key at `+Iy),process.exit(1));let r=GV(e);r.ok||(console.error(`Activation failed: ${r.error}`),process.exit(1)),console.log(`Core Plus activated${r.sub?` \u2014 licensed to ${r.sub}`:""}.`),console.log(`Saved to ${r.path}. Restart inistate-core to mix multiple backend types at once.`)}async function vCe(){let t=OR(),e=yr(t.logEnabled),r=process.env.INISTATE_CORE_ADAPTER?.trim();r&&await e7(r,e);let i=await JV(t);e("startup",{scheme:t.scheme,db:t.scheme==="sqlite"?t.dbTarget:t.scheme,mode:t.mode,version:uu});let n=pCe({backend:new Py(i.backend),initialMode:t.mode,name:"inistate-core",version:uu});o7(n);let s=new dCe;await n.connect(s),console.error(`inistate-core ${uu} running on stdio (${t.scheme}, ${t.mode} mode)`);let a=Uk();a&&console.error(`Core Plus active${a.sub?` \u2014 licensed to ${a.sub}`:""}`);let o=()=>{Promise.resolve(i.close()).catch(()=>{}).finally(()=>process.exit(0))};process.on("SIGINT",o),process.on("SIGTERM",o)}async function _Ce(){let t=process.argv.slice(2),e=t[0];if(e==="--version"||e==="version"||e==="-v"){console.log(uu);return}if(e==="--help"||e==="help"||e==="-h"){gCe();return}if(e==="upgrade"||e==="plus"){mCe();return}if(e==="activate"){yCe(t.slice(1));return}if(e==="connect"){l7(t.slice(1));return}if(e==="scaffold"){await u7(t.slice(1));return}await vCe()}_Ce().catch(t=>{console.error("Fatal error:",t instanceof Error?t.message:t),process.exit(1)});