@visactor/vtable-export 0.16.4-alpha.2 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/cjs/util/color.js +8 -5
- package/cjs/util/color.js.map +1 -1
- package/dist/vtable-export.js +13 -3
- package/dist/vtable-export.min.js +2 -2
- package/es/util/color.js +4 -2
- package/es/util/color.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("crypto"),require("fs"),require("stream"),require("events"),require("buffer"),require("util"),require("string_decoder"),require("path"),require("constants"),require("assert"),require("zlib"),require("os")):"function"==typeof define&&define.amd?define(["exports","crypto","fs","stream","events","buffer","util","string_decoder","path","constants","assert","zlib","os"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VTable={},e.require$$0$1,e.require$$0$6,e.require$$0$2,e.require$$0$5,e.require$$0$3,e.require$$0$4,e.require$$0$7,e.require$$1,e.require$$0$8,e.require$$5,e.require$$0$9,e.require$$1$1)}(this,(function(e,t,r,n,i,s,o,a,l,h,u,c,f){"use strict";function d(e,t,r){const n=r.getCellRange(e,t),i=n.start.col,s=n.start.row;if(i!==e||s!==t)return"";return r.getCellValue(e,t)}var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var y={exports:{}};!function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){a(n.response,t,r)},n.onerror=function(){},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var s="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof p&&p.global===p?p:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=s.saveAs||("object"!=typeof window||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(e,t,o){var a=s.URL||s.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):n(l.href)?r(e,t,o):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,s,o){if(s=s||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,o),s);else if(n(e))r(e,s,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){i(a)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var a="application/octet-stream"===e.type,l=/constructor/i.test(s.HTMLElement)||s.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||a&&l||o)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=h?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var c=s.URL||s.webkitURL,f=c.createObjectURL(e);i?i.location=f:location.href=f,i=null,setTimeout((function(){c.revokeObjectURL(f)}),4e4)}});s.saveAs=a.saveAs=a,e.exports=a}()}(y);var v=y.exports;const{toString:b}=Object.prototype,w=/["&<>]/,x={each:function(e,t){e&&(Array.isArray(e)?e.forEach(t):Object.keys(e).forEach((r=>{t(e[r],r)})))},some:function(e,t){return!!e&&(Array.isArray(e)?e.some(t):Object.keys(e).some((r=>t(e[r],r))))},every:function(e,t){return!e||(Array.isArray(e)?e.every(t):Object.keys(e).every((r=>t(e[r],r))))},map:function(e,t){return e?Array.isArray(e)?e.map(t):Object.keys(e).map((r=>t(e[r],r))):[]},keyBy:(e,t)=>e.reduce(((e,r)=>(e[r[t]]=r,e)),{}),isEqual:function(e,t){const r=typeof e,n=typeof t,i=Array.isArray(e),s=Array.isArray(t);let o;if(r!==n)return!1;if("object"==typeof e){if(i||s)return!(!i||!s)&&(e.length===t.length&&e.every(((e,r)=>{const n=t[r];return x.isEqual(e,n)})));if(null===e||null===t)return e===t;if(o=Object.keys(e),Object.keys(t).length!==o.length)return!1;for(const e of o)if(!t.hasOwnProperty(e))return!1;return x.every(e,((e,r)=>{const n=t[r];return x.isEqual(e,n)}))}return e===t},escapeHtml(e){const t=w.exec(e);if(!t)return e;let r="",n="",i=0,s=t.index;for(;s<e.length;s++){switch(e.charAt(s)){case'"':n=""";break;case"&":n="&";break;case"'":n="'";break;case"<":n="<";break;case">":n=">";break;default:continue}i!==s&&(r+=e.substring(i,s)),i=s+1,r+=n}return i!==s?r+e.substring(i,s):r},strcmp:(e,t)=>e<t?-1:e>t?1:0,isUndefined:e=>"[object Undefined]"===b.call(e),isObject:e=>"[object Object]"===b.call(e),deepMerge(){const e=arguments[0]||{},{length:t}=arguments;let r,n,i;function s(t,s){r=e[s],i=Array.isArray(t),x.isObject(t)||i?(i?(i=!1,n=r&&Array.isArray(r)?r:[]):n=r&&x.isObject(r)?r:{},e[s]=x.deepMerge(n,t)):x.isUndefined(t)||(e[s]=t)}for(let e=0;e<t;e++)x.each(arguments[e],s);return e}};var k=x;const S=/^[A-Z]+\d+$/,E={_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:e=>e<=26?1:e<=676?2:3,_fill(e){let t,r,n,i,s,o=1;if(e>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&e>=1){for(;o<=26;)t=this._dictionary[o-1],this._n2l[o]=t,this._l2n[t]=o,o++;this._l2nFill=1}if(this._l2nFill<2&&e>=2){for(o=27;o<=702;)r=o-27,n=r%26,i=Math.floor(r/26),t=this._dictionary[i]+this._dictionary[n],this._n2l[o]=t,this._l2n[t]=o,o++;this._l2nFill=2}if(this._l2nFill<3&&e>=3){for(o=703;o<=16384;)r=o-703,n=r%26,i=Math.floor(r/26)%26,s=Math.floor(r/676),t=this._dictionary[s]+this._dictionary[i]+this._dictionary[n],this._n2l[o]=t,this._l2n[t]=o,o++;this._l2nFill=3}},l2n(e){if(this._l2n[e]||this._fill(e.length),!this._l2n[e])throw new Error(`Out of bounds. Invalid column letter: ${e}`);return this._l2n[e]},n2l(e){if(e<1||e>16384)throw new Error(`${e} is out of bounds. Excel supports columns from 1 to 16384`);return this._n2l[e]||this._fill(this._level(e)),this._n2l[e]},_hash:{},validateAddress(e){if(!S.test(e))throw new Error(`Invalid Address: ${e}`);return!0},decodeAddress(e){const t=e.length<5&&this._hash[e];if(t)return t;let r=!1,n="",i=0,s=!1,o="",a=0;for(let t,l=0;l<e.length;l++)if(t=e.charCodeAt(l),!s&&t>=65&&t<=90)r=!0,n+=e[l],i=26*i+t-64;else if(t>=48&&t<=57)s=!0,o+=e[l],a=10*a+t-48;else if(s&&r&&36!==t)break;if(r){if(i>16384)throw new Error(`Out of bounds. Invalid column letter: ${n}`)}else i=void 0;s||(a=void 0);const l={address:e=n+o,col:i,row:a,$col$row:`$${n}$${o}`};return i<=100&&a<=100&&(this._hash[e]=l,this._hash[l.$col$row]=l),l},getAddress(e,t){if(t){const r=this.n2l(t)+e;return this.decodeAddress(r)}return this.decodeAddress(e)},decode(e){const t=e.split(":");if(2===t.length){const e=this.decodeAddress(t[0]),r=this.decodeAddress(t[1]),n={top:Math.min(e.row,r.row),left:Math.min(e.col,r.col),bottom:Math.max(e.row,r.row),right:Math.max(e.col,r.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(e)},decodeEx(e){const t=e.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),r=t[1]||t[2],n=t[3],i=n.split(":");if(i.length>1){let e=this.decodeAddress(i[0]),t=this.decodeAddress(i[1]);const n=Math.min(e.row,t.row),s=Math.min(e.col,t.col),o=Math.max(e.row,t.row),a=Math.max(e.col,t.col);return e=this.n2l(s)+n,t=this.n2l(a)+o,{top:n,left:s,bottom:o,right:a,sheetName:r,tl:{address:e,col:s,row:n,$col$row:`$${this.n2l(s)}$${n}`,sheetName:r},br:{address:t,col:a,row:o,$col$row:`$${this.n2l(a)}$${o}`,sheetName:r},dimensions:`${e}:${t}`}}if(n.startsWith("#"))return r?{sheetName:r,error:n}:{error:n};const s=this.decodeAddress(n);return r?{sheetName:r,...s}:s},encodeAddress:(e,t)=>E.n2l(t)+e,encode(){switch(arguments.length){case 2:return E.encodeAddress(arguments[0],arguments[1]);case 4:return`${E.encodeAddress(arguments[0],arguments[1])}:${E.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(e,t){const[r,n,,i,s]=e,[o,a]=t;return o>=r&&o<=i&&a>=n&&a<=s}};var T=E;const C=T;var O=class e{constructor(){this.decode(arguments)}setTLBR(e,t,r,n,i){if(arguments.length<4){const n=C.decodeAddress(e),s=C.decodeAddress(t);this.model={top:Math.min(n.row,s.row),left:Math.min(n.col,s.col),bottom:Math.max(n.row,s.row),right:Math.max(n.col,s.col),sheetName:r},this.setTLBR(n.row,n.col,s.row,s.col,i)}else this.model={top:Math.min(e,r),left:Math.min(t,n),bottom:Math.max(e,r),right:Math.max(t,n),sheetName:i}}decode(t){switch(t.length){case 5:this.setTLBR(t[0],t[1],t[2],t[3],t[4]);break;case 4:this.setTLBR(t[0],t[1],t[2],t[3]);break;case 3:this.setTLBR(t[0],t[1],t[2]);break;case 2:this.setTLBR(t[0],t[1]);break;case 1:{const r=t[0];if(r instanceof e)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{const e=C.decodeEx(r);e.top?this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName}:this.model={top:e.row,left:e.col,bottom:e.row,right:e.col,sheetName:e.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() - ${t.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(){const{sheetName:e}=this.model;return e?/^[a-zA-Z0-9]*$/.test(e)?`${e}!`:`'${e}'!`:""}expand(e,t,r,n){(!this.model.top||e<this.top)&&(this.top=e),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||r>this.bottom)&&(this.bottom=r),(!this.model.right||n>this.right)&&(this.right=n)}expandRow(e){if(e){const{dimensions:t,number:r}=e;t&&this.expand(r,t.min,r,t.max)}}expandToAddress(e){const t=C.decodeEx(e);this.expand(t.row,t.col,t.row,t.col)}get tl(){return C.n2l(this.left)+this.top}get $t$l(){return`$${C.n2l(this.left)}$${this.top}`}get br(){return C.n2l(this.right)+this.bottom}get $b$r(){return`$${C.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){const t=C.decodeEx(e);return this.containsEx(t)}containsEx(e){return(!e.sheetName||!this.sheetName||e.sheetName===this.sheetName)&&(e.row>=this.top&&e.row<=this.bottom&&e.col>=this.left&&e.col<=this.right)}forEachAddress(e){for(let t=this.left;t<=this.right;t++)for(let r=this.top;r<=this.bottom;r++)e(C.encodeAddress(r,t),r,t)}},R={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!"}};const A=T,N=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,I=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;var P={slideFormula:function(e,t,r){const n=A.decode(t),i=A.decode(r);return e.replace(N,((e,t,r,s,o)=>{if(o)return e;const a=I.exec(s);if(a){const r=a[1],s=a[2].toUpperCase(),o=a[3],l=a[4];if(s.length>3||3===s.length&&s>"XFD")return e;let h=A.l2n(s),u=parseInt(l,10);r||(h+=i.col-n.col),o||(u+=i.row-n.row);return(t||"")+(r||"")+A.n2l(h)+(o||"")+u}return e}))}};const F=k;let D=class e{constructor(e){this.note=e}get model(){let t=null;if("string"==typeof this.note)t={type:"note",note:{texts:[{text:this.note}]}};else t={type:"note",note:this.note};return F.deepMerge({},e.DEFAULT_CONFIGS,t)}set model(e){const{note:t}=e,{texts:r}=t;1===r.length&&1===Object.keys(r[0]).length?this.note=r[0].text:this.note=t}static fromModel(t){const r=new e;return r.model=t,r}};D.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}};var j=D;const M=T,L=k,B=R,{slideFormula:z}=P,$=j;let H=class e{constructor(t,r,n){if(!t||!r)throw new Error("A Cell needs a Row");this._row=t,this._column=r,M.validateAddress(n),this._address=n,this._value=U.create(e.Types.Null,this),this.style=this._mergeStyle(t.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,t,r){const n=e&&e.numFmt||t&&t.numFmt;n&&(r.numFmt=n);const i=e&&e.font||t&&t.font;i&&(r.font=i);const s=e&&e.alignment||t&&t.alignment;s&&(r.alignment=s);const o=e&&e.border||t&&t.border;o&&(r.border=o);const a=e&&e.fill||t&&t.fill;a&&(r.fill=a);const l=e&&e.protection||t&&t.protection;return l&&(r.protection=l),r}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===e.Types.Merge}merge(t,r){this._value.release(),this._value=U.create(e.Types.Merge,this,t),r||(this.style=t.style)}unmerge(){this.type===e.Types.Merge&&(this._value.release(),this._value=U.create(e.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(t){return this._value.type===e.Types.Merge&&this._value.isMergedTo(t)}get master(){return this.type===e.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===e.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(t){this.type!==e.Types.Merge?(this._value.release(),this._value=U.create(U.getType(t),this,t)):this._value.master.value=t}get note(){return this._comment&&this._comment.note}set note(e){this._comment=new $(e)}get text(){return this._value.toString()}get html(){return L.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(t){this.type===e.Types.String&&(this._value=U.create(e.Types.Hyperlink,this,{text:this._value.value,hyperlink:t}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{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){const{definedNames:t}=this.workbook;t.removeAllNames(this.fullAddress),e.forEach((e=>{t.addEx(this.fullAddress,e)}))}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(){const{model:e}=this._value;return e.style=this.style,this._comment&&(e.comment=this._comment.model),e}set model(e){if(this._value.release(),this._value=U.create(e.type,this),this._value.model=e,e.comment&&"note"===e.comment.type)this._comment=$.fromModel(e.comment);e.style?this.style=e.style:this.style={}}};H.Types=B.ValueType;const U={getType:e=>null==e?H.Types.Null:e instanceof String||"string"==typeof e?H.Types.String:"number"==typeof e?H.Types.Number:"boolean"==typeof e?H.Types.Boolean:e instanceof Date?H.Types.Date:e.text&&e.hyperlink?H.Types.Hyperlink:e.formula||e.sharedFormula?H.Types.Formula:e.richText?H.Types.RichText:e.sharedString?H.Types.SharedString:e.error?H.Types.Error:H.Types.JSON,types:[{t:H.Types.Null,f:class{constructor(e){this.model={address:e.address,type:H.Types.Null}}get value(){return null}set value(e){}get type(){return H.Types.Null}get effectiveType(){return H.Types.Null}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return""}release(){}toString(){return""}}},{t:H.Types.Number,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Number,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.Number}get effectiveType(){return H.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()}}},{t:H.Types.String,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.String,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.String}get effectiveType(){return H.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}}},{t:H.Types.Date,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Date,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.Date}get effectiveType(){return H.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()}}},{t:H.Types.Hyperlink,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Hyperlink,text:t?t.text:void 0,hyperlink:t?t.hyperlink:void 0},t&&t.tooltip&&(this.model.tooltip=t.tooltip)}get value(){const 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 H.Types.Hyperlink}get effectiveType(){return H.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}}},{t:H.Types.Formula,f:class{constructor(e,t){this.cell=e,this.model={address:e.address,type:H.Types.Formula,shareType:t?t.shareType:void 0,ref:t?t.ref:void 0,formula:t?t.formula:void 0,sharedFormula:t?t.sharedFormula:void 0,result:t?t.result:void 0}}_copyModel(e){const t={},r=r=>{const n=e[r];n&&(t[r]=n)};return r("formula"),r("result"),r("ref"),r("shareType"),r("sharedFormula"),t}get value(){return this._copyModel(this.model)}set value(e){this.model=this._copyModel(e)}validate(e){switch(U.getType(e)){case H.Types.Null:case H.Types.String:case H.Types.Number:case H.Types.Date:break;case H.Types.Hyperlink:case H.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells: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)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(e){this.model.formula=e}get formulaType(){return this.model.formula?B.FormulaType.Master:this.model.sharedFormula?B.FormulaType.Shared:B.FormulaType.None}get result(){return this.model.result}set result(e){this.model.result=e}get type(){return H.Types.Formula}get effectiveType(){const e=this.model.result;return null==e?B.ValueType.Null:e instanceof String||"string"==typeof e?B.ValueType.String:"number"==typeof e?B.ValueType.Number:e instanceof Date?B.ValueType.Date:e.text&&e.hyperlink?B.ValueType.Hyperlink:e.formula?B.ValueType.Formula:B.ValueType.Null}get address(){return this.model.address}set address(e){this.model.address=e}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:e}=this.cell,t=e.findCell(this.model.sharedFormula);this._translatedFormula=t&&z(t.formula,t.address,this.model.address)}return this._translatedFormula}toCsvString(){return`${this.model.result||""}`}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:H.Types.Merge,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Merge,master:t?t.address:void 0},this._master=t,t&&t.addMergeRef()}get value(){return this._master.value}set value(e){e instanceof H?(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 H.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()}}},{t:H.Types.JSON,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.String,value:JSON.stringify(t),rawValue:t}}get value(){return this.model.rawValue}set value(e){this.model.rawValue=e,this.model.value=JSON.stringify(e)}get type(){return H.Types.String}get effectiveType(){return H.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}}},{t:H.Types.SharedString,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.SharedString,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.SharedString}get effectiveType(){return H.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()}}},{t:H.Types.RichText,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.String,value:t}}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 H.Types.RichText}get effectiveType(){return H.Types.RichText}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:H.Types.Boolean,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Boolean,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.Boolean}get effectiveType(){return H.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()}}},{t:H.Types.Error,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Error,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.Error}get effectiveType(){return H.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()}}}].reduce(((e,t)=>(e[t.t]=t.f,e)),[]),create(e,t,r){const n=this.types[e];if(!n)throw new Error(`Could not create Value of type ${e}`);return new n(t,r)}};const V=k,W=R,q=T,X=H;var Z=class{constructor(e,t){this._worksheet=e,this._number=t,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 t=this._cells[e.col-1];if(!t){const r=this._worksheet.getColumn(e.col);t=new X(this,r,e.address),this._cells[e.col-1]=t}return t}getCell(e){if("string"==typeof e){const t=this._worksheet.getColumnKey(e);e=t?t.number:q.l2n(e)}return this._cells[e-1]||this.getCellEx({address:q.encodeAddress(this._number,e),row:this._number,col:e})}splice(e,t){const r=e+t;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];const o=i.length-t,a=this._cells.length;let l,h,u;if(o<0)for(l=e+i.length;l<=a;l++)u=this._cells[l-1],h=this._cells[l-o-1],h?(u=this.getCell(l),u.value=h.value,u.style=h.style,u._comment=h._comment):u&&(u.value=null,u.style={},u._comment=void 0);else if(o>0)for(l=a;l>=r;l--)h=this._cells[l-1],h?(u=this.getCell(l+o),u.value=h.value,u.style=h.style,u._comment=h._comment):this._cells[l+o-1]=void 0;for(l=0;l<i.length;l++)u=this.getCell(e+l),u.value=i[l],u.style={},u._comment=void 0}eachCell(e,t){if(t||(t=e,e=null),e&&e.includeEmpty){const e=this._cells.length;for(let r=1;r<=e;r++)t(this.getCell(r),r)}else this._cells.forEach(((e,r)=>{e&&e.type!==W.ValueType.Null&&t(e,r+1)}))}addPageBreak(e,t){const r=this._worksheet,n=Math.max(0,e-1)||0,i=Math.max(0,t-1)||16838,s={id:this._number,max:i,man:1};n&&(s.min=n),r.rowBreaks.push(s)}get values(){const e=[];return this._cells.forEach((t=>{t&&t.type!==W.ValueType.Null&&(e[t.col]=t.value)})),e}set values(e){if(this._cells=[],e)if(e instanceof Array){let t=0;e.hasOwnProperty("0")&&(t=1),e.forEach(((e,r)=>{void 0!==e&&(this.getCellEx({address:q.encodeAddress(this._number,r+t),row:this._number,col:r+t}).value=e)}))}else this._worksheet.eachColumnKey(((t,r)=>{void 0!==e[r]&&(this.getCellEx({address:q.encodeAddress(this._number,t.number),row:this._number,col:t.number}).value=e[r])}));else;}get hasValues(){return V.some(this._cells,(e=>e&&e.type!==W.ValueType.Null))}get cellCount(){return this._cells.length}get actualCellCount(){let e=0;return this.eachCell((()=>{e++})),e}get dimensions(){let e=0,t=0;return this._cells.forEach((r=>{r&&r.type!==W.ValueType.Null&&((!e||e>r.col)&&(e=r.col),t<r.col&&(t=r.col))})),e>0?{min:e,max:t}:null}_applyStyle(e,t){return this.style[e]=t,this._cells.forEach((r=>{r&&(r[e]=t)})),t}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(){const e=[];let t=0,r=0;return this._cells.forEach((n=>{if(n){const i=n.model;i&&((!t||t>n.col)&&(t=n.col),r<n.col&&(r=n.col),e.push(i))}})),this.height||e.length?{cells:e,number:this.number,min:t,max:r,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");let t;this._cells=[],e.cells.forEach((e=>{switch(e.type){case X.Types.Merge:break;default:{let r;if(e.address)r=q.decodeAddress(e.address);else if(t){const{row:e}=t,n=t.col+1;r={row:e,col:n,address:q.encodeAddress(e,n),$col$row:`$${q.n2l(n)}$${e}`}}t=r;this.getCellEx(r).model=e;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))||{}}};const G=k,Y=R,K=T;var Q=class e{constructor(e,t,r){this._worksheet=e,this._number=t,!1!==r&&(this.defn=r)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return K.n2l(this._number)}get isCustomWidth(){return void 0!==this.width&&9!==this.width}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=void 0!==e.width?e.width:9,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){void 0!==e?(this._header=e,this.headers.forEach(((e,t)=>{this._worksheet.getCell(t+1,this.number).value=e}))):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&&G.isEqual(this.style,e.style)}get isDefault(){if(this.isCustomWidth)return!1;if(this.hidden)return!1;if(this.outlineLevel)return!1;const 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,t){const r=this.number;t||(t=e,e=null),this._worksheet.eachRow(e,((e,n)=>{t(e.getCell(r),n)}))}get values(){const e=[];return this.eachCell(((t,r)=>{t&&t.type!==Y.ValueType.Null&&(e[r]=t.value)})),e}set values(e){if(!e)return;const t=this.number;let r=0;e.hasOwnProperty("0")&&(r=1),e.forEach(((e,n)=>{this._worksheet.getCell(n+r,t).value=e}))}_applyStyle(e,t){return this.style[e]=t,this.eachCell((r=>{r[e]=t})),t}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){const t=[];let r=null;return e&&e.forEach(((e,n)=>{e.isDefault?r&&(r=null):r&&e.equivalentTo(r)?r.max=n+1:(r={min:n+1,max:n+1,width:void 0!==e.width?e.width:9,style:e.style,isCustomWidth:e.isCustomWidth,hidden:e.hidden,outlineLevel:e.outlineLevel,collapsed:e.collapsed},t.push(r))})),t.length?t:void 0}static fromModel(t,r){const n=[];let i=1,s=0;for(r=(r=r||[]).sort((function(e,t){return e.min-t.min}));s<r.length;){const o=r[s++];for(;i<o.min;)n.push(new e(t,i++));for(;i<=o.max;)n.push(new e(t,i++,o))}return n.length?n:null}};const J=T;var ee=class e{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.worksheet=e,t)if("string"==typeof t){const e=J.decodeAddress(t);this.nativeCol=e.col+r,this.nativeColOff=0,this.nativeRow=e.row+r,this.nativeRowOff=0}else void 0!==t.nativeCol?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):void 0!==t.col?(this.col=t.col+r,this.row=t.row+r):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(t){return t instanceof e||null==t?t:new e(t)}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(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):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}};const te=T,re=ee;var ne=class{constructor(e,t){this.worksheet=e,this.model=t}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(e){let{type:t,imageId:r,range:n,hyperlinks:i}=e;if(this.type=t,this.imageId=r,"image"===t)if("string"==typeof n){const e=te.decode(n);this.range={tl:new re(this.worksheet,{col:e.left,row:e.top},-1),br:new re(this.worksheet,{col:e.right,row:e.bottom},0),editAs:"oneCell"}}else this.range={tl:new re(this.worksheet,n.tl,0),br:n.br&&new re(this.worksheet,n.br,0),ext:n.ext,editAs:n.editAs,hyperlinks:i||n.hyperlinks}}};const ie=T;var se=class{constructor(e,t){this.worksheet=e,t&&(this.table=t,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(){const{table:e}=this,t=(e,t,r)=>{void 0===e[t]&&(e[t]=r)};t(e,"headerRow",!0),t(e,"totalsRow",!1),t(e,"style",{}),t(e.style,"theme","TableStyleMedium2"),t(e.style,"showFirstColumn",!1),t(e.style,"showLastColumn",!1),t(e.style,"showRowStripes",!1),t(e.style,"showColumnStripes",!1);const r=(e,t)=>{if(!e)throw new Error(t)};r(e.ref,"Table must have ref"),r(e.columns,"Table must have column definitions"),r(e.rows,"Table must have row definitions"),e.tl=ie.decodeAddress(e.ref);const{row:n,col:i}=e.tl;r(n>0,"Table must be on valid row"),r(i>0,"Table must be on valid col");const{width:s,filterHeight:o,tableHeight:a}=this;e.autoFilterRef=ie.encode(n,i,n+o-1,i+s-1),e.tableRef=ie.encode(n,i,n+a-1,i+s-1),e.columns.forEach(((e,n)=>{r(e.name,`Column ${n} must have a name`),0===n?t(e,"totalsRowLabel","Total"):(t(e,"totalsRowFunction","none"),e.totalsRowFormula=this.getFormula(e))}))}store(){const e=(e,t)=>{t&&Object.keys(t).forEach((r=>{e[r]=t[r]}))},{worksheet:t,table:r}=this,{row:n,col:i}=r.tl;let s=0;if(r.headerRow){const o=t.getRow(n+s++);r.columns.forEach(((t,r)=>{const{style:n,name:s}=t,a=o.getCell(i+r);a.value=s,e(a,n)}))}if(r.rows.forEach((o=>{const a=t.getRow(n+s++);o.forEach(((t,n)=>{const s=a.getCell(i+n);s.value=t,e(s,r.columns[n].style)}))})),r.totalsRow){const o=t.getRow(n+s++);r.columns.forEach(((t,r)=>{const n=o.getCell(i+r);if(0===r)n.value=t.totalsRowLabel;else{const e=this.getFormula(t);n.value=e?{formula:t.totalsRowFormula,result:t.totalsRowResult}:null}e(n,t.style)}))}}load(e){const{table:t}=this,{row:r,col:n}=t.tl;let i=0;if(t.headerRow){const s=e.getRow(r+i++);t.columns.forEach(((e,t)=>{s.getCell(n+t).value=e.name}))}if(t.rows.forEach((t=>{const s=e.getRow(r+i++);t.forEach(((e,t)=>{s.getCell(n+t).value=e}))})),t.totalsRow){const s=e.getRow(r+i++);t.columns.forEach(((e,t)=>{const r=s.getCell(n+t);if(0===t)r.value=e.totalsRowLabel;else{this.getFormula(e)&&(r.value={formula:e.totalsRowFormula,result:e.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();const e=ie.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let t=0;t<this._cache.tableHeight;t++){const r=this.worksheet.getRow(e.row+t);for(let t=0;t<this._cache.width;t++){r.getCell(e.col+t).value=null}}else{for(let t=this.tableHeight;t<this._cache.tableHeight;t++){const r=this.worksheet.getRow(e.row+t);for(let t=0;t<this._cache.width;t++){r.getCell(e.col+t).value=null}}for(let t=0;t<this.tableHeight;t++){const r=this.worksheet.getRow(e.row+t);for(let t=this.width;t<this._cache.width;t++){r.getCell(e.col+t).value=null}}}this.store()}addRow(e,t){this.cacheState(),void 0===t?this.table.rows.push(e):this.table.rows.splice(t,0,e)}removeRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.rows.splice(e,t)}getColumn(e){const t=this.table.columns[e];return new class{constructor(e,t,r){this.table=e,this.column=t,this.index=r}_set(e,t){this.table.cacheState(),this.column[e]=t}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)}}(this,t,e)}addColumn(e,t,r){this.cacheState(),void 0===r?(this.table.columns.push(e),this.table.rows.forEach(((e,r)=>{e.push(t[r])}))):(this.table.columns.splice(r,0,e),this.table.rows.forEach(((e,n)=>{e.splice(r,0,t[n])})))}removeColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.columns.splice(e,t),this.table.rows.forEach((r=>{r.splice(e,t)}))}_assign(e,t,r){this.cacheState(),e[t]=r}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}};var oe=class{constructor(e){this.model=e||{}}add(e,t){return this.model[e]=t}find(e){return this.model[e]}remove(e){this.model[e]=void 0}};const ae=t,le={hash(e){const t=ae.createHash(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return t.update(Buffer.concat(n)),t.digest()},convertPasswordToHash(e,t,r,n){t=t.toLowerCase();if(ae.getHashes().indexOf(t)<0)throw new Error(`Hash algorithm '${t}' not supported!`);const i=Buffer.from(e,"utf16le");let s=this.hash(t,Buffer.from(r,"base64"),i);for(let e=0;e<n;e++){const r=Buffer.alloc(4);r.writeUInt32LE(e,0),s=this.hash(t,s,r)}return s.toString("base64")},randomBytes:e=>ae.randomBytes(e)};var he=le,ue={};const ce=(e,t)=>({...e,...t.reduce(((t,r)=>(e[r]&&(t[r]={...e[r]}),t)),{})}),fe=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];e[r]&&(t[r]=ce(e[r],n))};ue.copyStyle=e=>{if(!e)return e;if(t=e,0===Object.keys(t).length)return{};var t;const r={...e};return fe(e,r,"font",["color"]),fe(e,r,"alignment"),fe(e,r,"protection"),e.border&&(fe(e,r,"border"),fe(e.border,r.border,"top",["color"]),fe(e.border,r.border,"left",["color"]),fe(e.border,r.border,"bottom",["color"]),fe(e.border,r.border,"right",["color"]),fe(e.border,r.border,"diagonal",["color"])),e.fill&&(fe(e,r,"fill",["fgColor","bgColor","center"]),e.fill.stops&&(r.fill.stops=e.fill.stops.map((e=>ce(e,["color"]))))),r};const de=k,pe=T,me=O,ge=Z,ye=Q,ve=R,_e=ne,be=se,we=oe,xe=he,{copyStyle:ke}=ue;var Se=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 we,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(void 0===e&&(e=`sheet${this.id}`),this._name!==e){if("string"!=typeof e)throw new Error("The name has to be a string.");if(""===e)throw new Error("The name can't be empty.");if("History"===e)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&&(e=e.substring(0,31)),this._workbook._worksheets.find((t=>t&&t.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(){const e=new me;return this._rows.forEach((t=>{if(t){const r=t.dimensions;r&&e.expand(t.number,r.min,t.number,r.max)}})),e}get columns(){return this._columns}set columns(e){this._headerRowCount=e.reduce(((e,t)=>{const r=(t.header?1:t.headers&&t.headers.length)||0;return Math.max(e,r)}),0);let t=1;const r=this._columns=[];e.forEach((e=>{const n=new ye(this,t++,!1);r.push(n),n.defn=e}))}getColumnKey(e){return this._keys[e]}setColumnKey(e,t){this._keys[e]=t}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){de.each(this._keys,e)}getColumn(e){if("string"==typeof e){const t=this._keys[e];if(t)return t;e=pe.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){let t=this._columns.length+1;for(;t<=e;)this._columns.push(new ye(this,t++))}return this._columns[e-1]}spliceColumns(e,t){const r=this._rows.length;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];if(i.length>0)for(let n=0;n<r;n++){const r=[e,t];i.forEach((e=>{r.push(e[n]||null)}));const s=this.getRow(n+1);s.splice.apply(s,r)}else this._rows.forEach((r=>{r&&r.splice(e,t)}));const o=i.length-t,a=e+t,l=this._columns.length;if(o<0)for(let t=e+i.length;t<=l;t++)this.getColumn(t).defn=this.getColumn(t-o).defn;else if(o>0)for(let e=l;e>=a;e--)this.getColumn(e+o).defn=this.getColumn(e).defn;for(let t=e;t<e+i.length;t++)this.getColumn(t).defn=null;this.workbook.definedNames.spliceColumns(this.name,e,t,i.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let e=0;return this.eachRow((t=>{e=Math.max(e,t.cellCount)})),e}get actualColumnCount(){const e=[];let t=0;return this.eachRow((r=>{r.eachCell((r=>{let{col:n}=r;e[n]||(e[n]=!0,t++)}))})),t}_commitRow(){}get _lastRowNumber(){const e=this._rows;let t=e.length;for(;t>0&&void 0===e[t-1];)t--;return t}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,t){return this._rows.slice(e-1,e-1+t)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let e=0;return this.eachRow((()=>{e++})),e}getRow(e){let t=this._rows[e-1];return t||(t=this._rows[e-1]=new ge(this,e)),t}getRows(e,t){if(t<1)return;const r=[];for(let n=e;n<e+t;n++)r.push(this.getRow(n));return r}addRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n";const r=this._nextRow,n=this.getRow(r);return n.values=e,this._setStyleOption(r,"i"===t[0]?t:"n"),n}addRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n";const r=[];return e.forEach((e=>{r.push(this.addRow(e,t))})),r}insertRow(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n";return this.spliceRows(e,0,t),this._setStyleOption(e,r),this.getRow(e)}insertRows(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n";if(this.spliceRows(e,0,...t),"n"!==r)for(let n=0;n<t.length;n++)"o"===r[0]&&void 0!==this.findRow(t.length+e+n)?this._copyStyle(t.length+e+n,e+n,"+"===r[1]):"i"===r[0]&&void 0!==this.findRow(e-1)&&this._copyStyle(e-1,e+n,"+"===r[1]);return this.getRows(e,t.length)}_setStyleOption(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n";"o"===t[0]&&void 0!==this.findRow(e+1)?this._copyStyle(e+1,e,"+"===t[1]):"i"===t[0]&&void 0!==this.findRow(e-1)&&this._copyStyle(e-1,e,"+"===t[1])}_copyStyle(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.getRow(e),i=this.getRow(t);i.style=ke(n.style),n.eachCell({includeEmpty:r},((e,t)=>{i.getCell(t).style=ke(e.style)})),i.height=n.height}duplicateRow(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this._rows[e-1],i=new Array(t).fill(n.values);this.spliceRows(e+1,r?0:t,...i);for(let r=0;r<t;r++){const t=this._rows[e+r];t.style=n.style,t.height=n.height,n.eachCell({includeEmpty:!0},((e,r)=>{t.getCell(r).style=e.style}))}}spliceRows(e,t){const r=e+t;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];const o=i.length,a=o-t,l=this._rows.length;let h,u;if(a<0)for(e===l&&(this._rows[l-1]=void 0),h=r;h<=l;h++)if(u=this._rows[h-1],u){const e=this.getRow(h+a);e.values=u.values,e.style=u.style,e.height=u.height,u.eachCell({includeEmpty:!0},((t,r)=>{e.getCell(r).style=t.style})),this._rows[h-1]=void 0}else this._rows[h+a-1]=void 0;else if(a>0)for(h=l;h>=r;h--)if(u=this._rows[h-1],u){const e=this.getRow(h+a);e.values=u.values,e.style=u.style,e.height=u.height,u.eachCell({includeEmpty:!0},((t,r)=>{if(e.getCell(r).style=t.style,"MergeValue"===t._value.constructor.name){const e=this.getRow(t._row._number+o).getCell(r),n=t._value._master,i=this.getRow(n._row._number+o).getCell(n._column._number);e.merge(i)}}))}else this._rows[h+a-1]=void 0;for(h=0;h<o;h++){const t=this.getRow(e+h);t.style={},t.values=i[h]}this.workbook.definedNames.spliceRows(this.name,e,t,o)}eachRow(e,t){if(t||(t=e,e=void 0),e&&e.includeEmpty){const e=this._rows.length;for(let r=1;r<=e;r++)t(this.getRow(r),r)}else this._rows.forEach((e=>{e&&e.hasValues&&t(e,e.number)}))}getSheetValues(){const e=[];return this._rows.forEach((t=>{t&&(e[t.number]=t.values)})),e}findCell(e,t){const r=pe.getAddress(e,t),n=this._rows[r.row-1];return n?n.findCell(r.col):void 0}getCell(e,t){const r=pe.getAddress(e,t);return this.getRow(r.row).getCellEx(r)}mergeCells(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new me(t);this._mergeCellsInternal(n)}mergeCellsWithoutStyle(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new me(t);this._mergeCellsInternal(n,!0)}_mergeCellsInternal(e,t){de.each(this._merges,(t=>{if(t.intersects(e))throw new Error("Cannot merge already merged cells")}));const r=this.getCell(e.top,e.left);for(let n=e.top;n<=e.bottom;n++)for(let i=e.left;i<=e.right;i++)(n>e.top||i>e.left)&&this.getCell(n,i).merge(r,t);this._merges[r.address]=e}_unMergeMaster(e){const t=this._merges[e.address];if(t){for(let e=t.top;e<=t.bottom;e++)for(let r=t.left;r<=t.right;r++)this.getCell(e,r).unmerge();delete this._merges[e.address]}}get hasMerges(){return de.some(this._merges,Boolean)}unMergeCells(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new me(t);for(let e=n.top;e<=n.bottom;e++)for(let t=n.left;t<=n.right;t++){const r=this.findCell(e,t);r&&(r.type===ve.ValueType.Merge?this._unMergeMaster(r.master):this._merges[r.address]&&this._unMergeMaster(r))}}fillFormula(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"shared";const i=pe.decode(e),{top:s,left:o,bottom:a,right:l}=i,h=l-o+1,u=pe.encodeAddress(s,o),c="shared"===n;let f;f="function"==typeof r?r:Array.isArray(r)?Array.isArray(r[0])?(e,t)=>r[e-s][t-o]:(e,t)=>r[(e-s)*h+(t-o)]:()=>{};let d=!0;for(let r=s;r<=a;r++)for(let i=o;i<=l;i++)d?(this.getCell(r,i).value={shareType:n,formula:t,ref:e,result:f(r,i)},d=!1):this.getCell(r,i).value=c?{sharedFormula:u,result:f(r,i)}:f(r,i)}addImage(e,t){const r={type:"image",imageId:e,range:t};this._media.push(new _e(this,r))}getImages(){return this._media.filter((e=>"image"===e.type))}addBackgroundImage(e){const t={type:"background",imageId:e};this._media.push(new _e(this,t))}getBackgroundImageId(){const e=this._media.find((e=>"background"===e.type));return e&&e.imageId}protect(e,t){return new Promise((r=>{this.sheetProtection={sheet:!0},t&&"spinCount"in t&&(t.spinCount=Number.isFinite(t.spinCount)?Math.round(Math.max(0,t.spinCount)):1e5),e&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=xe.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=t&&"spinCount"in t?t.spinCount:1e5,this.sheetProtection.hashValue=xe.convertPasswordToHash(e,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),t&&(this.sheetProtection=Object.assign(this.sheetProtection,t),!e&&"spinCount"in t&&delete this.sheetProtection.spinCount),r()}))}unprotect(){this.sheetProtection=null}addTable(e){const t=new be(this,e);return this.tables[e.name]=t,t}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){"number"==typeof e?this.conditionalFormattings.splice(e,1):this.conditionalFormattings=e instanceof Function?this.conditionalFormattings.filter(e):[]}get tabColor(){return this.properties.tabColor}set tabColor(e){this.properties.tabColor=e}get model(){const 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((e=>e.model)),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map((e=>e.model)),conditionalFormattings:this.conditionalFormattings};e.cols=ye.toModel(this.columns);const t=e.rows=[],r=e.dimensions=new me;return this._rows.forEach((e=>{const n=e&&e.model;n&&(r.expand(n.number,n.min,n.number,n.max),t.push(n))})),e.merges=[],de.each(this._merges,(t=>{e.merges.push(t.range)})),e}_parseRows(e){this._rows=[],e.rows.forEach((e=>{const t=new ge(this,e.number);this._rows[t.number-1]=t,t.model=e}))}_parseMergeCells(e){de.each(e.mergeCells,(e=>{this.mergeCellsWithoutStyle(e)}))}set model(e){this.name=e.name,this._columns=ye.fromModel(this,e.cols),this._parseRows(e),this._parseMergeCells(e),this.dataValidations=new we(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((e=>new _e(this,e))),this.sheetProtection=e.sheetProtection,this.tables=e.tables.reduce(((e,t)=>{const r=new be;return r.model=t,e[t.name]=r,e}),{}),this.conditionalFormattings=e.conditionalFormattings}};const Ee=k,Te=T;var Ce=class{constructor(e){this.template=e,this.sheets={}}addCell(e){this.addCellEx(Te.decodeEx(e))}getCell(e){return this.findCellEx(Te.decodeEx(e),!0)}findCell(e){return this.findCellEx(Te.decodeEx(e),!1)}findCellAt(e,t,r){const n=this.sheets[e],i=n&&n[t];return i&&i[r]}addCellEx(e){if(e.top)for(let t=e.top;t<=e.bottom;t++)for(let r=e.left;r<=e.right;r++)this.getCellAt(e.sheetName,t,r);else this.findCellEx(e,!0)}getCellEx(e){return this.findCellEx(e,!0)}findCellEx(e,t){const r=this.findSheet(e,t),n=this.findSheetRow(r,e,t);return this.findRowCell(n,e,t)}getCellAt(e,t,r){const n=this.sheets[e]||(this.sheets[e]=[]),i=n[t]||(n[t]=[]);return i[r]||(i[r]={sheetName:e,address:Te.n2l(r)+t,row:t,col:r})}removeCellEx(e){const t=this.findSheet(e);if(!t)return;const r=this.findSheetRow(t,e);r&&delete r[e.col]}forEachInSheet(e,t){const r=this.sheets[e];r&&r.forEach(((e,r)=>{e&&e.forEach(((e,n)=>{e&&t(e,r,n)}))}))}forEach(e){Ee.each(this.sheets,((t,r)=>{this.forEachInSheet(r,e)}))}map(e){const t=[];return this.forEach((r=>{t.push(e(r))})),t}findSheet(e,t){const r=e.sheetName;return this.sheets[r]?this.sheets[r]:t?this.sheets[r]=[]:void 0}findSheetRow(e,t,r){const{row:n}=t;return e&&e[n]?e[n]:r?e[n]=[]:void 0}findRowCell(e,t,r){const{col:n}=t;return e&&e[n]?e[n]:r?e[n]=this.template?Object.assign(t,JSON.parse(JSON.stringify(this.template))):t:void 0}spliceRows(e,t,r,n){const i=this.sheets[e];if(i){const e=[];for(let t=0;t<n;t++)e.push([]);i.splice(t,r,...e)}}spliceColumns(e,t,r,n){const i=this.sheets[e];if(i){const e=[];for(let t=0;t<n;t++)e.push(null);Ee.each(i,(n=>{n.splice(t,r,...e)}))}}};const Oe=k,Re=T,Ae=Ce,Ne=O,Ie=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;var Pe,Fe,De,je,Me,Le=class{constructor(){this.matrixMap={}}getMatrix(e){return this.matrixMap[e]||(this.matrixMap[e]=new Ae)}add(e,t){const r=Re.decodeEx(e);this.addEx(r,t)}addEx(e,t){const r=this.getMatrix(t);if(e.top)for(let t=e.left;t<=e.right;t++)for(let n=e.top;n<=e.bottom;n++){const i={sheetName:e.sheetName,address:Re.n2l(t)+n,row:n,col:t};r.addCellEx(i)}else r.addCellEx(e)}remove(e,t){const r=Re.decodeEx(e);this.removeEx(r,t)}removeEx(e,t){this.getMatrix(t).removeCellEx(e)}removeAllNames(e){Oe.each(this.matrixMap,(t=>{t.removeCellEx(e)}))}forEach(e){Oe.each(this.matrixMap,((t,r)=>{t.forEach((t=>{e(r,t)}))}))}getNames(e){return this.getNamesEx(Re.decodeEx(e))}getNamesEx(e){return Oe.map(this.matrixMap,((t,r)=>t.findCellEx(e)&&r)).filter(Boolean)}_explore(e,t){t.mark=!1;const{sheetName:r}=t,n=new Ne(t.row,t.col,t.row,t.col,r);let i,s;function o(i,s){const o=e.findCellAt(r,i,t.col);return!(!o||!o.mark)&&(n[s]=i,o.mark=!1,!0)}for(s=t.row-1;o(s,"top");s--);for(s=t.row+1;o(s,"bottom");s++);function a(t,i){const o=[];for(s=n.top;s<=n.bottom;s++){const n=e.findCellAt(r,s,t);if(!n||!n.mark)return!1;o.push(n)}n[i]=t;for(let e=0;e<o.length;e++)o[e].mark=!1;return!0}for(i=t.col-1;a(i,"left");i--);for(i=t.col+1;a(i,"right");i++);return n}getRanges(e,t){if(!(t=t||this.matrixMap[e]))return{name:e,ranges:[]};t.forEach((e=>{e.mark=!0}));const r=t.map((e=>e.mark&&this._explore(t,e))).filter(Boolean).map((e=>e.$shortRange));return{name:e,ranges:r}}normaliseMatrix(e,t){e.forEachInSheet(t,((e,t,r)=>{e&&(e.row===t&&e.col===r||(e.row=t,e.col=r,e.address=Re.n2l(r)+t))}))}spliceRows(e,t,r,n){Oe.each(this.matrixMap,(i=>{i.spliceRows(e,t,r,n),this.normaliseMatrix(i,e)}))}spliceColumns(e,t,r,n){Oe.each(this.matrixMap,(i=>{i.spliceColumns(e,t,r,n),this.normaliseMatrix(i,e)}))}get model(){return Oe.map(this.matrixMap,((e,t)=>this.getRanges(t,e))).filter((e=>e.ranges.length))}set model(e){const t=this.matrixMap={};e.forEach((e=>{const r=t[e.name]=new Ae;e.ranges.forEach((e=>{Ie.test(e.split("!").pop()||"")&&r.addCell(e)}))}))}},Be={},ze={},$e={},He={exports:{}},Ue={exports:{}};function Ve(){if(Pe)return Ue.exports;return Pe=1,"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?Ue.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,s,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(i=new Array(o-1),s=0;s<i.length;)i[s++]=arguments[s];return process.nextTick((function(){e.apply(null,i)}))}}}:Ue.exports=process,Ue.exports}function We(){return Me?je:(Me=1,je=n)}var qe,Xe={exports:{}};function Ze(){return qe||(qe=1,function(e,t){var r=s,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),i(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(Xe,Xe.exports)),Xe.exports}var Ge,Ye={};function Ke(){if(Ge)return Ye;function e(e){return Object.prototype.toString.call(e)}return Ge=1,Ye.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},Ye.isBoolean=function(e){return"boolean"==typeof e},Ye.isNull=function(e){return null===e},Ye.isNullOrUndefined=function(e){return null==e},Ye.isNumber=function(e){return"number"==typeof e},Ye.isString=function(e){return"string"==typeof e},Ye.isSymbol=function(e){return"symbol"==typeof e},Ye.isUndefined=function(e){return void 0===e},Ye.isRegExp=function(t){return"[object RegExp]"===e(t)},Ye.isObject=function(e){return"object"==typeof e&&null!==e},Ye.isDate=function(t){return"[object Date]"===e(t)},Ye.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},Ye.isFunction=function(e){return"function"==typeof e},Ye.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},Ye.isBuffer=s.Buffer.isBuffer,Ye}var Qe,Je,et={exports:{}},tt={exports:{}};function rt(){if(Je)return et.exports;Je=1;try{var e=require("util");if("function"!=typeof e.inherits)throw"";et.exports=e.inherits}catch(e){et.exports=(Qe||(Qe=1,"function"==typeof Object.create?tt.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:tt.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),tt.exports)}return et.exports}var nt,it,st,ot,at,lt,ht,ut,ct,ft={exports:{}};function dt(){return nt||(nt=1,function(e){var t=Ze().Buffer,r=o;function n(e,t,r){e.copy(t,r)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return t.alloc(0);for(var r=t.allocUnsafe(e>>>0),i=this.head,s=0;i;)n(i.data,r,s),s+=i.data.length,i=i.next;return r},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})}(ft)),ft.exports}function pt(){if(st)return it;st=1;var e=Ve();function t(e,t){e.emit("error",t)}return it={destroy:function(r,n){var i=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(n?n(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(t,this,r)):e.nextTick(t,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,(function(r){!n&&r?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,e.nextTick(t,i,r)):e.nextTick(t,i,r):n&&n(r)})),this)},undestroy:function(){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)}},it}function mt(){return at?ot:(at=1,ot=o.deprecate)}function gt(){if(ht)return lt;ht=1;var e=Ve();function t(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}lt=d;var r,n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:e.nextTick;d.WritableState=f;var i=Object.create(Ke());i.inherits=rt();var s={deprecate:mt()},o=We(),a=Ze().Buffer,l=(void 0!==p?p:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h,u=pt();function c(){}function f(i,s){r=r||yt(),i=i||{};var o=s instanceof r;this.objectMode=!!i.objectMode,o&&(this.objectMode=this.objectMode||!!i.writableObjectMode);var a=i.highWaterMark,l=i.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:o&&(l||0===l)?l:h,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 u=!1===i.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,r){var i=t._writableState,s=i.sync,o=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),r)!function(t,r,n,i,s){--r.pendingcb,n?(e.nextTick(s,i),e.nextTick(b,t,r),t._writableState.errorEmitted=!0,t.emit("error",i)):(s(i),t._writableState.errorEmitted=!0,t.emit("error",i),b(t,r))}(t,i,s,r,o);else{var a=v(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||y(t,i),s?n(g,t,i,a,o):g(t,i,a,o)}}(s,t)},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 t(this)}function d(e){if(r=r||yt(),!(h.call(d,this)||this instanceof r))return new d(e);this._writableState=new f(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function m(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function g(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),b(e,t)}function y(e,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(e._writev&&n&&n.next){var i=r.bufferedRequestCount,s=new Array(i),o=r.corkedRequestsFree;o.entry=n;for(var a=0,l=!0;n;)s[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;s.allBuffers=l,m(e,r,!0,r.length,s,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new t(r),r.bufferedRequestCount=0}else{for(;n;){var h=n.chunk,u=n.encoding,c=n.callback;if(m(e,r,!1,r.objectMode?1:h.length,h,u,c),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),b(e,t)}))}function b(t,r){var n=v(r);return n&&(!function(t,r){r.prefinished||r.finalCalled||("function"==typeof t._final?(r.pendingcb++,r.finalCalled=!0,e.nextTick(_,t,r)):(r.prefinished=!0,t.emit("prefinish")))}(t,r),0===r.pendingcb&&(r.finished=!0,t.emit("finish"))),n}return i.inherits(d,o),f.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(f.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===d&&(e&&e._writableState instanceof f)}})):h=function(e){return e instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,r,n){var i,s=this._writableState,o=!1,h=!s.objectMode&&(i=t,a.isBuffer(i)||i instanceof l);return h&&!a.isBuffer(t)&&(t=function(e){return a.from(e)}(t)),"function"==typeof r&&(n=r,r=null),h?r="buffer":r||(r=s.defaultEncoding),"function"!=typeof n&&(n=c),s.ended?function(t,r){var n=new Error("write after end");t.emit("error",n),e.nextTick(r,n)}(this,n):(h||function(t,r,n,i){var s=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||r.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),e.nextTick(i,o),s=!1),s}(this,s,t,n))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var l=t.objectMode?1:n.length;t.length+=l;var h=t.length<t.highWaterMark;h||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,l,n,i,s);return h}(this,s,h,t,r,n)),o},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||y(this,e))},d.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(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},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,r,n){var i=this._writableState;"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),null!=t&&this.write(t,r),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,r,n){r.ending=!0,b(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n));r.ended=!0,t.writable=!1}(this,i,n)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),d.prototype.destroy=u.destroy,d.prototype._undestroy=u.undestroy,d.prototype._destroy=function(e,t){this.end(),t(e)},lt}function yt(){if(ct)return ut;ct=1;var e=Ve(),t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};ut=l;var r=Object.create(Ke());r.inherits=rt();var n=Ot(),i=gt();r.inherits(l,n);for(var s=t(i.prototype),o=0;o<s.length;o++){var a=s[o];l.prototype[a]||(l.prototype[a]=i.prototype[a])}function l(e){if(!(this instanceof l))return new l(e);n.call(this,e),i.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||e.nextTick(u,this)}function u(e){e.end()}return Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),l.prototype._destroy=function(t,r){this.push(null),this.end(),e.nextTick(r,t)},ut}var vt,_t,bt,wt,xt,kt,St,Et,Tt={};function Ct(){if(vt)return Tt;vt=1;var e=Ze().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.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 r(r){var n;switch(this.encoding=function(r){var n=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=s,this.end=o,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=a,this.end=l,n=3;break;default:return this.write=h,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function o(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function a(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}return Tt.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var s=n(t[i]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--i<r||-2===s)return 0;if(s=n(t[i]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--i<r||-2===s)return 0;if(s=n(t[i]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},Tt}function Ot(){if(bt)return _t;bt=1;var e=Ve();_t=v;var t,r=function(){if(De)return Fe;De=1;var e={}.toString;return Fe=Array.isArray||function(t){return"[object Array]"==e.call(t)}}();v.ReadableState=y,i.EventEmitter;var n=function(e,t){return e.listeners(t).length},s=We(),a=Ze().Buffer,l=(void 0!==p?p:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h=Object.create(Ke());h.inherits=rt();var u=o,c=void 0;c=u&&u.debuglog?u.debuglog("stream"):function(){};var f,d=dt(),m=pt();h.inherits(v,s);var g=["error","close","destroy","pause","resume"];function y(e,r){e=e||{};var n=r instanceof(t=t||yt());this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=Ct().StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function v(e){if(t=t||yt(),!(this instanceof v))return new v(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function _(e,t,r,n,i){var s,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,o)):(i||(s=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):b(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?b(e,o,t,!1):E(e,o)):b(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function b(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),E(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},v.prototype.unshift=function(e){return _(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return f||(f=Ct().StringDecoder),this._readableState.decoder=new f(e),this._readableState.encoding=e,this};var w=8388608;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=w?e=w:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(c("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(S,t):S(t))}function S(e){c("emit readable"),e.emit("readable"),R(e)}function E(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(T,t,r))}function T(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(c("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function C(e){c("readable nexttick read 0"),e.read(0)}function O(e,t){t.reading||(c("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function A(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=a.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),0===(e-=o)){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function N(t){var r=t._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,e.nextTick(I,r,t))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return v.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?N(this):k(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&N(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(r,t))),null===(n=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&N(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,i){var s=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,c("pipe count=%d opts=%j",o.pipesCount,i);var a=(!i||!1!==i.end)&&t!==process.stdout&&t!==process.stderr?h:v;function l(e,r){c("onunpipe"),e===s&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",m),t.removeListener("unpipe",l),s.removeListener("end",h),s.removeListener("end",v),s.removeListener("data",p),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function h(){c("onend"),t.end()}o.endEmitted?e.nextTick(a):s.once("end",a),t.on("unpipe",l);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n(e,"data")&&(t.flowing=!0,R(e))}}(s);t.on("drain",u);var f=!1;var d=!1;function p(e){c("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==P(o.pipes,t))&&!f&&(c("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),s.pause())}function m(e){c("onerror",e),v(),t.removeListener("error",m),0===n(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",y),v()}function y(){c("onfinish"),t.removeListener("close",g),v()}function v(){c("unpipe"),s.unpipe(t)}return s.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",m),t.once("close",g),t.once("finish",y),t.emit("pipe",s),o.flowing||(c("pipe resume"),s.resume()),t},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=P(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},v.prototype.on=function(t,r){var n=s.prototype.on.call(this,t,r);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&k(this):e.nextTick(C,this))}return n},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!0,function(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(O,t,r))}(this,t)),this},v.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=A,_t}function Rt(){if(xt)return wt;xt=1,wt=n;var e=yt(),t=Object.create(Ke());function r(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function n(t){if(!(this instanceof n))return new n(t);e.call(this,t),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",i)}function i(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){s(e,t,r)})):s(this,null,null)}function s(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}return t.inherits=rt(),t.inherits(n,e),n.prototype.push=function(t,r){return this._transformState.needTransform=!1,e.prototype.push.call(this,t,r)},n.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},n.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},n.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},n.prototype._destroy=function(t,r){var n=this;e.prototype._destroy.call(this,t,(function(e){r(e),n.emit("close")}))},wt}function At(){return Et||(Et=1,function(e,t){var r=n;"disable"===process.env.READABLE_STREAM&&r?(e.exports=r,(t=e.exports=r.Readable).Readable=r.Readable,t.Writable=r.Writable,t.Duplex=r.Duplex,t.Transform=r.Transform,t.PassThrough=r.PassThrough,t.Stream=r):((t=e.exports=Ot()).Stream=r||t,t.Readable=t,t.Writable=gt(),t.Duplex=yt(),t.Transform=Rt(),t.PassThrough=function(){if(St)return kt;St=1,kt=r;var e=Rt(),t=Object.create(Ke());function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t.inherits=rt(),t.inherits(r,e),r.prototype._transform=function(e,t,r){r(null,e)},kt}())}(He,He.exports)),He.exports}if($e.base64=!0,$e.array=!0,$e.string=!0,$e.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,$e.nodebuffer="undefined"!=typeof Buffer,$e.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)$e.blob=!1;else{var Nt=new ArrayBuffer(0);try{$e.blob=0===new Blob([Nt],{type:"application/zip"}).size}catch(e){try{var It=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);It.append(Nt),$e.blob=0===It.getBlob("application/zip").size}catch(e){$e.blob=!1}}}try{$e.nodestream=!!At().Readable}catch(e){$e.nodestream=!1}var Pt,Ft={};function Dt(){if(Pt)return Ft;Pt=1;var e=Vt(),t=$e,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return Ft.encode=function(t){for(var n,i,s,o,a,l,h,u=[],c=0,f=t.length,d=f,p="string"!==e.getTypeOf(t);c<t.length;)d=f-c,p?(n=t[c++],i=c<f?t[c++]:0,s=c<f?t[c++]:0):(n=t.charCodeAt(c++),i=c<f?t.charCodeAt(c++):0,s=c<f?t.charCodeAt(c++):0),o=n>>2,a=(3&n)<<4|i>>4,l=d>1?(15&i)<<2|s>>6:64,h=d>2?63&s:64,u.push(r.charAt(o)+r.charAt(a)+r.charAt(l)+r.charAt(h));return u.join("")},Ft.decode=function(e){var n,i,s,o,a,l,h=0,u=0,c="data:";if(e.substr(0,5)===c)throw new Error("Invalid base64 input, it looks like a data url.");var f,d=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===r.charAt(64)&&d--,e.charAt(e.length-2)===r.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(f=t.uint8array?new Uint8Array(0|d):new Array(0|d);h<e.length;)n=r.indexOf(e.charAt(h++))<<2|(o=r.indexOf(e.charAt(h++)))>>4,i=(15&o)<<4|(a=r.indexOf(e.charAt(h++)))>>2,s=(3&a)<<6|(l=r.indexOf(e.charAt(h++))),f[u++]=n,64!==a&&(f[u++]=i),64!==l&&(f[u++]=s);return f},Ft}var jt,Mt,Lt,Bt,zt={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}};var $t=null;$t="undefined"!=typeof Promise?Promise:function(){if(Bt)return Lt;Bt=1;var e=function(){if(Mt)return jt;Mt=1;var e,t,r=p.MutationObserver||p.WebKitMutationObserver;if(process.browser)if(r){var n=0,i=new r(l),s=p.document.createTextNode("");i.observe(s,{characterData:!0}),e=function(){s.data=n=++n%2}}else if(p.setImmediate||void 0===p.MessageChannel)e="document"in p&&"onreadystatechange"in p.document.createElement("script")?function(){var e=p.document.createElement("script");e.onreadystatechange=function(){l(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},p.document.documentElement.appendChild(e)}:function(){setTimeout(l,0)};else{var o=new p.MessageChannel;o.port1.onmessage=l,e=function(){o.port2.postMessage(0)}}else e=function(){process.nextTick(l)};var a=[];function l(){var e,r;t=!0;for(var n=a.length;n;){for(r=a,a=[],e=-1;++e<n;)r[e]();n=a.length}t=!1}return jt=function(r){1!==a.push(r)||t||e()}}();function t(){}var r={},n=["REJECTED"],i=["FULFILLED"],s=["PENDING"];if(!process.browser)var o=["UNHANDLED"];function a(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=s,this.queue=[],this.outcome=void 0,process.browser||(this.handled=o),e!==t&&c(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function h(t,n,i){e((function(){var e;try{e=n(i)}catch(e){return r.reject(t,e)}e===t?r.reject(t,new TypeError("Cannot resolve promise with itself")):r.resolve(t,e)}))}function u(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function c(e,t){var n=!1;function i(t){n||(n=!0,r.reject(e,t))}function s(t){n||(n=!0,r.resolve(e,t))}var o=f((function(){t(s,i)}));"error"===o.status&&i(o.value)}function f(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}return Lt=a,a.prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,r){if("function"!=typeof e&&this.state===i||"function"!=typeof r&&this.state===n)return this;var a=new this.constructor(t);return process.browser||this.handled===o&&(this.handled=null),this.state!==s?h(a,this.state===i?e:r,this.outcome):this.queue.push(new l(a,e,r)),a},l.prototype.callFulfilled=function(e){r.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){r.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},r.resolve=function(e,t){var n=f(u,t);if("error"===n.status)return r.reject(e,n.value);var s=n.value;if(s)c(e,s);else{e.state=i,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e},r.reject=function(t,r){t.state=n,t.outcome=r,process.browser||t.handled===o&&e((function(){t.handled===o&&process.emit("unhandledRejection",r,t)}));for(var i=-1,s=t.queue.length;++i<s;)t.queue[i].callRejected(r);return t},a.resolve=function(e){return e instanceof this?e:r.resolve(new this(t),e)},a.reject=function(e){var n=new this(t);return r.reject(n,e)},a.all=function(e){var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,s=!1;if(!i)return this.resolve([]);for(var o=new Array(i),a=0,l=-1,h=new this(t);++l<i;)u(e[l],l);return h;function u(e,t){n.resolve(e).then((function(e){o[t]=e,++a!==i||s||(s=!0,r.resolve(h,o))}),(function(e){s||(s=!0,r.reject(h,e))}))}},a.race=function(e){var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,s=!1;if(!i)return this.resolve([]);for(var o,a=-1,l=new this(t);++a<i;)o=e[a],n.resolve(o).then((function(e){s||(s=!0,r.resolve(l,e))}),(function(e){s||(s=!0,r.reject(l,e))}));return l},Lt}();var Ht,Ut={Promise:$t};function Vt(){return Ht||(Ht=1,function(e){var t=$e,r=Dt(),n=zt,i=Ut;function s(e){return e}function o(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e.newBlob=function(t,r){e.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var a={stringifyByChunk:function(e,t,r){var n=[],i=0,s=e.length;if(s<=r)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,s)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,s)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return t.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return t.nodebuffer&&1===String.fromCharCode.apply(null,n.allocBuffer(1)).length}catch(e){return!1}}()}};function l(t){var r=65536,n=e.getTypeOf(t),i=!0;if("uint8array"===n?i=a.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=a.applyCanBeUsed.nodebuffer),i)for(;r>1;)try{return a.stringifyByChunk(t,n,r)}catch(e){r=Math.floor(r/2)}return a.stringifyByChar(t)}function h(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}e.applyFromCharCode=l;var u={};u.string={string:s,array:function(e){return o(e,new Array(e.length))},arraybuffer:function(e){return u.string.uint8array(e).buffer},uint8array:function(e){return o(e,new Uint8Array(e.length))},nodebuffer:function(e){return o(e,n.allocBuffer(e.length))}},u.array={string:l,array:s,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return n.newBufferFrom(e)}},u.arraybuffer={string:function(e){return l(new Uint8Array(e))},array:function(e){return h(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:s,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return n.newBufferFrom(new Uint8Array(e))}},u.uint8array={string:l,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return n.newBufferFrom(e)}},u.nodebuffer={string:l,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return u.nodebuffer.uint8array(e).buffer},uint8array:function(e){return h(e,new Uint8Array(e.length))},nodebuffer:s},e.transformTo=function(t,r){if(r||(r=""),!t)return r;e.checkSupport(t);var n=e.getTypeOf(r);return u[n][t](r)},e.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i))}return r.join("/")},e.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":t.nodebuffer&&n.isBuffer(e)?"nodebuffer":t.uint8array&&e instanceof Uint8Array?"uint8array":t.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},e.checkSupport=function(e){if(!t[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},e.delay=function(e,t,r){setImmediate((function(){e.apply(r||null,t||[])}))},e.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r},e.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},e.prepareContent=function(n,s,a,l,h){var u=i.Promise.resolve(s).then((function(e){return t.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new i.Promise((function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)})):e}));return u.then((function(s){var u,c=e.getTypeOf(s);return c?("arraybuffer"===c?s=e.transformTo("uint8array",s):"string"===c&&(h?s=r.decode(s):a&&!0!==l&&(s=o(u=s,t.uint8array?new Uint8Array(u.length):new Array(u.length)))),s):i.Promise.reject(new Error("Can't read the data of '"+n+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}}(ze)),ze}function Wt(e){this.name=e||"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}!function(e,t){if(!e.setImmediate){var r,n,i,s,o,a=1,l={},h=!1,u=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?r=function(e){process.nextTick((function(){d(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(n=u.documentElement,r=function(e){var t=u.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),r=function(t){e.postMessage(s+t,"*")}),c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return l[a]=i,r(a),a++},c.clearImmediate=f}function f(e){delete l[e]}function d(e){if(h)setTimeout(d,0,e);else{var r=l[e];if(r){h=!0;try{!function(e){var r=e.callback,n=e.args;switch(n.length){case 0:r();break;case 1:r(n[0]);break;case 2:r(n[0],n[1]);break;case 3:r(n[0],n[1],n[2]);break;default:r.apply(t,n)}}(r)}finally{f(e),h=!1}}}}}("undefined"==typeof self?p:self),Wt.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},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 e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};var qt=Wt;!function(e){for(var t=Vt(),r=$e,n=zt,i=qt,s=new Array(256),o=0;o<256;o++)s[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;s[254]=s[254]=1;function a(){i.call(this,"utf-8 decode"),this.leftOver=null}function l(){i.call(this,"utf-8 encode")}e.utf8encode=function(e){return r.nodebuffer?n.newBufferFrom(e,"utf-8"):function(e){var t,n,i,s,o,a=e.length,l=0;for(s=0;s<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=r.uint8array?new Uint8Array(l):new Array(l),o=0,s=0;o<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t}(e)},e.utf8decode=function(e){return r.nodebuffer?t.transformTo("nodebuffer",e).toString("utf-8"):function(e){var r,n,i,o,a=e.length,l=new Array(2*a);for(n=0,r=0;r<a;)if((i=e[r++])<128)l[n++]=i;else if((o=s[i])>4)l[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r<a;)i=i<<6|63&e[r++],o--;o>1?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),t.applyFromCharCode(l)}(e=t.transformTo(r.uint8array?"uint8array":"array",e))},t.inherits(a,i),a.prototype.processChunk=function(n){var i=t.transformTo(r.uint8array?"uint8array":"array",n.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=i;(i=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),i.set(o,this.leftOver.length)}else i=this.leftOver.concat(i);this.leftOver=null}var a=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}(i),l=i;a!==i.length&&(r.uint8array?(l=i.subarray(0,a),this.leftOver=i.subarray(a,i.length)):(l=i.slice(0,a),this.leftOver=i.slice(a,i.length))),this.push({data:e.utf8decode(l),meta:n.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=a,t.inherits(l,i),l.prototype.processChunk=function(t){this.push({data:e.utf8encode(t.data),meta:t.meta})},e.Utf8EncodeWorker=l}(Be);var Xt=qt,Zt=Vt();function Gt(e){Xt.call(this,"ConvertWorker to "+e),this.destType=e}Zt.inherits(Gt,Xt),Gt.prototype.processChunk=function(e){this.push({data:Zt.transformTo(this.destType,e.data),meta:e.meta})};var Yt,Kt,Qt=Gt;var Jt=Vt(),er=Qt,tr=qt,rr=Dt(),nr=Ut,ir=null;if($e.nodestream)try{ir=function(){if(Kt)return Yt;Kt=1;var e=At().Readable;function t(t,r,n){e.call(this,r),this._helper=t;var i=this;t.on("data",(function(e,t){i.push(e)||i._helper.pause(),n&&n(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}return Vt().inherits(t,e),t.prototype._read=function(){this._helper.resume()},Yt=t}()}catch(e){}function sr(e,t){return new nr.Promise((function(r,n){var i=[],s=e._internalType,o=e._outputType,a=e._mimeType;e.on("data",(function(e,r){i.push(e),t&&t(r)})).on("error",(function(e){i=[],n(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return Jt.newBlob(Jt.transformTo("arraybuffer",t),r);case"base64":return rr.encode(t);default:return Jt.transformTo(e,t)}}(o,function(e,t){var r,n=0,i=null,s=0;for(r=0;r<t.length;r++)s+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(s),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(s,i),a);r(e)}catch(e){n(e)}i=[]})).resume()}))}function or(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=t,this._mimeType=r,Jt.checkSupport(n),this._worker=e.pipe(new er(n)),e.lock()}catch(e){this._worker=new tr("error"),this._worker.error(e)}}or.prototype={accumulate:function(e){return sr(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,(function(e){t.call(r,e.data,e.meta)})):this._worker.on(e,(function(){Jt.delay(t,arguments,r)})),this},resume:function(){return Jt.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Jt.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new ir(this,{objectMode:"nodebuffer"!==this._outputType},e)}};var ar=or,lr={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null},hr=Vt(),ur=qt;function cr(e){ur.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=hr.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}hr.inherits(cr,ur),cr.prototype.cleanUp=function(){ur.prototype.cleanUp.call(this),this.data=null},cr.prototype.resume=function(){return!!ur.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,hr.delay(this._tickAndRepeat,[],this)),!0)},cr.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(hr.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},cr.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};var fr=cr,dr=Vt();var pr=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();var mr=function(e,t){return void 0!==e&&e.length?"string"!==dr.getTypeOf(e)?function(e,t,r,n){var i=pr,s=n+r;e^=-1;for(var o=n;o<s;o++)e=e>>>8^i[255&(e^t[o])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=pr,s=n+r;e^=-1;for(var o=n;o<s;o++)e=e>>>8^i[255&(e^t.charCodeAt(o))];return-1^e}(0|t,e,e.length,0):0},gr=qt,yr=mr;function vr(){gr.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}Vt().inherits(vr,gr),vr.prototype.processChunk=function(e){this.streamInfo.crc32=yr(e.data,this.streamInfo.crc32||0),this.push(e)};var _r=vr,br=Vt(),wr=qt;function xr(e){wr.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}br.inherits(xr,wr),xr.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}wr.prototype.processChunk.call(this,e)};var kr=Ut,Sr=fr,Er=_r,Tr=xr;function Cr(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}Cr.prototype={getContentWorker:function(){var e=new Sr(kr.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Tr("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new Sr(kr.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Cr.createWorkerFrom=function(e,t,r){return e.pipe(new Er).pipe(new Tr("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new Tr("compressedSize")).withStreamInfo("compression",t)};var Or=Cr,Rr=ar,Ar=fr,Nr=Be,Ir=Or,Pr=qt,Fr=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};Fr.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new Nr.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new Nr.Utf8DecodeWorker))}catch(e){(t=new Pr("error")).error(e)}return new Rr(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Ir&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new Nr.Utf8EncodeWorker)),Ir.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof Ir?this._data.getContentWorker():this._data instanceof Pr?this._data:new Ar(this._data)}};for(var Dr=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],jr=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Mr=0;Mr<Dr.length;Mr++)Fr.prototype[Dr[Mr]]=jr;var Lr=Fr,Br={},zr={},$r={},Hr={};!function(e){var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){var t,r,n,i,s,o;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(o=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)s=e[t],o.set(s,i),i+=s.length;return o}},i={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){return[].concat.apply([],e)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)}(Hr);var Ur={},Vr={},Wr={},qr=Hr,Xr=0,Zr=1;function Gr(e){for(var t=e.length;--t>=0;)e[t]=0}var Yr=0,Kr=29,Qr=256,Jr=Qr+1+Kr,en=30,tn=19,rn=2*Jr+1,nn=15,sn=16,on=7,an=256,ln=16,hn=17,un=18,cn=[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],fn=[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],dn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],pn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],mn=new Array(2*(Jr+2));Gr(mn);var gn=new Array(2*en);Gr(gn);var yn=new Array(512);Gr(yn);var vn=new Array(256);Gr(vn);var _n=new Array(Kr);Gr(_n);var bn,wn,xn,kn=new Array(en);function Sn(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function En(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Tn(e){return e<256?yn[e]:yn[256+(e>>>7)]}function Cn(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function On(e,t,r){e.bi_valid>sn-r?(e.bi_buf|=t<<e.bi_valid&65535,Cn(e,e.bi_buf),e.bi_buf=t>>sn-e.bi_valid,e.bi_valid+=r-sn):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function Rn(e,t,r){On(e,r[2*t],r[2*t+1])}function An(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function Nn(e,t,r){var n,i,s=new Array(nn+1),o=0;for(n=1;n<=nn;n++)s[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=An(s[a]++,a))}}function In(e){var t;for(t=0;t<Jr;t++)e.dyn_ltree[2*t]=0;for(t=0;t<en;t++)e.dyn_dtree[2*t]=0;for(t=0;t<tn;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*an]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Pn(e){e.bi_valid>8?Cn(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Fn(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function Dn(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&Fn(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Fn(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function jn(e,t,r){var n,i,s,o,a=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*a]<<8|e.pending_buf[e.d_buf+2*a+1],i=e.pending_buf[e.l_buf+a],a++,0===n?Rn(e,i,t):(Rn(e,(s=vn[i])+Qr+1,t),0!==(o=cn[s])&&On(e,i-=_n[s],o),Rn(e,s=Tn(--n),r),0!==(o=fn[s])&&On(e,n-=kn[s],o))}while(a<e.last_lit);Rn(e,an,t)}function Mn(e,t){var r,n,i,s=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,h=-1;for(e.heap_len=0,e.heap_max=rn,r=0;r<l;r++)0!==s[2*r]?(e.heap[++e.heap_len]=h=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=h<2?++h:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=o[2*i+1]);for(t.max_code=h,r=e.heap_len>>1;r>=1;r--)Dn(e,s,r);i=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Dn(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,Dn(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,o,a,l=t.dyn_tree,h=t.max_code,u=t.stat_desc.static_tree,c=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=nn;s++)e.bl_count[s]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<rn;r++)(s=l[2*l[2*(n=e.heap[r])+1]+1]+1)>p&&(s=p,m++),l[2*n+1]=s,n>h||(e.bl_count[s]++,o=0,n>=d&&(o=f[n-d]),a=l[2*n],e.opt_len+=a*(s+o),c&&(e.static_len+=a*(u[2*n+1]+o)));if(0!==m){do{for(s=p-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(s=p;0!==s;s--)for(n=e.bl_count[s];0!==n;)(i=e.heap[--r])>h||(l[2*i+1]!==s&&(e.opt_len+=(s-l[2*i+1])*l[2*i],l[2*i+1]=s),n--)}}(e,t),Nn(s,h,e.bl_count)}function Ln(e,t,r){var n,i,s=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++a<l&&i===o||(a<h?e.bl_tree[2*i]+=a:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[2*ln]++):a<=10?e.bl_tree[2*hn]++:e.bl_tree[2*un]++,a=0,s=i,0===o?(l=138,h=3):i===o?(l=6,h=3):(l=7,h=4))}function Bn(e,t,r){var n,i,s=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),n=0;n<=r;n++)if(i=o,o=t[2*(n+1)+1],!(++a<l&&i===o)){if(a<h)do{Rn(e,i,e.bl_tree)}while(0!=--a);else 0!==i?(i!==s&&(Rn(e,i,e.bl_tree),a--),Rn(e,ln,e.bl_tree),On(e,a-3,2)):a<=10?(Rn(e,hn,e.bl_tree),On(e,a-3,3)):(Rn(e,un,e.bl_tree),On(e,a-11,7));a=0,s=i,0===o?(l=138,h=3):i===o?(l=6,h=3):(l=7,h=4)}}Gr(kn);var zn=!1;function $n(e,t,r,n){On(e,(Yr<<1)+(n?1:0),3),function(e,t,r,n){Pn(e),n&&(Cn(e,r),Cn(e,~r)),qr.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}Wr._tr_init=function(e){zn||(!function(){var e,t,r,n,i,s=new Array(nn+1);for(r=0,n=0;n<Kr-1;n++)for(_n[n]=r,e=0;e<1<<cn[n];e++)vn[r++]=n;for(vn[r-1]=n,i=0,n=0;n<16;n++)for(kn[n]=i,e=0;e<1<<fn[n];e++)yn[i++]=n;for(i>>=7;n<en;n++)for(kn[n]=i<<7,e=0;e<1<<fn[n]-7;e++)yn[256+i++]=n;for(t=0;t<=nn;t++)s[t]=0;for(e=0;e<=143;)mn[2*e+1]=8,e++,s[8]++;for(;e<=255;)mn[2*e+1]=9,e++,s[9]++;for(;e<=279;)mn[2*e+1]=7,e++,s[7]++;for(;e<=287;)mn[2*e+1]=8,e++,s[8]++;for(Nn(mn,Jr+1,s),e=0;e<en;e++)gn[2*e+1]=5,gn[2*e]=An(e,5);bn=new Sn(mn,cn,Qr+1,Jr,nn),wn=new Sn(gn,fn,0,en,nn),xn=new Sn(new Array(0),dn,0,tn,on)}(),zn=!0),e.l_desc=new En(e.dyn_ltree,bn),e.d_desc=new En(e.dyn_dtree,wn),e.bl_desc=new En(e.bl_tree,xn),e.bi_buf=0,e.bi_valid=0,In(e)},Wr._tr_stored_block=$n,Wr._tr_flush_block=function(e,t,r,n){var i,s,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return Xr;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Zr;for(t=32;t<Qr;t++)if(0!==e.dyn_ltree[2*t])return Zr;return Xr}(e)),Mn(e,e.l_desc),Mn(e,e.d_desc),o=function(e){var t;for(Ln(e,e.dyn_ltree,e.l_desc.max_code),Ln(e,e.dyn_dtree,e.d_desc.max_code),Mn(e,e.bl_desc),t=tn-1;t>=3&&0===e.bl_tree[2*pn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?$n(e,t,r,n):4===e.strategy||s===i?(On(e,2+(n?1:0),3),jn(e,mn,gn)):(On(e,4+(n?1:0),3),function(e,t,r,n){var i;for(On(e,t-257,5),On(e,r-1,5),On(e,n-4,4),i=0;i<n;i++)On(e,e.bl_tree[2*pn[i]+1],3);Bn(e,e.dyn_ltree,t-1),Bn(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),jn(e,e.dyn_ltree,e.dyn_dtree)),In(e),n&&Pn(e)},Wr._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(vn[r]+Qr+1)]++,e.dyn_dtree[2*Tn(t)]++),e.last_lit===e.lit_bufsize-1},Wr._tr_align=function(e){On(e,2,3),Rn(e,an,mn),function(e){16===e.bi_valid?(Cn(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)};var Hn=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{s=s+(i=i+t[n++]|0)|0}while(--o);i%=65521,s%=65521}return i|s<<16|0};var Un=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();var Vn,Wn=function(e,t,r,n){var i=Un,s=n+r;e^=-1;for(var o=n;o<s;o++)e=e>>>8^i[255&(e^t[o])];return-1^e},qn={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"},Xn=Hr,Zn=Wr,Gn=Hn,Yn=Wn,Kn=qn,Qn=0,Jn=4,ei=0,ti=-2,ri=-1,ni=4,ii=2,si=8,oi=9,ai=286,li=30,hi=19,ui=2*ai+1,ci=15,fi=3,di=258,pi=di+fi+1,mi=42,gi=103,yi=113,vi=666,_i=1,bi=2,wi=3,xi=4;function ki(e,t){return e.msg=Kn[t],t}function Si(e){return(e<<1)-(e>4?9:0)}function Ei(e){for(var t=e.length;--t>=0;)e[t]=0}function Ti(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(Xn.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function Ci(e,t){Zn._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ti(e.strm)}function Oi(e,t){e.pending_buf[e.pending++]=t}function Ri(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Ai(e,t){var r,n,i=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-pi?e.strstart-(e.w_size-pi):0,h=e.window,u=e.w_mask,c=e.prev,f=e.strstart+di,d=h[s+o-1],p=h[s+o];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(h[(r=t)+o]===p&&h[r+o-1]===d&&h[r]===h[s]&&h[++r]===h[s+1]){s+=2,r++;do{}while(h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&s<f);if(n=di-(f-s),s=f-di,n>o){if(e.match_start=t,o=n,n>=a)break;d=h[s+o-1],p=h[s+o]}}}while((t=c[t&u])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function Ni(e){var t,r,n,i,s,o,a,l,h,u,c=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=c+(c-pi)){Xn.arraySet(e.window,e.window,c,c,0),e.match_start-=c,e.strstart-=c,e.block_start-=c,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=c?n-c:0}while(--r);t=r=c;do{n=e.prev[--t],e.prev[t]=n>=c?n-c:0}while(--r);i+=c}if(0===e.strm.avail_in)break;if(o=e.strm,a=e.window,l=e.strstart+e.lookahead,h=i,u=void 0,(u=o.avail_in)>h&&(u=h),r=0===u?0:(o.avail_in-=u,Xn.arraySet(a,o.input,o.next_in,u,l),1===o.state.wrap?o.adler=Gn(o.adler,a,u,l):2===o.state.wrap&&(o.adler=Yn(o.adler,a,u,l)),o.next_in+=u,o.total_in+=u,u),e.lookahead+=r,e.lookahead+e.insert>=fi)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+fi-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<fi)););}while(e.lookahead<pi&&0!==e.strm.avail_in)}function Ii(e,t){for(var r,n;;){if(e.lookahead<pi){if(Ni(e),e.lookahead<pi&&t===Qn)return _i;if(0===e.lookahead)break}if(r=0,e.lookahead>=fi&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+fi-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-pi&&(e.match_length=Ai(e,r)),e.match_length>=fi)if(n=Zn._tr_tally(e,e.strstart-e.match_start,e.match_length-fi),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=fi){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+fi-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Zn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Ci(e,!1),0===e.strm.avail_out))return _i}return e.insert=e.strstart<fi-1?e.strstart:fi-1,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):e.last_lit&&(Ci(e,!1),0===e.strm.avail_out)?_i:bi}function Pi(e,t){for(var r,n,i;;){if(e.lookahead<pi){if(Ni(e),e.lookahead<pi&&t===Qn)return _i;if(0===e.lookahead)break}if(r=0,e.lookahead>=fi&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+fi-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=fi-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-pi&&(e.match_length=Ai(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===fi&&e.strstart-e.match_start>4096)&&(e.match_length=fi-1)),e.prev_length>=fi&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-fi,n=Zn._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-fi),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+fi-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=fi-1,e.strstart++,n&&(Ci(e,!1),0===e.strm.avail_out))return _i}else if(e.match_available){if((n=Zn._tr_tally(e,0,e.window[e.strstart-1]))&&Ci(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return _i}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Zn._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<fi-1?e.strstart:fi-1,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):e.last_lit&&(Ci(e,!1),0===e.strm.avail_out)?_i:bi}function Fi(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function Di(){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=si,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 Xn.Buf16(2*ui),this.dyn_dtree=new Xn.Buf16(2*(2*li+1)),this.bl_tree=new Xn.Buf16(2*(2*hi+1)),Ei(this.dyn_ltree),Ei(this.dyn_dtree),Ei(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Xn.Buf16(ci+1),this.heap=new Xn.Buf16(2*ai+1),Ei(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Xn.Buf16(2*ai+1),Ei(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 ji(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=ii,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?mi:yi,e.adler=2===t.wrap?0:1,t.last_flush=Qn,Zn._tr_init(t),ei):ki(e,ti)}function Mi(e){var t,r=ji(e);return r===ei&&((t=e.state).window_size=2*t.w_size,Ei(t.head),t.max_lazy_match=Vn[t.level].max_lazy,t.good_match=Vn[t.level].good_length,t.nice_match=Vn[t.level].nice_length,t.max_chain_length=Vn[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=fi-1,t.match_available=0,t.ins_h=0),r}function Li(e,t,r,n,i,s){if(!e)return ti;var o=1;if(t===ri&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),i<1||i>oi||r!==si||n<8||n>15||t<0||t>9||s<0||s>ni)return ki(e,ti);8===n&&(n=9);var a=new Di;return e.state=a,a.strm=e,a.wrap=o,a.gzhead=null,a.w_bits=n,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+fi-1)/fi),a.window=new Xn.Buf8(2*a.w_size),a.head=new Xn.Buf16(a.hash_size),a.prev=new Xn.Buf16(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Xn.Buf8(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=t,a.strategy=s,a.method=r,Mi(e)}Vn=[new Fi(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ni(e),0===e.lookahead&&t===Qn)return _i;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Ci(e,!1),0===e.strm.avail_out))return _i;if(e.strstart-e.block_start>=e.w_size-pi&&(Ci(e,!1),0===e.strm.avail_out))return _i}return e.insert=0,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):(e.strstart>e.block_start&&(Ci(e,!1),e.strm.avail_out),_i)})),new Fi(4,4,8,4,Ii),new Fi(4,5,16,8,Ii),new Fi(4,6,32,32,Ii),new Fi(4,4,16,16,Pi),new Fi(8,16,32,32,Pi),new Fi(8,16,128,128,Pi),new Fi(8,32,128,256,Pi),new Fi(32,128,258,1024,Pi),new Fi(32,258,258,4096,Pi)],Vr.deflateInit=function(e,t){return Li(e,t,si,15,8,0)},Vr.deflateInit2=Li,Vr.deflateReset=Mi,Vr.deflateResetKeep=ji,Vr.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?ti:(e.state.gzhead=t,ei):ti},Vr.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||t>5||t<0)return e?ki(e,ti):ti;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||n.status===vi&&t!==Jn)return ki(e,0===e.avail_out?-5:ti);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===mi)if(2===n.wrap)e.adler=0,Oi(n,31),Oi(n,139),Oi(n,8),n.gzhead?(Oi(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Oi(n,255&n.gzhead.time),Oi(n,n.gzhead.time>>8&255),Oi(n,n.gzhead.time>>16&255),Oi(n,n.gzhead.time>>24&255),Oi(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),Oi(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Oi(n,255&n.gzhead.extra.length),Oi(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Yn(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(Oi(n,0),Oi(n,0),Oi(n,0),Oi(n,0),Oi(n,0),Oi(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),Oi(n,3),n.status=yi);else{var o=si+(n.w_bits-8<<4)<<8;o|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(o|=32),o+=31-o%31,n.status=yi,Ri(n,o),0!==n.strstart&&(Ri(n,e.adler>>>16),Ri(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),Ti(e),i=n.pending,n.pending!==n.pending_buf_size));)Oi(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),Ti(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,Oi(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),Ti(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,Oi(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=gi)}else n.status=gi;if(n.status===gi&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Ti(e),n.pending+2<=n.pending_buf_size&&(Oi(n,255&e.adler),Oi(n,e.adler>>8&255),e.adler=0,n.status=yi)):n.status=yi),0!==n.pending){if(Ti(e),0===e.avail_out)return n.last_flush=-1,ei}else if(0===e.avail_in&&Si(t)<=Si(r)&&t!==Jn)return ki(e,-5);if(n.status===vi&&0!==e.avail_in)return ki(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==Qn&&n.status!==vi){var a=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(Ni(e),0===e.lookahead)){if(t===Qn)return _i;break}if(e.match_length=0,r=Zn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Ci(e,!1),0===e.strm.avail_out))return _i}return e.insert=0,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):e.last_lit&&(Ci(e,!1),0===e.strm.avail_out)?_i:bi}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,o=e.window;;){if(e.lookahead<=di){if(Ni(e),e.lookahead<=di&&t===Qn)return _i;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=fi&&e.strstart>0&&(n=o[i=e.strstart-1])===o[++i]&&n===o[++i]&&n===o[++i]){s=e.strstart+di;do{}while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<s);e.match_length=di-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=fi?(r=Zn._tr_tally(e,1,e.match_length-fi),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Zn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Ci(e,!1),0===e.strm.avail_out))return _i}return e.insert=0,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):e.last_lit&&(Ci(e,!1),0===e.strm.avail_out)?_i:bi}(n,t):Vn[n.level].func(n,t);if(a!==wi&&a!==xi||(n.status=vi),a===_i||a===wi)return 0===e.avail_out&&(n.last_flush=-1),ei;if(a===bi&&(1===t?Zn._tr_align(n):5!==t&&(Zn._tr_stored_block(n,0,0,!1),3===t&&(Ei(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Ti(e),0===e.avail_out))return n.last_flush=-1,ei}return t!==Jn?ei:n.wrap<=0?1:(2===n.wrap?(Oi(n,255&e.adler),Oi(n,e.adler>>8&255),Oi(n,e.adler>>16&255),Oi(n,e.adler>>24&255),Oi(n,255&e.total_in),Oi(n,e.total_in>>8&255),Oi(n,e.total_in>>16&255),Oi(n,e.total_in>>24&255)):(Ri(n,e.adler>>>16),Ri(n,65535&e.adler)),Ti(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?ei:1)},Vr.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==mi&&69!==t&&73!==t&&91!==t&&t!==gi&&t!==yi&&t!==vi?ki(e,ti):(e.state=null,t===yi?ki(e,-3):ei):ti},Vr.deflateSetDictionary=function(e,t){var r,n,i,s,o,a,l,h,u=t.length;if(!e||!e.state)return ti;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==mi||r.lookahead)return ti;for(1===s&&(e.adler=Gn(e.adler,t,u,0)),r.wrap=0,u>=r.w_size&&(0===s&&(Ei(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new Xn.Buf8(r.w_size),Xn.arraySet(h,t,u-r.w_size,r.w_size,0),t=h,u=r.w_size),o=e.avail_in,a=e.next_in,l=e.input,e.avail_in=u,e.next_in=0,e.input=t,Ni(r);r.lookahead>=fi;){n=r.strstart,i=r.lookahead-(fi-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+fi-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--i);r.strstart=n,r.lookahead=fi-1,Ni(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=fi-1,r.match_available=0,e.next_in=a,e.input=l,e.avail_in=o,r.wrap=s,ei},Vr.deflateInfo="pako deflate (from Nodeca project)";var Bi={},zi=Hr,$i=!0,Hi=!0;try{String.fromCharCode.apply(null,[0])}catch(e){$i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Hi=!1}for(var Ui=new zi.Buf8(256),Vi=0;Vi<256;Vi++)Ui[Vi]=Vi>=252?6:Vi>=248?5:Vi>=240?4:Vi>=224?3:Vi>=192?2:1;function Wi(e,t){if(t<65534&&(e.subarray&&Hi||!e.subarray&&$i))return String.fromCharCode.apply(null,zi.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Ui[254]=Ui[254]=1,Bi.string2buf=function(e){var t,r,n,i,s,o=e.length,a=0;for(i=0;i<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),a+=r<128?1:r<2048?2:r<65536?3:4;for(t=new zi.Buf8(a),s=0,i=0;s<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:r<2048?(t[s++]=192|r>>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},Bi.buf2binstring=function(e){return Wi(e,e.length)},Bi.binstring2buf=function(e){for(var t=new zi.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},Bi.buf2string=function(e,t){var r,n,i,s,o=t||e.length,a=new Array(2*o);for(n=0,r=0;r<o;)if((i=e[r++])<128)a[n++]=i;else if((s=Ui[i])>4)a[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&r<o;)i=i<<6|63&e[r++],s--;s>1?a[n++]=65533:i<65536?a[n++]=i:(i-=65536,a[n++]=55296|i>>10&1023,a[n++]=56320|1023&i)}return Wi(a,n)},Bi.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+Ui[e[r]]>t?r:t};var qi=function(){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},Xi=Vr,Zi=Hr,Gi=Bi,Yi=qn,Ki=qi,Qi=Object.prototype.toString,Ji=0,es=-1,ts=0,rs=8;function ns(e){if(!(this instanceof ns))return new ns(e);this.options=Zi.assign({level:es,method:rs,chunkSize:16384,windowBits:15,memLevel:8,strategy:ts,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ki,this.strm.avail_out=0;var r=Xi.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Ji)throw new Error(Yi[r]);if(t.header&&Xi.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"==typeof t.dictionary?Gi.string2buf(t.dictionary):"[object ArrayBuffer]"===Qi.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=Xi.deflateSetDictionary(this.strm,n))!==Ji)throw new Error(Yi[r]);this._dict_set=!0}}function is(e,t){var r=new ns(t);if(r.push(e,!0),r.err)throw r.msg||Yi[r.err];return r.result}ns.prototype.push=function(e,t){var r,n,i=this.strm,s=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=Gi.string2buf(e):"[object ArrayBuffer]"===Qi.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new Zi.Buf8(s),i.next_out=0,i.avail_out=s),1!==(r=Xi.deflate(i,n))&&r!==Ji)return this.onEnd(r),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(Gi.buf2binstring(Zi.shrinkBuf(i.output,i.next_out))):this.onData(Zi.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&1!==r);return 4===n?(r=Xi.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Ji):2!==n||(this.onEnd(Ji),i.avail_out=0,!0)},ns.prototype.onData=function(e){this.chunks.push(e)},ns.prototype.onEnd=function(e){e===Ji&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Zi.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},Ur.Deflate=ns,Ur.deflate=is,Ur.deflateRaw=function(e,t){return(t=t||{}).raw=!0,is(e,t)},Ur.gzip=function(e,t){return(t=t||{}).gzip=!0,is(e,t)};var ss={},os={},as=Hr,ls=15,hs=[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],us=[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],cs=[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],fs=[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],ds=Hr,ps=Hn,ms=Wn,gs=function(e,t){var r,n,i,s,o,a,l,h,u,c,f,d,p,m,g,y,v,_,b,w,x,k,S,E,T;r=e.state,n=e.next_in,E=e.input,i=n+(e.avail_in-5),s=e.next_out,T=e.output,o=s-(t-e.avail_out),a=s+(e.avail_out-257),l=r.dmax,h=r.wsize,u=r.whave,c=r.wnext,f=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,y=(1<<r.lenbits)-1,v=(1<<r.distbits)-1;e:do{p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=m[d&y];t:for(;;){if(d>>>=b=_>>>24,p-=b,0===(b=_>>>16&255))T[s++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=m[(65535&_)+(d&(1<<b)-1)];continue t}if(32&b){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&_,(b&=15)&&(p<b&&(d+=E[n++]<<p,p+=8),w+=d&(1<<b)-1,d>>>=b,p-=b),p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=g[d&v];r:for(;;){if(d>>>=b=_>>>24,p-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=g[(65535&_)+(d&(1<<b)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(x=65535&_,p<(b&=15)&&(d+=E[n++]<<p,(p+=8)<b&&(d+=E[n++]<<p,p+=8)),(x+=d&(1<<b)-1)>l){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=b,p-=b,x>(b=s-o)){if((b=x-b)>u&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(k=0,S=f,0===c){if(k+=h-b,b<w){w-=b;do{T[s++]=f[k++]}while(--b);k=s-x,S=T}}else if(c<b){if(k+=h+c-b,(b-=c)<w){w-=b;do{T[s++]=f[k++]}while(--b);if(k=0,c<w){w-=b=c;do{T[s++]=f[k++]}while(--b);k=s-x,S=T}}}else if(k+=c-b,b<w){w-=b;do{T[s++]=f[k++]}while(--b);k=s-x,S=T}for(;w>2;)T[s++]=S[k++],T[s++]=S[k++],T[s++]=S[k++],w-=3;w&&(T[s++]=S[k++],w>1&&(T[s++]=S[k++]))}else{k=s-x;do{T[s++]=T[k++],T[s++]=T[k++],T[s++]=T[k++],w-=3}while(w>2);w&&(T[s++]=T[k++],w>1&&(T[s++]=T[k++]))}break}}break}}while(n<i&&s<a);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=s<a?a-s+257:257-(s-a),r.hold=d,r.bits=p},ys=function(e,t,r,n,i,s,o,a){var l,h,u,c,f,d,p,m,g,y=a.bits,v=0,_=0,b=0,w=0,x=0,k=0,S=0,E=0,T=0,C=0,O=null,R=0,A=new as.Buf16(16),N=new as.Buf16(16),I=null,P=0;for(v=0;v<=ls;v++)A[v]=0;for(_=0;_<n;_++)A[t[r+_]]++;for(x=y,w=ls;w>=1&&0===A[w];w--);if(x>w&&(x=w),0===w)return i[s++]=20971520,i[s++]=20971520,a.bits=1,0;for(b=1;b<w&&0===A[b];b++);for(x<b&&(x=b),E=1,v=1;v<=ls;v++)if(E<<=1,(E-=A[v])<0)return-1;if(E>0&&(0===e||1!==w))return-1;for(N[1]=0,v=1;v<ls;v++)N[v+1]=N[v]+A[v];for(_=0;_<n;_++)0!==t[r+_]&&(o[N[t[r+_]]++]=_);if(0===e?(O=I=o,d=19):1===e?(O=hs,R-=257,I=us,P-=257,d=256):(O=cs,I=fs,d=-1),C=0,_=0,v=b,f=s,k=x,S=0,u=-1,c=(T=1<<x)-1,1===e&&T>852||2===e&&T>592)return 1;for(;;){p=v-S,o[_]<d?(m=0,g=o[_]):o[_]>d?(m=I[P+o[_]],g=O[R+o[_]]):(m=96,g=0),l=1<<v-S,b=h=1<<k;do{i[f+(C>>S)+(h-=l)]=p<<24|m<<16|g|0}while(0!==h);for(l=1<<v-1;C&l;)l>>=1;if(0!==l?(C&=l-1,C+=l):C=0,_++,0==--A[v]){if(v===w)break;v=t[r+o[_]]}if(v>x&&(C&c)!==u){for(0===S&&(S=x),f+=b,E=1<<(k=v-S);k+S<w&&!((E-=A[k+S])<=0);)k++,E<<=1;if(T+=1<<k,1===e&&T>852||2===e&&T>592)return 1;i[u=C&c]=x<<24|k<<16|f-s|0}}return 0!==C&&(i[f+C]=v-S<<24|64<<16|0),a.bits=x,0},vs=1,_s=2,bs=0,ws=-2,xs=1,ks=12,Ss=30,Es=852,Ts=592;function Cs(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function Os(){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 ds.Buf16(320),this.work=new ds.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Rs(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=xs,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new ds.Buf32(Es),t.distcode=t.distdyn=new ds.Buf32(Ts),t.sane=1,t.back=-1,bs):ws}function As(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,Rs(e)):ws}function Ns(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?ws:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,As(e))):ws}function Is(e,t){var r,n;return e?(n=new Os,e.state=n,n.window=null,(r=Ns(e,t))!==bs&&(e.state=null),r):ws}var Ps,Fs,Ds=!0;function js(e){if(Ds){var t;for(Ps=new ds.Buf32(512),Fs=new ds.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ys(vs,e.lens,0,288,Ps,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ys(_s,e.lens,0,32,Fs,0,e.work,{bits:5}),Ds=!1}e.lencode=Ps,e.lenbits=9,e.distcode=Fs,e.distbits=5}function Ms(e,t,r,n){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new ds.Buf8(s.wsize)),n>=s.wsize?(ds.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((i=s.wsize-s.wnext)>n&&(i=n),ds.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(ds.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}os.inflateReset=As,os.inflateReset2=Ns,os.inflateResetKeep=Rs,os.inflateInit=function(e){return Is(e,15)},os.inflateInit2=Is,os.inflate=function(e,t){var r,n,i,s,o,a,l,h,u,c,f,d,p,m,g,y,v,_,b,w,x,k,S,E,T=0,C=new ds.Buf8(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return ws;(r=e.state).mode===ks&&(r.mode=13),o=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,n=e.input,a=e.avail_in,h=r.hold,u=r.bits,c=a,f=l,k=bs;e:for(;;)switch(r.mode){case xs:if(0===r.wrap){r.mode=13;break}for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(2&r.wrap&&35615===h){r.check=0,C[0]=255&h,C[1]=h>>>8&255,r.check=ms(r.check,C,2,0),h=0,u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",r.mode=Ss;break}if(8!=(15&h)){e.msg="unknown compression method",r.mode=Ss;break}if(u-=4,x=8+(15&(h>>>=4)),0===r.wbits)r.wbits=x;else if(x>r.wbits){e.msg="invalid window size",r.mode=Ss;break}r.dmax=1<<x,e.adler=r.check=1,r.mode=512&h?10:ks,h=0,u=0;break;case 2:for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(r.flags=h,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=Ss;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=Ss;break}r.head&&(r.head.text=h>>8&1),512&r.flags&&(C[0]=255&h,C[1]=h>>>8&255,r.check=ms(r.check,C,2,0)),h=0,u=0,r.mode=3;case 3:for(;u<32;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.head&&(r.head.time=h),512&r.flags&&(C[0]=255&h,C[1]=h>>>8&255,C[2]=h>>>16&255,C[3]=h>>>24&255,r.check=ms(r.check,C,4,0)),h=0,u=0,r.mode=4;case 4:for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.head&&(r.head.xflags=255&h,r.head.os=h>>8),512&r.flags&&(C[0]=255&h,C[1]=h>>>8&255,r.check=ms(r.check,C,2,0)),h=0,u=0,r.mode=5;case 5:if(1024&r.flags){for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.length=h,r.head&&(r.head.extra_len=h),512&r.flags&&(C[0]=255&h,C[1]=h>>>8&255,r.check=ms(r.check,C,2,0)),h=0,u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((d=r.length)>a&&(d=a),d&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),ds.arraySet(r.head.extra,n,s,d,x)),512&r.flags&&(r.check=ms(r.check,n,d,s)),a-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===a)break e;d=0;do{x=n[s+d++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&d<a);if(512&r.flags&&(r.check=ms(r.check,n,d,s)),a-=d,s+=d,x)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===a)break e;d=0;do{x=n[s+d++],r.head&&x&&r.length<65536&&(r.head.comment+=String.fromCharCode(x))}while(x&&d<a);if(512&r.flags&&(r.check=ms(r.check,n,d,s)),a-=d,s+=d,x)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(h!==(65535&r.check)){e.msg="header crc mismatch",r.mode=Ss;break}h=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=ks;break;case 10:for(;u<32;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}e.adler=r.check=Cs(h),h=0,u=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,r.hold=h,r.bits=u,2;e.adler=r.check=1,r.mode=ks;case ks:if(5===t||6===t)break e;case 13:if(r.last){h>>>=7&u,u-=7&u,r.mode=27;break}for(;u<3;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}switch(r.last=1&h,u-=1,3&(h>>>=1)){case 0:r.mode=14;break;case 1:if(js(r),r.mode=20,6===t){h>>>=2,u-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=Ss}h>>>=2,u-=2;break;case 14:for(h>>>=7&u,u-=7&u;u<32;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if((65535&h)!=(h>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Ss;break}if(r.length=65535&h,h=0,u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(d>a&&(d=a),d>l&&(d=l),0===d)break e;ds.arraySet(i,n,s,d,o),a-=d,s+=d,l-=d,o+=d,r.length-=d;break}r.mode=ks;break;case 17:for(;u<14;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(r.nlen=257+(31&h),h>>>=5,u-=5,r.ndist=1+(31&h),h>>>=5,u-=5,r.ncode=4+(15&h),h>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Ss;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;u<3;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.lens[O[r.have++]]=7&h,h>>>=3,u-=3}for(;r.have<19;)r.lens[O[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},k=ys(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,k){e.msg="invalid code lengths set",r.mode=Ss;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;y=(T=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,v=65535&T,!((g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(v<16)h>>>=g,u-=g,r.lens[r.have++]=v;else{if(16===v){for(E=g+2;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(h>>>=g,u-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=Ss;break}x=r.lens[r.have-1],d=3+(3&h),h>>>=2,u-=2}else if(17===v){for(E=g+3;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}u-=g,x=0,d=3+(7&(h>>>=g)),h>>>=3,u-=3}else{for(E=g+7;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}u-=g,x=0,d=11+(127&(h>>>=g)),h>>>=7,u-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Ss;break}for(;d--;)r.lens[r.have++]=x}}if(r.mode===Ss)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=Ss;break}if(r.lenbits=9,S={bits:r.lenbits},k=ys(vs,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,k){e.msg="invalid literal/lengths set",r.mode=Ss;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},k=ys(_s,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,k){e.msg="invalid distances set",r.mode=Ss;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,r.hold=h,r.bits=u,gs(e,f),o=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,n=e.input,a=e.avail_in,h=r.hold,u=r.bits,r.mode===ks&&(r.back=-1);break}for(r.back=0;y=(T=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,v=65535&T,!((g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(y&&0==(240&y)){for(_=g,b=y,w=v;y=(T=r.lencode[w+((h&(1<<_+b)-1)>>_)])>>>16&255,v=65535&T,!(_+(g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}h>>>=_,u-=_,r.back+=_}if(h>>>=g,u-=g,r.back+=g,r.length=v,0===y){r.mode=26;break}if(32&y){r.back=-1,r.mode=ks;break}if(64&y){e.msg="invalid literal/length code",r.mode=Ss;break}r.extra=15&y,r.mode=22;case 22:if(r.extra){for(E=r.extra;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.length+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;y=(T=r.distcode[h&(1<<r.distbits)-1])>>>16&255,v=65535&T,!((g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(0==(240&y)){for(_=g,b=y,w=v;y=(T=r.distcode[w+((h&(1<<_+b)-1)>>_)])>>>16&255,v=65535&T,!(_+(g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}h>>>=_,u-=_,r.back+=_}if(h>>>=g,u-=g,r.back+=g,64&y){e.msg="invalid distance code",r.mode=Ss;break}r.offset=v,r.extra=15&y,r.mode=24;case 24:if(r.extra){for(E=r.extra;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.offset+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Ss;break}r.mode=25;case 25:if(0===l)break e;if(d=f-l,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Ss;break}d>r.wnext?(d-=r.wnext,p=r.wsize-d):p=r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=o-r.offset,d=r.length;d>l&&(d=l),l-=d,r.length-=d;do{i[o++]=m[p++]}while(--d);0===r.length&&(r.mode=21);break;case 26:if(0===l)break e;i[o++]=r.length,l--,r.mode=21;break;case 27:if(r.wrap){for(;u<32;){if(0===a)break e;a--,h|=n[s++]<<u,u+=8}if(f-=l,e.total_out+=f,r.total+=f,f&&(e.adler=r.check=r.flags?ms(r.check,i,f,o-f):ps(r.check,i,f,o-f)),f=l,(r.flags?h:Cs(h))!==r.check){e.msg="incorrect data check",r.mode=Ss;break}h=0,u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;u<32;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(h!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=Ss;break}h=0,u=0}r.mode=29;case 29:k=1;break e;case Ss:k=-3;break e;case 31:return-4;default:return ws}return e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,r.hold=h,r.bits=u,(r.wsize||f!==e.avail_out&&r.mode<Ss&&(r.mode<27||4!==t))&&Ms(e,e.output,e.next_out,f-e.avail_out),c-=e.avail_in,f-=e.avail_out,e.total_in+=c,e.total_out+=f,r.total+=f,r.wrap&&f&&(e.adler=r.check=r.flags?ms(r.check,i,f,e.next_out-f):ps(r.check,i,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===ks?128:0)+(20===r.mode||15===r.mode?256:0),(0===c&&0===f||4===t)&&k===bs&&(k=-5),k},os.inflateEnd=function(e){if(!e||!e.state)return ws;var t=e.state;return t.window&&(t.window=null),e.state=null,bs},os.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?ws:(r.head=t,t.done=!1,bs):ws},os.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?ws:11===r.mode&&ps(1,t,n,0)!==r.check?-3:Ms(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,bs):ws},os.inflateInfo="pako inflate (from Nodeca project)";var Ls={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 Bs=os,zs=Hr,$s=Bi,Hs=Ls,Us=qn,Vs=qi,Ws=function(){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},qs=Object.prototype.toString;function Xs(e){if(!(this instanceof Xs))return new Xs(e);this.options=zs.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vs,this.strm.avail_out=0;var r=Bs.inflateInit2(this.strm,t.windowBits);if(r!==Hs.Z_OK)throw new Error(Us[r]);if(this.header=new Ws,Bs.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=$s.string2buf(t.dictionary):"[object ArrayBuffer]"===qs.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Bs.inflateSetDictionary(this.strm,t.dictionary))!==Hs.Z_OK))throw new Error(Us[r])}function Zs(e,t){var r=new Xs(t);if(r.push(e,!0),r.err)throw r.msg||Us[r.err];return r.result}Xs.prototype.push=function(e,t){var r,n,i,s,o,a=this.strm,l=this.options.chunkSize,h=this.options.dictionary,u=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?Hs.Z_FINISH:Hs.Z_NO_FLUSH,"string"==typeof e?a.input=$s.binstring2buf(e):"[object ArrayBuffer]"===qs.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new zs.Buf8(l),a.next_out=0,a.avail_out=l),(r=Bs.inflate(a,Hs.Z_NO_FLUSH))===Hs.Z_NEED_DICT&&h&&(r=Bs.inflateSetDictionary(this.strm,h)),r===Hs.Z_BUF_ERROR&&!0===u&&(r=Hs.Z_OK,u=!1),r!==Hs.Z_STREAM_END&&r!==Hs.Z_OK)return this.onEnd(r),this.ended=!0,!1;a.next_out&&(0!==a.avail_out&&r!==Hs.Z_STREAM_END&&(0!==a.avail_in||n!==Hs.Z_FINISH&&n!==Hs.Z_SYNC_FLUSH)||("string"===this.options.to?(i=$s.utf8border(a.output,a.next_out),s=a.next_out-i,o=$s.buf2string(a.output,i),a.next_out=s,a.avail_out=l-s,s&&zs.arraySet(a.output,a.output,i,s,0),this.onData(o)):this.onData(zs.shrinkBuf(a.output,a.next_out)))),0===a.avail_in&&0===a.avail_out&&(u=!0)}while((a.avail_in>0||0===a.avail_out)&&r!==Hs.Z_STREAM_END);return r===Hs.Z_STREAM_END&&(n=Hs.Z_FINISH),n===Hs.Z_FINISH?(r=Bs.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Hs.Z_OK):n!==Hs.Z_SYNC_FLUSH||(this.onEnd(Hs.Z_OK),a.avail_out=0,!0)},Xs.prototype.onData=function(e){this.chunks.push(e)},Xs.prototype.onEnd=function(e){e===Hs.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=zs.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},ss.Inflate=Xs,ss.inflate=Zs,ss.inflateRaw=function(e,t){return(t=t||{}).raw=!0,Zs(e,t)},ss.ungzip=Zs;var Gs={};(0,Hr.assign)(Gs,Ur,ss,Ls);var Ys="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,Ks=Gs,Qs=Vt(),Js=qt,eo=Ys?"uint8array":"array";function to(e,t){Js.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}$r.magic="\b\0",Qs.inherits(to,Js),to.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(Qs.transformTo(eo,e.data),!1)},to.prototype.flush=function(){Js.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},to.prototype.cleanUp=function(){Js.prototype.cleanUp.call(this),this._pako=null},to.prototype._createPako=function(){this._pako=new Ks[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},$r.compressWorker=function(e){return new to("Deflate",e)},$r.uncompressWorker=function(){return new to("Inflate",{})};var ro=qt;zr.STORE={magic:"\0\0",compressWorker:function(){return new ro("STORE compression")},uncompressWorker:function(){return new ro("STORE decompression")}},zr.DEFLATE=$r;var no={LOCAL_FILE_HEADER:"PK",CENTRAL_FILE_HEADER:"PK",CENTRAL_DIRECTORY_END:"PK",ZIP64_CENTRAL_DIRECTORY_LOCATOR:"PK",ZIP64_CENTRAL_DIRECTORY_END:"PK",DATA_DESCRIPTOR:"PK\b"},io=Vt(),so=qt,oo=Be,ao=mr,lo=no,ho=function(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n},uo=function(e,t,r,n,i,s){var o,a,l=e.file,h=e.compression,u=s!==oo.utf8encode,c=io.transformTo("string",s(l.name)),f=io.transformTo("string",oo.utf8encode(l.name)),d=l.comment,p=io.transformTo("string",s(d)),m=io.transformTo("string",oo.utf8encode(d)),g=f.length!==l.name.length,y=m.length!==d.length,v="",_="",b="",w=l.dir,x=l.date,k={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),u||!g&&!y||(S|=2048);var E,T,C,O=0,R=0;w&&(O|=16),"UNIX"===i?(R=798,O|=(E=l.unixPermissions,T=w,C=E,E||(C=T?16893:33204),(65535&C)<<16)):(R=20,O|=63&(l.dosPermissions||0)),o=x.getUTCHours(),o<<=6,o|=x.getUTCMinutes(),o<<=5,o|=x.getUTCSeconds()/2,a=x.getUTCFullYear()-1980,a<<=4,a|=x.getUTCMonth()+1,a<<=5,a|=x.getUTCDate(),g&&(_=ho(1,1)+ho(ao(c),4)+f,v+="up"+ho(_.length,2)+_),y&&(b=ho(1,1)+ho(ao(p),4)+m,v+="uc"+ho(b.length,2)+b);var A="";return A+="\n\0",A+=ho(S,2),A+=h.magic,A+=ho(o,2),A+=ho(a,2),A+=ho(k.crc32,4),A+=ho(k.compressedSize,4),A+=ho(k.uncompressedSize,4),A+=ho(c.length,2),A+=ho(v.length,2),{fileRecord:lo.LOCAL_FILE_HEADER+A+c+v,dirRecord:lo.CENTRAL_FILE_HEADER+ho(R,2)+A+ho(p.length,2)+"\0\0\0\0"+ho(O,4)+ho(n,4)+c+v+p}},co=function(e){return lo.DATA_DESCRIPTOR+ho(e.crc32,4)+ho(e.compressedSize,4)+ho(e.uncompressedSize,4)};function fo(e,t,r,n){so.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}io.inherits(fo,so),fo.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,so.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},fo.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=uo(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},fo.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=uo(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:co(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},fo.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,n=function(e,t,r,n,i){var s=io.transformTo("string",i(n));return lo.CENTRAL_DIRECTORY_END+"\0\0\0\0"+ho(e,2)+ho(e,2)+ho(t,4)+ho(r,4)+ho(s.length,2)+s}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},fo.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},fo.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},fo.prototype.resume=function(){return!!so.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},fo.prototype.error=function(e){var t=this._sources;if(!so.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},fo.prototype.lock=function(){so.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()};var po=zr,mo=fo;Br.generateWorker=function(e,t,r){var n=new mo(t.streamFiles,r,t.platform,t.encodeFileName),i=0;try{e.forEach((function(e,r){i++;var s=function(e,t){var r=e||t,n=po[r];if(!n)throw new Error(r+" is not a valid compression method !");return n}(r.options.compression,t.compression),o=r.options.compressionOptions||t.compressionOptions||{},a=r.dir,l=r.date;r._compressWorker(s,o).withStreamInfo("file",{name:e,dir:a,date:l,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(n)})),n.entriesCount=i}catch(e){n.error(e)}return n};var go=Vt(),yo=qt;function vo(e,t){yo.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}go.inherits(vo,yo),vo.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},vo.prototype.pause=function(){return!!yo.prototype.pause.call(this)&&(this._stream.pause(),!0)},vo.prototype.resume=function(){return!!yo.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)};var _o=vo,bo=Be,wo=Vt(),xo=qt,ko=ar,So=lr,Eo=Or,To=Lr,Co=Br,Oo=zt,Ro=_o,Ao=function(e,t,r){var n,i=wo.getTypeOf(t),s=wo.extend(r||{},So);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=Io(e)),s.createFolders&&(n=No(e))&&Po.call(this,n,!0);var o="string"===i&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!o),(t instanceof Eo&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var a=null;a=t instanceof Eo||t instanceof xo?t:Oo.isNode&&Oo.isStream(t)?new Ro(e,t):wo.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var l=new To(e,a,s);this.files[e]=l},No=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},Io=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},Po=function(e,t){return t=void 0!==t?t:So.createFolders,e=Io(e),this.files[e]||Ao.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function Fo(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Do={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach((function(r,n){e(r,n)&&t.push(n)})),t},file:function(e,t,r){if(1===arguments.length){if(Fo(e)){var n=e;return this.filter((function(e,t){return!t.dir&&n.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return e=this.root+e,Ao.call(this,e,t,r),this},folder:function(e){if(!e)return this;if(Fo(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=Po.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=wo.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:bo.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");wo.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=Co.generateWorker(this,r,n)}catch(e){(t=new xo("error")).error(e)}return new ko(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}},jo=Do,Mo=Vt();function Lo(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}Lo.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return Mo.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}};var Bo=Lo,zo=Bo;function $o(e){zo.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}Vt().inherits($o,zo),$o.prototype.byteAt=function(e){return this.data[this.zero+e]},$o.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;s>=0;--s)if(this.data[s]===t&&this.data[s+1]===r&&this.data[s+2]===n&&this.data[s+3]===i)return s-this.zero;return-1},$o.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&r===s[1]&&n===s[2]&&i===s[3]},$o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var Ho=$o,Uo=Bo;function Vo(e){Uo.call(this,e)}Vt().inherits(Vo,Uo),Vo.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},Vo.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},Vo.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},Vo.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var Wo=Vo,qo=Ho;function Xo(e){qo.call(this,e)}Vt().inherits(Xo,qo),Xo.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var Zo=Xo,Go=Zo;function Yo(e){Go.call(this,e)}Vt().inherits(Yo,Go),Yo.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var Ko=Yo,Qo=Vt(),Jo=$e,ea=Ho,ta=Wo,ra=Ko,na=Zo,ia=function(e){var t=Qo.getTypeOf(e);return Qo.checkSupport(t),"string"!==t||Jo.uint8array?"nodebuffer"===t?new ra(e):Jo.uint8array?new na(Qo.transformTo("uint8array",e)):new ea(Qo.transformTo("array",e)):new ta(e)},sa=ia,oa=Vt(),aa=Or,la=mr,ha=Be,ua=zr,ca=$e;function fa(e,t){this.options=e,this.loadOptions=t}fa.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=function(e){for(var t in ua)if(Object.prototype.hasOwnProperty.call(ua,t)&&ua[t].magic===e)return ua[t];return null}(this.compressionMethod),null===t)throw new Error("Corrupted zip : compression "+oa.pretty(this.compressionMethod)+" unknown (inner file : "+oa.transformTo("string",this.fileName)+")");this.decompressed=new aa(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=sa(this.extraFields[1].value);this.uncompressedSize===oa.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===oa.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===oa.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===oa.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e=ca.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=ha.utf8decode(this.fileName),this.fileCommentStr=ha.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=oa.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=oa.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=sa(e.value);return 1!==t.readInt(1)||la(this.fileName)!==t.readInt(4)?null:ha.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=sa(e.value);return 1!==t.readInt(1)||la(this.fileComment)!==t.readInt(4)?null:ha.utf8decode(t.readData(e.length-5))}return null}};var da=fa,pa=ia,ma=Vt(),ga=no,ya=da,va=$e;function _a(e){this.files=[],this.loadOptions=e}_a.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+ma.pretty(t)+", expected "+ma.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;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 e=this.reader.readData(this.zipCommentLength),t=va.uint8array?"uint8array":"array",r=ma.transformTo(t,e);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 e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},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 e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(ga.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(ga.CENTRAL_FILE_HEADER);)(e=new ya({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(ga.CENTRAL_DIRECTORY_END);if(e<0)throw!this.isSignature(0,ga.LOCAL_FILE_HEADER)?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(e);var t=e;if(this.checkSignature(ga.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===ma.MAX_VALUE_16BITS||this.diskWithCentralDirStart===ma.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===ma.MAX_VALUE_16BITS||this.centralDirRecords===ma.MAX_VALUE_16BITS||this.centralDirSize===ma.MAX_VALUE_32BITS||this.centralDirOffset===ma.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(ga.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(ga.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,ga.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(ga.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(ga.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(n>0)this.isSignature(t,ga.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=pa(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var ba=_a,wa=Vt(),xa=Ut,ka=Be,Sa=ba,Ea=_r,Ta=zt;function Ca(e){return new xa.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new Ea);n.on("error",(function(e){r(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}function Oa(){if(!(this instanceof Oa))return new Oa;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 e=new Oa;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}Oa.prototype=jo,Oa.prototype.loadAsync=function(e,t){var r=this;return t=wa.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:ka.utf8decode}),Ta.isNode&&Ta.isStream(e)?xa.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):wa.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new Sa(t);return r.load(e),r})).then((function(e){var r=[xa.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var i=0;i<n.length;i++)r.push(Ca(n[i]));return xa.Promise.all(r)})).then((function(e){for(var n=e.shift(),i=n.files,s=0;s<i.length;s++){var o=i[s],a=o.fileNameStr,l=wa.resolve(o.fileNameStr);r.file(l,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:t.createFolders}),o.dir||(r.file(l).unsafeOriginalName=a)}return n.zipComment.length&&(r.comment=n.zipComment),r}))},Oa.support=$e,Oa.defaults=lr,Oa.version="3.10.1",Oa.loadAsync=function(e,t){return(new Oa).loadAsync(e,t)},Oa.external=Ut;var Ra,Aa,Na,Ia,Pa,Fa,Da=Oa,ja={exports:{}};function Ma(){return Aa?Ra:(Aa=1,Ra=n)}function La(){if(Ia)return Na;function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}Ia=1;var a=s.Buffer,l=o.inspect,h=l&&l.custom||"inspect";function u(e,t,r){a.prototype.copy.call(e,t,r)}return Na=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var r,i,s;return r=e,i=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t=a.allocUnsafe(e>>>0),r=this.head,n=0;r;)u(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:h,value:function(e,r){return l(this,t(t({},r),{},{depth:0,customInspect:!1}))}}],i&&n(r.prototype,i),s&&n(r,s),Object.defineProperty(r,"prototype",{writable:!1}),e}(),Na}function Ba(){if(Fa)return Pa;function e(e,n){r(e,n),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}return Fa=1,Pa={destroy:function(n,i){var s=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(i?i(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,n)):process.nextTick(r,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,(function(r){!i&&r?s._writableState?s._writableState.errorEmitted?process.nextTick(t,s):(s._writableState.errorEmitted=!0,process.nextTick(e,s,r)):process.nextTick(e,s,r):i?(process.nextTick(t,s),i(r)):process.nextTick(t,s)})),this)},undestroy:function(){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)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}},Pa}var za,$a,Ha,Ua,Va,Wa,qa,Xa={};function Za(){if(za)return Xa;za=1;const e={};function t(t,r,n){n||(n=Error);class i extends n{constructor(e,t,n){super(function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(e,t,n))}}i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function r(e,t){if(Array.isArray(e)){const r=e.length;return e=e.map((e=>String(e))),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,n){let i;var s,o;let a;if("string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a=`The ${e} ${i} ${r(t,"type")}`;else{const n=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a=`The "${e}" ${n} ${i} ${r(t,"type")}`}return a+=". Received type "+typeof n,a}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Xa.codes=e,Xa}function Ga(){if(Ha)return $a;Ha=1;var e=Za().codes.ERR_INVALID_OPT_VALUE;return $a={getHighWaterMark:function(t,r,n,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(r,i,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new e(i?n:"highWaterMark",s);return Math.floor(s)}return t.objectMode?16:16384}}}function Ya(){if(Va)return Ua;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Va=1,Ua=k,k.WritableState=x;var r={deprecate:mt()},n=Ma(),i=s.Buffer,o=(void 0!==p?p:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a,l=Ba(),h=Ga().getHighWaterMark,u=Za().codes,c=u.ERR_INVALID_ARG_TYPE,f=u.ERR_METHOD_NOT_IMPLEMENTED,d=u.ERR_MULTIPLE_CALLBACK,m=u.ERR_STREAM_CANNOT_PIPE,g=u.ERR_STREAM_DESTROYED,y=u.ERR_STREAM_NULL_VALUES,v=u.ERR_STREAM_WRITE_AFTER_END,_=u.ERR_UNKNOWN_ENCODING,b=l.errorOrDestroy;function w(){}function x(r,n,i){t=t||Ka(),r=r||{},"boolean"!=typeof i&&(i=n instanceof t),this.objectMode=!!r.objectMode,i&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=h(this,r,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===r.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new d;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(R,e,t),e._writableState.errorEmitted=!0,b(e,n)):(i(n),e._writableState.errorEmitted=!0,b(e,n),R(e,t))}(e,r,n,t,i);else{var s=C(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),n?process.nextTick(E,e,r,s,i):E(e,r,s,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function k(e){var r=this instanceof(t=t||Ka());if(!r&&!a.call(k,this))return new k(e);this._writableState=new x(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),n.call(this)}function S(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function E(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),R(e,t)}function T(t,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(t._writev&&n&&n.next){var i=r.bufferedRequestCount,s=new Array(i),o=r.corkedRequestsFree;o.entry=n;for(var a=0,l=!0;n;)s[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;s.allBuffers=l,S(t,r,!0,r.length,s,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;n;){var h=n.chunk,u=n.encoding,c=n.callback;if(S(t,r,!1,r.objectMode?1:h.length,h,u,c),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var r=C(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}return rt()(k,n),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===k&&(e&&e._writableState instanceof x)}})):a=function(e){return e instanceof this},k.prototype.pipe=function(){b(this,new m)},k.prototype.write=function(e,t,r){var n,s=this._writableState,a=!1,l=!s.objectMode&&(n=e,i.isBuffer(n)||n instanceof o);return l&&!i.isBuffer(e)&&(e=function(e){return i.from(e)}(e)),"function"==typeof t&&(r=t,t=null),l?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=w),s.ending?function(e,t){var r=new v;b(e,r),process.nextTick(t,r)}(this,r):(l||function(e,t,r,n){var i;return null===r?i=new y:"string"==typeof r||t.objectMode||(i=new c("chunk",["string","Buffer"],r)),!i||(b(e,i),process.nextTick(n,i),!1)}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,n,s,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=i.from(t,r));return t}(t,n,s);n!==a&&(r=!0,s="buffer",n=a)}var l=t.objectMode?1:n.length;t.length+=l;var h=t.length<t.highWaterMark;h||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,l,n,s,o);return h}(this,s,l,e,t,r)),a},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new f("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,R(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=l.destroy,k.prototype._undestroy=l.undestroy,k.prototype._destroy=function(e,t){t(e)},Ua}function Ka(){if(qa)return Wa;qa=1;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Wa=o;var t=bl(),r=Ya();rt()(o,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var s=n[i];o.prototype[s]||(o.prototype[s]=r.prototype[s])}function o(e){if(!(this instanceof o))return new o(e);t.call(this,e),r.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||process.nextTick(l,this)}function l(e){e.end()}return Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Wa}var Qa,Ja,el,tl,rl,nl,il,sl,ol,al,ll,hl,ul,cl,fl,dl,pl={},ml={exports:{}};function gl(){if(Ja)return pl;Ja=1;var e=(Qa||(Qa=1,function(e,t){var r=s,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(ml,ml.exports)),ml.exports).Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.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 r(r){var n;switch(this.encoding=function(r){var n=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=o,this.end=a,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=l,this.end=h,n=3;break;default:return this.write=u,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function c(e){return e&&e.length?this.write(e):""}return pl.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var s=n(t[i]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--i<r||-2===s)return 0;if(s=n(t[i]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--i<r||-2===s)return 0;if(s=n(t[i]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},pl}function yl(){if(tl)return el;tl=1;var e=Za().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return el=function r(n,i,s){if("function"==typeof i)return r(n,null,i);i||(i={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||t);var o=i.readable||!1!==i.readable&&n.readable,a=i.writable||!1!==i.writable&&n.writable,l=function(){n.writable||u()},h=n._writableState&&n._writableState.finished,u=function(){a=!1,h=!0,o||s.call(n)},c=n._readableState&&n._readableState.endEmitted,f=function(){o=!1,c=!0,a||s.call(n)},d=function(e){s.call(n,e)},p=function(){var t;return o&&!c?(n._readableState&&n._readableState.ended||(t=new e),s.call(n,t)):a&&!h?(n._writableState&&n._writableState.ended||(t=new e),s.call(n,t)):void 0},m=function(){n.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(n)?a&&!n._writableState&&(n.on("end",l),n.on("close",l)):(n.on("complete",u),n.on("abort",p),n.req?m():n.on("request",m)),n.on("end",f),n.on("finish",u),!1!==i.error&&n.on("error",d),n.on("close",p),function(){n.removeListener("complete",u),n.removeListener("abort",p),n.removeListener("request",m),n.req&&n.req.removeListener("finish",u),n.removeListener("end",l),n.removeListener("close",l),n.removeListener("finish",u),n.removeListener("end",f),n.removeListener("error",d),n.removeListener("close",p)}},el}function vl(){if(nl)return rl;var e;function t(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}nl=1;var r=yl(),n=Symbol("lastResolve"),i=Symbol("lastReject"),s=Symbol("error"),o=Symbol("ended"),a=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function u(e,t){return{value:e,done:t}}function c(e){var t=e[n];if(null!==t){var r=e[h].read();null!==r&&(e[a]=null,e[n]=null,e[i]=null,t(u(r,!1)))}}function f(e){process.nextTick(c,e)}var d=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((e={get stream(){return this[h]},next:function(){var e=this,t=this[s];if(null!==t)return Promise.reject(t);if(this[o])return Promise.resolve(u(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[s]?r(e[s]):t(u(void 0,!0))}))}));var r,n=this[a];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[o]?r(u(void 0,!0)):t[l](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(u(i,!1));r=new Promise(this[l])}return this[a]=r,r}},t(e,Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(u(void 0,!0))}))}))})),e),d);return rl=function(e){var c,d=Object.create(p,(t(c={},h,{value:e,writable:!0}),t(c,n,{value:null,writable:!0}),t(c,i,{value:null,writable:!0}),t(c,s,{value:null,writable:!0}),t(c,o,{value:e._readableState.endEmitted,writable:!0}),t(c,l,{value:function(e,t){var r=d[h].read();r?(d[a]=null,d[n]=null,d[i]=null,e(u(r,!1))):(d[n]=e,d[i]=t)},writable:!0}),c));return d[a]=null,r(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=d[i];return null!==t&&(d[a]=null,d[n]=null,d[i]=null,t(e)),void(d[s]=e)}var r=d[n];null!==r&&(d[a]=null,d[n]=null,d[i]=null,r(u(void 0,!0))),d[o]=!0})),e.on("readable",f.bind(null,d)),d},rl}function _l(){if(sl)return il;function e(e,t,r,n,i,s,o){try{var a=e[s](o),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(n,i)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}sl=1;var n=Za().codes.ERR_INVALID_ARG_TYPE;return il=function(i,s,o){var a;if(s&&"function"==typeof s.next)a=s;else if(s&&s[Symbol.asyncIterator])a=s[Symbol.asyncIterator]();else{if(!s||!s[Symbol.iterator])throw new n("iterable",["Iterable"],s);a=s[Symbol.iterator]()}var l=new i(function(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({objectMode:!0},o)),h=!1;function u(){return c.apply(this,arguments)}function c(){var t;return t=function*(){try{var e=yield a.next(),t=e.value;e.done?l.push(null):l.push(yield t)?u():h=!1}catch(e){l.destroy(e)}},c=function(){var r=this,n=arguments;return new Promise((function(i,s){var o=t.apply(r,n);function a(t){e(o,i,s,a,l,"next",t)}function l(t){e(o,i,s,a,l,"throw",t)}a(void 0)}))},c.apply(this,arguments)}return l._read=function(){h||(h=!0,u())},l},il}function bl(){if(al)return ol;var e;al=1,ol=E,E.ReadableState=S,i.EventEmitter;var t=function(e,t){return e.listeners(t).length},r=Ma(),n=s.Buffer,a=(void 0!==p?p:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,h=o;l=h&&h.debuglog?h.debuglog("stream"):function(){};var u,c,f,d=La(),m=Ba(),g=Ga().getHighWaterMark,y=Za().codes,v=y.ERR_INVALID_ARG_TYPE,_=y.ERR_STREAM_PUSH_AFTER_EOF,b=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;rt()(E,r);var x=m.errorOrDestroy,k=["error","close","destroy","pause","resume"];function S(t,r,n){e=e||Ka(),t=t||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new d,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=!1!==t.emitClose,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&&(u||(u=gl().StringDecoder),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function E(t){if(e=e||Ka(),!(this instanceof E))return new E(t);var n=this instanceof e;this._readableState=new S(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),r.call(this)}function T(e,t,r,i,s){l("readableAddChunk",t);var o,h=e._readableState;if(null===t)h.reading=!1,function(e,t){if(l("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?A(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,N(e)))}(e,h);else if(s||(o=function(e,t){var r;i=t,n.isBuffer(i)||i instanceof a||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t));var i;return r}(h,t)),o)x(e,o);else if(h.objectMode||t&&t.length>0)if("string"==typeof t||h.objectMode||Object.getPrototypeOf(t)===n.prototype||(t=function(e){return n.from(e)}(t)),i)h.endEmitted?x(e,new w):C(e,h,t,!0);else if(h.ended)x(e,new _);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!r?(t=h.decoder.write(t),h.objectMode||0!==t.length?C(e,h,t,!1):I(e,h)):C(e,h,t,!1)}else i||(h.reading=!1,I(e,h));return!h.ended&&(h.length<h.highWaterMark||0===h.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&A(e)),I(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=n.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},E.prototype.unshift=function(e){return T(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){u||(u=gl().StringDecoder);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var O=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(N,e))}function N(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,M(e)}function I(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(l("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function F(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){l("readable nexttick read 0"),e.read(0)}function j(e,t){l("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;l("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(z,t,e))}function z(e,t){if(l("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return E.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):A(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",i=!0),t.ended||t.reading?l("reading or ended",i=!1):i&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(n=e>0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){x(this,new b("_read()"))},E.prototype.pipe=function(e,r){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,r);var s=(!r||!1!==r.end)&&e!==process.stdout&&e!==process.stderr?a:m;function o(t,r){l("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",h),e.removeListener("error",f),e.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",m),n.removeListener("data",c),u=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function a(){l("onend"),e.end()}i.endEmitted?process.nextTick(s):n.once("end",s),e.on("unpipe",o);var h=function(e){return function(){var r=e._readableState;l("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&t(e,"data")&&(r.flowing=!0,M(e))}}(n);e.on("drain",h);var u=!1;function c(t){l("ondata");var r=e.write(t);l("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==$(i.pipes,e))&&!u&&(l("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function f(r){l("onerror",r),m(),e.removeListener("error",f),0===t(e,"error")&&x(e,r)}function d(){e.removeListener("finish",p),m()}function p(){l("onfinish"),e.removeListener("close",d),m()}function m(){l("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",n),i.flowing||(l("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=$(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var n=r.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,l("on readable",i.length,i.reading),i.length?A(this):i.reading||process.nextTick(D,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=r.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(F,this),n},E.prototype.removeAllListeners=function(e){var t=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(F,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<k.length;s++)e.on(k[s],this.emit.bind(this,k[s]));return this._read=function(t){l("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=vl()),c(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=L,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===f&&(f=_l()),f(E,e,t)}),ol}function wl(){if(hl)return ll;hl=1,ll=a;var e=Za().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,r=e.ERR_MULTIPLE_CALLBACK,n=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,s=Ka();function o(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(null===i)return this.emit("error",new r);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new i;if(e._transformState.transforming)throw new n;return e.push(null)}return rt()(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,r,n){n(new t("_transform()"))},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},a.prototype._destroy=function(e,t){s.prototype._destroy.call(this,e,(function(e){t(e)}))},ll}function xl(){if(dl)return fl;var e;dl=1;var t=Za().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(e){if(e)throw e}function s(e){e()}function o(e,t){return e.pipe(t)}return fl=function(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];var h,u=function(e){return e.length?"function"!=typeof e[e.length-1]?i:e.pop():i}(a);if(Array.isArray(a[0])&&(a=a[0]),a.length<2)throw new r("streams");var c=a.map((function(t,r){var i=r<a.length-1;return function(t,r,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var o=!1;t.on("close",(function(){o=!0})),void 0===e&&(e=yl()),e(t,{readable:r,writable:i},(function(e){if(e)return s(e);o=!0,s()}));var a=!1;return function(e){if(!o&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new n("pipe"))}}(t,i,r>0,(function(e){h||(h=e),e&&c.forEach(s),i||(c.forEach(s),u(h))}))}));return a.reduce(o)},fl}!function(e,t){var r=n;"disable"===process.env.READABLE_STREAM&&r?(e.exports=r.Readable,Object.assign(e.exports,r),e.exports.Stream=r):((t=e.exports=bl()).Stream=r||t,t.Readable=t,t.Writable=Ya(),t.Duplex=Ka(),t.Transform=wl(),t.PassThrough=function(){if(cl)return ul;cl=1,ul=t;var e=wl();function t(r){if(!(this instanceof t))return new t(r);e.call(this,r)}return rt()(t,e),t.prototype._transform=function(e,t,r){r(null,e)},ul}(),t.finished=yl(),t.pipeline=xl())}(ja,ja.exports);var kl=ja.exports;const Sl=r,El=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,Tl={nop(){},promiseImmediate:e=>new Promise((t=>{p.setImmediate?setImmediate((()=>{t(e)})):setTimeout((()=>{t(e)}),1)})),inherits:function(e,t,r,n){e.super_=t,n||(n=r,r=null),r&&Object.keys(r).forEach((t=>{Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}));const i={constructor:{value:e,enumerable:!1,writable:!1,configurable:!0}};n&&Object.keys(n).forEach((e=>{i[e]=Object.getOwnPropertyDescriptor(n,e)})),e.prototype=Object.create(t.prototype,i)},dateToExcel:(e,t)=>25569+e.getTime()/864e5-(t?1462:0),excelToDate(e,t){const r=Math.round(24*(e-25569+(t?1462:0))*3600*1e3);return new Date(r)},parsePath(e){const t=e.lastIndexOf("/");return{path:e.substring(0,t),name:e.substring(t+1)}},getRelsPath(e){const t=Tl.parsePath(e);return`${t.path}/_rels/${t.name}.rels`},xmlEncode(e){const t=El.exec(e);if(!t)return e;let r="",n="",i=0,s=t.index;for(;s<e.length;s++){const t=e.charCodeAt(s);switch(t){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;case 127:n="";break;default:if(t<=31&&(t<=8||t>=11&&13!==t)){n="";break}continue}i!==s&&(r+=e.substring(i,s)),i=s+1,n&&(r+=n)}return i!==s?r+e.substring(i,s):r},xmlDecode:e=>e.replace(/&([a-z]*);/g,(e=>{switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return e}})),validInt(e){const t=parseInt(e,10);return Number.isNaN(t)?0:t},isDateFmt(e){if(!e)return!1;return null!==(e=(e=e.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)},fs:{exists:e=>new Promise((t=>{Sl.access(e,Sl.constants.F_OK,(e=>{t(!e)}))}))},toIsoDateString:e=>e.toIsoString().subsstr(0,10),parseBoolean:e=>!0===e||"true"===e||1===e||"1"===e};var Cl=Tl;var Ol=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 t=2*this._buf.length;for(;t<e;)t*=2;const r=Buffer.alloc(t);this._buf.copy(r,0),this._buf=r}addText(e){this._buffer=void 0;let t=this._inPos+this._buf.write(e,this._inPos,this._encoding);for(;t>=this._buf.length-4;)this._grow(this._inPos+e.length),t=this._inPos+this._buf.write(e,this._inPos,this._encoding);this._inPos=t}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)}};const Rl=kl,Al=Cl,Nl=Ol;class Il{constructor(e,t){this._data=e,this._encoding=t}get length(){return this.toBuffer().length}copy(e,t,r,n){return this.toBuffer().copy(e,t,r,n)}toBuffer(){return this._buffer||(this._buffer=Buffer.from(this._data,this._encoding)),this._buffer}}class Pl{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,r,n){return this._data._buf.copy(e,t,r,n)}toBuffer(){return this._data.toBuffer()}}class Fl{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,r,n){this._data.copy(e,t,r,n)}toBuffer(){return this._data}}class Dl{constructor(e){this.size=e,this.buffer=Buffer.alloc(e),this.iRead=0,this.iWrite=0}toBuffer(){if(0===this.iRead&&this.iWrite===this.size)return this.buffer;const 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 t;return 0===e?null:void 0===e||e>=this.length?(t=this.toBuffer(),this.iRead=this.iWrite,t):(t=Buffer.alloc(e),this.buffer.copy(t,0,this.iRead,e),this.iRead+=e,t)}write(e,t,r){const n=Math.min(r,this.size-this.iWrite);return e.copy(this.buffer,this.iWrite,t,t+n),this.iWrite+=n,n}}const jl=function(e){e=e||{},this.bufSize=e.bufSize||1048576,this.buffers=[],this.batch=e.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};Al.inherits(jl,Rl.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return Buffer.concat(this.buffers.map((e=>e.toBuffer())))}},_getWritableBuffer(){if(this.buffers.length){const e=this.buffers[this.buffers.length-1];if(!e.full)return e}const e=new Dl(this.bufSize);return this.buffers.push(e),e},async _pipe(e){await Promise.all(this.pipes.map((function(t){return new Promise((r=>{t.write(e.toBuffer(),(()=>{r()}))}))})))},_writeToBuffers(e){let t=0;const r=e.length;for(;t<r;){t+=this._getWritableBuffer().write(e,t,r-t)}},async write(e,t,r){let n;if(t instanceof Function&&(r=t,t="utf8"),r=r||Al.nop,e instanceof Nl)n=new Pl(e);else if(e instanceof Buffer)n=new Fl(e);else{if(!("string"==typeof e||e instanceof String||e instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");n=new Il(e,t)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(n);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(n),process.nextTick(r)):(await this._pipe(n),r());else this.paused||this.emit("data",n.toBuffer()),this._writeToBuffers(n),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(e,t,r){const n=e=>{e?r(e):(this._flush(),this.pipes.forEach((e=>{e.end()})),this.emit("finish"))};e?this.write(e,t,n):n()},read(e){let t;if(e){for(t=[];e&&this.buffers.length&&!this.buffers[0].eod;){const r=this.buffers[0],n=r.read(e);e-=n.length,t.push(n),r.eod&&r.full&&this.buffers.shift()}return Buffer.concat(t)}return t=this.buffers.map((e=>e.toBuffer())).filter(Boolean),this.buffers=[],Buffer.concat(t)},setEncoding(e){this.encoding=e},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(e){this.pipes.push(e),!this.paused&&this.buffers.length&&this.end()},unpipe(e){this.pipes=this.pipes.filter((t=>t!==e))},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}});var Ml=jl,Ll={};const Bl="undefined"==typeof TextEncoder?null:new TextEncoder("utf-8"),{Buffer:zl}=s;Ll.stringToBuffer=function(e){return"string"!=typeof e?e:Bl?zl.from(Bl.encode(e).buffer):zl.from(e)};const $l=i,Hl=Da,Ul=Ml,{stringToBuffer:Vl}=Ll;class Wl extends $l.EventEmitter{constructor(e){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},e),this.zip=new Hl,this.stream=new Ul}append(e,t){t.hasOwnProperty("base64")&&t.base64?this.zip.file(t.name,e,{base64:!0}):(process.browser&&"string"==typeof e&&(e=Vl(e)),this.zip.file(t.name,e))}async finalize(){const 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,t){return this.stream.pipe(e,t)}unpipe(e){return this.stream.unpipe(e)}unshift(e){return this.stream.unshift(e)}wrap(e){return this.stream.wrap(e)}}var ql={ZipWriter:Wl};const Xl=k,Zl=Cl,Gl=">";function Yl(e,t,r){e.push(` ${t}="${Zl.xmlEncode(r.toString())}"`)}function Kl(e,t){if(t){const r=[];Xl.each(t,((e,t)=>{void 0!==e&&Yl(r,t,e)})),e.push(r.join(""))}}let Ql=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){const t=this._xml;t.push("<?xml"),Kl(t,e),t.push("?>\n")}openNode(e,t){const r=this.tos,n=this._xml;r&&this.open&&n.push(Gl),this._stack.push(e),n.push("<"),n.push(e),Kl(n,t),this.leaf=!0,this.open=!0}addAttribute(e,t){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");void 0!==t&&Yl(this._xml,e,t)}addAttributes(e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");Kl(this._xml,e)}writeText(e){const t=this._xml;this.open&&(t.push(Gl),this.open=!1),this.leaf=!1,t.push(Zl.xmlEncode(e.toString()))}writeXml(e){this.open&&(this._xml.push(Gl),this.open=!1),this.leaf=!1,this._xml.push(e)}closeNode(){const e=this._stack.pop(),t=this._xml;this.leaf?t.push("/>"):(t.push("</"),t.push(e),t.push(Gl)),this.open=!1,this.leaf=!1}leafNode(e,t,r){this.openNode(e,t),void 0!==r&&this.writeText(r),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(){const 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("")}};Ql.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};var Jl=Ql,eh={};const th="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");eh.bufferToString=function(e){return"string"==typeof e?e:th?th.decode(e):e.toString()};var rh={},nh={};!function(e){
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("crypto"),require("fs"),require("stream"),require("events"),require("buffer"),require("util"),require("string_decoder"),require("path"),require("constants"),require("assert"),require("zlib"),require("os")):"function"==typeof define&&define.amd?define(["exports","crypto","fs","stream","events","buffer","util","string_decoder","path","constants","assert","zlib","os"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).VTable=e.VTable||{},e.VTable.export={}),e.require$$0$1,e.require$$0$6,e.require$$0$2,e.require$$0$5,e.require$$0$3,e.require$$0$4,e.require$$0$7,e.require$$1,e.require$$0$8,e.require$$5,e.require$$0$9,e.require$$1$1)}(this,(function(e,t,r,n,i,s,o,a,l,h,u,c,f){"use strict";function d(e,t,r){const n=r.getCellRange(e,t),i=n.start.col,s=n.start.row;if(i!==e||s!==t)return"";return r.getCellValue(e,t)}var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var y={exports:{}};!function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){a(n.response,t,r)},n.onerror=function(){},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var s="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof p&&p.global===p?p:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=s.saveAs||("object"!=typeof window||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(e,t,o){var a=s.URL||s.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):n(l.href)?r(e,t,o):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,s,o){if(s=s||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,o),s);else if(n(e))r(e,s,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){i(a)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var a="application/octet-stream"===e.type,l=/constructor/i.test(s.HTMLElement)||s.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||a&&l||o)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=h?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var c=s.URL||s.webkitURL,f=c.createObjectURL(e);i?i.location=f:location.href=f,i=null,setTimeout((function(){c.revokeObjectURL(f)}),4e4)}});s.saveAs=a.saveAs=a,e.exports=a}()}(y);var v=y.exports;const{toString:b}=Object.prototype,w=/["&<>]/,x={each:function(e,t){e&&(Array.isArray(e)?e.forEach(t):Object.keys(e).forEach((r=>{t(e[r],r)})))},some:function(e,t){return!!e&&(Array.isArray(e)?e.some(t):Object.keys(e).some((r=>t(e[r],r))))},every:function(e,t){return!e||(Array.isArray(e)?e.every(t):Object.keys(e).every((r=>t(e[r],r))))},map:function(e,t){return e?Array.isArray(e)?e.map(t):Object.keys(e).map((r=>t(e[r],r))):[]},keyBy:(e,t)=>e.reduce(((e,r)=>(e[r[t]]=r,e)),{}),isEqual:function(e,t){const r=typeof e,n=typeof t,i=Array.isArray(e),s=Array.isArray(t);let o;if(r!==n)return!1;if("object"==typeof e){if(i||s)return!(!i||!s)&&(e.length===t.length&&e.every(((e,r)=>{const n=t[r];return x.isEqual(e,n)})));if(null===e||null===t)return e===t;if(o=Object.keys(e),Object.keys(t).length!==o.length)return!1;for(const e of o)if(!t.hasOwnProperty(e))return!1;return x.every(e,((e,r)=>{const n=t[r];return x.isEqual(e,n)}))}return e===t},escapeHtml(e){const t=w.exec(e);if(!t)return e;let r="",n="",i=0,s=t.index;for(;s<e.length;s++){switch(e.charAt(s)){case'"':n=""";break;case"&":n="&";break;case"'":n="'";break;case"<":n="<";break;case">":n=">";break;default:continue}i!==s&&(r+=e.substring(i,s)),i=s+1,r+=n}return i!==s?r+e.substring(i,s):r},strcmp:(e,t)=>e<t?-1:e>t?1:0,isUndefined:e=>"[object Undefined]"===b.call(e),isObject:e=>"[object Object]"===b.call(e),deepMerge(){const e=arguments[0]||{},{length:t}=arguments;let r,n,i;function s(t,s){r=e[s],i=Array.isArray(t),x.isObject(t)||i?(i?(i=!1,n=r&&Array.isArray(r)?r:[]):n=r&&x.isObject(r)?r:{},e[s]=x.deepMerge(n,t)):x.isUndefined(t)||(e[s]=t)}for(let e=0;e<t;e++)x.each(arguments[e],s);return e}};var k=x;const S=/^[A-Z]+\d+$/,E={_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:e=>e<=26?1:e<=676?2:3,_fill(e){let t,r,n,i,s,o=1;if(e>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&e>=1){for(;o<=26;)t=this._dictionary[o-1],this._n2l[o]=t,this._l2n[t]=o,o++;this._l2nFill=1}if(this._l2nFill<2&&e>=2){for(o=27;o<=702;)r=o-27,n=r%26,i=Math.floor(r/26),t=this._dictionary[i]+this._dictionary[n],this._n2l[o]=t,this._l2n[t]=o,o++;this._l2nFill=2}if(this._l2nFill<3&&e>=3){for(o=703;o<=16384;)r=o-703,n=r%26,i=Math.floor(r/26)%26,s=Math.floor(r/676),t=this._dictionary[s]+this._dictionary[i]+this._dictionary[n],this._n2l[o]=t,this._l2n[t]=o,o++;this._l2nFill=3}},l2n(e){if(this._l2n[e]||this._fill(e.length),!this._l2n[e])throw new Error(`Out of bounds. Invalid column letter: ${e}`);return this._l2n[e]},n2l(e){if(e<1||e>16384)throw new Error(`${e} is out of bounds. Excel supports columns from 1 to 16384`);return this._n2l[e]||this._fill(this._level(e)),this._n2l[e]},_hash:{},validateAddress(e){if(!S.test(e))throw new Error(`Invalid Address: ${e}`);return!0},decodeAddress(e){const t=e.length<5&&this._hash[e];if(t)return t;let r=!1,n="",i=0,s=!1,o="",a=0;for(let t,l=0;l<e.length;l++)if(t=e.charCodeAt(l),!s&&t>=65&&t<=90)r=!0,n+=e[l],i=26*i+t-64;else if(t>=48&&t<=57)s=!0,o+=e[l],a=10*a+t-48;else if(s&&r&&36!==t)break;if(r){if(i>16384)throw new Error(`Out of bounds. Invalid column letter: ${n}`)}else i=void 0;s||(a=void 0);const l={address:e=n+o,col:i,row:a,$col$row:`$${n}$${o}`};return i<=100&&a<=100&&(this._hash[e]=l,this._hash[l.$col$row]=l),l},getAddress(e,t){if(t){const r=this.n2l(t)+e;return this.decodeAddress(r)}return this.decodeAddress(e)},decode(e){const t=e.split(":");if(2===t.length){const e=this.decodeAddress(t[0]),r=this.decodeAddress(t[1]),n={top:Math.min(e.row,r.row),left:Math.min(e.col,r.col),bottom:Math.max(e.row,r.row),right:Math.max(e.col,r.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(e)},decodeEx(e){const t=e.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),r=t[1]||t[2],n=t[3],i=n.split(":");if(i.length>1){let e=this.decodeAddress(i[0]),t=this.decodeAddress(i[1]);const n=Math.min(e.row,t.row),s=Math.min(e.col,t.col),o=Math.max(e.row,t.row),a=Math.max(e.col,t.col);return e=this.n2l(s)+n,t=this.n2l(a)+o,{top:n,left:s,bottom:o,right:a,sheetName:r,tl:{address:e,col:s,row:n,$col$row:`$${this.n2l(s)}$${n}`,sheetName:r},br:{address:t,col:a,row:o,$col$row:`$${this.n2l(a)}$${o}`,sheetName:r},dimensions:`${e}:${t}`}}if(n.startsWith("#"))return r?{sheetName:r,error:n}:{error:n};const s=this.decodeAddress(n);return r?{sheetName:r,...s}:s},encodeAddress:(e,t)=>E.n2l(t)+e,encode(){switch(arguments.length){case 2:return E.encodeAddress(arguments[0],arguments[1]);case 4:return`${E.encodeAddress(arguments[0],arguments[1])}:${E.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(e,t){const[r,n,,i,s]=e,[o,a]=t;return o>=r&&o<=i&&a>=n&&a<=s}};var T=E;const C=T;var O=class e{constructor(){this.decode(arguments)}setTLBR(e,t,r,n,i){if(arguments.length<4){const n=C.decodeAddress(e),s=C.decodeAddress(t);this.model={top:Math.min(n.row,s.row),left:Math.min(n.col,s.col),bottom:Math.max(n.row,s.row),right:Math.max(n.col,s.col),sheetName:r},this.setTLBR(n.row,n.col,s.row,s.col,i)}else this.model={top:Math.min(e,r),left:Math.min(t,n),bottom:Math.max(e,r),right:Math.max(t,n),sheetName:i}}decode(t){switch(t.length){case 5:this.setTLBR(t[0],t[1],t[2],t[3],t[4]);break;case 4:this.setTLBR(t[0],t[1],t[2],t[3]);break;case 3:this.setTLBR(t[0],t[1],t[2]);break;case 2:this.setTLBR(t[0],t[1]);break;case 1:{const r=t[0];if(r instanceof e)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{const e=C.decodeEx(r);e.top?this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName}:this.model={top:e.row,left:e.col,bottom:e.row,right:e.col,sheetName:e.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() - ${t.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(){const{sheetName:e}=this.model;return e?/^[a-zA-Z0-9]*$/.test(e)?`${e}!`:`'${e}'!`:""}expand(e,t,r,n){(!this.model.top||e<this.top)&&(this.top=e),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||r>this.bottom)&&(this.bottom=r),(!this.model.right||n>this.right)&&(this.right=n)}expandRow(e){if(e){const{dimensions:t,number:r}=e;t&&this.expand(r,t.min,r,t.max)}}expandToAddress(e){const t=C.decodeEx(e);this.expand(t.row,t.col,t.row,t.col)}get tl(){return C.n2l(this.left)+this.top}get $t$l(){return`$${C.n2l(this.left)}$${this.top}`}get br(){return C.n2l(this.right)+this.bottom}get $b$r(){return`$${C.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){const t=C.decodeEx(e);return this.containsEx(t)}containsEx(e){return(!e.sheetName||!this.sheetName||e.sheetName===this.sheetName)&&(e.row>=this.top&&e.row<=this.bottom&&e.col>=this.left&&e.col<=this.right)}forEachAddress(e){for(let t=this.left;t<=this.right;t++)for(let r=this.top;r<=this.bottom;r++)e(C.encodeAddress(r,t),r,t)}},R={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!"}};const A=T,N=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,I=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;var P={slideFormula:function(e,t,r){const n=A.decode(t),i=A.decode(r);return e.replace(N,((e,t,r,s,o)=>{if(o)return e;const a=I.exec(s);if(a){const r=a[1],s=a[2].toUpperCase(),o=a[3],l=a[4];if(s.length>3||3===s.length&&s>"XFD")return e;let h=A.l2n(s),u=parseInt(l,10);r||(h+=i.col-n.col),o||(u+=i.row-n.row);return(t||"")+(r||"")+A.n2l(h)+(o||"")+u}return e}))}};const F=k;let D=class e{constructor(e){this.note=e}get model(){let t=null;if("string"==typeof this.note)t={type:"note",note:{texts:[{text:this.note}]}};else t={type:"note",note:this.note};return F.deepMerge({},e.DEFAULT_CONFIGS,t)}set model(e){const{note:t}=e,{texts:r}=t;1===r.length&&1===Object.keys(r[0]).length?this.note=r[0].text:this.note=t}static fromModel(t){const r=new e;return r.model=t,r}};D.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}};var j=D;const M=T,L=k,B=R,{slideFormula:z}=P,$=j;let H=class e{constructor(t,r,n){if(!t||!r)throw new Error("A Cell needs a Row");this._row=t,this._column=r,M.validateAddress(n),this._address=n,this._value=U.create(e.Types.Null,this),this.style=this._mergeStyle(t.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,t,r){const n=e&&e.numFmt||t&&t.numFmt;n&&(r.numFmt=n);const i=e&&e.font||t&&t.font;i&&(r.font=i);const s=e&&e.alignment||t&&t.alignment;s&&(r.alignment=s);const o=e&&e.border||t&&t.border;o&&(r.border=o);const a=e&&e.fill||t&&t.fill;a&&(r.fill=a);const l=e&&e.protection||t&&t.protection;return l&&(r.protection=l),r}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===e.Types.Merge}merge(t,r){this._value.release(),this._value=U.create(e.Types.Merge,this,t),r||(this.style=t.style)}unmerge(){this.type===e.Types.Merge&&(this._value.release(),this._value=U.create(e.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(t){return this._value.type===e.Types.Merge&&this._value.isMergedTo(t)}get master(){return this.type===e.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===e.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(t){this.type!==e.Types.Merge?(this._value.release(),this._value=U.create(U.getType(t),this,t)):this._value.master.value=t}get note(){return this._comment&&this._comment.note}set note(e){this._comment=new $(e)}get text(){return this._value.toString()}get html(){return L.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(t){this.type===e.Types.String&&(this._value=U.create(e.Types.Hyperlink,this,{text:this._value.value,hyperlink:t}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{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){const{definedNames:t}=this.workbook;t.removeAllNames(this.fullAddress),e.forEach((e=>{t.addEx(this.fullAddress,e)}))}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(){const{model:e}=this._value;return e.style=this.style,this._comment&&(e.comment=this._comment.model),e}set model(e){if(this._value.release(),this._value=U.create(e.type,this),this._value.model=e,e.comment&&"note"===e.comment.type)this._comment=$.fromModel(e.comment);e.style?this.style=e.style:this.style={}}};H.Types=B.ValueType;const U={getType:e=>null==e?H.Types.Null:e instanceof String||"string"==typeof e?H.Types.String:"number"==typeof e?H.Types.Number:"boolean"==typeof e?H.Types.Boolean:e instanceof Date?H.Types.Date:e.text&&e.hyperlink?H.Types.Hyperlink:e.formula||e.sharedFormula?H.Types.Formula:e.richText?H.Types.RichText:e.sharedString?H.Types.SharedString:e.error?H.Types.Error:H.Types.JSON,types:[{t:H.Types.Null,f:class{constructor(e){this.model={address:e.address,type:H.Types.Null}}get value(){return null}set value(e){}get type(){return H.Types.Null}get effectiveType(){return H.Types.Null}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return""}release(){}toString(){return""}}},{t:H.Types.Number,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Number,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.Number}get effectiveType(){return H.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()}}},{t:H.Types.String,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.String,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.String}get effectiveType(){return H.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}}},{t:H.Types.Date,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Date,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.Date}get effectiveType(){return H.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()}}},{t:H.Types.Hyperlink,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Hyperlink,text:t?t.text:void 0,hyperlink:t?t.hyperlink:void 0},t&&t.tooltip&&(this.model.tooltip=t.tooltip)}get value(){const 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 H.Types.Hyperlink}get effectiveType(){return H.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}}},{t:H.Types.Formula,f:class{constructor(e,t){this.cell=e,this.model={address:e.address,type:H.Types.Formula,shareType:t?t.shareType:void 0,ref:t?t.ref:void 0,formula:t?t.formula:void 0,sharedFormula:t?t.sharedFormula:void 0,result:t?t.result:void 0}}_copyModel(e){const t={},r=r=>{const n=e[r];n&&(t[r]=n)};return r("formula"),r("result"),r("ref"),r("shareType"),r("sharedFormula"),t}get value(){return this._copyModel(this.model)}set value(e){this.model=this._copyModel(e)}validate(e){switch(U.getType(e)){case H.Types.Null:case H.Types.String:case H.Types.Number:case H.Types.Date:break;case H.Types.Hyperlink:case H.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells: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)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(e){this.model.formula=e}get formulaType(){return this.model.formula?B.FormulaType.Master:this.model.sharedFormula?B.FormulaType.Shared:B.FormulaType.None}get result(){return this.model.result}set result(e){this.model.result=e}get type(){return H.Types.Formula}get effectiveType(){const e=this.model.result;return null==e?B.ValueType.Null:e instanceof String||"string"==typeof e?B.ValueType.String:"number"==typeof e?B.ValueType.Number:e instanceof Date?B.ValueType.Date:e.text&&e.hyperlink?B.ValueType.Hyperlink:e.formula?B.ValueType.Formula:B.ValueType.Null}get address(){return this.model.address}set address(e){this.model.address=e}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:e}=this.cell,t=e.findCell(this.model.sharedFormula);this._translatedFormula=t&&z(t.formula,t.address,this.model.address)}return this._translatedFormula}toCsvString(){return`${this.model.result||""}`}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:H.Types.Merge,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Merge,master:t?t.address:void 0},this._master=t,t&&t.addMergeRef()}get value(){return this._master.value}set value(e){e instanceof H?(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 H.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()}}},{t:H.Types.JSON,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.String,value:JSON.stringify(t),rawValue:t}}get value(){return this.model.rawValue}set value(e){this.model.rawValue=e,this.model.value=JSON.stringify(e)}get type(){return H.Types.String}get effectiveType(){return H.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}}},{t:H.Types.SharedString,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.SharedString,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.SharedString}get effectiveType(){return H.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()}}},{t:H.Types.RichText,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.String,value:t}}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 H.Types.RichText}get effectiveType(){return H.Types.RichText}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:H.Types.Boolean,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Boolean,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.Boolean}get effectiveType(){return H.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()}}},{t:H.Types.Error,f:class{constructor(e,t){this.model={address:e.address,type:H.Types.Error,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return H.Types.Error}get effectiveType(){return H.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()}}}].reduce(((e,t)=>(e[t.t]=t.f,e)),[]),create(e,t,r){const n=this.types[e];if(!n)throw new Error(`Could not create Value of type ${e}`);return new n(t,r)}};const V=k,W=R,q=T,X=H;var Z=class{constructor(e,t){this._worksheet=e,this._number=t,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 t=this._cells[e.col-1];if(!t){const r=this._worksheet.getColumn(e.col);t=new X(this,r,e.address),this._cells[e.col-1]=t}return t}getCell(e){if("string"==typeof e){const t=this._worksheet.getColumnKey(e);e=t?t.number:q.l2n(e)}return this._cells[e-1]||this.getCellEx({address:q.encodeAddress(this._number,e),row:this._number,col:e})}splice(e,t){const r=e+t;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];const o=i.length-t,a=this._cells.length;let l,h,u;if(o<0)for(l=e+i.length;l<=a;l++)u=this._cells[l-1],h=this._cells[l-o-1],h?(u=this.getCell(l),u.value=h.value,u.style=h.style,u._comment=h._comment):u&&(u.value=null,u.style={},u._comment=void 0);else if(o>0)for(l=a;l>=r;l--)h=this._cells[l-1],h?(u=this.getCell(l+o),u.value=h.value,u.style=h.style,u._comment=h._comment):this._cells[l+o-1]=void 0;for(l=0;l<i.length;l++)u=this.getCell(e+l),u.value=i[l],u.style={},u._comment=void 0}eachCell(e,t){if(t||(t=e,e=null),e&&e.includeEmpty){const e=this._cells.length;for(let r=1;r<=e;r++)t(this.getCell(r),r)}else this._cells.forEach(((e,r)=>{e&&e.type!==W.ValueType.Null&&t(e,r+1)}))}addPageBreak(e,t){const r=this._worksheet,n=Math.max(0,e-1)||0,i=Math.max(0,t-1)||16838,s={id:this._number,max:i,man:1};n&&(s.min=n),r.rowBreaks.push(s)}get values(){const e=[];return this._cells.forEach((t=>{t&&t.type!==W.ValueType.Null&&(e[t.col]=t.value)})),e}set values(e){if(this._cells=[],e)if(e instanceof Array){let t=0;e.hasOwnProperty("0")&&(t=1),e.forEach(((e,r)=>{void 0!==e&&(this.getCellEx({address:q.encodeAddress(this._number,r+t),row:this._number,col:r+t}).value=e)}))}else this._worksheet.eachColumnKey(((t,r)=>{void 0!==e[r]&&(this.getCellEx({address:q.encodeAddress(this._number,t.number),row:this._number,col:t.number}).value=e[r])}));else;}get hasValues(){return V.some(this._cells,(e=>e&&e.type!==W.ValueType.Null))}get cellCount(){return this._cells.length}get actualCellCount(){let e=0;return this.eachCell((()=>{e++})),e}get dimensions(){let e=0,t=0;return this._cells.forEach((r=>{r&&r.type!==W.ValueType.Null&&((!e||e>r.col)&&(e=r.col),t<r.col&&(t=r.col))})),e>0?{min:e,max:t}:null}_applyStyle(e,t){return this.style[e]=t,this._cells.forEach((r=>{r&&(r[e]=t)})),t}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(){const e=[];let t=0,r=0;return this._cells.forEach((n=>{if(n){const i=n.model;i&&((!t||t>n.col)&&(t=n.col),r<n.col&&(r=n.col),e.push(i))}})),this.height||e.length?{cells:e,number:this.number,min:t,max:r,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");let t;this._cells=[],e.cells.forEach((e=>{switch(e.type){case X.Types.Merge:break;default:{let r;if(e.address)r=q.decodeAddress(e.address);else if(t){const{row:e}=t,n=t.col+1;r={row:e,col:n,address:q.encodeAddress(e,n),$col$row:`$${q.n2l(n)}$${e}`}}t=r;this.getCellEx(r).model=e;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))||{}}};const G=k,Y=R,K=T;var Q=class e{constructor(e,t,r){this._worksheet=e,this._number=t,!1!==r&&(this.defn=r)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return K.n2l(this._number)}get isCustomWidth(){return void 0!==this.width&&9!==this.width}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=void 0!==e.width?e.width:9,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){void 0!==e?(this._header=e,this.headers.forEach(((e,t)=>{this._worksheet.getCell(t+1,this.number).value=e}))):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&&G.isEqual(this.style,e.style)}get isDefault(){if(this.isCustomWidth)return!1;if(this.hidden)return!1;if(this.outlineLevel)return!1;const 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,t){const r=this.number;t||(t=e,e=null),this._worksheet.eachRow(e,((e,n)=>{t(e.getCell(r),n)}))}get values(){const e=[];return this.eachCell(((t,r)=>{t&&t.type!==Y.ValueType.Null&&(e[r]=t.value)})),e}set values(e){if(!e)return;const t=this.number;let r=0;e.hasOwnProperty("0")&&(r=1),e.forEach(((e,n)=>{this._worksheet.getCell(n+r,t).value=e}))}_applyStyle(e,t){return this.style[e]=t,this.eachCell((r=>{r[e]=t})),t}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){const t=[];let r=null;return e&&e.forEach(((e,n)=>{e.isDefault?r&&(r=null):r&&e.equivalentTo(r)?r.max=n+1:(r={min:n+1,max:n+1,width:void 0!==e.width?e.width:9,style:e.style,isCustomWidth:e.isCustomWidth,hidden:e.hidden,outlineLevel:e.outlineLevel,collapsed:e.collapsed},t.push(r))})),t.length?t:void 0}static fromModel(t,r){const n=[];let i=1,s=0;for(r=(r=r||[]).sort((function(e,t){return e.min-t.min}));s<r.length;){const o=r[s++];for(;i<o.min;)n.push(new e(t,i++));for(;i<=o.max;)n.push(new e(t,i++,o))}return n.length?n:null}};const J=T;var ee=class e{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.worksheet=e,t)if("string"==typeof t){const e=J.decodeAddress(t);this.nativeCol=e.col+r,this.nativeColOff=0,this.nativeRow=e.row+r,this.nativeRowOff=0}else void 0!==t.nativeCol?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):void 0!==t.col?(this.col=t.col+r,this.row=t.row+r):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(t){return t instanceof e||null==t?t:new e(t)}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(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):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}};const te=T,re=ee;var ne=class{constructor(e,t){this.worksheet=e,this.model=t}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(e){let{type:t,imageId:r,range:n,hyperlinks:i}=e;if(this.type=t,this.imageId=r,"image"===t)if("string"==typeof n){const e=te.decode(n);this.range={tl:new re(this.worksheet,{col:e.left,row:e.top},-1),br:new re(this.worksheet,{col:e.right,row:e.bottom},0),editAs:"oneCell"}}else this.range={tl:new re(this.worksheet,n.tl,0),br:n.br&&new re(this.worksheet,n.br,0),ext:n.ext,editAs:n.editAs,hyperlinks:i||n.hyperlinks}}};const ie=T;var se=class{constructor(e,t){this.worksheet=e,t&&(this.table=t,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(){const{table:e}=this,t=(e,t,r)=>{void 0===e[t]&&(e[t]=r)};t(e,"headerRow",!0),t(e,"totalsRow",!1),t(e,"style",{}),t(e.style,"theme","TableStyleMedium2"),t(e.style,"showFirstColumn",!1),t(e.style,"showLastColumn",!1),t(e.style,"showRowStripes",!1),t(e.style,"showColumnStripes",!1);const r=(e,t)=>{if(!e)throw new Error(t)};r(e.ref,"Table must have ref"),r(e.columns,"Table must have column definitions"),r(e.rows,"Table must have row definitions"),e.tl=ie.decodeAddress(e.ref);const{row:n,col:i}=e.tl;r(n>0,"Table must be on valid row"),r(i>0,"Table must be on valid col");const{width:s,filterHeight:o,tableHeight:a}=this;e.autoFilterRef=ie.encode(n,i,n+o-1,i+s-1),e.tableRef=ie.encode(n,i,n+a-1,i+s-1),e.columns.forEach(((e,n)=>{r(e.name,`Column ${n} must have a name`),0===n?t(e,"totalsRowLabel","Total"):(t(e,"totalsRowFunction","none"),e.totalsRowFormula=this.getFormula(e))}))}store(){const e=(e,t)=>{t&&Object.keys(t).forEach((r=>{e[r]=t[r]}))},{worksheet:t,table:r}=this,{row:n,col:i}=r.tl;let s=0;if(r.headerRow){const o=t.getRow(n+s++);r.columns.forEach(((t,r)=>{const{style:n,name:s}=t,a=o.getCell(i+r);a.value=s,e(a,n)}))}if(r.rows.forEach((o=>{const a=t.getRow(n+s++);o.forEach(((t,n)=>{const s=a.getCell(i+n);s.value=t,e(s,r.columns[n].style)}))})),r.totalsRow){const o=t.getRow(n+s++);r.columns.forEach(((t,r)=>{const n=o.getCell(i+r);if(0===r)n.value=t.totalsRowLabel;else{const e=this.getFormula(t);n.value=e?{formula:t.totalsRowFormula,result:t.totalsRowResult}:null}e(n,t.style)}))}}load(e){const{table:t}=this,{row:r,col:n}=t.tl;let i=0;if(t.headerRow){const s=e.getRow(r+i++);t.columns.forEach(((e,t)=>{s.getCell(n+t).value=e.name}))}if(t.rows.forEach((t=>{const s=e.getRow(r+i++);t.forEach(((e,t)=>{s.getCell(n+t).value=e}))})),t.totalsRow){const s=e.getRow(r+i++);t.columns.forEach(((e,t)=>{const r=s.getCell(n+t);if(0===t)r.value=e.totalsRowLabel;else{this.getFormula(e)&&(r.value={formula:e.totalsRowFormula,result:e.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();const e=ie.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let t=0;t<this._cache.tableHeight;t++){const r=this.worksheet.getRow(e.row+t);for(let t=0;t<this._cache.width;t++){r.getCell(e.col+t).value=null}}else{for(let t=this.tableHeight;t<this._cache.tableHeight;t++){const r=this.worksheet.getRow(e.row+t);for(let t=0;t<this._cache.width;t++){r.getCell(e.col+t).value=null}}for(let t=0;t<this.tableHeight;t++){const r=this.worksheet.getRow(e.row+t);for(let t=this.width;t<this._cache.width;t++){r.getCell(e.col+t).value=null}}}this.store()}addRow(e,t){this.cacheState(),void 0===t?this.table.rows.push(e):this.table.rows.splice(t,0,e)}removeRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.rows.splice(e,t)}getColumn(e){const t=this.table.columns[e];return new class{constructor(e,t,r){this.table=e,this.column=t,this.index=r}_set(e,t){this.table.cacheState(),this.column[e]=t}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)}}(this,t,e)}addColumn(e,t,r){this.cacheState(),void 0===r?(this.table.columns.push(e),this.table.rows.forEach(((e,r)=>{e.push(t[r])}))):(this.table.columns.splice(r,0,e),this.table.rows.forEach(((e,n)=>{e.splice(r,0,t[n])})))}removeColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.columns.splice(e,t),this.table.rows.forEach((r=>{r.splice(e,t)}))}_assign(e,t,r){this.cacheState(),e[t]=r}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}};var oe=class{constructor(e){this.model=e||{}}add(e,t){return this.model[e]=t}find(e){return this.model[e]}remove(e){this.model[e]=void 0}};const ae=t,le={hash(e){const t=ae.createHash(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return t.update(Buffer.concat(n)),t.digest()},convertPasswordToHash(e,t,r,n){t=t.toLowerCase();if(ae.getHashes().indexOf(t)<0)throw new Error(`Hash algorithm '${t}' not supported!`);const i=Buffer.from(e,"utf16le");let s=this.hash(t,Buffer.from(r,"base64"),i);for(let e=0;e<n;e++){const r=Buffer.alloc(4);r.writeUInt32LE(e,0),s=this.hash(t,s,r)}return s.toString("base64")},randomBytes:e=>ae.randomBytes(e)};var he=le,ue={};const ce=(e,t)=>({...e,...t.reduce(((t,r)=>(e[r]&&(t[r]={...e[r]}),t)),{})}),fe=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];e[r]&&(t[r]=ce(e[r],n))};ue.copyStyle=e=>{if(!e)return e;if(t=e,0===Object.keys(t).length)return{};var t;const r={...e};return fe(e,r,"font",["color"]),fe(e,r,"alignment"),fe(e,r,"protection"),e.border&&(fe(e,r,"border"),fe(e.border,r.border,"top",["color"]),fe(e.border,r.border,"left",["color"]),fe(e.border,r.border,"bottom",["color"]),fe(e.border,r.border,"right",["color"]),fe(e.border,r.border,"diagonal",["color"])),e.fill&&(fe(e,r,"fill",["fgColor","bgColor","center"]),e.fill.stops&&(r.fill.stops=e.fill.stops.map((e=>ce(e,["color"]))))),r};const de=k,pe=T,me=O,ge=Z,ye=Q,ve=R,_e=ne,be=se,we=oe,xe=he,{copyStyle:ke}=ue;var Se=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 we,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(void 0===e&&(e=`sheet${this.id}`),this._name!==e){if("string"!=typeof e)throw new Error("The name has to be a string.");if(""===e)throw new Error("The name can't be empty.");if("History"===e)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&&(e=e.substring(0,31)),this._workbook._worksheets.find((t=>t&&t.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(){const e=new me;return this._rows.forEach((t=>{if(t){const r=t.dimensions;r&&e.expand(t.number,r.min,t.number,r.max)}})),e}get columns(){return this._columns}set columns(e){this._headerRowCount=e.reduce(((e,t)=>{const r=(t.header?1:t.headers&&t.headers.length)||0;return Math.max(e,r)}),0);let t=1;const r=this._columns=[];e.forEach((e=>{const n=new ye(this,t++,!1);r.push(n),n.defn=e}))}getColumnKey(e){return this._keys[e]}setColumnKey(e,t){this._keys[e]=t}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){de.each(this._keys,e)}getColumn(e){if("string"==typeof e){const t=this._keys[e];if(t)return t;e=pe.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){let t=this._columns.length+1;for(;t<=e;)this._columns.push(new ye(this,t++))}return this._columns[e-1]}spliceColumns(e,t){const r=this._rows.length;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];if(i.length>0)for(let n=0;n<r;n++){const r=[e,t];i.forEach((e=>{r.push(e[n]||null)}));const s=this.getRow(n+1);s.splice.apply(s,r)}else this._rows.forEach((r=>{r&&r.splice(e,t)}));const o=i.length-t,a=e+t,l=this._columns.length;if(o<0)for(let t=e+i.length;t<=l;t++)this.getColumn(t).defn=this.getColumn(t-o).defn;else if(o>0)for(let e=l;e>=a;e--)this.getColumn(e+o).defn=this.getColumn(e).defn;for(let t=e;t<e+i.length;t++)this.getColumn(t).defn=null;this.workbook.definedNames.spliceColumns(this.name,e,t,i.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let e=0;return this.eachRow((t=>{e=Math.max(e,t.cellCount)})),e}get actualColumnCount(){const e=[];let t=0;return this.eachRow((r=>{r.eachCell((r=>{let{col:n}=r;e[n]||(e[n]=!0,t++)}))})),t}_commitRow(){}get _lastRowNumber(){const e=this._rows;let t=e.length;for(;t>0&&void 0===e[t-1];)t--;return t}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,t){return this._rows.slice(e-1,e-1+t)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let e=0;return this.eachRow((()=>{e++})),e}getRow(e){let t=this._rows[e-1];return t||(t=this._rows[e-1]=new ge(this,e)),t}getRows(e,t){if(t<1)return;const r=[];for(let n=e;n<e+t;n++)r.push(this.getRow(n));return r}addRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n";const r=this._nextRow,n=this.getRow(r);return n.values=e,this._setStyleOption(r,"i"===t[0]?t:"n"),n}addRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n";const r=[];return e.forEach((e=>{r.push(this.addRow(e,t))})),r}insertRow(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n";return this.spliceRows(e,0,t),this._setStyleOption(e,r),this.getRow(e)}insertRows(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n";if(this.spliceRows(e,0,...t),"n"!==r)for(let n=0;n<t.length;n++)"o"===r[0]&&void 0!==this.findRow(t.length+e+n)?this._copyStyle(t.length+e+n,e+n,"+"===r[1]):"i"===r[0]&&void 0!==this.findRow(e-1)&&this._copyStyle(e-1,e+n,"+"===r[1]);return this.getRows(e,t.length)}_setStyleOption(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n";"o"===t[0]&&void 0!==this.findRow(e+1)?this._copyStyle(e+1,e,"+"===t[1]):"i"===t[0]&&void 0!==this.findRow(e-1)&&this._copyStyle(e-1,e,"+"===t[1])}_copyStyle(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.getRow(e),i=this.getRow(t);i.style=ke(n.style),n.eachCell({includeEmpty:r},((e,t)=>{i.getCell(t).style=ke(e.style)})),i.height=n.height}duplicateRow(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this._rows[e-1],i=new Array(t).fill(n.values);this.spliceRows(e+1,r?0:t,...i);for(let r=0;r<t;r++){const t=this._rows[e+r];t.style=n.style,t.height=n.height,n.eachCell({includeEmpty:!0},((e,r)=>{t.getCell(r).style=e.style}))}}spliceRows(e,t){const r=e+t;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];const o=i.length,a=o-t,l=this._rows.length;let h,u;if(a<0)for(e===l&&(this._rows[l-1]=void 0),h=r;h<=l;h++)if(u=this._rows[h-1],u){const e=this.getRow(h+a);e.values=u.values,e.style=u.style,e.height=u.height,u.eachCell({includeEmpty:!0},((t,r)=>{e.getCell(r).style=t.style})),this._rows[h-1]=void 0}else this._rows[h+a-1]=void 0;else if(a>0)for(h=l;h>=r;h--)if(u=this._rows[h-1],u){const e=this.getRow(h+a);e.values=u.values,e.style=u.style,e.height=u.height,u.eachCell({includeEmpty:!0},((t,r)=>{if(e.getCell(r).style=t.style,"MergeValue"===t._value.constructor.name){const e=this.getRow(t._row._number+o).getCell(r),n=t._value._master,i=this.getRow(n._row._number+o).getCell(n._column._number);e.merge(i)}}))}else this._rows[h+a-1]=void 0;for(h=0;h<o;h++){const t=this.getRow(e+h);t.style={},t.values=i[h]}this.workbook.definedNames.spliceRows(this.name,e,t,o)}eachRow(e,t){if(t||(t=e,e=void 0),e&&e.includeEmpty){const e=this._rows.length;for(let r=1;r<=e;r++)t(this.getRow(r),r)}else this._rows.forEach((e=>{e&&e.hasValues&&t(e,e.number)}))}getSheetValues(){const e=[];return this._rows.forEach((t=>{t&&(e[t.number]=t.values)})),e}findCell(e,t){const r=pe.getAddress(e,t),n=this._rows[r.row-1];return n?n.findCell(r.col):void 0}getCell(e,t){const r=pe.getAddress(e,t);return this.getRow(r.row).getCellEx(r)}mergeCells(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new me(t);this._mergeCellsInternal(n)}mergeCellsWithoutStyle(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new me(t);this._mergeCellsInternal(n,!0)}_mergeCellsInternal(e,t){de.each(this._merges,(t=>{if(t.intersects(e))throw new Error("Cannot merge already merged cells")}));const r=this.getCell(e.top,e.left);for(let n=e.top;n<=e.bottom;n++)for(let i=e.left;i<=e.right;i++)(n>e.top||i>e.left)&&this.getCell(n,i).merge(r,t);this._merges[r.address]=e}_unMergeMaster(e){const t=this._merges[e.address];if(t){for(let e=t.top;e<=t.bottom;e++)for(let r=t.left;r<=t.right;r++)this.getCell(e,r).unmerge();delete this._merges[e.address]}}get hasMerges(){return de.some(this._merges,Boolean)}unMergeCells(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new me(t);for(let e=n.top;e<=n.bottom;e++)for(let t=n.left;t<=n.right;t++){const r=this.findCell(e,t);r&&(r.type===ve.ValueType.Merge?this._unMergeMaster(r.master):this._merges[r.address]&&this._unMergeMaster(r))}}fillFormula(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"shared";const i=pe.decode(e),{top:s,left:o,bottom:a,right:l}=i,h=l-o+1,u=pe.encodeAddress(s,o),c="shared"===n;let f;f="function"==typeof r?r:Array.isArray(r)?Array.isArray(r[0])?(e,t)=>r[e-s][t-o]:(e,t)=>r[(e-s)*h+(t-o)]:()=>{};let d=!0;for(let r=s;r<=a;r++)for(let i=o;i<=l;i++)d?(this.getCell(r,i).value={shareType:n,formula:t,ref:e,result:f(r,i)},d=!1):this.getCell(r,i).value=c?{sharedFormula:u,result:f(r,i)}:f(r,i)}addImage(e,t){const r={type:"image",imageId:e,range:t};this._media.push(new _e(this,r))}getImages(){return this._media.filter((e=>"image"===e.type))}addBackgroundImage(e){const t={type:"background",imageId:e};this._media.push(new _e(this,t))}getBackgroundImageId(){const e=this._media.find((e=>"background"===e.type));return e&&e.imageId}protect(e,t){return new Promise((r=>{this.sheetProtection={sheet:!0},t&&"spinCount"in t&&(t.spinCount=Number.isFinite(t.spinCount)?Math.round(Math.max(0,t.spinCount)):1e5),e&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=xe.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=t&&"spinCount"in t?t.spinCount:1e5,this.sheetProtection.hashValue=xe.convertPasswordToHash(e,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),t&&(this.sheetProtection=Object.assign(this.sheetProtection,t),!e&&"spinCount"in t&&delete this.sheetProtection.spinCount),r()}))}unprotect(){this.sheetProtection=null}addTable(e){const t=new be(this,e);return this.tables[e.name]=t,t}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){"number"==typeof e?this.conditionalFormattings.splice(e,1):this.conditionalFormattings=e instanceof Function?this.conditionalFormattings.filter(e):[]}get tabColor(){return this.properties.tabColor}set tabColor(e){this.properties.tabColor=e}get model(){const 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((e=>e.model)),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map((e=>e.model)),conditionalFormattings:this.conditionalFormattings};e.cols=ye.toModel(this.columns);const t=e.rows=[],r=e.dimensions=new me;return this._rows.forEach((e=>{const n=e&&e.model;n&&(r.expand(n.number,n.min,n.number,n.max),t.push(n))})),e.merges=[],de.each(this._merges,(t=>{e.merges.push(t.range)})),e}_parseRows(e){this._rows=[],e.rows.forEach((e=>{const t=new ge(this,e.number);this._rows[t.number-1]=t,t.model=e}))}_parseMergeCells(e){de.each(e.mergeCells,(e=>{this.mergeCellsWithoutStyle(e)}))}set model(e){this.name=e.name,this._columns=ye.fromModel(this,e.cols),this._parseRows(e),this._parseMergeCells(e),this.dataValidations=new we(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((e=>new _e(this,e))),this.sheetProtection=e.sheetProtection,this.tables=e.tables.reduce(((e,t)=>{const r=new be;return r.model=t,e[t.name]=r,e}),{}),this.conditionalFormattings=e.conditionalFormattings}};const Ee=k,Te=T;var Ce=class{constructor(e){this.template=e,this.sheets={}}addCell(e){this.addCellEx(Te.decodeEx(e))}getCell(e){return this.findCellEx(Te.decodeEx(e),!0)}findCell(e){return this.findCellEx(Te.decodeEx(e),!1)}findCellAt(e,t,r){const n=this.sheets[e],i=n&&n[t];return i&&i[r]}addCellEx(e){if(e.top)for(let t=e.top;t<=e.bottom;t++)for(let r=e.left;r<=e.right;r++)this.getCellAt(e.sheetName,t,r);else this.findCellEx(e,!0)}getCellEx(e){return this.findCellEx(e,!0)}findCellEx(e,t){const r=this.findSheet(e,t),n=this.findSheetRow(r,e,t);return this.findRowCell(n,e,t)}getCellAt(e,t,r){const n=this.sheets[e]||(this.sheets[e]=[]),i=n[t]||(n[t]=[]);return i[r]||(i[r]={sheetName:e,address:Te.n2l(r)+t,row:t,col:r})}removeCellEx(e){const t=this.findSheet(e);if(!t)return;const r=this.findSheetRow(t,e);r&&delete r[e.col]}forEachInSheet(e,t){const r=this.sheets[e];r&&r.forEach(((e,r)=>{e&&e.forEach(((e,n)=>{e&&t(e,r,n)}))}))}forEach(e){Ee.each(this.sheets,((t,r)=>{this.forEachInSheet(r,e)}))}map(e){const t=[];return this.forEach((r=>{t.push(e(r))})),t}findSheet(e,t){const r=e.sheetName;return this.sheets[r]?this.sheets[r]:t?this.sheets[r]=[]:void 0}findSheetRow(e,t,r){const{row:n}=t;return e&&e[n]?e[n]:r?e[n]=[]:void 0}findRowCell(e,t,r){const{col:n}=t;return e&&e[n]?e[n]:r?e[n]=this.template?Object.assign(t,JSON.parse(JSON.stringify(this.template))):t:void 0}spliceRows(e,t,r,n){const i=this.sheets[e];if(i){const e=[];for(let t=0;t<n;t++)e.push([]);i.splice(t,r,...e)}}spliceColumns(e,t,r,n){const i=this.sheets[e];if(i){const e=[];for(let t=0;t<n;t++)e.push(null);Ee.each(i,(n=>{n.splice(t,r,...e)}))}}};const Oe=k,Re=T,Ae=Ce,Ne=O,Ie=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;var Pe,Fe,De,je,Me,Le=class{constructor(){this.matrixMap={}}getMatrix(e){return this.matrixMap[e]||(this.matrixMap[e]=new Ae)}add(e,t){const r=Re.decodeEx(e);this.addEx(r,t)}addEx(e,t){const r=this.getMatrix(t);if(e.top)for(let t=e.left;t<=e.right;t++)for(let n=e.top;n<=e.bottom;n++){const i={sheetName:e.sheetName,address:Re.n2l(t)+n,row:n,col:t};r.addCellEx(i)}else r.addCellEx(e)}remove(e,t){const r=Re.decodeEx(e);this.removeEx(r,t)}removeEx(e,t){this.getMatrix(t).removeCellEx(e)}removeAllNames(e){Oe.each(this.matrixMap,(t=>{t.removeCellEx(e)}))}forEach(e){Oe.each(this.matrixMap,((t,r)=>{t.forEach((t=>{e(r,t)}))}))}getNames(e){return this.getNamesEx(Re.decodeEx(e))}getNamesEx(e){return Oe.map(this.matrixMap,((t,r)=>t.findCellEx(e)&&r)).filter(Boolean)}_explore(e,t){t.mark=!1;const{sheetName:r}=t,n=new Ne(t.row,t.col,t.row,t.col,r);let i,s;function o(i,s){const o=e.findCellAt(r,i,t.col);return!(!o||!o.mark)&&(n[s]=i,o.mark=!1,!0)}for(s=t.row-1;o(s,"top");s--);for(s=t.row+1;o(s,"bottom");s++);function a(t,i){const o=[];for(s=n.top;s<=n.bottom;s++){const n=e.findCellAt(r,s,t);if(!n||!n.mark)return!1;o.push(n)}n[i]=t;for(let e=0;e<o.length;e++)o[e].mark=!1;return!0}for(i=t.col-1;a(i,"left");i--);for(i=t.col+1;a(i,"right");i++);return n}getRanges(e,t){if(!(t=t||this.matrixMap[e]))return{name:e,ranges:[]};t.forEach((e=>{e.mark=!0}));const r=t.map((e=>e.mark&&this._explore(t,e))).filter(Boolean).map((e=>e.$shortRange));return{name:e,ranges:r}}normaliseMatrix(e,t){e.forEachInSheet(t,((e,t,r)=>{e&&(e.row===t&&e.col===r||(e.row=t,e.col=r,e.address=Re.n2l(r)+t))}))}spliceRows(e,t,r,n){Oe.each(this.matrixMap,(i=>{i.spliceRows(e,t,r,n),this.normaliseMatrix(i,e)}))}spliceColumns(e,t,r,n){Oe.each(this.matrixMap,(i=>{i.spliceColumns(e,t,r,n),this.normaliseMatrix(i,e)}))}get model(){return Oe.map(this.matrixMap,((e,t)=>this.getRanges(t,e))).filter((e=>e.ranges.length))}set model(e){const t=this.matrixMap={};e.forEach((e=>{const r=t[e.name]=new Ae;e.ranges.forEach((e=>{Ie.test(e.split("!").pop()||"")&&r.addCell(e)}))}))}},Be={},ze={},$e={},He={exports:{}},Ue={exports:{}};function Ve(){if(Pe)return Ue.exports;return Pe=1,"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?Ue.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,s,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(i=new Array(o-1),s=0;s<i.length;)i[s++]=arguments[s];return process.nextTick((function(){e.apply(null,i)}))}}}:Ue.exports=process,Ue.exports}function We(){return Me?je:(Me=1,je=n)}var qe,Xe={exports:{}};function Ze(){return qe||(qe=1,function(e,t){var r=s,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),i(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(Xe,Xe.exports)),Xe.exports}var Ge,Ye={};function Ke(){if(Ge)return Ye;function e(e){return Object.prototype.toString.call(e)}return Ge=1,Ye.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},Ye.isBoolean=function(e){return"boolean"==typeof e},Ye.isNull=function(e){return null===e},Ye.isNullOrUndefined=function(e){return null==e},Ye.isNumber=function(e){return"number"==typeof e},Ye.isString=function(e){return"string"==typeof e},Ye.isSymbol=function(e){return"symbol"==typeof e},Ye.isUndefined=function(e){return void 0===e},Ye.isRegExp=function(t){return"[object RegExp]"===e(t)},Ye.isObject=function(e){return"object"==typeof e&&null!==e},Ye.isDate=function(t){return"[object Date]"===e(t)},Ye.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},Ye.isFunction=function(e){return"function"==typeof e},Ye.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},Ye.isBuffer=s.Buffer.isBuffer,Ye}var Qe,Je,et={exports:{}},tt={exports:{}};function rt(){if(Je)return et.exports;Je=1;try{var e=require("util");if("function"!=typeof e.inherits)throw"";et.exports=e.inherits}catch(e){et.exports=(Qe||(Qe=1,"function"==typeof Object.create?tt.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:tt.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),tt.exports)}return et.exports}var nt,it,st,ot,at,lt,ht,ut,ct,ft={exports:{}};function dt(){return nt||(nt=1,function(e){var t=Ze().Buffer,r=o;function n(e,t,r){e.copy(t,r)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return t.alloc(0);for(var r=t.allocUnsafe(e>>>0),i=this.head,s=0;i;)n(i.data,r,s),s+=i.data.length,i=i.next;return r},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})}(ft)),ft.exports}function pt(){if(st)return it;st=1;var e=Ve();function t(e,t){e.emit("error",t)}return it={destroy:function(r,n){var i=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(n?n(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(t,this,r)):e.nextTick(t,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,(function(r){!n&&r?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,e.nextTick(t,i,r)):e.nextTick(t,i,r):n&&n(r)})),this)},undestroy:function(){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)}},it}function mt(){return at?ot:(at=1,ot=o.deprecate)}function gt(){if(ht)return lt;ht=1;var e=Ve();function t(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}lt=d;var r,n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:e.nextTick;d.WritableState=f;var i=Object.create(Ke());i.inherits=rt();var s={deprecate:mt()},o=We(),a=Ze().Buffer,l=(void 0!==p?p:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h,u=pt();function c(){}function f(i,s){r=r||yt(),i=i||{};var o=s instanceof r;this.objectMode=!!i.objectMode,o&&(this.objectMode=this.objectMode||!!i.writableObjectMode);var a=i.highWaterMark,l=i.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:o&&(l||0===l)?l:h,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 u=!1===i.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,r){var i=t._writableState,s=i.sync,o=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),r)!function(t,r,n,i,s){--r.pendingcb,n?(e.nextTick(s,i),e.nextTick(b,t,r),t._writableState.errorEmitted=!0,t.emit("error",i)):(s(i),t._writableState.errorEmitted=!0,t.emit("error",i),b(t,r))}(t,i,s,r,o);else{var a=v(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||y(t,i),s?n(g,t,i,a,o):g(t,i,a,o)}}(s,t)},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 t(this)}function d(e){if(r=r||yt(),!(h.call(d,this)||this instanceof r))return new d(e);this._writableState=new f(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function m(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function g(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),b(e,t)}function y(e,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(e._writev&&n&&n.next){var i=r.bufferedRequestCount,s=new Array(i),o=r.corkedRequestsFree;o.entry=n;for(var a=0,l=!0;n;)s[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;s.allBuffers=l,m(e,r,!0,r.length,s,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new t(r),r.bufferedRequestCount=0}else{for(;n;){var h=n.chunk,u=n.encoding,c=n.callback;if(m(e,r,!1,r.objectMode?1:h.length,h,u,c),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),b(e,t)}))}function b(t,r){var n=v(r);return n&&(!function(t,r){r.prefinished||r.finalCalled||("function"==typeof t._final?(r.pendingcb++,r.finalCalled=!0,e.nextTick(_,t,r)):(r.prefinished=!0,t.emit("prefinish")))}(t,r),0===r.pendingcb&&(r.finished=!0,t.emit("finish"))),n}return i.inherits(d,o),f.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(f.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===d&&(e&&e._writableState instanceof f)}})):h=function(e){return e instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,r,n){var i,s=this._writableState,o=!1,h=!s.objectMode&&(i=t,a.isBuffer(i)||i instanceof l);return h&&!a.isBuffer(t)&&(t=function(e){return a.from(e)}(t)),"function"==typeof r&&(n=r,r=null),h?r="buffer":r||(r=s.defaultEncoding),"function"!=typeof n&&(n=c),s.ended?function(t,r){var n=new Error("write after end");t.emit("error",n),e.nextTick(r,n)}(this,n):(h||function(t,r,n,i){var s=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||r.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),e.nextTick(i,o),s=!1),s}(this,s,t,n))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var l=t.objectMode?1:n.length;t.length+=l;var h=t.length<t.highWaterMark;h||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,l,n,i,s);return h}(this,s,h,t,r,n)),o},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||y(this,e))},d.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(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},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,r,n){var i=this._writableState;"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),null!=t&&this.write(t,r),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,r,n){r.ending=!0,b(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n));r.ended=!0,t.writable=!1}(this,i,n)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),d.prototype.destroy=u.destroy,d.prototype._undestroy=u.undestroy,d.prototype._destroy=function(e,t){this.end(),t(e)},lt}function yt(){if(ct)return ut;ct=1;var e=Ve(),t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};ut=l;var r=Object.create(Ke());r.inherits=rt();var n=Ot(),i=gt();r.inherits(l,n);for(var s=t(i.prototype),o=0;o<s.length;o++){var a=s[o];l.prototype[a]||(l.prototype[a]=i.prototype[a])}function l(e){if(!(this instanceof l))return new l(e);n.call(this,e),i.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||e.nextTick(u,this)}function u(e){e.end()}return Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),l.prototype._destroy=function(t,r){this.push(null),this.end(),e.nextTick(r,t)},ut}var vt,_t,bt,wt,xt,kt,St,Et,Tt={};function Ct(){if(vt)return Tt;vt=1;var e=Ze().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.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 r(r){var n;switch(this.encoding=function(r){var n=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=s,this.end=o,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=a,this.end=l,n=3;break;default:return this.write=h,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function o(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function a(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}return Tt.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var s=n(t[i]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--i<r||-2===s)return 0;if(s=n(t[i]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--i<r||-2===s)return 0;if(s=n(t[i]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},Tt}function Ot(){if(bt)return _t;bt=1;var e=Ve();_t=v;var t,r=function(){if(De)return Fe;De=1;var e={}.toString;return Fe=Array.isArray||function(t){return"[object Array]"==e.call(t)}}();v.ReadableState=y,i.EventEmitter;var n=function(e,t){return e.listeners(t).length},s=We(),a=Ze().Buffer,l=(void 0!==p?p:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h=Object.create(Ke());h.inherits=rt();var u=o,c=void 0;c=u&&u.debuglog?u.debuglog("stream"):function(){};var f,d=dt(),m=pt();h.inherits(v,s);var g=["error","close","destroy","pause","resume"];function y(e,r){e=e||{};var n=r instanceof(t=t||yt());this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=Ct().StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function v(e){if(t=t||yt(),!(this instanceof v))return new v(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function _(e,t,r,n,i){var s,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,o)):(i||(s=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):b(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?b(e,o,t,!1):E(e,o)):b(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function b(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),E(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},v.prototype.unshift=function(e){return _(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return f||(f=Ct().StringDecoder),this._readableState.decoder=new f(e),this._readableState.encoding=e,this};var w=8388608;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=w?e=w:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(c("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(S,t):S(t))}function S(e){c("emit readable"),e.emit("readable"),R(e)}function E(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(T,t,r))}function T(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(c("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function C(e){c("readable nexttick read 0"),e.read(0)}function O(e,t){t.reading||(c("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function A(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=a.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),0===(e-=o)){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function N(t){var r=t._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,e.nextTick(I,r,t))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return v.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?N(this):k(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&N(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(r,t))),null===(n=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&N(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,i){var s=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,c("pipe count=%d opts=%j",o.pipesCount,i);var a=(!i||!1!==i.end)&&t!==process.stdout&&t!==process.stderr?h:v;function l(e,r){c("onunpipe"),e===s&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",m),t.removeListener("unpipe",l),s.removeListener("end",h),s.removeListener("end",v),s.removeListener("data",p),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function h(){c("onend"),t.end()}o.endEmitted?e.nextTick(a):s.once("end",a),t.on("unpipe",l);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n(e,"data")&&(t.flowing=!0,R(e))}}(s);t.on("drain",u);var f=!1;var d=!1;function p(e){c("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==P(o.pipes,t))&&!f&&(c("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),s.pause())}function m(e){c("onerror",e),v(),t.removeListener("error",m),0===n(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",y),v()}function y(){c("onfinish"),t.removeListener("close",g),v()}function v(){c("unpipe"),s.unpipe(t)}return s.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",m),t.once("close",g),t.once("finish",y),t.emit("pipe",s),o.flowing||(c("pipe resume"),s.resume()),t},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=P(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},v.prototype.on=function(t,r){var n=s.prototype.on.call(this,t,r);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&k(this):e.nextTick(C,this))}return n},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!0,function(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(O,t,r))}(this,t)),this},v.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=A,_t}function Rt(){if(xt)return wt;xt=1,wt=n;var e=yt(),t=Object.create(Ke());function r(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function n(t){if(!(this instanceof n))return new n(t);e.call(this,t),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",i)}function i(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){s(e,t,r)})):s(this,null,null)}function s(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}return t.inherits=rt(),t.inherits(n,e),n.prototype.push=function(t,r){return this._transformState.needTransform=!1,e.prototype.push.call(this,t,r)},n.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},n.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},n.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},n.prototype._destroy=function(t,r){var n=this;e.prototype._destroy.call(this,t,(function(e){r(e),n.emit("close")}))},wt}function At(){return Et||(Et=1,function(e,t){var r=n;"disable"===process.env.READABLE_STREAM&&r?(e.exports=r,(t=e.exports=r.Readable).Readable=r.Readable,t.Writable=r.Writable,t.Duplex=r.Duplex,t.Transform=r.Transform,t.PassThrough=r.PassThrough,t.Stream=r):((t=e.exports=Ot()).Stream=r||t,t.Readable=t,t.Writable=gt(),t.Duplex=yt(),t.Transform=Rt(),t.PassThrough=function(){if(St)return kt;St=1,kt=r;var e=Rt(),t=Object.create(Ke());function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t.inherits=rt(),t.inherits(r,e),r.prototype._transform=function(e,t,r){r(null,e)},kt}())}(He,He.exports)),He.exports}if($e.base64=!0,$e.array=!0,$e.string=!0,$e.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,$e.nodebuffer="undefined"!=typeof Buffer,$e.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)$e.blob=!1;else{var Nt=new ArrayBuffer(0);try{$e.blob=0===new Blob([Nt],{type:"application/zip"}).size}catch(e){try{var It=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);It.append(Nt),$e.blob=0===It.getBlob("application/zip").size}catch(e){$e.blob=!1}}}try{$e.nodestream=!!At().Readable}catch(e){$e.nodestream=!1}var Pt,Ft={};function Dt(){if(Pt)return Ft;Pt=1;var e=Vt(),t=$e,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return Ft.encode=function(t){for(var n,i,s,o,a,l,h,u=[],c=0,f=t.length,d=f,p="string"!==e.getTypeOf(t);c<t.length;)d=f-c,p?(n=t[c++],i=c<f?t[c++]:0,s=c<f?t[c++]:0):(n=t.charCodeAt(c++),i=c<f?t.charCodeAt(c++):0,s=c<f?t.charCodeAt(c++):0),o=n>>2,a=(3&n)<<4|i>>4,l=d>1?(15&i)<<2|s>>6:64,h=d>2?63&s:64,u.push(r.charAt(o)+r.charAt(a)+r.charAt(l)+r.charAt(h));return u.join("")},Ft.decode=function(e){var n,i,s,o,a,l,h=0,u=0,c="data:";if(e.substr(0,5)===c)throw new Error("Invalid base64 input, it looks like a data url.");var f,d=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===r.charAt(64)&&d--,e.charAt(e.length-2)===r.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(f=t.uint8array?new Uint8Array(0|d):new Array(0|d);h<e.length;)n=r.indexOf(e.charAt(h++))<<2|(o=r.indexOf(e.charAt(h++)))>>4,i=(15&o)<<4|(a=r.indexOf(e.charAt(h++)))>>2,s=(3&a)<<6|(l=r.indexOf(e.charAt(h++))),f[u++]=n,64!==a&&(f[u++]=i),64!==l&&(f[u++]=s);return f},Ft}var jt,Mt,Lt,Bt,zt={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}};var $t=null;$t="undefined"!=typeof Promise?Promise:function(){if(Bt)return Lt;Bt=1;var e=function(){if(Mt)return jt;Mt=1;var e,t,r=p.MutationObserver||p.WebKitMutationObserver;if(process.browser)if(r){var n=0,i=new r(l),s=p.document.createTextNode("");i.observe(s,{characterData:!0}),e=function(){s.data=n=++n%2}}else if(p.setImmediate||void 0===p.MessageChannel)e="document"in p&&"onreadystatechange"in p.document.createElement("script")?function(){var e=p.document.createElement("script");e.onreadystatechange=function(){l(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},p.document.documentElement.appendChild(e)}:function(){setTimeout(l,0)};else{var o=new p.MessageChannel;o.port1.onmessage=l,e=function(){o.port2.postMessage(0)}}else e=function(){process.nextTick(l)};var a=[];function l(){var e,r;t=!0;for(var n=a.length;n;){for(r=a,a=[],e=-1;++e<n;)r[e]();n=a.length}t=!1}return jt=function(r){1!==a.push(r)||t||e()}}();function t(){}var r={},n=["REJECTED"],i=["FULFILLED"],s=["PENDING"];if(!process.browser)var o=["UNHANDLED"];function a(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=s,this.queue=[],this.outcome=void 0,process.browser||(this.handled=o),e!==t&&c(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function h(t,n,i){e((function(){var e;try{e=n(i)}catch(e){return r.reject(t,e)}e===t?r.reject(t,new TypeError("Cannot resolve promise with itself")):r.resolve(t,e)}))}function u(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function c(e,t){var n=!1;function i(t){n||(n=!0,r.reject(e,t))}function s(t){n||(n=!0,r.resolve(e,t))}var o=f((function(){t(s,i)}));"error"===o.status&&i(o.value)}function f(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}return Lt=a,a.prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,r){if("function"!=typeof e&&this.state===i||"function"!=typeof r&&this.state===n)return this;var a=new this.constructor(t);return process.browser||this.handled===o&&(this.handled=null),this.state!==s?h(a,this.state===i?e:r,this.outcome):this.queue.push(new l(a,e,r)),a},l.prototype.callFulfilled=function(e){r.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){r.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},r.resolve=function(e,t){var n=f(u,t);if("error"===n.status)return r.reject(e,n.value);var s=n.value;if(s)c(e,s);else{e.state=i,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e},r.reject=function(t,r){t.state=n,t.outcome=r,process.browser||t.handled===o&&e((function(){t.handled===o&&process.emit("unhandledRejection",r,t)}));for(var i=-1,s=t.queue.length;++i<s;)t.queue[i].callRejected(r);return t},a.resolve=function(e){return e instanceof this?e:r.resolve(new this(t),e)},a.reject=function(e){var n=new this(t);return r.reject(n,e)},a.all=function(e){var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,s=!1;if(!i)return this.resolve([]);for(var o=new Array(i),a=0,l=-1,h=new this(t);++l<i;)u(e[l],l);return h;function u(e,t){n.resolve(e).then((function(e){o[t]=e,++a!==i||s||(s=!0,r.resolve(h,o))}),(function(e){s||(s=!0,r.reject(h,e))}))}},a.race=function(e){var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,s=!1;if(!i)return this.resolve([]);for(var o,a=-1,l=new this(t);++a<i;)o=e[a],n.resolve(o).then((function(e){s||(s=!0,r.resolve(l,e))}),(function(e){s||(s=!0,r.reject(l,e))}));return l},Lt}();var Ht,Ut={Promise:$t};function Vt(){return Ht||(Ht=1,function(e){var t=$e,r=Dt(),n=zt,i=Ut;function s(e){return e}function o(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e.newBlob=function(t,r){e.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var a={stringifyByChunk:function(e,t,r){var n=[],i=0,s=e.length;if(s<=r)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,s)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,s)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return t.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return t.nodebuffer&&1===String.fromCharCode.apply(null,n.allocBuffer(1)).length}catch(e){return!1}}()}};function l(t){var r=65536,n=e.getTypeOf(t),i=!0;if("uint8array"===n?i=a.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=a.applyCanBeUsed.nodebuffer),i)for(;r>1;)try{return a.stringifyByChunk(t,n,r)}catch(e){r=Math.floor(r/2)}return a.stringifyByChar(t)}function h(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}e.applyFromCharCode=l;var u={};u.string={string:s,array:function(e){return o(e,new Array(e.length))},arraybuffer:function(e){return u.string.uint8array(e).buffer},uint8array:function(e){return o(e,new Uint8Array(e.length))},nodebuffer:function(e){return o(e,n.allocBuffer(e.length))}},u.array={string:l,array:s,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return n.newBufferFrom(e)}},u.arraybuffer={string:function(e){return l(new Uint8Array(e))},array:function(e){return h(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:s,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return n.newBufferFrom(new Uint8Array(e))}},u.uint8array={string:l,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return n.newBufferFrom(e)}},u.nodebuffer={string:l,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return u.nodebuffer.uint8array(e).buffer},uint8array:function(e){return h(e,new Uint8Array(e.length))},nodebuffer:s},e.transformTo=function(t,r){if(r||(r=""),!t)return r;e.checkSupport(t);var n=e.getTypeOf(r);return u[n][t](r)},e.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i))}return r.join("/")},e.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":t.nodebuffer&&n.isBuffer(e)?"nodebuffer":t.uint8array&&e instanceof Uint8Array?"uint8array":t.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},e.checkSupport=function(e){if(!t[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},e.delay=function(e,t,r){setImmediate((function(){e.apply(r||null,t||[])}))},e.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r},e.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},e.prepareContent=function(n,s,a,l,h){var u=i.Promise.resolve(s).then((function(e){return t.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new i.Promise((function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)})):e}));return u.then((function(s){var u,c=e.getTypeOf(s);return c?("arraybuffer"===c?s=e.transformTo("uint8array",s):"string"===c&&(h?s=r.decode(s):a&&!0!==l&&(s=o(u=s,t.uint8array?new Uint8Array(u.length):new Array(u.length)))),s):i.Promise.reject(new Error("Can't read the data of '"+n+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}}(ze)),ze}function Wt(e){this.name=e||"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}!function(e,t){if(!e.setImmediate){var r,n,i,s,o,a=1,l={},h=!1,u=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?r=function(e){process.nextTick((function(){d(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(n=u.documentElement,r=function(e){var t=u.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),r=function(t){e.postMessage(s+t,"*")}),c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return l[a]=i,r(a),a++},c.clearImmediate=f}function f(e){delete l[e]}function d(e){if(h)setTimeout(d,0,e);else{var r=l[e];if(r){h=!0;try{!function(e){var r=e.callback,n=e.args;switch(n.length){case 0:r();break;case 1:r(n[0]);break;case 2:r(n[0],n[1]);break;case 3:r(n[0],n[1],n[2]);break;default:r.apply(t,n)}}(r)}finally{f(e),h=!1}}}}}("undefined"==typeof self?p:self),Wt.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},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 e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};var qt=Wt;!function(e){for(var t=Vt(),r=$e,n=zt,i=qt,s=new Array(256),o=0;o<256;o++)s[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;s[254]=s[254]=1;function a(){i.call(this,"utf-8 decode"),this.leftOver=null}function l(){i.call(this,"utf-8 encode")}e.utf8encode=function(e){return r.nodebuffer?n.newBufferFrom(e,"utf-8"):function(e){var t,n,i,s,o,a=e.length,l=0;for(s=0;s<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=r.uint8array?new Uint8Array(l):new Array(l),o=0,s=0;o<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t}(e)},e.utf8decode=function(e){return r.nodebuffer?t.transformTo("nodebuffer",e).toString("utf-8"):function(e){var r,n,i,o,a=e.length,l=new Array(2*a);for(n=0,r=0;r<a;)if((i=e[r++])<128)l[n++]=i;else if((o=s[i])>4)l[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r<a;)i=i<<6|63&e[r++],o--;o>1?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),t.applyFromCharCode(l)}(e=t.transformTo(r.uint8array?"uint8array":"array",e))},t.inherits(a,i),a.prototype.processChunk=function(n){var i=t.transformTo(r.uint8array?"uint8array":"array",n.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=i;(i=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),i.set(o,this.leftOver.length)}else i=this.leftOver.concat(i);this.leftOver=null}var a=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}(i),l=i;a!==i.length&&(r.uint8array?(l=i.subarray(0,a),this.leftOver=i.subarray(a,i.length)):(l=i.slice(0,a),this.leftOver=i.slice(a,i.length))),this.push({data:e.utf8decode(l),meta:n.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=a,t.inherits(l,i),l.prototype.processChunk=function(t){this.push({data:e.utf8encode(t.data),meta:t.meta})},e.Utf8EncodeWorker=l}(Be);var Xt=qt,Zt=Vt();function Gt(e){Xt.call(this,"ConvertWorker to "+e),this.destType=e}Zt.inherits(Gt,Xt),Gt.prototype.processChunk=function(e){this.push({data:Zt.transformTo(this.destType,e.data),meta:e.meta})};var Yt,Kt,Qt=Gt;var Jt=Vt(),er=Qt,tr=qt,rr=Dt(),nr=Ut,ir=null;if($e.nodestream)try{ir=function(){if(Kt)return Yt;Kt=1;var e=At().Readable;function t(t,r,n){e.call(this,r),this._helper=t;var i=this;t.on("data",(function(e,t){i.push(e)||i._helper.pause(),n&&n(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}return Vt().inherits(t,e),t.prototype._read=function(){this._helper.resume()},Yt=t}()}catch(e){}function sr(e,t){return new nr.Promise((function(r,n){var i=[],s=e._internalType,o=e._outputType,a=e._mimeType;e.on("data",(function(e,r){i.push(e),t&&t(r)})).on("error",(function(e){i=[],n(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return Jt.newBlob(Jt.transformTo("arraybuffer",t),r);case"base64":return rr.encode(t);default:return Jt.transformTo(e,t)}}(o,function(e,t){var r,n=0,i=null,s=0;for(r=0;r<t.length;r++)s+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(s),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(s,i),a);r(e)}catch(e){n(e)}i=[]})).resume()}))}function or(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=t,this._mimeType=r,Jt.checkSupport(n),this._worker=e.pipe(new er(n)),e.lock()}catch(e){this._worker=new tr("error"),this._worker.error(e)}}or.prototype={accumulate:function(e){return sr(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,(function(e){t.call(r,e.data,e.meta)})):this._worker.on(e,(function(){Jt.delay(t,arguments,r)})),this},resume:function(){return Jt.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Jt.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new ir(this,{objectMode:"nodebuffer"!==this._outputType},e)}};var ar=or,lr={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null},hr=Vt(),ur=qt;function cr(e){ur.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=hr.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}hr.inherits(cr,ur),cr.prototype.cleanUp=function(){ur.prototype.cleanUp.call(this),this.data=null},cr.prototype.resume=function(){return!!ur.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,hr.delay(this._tickAndRepeat,[],this)),!0)},cr.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(hr.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},cr.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};var fr=cr,dr=Vt();var pr=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();var mr=function(e,t){return void 0!==e&&e.length?"string"!==dr.getTypeOf(e)?function(e,t,r,n){var i=pr,s=n+r;e^=-1;for(var o=n;o<s;o++)e=e>>>8^i[255&(e^t[o])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=pr,s=n+r;e^=-1;for(var o=n;o<s;o++)e=e>>>8^i[255&(e^t.charCodeAt(o))];return-1^e}(0|t,e,e.length,0):0},gr=qt,yr=mr;function vr(){gr.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}Vt().inherits(vr,gr),vr.prototype.processChunk=function(e){this.streamInfo.crc32=yr(e.data,this.streamInfo.crc32||0),this.push(e)};var _r=vr,br=Vt(),wr=qt;function xr(e){wr.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}br.inherits(xr,wr),xr.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}wr.prototype.processChunk.call(this,e)};var kr=Ut,Sr=fr,Er=_r,Tr=xr;function Cr(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}Cr.prototype={getContentWorker:function(){var e=new Sr(kr.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Tr("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new Sr(kr.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Cr.createWorkerFrom=function(e,t,r){return e.pipe(new Er).pipe(new Tr("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new Tr("compressedSize")).withStreamInfo("compression",t)};var Or=Cr,Rr=ar,Ar=fr,Nr=Be,Ir=Or,Pr=qt,Fr=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};Fr.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new Nr.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new Nr.Utf8DecodeWorker))}catch(e){(t=new Pr("error")).error(e)}return new Rr(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Ir&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new Nr.Utf8EncodeWorker)),Ir.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof Ir?this._data.getContentWorker():this._data instanceof Pr?this._data:new Ar(this._data)}};for(var Dr=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],jr=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Mr=0;Mr<Dr.length;Mr++)Fr.prototype[Dr[Mr]]=jr;var Lr=Fr,Br={},zr={},$r={},Hr={};!function(e){var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){var t,r,n,i,s,o;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(o=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)s=e[t],o.set(s,i),i+=s.length;return o}},i={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){return[].concat.apply([],e)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)}(Hr);var Ur={},Vr={},Wr={},qr=Hr,Xr=0,Zr=1;function Gr(e){for(var t=e.length;--t>=0;)e[t]=0}var Yr=0,Kr=29,Qr=256,Jr=Qr+1+Kr,en=30,tn=19,rn=2*Jr+1,nn=15,sn=16,on=7,an=256,ln=16,hn=17,un=18,cn=[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],fn=[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],dn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],pn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],mn=new Array(2*(Jr+2));Gr(mn);var gn=new Array(2*en);Gr(gn);var yn=new Array(512);Gr(yn);var vn=new Array(256);Gr(vn);var _n=new Array(Kr);Gr(_n);var bn,wn,xn,kn=new Array(en);function Sn(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function En(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Tn(e){return e<256?yn[e]:yn[256+(e>>>7)]}function Cn(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function On(e,t,r){e.bi_valid>sn-r?(e.bi_buf|=t<<e.bi_valid&65535,Cn(e,e.bi_buf),e.bi_buf=t>>sn-e.bi_valid,e.bi_valid+=r-sn):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function Rn(e,t,r){On(e,r[2*t],r[2*t+1])}function An(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function Nn(e,t,r){var n,i,s=new Array(nn+1),o=0;for(n=1;n<=nn;n++)s[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=An(s[a]++,a))}}function In(e){var t;for(t=0;t<Jr;t++)e.dyn_ltree[2*t]=0;for(t=0;t<en;t++)e.dyn_dtree[2*t]=0;for(t=0;t<tn;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*an]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Pn(e){e.bi_valid>8?Cn(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Fn(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function Dn(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&Fn(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Fn(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function jn(e,t,r){var n,i,s,o,a=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*a]<<8|e.pending_buf[e.d_buf+2*a+1],i=e.pending_buf[e.l_buf+a],a++,0===n?Rn(e,i,t):(Rn(e,(s=vn[i])+Qr+1,t),0!==(o=cn[s])&&On(e,i-=_n[s],o),Rn(e,s=Tn(--n),r),0!==(o=fn[s])&&On(e,n-=kn[s],o))}while(a<e.last_lit);Rn(e,an,t)}function Mn(e,t){var r,n,i,s=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,h=-1;for(e.heap_len=0,e.heap_max=rn,r=0;r<l;r++)0!==s[2*r]?(e.heap[++e.heap_len]=h=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=h<2?++h:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=o[2*i+1]);for(t.max_code=h,r=e.heap_len>>1;r>=1;r--)Dn(e,s,r);i=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Dn(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,Dn(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,o,a,l=t.dyn_tree,h=t.max_code,u=t.stat_desc.static_tree,c=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=nn;s++)e.bl_count[s]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<rn;r++)(s=l[2*l[2*(n=e.heap[r])+1]+1]+1)>p&&(s=p,m++),l[2*n+1]=s,n>h||(e.bl_count[s]++,o=0,n>=d&&(o=f[n-d]),a=l[2*n],e.opt_len+=a*(s+o),c&&(e.static_len+=a*(u[2*n+1]+o)));if(0!==m){do{for(s=p-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(s=p;0!==s;s--)for(n=e.bl_count[s];0!==n;)(i=e.heap[--r])>h||(l[2*i+1]!==s&&(e.opt_len+=(s-l[2*i+1])*l[2*i],l[2*i+1]=s),n--)}}(e,t),Nn(s,h,e.bl_count)}function Ln(e,t,r){var n,i,s=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++a<l&&i===o||(a<h?e.bl_tree[2*i]+=a:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[2*ln]++):a<=10?e.bl_tree[2*hn]++:e.bl_tree[2*un]++,a=0,s=i,0===o?(l=138,h=3):i===o?(l=6,h=3):(l=7,h=4))}function Bn(e,t,r){var n,i,s=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),n=0;n<=r;n++)if(i=o,o=t[2*(n+1)+1],!(++a<l&&i===o)){if(a<h)do{Rn(e,i,e.bl_tree)}while(0!=--a);else 0!==i?(i!==s&&(Rn(e,i,e.bl_tree),a--),Rn(e,ln,e.bl_tree),On(e,a-3,2)):a<=10?(Rn(e,hn,e.bl_tree),On(e,a-3,3)):(Rn(e,un,e.bl_tree),On(e,a-11,7));a=0,s=i,0===o?(l=138,h=3):i===o?(l=6,h=3):(l=7,h=4)}}Gr(kn);var zn=!1;function $n(e,t,r,n){On(e,(Yr<<1)+(n?1:0),3),function(e,t,r,n){Pn(e),n&&(Cn(e,r),Cn(e,~r)),qr.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}Wr._tr_init=function(e){zn||(!function(){var e,t,r,n,i,s=new Array(nn+1);for(r=0,n=0;n<Kr-1;n++)for(_n[n]=r,e=0;e<1<<cn[n];e++)vn[r++]=n;for(vn[r-1]=n,i=0,n=0;n<16;n++)for(kn[n]=i,e=0;e<1<<fn[n];e++)yn[i++]=n;for(i>>=7;n<en;n++)for(kn[n]=i<<7,e=0;e<1<<fn[n]-7;e++)yn[256+i++]=n;for(t=0;t<=nn;t++)s[t]=0;for(e=0;e<=143;)mn[2*e+1]=8,e++,s[8]++;for(;e<=255;)mn[2*e+1]=9,e++,s[9]++;for(;e<=279;)mn[2*e+1]=7,e++,s[7]++;for(;e<=287;)mn[2*e+1]=8,e++,s[8]++;for(Nn(mn,Jr+1,s),e=0;e<en;e++)gn[2*e+1]=5,gn[2*e]=An(e,5);bn=new Sn(mn,cn,Qr+1,Jr,nn),wn=new Sn(gn,fn,0,en,nn),xn=new Sn(new Array(0),dn,0,tn,on)}(),zn=!0),e.l_desc=new En(e.dyn_ltree,bn),e.d_desc=new En(e.dyn_dtree,wn),e.bl_desc=new En(e.bl_tree,xn),e.bi_buf=0,e.bi_valid=0,In(e)},Wr._tr_stored_block=$n,Wr._tr_flush_block=function(e,t,r,n){var i,s,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return Xr;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Zr;for(t=32;t<Qr;t++)if(0!==e.dyn_ltree[2*t])return Zr;return Xr}(e)),Mn(e,e.l_desc),Mn(e,e.d_desc),o=function(e){var t;for(Ln(e,e.dyn_ltree,e.l_desc.max_code),Ln(e,e.dyn_dtree,e.d_desc.max_code),Mn(e,e.bl_desc),t=tn-1;t>=3&&0===e.bl_tree[2*pn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?$n(e,t,r,n):4===e.strategy||s===i?(On(e,2+(n?1:0),3),jn(e,mn,gn)):(On(e,4+(n?1:0),3),function(e,t,r,n){var i;for(On(e,t-257,5),On(e,r-1,5),On(e,n-4,4),i=0;i<n;i++)On(e,e.bl_tree[2*pn[i]+1],3);Bn(e,e.dyn_ltree,t-1),Bn(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),jn(e,e.dyn_ltree,e.dyn_dtree)),In(e),n&&Pn(e)},Wr._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(vn[r]+Qr+1)]++,e.dyn_dtree[2*Tn(t)]++),e.last_lit===e.lit_bufsize-1},Wr._tr_align=function(e){On(e,2,3),Rn(e,an,mn),function(e){16===e.bi_valid?(Cn(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)};var Hn=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{s=s+(i=i+t[n++]|0)|0}while(--o);i%=65521,s%=65521}return i|s<<16|0};var Un=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();var Vn,Wn=function(e,t,r,n){var i=Un,s=n+r;e^=-1;for(var o=n;o<s;o++)e=e>>>8^i[255&(e^t[o])];return-1^e},qn={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"},Xn=Hr,Zn=Wr,Gn=Hn,Yn=Wn,Kn=qn,Qn=0,Jn=4,ei=0,ti=-2,ri=-1,ni=4,ii=2,si=8,oi=9,ai=286,li=30,hi=19,ui=2*ai+1,ci=15,fi=3,di=258,pi=di+fi+1,mi=42,gi=103,yi=113,vi=666,_i=1,bi=2,wi=3,xi=4;function ki(e,t){return e.msg=Kn[t],t}function Si(e){return(e<<1)-(e>4?9:0)}function Ei(e){for(var t=e.length;--t>=0;)e[t]=0}function Ti(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(Xn.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function Ci(e,t){Zn._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ti(e.strm)}function Oi(e,t){e.pending_buf[e.pending++]=t}function Ri(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Ai(e,t){var r,n,i=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-pi?e.strstart-(e.w_size-pi):0,h=e.window,u=e.w_mask,c=e.prev,f=e.strstart+di,d=h[s+o-1],p=h[s+o];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(h[(r=t)+o]===p&&h[r+o-1]===d&&h[r]===h[s]&&h[++r]===h[s+1]){s+=2,r++;do{}while(h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&s<f);if(n=di-(f-s),s=f-di,n>o){if(e.match_start=t,o=n,n>=a)break;d=h[s+o-1],p=h[s+o]}}}while((t=c[t&u])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function Ni(e){var t,r,n,i,s,o,a,l,h,u,c=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=c+(c-pi)){Xn.arraySet(e.window,e.window,c,c,0),e.match_start-=c,e.strstart-=c,e.block_start-=c,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=c?n-c:0}while(--r);t=r=c;do{n=e.prev[--t],e.prev[t]=n>=c?n-c:0}while(--r);i+=c}if(0===e.strm.avail_in)break;if(o=e.strm,a=e.window,l=e.strstart+e.lookahead,h=i,u=void 0,(u=o.avail_in)>h&&(u=h),r=0===u?0:(o.avail_in-=u,Xn.arraySet(a,o.input,o.next_in,u,l),1===o.state.wrap?o.adler=Gn(o.adler,a,u,l):2===o.state.wrap&&(o.adler=Yn(o.adler,a,u,l)),o.next_in+=u,o.total_in+=u,u),e.lookahead+=r,e.lookahead+e.insert>=fi)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+fi-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<fi)););}while(e.lookahead<pi&&0!==e.strm.avail_in)}function Ii(e,t){for(var r,n;;){if(e.lookahead<pi){if(Ni(e),e.lookahead<pi&&t===Qn)return _i;if(0===e.lookahead)break}if(r=0,e.lookahead>=fi&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+fi-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-pi&&(e.match_length=Ai(e,r)),e.match_length>=fi)if(n=Zn._tr_tally(e,e.strstart-e.match_start,e.match_length-fi),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=fi){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+fi-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Zn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Ci(e,!1),0===e.strm.avail_out))return _i}return e.insert=e.strstart<fi-1?e.strstart:fi-1,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):e.last_lit&&(Ci(e,!1),0===e.strm.avail_out)?_i:bi}function Pi(e,t){for(var r,n,i;;){if(e.lookahead<pi){if(Ni(e),e.lookahead<pi&&t===Qn)return _i;if(0===e.lookahead)break}if(r=0,e.lookahead>=fi&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+fi-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=fi-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-pi&&(e.match_length=Ai(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===fi&&e.strstart-e.match_start>4096)&&(e.match_length=fi-1)),e.prev_length>=fi&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-fi,n=Zn._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-fi),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+fi-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=fi-1,e.strstart++,n&&(Ci(e,!1),0===e.strm.avail_out))return _i}else if(e.match_available){if((n=Zn._tr_tally(e,0,e.window[e.strstart-1]))&&Ci(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return _i}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Zn._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<fi-1?e.strstart:fi-1,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):e.last_lit&&(Ci(e,!1),0===e.strm.avail_out)?_i:bi}function Fi(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function Di(){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=si,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 Xn.Buf16(2*ui),this.dyn_dtree=new Xn.Buf16(2*(2*li+1)),this.bl_tree=new Xn.Buf16(2*(2*hi+1)),Ei(this.dyn_ltree),Ei(this.dyn_dtree),Ei(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Xn.Buf16(ci+1),this.heap=new Xn.Buf16(2*ai+1),Ei(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Xn.Buf16(2*ai+1),Ei(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 ji(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=ii,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?mi:yi,e.adler=2===t.wrap?0:1,t.last_flush=Qn,Zn._tr_init(t),ei):ki(e,ti)}function Mi(e){var t,r=ji(e);return r===ei&&((t=e.state).window_size=2*t.w_size,Ei(t.head),t.max_lazy_match=Vn[t.level].max_lazy,t.good_match=Vn[t.level].good_length,t.nice_match=Vn[t.level].nice_length,t.max_chain_length=Vn[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=fi-1,t.match_available=0,t.ins_h=0),r}function Li(e,t,r,n,i,s){if(!e)return ti;var o=1;if(t===ri&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),i<1||i>oi||r!==si||n<8||n>15||t<0||t>9||s<0||s>ni)return ki(e,ti);8===n&&(n=9);var a=new Di;return e.state=a,a.strm=e,a.wrap=o,a.gzhead=null,a.w_bits=n,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+fi-1)/fi),a.window=new Xn.Buf8(2*a.w_size),a.head=new Xn.Buf16(a.hash_size),a.prev=new Xn.Buf16(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Xn.Buf8(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=t,a.strategy=s,a.method=r,Mi(e)}Vn=[new Fi(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ni(e),0===e.lookahead&&t===Qn)return _i;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Ci(e,!1),0===e.strm.avail_out))return _i;if(e.strstart-e.block_start>=e.w_size-pi&&(Ci(e,!1),0===e.strm.avail_out))return _i}return e.insert=0,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):(e.strstart>e.block_start&&(Ci(e,!1),e.strm.avail_out),_i)})),new Fi(4,4,8,4,Ii),new Fi(4,5,16,8,Ii),new Fi(4,6,32,32,Ii),new Fi(4,4,16,16,Pi),new Fi(8,16,32,32,Pi),new Fi(8,16,128,128,Pi),new Fi(8,32,128,256,Pi),new Fi(32,128,258,1024,Pi),new Fi(32,258,258,4096,Pi)],Vr.deflateInit=function(e,t){return Li(e,t,si,15,8,0)},Vr.deflateInit2=Li,Vr.deflateReset=Mi,Vr.deflateResetKeep=ji,Vr.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?ti:(e.state.gzhead=t,ei):ti},Vr.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||t>5||t<0)return e?ki(e,ti):ti;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||n.status===vi&&t!==Jn)return ki(e,0===e.avail_out?-5:ti);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===mi)if(2===n.wrap)e.adler=0,Oi(n,31),Oi(n,139),Oi(n,8),n.gzhead?(Oi(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Oi(n,255&n.gzhead.time),Oi(n,n.gzhead.time>>8&255),Oi(n,n.gzhead.time>>16&255),Oi(n,n.gzhead.time>>24&255),Oi(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),Oi(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Oi(n,255&n.gzhead.extra.length),Oi(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Yn(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(Oi(n,0),Oi(n,0),Oi(n,0),Oi(n,0),Oi(n,0),Oi(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),Oi(n,3),n.status=yi);else{var o=si+(n.w_bits-8<<4)<<8;o|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(o|=32),o+=31-o%31,n.status=yi,Ri(n,o),0!==n.strstart&&(Ri(n,e.adler>>>16),Ri(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),Ti(e),i=n.pending,n.pending!==n.pending_buf_size));)Oi(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),Ti(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,Oi(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),Ti(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,Oi(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=Yn(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=gi)}else n.status=gi;if(n.status===gi&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Ti(e),n.pending+2<=n.pending_buf_size&&(Oi(n,255&e.adler),Oi(n,e.adler>>8&255),e.adler=0,n.status=yi)):n.status=yi),0!==n.pending){if(Ti(e),0===e.avail_out)return n.last_flush=-1,ei}else if(0===e.avail_in&&Si(t)<=Si(r)&&t!==Jn)return ki(e,-5);if(n.status===vi&&0!==e.avail_in)return ki(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==Qn&&n.status!==vi){var a=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(Ni(e),0===e.lookahead)){if(t===Qn)return _i;break}if(e.match_length=0,r=Zn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Ci(e,!1),0===e.strm.avail_out))return _i}return e.insert=0,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):e.last_lit&&(Ci(e,!1),0===e.strm.avail_out)?_i:bi}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,o=e.window;;){if(e.lookahead<=di){if(Ni(e),e.lookahead<=di&&t===Qn)return _i;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=fi&&e.strstart>0&&(n=o[i=e.strstart-1])===o[++i]&&n===o[++i]&&n===o[++i]){s=e.strstart+di;do{}while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<s);e.match_length=di-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=fi?(r=Zn._tr_tally(e,1,e.match_length-fi),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Zn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Ci(e,!1),0===e.strm.avail_out))return _i}return e.insert=0,t===Jn?(Ci(e,!0),0===e.strm.avail_out?wi:xi):e.last_lit&&(Ci(e,!1),0===e.strm.avail_out)?_i:bi}(n,t):Vn[n.level].func(n,t);if(a!==wi&&a!==xi||(n.status=vi),a===_i||a===wi)return 0===e.avail_out&&(n.last_flush=-1),ei;if(a===bi&&(1===t?Zn._tr_align(n):5!==t&&(Zn._tr_stored_block(n,0,0,!1),3===t&&(Ei(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Ti(e),0===e.avail_out))return n.last_flush=-1,ei}return t!==Jn?ei:n.wrap<=0?1:(2===n.wrap?(Oi(n,255&e.adler),Oi(n,e.adler>>8&255),Oi(n,e.adler>>16&255),Oi(n,e.adler>>24&255),Oi(n,255&e.total_in),Oi(n,e.total_in>>8&255),Oi(n,e.total_in>>16&255),Oi(n,e.total_in>>24&255)):(Ri(n,e.adler>>>16),Ri(n,65535&e.adler)),Ti(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?ei:1)},Vr.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==mi&&69!==t&&73!==t&&91!==t&&t!==gi&&t!==yi&&t!==vi?ki(e,ti):(e.state=null,t===yi?ki(e,-3):ei):ti},Vr.deflateSetDictionary=function(e,t){var r,n,i,s,o,a,l,h,u=t.length;if(!e||!e.state)return ti;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==mi||r.lookahead)return ti;for(1===s&&(e.adler=Gn(e.adler,t,u,0)),r.wrap=0,u>=r.w_size&&(0===s&&(Ei(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new Xn.Buf8(r.w_size),Xn.arraySet(h,t,u-r.w_size,r.w_size,0),t=h,u=r.w_size),o=e.avail_in,a=e.next_in,l=e.input,e.avail_in=u,e.next_in=0,e.input=t,Ni(r);r.lookahead>=fi;){n=r.strstart,i=r.lookahead-(fi-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+fi-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--i);r.strstart=n,r.lookahead=fi-1,Ni(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=fi-1,r.match_available=0,e.next_in=a,e.input=l,e.avail_in=o,r.wrap=s,ei},Vr.deflateInfo="pako deflate (from Nodeca project)";var Bi={},zi=Hr,$i=!0,Hi=!0;try{String.fromCharCode.apply(null,[0])}catch(e){$i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Hi=!1}for(var Ui=new zi.Buf8(256),Vi=0;Vi<256;Vi++)Ui[Vi]=Vi>=252?6:Vi>=248?5:Vi>=240?4:Vi>=224?3:Vi>=192?2:1;function Wi(e,t){if(t<65534&&(e.subarray&&Hi||!e.subarray&&$i))return String.fromCharCode.apply(null,zi.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Ui[254]=Ui[254]=1,Bi.string2buf=function(e){var t,r,n,i,s,o=e.length,a=0;for(i=0;i<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),a+=r<128?1:r<2048?2:r<65536?3:4;for(t=new zi.Buf8(a),s=0,i=0;s<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:r<2048?(t[s++]=192|r>>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},Bi.buf2binstring=function(e){return Wi(e,e.length)},Bi.binstring2buf=function(e){for(var t=new zi.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},Bi.buf2string=function(e,t){var r,n,i,s,o=t||e.length,a=new Array(2*o);for(n=0,r=0;r<o;)if((i=e[r++])<128)a[n++]=i;else if((s=Ui[i])>4)a[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&r<o;)i=i<<6|63&e[r++],s--;s>1?a[n++]=65533:i<65536?a[n++]=i:(i-=65536,a[n++]=55296|i>>10&1023,a[n++]=56320|1023&i)}return Wi(a,n)},Bi.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+Ui[e[r]]>t?r:t};var qi=function(){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},Xi=Vr,Zi=Hr,Gi=Bi,Yi=qn,Ki=qi,Qi=Object.prototype.toString,Ji=0,es=-1,ts=0,rs=8;function ns(e){if(!(this instanceof ns))return new ns(e);this.options=Zi.assign({level:es,method:rs,chunkSize:16384,windowBits:15,memLevel:8,strategy:ts,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ki,this.strm.avail_out=0;var r=Xi.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Ji)throw new Error(Yi[r]);if(t.header&&Xi.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"==typeof t.dictionary?Gi.string2buf(t.dictionary):"[object ArrayBuffer]"===Qi.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=Xi.deflateSetDictionary(this.strm,n))!==Ji)throw new Error(Yi[r]);this._dict_set=!0}}function is(e,t){var r=new ns(t);if(r.push(e,!0),r.err)throw r.msg||Yi[r.err];return r.result}ns.prototype.push=function(e,t){var r,n,i=this.strm,s=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=Gi.string2buf(e):"[object ArrayBuffer]"===Qi.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new Zi.Buf8(s),i.next_out=0,i.avail_out=s),1!==(r=Xi.deflate(i,n))&&r!==Ji)return this.onEnd(r),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(Gi.buf2binstring(Zi.shrinkBuf(i.output,i.next_out))):this.onData(Zi.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&1!==r);return 4===n?(r=Xi.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Ji):2!==n||(this.onEnd(Ji),i.avail_out=0,!0)},ns.prototype.onData=function(e){this.chunks.push(e)},ns.prototype.onEnd=function(e){e===Ji&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Zi.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},Ur.Deflate=ns,Ur.deflate=is,Ur.deflateRaw=function(e,t){return(t=t||{}).raw=!0,is(e,t)},Ur.gzip=function(e,t){return(t=t||{}).gzip=!0,is(e,t)};var ss={},os={},as=Hr,ls=15,hs=[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],us=[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],cs=[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],fs=[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],ds=Hr,ps=Hn,ms=Wn,gs=function(e,t){var r,n,i,s,o,a,l,h,u,c,f,d,p,m,g,y,v,_,b,w,x,k,S,E,T;r=e.state,n=e.next_in,E=e.input,i=n+(e.avail_in-5),s=e.next_out,T=e.output,o=s-(t-e.avail_out),a=s+(e.avail_out-257),l=r.dmax,h=r.wsize,u=r.whave,c=r.wnext,f=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,y=(1<<r.lenbits)-1,v=(1<<r.distbits)-1;e:do{p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=m[d&y];t:for(;;){if(d>>>=b=_>>>24,p-=b,0===(b=_>>>16&255))T[s++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=m[(65535&_)+(d&(1<<b)-1)];continue t}if(32&b){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&_,(b&=15)&&(p<b&&(d+=E[n++]<<p,p+=8),w+=d&(1<<b)-1,d>>>=b,p-=b),p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=g[d&v];r:for(;;){if(d>>>=b=_>>>24,p-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=g[(65535&_)+(d&(1<<b)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(x=65535&_,p<(b&=15)&&(d+=E[n++]<<p,(p+=8)<b&&(d+=E[n++]<<p,p+=8)),(x+=d&(1<<b)-1)>l){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=b,p-=b,x>(b=s-o)){if((b=x-b)>u&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(k=0,S=f,0===c){if(k+=h-b,b<w){w-=b;do{T[s++]=f[k++]}while(--b);k=s-x,S=T}}else if(c<b){if(k+=h+c-b,(b-=c)<w){w-=b;do{T[s++]=f[k++]}while(--b);if(k=0,c<w){w-=b=c;do{T[s++]=f[k++]}while(--b);k=s-x,S=T}}}else if(k+=c-b,b<w){w-=b;do{T[s++]=f[k++]}while(--b);k=s-x,S=T}for(;w>2;)T[s++]=S[k++],T[s++]=S[k++],T[s++]=S[k++],w-=3;w&&(T[s++]=S[k++],w>1&&(T[s++]=S[k++]))}else{k=s-x;do{T[s++]=T[k++],T[s++]=T[k++],T[s++]=T[k++],w-=3}while(w>2);w&&(T[s++]=T[k++],w>1&&(T[s++]=T[k++]))}break}}break}}while(n<i&&s<a);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=s<a?a-s+257:257-(s-a),r.hold=d,r.bits=p},ys=function(e,t,r,n,i,s,o,a){var l,h,u,c,f,d,p,m,g,y=a.bits,v=0,_=0,b=0,w=0,x=0,k=0,S=0,E=0,T=0,C=0,O=null,R=0,A=new as.Buf16(16),N=new as.Buf16(16),I=null,P=0;for(v=0;v<=ls;v++)A[v]=0;for(_=0;_<n;_++)A[t[r+_]]++;for(x=y,w=ls;w>=1&&0===A[w];w--);if(x>w&&(x=w),0===w)return i[s++]=20971520,i[s++]=20971520,a.bits=1,0;for(b=1;b<w&&0===A[b];b++);for(x<b&&(x=b),E=1,v=1;v<=ls;v++)if(E<<=1,(E-=A[v])<0)return-1;if(E>0&&(0===e||1!==w))return-1;for(N[1]=0,v=1;v<ls;v++)N[v+1]=N[v]+A[v];for(_=0;_<n;_++)0!==t[r+_]&&(o[N[t[r+_]]++]=_);if(0===e?(O=I=o,d=19):1===e?(O=hs,R-=257,I=us,P-=257,d=256):(O=cs,I=fs,d=-1),C=0,_=0,v=b,f=s,k=x,S=0,u=-1,c=(T=1<<x)-1,1===e&&T>852||2===e&&T>592)return 1;for(;;){p=v-S,o[_]<d?(m=0,g=o[_]):o[_]>d?(m=I[P+o[_]],g=O[R+o[_]]):(m=96,g=0),l=1<<v-S,b=h=1<<k;do{i[f+(C>>S)+(h-=l)]=p<<24|m<<16|g|0}while(0!==h);for(l=1<<v-1;C&l;)l>>=1;if(0!==l?(C&=l-1,C+=l):C=0,_++,0==--A[v]){if(v===w)break;v=t[r+o[_]]}if(v>x&&(C&c)!==u){for(0===S&&(S=x),f+=b,E=1<<(k=v-S);k+S<w&&!((E-=A[k+S])<=0);)k++,E<<=1;if(T+=1<<k,1===e&&T>852||2===e&&T>592)return 1;i[u=C&c]=x<<24|k<<16|f-s|0}}return 0!==C&&(i[f+C]=v-S<<24|64<<16|0),a.bits=x,0},vs=1,_s=2,bs=0,ws=-2,xs=1,ks=12,Ss=30,Es=852,Ts=592;function Cs(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function Os(){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 ds.Buf16(320),this.work=new ds.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Rs(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=xs,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new ds.Buf32(Es),t.distcode=t.distdyn=new ds.Buf32(Ts),t.sane=1,t.back=-1,bs):ws}function As(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,Rs(e)):ws}function Ns(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?ws:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,As(e))):ws}function Is(e,t){var r,n;return e?(n=new Os,e.state=n,n.window=null,(r=Ns(e,t))!==bs&&(e.state=null),r):ws}var Ps,Fs,Ds=!0;function js(e){if(Ds){var t;for(Ps=new ds.Buf32(512),Fs=new ds.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ys(vs,e.lens,0,288,Ps,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ys(_s,e.lens,0,32,Fs,0,e.work,{bits:5}),Ds=!1}e.lencode=Ps,e.lenbits=9,e.distcode=Fs,e.distbits=5}function Ms(e,t,r,n){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new ds.Buf8(s.wsize)),n>=s.wsize?(ds.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((i=s.wsize-s.wnext)>n&&(i=n),ds.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(ds.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}os.inflateReset=As,os.inflateReset2=Ns,os.inflateResetKeep=Rs,os.inflateInit=function(e){return Is(e,15)},os.inflateInit2=Is,os.inflate=function(e,t){var r,n,i,s,o,a,l,h,u,c,f,d,p,m,g,y,v,_,b,w,x,k,S,E,T=0,C=new ds.Buf8(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return ws;(r=e.state).mode===ks&&(r.mode=13),o=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,n=e.input,a=e.avail_in,h=r.hold,u=r.bits,c=a,f=l,k=bs;e:for(;;)switch(r.mode){case xs:if(0===r.wrap){r.mode=13;break}for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(2&r.wrap&&35615===h){r.check=0,C[0]=255&h,C[1]=h>>>8&255,r.check=ms(r.check,C,2,0),h=0,u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",r.mode=Ss;break}if(8!=(15&h)){e.msg="unknown compression method",r.mode=Ss;break}if(u-=4,x=8+(15&(h>>>=4)),0===r.wbits)r.wbits=x;else if(x>r.wbits){e.msg="invalid window size",r.mode=Ss;break}r.dmax=1<<x,e.adler=r.check=1,r.mode=512&h?10:ks,h=0,u=0;break;case 2:for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(r.flags=h,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=Ss;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=Ss;break}r.head&&(r.head.text=h>>8&1),512&r.flags&&(C[0]=255&h,C[1]=h>>>8&255,r.check=ms(r.check,C,2,0)),h=0,u=0,r.mode=3;case 3:for(;u<32;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.head&&(r.head.time=h),512&r.flags&&(C[0]=255&h,C[1]=h>>>8&255,C[2]=h>>>16&255,C[3]=h>>>24&255,r.check=ms(r.check,C,4,0)),h=0,u=0,r.mode=4;case 4:for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.head&&(r.head.xflags=255&h,r.head.os=h>>8),512&r.flags&&(C[0]=255&h,C[1]=h>>>8&255,r.check=ms(r.check,C,2,0)),h=0,u=0,r.mode=5;case 5:if(1024&r.flags){for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.length=h,r.head&&(r.head.extra_len=h),512&r.flags&&(C[0]=255&h,C[1]=h>>>8&255,r.check=ms(r.check,C,2,0)),h=0,u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((d=r.length)>a&&(d=a),d&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),ds.arraySet(r.head.extra,n,s,d,x)),512&r.flags&&(r.check=ms(r.check,n,d,s)),a-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===a)break e;d=0;do{x=n[s+d++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&d<a);if(512&r.flags&&(r.check=ms(r.check,n,d,s)),a-=d,s+=d,x)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===a)break e;d=0;do{x=n[s+d++],r.head&&x&&r.length<65536&&(r.head.comment+=String.fromCharCode(x))}while(x&&d<a);if(512&r.flags&&(r.check=ms(r.check,n,d,s)),a-=d,s+=d,x)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;u<16;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(h!==(65535&r.check)){e.msg="header crc mismatch",r.mode=Ss;break}h=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=ks;break;case 10:for(;u<32;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}e.adler=r.check=Cs(h),h=0,u=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,r.hold=h,r.bits=u,2;e.adler=r.check=1,r.mode=ks;case ks:if(5===t||6===t)break e;case 13:if(r.last){h>>>=7&u,u-=7&u,r.mode=27;break}for(;u<3;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}switch(r.last=1&h,u-=1,3&(h>>>=1)){case 0:r.mode=14;break;case 1:if(js(r),r.mode=20,6===t){h>>>=2,u-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=Ss}h>>>=2,u-=2;break;case 14:for(h>>>=7&u,u-=7&u;u<32;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if((65535&h)!=(h>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Ss;break}if(r.length=65535&h,h=0,u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(d>a&&(d=a),d>l&&(d=l),0===d)break e;ds.arraySet(i,n,s,d,o),a-=d,s+=d,l-=d,o+=d,r.length-=d;break}r.mode=ks;break;case 17:for(;u<14;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(r.nlen=257+(31&h),h>>>=5,u-=5,r.ndist=1+(31&h),h>>>=5,u-=5,r.ncode=4+(15&h),h>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Ss;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;u<3;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.lens[O[r.have++]]=7&h,h>>>=3,u-=3}for(;r.have<19;)r.lens[O[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},k=ys(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,k){e.msg="invalid code lengths set",r.mode=Ss;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;y=(T=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,v=65535&T,!((g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(v<16)h>>>=g,u-=g,r.lens[r.have++]=v;else{if(16===v){for(E=g+2;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(h>>>=g,u-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=Ss;break}x=r.lens[r.have-1],d=3+(3&h),h>>>=2,u-=2}else if(17===v){for(E=g+3;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}u-=g,x=0,d=3+(7&(h>>>=g)),h>>>=3,u-=3}else{for(E=g+7;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}u-=g,x=0,d=11+(127&(h>>>=g)),h>>>=7,u-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Ss;break}for(;d--;)r.lens[r.have++]=x}}if(r.mode===Ss)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=Ss;break}if(r.lenbits=9,S={bits:r.lenbits},k=ys(vs,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,k){e.msg="invalid literal/lengths set",r.mode=Ss;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},k=ys(_s,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,k){e.msg="invalid distances set",r.mode=Ss;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,r.hold=h,r.bits=u,gs(e,f),o=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,n=e.input,a=e.avail_in,h=r.hold,u=r.bits,r.mode===ks&&(r.back=-1);break}for(r.back=0;y=(T=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,v=65535&T,!((g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(y&&0==(240&y)){for(_=g,b=y,w=v;y=(T=r.lencode[w+((h&(1<<_+b)-1)>>_)])>>>16&255,v=65535&T,!(_+(g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}h>>>=_,u-=_,r.back+=_}if(h>>>=g,u-=g,r.back+=g,r.length=v,0===y){r.mode=26;break}if(32&y){r.back=-1,r.mode=ks;break}if(64&y){e.msg="invalid literal/length code",r.mode=Ss;break}r.extra=15&y,r.mode=22;case 22:if(r.extra){for(E=r.extra;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.length+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;y=(T=r.distcode[h&(1<<r.distbits)-1])>>>16&255,v=65535&T,!((g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(0==(240&y)){for(_=g,b=y,w=v;y=(T=r.distcode[w+((h&(1<<_+b)-1)>>_)])>>>16&255,v=65535&T,!(_+(g=T>>>24)<=u);){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}h>>>=_,u-=_,r.back+=_}if(h>>>=g,u-=g,r.back+=g,64&y){e.msg="invalid distance code",r.mode=Ss;break}r.offset=v,r.extra=15&y,r.mode=24;case 24:if(r.extra){for(E=r.extra;u<E;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}r.offset+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Ss;break}r.mode=25;case 25:if(0===l)break e;if(d=f-l,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Ss;break}d>r.wnext?(d-=r.wnext,p=r.wsize-d):p=r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=o-r.offset,d=r.length;d>l&&(d=l),l-=d,r.length-=d;do{i[o++]=m[p++]}while(--d);0===r.length&&(r.mode=21);break;case 26:if(0===l)break e;i[o++]=r.length,l--,r.mode=21;break;case 27:if(r.wrap){for(;u<32;){if(0===a)break e;a--,h|=n[s++]<<u,u+=8}if(f-=l,e.total_out+=f,r.total+=f,f&&(e.adler=r.check=r.flags?ms(r.check,i,f,o-f):ps(r.check,i,f,o-f)),f=l,(r.flags?h:Cs(h))!==r.check){e.msg="incorrect data check",r.mode=Ss;break}h=0,u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;u<32;){if(0===a)break e;a--,h+=n[s++]<<u,u+=8}if(h!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=Ss;break}h=0,u=0}r.mode=29;case 29:k=1;break e;case Ss:k=-3;break e;case 31:return-4;default:return ws}return e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,r.hold=h,r.bits=u,(r.wsize||f!==e.avail_out&&r.mode<Ss&&(r.mode<27||4!==t))&&Ms(e,e.output,e.next_out,f-e.avail_out),c-=e.avail_in,f-=e.avail_out,e.total_in+=c,e.total_out+=f,r.total+=f,r.wrap&&f&&(e.adler=r.check=r.flags?ms(r.check,i,f,e.next_out-f):ps(r.check,i,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===ks?128:0)+(20===r.mode||15===r.mode?256:0),(0===c&&0===f||4===t)&&k===bs&&(k=-5),k},os.inflateEnd=function(e){if(!e||!e.state)return ws;var t=e.state;return t.window&&(t.window=null),e.state=null,bs},os.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?ws:(r.head=t,t.done=!1,bs):ws},os.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?ws:11===r.mode&&ps(1,t,n,0)!==r.check?-3:Ms(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,bs):ws},os.inflateInfo="pako inflate (from Nodeca project)";var Ls={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 Bs=os,zs=Hr,$s=Bi,Hs=Ls,Us=qn,Vs=qi,Ws=function(){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},qs=Object.prototype.toString;function Xs(e){if(!(this instanceof Xs))return new Xs(e);this.options=zs.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vs,this.strm.avail_out=0;var r=Bs.inflateInit2(this.strm,t.windowBits);if(r!==Hs.Z_OK)throw new Error(Us[r]);if(this.header=new Ws,Bs.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=$s.string2buf(t.dictionary):"[object ArrayBuffer]"===qs.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Bs.inflateSetDictionary(this.strm,t.dictionary))!==Hs.Z_OK))throw new Error(Us[r])}function Zs(e,t){var r=new Xs(t);if(r.push(e,!0),r.err)throw r.msg||Us[r.err];return r.result}Xs.prototype.push=function(e,t){var r,n,i,s,o,a=this.strm,l=this.options.chunkSize,h=this.options.dictionary,u=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?Hs.Z_FINISH:Hs.Z_NO_FLUSH,"string"==typeof e?a.input=$s.binstring2buf(e):"[object ArrayBuffer]"===qs.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new zs.Buf8(l),a.next_out=0,a.avail_out=l),(r=Bs.inflate(a,Hs.Z_NO_FLUSH))===Hs.Z_NEED_DICT&&h&&(r=Bs.inflateSetDictionary(this.strm,h)),r===Hs.Z_BUF_ERROR&&!0===u&&(r=Hs.Z_OK,u=!1),r!==Hs.Z_STREAM_END&&r!==Hs.Z_OK)return this.onEnd(r),this.ended=!0,!1;a.next_out&&(0!==a.avail_out&&r!==Hs.Z_STREAM_END&&(0!==a.avail_in||n!==Hs.Z_FINISH&&n!==Hs.Z_SYNC_FLUSH)||("string"===this.options.to?(i=$s.utf8border(a.output,a.next_out),s=a.next_out-i,o=$s.buf2string(a.output,i),a.next_out=s,a.avail_out=l-s,s&&zs.arraySet(a.output,a.output,i,s,0),this.onData(o)):this.onData(zs.shrinkBuf(a.output,a.next_out)))),0===a.avail_in&&0===a.avail_out&&(u=!0)}while((a.avail_in>0||0===a.avail_out)&&r!==Hs.Z_STREAM_END);return r===Hs.Z_STREAM_END&&(n=Hs.Z_FINISH),n===Hs.Z_FINISH?(r=Bs.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Hs.Z_OK):n!==Hs.Z_SYNC_FLUSH||(this.onEnd(Hs.Z_OK),a.avail_out=0,!0)},Xs.prototype.onData=function(e){this.chunks.push(e)},Xs.prototype.onEnd=function(e){e===Hs.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=zs.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},ss.Inflate=Xs,ss.inflate=Zs,ss.inflateRaw=function(e,t){return(t=t||{}).raw=!0,Zs(e,t)},ss.ungzip=Zs;var Gs={};(0,Hr.assign)(Gs,Ur,ss,Ls);var Ys="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,Ks=Gs,Qs=Vt(),Js=qt,eo=Ys?"uint8array":"array";function to(e,t){Js.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}$r.magic="\b\0",Qs.inherits(to,Js),to.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(Qs.transformTo(eo,e.data),!1)},to.prototype.flush=function(){Js.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},to.prototype.cleanUp=function(){Js.prototype.cleanUp.call(this),this._pako=null},to.prototype._createPako=function(){this._pako=new Ks[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},$r.compressWorker=function(e){return new to("Deflate",e)},$r.uncompressWorker=function(){return new to("Inflate",{})};var ro=qt;zr.STORE={magic:"\0\0",compressWorker:function(){return new ro("STORE compression")},uncompressWorker:function(){return new ro("STORE decompression")}},zr.DEFLATE=$r;var no={LOCAL_FILE_HEADER:"PK",CENTRAL_FILE_HEADER:"PK",CENTRAL_DIRECTORY_END:"PK",ZIP64_CENTRAL_DIRECTORY_LOCATOR:"PK",ZIP64_CENTRAL_DIRECTORY_END:"PK",DATA_DESCRIPTOR:"PK\b"},io=Vt(),so=qt,oo=Be,ao=mr,lo=no,ho=function(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n},uo=function(e,t,r,n,i,s){var o,a,l=e.file,h=e.compression,u=s!==oo.utf8encode,c=io.transformTo("string",s(l.name)),f=io.transformTo("string",oo.utf8encode(l.name)),d=l.comment,p=io.transformTo("string",s(d)),m=io.transformTo("string",oo.utf8encode(d)),g=f.length!==l.name.length,y=m.length!==d.length,v="",_="",b="",w=l.dir,x=l.date,k={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),u||!g&&!y||(S|=2048);var E,T,C,O=0,R=0;w&&(O|=16),"UNIX"===i?(R=798,O|=(E=l.unixPermissions,T=w,C=E,E||(C=T?16893:33204),(65535&C)<<16)):(R=20,O|=63&(l.dosPermissions||0)),o=x.getUTCHours(),o<<=6,o|=x.getUTCMinutes(),o<<=5,o|=x.getUTCSeconds()/2,a=x.getUTCFullYear()-1980,a<<=4,a|=x.getUTCMonth()+1,a<<=5,a|=x.getUTCDate(),g&&(_=ho(1,1)+ho(ao(c),4)+f,v+="up"+ho(_.length,2)+_),y&&(b=ho(1,1)+ho(ao(p),4)+m,v+="uc"+ho(b.length,2)+b);var A="";return A+="\n\0",A+=ho(S,2),A+=h.magic,A+=ho(o,2),A+=ho(a,2),A+=ho(k.crc32,4),A+=ho(k.compressedSize,4),A+=ho(k.uncompressedSize,4),A+=ho(c.length,2),A+=ho(v.length,2),{fileRecord:lo.LOCAL_FILE_HEADER+A+c+v,dirRecord:lo.CENTRAL_FILE_HEADER+ho(R,2)+A+ho(p.length,2)+"\0\0\0\0"+ho(O,4)+ho(n,4)+c+v+p}},co=function(e){return lo.DATA_DESCRIPTOR+ho(e.crc32,4)+ho(e.compressedSize,4)+ho(e.uncompressedSize,4)};function fo(e,t,r,n){so.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}io.inherits(fo,so),fo.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,so.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},fo.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=uo(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},fo.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=uo(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:co(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},fo.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,n=function(e,t,r,n,i){var s=io.transformTo("string",i(n));return lo.CENTRAL_DIRECTORY_END+"\0\0\0\0"+ho(e,2)+ho(e,2)+ho(t,4)+ho(r,4)+ho(s.length,2)+s}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},fo.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},fo.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},fo.prototype.resume=function(){return!!so.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},fo.prototype.error=function(e){var t=this._sources;if(!so.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},fo.prototype.lock=function(){so.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()};var po=zr,mo=fo;Br.generateWorker=function(e,t,r){var n=new mo(t.streamFiles,r,t.platform,t.encodeFileName),i=0;try{e.forEach((function(e,r){i++;var s=function(e,t){var r=e||t,n=po[r];if(!n)throw new Error(r+" is not a valid compression method !");return n}(r.options.compression,t.compression),o=r.options.compressionOptions||t.compressionOptions||{},a=r.dir,l=r.date;r._compressWorker(s,o).withStreamInfo("file",{name:e,dir:a,date:l,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(n)})),n.entriesCount=i}catch(e){n.error(e)}return n};var go=Vt(),yo=qt;function vo(e,t){yo.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}go.inherits(vo,yo),vo.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},vo.prototype.pause=function(){return!!yo.prototype.pause.call(this)&&(this._stream.pause(),!0)},vo.prototype.resume=function(){return!!yo.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)};var _o=vo,bo=Be,wo=Vt(),xo=qt,ko=ar,So=lr,Eo=Or,To=Lr,Co=Br,Oo=zt,Ro=_o,Ao=function(e,t,r){var n,i=wo.getTypeOf(t),s=wo.extend(r||{},So);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=Io(e)),s.createFolders&&(n=No(e))&&Po.call(this,n,!0);var o="string"===i&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!o),(t instanceof Eo&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var a=null;a=t instanceof Eo||t instanceof xo?t:Oo.isNode&&Oo.isStream(t)?new Ro(e,t):wo.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var l=new To(e,a,s);this.files[e]=l},No=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},Io=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},Po=function(e,t){return t=void 0!==t?t:So.createFolders,e=Io(e),this.files[e]||Ao.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function Fo(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Do={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach((function(r,n){e(r,n)&&t.push(n)})),t},file:function(e,t,r){if(1===arguments.length){if(Fo(e)){var n=e;return this.filter((function(e,t){return!t.dir&&n.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return e=this.root+e,Ao.call(this,e,t,r),this},folder:function(e){if(!e)return this;if(Fo(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=Po.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=wo.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:bo.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");wo.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=Co.generateWorker(this,r,n)}catch(e){(t=new xo("error")).error(e)}return new ko(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}},jo=Do,Mo=Vt();function Lo(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}Lo.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return Mo.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}};var Bo=Lo,zo=Bo;function $o(e){zo.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}Vt().inherits($o,zo),$o.prototype.byteAt=function(e){return this.data[this.zero+e]},$o.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;s>=0;--s)if(this.data[s]===t&&this.data[s+1]===r&&this.data[s+2]===n&&this.data[s+3]===i)return s-this.zero;return-1},$o.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&r===s[1]&&n===s[2]&&i===s[3]},$o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var Ho=$o,Uo=Bo;function Vo(e){Uo.call(this,e)}Vt().inherits(Vo,Uo),Vo.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},Vo.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},Vo.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},Vo.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var Wo=Vo,qo=Ho;function Xo(e){qo.call(this,e)}Vt().inherits(Xo,qo),Xo.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var Zo=Xo,Go=Zo;function Yo(e){Go.call(this,e)}Vt().inherits(Yo,Go),Yo.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var Ko=Yo,Qo=Vt(),Jo=$e,ea=Ho,ta=Wo,ra=Ko,na=Zo,ia=function(e){var t=Qo.getTypeOf(e);return Qo.checkSupport(t),"string"!==t||Jo.uint8array?"nodebuffer"===t?new ra(e):Jo.uint8array?new na(Qo.transformTo("uint8array",e)):new ea(Qo.transformTo("array",e)):new ta(e)},sa=ia,oa=Vt(),aa=Or,la=mr,ha=Be,ua=zr,ca=$e;function fa(e,t){this.options=e,this.loadOptions=t}fa.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=function(e){for(var t in ua)if(Object.prototype.hasOwnProperty.call(ua,t)&&ua[t].magic===e)return ua[t];return null}(this.compressionMethod),null===t)throw new Error("Corrupted zip : compression "+oa.pretty(this.compressionMethod)+" unknown (inner file : "+oa.transformTo("string",this.fileName)+")");this.decompressed=new aa(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=sa(this.extraFields[1].value);this.uncompressedSize===oa.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===oa.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===oa.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===oa.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e=ca.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=ha.utf8decode(this.fileName),this.fileCommentStr=ha.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=oa.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=oa.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=sa(e.value);return 1!==t.readInt(1)||la(this.fileName)!==t.readInt(4)?null:ha.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=sa(e.value);return 1!==t.readInt(1)||la(this.fileComment)!==t.readInt(4)?null:ha.utf8decode(t.readData(e.length-5))}return null}};var da=fa,pa=ia,ma=Vt(),ga=no,ya=da,va=$e;function _a(e){this.files=[],this.loadOptions=e}_a.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+ma.pretty(t)+", expected "+ma.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;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 e=this.reader.readData(this.zipCommentLength),t=va.uint8array?"uint8array":"array",r=ma.transformTo(t,e);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 e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},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 e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(ga.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(ga.CENTRAL_FILE_HEADER);)(e=new ya({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(ga.CENTRAL_DIRECTORY_END);if(e<0)throw!this.isSignature(0,ga.LOCAL_FILE_HEADER)?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(e);var t=e;if(this.checkSignature(ga.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===ma.MAX_VALUE_16BITS||this.diskWithCentralDirStart===ma.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===ma.MAX_VALUE_16BITS||this.centralDirRecords===ma.MAX_VALUE_16BITS||this.centralDirSize===ma.MAX_VALUE_32BITS||this.centralDirOffset===ma.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(ga.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(ga.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,ga.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(ga.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(ga.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(n>0)this.isSignature(t,ga.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=pa(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var ba=_a,wa=Vt(),xa=Ut,ka=Be,Sa=ba,Ea=_r,Ta=zt;function Ca(e){return new xa.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new Ea);n.on("error",(function(e){r(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}function Oa(){if(!(this instanceof Oa))return new Oa;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 e=new Oa;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}Oa.prototype=jo,Oa.prototype.loadAsync=function(e,t){var r=this;return t=wa.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:ka.utf8decode}),Ta.isNode&&Ta.isStream(e)?xa.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):wa.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new Sa(t);return r.load(e),r})).then((function(e){var r=[xa.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var i=0;i<n.length;i++)r.push(Ca(n[i]));return xa.Promise.all(r)})).then((function(e){for(var n=e.shift(),i=n.files,s=0;s<i.length;s++){var o=i[s],a=o.fileNameStr,l=wa.resolve(o.fileNameStr);r.file(l,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:t.createFolders}),o.dir||(r.file(l).unsafeOriginalName=a)}return n.zipComment.length&&(r.comment=n.zipComment),r}))},Oa.support=$e,Oa.defaults=lr,Oa.version="3.10.1",Oa.loadAsync=function(e,t){return(new Oa).loadAsync(e,t)},Oa.external=Ut;var Ra,Aa,Na,Ia,Pa,Fa,Da=Oa,ja={exports:{}};function Ma(){return Aa?Ra:(Aa=1,Ra=n)}function La(){if(Ia)return Na;function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}Ia=1;var a=s.Buffer,l=o.inspect,h=l&&l.custom||"inspect";function u(e,t,r){a.prototype.copy.call(e,t,r)}return Na=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var r,i,s;return r=e,i=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t=a.allocUnsafe(e>>>0),r=this.head,n=0;r;)u(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:h,value:function(e,r){return l(this,t(t({},r),{},{depth:0,customInspect:!1}))}}],i&&n(r.prototype,i),s&&n(r,s),Object.defineProperty(r,"prototype",{writable:!1}),e}(),Na}function Ba(){if(Fa)return Pa;function e(e,n){r(e,n),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}return Fa=1,Pa={destroy:function(n,i){var s=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(i?i(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,n)):process.nextTick(r,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,(function(r){!i&&r?s._writableState?s._writableState.errorEmitted?process.nextTick(t,s):(s._writableState.errorEmitted=!0,process.nextTick(e,s,r)):process.nextTick(e,s,r):i?(process.nextTick(t,s),i(r)):process.nextTick(t,s)})),this)},undestroy:function(){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)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}},Pa}var za,$a,Ha,Ua,Va,Wa,qa,Xa={};function Za(){if(za)return Xa;za=1;const e={};function t(t,r,n){n||(n=Error);class i extends n{constructor(e,t,n){super(function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(e,t,n))}}i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function r(e,t){if(Array.isArray(e)){const r=e.length;return e=e.map((e=>String(e))),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,n){let i;var s,o;let a;if("string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a=`The ${e} ${i} ${r(t,"type")}`;else{const n=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a=`The "${e}" ${n} ${i} ${r(t,"type")}`}return a+=". Received type "+typeof n,a}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Xa.codes=e,Xa}function Ga(){if(Ha)return $a;Ha=1;var e=Za().codes.ERR_INVALID_OPT_VALUE;return $a={getHighWaterMark:function(t,r,n,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(r,i,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new e(i?n:"highWaterMark",s);return Math.floor(s)}return t.objectMode?16:16384}}}function Ya(){if(Va)return Ua;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Va=1,Ua=k,k.WritableState=x;var r={deprecate:mt()},n=Ma(),i=s.Buffer,o=(void 0!==p?p:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a,l=Ba(),h=Ga().getHighWaterMark,u=Za().codes,c=u.ERR_INVALID_ARG_TYPE,f=u.ERR_METHOD_NOT_IMPLEMENTED,d=u.ERR_MULTIPLE_CALLBACK,m=u.ERR_STREAM_CANNOT_PIPE,g=u.ERR_STREAM_DESTROYED,y=u.ERR_STREAM_NULL_VALUES,v=u.ERR_STREAM_WRITE_AFTER_END,_=u.ERR_UNKNOWN_ENCODING,b=l.errorOrDestroy;function w(){}function x(r,n,i){t=t||Ka(),r=r||{},"boolean"!=typeof i&&(i=n instanceof t),this.objectMode=!!r.objectMode,i&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=h(this,r,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===r.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new d;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(R,e,t),e._writableState.errorEmitted=!0,b(e,n)):(i(n),e._writableState.errorEmitted=!0,b(e,n),R(e,t))}(e,r,n,t,i);else{var s=C(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),n?process.nextTick(E,e,r,s,i):E(e,r,s,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function k(e){var r=this instanceof(t=t||Ka());if(!r&&!a.call(k,this))return new k(e);this._writableState=new x(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),n.call(this)}function S(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function E(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),R(e,t)}function T(t,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(t._writev&&n&&n.next){var i=r.bufferedRequestCount,s=new Array(i),o=r.corkedRequestsFree;o.entry=n;for(var a=0,l=!0;n;)s[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;s.allBuffers=l,S(t,r,!0,r.length,s,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;n;){var h=n.chunk,u=n.encoding,c=n.callback;if(S(t,r,!1,r.objectMode?1:h.length,h,u,c),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var r=C(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}return rt()(k,n),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===k&&(e&&e._writableState instanceof x)}})):a=function(e){return e instanceof this},k.prototype.pipe=function(){b(this,new m)},k.prototype.write=function(e,t,r){var n,s=this._writableState,a=!1,l=!s.objectMode&&(n=e,i.isBuffer(n)||n instanceof o);return l&&!i.isBuffer(e)&&(e=function(e){return i.from(e)}(e)),"function"==typeof t&&(r=t,t=null),l?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=w),s.ending?function(e,t){var r=new v;b(e,r),process.nextTick(t,r)}(this,r):(l||function(e,t,r,n){var i;return null===r?i=new y:"string"==typeof r||t.objectMode||(i=new c("chunk",["string","Buffer"],r)),!i||(b(e,i),process.nextTick(n,i),!1)}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,n,s,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=i.from(t,r));return t}(t,n,s);n!==a&&(r=!0,s="buffer",n=a)}var l=t.objectMode?1:n.length;t.length+=l;var h=t.length<t.highWaterMark;h||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,l,n,s,o);return h}(this,s,l,e,t,r)),a},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new f("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,R(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=l.destroy,k.prototype._undestroy=l.undestroy,k.prototype._destroy=function(e,t){t(e)},Ua}function Ka(){if(qa)return Wa;qa=1;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Wa=o;var t=bl(),r=Ya();rt()(o,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var s=n[i];o.prototype[s]||(o.prototype[s]=r.prototype[s])}function o(e){if(!(this instanceof o))return new o(e);t.call(this,e),r.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||process.nextTick(l,this)}function l(e){e.end()}return Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Wa}var Qa,Ja,el,tl,rl,nl,il,sl,ol,al,ll,hl,ul,cl,fl,dl,pl={},ml={exports:{}};function gl(){if(Ja)return pl;Ja=1;var e=(Qa||(Qa=1,function(e,t){var r=s,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(ml,ml.exports)),ml.exports).Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.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 r(r){var n;switch(this.encoding=function(r){var n=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=o,this.end=a,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=l,this.end=h,n=3;break;default:return this.write=u,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function c(e){return e&&e.length?this.write(e):""}return pl.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var s=n(t[i]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--i<r||-2===s)return 0;if(s=n(t[i]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--i<r||-2===s)return 0;if(s=n(t[i]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},pl}function yl(){if(tl)return el;tl=1;var e=Za().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return el=function r(n,i,s){if("function"==typeof i)return r(n,null,i);i||(i={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||t);var o=i.readable||!1!==i.readable&&n.readable,a=i.writable||!1!==i.writable&&n.writable,l=function(){n.writable||u()},h=n._writableState&&n._writableState.finished,u=function(){a=!1,h=!0,o||s.call(n)},c=n._readableState&&n._readableState.endEmitted,f=function(){o=!1,c=!0,a||s.call(n)},d=function(e){s.call(n,e)},p=function(){var t;return o&&!c?(n._readableState&&n._readableState.ended||(t=new e),s.call(n,t)):a&&!h?(n._writableState&&n._writableState.ended||(t=new e),s.call(n,t)):void 0},m=function(){n.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(n)?a&&!n._writableState&&(n.on("end",l),n.on("close",l)):(n.on("complete",u),n.on("abort",p),n.req?m():n.on("request",m)),n.on("end",f),n.on("finish",u),!1!==i.error&&n.on("error",d),n.on("close",p),function(){n.removeListener("complete",u),n.removeListener("abort",p),n.removeListener("request",m),n.req&&n.req.removeListener("finish",u),n.removeListener("end",l),n.removeListener("close",l),n.removeListener("finish",u),n.removeListener("end",f),n.removeListener("error",d),n.removeListener("close",p)}},el}function vl(){if(nl)return rl;var e;function t(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}nl=1;var r=yl(),n=Symbol("lastResolve"),i=Symbol("lastReject"),s=Symbol("error"),o=Symbol("ended"),a=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function u(e,t){return{value:e,done:t}}function c(e){var t=e[n];if(null!==t){var r=e[h].read();null!==r&&(e[a]=null,e[n]=null,e[i]=null,t(u(r,!1)))}}function f(e){process.nextTick(c,e)}var d=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((e={get stream(){return this[h]},next:function(){var e=this,t=this[s];if(null!==t)return Promise.reject(t);if(this[o])return Promise.resolve(u(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[s]?r(e[s]):t(u(void 0,!0))}))}));var r,n=this[a];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[o]?r(u(void 0,!0)):t[l](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(u(i,!1));r=new Promise(this[l])}return this[a]=r,r}},t(e,Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(u(void 0,!0))}))}))})),e),d);return rl=function(e){var c,d=Object.create(p,(t(c={},h,{value:e,writable:!0}),t(c,n,{value:null,writable:!0}),t(c,i,{value:null,writable:!0}),t(c,s,{value:null,writable:!0}),t(c,o,{value:e._readableState.endEmitted,writable:!0}),t(c,l,{value:function(e,t){var r=d[h].read();r?(d[a]=null,d[n]=null,d[i]=null,e(u(r,!1))):(d[n]=e,d[i]=t)},writable:!0}),c));return d[a]=null,r(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=d[i];return null!==t&&(d[a]=null,d[n]=null,d[i]=null,t(e)),void(d[s]=e)}var r=d[n];null!==r&&(d[a]=null,d[n]=null,d[i]=null,r(u(void 0,!0))),d[o]=!0})),e.on("readable",f.bind(null,d)),d},rl}function _l(){if(sl)return il;function e(e,t,r,n,i,s,o){try{var a=e[s](o),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(n,i)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}sl=1;var n=Za().codes.ERR_INVALID_ARG_TYPE;return il=function(i,s,o){var a;if(s&&"function"==typeof s.next)a=s;else if(s&&s[Symbol.asyncIterator])a=s[Symbol.asyncIterator]();else{if(!s||!s[Symbol.iterator])throw new n("iterable",["Iterable"],s);a=s[Symbol.iterator]()}var l=new i(function(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({objectMode:!0},o)),h=!1;function u(){return c.apply(this,arguments)}function c(){var t;return t=function*(){try{var e=yield a.next(),t=e.value;e.done?l.push(null):l.push(yield t)?u():h=!1}catch(e){l.destroy(e)}},c=function(){var r=this,n=arguments;return new Promise((function(i,s){var o=t.apply(r,n);function a(t){e(o,i,s,a,l,"next",t)}function l(t){e(o,i,s,a,l,"throw",t)}a(void 0)}))},c.apply(this,arguments)}return l._read=function(){h||(h=!0,u())},l},il}function bl(){if(al)return ol;var e;al=1,ol=E,E.ReadableState=S,i.EventEmitter;var t=function(e,t){return e.listeners(t).length},r=Ma(),n=s.Buffer,a=(void 0!==p?p:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,h=o;l=h&&h.debuglog?h.debuglog("stream"):function(){};var u,c,f,d=La(),m=Ba(),g=Ga().getHighWaterMark,y=Za().codes,v=y.ERR_INVALID_ARG_TYPE,_=y.ERR_STREAM_PUSH_AFTER_EOF,b=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;rt()(E,r);var x=m.errorOrDestroy,k=["error","close","destroy","pause","resume"];function S(t,r,n){e=e||Ka(),t=t||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new d,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=!1!==t.emitClose,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&&(u||(u=gl().StringDecoder),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function E(t){if(e=e||Ka(),!(this instanceof E))return new E(t);var n=this instanceof e;this._readableState=new S(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),r.call(this)}function T(e,t,r,i,s){l("readableAddChunk",t);var o,h=e._readableState;if(null===t)h.reading=!1,function(e,t){if(l("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?A(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,N(e)))}(e,h);else if(s||(o=function(e,t){var r;i=t,n.isBuffer(i)||i instanceof a||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t));var i;return r}(h,t)),o)x(e,o);else if(h.objectMode||t&&t.length>0)if("string"==typeof t||h.objectMode||Object.getPrototypeOf(t)===n.prototype||(t=function(e){return n.from(e)}(t)),i)h.endEmitted?x(e,new w):C(e,h,t,!0);else if(h.ended)x(e,new _);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!r?(t=h.decoder.write(t),h.objectMode||0!==t.length?C(e,h,t,!1):I(e,h)):C(e,h,t,!1)}else i||(h.reading=!1,I(e,h));return!h.ended&&(h.length<h.highWaterMark||0===h.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&A(e)),I(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=n.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},E.prototype.unshift=function(e){return T(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){u||(u=gl().StringDecoder);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var O=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(N,e))}function N(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,M(e)}function I(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(l("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function F(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){l("readable nexttick read 0"),e.read(0)}function j(e,t){l("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;l("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(z,t,e))}function z(e,t){if(l("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return E.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):A(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",i=!0),t.ended||t.reading?l("reading or ended",i=!1):i&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(n=e>0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){x(this,new b("_read()"))},E.prototype.pipe=function(e,r){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,r);var s=(!r||!1!==r.end)&&e!==process.stdout&&e!==process.stderr?a:m;function o(t,r){l("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",h),e.removeListener("error",f),e.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",m),n.removeListener("data",c),u=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function a(){l("onend"),e.end()}i.endEmitted?process.nextTick(s):n.once("end",s),e.on("unpipe",o);var h=function(e){return function(){var r=e._readableState;l("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&t(e,"data")&&(r.flowing=!0,M(e))}}(n);e.on("drain",h);var u=!1;function c(t){l("ondata");var r=e.write(t);l("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==$(i.pipes,e))&&!u&&(l("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function f(r){l("onerror",r),m(),e.removeListener("error",f),0===t(e,"error")&&x(e,r)}function d(){e.removeListener("finish",p),m()}function p(){l("onfinish"),e.removeListener("close",d),m()}function m(){l("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",n),i.flowing||(l("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=$(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var n=r.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,l("on readable",i.length,i.reading),i.length?A(this):i.reading||process.nextTick(D,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=r.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(F,this),n},E.prototype.removeAllListeners=function(e){var t=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(F,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<k.length;s++)e.on(k[s],this.emit.bind(this,k[s]));return this._read=function(t){l("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=vl()),c(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=L,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===f&&(f=_l()),f(E,e,t)}),ol}function wl(){if(hl)return ll;hl=1,ll=a;var e=Za().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,r=e.ERR_MULTIPLE_CALLBACK,n=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,s=Ka();function o(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(null===i)return this.emit("error",new r);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new i;if(e._transformState.transforming)throw new n;return e.push(null)}return rt()(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,r,n){n(new t("_transform()"))},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},a.prototype._destroy=function(e,t){s.prototype._destroy.call(this,e,(function(e){t(e)}))},ll}function xl(){if(dl)return fl;var e;dl=1;var t=Za().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(e){if(e)throw e}function s(e){e()}function o(e,t){return e.pipe(t)}return fl=function(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];var h,u=function(e){return e.length?"function"!=typeof e[e.length-1]?i:e.pop():i}(a);if(Array.isArray(a[0])&&(a=a[0]),a.length<2)throw new r("streams");var c=a.map((function(t,r){var i=r<a.length-1;return function(t,r,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var o=!1;t.on("close",(function(){o=!0})),void 0===e&&(e=yl()),e(t,{readable:r,writable:i},(function(e){if(e)return s(e);o=!0,s()}));var a=!1;return function(e){if(!o&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new n("pipe"))}}(t,i,r>0,(function(e){h||(h=e),e&&c.forEach(s),i||(c.forEach(s),u(h))}))}));return a.reduce(o)},fl}!function(e,t){var r=n;"disable"===process.env.READABLE_STREAM&&r?(e.exports=r.Readable,Object.assign(e.exports,r),e.exports.Stream=r):((t=e.exports=bl()).Stream=r||t,t.Readable=t,t.Writable=Ya(),t.Duplex=Ka(),t.Transform=wl(),t.PassThrough=function(){if(cl)return ul;cl=1,ul=t;var e=wl();function t(r){if(!(this instanceof t))return new t(r);e.call(this,r)}return rt()(t,e),t.prototype._transform=function(e,t,r){r(null,e)},ul}(),t.finished=yl(),t.pipeline=xl())}(ja,ja.exports);var kl=ja.exports;const Sl=r,El=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,Tl={nop(){},promiseImmediate:e=>new Promise((t=>{p.setImmediate?setImmediate((()=>{t(e)})):setTimeout((()=>{t(e)}),1)})),inherits:function(e,t,r,n){e.super_=t,n||(n=r,r=null),r&&Object.keys(r).forEach((t=>{Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}));const i={constructor:{value:e,enumerable:!1,writable:!1,configurable:!0}};n&&Object.keys(n).forEach((e=>{i[e]=Object.getOwnPropertyDescriptor(n,e)})),e.prototype=Object.create(t.prototype,i)},dateToExcel:(e,t)=>25569+e.getTime()/864e5-(t?1462:0),excelToDate(e,t){const r=Math.round(24*(e-25569+(t?1462:0))*3600*1e3);return new Date(r)},parsePath(e){const t=e.lastIndexOf("/");return{path:e.substring(0,t),name:e.substring(t+1)}},getRelsPath(e){const t=Tl.parsePath(e);return`${t.path}/_rels/${t.name}.rels`},xmlEncode(e){const t=El.exec(e);if(!t)return e;let r="",n="",i=0,s=t.index;for(;s<e.length;s++){const t=e.charCodeAt(s);switch(t){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;case 127:n="";break;default:if(t<=31&&(t<=8||t>=11&&13!==t)){n="";break}continue}i!==s&&(r+=e.substring(i,s)),i=s+1,n&&(r+=n)}return i!==s?r+e.substring(i,s):r},xmlDecode:e=>e.replace(/&([a-z]*);/g,(e=>{switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return e}})),validInt(e){const t=parseInt(e,10);return Number.isNaN(t)?0:t},isDateFmt(e){if(!e)return!1;return null!==(e=(e=e.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)},fs:{exists:e=>new Promise((t=>{Sl.access(e,Sl.constants.F_OK,(e=>{t(!e)}))}))},toIsoDateString:e=>e.toIsoString().subsstr(0,10),parseBoolean:e=>!0===e||"true"===e||1===e||"1"===e};var Cl=Tl;var Ol=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 t=2*this._buf.length;for(;t<e;)t*=2;const r=Buffer.alloc(t);this._buf.copy(r,0),this._buf=r}addText(e){this._buffer=void 0;let t=this._inPos+this._buf.write(e,this._inPos,this._encoding);for(;t>=this._buf.length-4;)this._grow(this._inPos+e.length),t=this._inPos+this._buf.write(e,this._inPos,this._encoding);this._inPos=t}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)}};const Rl=kl,Al=Cl,Nl=Ol;class Il{constructor(e,t){this._data=e,this._encoding=t}get length(){return this.toBuffer().length}copy(e,t,r,n){return this.toBuffer().copy(e,t,r,n)}toBuffer(){return this._buffer||(this._buffer=Buffer.from(this._data,this._encoding)),this._buffer}}class Pl{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,r,n){return this._data._buf.copy(e,t,r,n)}toBuffer(){return this._data.toBuffer()}}class Fl{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,r,n){this._data.copy(e,t,r,n)}toBuffer(){return this._data}}class Dl{constructor(e){this.size=e,this.buffer=Buffer.alloc(e),this.iRead=0,this.iWrite=0}toBuffer(){if(0===this.iRead&&this.iWrite===this.size)return this.buffer;const 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 t;return 0===e?null:void 0===e||e>=this.length?(t=this.toBuffer(),this.iRead=this.iWrite,t):(t=Buffer.alloc(e),this.buffer.copy(t,0,this.iRead,e),this.iRead+=e,t)}write(e,t,r){const n=Math.min(r,this.size-this.iWrite);return e.copy(this.buffer,this.iWrite,t,t+n),this.iWrite+=n,n}}const jl=function(e){e=e||{},this.bufSize=e.bufSize||1048576,this.buffers=[],this.batch=e.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};Al.inherits(jl,Rl.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return Buffer.concat(this.buffers.map((e=>e.toBuffer())))}},_getWritableBuffer(){if(this.buffers.length){const e=this.buffers[this.buffers.length-1];if(!e.full)return e}const e=new Dl(this.bufSize);return this.buffers.push(e),e},async _pipe(e){await Promise.all(this.pipes.map((function(t){return new Promise((r=>{t.write(e.toBuffer(),(()=>{r()}))}))})))},_writeToBuffers(e){let t=0;const r=e.length;for(;t<r;){t+=this._getWritableBuffer().write(e,t,r-t)}},async write(e,t,r){let n;if(t instanceof Function&&(r=t,t="utf8"),r=r||Al.nop,e instanceof Nl)n=new Pl(e);else if(e instanceof Buffer)n=new Fl(e);else{if(!("string"==typeof e||e instanceof String||e instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");n=new Il(e,t)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(n);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(n),process.nextTick(r)):(await this._pipe(n),r());else this.paused||this.emit("data",n.toBuffer()),this._writeToBuffers(n),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(e,t,r){const n=e=>{e?r(e):(this._flush(),this.pipes.forEach((e=>{e.end()})),this.emit("finish"))};e?this.write(e,t,n):n()},read(e){let t;if(e){for(t=[];e&&this.buffers.length&&!this.buffers[0].eod;){const r=this.buffers[0],n=r.read(e);e-=n.length,t.push(n),r.eod&&r.full&&this.buffers.shift()}return Buffer.concat(t)}return t=this.buffers.map((e=>e.toBuffer())).filter(Boolean),this.buffers=[],Buffer.concat(t)},setEncoding(e){this.encoding=e},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(e){this.pipes.push(e),!this.paused&&this.buffers.length&&this.end()},unpipe(e){this.pipes=this.pipes.filter((t=>t!==e))},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}});var Ml=jl,Ll={};const Bl="undefined"==typeof TextEncoder?null:new TextEncoder("utf-8"),{Buffer:zl}=s;Ll.stringToBuffer=function(e){return"string"!=typeof e?e:Bl?zl.from(Bl.encode(e).buffer):zl.from(e)};const $l=i,Hl=Da,Ul=Ml,{stringToBuffer:Vl}=Ll;class Wl extends $l.EventEmitter{constructor(e){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},e),this.zip=new Hl,this.stream=new Ul}append(e,t){t.hasOwnProperty("base64")&&t.base64?this.zip.file(t.name,e,{base64:!0}):(process.browser&&"string"==typeof e&&(e=Vl(e)),this.zip.file(t.name,e))}async finalize(){const 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,t){return this.stream.pipe(e,t)}unpipe(e){return this.stream.unpipe(e)}unshift(e){return this.stream.unshift(e)}wrap(e){return this.stream.wrap(e)}}var ql={ZipWriter:Wl};const Xl=k,Zl=Cl,Gl=">";function Yl(e,t,r){e.push(` ${t}="${Zl.xmlEncode(r.toString())}"`)}function Kl(e,t){if(t){const r=[];Xl.each(t,((e,t)=>{void 0!==e&&Yl(r,t,e)})),e.push(r.join(""))}}let Ql=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){const t=this._xml;t.push("<?xml"),Kl(t,e),t.push("?>\n")}openNode(e,t){const r=this.tos,n=this._xml;r&&this.open&&n.push(Gl),this._stack.push(e),n.push("<"),n.push(e),Kl(n,t),this.leaf=!0,this.open=!0}addAttribute(e,t){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");void 0!==t&&Yl(this._xml,e,t)}addAttributes(e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");Kl(this._xml,e)}writeText(e){const t=this._xml;this.open&&(t.push(Gl),this.open=!1),this.leaf=!1,t.push(Zl.xmlEncode(e.toString()))}writeXml(e){this.open&&(this._xml.push(Gl),this.open=!1),this.leaf=!1,this._xml.push(e)}closeNode(){const e=this._stack.pop(),t=this._xml;this.leaf?t.push("/>"):(t.push("</"),t.push(e),t.push(Gl)),this.open=!1,this.leaf=!1}leafNode(e,t,r){this.openNode(e,t),void 0!==r&&this.writeText(r),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(){const 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("")}};Ql.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};var Jl=Ql,eh={};const th="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");eh.bufferToString=function(e){return"string"==typeof e?e:th?th.decode(e):e.toString()};var rh={},nh={};!function(e){
|
|
2
2
|
/**
|
|
3
3
|
* Character classes and associated utilities for the 5th edition of XML 1.0.
|
|
4
4
|
*
|
|
@@ -89,4 +89,4 @@ var JI=c,eP=GN,tP=tA,rP=function(e){if(!(this instanceof rP))return new rP(e);"o
|
|
|
89
89
|
*
|
|
90
90
|
* MIT Licensed
|
|
91
91
|
*/
|
|
92
|
-
function(e){const n=r,i=f,s=l,o=t,a={fs:n.constants,os:i.constants},h=aB,u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",c=/XXXXXX/,d=3,p=(a.O_CREAT||a.fs.O_CREAT)|(a.O_EXCL||a.fs.O_EXCL)|(a.O_RDWR||a.fs.O_RDWR),m="win32"===i.platform(),g=a.EBADF||a.os.errno.EBADF,y=a.ENOENT||a.os.errno.ENOENT,v=[],_=n.rmdirSync.bind(n),b=h.sync;let w=!1;function x(e,t){const r=I(e,t),i=r[0],s=r[1];try{F(i)}catch(e){return s(e)}let o=i.tries;!function e(){try{const t=P(i);n.stat(t,(function(r){if(!r)return o-- >0?e():s(new Error("Could not get a unique tmp filename, max tries reached "+t));s(null,t)}))}catch(e){s(e)}}()}function k(e){const t=I(e)[0];F(t);let r=t.tries;do{const e=P(t);try{n.statSync(e)}catch(t){return e}}while(r-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function S(e,t){const r=function(e){if(e&&!L(e))return t(e);t()};0<=e[0]?n.close(e[0],(function(){n.unlink(e[1],r)})):n.unlink(e[1],r)}function E(e){let t=null;try{0<=e[0]&&n.closeSync(e[0])}catch(e){if(!function(e){return B(e,-g,"EBADF")}(e)&&!L(e))throw e}finally{try{n.unlinkSync(e[1])}catch(e){L(e)||(t=e)}}if(null!==t)throw t}function T(e,t,r,n){const i=O(E,[t,e],n),s=O(S,[t,e],n,i);return r.keep||v.unshift(i),n?i:s}function C(e,t,r){const i=t.unsafeCleanup?h:n.rmdir.bind(n),s=O(t.unsafeCleanup?b:_,e,r),o=O(i,e,r,s);return t.keep||v.unshift(s),r?s:o}function O(e,t,r,n){let i=!1;return function s(o){if(!i){const a=n||s,l=v.indexOf(a);return l>=0&&v.splice(l,1),i=!0,r||e===_||e===b?e(t):e(t,o||function(){})}}}function R(e){let t=[],r=null;try{r=o.randomBytes(e)}catch(t){r=o.pseudoRandomBytes(e)}for(var n=0;n<e;n++)t.push(u[r[n]%u.length]);return t.join("")}function A(e){return null===e||N(e)||!e.trim()}function N(e){return void 0===e}function I(e,t){if("function"==typeof e)return[{},e];if(N(e))return[{},t];const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=e[t];return[r,t]}function P(e){const t=e.tmpdir;if(!N(e.name))return s.join(t,e.dir,e.name);if(!N(e.template))return s.join(t,e.dir,e.template).replace(c,R(6));const r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",R(12),e.postfix?"-"+e.postfix:""].join("");return s.join(t,e.dir,r)}function F(e){e.tmpdir=z(e);const t=e.tmpdir;if(N(e.name)||M(e.name,"name",t),N(e.dir)||M(e.dir,"dir",t),!N(e.template)&&(M(e.template,"template",t),!e.template.match(c)))throw new Error(`Invalid template, found "${e.template}".`);if(!N(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=N(e.name)?e.tries||d:1,e.keep=!!e.keep,e.detachDescriptor=!!e.detachDescriptor,e.discardDescriptor=!!e.discardDescriptor,e.unsafeCleanup=!!e.unsafeCleanup,e.dir=N(e.dir)?"":s.relative(t,D(e.dir,t)),e.template=N(e.template)?void 0:s.relative(t,D(e.template,t)),e.template=A(e.template)?void 0:s.relative(e.dir,e.template),e.name=N(e.name)?void 0:j(e.name),e.prefix=N(e.prefix)?"":e.prefix,e.postfix=N(e.postfix)?"":e.postfix}function D(e,t){const r=j(e);return r.startsWith(t)?s.resolve(r):s.resolve(s.join(t,r))}function j(e){return A(e)?e:e.replace(/["']/g,"")}function M(e,t,r){if("name"===t){if(s.isAbsolute(e))throw new Error(`${t} option must not contain an absolute path, found "${e}".`);let r=s.basename(e);if(".."===r||"."===r||r!==e)throw new Error(`${t} option must not contain a path, found "${e}".`)}else{if(s.isAbsolute(e)&&!e.startsWith(r))throw new Error(`${t} option must be relative to "${r}", found "${e}".`);let n=D(e,r);if(!n.startsWith(r))throw new Error(`${t} option must be relative to "${r}", found "${n}".`)}}function L(e){return B(e,-y,"ENOENT")}function B(e,t,r){return m?e.code===r:e.code===r&&e.errno===t}function z(e){return s.resolve(j(e&&e.tmpdir||i.tmpdir()))}process.addListener("exit",(function(){if(w)for(;v.length;)try{v[0]()}catch(e){}})),Object.defineProperty(e.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return z()}}),e.exports.dir=function(e,t){const r=I(e,t),i=r[0],s=r[1];x(i,(function(e,t){if(e)return s(e);n.mkdir(t,i.mode||448,(function(e){if(e)return s(e);s(null,t,C(t,i,!1))}))}))},e.exports.dirSync=function(e){const t=I(e)[0],r=k(t);return n.mkdirSync(r,t.mode||448),{name:r,removeCallback:C(r,t,!0)}},e.exports.file=function(e,t){const r=I(e,t),i=r[0],s=r[1];x(i,(function(e,t){if(e)return s(e);n.open(t,p,i.mode||384,(function(e,r){if(e)return s(e);if(i.discardDescriptor)return n.close(r,(function(e){return s(e,t,void 0,T(t,-1,i,!1))}));{const e=i.discardDescriptor||i.detachDescriptor;s(null,t,r,T(t,e?-1:r,i,!1))}}))}))},e.exports.fileSync=function(e){const t=I(e)[0],r=t.discardDescriptor||t.detachDescriptor,i=k(t);var s=n.openSync(i,p,t.mode||384);return t.discardDescriptor&&(n.closeSync(s),s=void 0),{name:i,fd:s,removeCallback:T(i,r?-1:s,t,!0)}},e.exports.tmpName=x,e.exports.tmpNameSync=k,e.exports.setGracefulCleanup=function(){w=!0}}(UL);var lB=UL.exports;function hB(e,t){return new Promise((r=>{let n=!1;const i=()=>{n||(n=!0,e.removeListener(t,i),r())};e.addListener(t,i)}))}const{EventEmitter:uB}=i,cB=Uh,fB=k,dB=Cl,pB=T,mB=O,gB=Z,yB=Q;let vB=class extends uB{constructor(e){let{workbook:t,id:r,iterator:n,options:i}=e;super(),this.workbook=t,this.id=r,this.iterator=n,this.options=i||{},this.name=`Sheet${this.id}`,this._columns=null,this._keys={},this._dimensions=new mB}destroy(){throw new Error("Invalid Operation: destroy")}get dimensions(){return this._dimensions}get columns(){return this._columns}getColumn(e){if("string"==typeof e){const t=this._keys[e];if(t)return t;e=pB.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){let t=this._columns.length+1;for(;t<=e;)this._columns.push(new yB(this,t++))}return this._columns[e-1]}getColumnKey(e){return this._keys[e]}setColumnKey(e,t){this._keys[e]=t}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){fB.each(this._keys,e)}async read(){try{for await(const e of this.parse())for(const{eventType:t,value:r}of e)this.emit(t,r);this.emit("finished")}catch(e){this.emit("error",e)}}async*[Symbol.asyncIterator](){for await(const e of this.parse())for(const{eventType:t,value:r}of e)"row"===t&&(yield r)}async*parse(){const{iterator:e,options:t}=this;let r=!1,n=!1,i=null;if("emit"===t.worksheets)r=!0;switch(t.hyperlinks){case"emit":n=!0;break;case"cache":this.hyperlinks=i={}}if(!r&&!n&&!i)return;const{sharedStrings:s,styles:o,properties:a}=this.workbook;let l=!1,h=!1,u=!1,c=null,f=null,d=null,p=null;for await(const t of cB(e)){const e=[];for(const{eventType:m,value:g}of t)if("opentag"===m){const t=g;if(r)switch(t.name){case"cols":l=!0,c=[];break;case"sheetData":h=!0;break;case"col":l&&c.push({min:parseInt(t.attributes.min,10),max:parseInt(t.attributes.max,10),width:parseFloat(t.attributes.width),styleId:parseInt(t.attributes.style||"0",10)});break;case"row":if(h){const e=parseInt(t.attributes.r,10);if(f=new gB(this,e),t.attributes.ht&&(f.height=parseFloat(t.attributes.ht)),t.attributes.s){const e=parseInt(t.attributes.s,10),r=o.getStyleModel(e);r&&(f.style=r)}}break;case"c":f&&(d={ref:t.attributes.r,s:parseInt(t.attributes.s,10),t:t.attributes.t});break;case"f":d&&(p=d.f={text:""});break;case"v":case"is":case"t":d&&(p=d.v={text:""})}if(n||i)switch(t.name){case"hyperlinks":u=!0;break;case"hyperlink":if(u){const r={ref:t.attributes.ref,rId:t.attributes["r:id"]};n?e.push({eventType:"hyperlink",value:r}):i[r.ref]=r}}}else if("text"===m)r&&p&&(p.text+=g);else if("closetag"===m){const t=g;if(r)switch(t.name){case"cols":l=!1,this._columns=yB.fromModel(c);break;case"sheetData":h=!1;break;case"row":this._dimensions.expandRow(f),e.push({eventType:"row",value:f}),f=null;break;case"c":if(f&&d){const e=pB.decodeAddress(d.ref),t=f.getCell(e.col);if(d.s){const e=o.getStyleModel(d.s);e&&(t.style=e)}if(d.f){const e={formula:d.f.text};d.v&&("str"===d.t?e.result=dB.xmlDecode(d.v.text):e.result=parseFloat(d.v.text)),t.value=e}else if(d.v)switch(d.t){case"s":{const e=parseInt(d.v.text,10);t.value=s?s[e]:{sharedString:e};break}case"inlineStr":case"str":t.value=dB.xmlDecode(d.v.text);break;case"e":t.value={error:d.v.text};break;case"b":t.value=0!==parseInt(d.v.text,10);break;default:dB.isDateFmt(t.numFmt)?t.value=dB.excelToDate(parseFloat(d.v.text),a.model&&a.model.date1904):t.value=parseFloat(d.v.text)}if(i){const e=i[d.ref];e&&(t.text=t.value,t.value=void 0,t.hyperlink=e)}d=null}}if((n||i)&&"hyperlinks"===t.name)u=!1}e.length>0&&(yield e)}}};var _B=vB;const{EventEmitter:bB}=i,wB=Uh,xB=R,kB=$f;var SB=class extends bB{constructor(e){let{workbook:t,id:r,iterator:n,options:i}=e;super(),this.workbook=t,this.id=r,this.iterator=n,this.options=i}get count(){return this.hyperlinks&&this.hyperlinks.length||0}each(e){return this.hyperlinks.forEach(e)}async read(){const{iterator:e,options:t}=this;let r=!1,n=null;switch(t.hyperlinks){case"emit":r=!0;break;case"cache":this.hyperlinks=n={}}if(r||n)try{for await(const t of wB(e))for(const{eventType:e,value:i}of t)if("opentag"===e){const e=i;if("Relationship"===e.name){const t=e.attributes.Id;if(e.attributes.Type===kB.Hyperlink){const i={type:xB.RelationshipType.Styles,rId:t,target:e.attributes.Target,targetMode:e.attributes.TargetMode};r?this.emit("hyperlink",i):n[i.rId]=i}}}this.emit("finished")}catch(e){this.emit("error",e)}else this.emit("finished")}};const EB=r,{EventEmitter:TB}=i,{PassThrough:CB,Readable:OB}=kl,RB=n,AB=mF,NB=lB,IB=async function*(e){const t=[];let r;e.on("data",(e=>t.push(e)));const n=new Promise((e=>r=e));let i=!1;e.on("end",(()=>{i=!0,r()}));let s=!1;for(e.on("error",(e=>{s=e,r()}));!i||t.length>0;){if(0===t.length)e.resume(),await Promise.race([hB(e,"data"),n]);else{e.pause();const r=t.shift();yield r}if(s)throw s}r()},PB=Uh,FB=mc,DB=zf,jB=Kc,MB=_B,LB=SB;NB.setGracefulCleanup();class BB extends TB{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.input=e,this.options={worksheets:"emit",sharedStrings:"cache",hyperlinks:"ignore",styles:"ignore",entries:"ignore",...t},this.styles=new FB,this.styles.init()}_getStream(e){if(e instanceof RB.Readable||e instanceof OB)return e;if("string"==typeof e)return EB.createReadStream(e);throw new Error(`Could not recognise input: ${e}`)}async read(e,t){try{for await(const{eventType:r,value:n}of this.parse(e,t))switch(r){case"shared-strings":case"hyperlinks":this.emit(r,n);break;case"worksheet":this.emit(r,n),await n.read()}this.emit("end"),this.emit("finished")}catch(e){this.emit("error",e)}}async*[Symbol.asyncIterator](){for await(const{eventType:e,value:t}of this.parse())"worksheet"===e&&(yield t)}async*parse(e,t){t&&(this.options=t);const r=this.stream=this._getStream(e||this.input),n=AB.Parse({forceStream:!0});r.pipe(n);const i=[];for await(const e of IB(n)){let t,r;switch(e.path){case"_rels/.rels":break;case"xl/_rels/workbook.xml.rels":await this._parseRels(e);break;case"xl/workbook.xml":await this._parseWorkbook(e);break;case"xl/sharedStrings.xml":yield*this._parseSharedStrings(e);break;case"xl/styles.xml":await this._parseStyles(e);break;default:e.path.match(/xl\/worksheets\/sheet\d+[.]xml/)?(t=e.path.match(/xl\/worksheets\/sheet(\d+)[.]xml/),r=t[1],this.sharedStrings&&this.workbookRels?yield*this._parseWorksheet(IB(e),r):await new Promise(((t,n)=>{NB.file(((s,o,a,l)=>{if(s)return n(s);i.push({sheetNo:r,path:o,tempFileCleanupCallback:l});const h=EB.createWriteStream(o);return h.on("error",n),e.pipe(h),h.on("finish",(()=>t()))}))}))):e.path.match(/xl\/worksheets\/_rels\/sheet\d+[.]xml.rels/)&&(t=e.path.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),r=t[1],yield*this._parseHyperlinks(IB(e),r))}e.autodrain()}for(const{sheetNo:e,path:t,tempFileCleanupCallback:r}of i){let n=EB.createReadStream(t);n[Symbol.asyncIterator]||(n=n.pipe(new CB)),yield*this._parseWorksheet(n,e),r()}}_emitEntry(e){"emit"===this.options.entries&&this.emit("entry",e)}async _parseRels(e){const t=new jB;this.workbookRels=await t.parseStream(IB(e))}async _parseWorkbook(e){this._emitEntry({type:"workbook"});const t=new DB;await t.parseStream(IB(e)),this.properties=t.map.workbookPr,this.model=t.model}async*_parseSharedStrings(e){switch(this._emitEntry({type:"shared-strings"}),this.options.sharedStrings){case"cache":this.sharedStrings=[];break;case"emit":break;default:return}let t=null,r=[],n=0,i=null;for await(const s of PB(IB(e)))for(const{eventType:e,value:o}of s)if("opentag"===e){const e=o;switch(e.name){case"b":i=i||{},i.bold=!0;break;case"charset":i=i||{},i.charset=parseInt(e.attributes.charset,10);break;case"color":i=i||{},i.color={},e.attributes.rgb&&(i.color.argb=e.attributes.argb),e.attributes.val&&(i.color.argb=e.attributes.val),e.attributes.theme&&(i.color.theme=e.attributes.theme);break;case"family":i=i||{},i.family=parseInt(e.attributes.val,10);break;case"i":i=i||{},i.italic=!0;break;case"outline":i=i||{},i.outline=!0;break;case"rFont":i=i||{},i.name=e.value;break;case"si":i=null,r=[],t=null;break;case"sz":i=i||{},i.size=parseInt(e.attributes.val,10);break;case"strike":break;case"t":t=null;break;case"u":i=i||{},i.underline=!0;break;case"vertAlign":i=i||{},i.vertAlign=e.attributes.val}}else if("text"===e)t=t?t+o:o;else if("closetag"===e){switch(o.name){case"r":r.push({font:i,text:t}),i=null,t=null;break;case"si":"cache"===this.options.sharedStrings?this.sharedStrings.push(r.length?{richText:r}:t):"emit"===this.options.sharedStrings&&(yield{index:n++,text:r.length?{richText:r}:t}),r=[],i=null,t=null}}}async _parseStyles(e){this._emitEntry({type:"styles"}),"cache"===this.options.styles&&(this.styles=new FB,await this.styles.parseStream(IB(e)))}*_parseWorksheet(e,t){this._emitEntry({type:"worksheet",id:t});const r=new MB({workbook:this,id:t,iterator:e,options:this.options}),n=(this.workbookRels||[]).find((e=>e.Target===`worksheets/sheet${t}.xml`)),i=n&&(this.model.sheets||[]).find((e=>e.rId===n.Id));i&&(r.id=i.id,r.name=i.name,r.state=i.state),"emit"===this.options.worksheets&&(yield{eventType:"worksheet",value:r})}*_parseHyperlinks(e,t){this._emitEntry({type:"hyperlinks",id:t});const r=new LB({workbook:this,id:t,iterator:e,options:this.options});"emit"===this.options.hyperlinks&&(yield{eventType:"hyperlinks",value:r})}}BB.Options={worksheets:["emit","ignore"],sharedStrings:["cache","emit","ignore"],hyperlinks:["cache","emit","ignore"],styles:["cache","ignore"],entries:["emit","ignore"]};const zB={Workbook:bx,ModelContainer:xx,stream:{xlsx:{WorkbookWriter:pF,WorkbookReader:BB}}};Object.assign(zB,R);var $B=zB;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");var HB=m($B);function UB(e,t){let r="";for(let t=e+1;t>0;t=Math.floor((t-1)/26))r=String.fromCharCode((t-1)%26+65)+r;return r+(t+1)}function VB(e){if(e.startsWith("#")){let t=e.substring(1);3===t.length&&(t=t.replace(/(.)/g,"$1$1"));return[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}if(e.startsWith("rgb(")){return e.substring(4,e.length-1).split(",").map(Number)}if(e.startsWith("rgba(")){return e.substring(5,e.length-1).split(",").map(Number)}if(XB[e])return[(t=XB[e])>>16,t>>8&255,255&t,1];if(qB[e])return function(e){return[e>>>24,e>>>16&255,e>>>8&255,255&e]}(qB[e]);var t;throw new Error("Unsupported color format")}function WB(e){if(3===e.length&&e.push(1),4!==e.length)throw new Error("Invalid RGBA array");const[t,r,n,i]=e.map(Math.round);return`${Math.round(255*i).toString(16).padStart(2,"0")}${t.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}`}const qB={transparent:4294967040},XB={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ZB(e,t){return{name:GB(e.fontFamily)||"Arial",size:e.fontSize||10,bold:"bold"===e.fontWeight,italic:"italic"===e.fontStyle,color:ez("link"===t?e._linkColor:e.color),underline:e.underline}}function GB(e){return e.split(",").map((e=>e.trim()))[0]}function YB(e){return{type:"pattern",pattern:"solid",fgColor:ez(e.bgColor)}}function KB(e){const{borderColor:t,borderLineWidth:r,borderLineDash:n,_strokeArrayWidth:i,_strokeArrayColor:s}=e;if(s||i){const e={};return s&&!s[0]||i&&!i[0]||(e.top={style:QB(i?.[0]??r,n),color:ez(s?.[0]??t)}),s&&!s[1]||i&&!i[1]||(e.right={style:QB(i?.[1]??r,n),color:ez(s?.[1])}),s&&!s[2]||i&&!i[2]||(e.bottom={style:QB(i?.[2]??r,n),color:ez(s?.[2])}),s&&!s[3]||i&&!i[3]||(e.left={style:QB(i?.[3]??r,n),color:ez(s?.[3])}),e}if(0===r)return{};const o={style:QB(r,n),color:ez(t)};return{top:o,left:o,bottom:o,right:o}}function QB(e,t){return t&&t.length?e<=2?"dashed":"mediumDashed":e<=.5?"hair":e<=1?"thin":e<=2?"medium":"thick"}function JB(e){return{horizontal:e.textAlign||"left",vertical:e.textBaseline||"middle",wrapText:e.autoWrapText||!1}}function ez(e){return{argb:WB(VB(e))}}function tz(e,t){return"link"===t?{text:e,hyperlink:e,tooltip:e}:e}e.downloadCsv=function(e,t){const r=new Blob([`\ufeff${e}`],{type:"text/csv;charset=utf-8"});v.saveAs(r,`${t}.csv`)},e.downloadExcel=function(e,t){const r=new Blob([e],{type:"application/octet-stream"});v.saveAs(r,`${t}.xlsx`)},e.exportVTableToCsv=function(e){const t=e.rowCount-1,r=e.colCount-1;let n="";for(let i=0;i<=t;i++){for(let t=0;t<=r;t++){const r=d(t,i,e);if("undefined"!=typeof Promise&&r instanceof Promise);else{const e=`${r}`;/^\[object .*\]$/.exec(e)||(n+=e)}n+=","}n+="\r\n"}return n},e.exportVTableToExcel=async function(e){const t=new HB.Workbook,r=t.addWorksheet("sheet1");r.properties.defaultRowHeight=40;const n=[],i=e.rowCount-1,s=e.colCount-1,o=[],a=new Set;for(let t=0;t<=s;t++){const s=e.getColWidth(t);n[t]={width:s/6};for(let n=0;n<=i;n++){if(0===t){const t=e.getRowHeight(n);r.getRow(n+1).height=t}const i=e.getCellValue(t,n),s=e.getCellStyle(t,n),l=e.getCellType(t,n),h=r.getCell(UB(t,n));h.value=tz(i,l),h.font=ZB(s,l),h.fill=YB(s),h.border=KB(s),h.alignment=JB(s);const u=e.getCellRange(t,n);if(u.start.col!==u.end.col||u.start.row!==u.end.row){const e=`${u.start.col},${u.start.row}:${u.end.col},${u.end.row}}`;a.has(e)||(a.add(e),o.push(u))}}}r.columns=n,o.forEach((e=>{r.mergeCells(e.start.row+1,e.start.col+1,e.end.row+1,e.end.col+1)}));const l=[];return e.frozenRowCount>0&&l.push({state:"frozen",ySplit:e.frozenRowCount,topLeftCell:UB(0,e.frozenRowCount)}),e.frozenColCount>0&&l.push({state:"frozen",xSplit:e.frozenColCount,topLeftCell:UB(e.frozenColCount,0)}),r.views=l,await t.xlsx.writeBuffer()}}));
|
|
92
|
+
function(e){const n=r,i=f,s=l,o=t,a={fs:n.constants,os:i.constants},h=aB,u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",c=/XXXXXX/,d=3,p=(a.O_CREAT||a.fs.O_CREAT)|(a.O_EXCL||a.fs.O_EXCL)|(a.O_RDWR||a.fs.O_RDWR),m="win32"===i.platform(),g=a.EBADF||a.os.errno.EBADF,y=a.ENOENT||a.os.errno.ENOENT,v=[],_=n.rmdirSync.bind(n),b=h.sync;let w=!1;function x(e,t){const r=I(e,t),i=r[0],s=r[1];try{F(i)}catch(e){return s(e)}let o=i.tries;!function e(){try{const t=P(i);n.stat(t,(function(r){if(!r)return o-- >0?e():s(new Error("Could not get a unique tmp filename, max tries reached "+t));s(null,t)}))}catch(e){s(e)}}()}function k(e){const t=I(e)[0];F(t);let r=t.tries;do{const e=P(t);try{n.statSync(e)}catch(t){return e}}while(r-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function S(e,t){const r=function(e){if(e&&!L(e))return t(e);t()};0<=e[0]?n.close(e[0],(function(){n.unlink(e[1],r)})):n.unlink(e[1],r)}function E(e){let t=null;try{0<=e[0]&&n.closeSync(e[0])}catch(e){if(!function(e){return B(e,-g,"EBADF")}(e)&&!L(e))throw e}finally{try{n.unlinkSync(e[1])}catch(e){L(e)||(t=e)}}if(null!==t)throw t}function T(e,t,r,n){const i=O(E,[t,e],n),s=O(S,[t,e],n,i);return r.keep||v.unshift(i),n?i:s}function C(e,t,r){const i=t.unsafeCleanup?h:n.rmdir.bind(n),s=O(t.unsafeCleanup?b:_,e,r),o=O(i,e,r,s);return t.keep||v.unshift(s),r?s:o}function O(e,t,r,n){let i=!1;return function s(o){if(!i){const a=n||s,l=v.indexOf(a);return l>=0&&v.splice(l,1),i=!0,r||e===_||e===b?e(t):e(t,o||function(){})}}}function R(e){let t=[],r=null;try{r=o.randomBytes(e)}catch(t){r=o.pseudoRandomBytes(e)}for(var n=0;n<e;n++)t.push(u[r[n]%u.length]);return t.join("")}function A(e){return null===e||N(e)||!e.trim()}function N(e){return void 0===e}function I(e,t){if("function"==typeof e)return[{},e];if(N(e))return[{},t];const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=e[t];return[r,t]}function P(e){const t=e.tmpdir;if(!N(e.name))return s.join(t,e.dir,e.name);if(!N(e.template))return s.join(t,e.dir,e.template).replace(c,R(6));const r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",R(12),e.postfix?"-"+e.postfix:""].join("");return s.join(t,e.dir,r)}function F(e){e.tmpdir=z(e);const t=e.tmpdir;if(N(e.name)||M(e.name,"name",t),N(e.dir)||M(e.dir,"dir",t),!N(e.template)&&(M(e.template,"template",t),!e.template.match(c)))throw new Error(`Invalid template, found "${e.template}".`);if(!N(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=N(e.name)?e.tries||d:1,e.keep=!!e.keep,e.detachDescriptor=!!e.detachDescriptor,e.discardDescriptor=!!e.discardDescriptor,e.unsafeCleanup=!!e.unsafeCleanup,e.dir=N(e.dir)?"":s.relative(t,D(e.dir,t)),e.template=N(e.template)?void 0:s.relative(t,D(e.template,t)),e.template=A(e.template)?void 0:s.relative(e.dir,e.template),e.name=N(e.name)?void 0:j(e.name),e.prefix=N(e.prefix)?"":e.prefix,e.postfix=N(e.postfix)?"":e.postfix}function D(e,t){const r=j(e);return r.startsWith(t)?s.resolve(r):s.resolve(s.join(t,r))}function j(e){return A(e)?e:e.replace(/["']/g,"")}function M(e,t,r){if("name"===t){if(s.isAbsolute(e))throw new Error(`${t} option must not contain an absolute path, found "${e}".`);let r=s.basename(e);if(".."===r||"."===r||r!==e)throw new Error(`${t} option must not contain a path, found "${e}".`)}else{if(s.isAbsolute(e)&&!e.startsWith(r))throw new Error(`${t} option must be relative to "${r}", found "${e}".`);let n=D(e,r);if(!n.startsWith(r))throw new Error(`${t} option must be relative to "${r}", found "${n}".`)}}function L(e){return B(e,-y,"ENOENT")}function B(e,t,r){return m?e.code===r:e.code===r&&e.errno===t}function z(e){return s.resolve(j(e&&e.tmpdir||i.tmpdir()))}process.addListener("exit",(function(){if(w)for(;v.length;)try{v[0]()}catch(e){}})),Object.defineProperty(e.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return z()}}),e.exports.dir=function(e,t){const r=I(e,t),i=r[0],s=r[1];x(i,(function(e,t){if(e)return s(e);n.mkdir(t,i.mode||448,(function(e){if(e)return s(e);s(null,t,C(t,i,!1))}))}))},e.exports.dirSync=function(e){const t=I(e)[0],r=k(t);return n.mkdirSync(r,t.mode||448),{name:r,removeCallback:C(r,t,!0)}},e.exports.file=function(e,t){const r=I(e,t),i=r[0],s=r[1];x(i,(function(e,t){if(e)return s(e);n.open(t,p,i.mode||384,(function(e,r){if(e)return s(e);if(i.discardDescriptor)return n.close(r,(function(e){return s(e,t,void 0,T(t,-1,i,!1))}));{const e=i.discardDescriptor||i.detachDescriptor;s(null,t,r,T(t,e?-1:r,i,!1))}}))}))},e.exports.fileSync=function(e){const t=I(e)[0],r=t.discardDescriptor||t.detachDescriptor,i=k(t);var s=n.openSync(i,p,t.mode||384);return t.discardDescriptor&&(n.closeSync(s),s=void 0),{name:i,fd:s,removeCallback:T(i,r?-1:s,t,!0)}},e.exports.tmpName=x,e.exports.tmpNameSync=k,e.exports.setGracefulCleanup=function(){w=!0}}(UL);var lB=UL.exports;function hB(e,t){return new Promise((r=>{let n=!1;const i=()=>{n||(n=!0,e.removeListener(t,i),r())};e.addListener(t,i)}))}const{EventEmitter:uB}=i,cB=Uh,fB=k,dB=Cl,pB=T,mB=O,gB=Z,yB=Q;let vB=class extends uB{constructor(e){let{workbook:t,id:r,iterator:n,options:i}=e;super(),this.workbook=t,this.id=r,this.iterator=n,this.options=i||{},this.name=`Sheet${this.id}`,this._columns=null,this._keys={},this._dimensions=new mB}destroy(){throw new Error("Invalid Operation: destroy")}get dimensions(){return this._dimensions}get columns(){return this._columns}getColumn(e){if("string"==typeof e){const t=this._keys[e];if(t)return t;e=pB.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){let t=this._columns.length+1;for(;t<=e;)this._columns.push(new yB(this,t++))}return this._columns[e-1]}getColumnKey(e){return this._keys[e]}setColumnKey(e,t){this._keys[e]=t}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){fB.each(this._keys,e)}async read(){try{for await(const e of this.parse())for(const{eventType:t,value:r}of e)this.emit(t,r);this.emit("finished")}catch(e){this.emit("error",e)}}async*[Symbol.asyncIterator](){for await(const e of this.parse())for(const{eventType:t,value:r}of e)"row"===t&&(yield r)}async*parse(){const{iterator:e,options:t}=this;let r=!1,n=!1,i=null;if("emit"===t.worksheets)r=!0;switch(t.hyperlinks){case"emit":n=!0;break;case"cache":this.hyperlinks=i={}}if(!r&&!n&&!i)return;const{sharedStrings:s,styles:o,properties:a}=this.workbook;let l=!1,h=!1,u=!1,c=null,f=null,d=null,p=null;for await(const t of cB(e)){const e=[];for(const{eventType:m,value:g}of t)if("opentag"===m){const t=g;if(r)switch(t.name){case"cols":l=!0,c=[];break;case"sheetData":h=!0;break;case"col":l&&c.push({min:parseInt(t.attributes.min,10),max:parseInt(t.attributes.max,10),width:parseFloat(t.attributes.width),styleId:parseInt(t.attributes.style||"0",10)});break;case"row":if(h){const e=parseInt(t.attributes.r,10);if(f=new gB(this,e),t.attributes.ht&&(f.height=parseFloat(t.attributes.ht)),t.attributes.s){const e=parseInt(t.attributes.s,10),r=o.getStyleModel(e);r&&(f.style=r)}}break;case"c":f&&(d={ref:t.attributes.r,s:parseInt(t.attributes.s,10),t:t.attributes.t});break;case"f":d&&(p=d.f={text:""});break;case"v":case"is":case"t":d&&(p=d.v={text:""})}if(n||i)switch(t.name){case"hyperlinks":u=!0;break;case"hyperlink":if(u){const r={ref:t.attributes.ref,rId:t.attributes["r:id"]};n?e.push({eventType:"hyperlink",value:r}):i[r.ref]=r}}}else if("text"===m)r&&p&&(p.text+=g);else if("closetag"===m){const t=g;if(r)switch(t.name){case"cols":l=!1,this._columns=yB.fromModel(c);break;case"sheetData":h=!1;break;case"row":this._dimensions.expandRow(f),e.push({eventType:"row",value:f}),f=null;break;case"c":if(f&&d){const e=pB.decodeAddress(d.ref),t=f.getCell(e.col);if(d.s){const e=o.getStyleModel(d.s);e&&(t.style=e)}if(d.f){const e={formula:d.f.text};d.v&&("str"===d.t?e.result=dB.xmlDecode(d.v.text):e.result=parseFloat(d.v.text)),t.value=e}else if(d.v)switch(d.t){case"s":{const e=parseInt(d.v.text,10);t.value=s?s[e]:{sharedString:e};break}case"inlineStr":case"str":t.value=dB.xmlDecode(d.v.text);break;case"e":t.value={error:d.v.text};break;case"b":t.value=0!==parseInt(d.v.text,10);break;default:dB.isDateFmt(t.numFmt)?t.value=dB.excelToDate(parseFloat(d.v.text),a.model&&a.model.date1904):t.value=parseFloat(d.v.text)}if(i){const e=i[d.ref];e&&(t.text=t.value,t.value=void 0,t.hyperlink=e)}d=null}}if((n||i)&&"hyperlinks"===t.name)u=!1}e.length>0&&(yield e)}}};var _B=vB;const{EventEmitter:bB}=i,wB=Uh,xB=R,kB=$f;var SB=class extends bB{constructor(e){let{workbook:t,id:r,iterator:n,options:i}=e;super(),this.workbook=t,this.id=r,this.iterator=n,this.options=i}get count(){return this.hyperlinks&&this.hyperlinks.length||0}each(e){return this.hyperlinks.forEach(e)}async read(){const{iterator:e,options:t}=this;let r=!1,n=null;switch(t.hyperlinks){case"emit":r=!0;break;case"cache":this.hyperlinks=n={}}if(r||n)try{for await(const t of wB(e))for(const{eventType:e,value:i}of t)if("opentag"===e){const e=i;if("Relationship"===e.name){const t=e.attributes.Id;if(e.attributes.Type===kB.Hyperlink){const i={type:xB.RelationshipType.Styles,rId:t,target:e.attributes.Target,targetMode:e.attributes.TargetMode};r?this.emit("hyperlink",i):n[i.rId]=i}}}this.emit("finished")}catch(e){this.emit("error",e)}else this.emit("finished")}};const EB=r,{EventEmitter:TB}=i,{PassThrough:CB,Readable:OB}=kl,RB=n,AB=mF,NB=lB,IB=async function*(e){const t=[];let r;e.on("data",(e=>t.push(e)));const n=new Promise((e=>r=e));let i=!1;e.on("end",(()=>{i=!0,r()}));let s=!1;for(e.on("error",(e=>{s=e,r()}));!i||t.length>0;){if(0===t.length)e.resume(),await Promise.race([hB(e,"data"),n]);else{e.pause();const r=t.shift();yield r}if(s)throw s}r()},PB=Uh,FB=mc,DB=zf,jB=Kc,MB=_B,LB=SB;NB.setGracefulCleanup();class BB extends TB{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.input=e,this.options={worksheets:"emit",sharedStrings:"cache",hyperlinks:"ignore",styles:"ignore",entries:"ignore",...t},this.styles=new FB,this.styles.init()}_getStream(e){if(e instanceof RB.Readable||e instanceof OB)return e;if("string"==typeof e)return EB.createReadStream(e);throw new Error(`Could not recognise input: ${e}`)}async read(e,t){try{for await(const{eventType:r,value:n}of this.parse(e,t))switch(r){case"shared-strings":case"hyperlinks":this.emit(r,n);break;case"worksheet":this.emit(r,n),await n.read()}this.emit("end"),this.emit("finished")}catch(e){this.emit("error",e)}}async*[Symbol.asyncIterator](){for await(const{eventType:e,value:t}of this.parse())"worksheet"===e&&(yield t)}async*parse(e,t){t&&(this.options=t);const r=this.stream=this._getStream(e||this.input),n=AB.Parse({forceStream:!0});r.pipe(n);const i=[];for await(const e of IB(n)){let t,r;switch(e.path){case"_rels/.rels":break;case"xl/_rels/workbook.xml.rels":await this._parseRels(e);break;case"xl/workbook.xml":await this._parseWorkbook(e);break;case"xl/sharedStrings.xml":yield*this._parseSharedStrings(e);break;case"xl/styles.xml":await this._parseStyles(e);break;default:e.path.match(/xl\/worksheets\/sheet\d+[.]xml/)?(t=e.path.match(/xl\/worksheets\/sheet(\d+)[.]xml/),r=t[1],this.sharedStrings&&this.workbookRels?yield*this._parseWorksheet(IB(e),r):await new Promise(((t,n)=>{NB.file(((s,o,a,l)=>{if(s)return n(s);i.push({sheetNo:r,path:o,tempFileCleanupCallback:l});const h=EB.createWriteStream(o);return h.on("error",n),e.pipe(h),h.on("finish",(()=>t()))}))}))):e.path.match(/xl\/worksheets\/_rels\/sheet\d+[.]xml.rels/)&&(t=e.path.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),r=t[1],yield*this._parseHyperlinks(IB(e),r))}e.autodrain()}for(const{sheetNo:e,path:t,tempFileCleanupCallback:r}of i){let n=EB.createReadStream(t);n[Symbol.asyncIterator]||(n=n.pipe(new CB)),yield*this._parseWorksheet(n,e),r()}}_emitEntry(e){"emit"===this.options.entries&&this.emit("entry",e)}async _parseRels(e){const t=new jB;this.workbookRels=await t.parseStream(IB(e))}async _parseWorkbook(e){this._emitEntry({type:"workbook"});const t=new DB;await t.parseStream(IB(e)),this.properties=t.map.workbookPr,this.model=t.model}async*_parseSharedStrings(e){switch(this._emitEntry({type:"shared-strings"}),this.options.sharedStrings){case"cache":this.sharedStrings=[];break;case"emit":break;default:return}let t=null,r=[],n=0,i=null;for await(const s of PB(IB(e)))for(const{eventType:e,value:o}of s)if("opentag"===e){const e=o;switch(e.name){case"b":i=i||{},i.bold=!0;break;case"charset":i=i||{},i.charset=parseInt(e.attributes.charset,10);break;case"color":i=i||{},i.color={},e.attributes.rgb&&(i.color.argb=e.attributes.argb),e.attributes.val&&(i.color.argb=e.attributes.val),e.attributes.theme&&(i.color.theme=e.attributes.theme);break;case"family":i=i||{},i.family=parseInt(e.attributes.val,10);break;case"i":i=i||{},i.italic=!0;break;case"outline":i=i||{},i.outline=!0;break;case"rFont":i=i||{},i.name=e.value;break;case"si":i=null,r=[],t=null;break;case"sz":i=i||{},i.size=parseInt(e.attributes.val,10);break;case"strike":break;case"t":t=null;break;case"u":i=i||{},i.underline=!0;break;case"vertAlign":i=i||{},i.vertAlign=e.attributes.val}}else if("text"===e)t=t?t+o:o;else if("closetag"===e){switch(o.name){case"r":r.push({font:i,text:t}),i=null,t=null;break;case"si":"cache"===this.options.sharedStrings?this.sharedStrings.push(r.length?{richText:r}:t):"emit"===this.options.sharedStrings&&(yield{index:n++,text:r.length?{richText:r}:t}),r=[],i=null,t=null}}}async _parseStyles(e){this._emitEntry({type:"styles"}),"cache"===this.options.styles&&(this.styles=new FB,await this.styles.parseStream(IB(e)))}*_parseWorksheet(e,t){this._emitEntry({type:"worksheet",id:t});const r=new MB({workbook:this,id:t,iterator:e,options:this.options}),n=(this.workbookRels||[]).find((e=>e.Target===`worksheets/sheet${t}.xml`)),i=n&&(this.model.sheets||[]).find((e=>e.rId===n.Id));i&&(r.id=i.id,r.name=i.name,r.state=i.state),"emit"===this.options.worksheets&&(yield{eventType:"worksheet",value:r})}*_parseHyperlinks(e,t){this._emitEntry({type:"hyperlinks",id:t});const r=new LB({workbook:this,id:t,iterator:e,options:this.options});"emit"===this.options.hyperlinks&&(yield{eventType:"hyperlinks",value:r})}}BB.Options={worksheets:["emit","ignore"],sharedStrings:["cache","emit","ignore"],hyperlinks:["cache","emit","ignore"],styles:["cache","ignore"],entries:["emit","ignore"]};const zB={Workbook:bx,ModelContainer:xx,stream:{xlsx:{WorkbookWriter:pF,WorkbookReader:BB}}};Object.assign(zB,R);var $B=zB;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");var HB=m($B);function UB(e,t){let r="";for(let t=e+1;t>0;t=Math.floor((t-1)/26))r=String.fromCharCode((t-1)%26+65)+r;return r+(t+1)}var VB=(e,t)=>Object.prototype.toString.call(e)===`[object ${t}]`;var WB=function(e){const t=typeof e;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"number"===t:"number"===t||VB(e,"Number")};function qB(e){if(e.startsWith("#")){let t=e.substring(1);3===t.length&&(t=t.replace(/(.)/g,"$1$1"));return[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}if(e.startsWith("rgb(")){return e.substring(4,e.length-1).split(",").map(Number)}if(e.startsWith("rgba(")){return e.substring(5,e.length-1).split(",").map(Number)}if(WB(GB[e]))return[(t=GB[e])>>16,t>>8&255,255&t,1];if(WB(ZB[e]))return function(e){return[e>>>24,e>>>16&255,e>>>8&255,255&e]}(ZB[e]);var t;throw new Error("Unsupported color format")}function XB(e){if(3===e.length&&e.push(1),4!==e.length)throw new Error("Invalid RGBA array");const[t,r,n,i]=e.map(Math.round);return`${Math.round(255*i).toString(16).padStart(2,"0")}${t.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}`}const ZB={transparent:4294967040},GB={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function YB(e,t){return{name:KB(e.fontFamily)||"Arial",size:e.fontSize||10,bold:"bold"===e.fontWeight,italic:"italic"===e.fontStyle,color:rz("link"===t?e._linkColor:e.color),underline:e.underline}}function KB(e){return e.split(",").map((e=>e.trim()))[0]}function QB(e){return{type:"pattern",pattern:"solid",fgColor:rz(e.bgColor)}}function JB(e){const{borderColor:t,borderLineWidth:r,borderLineDash:n,_strokeArrayWidth:i,_strokeArrayColor:s}=e;if(s||i){const e={};return s&&!s[0]||i&&!i[0]||(e.top={style:ez(i?.[0]??r,n),color:rz(s?.[0]??t)}),s&&!s[1]||i&&!i[1]||(e.right={style:ez(i?.[1]??r,n),color:rz(s?.[1])}),s&&!s[2]||i&&!i[2]||(e.bottom={style:ez(i?.[2]??r,n),color:rz(s?.[2])}),s&&!s[3]||i&&!i[3]||(e.left={style:ez(i?.[3]??r,n),color:rz(s?.[3])}),e}if(0===r)return{};const o={style:ez(r,n),color:rz(t)};return{top:o,left:o,bottom:o,right:o}}function ez(e,t){return t&&t.length?e<=2?"dashed":"mediumDashed":e<=.5?"hair":e<=1?"thin":e<=2?"medium":"thick"}function tz(e){return{horizontal:e.textAlign||"left",vertical:e.textBaseline||"middle",wrapText:e.autoWrapText||!1}}function rz(e){return{argb:XB(qB(e))}}function nz(e,t){return"link"===t?{text:e,hyperlink:e,tooltip:e}:e}e.downloadCsv=function(e,t){const r=new Blob([`\ufeff${e}`],{type:"text/csv;charset=utf-8"});v.saveAs(r,`${t}.csv`)},e.downloadExcel=function(e,t){const r=new Blob([e],{type:"application/octet-stream"});v.saveAs(r,`${t}.xlsx`)},e.exportVTableToCsv=function(e){const t=e.rowCount-1,r=e.colCount-1;let n="";for(let i=0;i<=t;i++){for(let t=0;t<=r;t++){const r=d(t,i,e);if("undefined"!=typeof Promise&&r instanceof Promise);else{const e=`${r}`;/^\[object .*\]$/.exec(e)||(n+=e)}n+=","}n+="\r\n"}return n},e.exportVTableToExcel=async function(e){const t=new HB.Workbook,r=t.addWorksheet("sheet1");r.properties.defaultRowHeight=40;const n=[],i=e.rowCount-1,s=e.colCount-1,o=[],a=new Set;for(let t=0;t<=s;t++){const s=e.getColWidth(t);n[t]={width:s/6};for(let n=0;n<=i;n++){if(0===t){const t=e.getRowHeight(n);r.getRow(n+1).height=t}const i=e.getCellValue(t,n),s=e.getCellStyle(t,n),l=e.getCellType(t,n),h=r.getCell(UB(t,n));h.value=nz(i,l),h.font=YB(s,l),h.fill=QB(s),h.border=JB(s),h.alignment=tz(s);const u=e.getCellRange(t,n);if(u.start.col!==u.end.col||u.start.row!==u.end.row){const e=`${u.start.col},${u.start.row}:${u.end.col},${u.end.row}}`;a.has(e)||(a.add(e),o.push(u))}}}r.columns=n,o.forEach((e=>{r.mergeCells(e.start.row+1,e.start.col+1,e.end.row+1,e.end.col+1)}));const l=[];return e.frozenRowCount>0&&l.push({state:"frozen",ySplit:e.frozenRowCount,topLeftCell:UB(0,e.frozenRowCount)}),e.frozenColCount>0&&l.push({state:"frozen",xSplit:e.frozenColCount,topLeftCell:UB(e.frozenColCount,0)}),r.views=l,await t.xlsx.writeBuffer()}}));
|