@psdk/esc 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ require('./sourcemap-register.js');(()=>{"use strict";var e={4245:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.FakeConnectedDevice=void 0;const n=r(7569);const s=r(932);class FakeConnectedDevice{origin(){return"FAKE-DEVICE"}connectionState(){return n.ConnectionState.CONNECTED}deviceName(){return"FAKE-DEVICE"}async disconnect(){}canRead(){return true}async read(e){return s.PsdkConst.EMPTY_BYTES}async write(e){console.log("WRITE: ",e)}flush(){}}t.FakeConnectedDevice=FakeConnectedDevice},5324:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(4245),t);s(r(7569),t)},7569:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReadOptions=t.WroteReporter=t.ConnectionState=void 0;var r;(function(e){e["CONNECTED"]="CONNECTED";e["DISCONNECTED"]="DISCONNECTED"})(r||(t.ConnectionState=r={}));class WroteReporter{ok;binary;controlExit;exception;constructor(e,t,r,n){this.ok=e;this.binary=t;this.controlExit=r;this.exception=n}}t.WroteReporter=WroteReporter;class ReadOptions{timeout;constructor(e){this.timeout=e?.timeout}}t.ReadOptions=ReadOptions},7555:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PSDK=void 0;const n=r(1482);const s=r(3783);class PSDK{sversion(){return"0.2.67"}authors(){return n.PsdkConst.DEF_AUTHORS}raw(e){this.commander().pushArg(e);return this}variable(e,t){this.commander().variable(e,t);return this}command(){return this.commander().command()}clear(){this.commander().clear();return this}async write(e){const t=this.connectedDevice();if(!t)throw Error("It's seems you missing to set connectedDevice");e=e??n.WriteOptions.def();const r=this.command();const i=r.binary();const a=new s.DataWriteOperation(e,i,t);const o=await a.write();this.clear();return o}newline(){this.commander().newline();return this}push(e){this.commander().pushArg(e);return this}}t.PSDK=PSDK},3101:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.BasicArg=void 0;const n=r(1482);class BasicArg{newline(){return n.PsdkConst.DEF_ENABLED_NEWLINE}}t.BasicArg=BasicArg},6012:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.OnlyTextHeaderArg=t.OnlyBinaryHeaderArg=t.EasyArg=void 0;const n=r(3101);const s=r(3623);class EasyArg extends n.BasicArg{prependClauses;appendClauses;constructor(){super();this.prependClauses=[];this.appendClauses=[]}append(e){this.appendClauses.push(...e.clauses());return this}prepend(e){this.prependClauses.push(...e.clauses());return this}clauses(){const e=this.clause();const t=[];if(e.type!==s.ClauseType.NONE){t.push(e);if(this.newline()){t.push(s.CommandClause.newline())}}return[...this.prependClauses,...t,...this.appendClauses]}clear(){this.prependClauses.splice(0,this.prependClauses.length);this.appendClauses.splice(0,this.appendClauses.length)}}t.EasyArg=EasyArg;class OnlyBinaryHeaderArg extends EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){return s.CommandClause.binary(this.header())}newline(){return false}}t.OnlyBinaryHeaderArg=OnlyBinaryHeaderArg;class OnlyTextHeaderArg extends EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){return s.CommandClause.text(this.header())}}t.OnlyTextHeaderArg=OnlyTextHeaderArg},1666:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.RawMode=t.Raw=void 0;const n=r(6012);const s=r(3623);const i=r(1482);class Raw extends n.EasyArg{_mode;_text;_charset;_binary;_newline=i.PsdkConst.DEF_ENABLED_NEWLINE;constructor(){super()}static text(e,t){const r=new Raw;r._mode=a.TEXT;r._text=e;r._charset=t?.charset??i.PsdkConst.DEF_CHARSET;r._newline=t?.newline??i.PsdkConst.DEF_ENABLED_NEWLINE;return r}static binary(e,t){const r=new Raw;r._mode=a.BINARY;r._binary=e;r._charset=t?.charset??i.PsdkConst.DEF_CHARSET;r._newline=t?.newline??i.PsdkConst.DEF_ENABLED_NEWLINE;return r}append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){let e;switch(this._mode){case a.TEXT:e=s.CommandClause.text(this._text,this._charset);break;case a.BINARY:e=s.CommandClause.binary(this._binary);break;default:e=s.CommandClause.none();break}return e}header(){return i.PsdkConst.EMPTY_BYTES}newline(){return this._newline}}t.Raw=Raw;var a;(function(e){e["BINARY"]="BINARY";e["TEXT"]="TEXT"})(a||(t.RawMode=a={}))},5146:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(3101),t);s(r(6012),t);s(r(1666),t)},3623:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(8247),t);s(r(1392),t);s(r(2211),t);s(r(8718),t);s(r(3839),t);s(r(1410),t)},8247:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DefaultCommand=t.BasicCommand=void 0;const n=r(1482);const s=r(1614);const i=r(2211);const a=r(4006);class BasicCommand{base64(){return s.Base64.fromUint8Array(this.binary())}}t.BasicCommand=BasicCommand;class DefaultCommand extends BasicCommand{bytes;constructor(e,t){super();let r=[];for(const s of e){switch(s.type){case i.ClauseType.TEXT:const e=a.PVariableKit.replace(s.text,t);const o=a.FastGBK.encode(e);const l=Array.prototype.slice.call(o,0);r=r.concat(l);break;case i.ClauseType.NEWLINE:case i.ClauseType.BINARY:const c=Array.from(s.binary??n.PsdkConst.EMPTY_BYTES);r=r.concat(c);break}}this.bytes=new Uint8Array(r)}binary(){return this.bytes}hex(e){return(e??n.HexOutput.def()).format(this.binary())}string(e){return a.FastGBK.decode(this.binary())}}t.DefaultCommand=DefaultCommand},2211:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.CommandClause=t.ClauseType=void 0;const n=r(1482);var s;(function(e){e["TEXT"]="TEXT";e["BINARY"]="BINARY";e["NEWLINE"]="NEWLINE";e["NONE"]="NONE"})(s||(t.ClauseType=s={}));class CommandClause{_type;_text;_charset;_binary;constructor(e,t,r,n){this._type=e;this._text=t;this._charset=r;this._binary=n}static text(e,t=n.PsdkConst.DEF_CHARSET){return new CommandClause(s.TEXT,e,t,undefined)}static binary(e){return new CommandClause(s.BINARY,undefined,undefined,e)}static newline(){return new CommandClause(s.NEWLINE,undefined,undefined,n.PsdkConst.DEF_NEWLINE_BINARY)}static none(){return new CommandClause(s.NONE,undefined,undefined,undefined)}get type(){return this._type}get text(){return this._text}get charset(){return this._charset}get binary(){return this._binary}}t.CommandClause=CommandClause},1392:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.Commander=void 0;const n=r(2211);const s=r(1482);const i=r(8247);class Commander{clauses;_variable;constructor(){this.clauses=[];this._variable=new Map}static make(){return new Commander}pushText(e,t){if(e.startsWith(s.PsdkConst.CRLF)){e=e.substring(2)}const r=n.CommandClause.text(e,t?.charset??s.PsdkConst.DEF_CHARSET);return this.pushClause(r,t?.newline??s.PsdkConst.DEF_ENABLED_NEWLINE)}pushBinary(e,t){const r=n.CommandClause.binary(e);return this.pushClause(r,t??s.PsdkConst.DEF_ENABLED_NEWLINE)}pushClause(e,t){this.clauses.push(e);if(t??s.PsdkConst.DEF_ENABLED_NEWLINE){this.clauses.push(n.CommandClause.newline())}return this}pushClauses(e){e.forEach((e=>this.pushClause(e,false)));return this}pushArg(e){this.pushClauses(e.clauses());return this}newline(){const e=n.CommandClause.newline();return this.pushClause(e,false)}variable(e,t){this._variable.set(e,t);return this}clear(){this.clauses.splice(0,this.clauses.length);this._variable.clear();return this}command(){return new i.DefaultCommand(this.clauses,this._variable)}}t.Commander=Commander},8718:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TextAppendat=t.Appendat=void 0;const n=r(4006);class Appendat{_argument;_condition;_callback;constructor(e,t,r){this._argument=e;this._condition=t;this._callback=r}get condition(){return this._condition}callback(e){this._callback=e;return this}quote(){return this}argument(){if(!n.Checker.truthy(this._callback))return this._argument;if(!n.Checker.truthy(this._argument))return undefined;return this._callback.callback(this._argument)}}t.Appendat=Appendat;class TextAppendat extends Appendat{_quote;constructor(e,t,r){super(e,t??true,r);this._quote=false}static create(e,t){return new TextAppendat(e,t?.condition??true,new class{callback(e){const r=t?.callback;if(r){return r(e)}return e}})}callback(e){super.callback(e);return this}quote(){this._quote=true;return this}argument(){const e=super.argument();if(!n.Checker.truthy(e))return this._quote?'""':"";if(this._quote){return`"${e}"`}return e}}t.TextAppendat=TextAppendat},3839:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.BinaryCommand=void 0;const n=r(2211);const s=r(4006);class BinaryCommand{binary;constructor(e){this.binary=e??[]}static make(){return new BinaryCommand}static with(e){const t=Array.from(e);return new BinaryCommand(t)}appendNumber(e){this.binary.push(e);return this}appendText(e,t){const r=s.FastGBK.encode(e);this.binary.push(...r);return this}appendU8A(e){const t=Array.from(e);this.binary=this.binary.concat(t);return this}output(){return new Uint8Array(this.binary)}clause(){const e=this.output();return n.CommandClause.binary(e)}}t.BinaryCommand=BinaryCommand},1410:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TSPLCommand=t.CPCLCommand=t.SingleCommand=void 0;const n=r(8718);const s=r(2211);const i=r(4006);class SingleCommand{_arguments;_symbolAfterHeader;_symbolBetweenArguments;_header;_charset;constructor(e,t,r){this._arguments=[];this._symbolAfterHeader=e;this._symbolBetweenArguments=t;this._charset=r}get getHeader(){return this._header}get symbolAfterHeader(){return this._symbolAfterHeader}get symbolBetweenArguments(){return this._symbolBetweenArguments}header(e){this._header=e;return this}get charset(){return this._charset}append(e){if(!e.condition)return this;const t=e.argument();if(!i.Checker.truthy(t))return this;this._arguments.push(t);return this}arguments(){return this._arguments}}t.SingleCommand=SingleCommand;class BasicStringSingleCommand extends SingleCommand{constructor(e,t,r){super(e,t,r)}append(e){const t=e.argument();if(!i.Checker.truthy(t))return this;super.append(e);return this}appendText(e){return this.append(n.TextAppendat.create(e??"",{}))}appendNumber(e){if(isNaN(e))return this;return this.append(n.TextAppendat.create((e??"").toString(),{}))}output(){let e="";if(i.Checker.truthy(super.getHeader)){e+=super.getHeader;e+=super.symbolAfterHeader}const t=super.arguments();const r=t.length;let n=0;for(const s of t){n+=1;if(!i.Checker.truthy(s))continue;e+=s;if(n<r){e+=super.symbolBetweenArguments}}return e}clause(){const e=this.output();if(!i.Checker.truthy(e)){return s.CommandClause.none()}return s.CommandClause.text(e,super.charset)}}class CPCLCommand extends BasicStringSingleCommand{constructor(e,t){super(" "," ",t);super.header(e)}static with(e,t){return new CPCLCommand(e,t)}append(e){super.append(e);return this}appendText(e){super.appendText(e);return this}appendNumber(e){super.appendNumber(e);return this}}t.CPCLCommand=CPCLCommand;class TSPLCommand extends BasicStringSingleCommand{constructor(e,t){super(" ",",",t);super.header(e)}static with(e,t){return new TSPLCommand(e,t)}append(e){super.append(e);return this}appendText(e){super.appendText(e);return this}appendNumber(e){super.appendNumber(e);return this}}t.TSPLCommand=TSPLCommand},3783:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DataWriteOperation=void 0;const n=r(1482);const s=r(5324);const i=r(4006);class DataWriteOperation{options;binary;connectedDevice;constructor(e,t,r){this.options=e;this.binary=t;this.connectedDevice=r}async write(){if(!this.options.enableChunkWrite){const e=await this.writData(this.binary);this.doCallback(e,this.binary,1,1);return e}const e=Array.from(this.binary);const t=i.CollectionKit.split(e,this.options.chunkSize);const r=t.length;let a=0;for(const e of t){a+=1;const t=new Uint8Array(e);const s=await this.writData(t);const i=this.doCallback(s,t,a,r);if(i==n.WriteControl.STOP){s.controlExit=true;return s}if(!s.ok){return s}}return new s.WroteReporter(true,this.binary,false)}doCallback(e,t,r,s){const i=this.options.callback;if(!i)return n.WriteControl.CONTINUE;const a=new n.DataWrote(t,r,s);if(e.ok){return i.success(a)}if(i.failed){i.failed(a,e.exception)}else{console.log("no custom failed callback, full exception: ",e.exception)}return n.WriteControl.STOP}async writData(e){try{await this.connectedDevice.write(e);return new s.WroteReporter(true,e,false)}catch(t){return new s.WroteReporter(false,e,false,t)}}}t.DataWriteOperation=DataWriteOperation},932:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(5146),t);s(r(1482),t);s(r(3623),t);s(r(7555),t)},8831:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.HexOutput=void 0;const r=32;class HexOutput{enableFormat;spacing;maxLengthOfLine;constructor(e,t,n=r){this.enableFormat=e;this.spacing=t;this.maxLengthOfLine=n}static def(){return new HexOutput(false,false,r)}static simple(e=true){return new HexOutput(e,true,r)}static formatWithMaxLength(e){return new HexOutput(true,true,e)}format(e){const t=Array.from(e,(function(e){return("0"+(e&255).toString(16)).slice(-2)})).join("");if(!this.enableFormat){return t}let r="";const n=t.length;let s=0;for(let e=0;e<n;e++){const i=e+1;const a=t[e];r+=a;if(i%2==0&&this.spacing){if(i<n){if(s+1<this.maxLengthOfLine){r+=" "}s+=1}}if(s>=this.maxLengthOfLine){r+="\n";s=0}}return r}}t.HexOutput=HexOutput},1482:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(4164),t);s(r(8831),t);s(r(7331),t);s(r(9614),t)},9614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.Lifecycle=void 0;class Lifecycle{connectedDevice;constructor(e){this.connectedDevice=e}}t.Lifecycle=Lifecycle},4164:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PsdkConst=void 0;const n=r(4006);const s="\r";const i="\n";const a=`${s}${i}`;t.PsdkConst={DEF_CHARSET:"gbk",CR:s,LF:i,CRLF:a,QUOTE:'"',DEF_NEWLINE_BINARY:n.ByteKit.textToU8A(a),DEF_AUTHORS:["fewensa <osuni@protonmail.com>"],DEF_ENABLED_NEWLINE:true,DEF_WRITE_CHUNK_SIZE:512,EMPTY_BYTES:new Uint8Array([])}},7331:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.WriteControl=t.DataWrote=t.DataWrite=t.IDataWriteCallback=t.WriteOptions=void 0;const n=r(4164);class WriteOptions{enableChunkWrite;chunkSize;callback;constructor(e=true,t=n.PsdkConst.DEF_WRITE_CHUNK_SIZE,r){this.enableChunkWrite=e;this.chunkSize=t;this.callback=r}static def(){return new WriteOptions(true,n.PsdkConst.DEF_WRITE_CHUNK_SIZE,undefined)}}t.WriteOptions=WriteOptions;class IDataWriteCallback{failed(e,t){console.error(`Write data failed: ${t.message}`)}}t.IDataWriteCallback=IDataWriteCallback;class DataWrite{binary;currentTimes;totalTimes;constructor(e,t,r){this.binary=e;this.currentTimes=t;this.totalTimes=r}}t.DataWrite=DataWrite;class DataWrote extends DataWrite{}t.DataWrote=DataWrote;var s;(function(e){e["CONTINUE"]="CONTINUE";e["STOP"]="STOP"})(s||(t.WriteControl=s={}))},6833:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(5324),t);s(r(932),t);s(r(4006),t)},1614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.Base64=t.extendBuiltins=t.extendUint8Array=t.extendString=t.toUint8Array=t.fromUint8Array=t.isValid=t.decode=t.btou=t.encodeURL=t.encodeURI=t.encode=t.utob=t.toBase64=t.fromBase64=t.btoaPolyfill=t.btoa=t.atobPolyfill=t.atob=t.VERSION=t.version=void 0;const r="3.7.7";t.version=r;const n=r;t.VERSION=n;const s=typeof Buffer==="function";const i=typeof TextDecoder==="function"?new TextDecoder:undefined;const a=typeof TextEncoder==="function"?new TextEncoder:undefined;const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";const l=Array.prototype.slice.call(o);const c=(e=>{let t={};e.forEach(((e,r)=>t[e]=r));return t})(l);const u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;const d=String.fromCharCode.bind(String);const h=typeof Uint8Array.from==="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0));const _mkUriSafe=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>e=="+"?"-":"_"));const _tidyB64=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");const btoaPolyfill=e=>{let t,r,n,s,i="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(s=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|s;i+=l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[t&63]}return a?i.slice(0,a-3)+"===".substring(a):i};t.btoaPolyfill=btoaPolyfill;const f=typeof btoa==="function"?e=>btoa(e):s?e=>Buffer.from(e,"binary").toString("base64"):btoaPolyfill;t.btoa=f;const _=s?e=>Buffer.from(e).toString("base64"):e=>{const t=4096;let r=[];for(let n=0,s=e.length;n<s;n+=t){r.push(d.apply(null,e.subarray(n,n+t)))}return f(r.join(""))};const fromUint8Array=(e,t=false)=>t?_mkUriSafe(_(e)):_(e);t.fromUint8Array=fromUint8Array;const cb_utob=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?d(192|t>>>6)+d(128|t&63):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|t&63)}};const p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;const utob=e=>e.replace(p,cb_utob);t.utob=utob;const m=s?e=>Buffer.from(e,"utf8").toString("base64"):a?e=>_(a.encode(e)):e=>f(utob(e));const encode=(e,t=false)=>t?_mkUriSafe(m(e)):m(e);t.toBase64=encode;t.encode=encode;const encodeURI=e=>encode(e,true);t.encodeURI=encodeURI;t.encodeURL=encodeURI;const b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;const cb_btou=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return d((r>>>10)+55296)+d((r&1023)+56320);case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}};const btou=e=>e.replace(b,cb_btou);t.btou=btou;const atobPolyfill=e=>{e=e.replace(/\s+/g,"");if(!u.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r="",n,s;for(let i=0;i<e.length;){t=c[e.charAt(i++)]<<18|c[e.charAt(i++)]<<12|(n=c[e.charAt(i++)])<<6|(s=c[e.charAt(i++)]);r+=n===64?d(t>>16&255):s===64?d(t>>16&255,t>>8&255):d(t>>16&255,t>>8&255,t&255)}return r};t.atobPolyfill=atobPolyfill;const g=typeof atob==="function"?e=>atob(_tidyB64(e)):s?e=>Buffer.from(e,"base64").toString("binary"):atobPolyfill;t.atob=g;const w=s?e=>h(Buffer.from(e,"base64")):e=>h(g(e).split("").map((e=>e.charCodeAt(0))));const toUint8Array=e=>w(_unURI(e));t.toUint8Array=toUint8Array;const y=s?e=>Buffer.from(e,"base64").toString("utf8"):i?e=>i.decode(w(e)):e=>btou(g(e));const _unURI=e=>_tidyB64(e.replace(/[-_]/g,(e=>e=="-"?"+":"/")));const decode=e=>y(_unURI(e));t.fromBase64=decode;t.decode=decode;const isValid=e=>{if(typeof e!=="string")return false;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)};t.isValid=isValid;const _noEnum=e=>({value:e,enumerable:false,writable:true,configurable:true});const extendString=function(){const _add=(e,t)=>Object.defineProperty(String.prototype,e,_noEnum(t));_add("fromBase64",(function(){return decode(this)}));_add("toBase64",(function(e){return encode(this,e)}));_add("toBase64URI",(function(){return encode(this,true)}));_add("toBase64URL",(function(){return encode(this,true)}));_add("toUint8Array",(function(){return toUint8Array(this)}))};t.extendString=extendString;const extendUint8Array=function(){const _add=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,_noEnum(t));_add("toBase64",(function(e){return fromUint8Array(this,e)}));_add("toBase64URI",(function(){return fromUint8Array(this,true)}));_add("toBase64URL",(function(){return fromUint8Array(this,true)}))};t.extendUint8Array=extendUint8Array;const extendBuiltins=()=>{extendString();extendUint8Array()};t.extendBuiltins=extendBuiltins;const v={version:r,VERSION:n,atob:g,atobPolyfill:atobPolyfill,btoa:f,btoaPolyfill:btoaPolyfill,fromBase64:decode,toBase64:encode,encode:encode,encodeURI:encodeURI,encodeURL:encodeURI,utob:utob,btou:btou,decode:decode,isValid:isValid,fromUint8Array:fromUint8Array,toUint8Array:toUint8Array,extendString:extendString,extendUint8Array:extendUint8Array,extendBuiltins:extendBuiltins};t.Base64=v},5659:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ByteKit=void 0;const n=r(3192);class ByteKit{static textToU8A(e){if(!n.Checker.truthy(e))return new Uint8Array([]);let t=[];let r,s;r=e.length;for(let n=0;n<r;n++){s=e.charCodeAt(n);if(s>=65536&&s<=1114111){t.push(s>>18&7|240);t.push(s>>12&63|128);t.push(s>>6&63|128);t.push(s&63|128)}else if(s>=2048&&s<=65535){t.push(s>>12&15|224);t.push(s>>6&63|128);t.push(s&63|128)}else if(s>=128&&s<=2047){t.push(s>>6&31|192);t.push(s&63|128)}else{t.push(s&255)}}return new Uint8Array(t)}}t.ByteKit=ByteKit},3192:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.Checker=void 0;class Checker{static truthy(e){if(e===undefined)return false;if(e===null)return false;if(e==="")return false;const t=typeof e;switch(t){case"number":if(isNaN(e))return false;break;case"bigint":default:return true}}static empty(e){if(!Checker.truthy(e))return true;return e.length===0}}t.Checker=Checker},8961:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.FastGBK=void 0;let r;function initGbkTable(){const e=[[161,169,161,254],[176,247,161,254],[129,160,64,254],[170,254,64,160],[168,169,64,160],[170,175,161,254],[248,254,161,254],[161,167,64,160]];const t=new Uint16Array(23940);let n=0;for(const[r,s,i,a]of e){for(let e=i;e<=a;e++){if(e!==127){for(let i=r;i<=s;i++){t[n++]=e<<8|i}}}}r=new Uint16Array(65536);r.fill(65535);const s=new TextDecoder("gbk").decode(t);for(let e=0;e<s.length;e++){r[s.charCodeAt(e)]=t[e]}}const defaultOnAlloc=e=>new Uint8Array(e);const defaultOnError=()=>63;const n=new TextDecoder("gbk");class FastGBK{static decode(e){return n.decode(e)}static encode(e,t){if(!r){initGbkTable()}const n=t?.onAlloc??defaultOnAlloc;const s=t?.onError??defaultOnError;const i=n(e.length*2);let a=0;for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128){i[a++]=n;continue}const o=r[n];if(o!==65535){i[a++]=o;i[a++]=o>>8}else if(n===8364){i[a++]=128}else{const r=s(t,e);if(r===-1){break}if(r>255){i[a++]=r;i[a++]=r>>8}else{i[a++]=r}}}return i.subarray(0,a)}}t.FastGBK=FastGBK},4006:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(5659),t);s(r(5925),t);s(r(2329),t);s(r(2973),t);s(r(3192),t);s(r(8961),t)},2329:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.CollectionKit=void 0;const n=r(3192);class CollectionKit{static split(e,t){if(n.Checker.empty(e))return[];if(t<=0)throw new Error("The size must > 0");const r=[];let s=[];for(const n of e){s.push(n);if(t==s.length){r.push(s);s=[]}}if(0!=s.length)r.push(s);return r}static parts(e,t){if(n.Checker.empty(e)){return[]}if(t<=0)throw new Error("The parts length must > 0");if(e.length<=t){return[e]}const r=[];let s=[];const i=Math.floor(e.length/t);for(const n of e){s.push(n);if(s.length==i){r.push(s);if(r.length<t)s=[]}}return r}}t.CollectionKit=CollectionKit},2973:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ImageKit=void 0;class ImageKit{static processImage(e,t,r){const n=e.getContext("2d");let s=Math.floor(t%8===0?t/8:t/8+1);let i=0;let a=0;const o=r*s;const l=[];for(let e=0;e<o;e++){l[e]=0}const c=n.getImageData(0,0,e.width,e.height);while(i<r){let e=0;for(let r=0;r<t;r++){e++;if(e>8){e=1;a++}const t=1<<8-e;const n=ImageKit.fastExtractPixel(c,r,i,1,1);const s=n[0];const o=s[0];const u=s[1];const d=s[2];if((o+u+d)/3<128){l[a]=l[a]|t}}a=s*(i+1);i+=1}return new Uint8Array(l)}static fastExtractPixel(e,t,r,n,s){let i,a;let o=[];let l,c,u,d;const h=e.data;for(a=0;a<s;a++){let s=(t+(r+a)*e.width)*4;for(i=0;i<n;i++){l=h[s++];c=h[s++];u=h[s++];d=h[s++];o.push([l,c,u,d])}}return o}}t.ImageKit=ImageKit},5925:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PVariableKit=void 0;const n=r(3192);class PVariableKit{static replace(e,t){if(!n.Checker.truthy(e))return e;if(!n.Checker.truthy(t))return e;if(e.indexOf("{{")<0&&e.indexOf("}}")<0)return e;const r=/[\\]?\{\{(?<varx>.*?)}}/gm;const s="__THIS_IS_MAGIC_MARK_FOR_HACK_REGEX_MATCH__";while(true){const n=r.exec(e);if(n==null)break;const i=n[0];const a=i.replace("{{","").replace("}}","");const o=a.trim();const l=t.get(o)??"";if(i.startsWith("\\")){const t=i.replace("\\{{",s);e=e.replace(i,t);continue}e=e.replace(i,l)}e=e.replace(new RegExp(s,"g"),"{{");return e}}t.PVariableKit=PVariableKit},2468:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(118),t)},1566:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PinedThresholdValue=t.ThresholdValue=t.AbstractThreshold=void 0;const n=r(1361);const s=r(801);const i=r(6736);class AbstractThreshold extends n.ImagebProcesser{threshold;mode;constructor(e){super();this.mode=s.ThresholdValueMode.avg;this.threshold=e??new PinedThresholdValue}process(e){let t=i.ImagebTool.zeroAndOne(e);return new s.ProcessedResult({origin:e,result:new s.ProcessedImage({data:t,width:t.width,height:t.height})})}}t.AbstractThreshold=AbstractThreshold;class ThresholdValue{}t.ThresholdValue=ThresholdValue;class PinedThresholdValue extends ThresholdValue{_value;constructor(e){super();this._value=e??190}threshold(){return this._value}}t.PinedThresholdValue=PinedThresholdValue},2749:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.GrayscaleImage=void 0;const n=r(1361);const s=r(801);const i=r(6736);class GrayscaleImage extends n.ImagebProcesser{_processer;constructor(e){super();this._processer=e?._processer}process(e){let t=i.ImagebTool.convertGreyImg(e);if(this._processer==null){return new s.ProcessedResult({origin:e,result:new s.ProcessedImage({data:t,width:t.width,height:t.height})})}return this._processer.process(t)}}t.GrayscaleImage=GrayscaleImage},6872:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReverseColorImage=void 0;const n=r(1361);const s=r(801);const i=r(6736);class ReverseColorImage extends n.ImagebProcesser{_processer;constructor(e){super();this._processer=e?._processer}process(e){let t=i.ImagebTool.invertBitmap(e);if(this._processer==null){return new s.ProcessedResult({origin:e,result:new s.ProcessedImage({data:t,width:t.width,height:t.height})})}return this._processer.process(t)}}t.ReverseColorImage=ReverseColorImage},8574:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ThresholdImage=void 0;const n=r(1566);class ThresholdImage extends n.AbstractThreshold{constructor(e){super(new n.PinedThresholdValue(e?.threshold))}}t.ThresholdImage=ThresholdImage},118:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(1361),t);s(r(2749),t);s(r(6872),t);s(r(8574),t);s(r(115),t);s(r(1566),t)},115:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.Pbita=void 0;const a=r(1361);const o=r(801);const l=i(r(1154));const c=r(2749);const u=r(6872);class Pbita extends a.ImagebProcesser{command;threshold;compress;reverse;constructor(e){super();this.threshold=e.threshold;this.command=e.command;this.compress=e.compress;this.reverse=e.reverse}process(e){const t=e.width;const r=e.height;const n=new c.GrayscaleImage;const s=n.process(e);if(s.result==null){return new o.ProcessedResult({origin:e,message:"Failed to process gray scale: "+s.message})}let i;if(this.reverse){const t=new u.ReverseColorImage;const r=t.process(s.result.data);if(r.result==null){return new o.ProcessedResult({origin:e,message:"Failed to process reverse: "+r.message})}i=r.result.data}else{i=s.result.data}let a=this._topbitimg(i,t,r);if(a==null){return new o.ProcessedResult({origin:e,message:"Failed to process bitimg"})}if(this.compress){a=l.deflate(a,{windowBits:10})}return new o.ProcessedResult({origin:e,result:new o.ProcessedImage({data:i,width:t,height:r,bytes:a})})}_topbitimg(e,t,r){if(this.command=="tspl"&&!this.compress){return this._topbitimgReverse(this._topbitimgRaw(e,t,r))}else{return this._topbitimgRaw(e,t,r)}}_topbitimgRaw(e,t,r){const n=e.getContext("2d");let s=Math.floor(t%8===0?t/8:t/8+1);let i=0;let a=0;const o=r*s;const l=[];for(let e=0;e<o;e++){l[e]=0}const c=n.getImageData(0,0,e.width,e.height);while(i<r){let e=0;for(let r=0;r<t;r++){e++;if(e>8){e=1;a++}const t=1<<8-e;const n=this.fastExtractPixel(c,r,i,1,1);const s=n[0];const o=s[0];const u=s[1];const d=s[2];if((o+u+d)/3<(this.threshold??190)){l[a]=l[a]|t}}a=s*(i+1);i+=1}return new Uint8Array(l)}_topbitimgReverse(e){if(e==null){return null}const t=[];for(let r=0;r<e.length;r++){t[r]=~e[r]}return new Uint8Array(t)}fastExtractPixel(e,t,r,n,s){let i,a;let o=[];let l,c,u,d;const h=e.data;for(a=0;a<s;a++){let s=(t+(r+a)*e.width)*4;for(i=0;i<n;i++){l=h[s++];c=h[s++];u=h[s++];d=h[s++];o.push([l,c,u,d])}}return o}}t.Pbita=Pbita},1361:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ImagebProcesser=void 0;class ImagebProcesser{}t.ImagebProcesser=ImagebProcesser},6736:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ImagebTool=void 0;class ImagebTool{static invertBitmap(e){const t=e.getContext("2d");const r=t.getImageData(0,0,e.width,e.height);const n=r.data;for(let e=0,t=n.length;e<t;e+=4){r.data[e]=255-r.data[e];r.data[e+1]=255-r.data[e+1];r.data[e+2]=255-r.data[e+2]}t.putImageData(r,0,0);return e}static convertGreyImg(e){const t=e.getContext("2d");const r=t.getImageData(0,0,e.width,e.height);const n=r.data;for(let e=0,t=n.length;e<t;e+=4){const t=r.data[e]*.3+r.data[e+1]*.59+r.data[e+2]*.11;r.data[e]=t;r.data[e+1]=t;r.data[e+2]=t}t.putImageData(r,0,0);return e}static zeroAndOne(e){const t=e.getContext("2d");const r=t.getImageData(0,0,e.width,e.height);const n=255/2;for(let e=0;e<r.data.length;e+=4){const t=r.data[e];const s=r.data[e+1];const i=r.data[e+2];const a=r.data[e+3];const o=(t+s+i)/3;if(o>n){r.data[e]=255;r.data[e+1]=255;r.data[e+2]=255;r.data[e+3]=a}else{r.data[e]=0;r.data[e+1]=0;r.data[e+2]=0;r.data[e+3]=a}}t.putImageData(r,0,0);return e}}t.ImagebTool=ImagebTool},801:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ThresholdValueMode=t.ProcessedImage=t.ProcessedResult=void 0;class ProcessedResult{origin;result;message;constructor(e){this.origin=e.origin;this.result=e.result;this.message=e.message}}t.ProcessedResult=ProcessedResult;class ProcessedImage{data;width;height;bytes;constructor(e){this.data=e.data;this.width=e.width;this.height=e.height;this.bytes=e.bytes}}t.ProcessedImage=ProcessedImage;var r;(function(e){e[e["sum"]=0]="sum";e[e["avg"]=1]="avg";e[e["red"]=2]="red";e[e["green"]=3]="green";e[e["blue"]=4]="blue";e[e["max"]=5]="max";e[e["min"]=6]="min"})(r||(t.ThresholdValueMode=r={}))},3179:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EBackLineDot=void 0;const n=r(6376);const s=r(6833);class EBackLineDot extends n.BasicESCArg{dot;constructor(e){super();this.dot=e.dot??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.dot).clause()}header(){return new Uint8Array([16,255,129])}}t.EBackLineDot=EBackLineDot},6376:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.BasicESCArg=void 0;const n=r(6833);class BasicESCArg extends n.EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}newline(){return false}}t.BasicESCArg=BasicESCArg},1598:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EBatteryVolume=void 0;const n=r(6833);class EBatteryVolume extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,80,241])}}t.EBatteryVolume=EBatteryVolume},9761:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EBTType=void 0;const n=r(6833);class EBTType extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([31,178,16])}}t.EBTType=EBTType},8310:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EEnable=void 0;const n=r(6833);class EEnable extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,254,1])}}t.EEnable=EEnable},7880:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EGetPaperTypeQ3=void 0;const n=r(6833);class EGetPaperTypeQ3 extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,133])}}t.EGetPaperTypeQ3=EGetPaperTypeQ3},1729:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EGetShutdownTime=void 0;const n=r(6833);class EGetShutdownTime extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,19])}}t.EGetShutdownTime=EGetShutdownTime},7921:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EImage=void 0;const n=r(6376);const s=r(6833);const i=r(8686);const a=r(2468);class EImage extends n.BasicESCArg{compress;mode;image;reverse;threshold;constructor(e){super();this.compress=e.compress??false;this.reverse=e.reverse??false;this.threshold=e.threshold??190;this.mode=e.mode??i.EImageMode.NORMAL;this.image=e.image}clause(){const e=new a.Pbita({command:"esc",threshold:this.threshold,compress:this.compress,reverse:this.reverse});const t=e.process(this.image);const r=t.result.data;const n=t.result.bytes;if(r==null){throw new Error("Wrong image data")}let i=r.width;let o=r.height;const l=Math.floor(i%8===0?i/8:i/8+1);if(this.compress){return s.BinaryCommand.with(this.header()).appendNumber(l/256).appendNumber(l%256).appendNumber(o/256).appendNumber(o%256).appendNumber(n.length-2>>24&255).appendNumber(n.length-2>>16&255).appendNumber(n.length-2>>8&255).appendNumber(n.length-2&255).appendU8A(n.subarray(2,n.length)).clause()}return s.BinaryCommand.with(this.header()).appendNumber(this.mode).appendNumber(l%256).appendNumber(l/256).appendNumber(o%256).appendNumber(o/256).appendU8A(n).clause()}header(){return new Uint8Array(this.compress?[31,0]:[29,118,48])}}t.EImage=EImage},9366:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(3179),t);s(r(6376),t);s(r(1598),t);s(r(8310),t);s(r(1729),t);s(r(7921),t);s(r(7138),t);s(r(4905),t);s(r(4653),t);s(r(6070),t);s(r(3245),t);s(r(319),t);s(r(4632),t);s(r(3651),t);s(r(3792),t);s(r(2997),t);s(r(5417),t);s(r(7520),t);s(r(9339),t);s(r(4249),t);s(r(7105),t);s(r(3916),t);s(r(6199),t);s(r(7028),t);s(r(9761),t)},7028:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EInfo=void 0;const n=r(6833);class EInfo extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,112])}}t.EInfo=EInfo},7138:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ELearnLabelGap=void 0;const n=r(6833);class ELearnLabelGap extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,3])}}t.ELearnLabelGap=ELearnLabelGap},4905:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ELine=void 0;const n=r(6376);const s=r(6833);class ELine extends n.BasicESCArg{x;y;constructor(e){super();this.x=e.x??0;this.y=e.y??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.x).appendNumber(this.y).clause()}header(){return new Uint8Array([0,1])}}t.ELine=ELine},4653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ELineDot=void 0;const n=r(6376);const s=r(6833);class ELineDot extends n.BasicESCArg{dot;constructor(e){super();this.dot=e.dot??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.dot).clause()}header(){return new Uint8Array([27,74])}}t.ELineDot=ELineDot},6070:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ELocation=void 0;const n=r(6376);const s=r(6833);class ELocation extends n.BasicESCArg{location;constructor(e){super();this.location=e.location??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.location).clause()}header(){return new Uint8Array([27,97])}}t.ELocation=ELocation},3245:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EMac=void 0;const n=r(6833);class EMac extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,48,18])}}t.EMac=EMac},319:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EModel=void 0;const n=r(6833);class EModel extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,32,240])}}t.EModel=EModel},4632:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EName=void 0;const n=r(6833);class EName extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,48,17])}}t.EName=EName},3651:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EPaperType=void 0;const n=r(6376);const s=r(6833);const i=r(8686);class EPaperType extends n.BasicESCArg{paperType;constructor(e){super();this.paperType=e.paperType??i.PaperType.FOLDED_BLACK_LABEL_PAPER}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.paperType).clause()}header(){return new Uint8Array([16,255,16,3])}}t.EPaperType=EPaperType},3792:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EPosition=void 0;const n=r(6833);class EPosition extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([29,12])}}t.EPosition=EPosition},2997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EPrinterVersion=void 0;const n=r(6833);class EPrinterVersion extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,32,241])}}t.EPrinterVersion=EPrinterVersion},5417:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ESetShutdownTime=void 0;const n=r(6376);const s=r(6833);class ESetShutdownTime extends n.BasicESCArg{time;constructor(e){super();this.time=e.time??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.time/256).appendNumber(this.time%256).clause()}header(){return new Uint8Array([16,255,18])}}t.ESetShutdownTime=ESetShutdownTime},7520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ESN=void 0;const n=r(6833);class ESN extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,32,242])}}t.ESN=ESN},9339:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EState=void 0;const n=r(6833);class EState extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,64])}}t.EState=EState},4249:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EStopJob=void 0;const n=r(6833);class EStopJob extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,254,69])}}t.EStopJob=EStopJob},7105:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EThickness=void 0;const n=r(6376);const s=r(6833);class EThickness extends n.BasicESCArg{thickness;constructor(e){super();this.thickness=e.thickness??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.thickness).clause()}header(){return new Uint8Array([16,255,16,0])}}t.EThickness=EThickness},3916:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EVersion=void 0;const n=r(6833);class EVersion extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,48,16])}}t.EVersion=EVersion},6199:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EWakeup=void 0;const n=r(6833);class EWakeup extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}}t.EWakeup=EWakeup},8947:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.BasicESC=void 0;const n=r(6833);const s=r(9366);const i=r(7880);class BasicESC extends n.PSDK{_lifecycle;_commander;constructor(e){super();this._lifecycle=e;this._commander=n.Commander.make()}connectedDevice(){return this._lifecycle.connectedDevice}commander(){return this._commander}lineDot(e){return super.push(new s.ELineDot({dot:e}))}backLineDot(e){return super.push(new s.EBackLineDot({dot:e}))}batteryVolume(){return super.push(new s.EBatteryVolume)}enable(){return super.push(new s.EEnable)}getShutdownTime(){return super.push(new s.EGetShutdownTime)}image(e){return super.push(e)}learnLabelGap(){return super.push(new s.ELearnLabelGap)}line(e){return super.push(e)}location(e){return super.push(new s.ELocation({location:e}))}mac(){return super.push(new s.EMac)}info(){return super.push(new s.EInfo)}model(){return super.push(new s.EModel)}name(){return super.push(new s.EName)}paperType(e){return super.push(e)}paperTypeQ3(e){return super.push(e)}getPaperTypeQ3(){return super.push(new i.EGetPaperTypeQ3)}position(){return super.push(new s.EPosition)}printerVersion(){return super.push(new s.EPrinterVersion)}setShutdownTime(e){return super.push(new s.ESetShutdownTime({time:e}))}sn(){return super.push(new s.ESN)}state(){return super.push(new s.EState)}stopJob(){return super.push(new s.EStopJob)}thickness(e){return super.push(new s.EThickness({thickness:e}))}version(){return super.push(new s.EVersion)}wakeup(){return super.push(new s.EWakeup)}setBTType(){return super.push(new s.EBTType)}}t.BasicESC=BasicESC},8295:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ESC=void 0;const n=r(9671);class ESC{static generic(e){return new n.GenericESC(e)}}t.ESC=ESC},9671:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.GenericESC=void 0;const n=r(8947);class GenericESC extends n.BasicESC{constructor(e){super(e)}}t.GenericESC=GenericESC},6344:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(9671),t);s(r(8295),t)},5926:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(6344),t);s(r(9366),t)},4809:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.EImageMode=void 0;var r;(function(e){e[e["NORMAL"]=0]="NORMAL";e[e["DOUBLE_WIDTH"]=1]="DOUBLE_WIDTH";e[e["DOUBLE_HEIGHT"]=2]="DOUBLE_HEIGHT";e[e["DOUBLE_WIDTH_HEIGHT"]=3]="DOUBLE_WIDTH_HEIGHT"})(r||(t.EImageMode=r={}))},8686:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(4809),t);s(r(5488),t);s(r(1032),t)},5488:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.PaperType=void 0;var r;(function(e){e[e["FOLDED_BLACK_LABEL_PAPER"]=0]="FOLDED_BLACK_LABEL_PAPER";e[e["CONTINUOUS_REEL_PAPER"]=1]="CONTINUOUS_REEL_PAPER";e[e["NO_DRY_ADHESIVE_PAPER"]=2]="NO_DRY_ADHESIVE_PAPER";e[e["HOLE_PAPER"]=3]="HOLE_PAPER";e[e["TATTOO_PAPER"]=4]="TATTOO_PAPER"})(r||(t.PaperType=r={}))},1032:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.PaperTypeQ3=void 0;var r;(function(e){e[e["NO_DRY_ADHESIVE_PAPER"]=0]="NO_DRY_ADHESIVE_PAPER";e[e["FOLDED_BLACK_LABEL_PAPER"]=1]="FOLDED_BLACK_LABEL_PAPER";e[e["CONTINUOUS_REEL_PAPER"]=2]="CONTINUOUS_REEL_PAPER"})(r||(t.PaperTypeQ3=r={}))},1154:(e,t,r)=>{const{Deflate:n,deflate:s,deflateRaw:i,gzip:a}=r(9914);const{Inflate:o,inflate:l,inflateRaw:c,ungzip:u}=r(8955);const d=r(1234);e.exports.Deflate=n;e.exports.deflate=s;e.exports.deflateRaw=i;e.exports.gzip=a;e.exports.Inflate=o;e.exports.inflate=l;e.exports.inflateRaw=c;e.exports.ungzip=u;e.exports.constants=d},9914:(e,t,r)=>{const n=r(8492);const s=r(5533);const i=r(5992);const a=r(7678);const o=r(3944);const l=Object.prototype.toString;const{Z_NO_FLUSH:c,Z_SYNC_FLUSH:u,Z_FULL_FLUSH:d,Z_FINISH:h,Z_OK:f,Z_STREAM_END:_,Z_DEFAULT_COMPRESSION:p,Z_DEFAULT_STRATEGY:m,Z_DEFLATED:b}=r(1234);function Deflate(e){this.options=s.assign({level:p,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:m},e||{});let t=this.options;if(t.raw&&t.windowBits>0){t.windowBits=-t.windowBits}else if(t.gzip&&t.windowBits>0&&t.windowBits<16){t.windowBits+=16}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new o;this.strm.avail_out=0;let r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==f){throw new Error(a[r])}if(t.header){n.deflateSetHeader(this.strm,t.header)}if(t.dictionary){let e;if(typeof t.dictionary==="string"){e=i.string2buf(t.dictionary)}else if(l.call(t.dictionary)==="[object ArrayBuffer]"){e=new Uint8Array(t.dictionary)}else{e=t.dictionary}r=n.deflateSetDictionary(this.strm,e);if(r!==f){throw new Error(a[r])}this._dict_set=true}}Deflate.prototype.push=function(e,t){const r=this.strm;const s=this.options.chunkSize;let a,o;if(this.ended){return false}if(t===~~t)o=t;else o=t===true?h:c;if(typeof e==="string"){r.input=i.string2buf(e)}else if(l.call(e)==="[object ArrayBuffer]"){r.input=new Uint8Array(e)}else{r.input=e}r.next_in=0;r.avail_in=r.input.length;for(;;){if(r.avail_out===0){r.output=new Uint8Array(s);r.next_out=0;r.avail_out=s}if((o===u||o===d)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out));r.avail_out=0;continue}a=n.deflate(r,o);if(a===_){if(r.next_out>0){this.onData(r.output.subarray(0,r.next_out))}a=n.deflateEnd(this.strm);this.onEnd(a);this.ended=true;return a===f}if(r.avail_out===0){this.onData(r.output);continue}if(o>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out));r.avail_out=0;continue}if(r.avail_in===0)break}return true};Deflate.prototype.onData=function(e){this.chunks.push(e)};Deflate.prototype.onEnd=function(e){if(e===f){this.result=s.flattenChunks(this.chunks)}this.chunks=[];this.err=e;this.msg=this.strm.msg};function deflate(e,t){const r=new Deflate(t);r.push(e,true);if(r.err){throw r.msg||a[r.err]}return r.result}function deflateRaw(e,t){t=t||{};t.raw=true;return deflate(e,t)}function gzip(e,t){t=t||{};t.gzip=true;return deflate(e,t)}e.exports.Deflate=Deflate;e.exports.deflate=deflate;e.exports.deflateRaw=deflateRaw;e.exports.gzip=gzip;e.exports.constants=r(1234)},8955:(e,t,r)=>{const n=r(422);const s=r(5533);const i=r(5992);const a=r(7678);const o=r(3944);const l=r(7657);const c=Object.prototype.toString;const{Z_NO_FLUSH:u,Z_FINISH:d,Z_OK:h,Z_STREAM_END:f,Z_NEED_DICT:_,Z_STREAM_ERROR:p,Z_DATA_ERROR:m,Z_MEM_ERROR:b}=r(1234);function Inflate(e){this.options=s.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;if(t.raw&&t.windowBits>=0&&t.windowBits<16){t.windowBits=-t.windowBits;if(t.windowBits===0){t.windowBits=-15}}if(t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)){t.windowBits+=32}if(t.windowBits>15&&t.windowBits<48){if((t.windowBits&15)===0){t.windowBits|=15}}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new o;this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==h){throw new Error(a[r])}this.header=new l;n.inflateGetHeader(this.strm,this.header);if(t.dictionary){if(typeof t.dictionary==="string"){t.dictionary=i.string2buf(t.dictionary)}else if(c.call(t.dictionary)==="[object ArrayBuffer]"){t.dictionary=new Uint8Array(t.dictionary)}if(t.raw){r=n.inflateSetDictionary(this.strm,t.dictionary);if(r!==h){throw new Error(a[r])}}}}Inflate.prototype.push=function(e,t){const r=this.strm;const s=this.options.chunkSize;const a=this.options.dictionary;let o,l,g;if(this.ended)return false;if(t===~~t)l=t;else l=t===true?d:u;if(c.call(e)==="[object ArrayBuffer]"){r.input=new Uint8Array(e)}else{r.input=e}r.next_in=0;r.avail_in=r.input.length;for(;;){if(r.avail_out===0){r.output=new Uint8Array(s);r.next_out=0;r.avail_out=s}o=n.inflate(r,l);if(o===_&&a){o=n.inflateSetDictionary(r,a);if(o===h){o=n.inflate(r,l)}else if(o===m){o=_}}while(r.avail_in>0&&o===f&&r.state.wrap>0&&e[r.next_in]!==0){n.inflateReset(r);o=n.inflate(r,l)}switch(o){case p:case m:case _:case b:this.onEnd(o);this.ended=true;return false}g=r.avail_out;if(r.next_out){if(r.avail_out===0||o===f){if(this.options.to==="string"){let e=i.utf8border(r.output,r.next_out);let t=r.next_out-e;let n=i.buf2string(r.output,e);r.next_out=t;r.avail_out=s-t;if(t)r.output.set(r.output.subarray(e,e+t),0);this.onData(n)}else{this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out))}}}if(o===h&&g===0)continue;if(o===f){o=n.inflateEnd(this.strm);this.onEnd(o);this.ended=true;return true}if(r.avail_in===0)break}return true};Inflate.prototype.onData=function(e){this.chunks.push(e)};Inflate.prototype.onEnd=function(e){if(e===h){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=s.flattenChunks(this.chunks)}}this.chunks=[];this.err=e;this.msg=this.strm.msg};function inflate(e,t){const r=new Inflate(t);r.push(e);if(r.err)throw r.msg||a[r.err];return r.result}function inflateRaw(e,t){t=t||{};t.raw=true;return inflate(e,t)}e.exports.Inflate=Inflate;e.exports.inflate=inflate;e.exports.inflateRaw=inflateRaw;e.exports.ungzip=inflate;e.exports.constants=r(1234)},5533:e=>{const _has=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const t=Array.prototype.slice.call(arguments,1);while(t.length){const r=t.shift();if(!r){continue}if(typeof r!=="object"){throw new TypeError(r+"must be non-object")}for(const t in r){if(_has(r,t)){e[t]=r[t]}}}return e};e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r<n;r++){t+=e[r].length}const r=new Uint8Array(t);for(let t=0,n=0,s=e.length;t<s;t++){let s=e[t];r.set(s,n);n+=s.length}return r}},5992:e=>{let t=true;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=false}const r=new Uint8Array(256);for(let e=0;e<256;e++){r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1}r[254]=r[254]=1;e.exports.string2buf=e=>{if(typeof TextEncoder==="function"&&TextEncoder.prototype.encode){return(new TextEncoder).encode(e)}let t,r,n,s,i,a=e.length,o=0;for(s=0;s<a;s++){r=e.charCodeAt(s);if((r&64512)===55296&&s+1<a){n=e.charCodeAt(s+1);if((n&64512)===56320){r=65536+(r-55296<<10)+(n-56320);s++}}o+=r<128?1:r<2048?2:r<65536?3:4}t=new Uint8Array(o);for(i=0,s=0;i<o;s++){r=e.charCodeAt(s);if((r&64512)===55296&&s+1<a){n=e.charCodeAt(s+1);if((n&64512)===56320){r=65536+(r-55296<<10)+(n-56320);s++}}if(r<128){t[i++]=r}else if(r<2048){t[i++]=192|r>>>6;t[i++]=128|r&63}else if(r<65536){t[i++]=224|r>>>12;t[i++]=128|r>>>6&63;t[i++]=128|r&63}else{t[i++]=240|r>>>18;t[i++]=128|r>>>12&63;t[i++]=128|r>>>6&63;t[i++]=128|r&63}}return t};const buf2binstring=(e,r)=>{if(r<65534){if(e.subarray&&t){return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r))}}let n="";for(let t=0;t<r;t++){n+=String.fromCharCode(e[t])}return n};e.exports.buf2string=(e,t)=>{const n=t||e.length;if(typeof TextDecoder==="function"&&TextDecoder.prototype.decode){return(new TextDecoder).decode(e.subarray(0,t))}let s,i;const a=new Array(n*2);for(i=0,s=0;s<n;){let t=e[s++];if(t<128){a[i++]=t;continue}let o=r[t];if(o>4){a[i++]=65533;s+=o-1;continue}t&=o===2?31:o===3?15:7;while(o>1&&s<n){t=t<<6|e[s++]&63;o--}if(o>1){a[i++]=65533;continue}if(t<65536){a[i++]=t}else{t-=65536;a[i++]=55296|t>>10&1023;a[i++]=56320|t&1023}}return buf2binstring(a,i)};e.exports.utf8border=(e,t)=>{t=t||e.length;if(t>e.length){t=e.length}let n=t-1;while(n>=0&&(e[n]&192)===128){n--}if(n<0){return t}if(n===0){return t}return n+r[e[n]]>t?n:t}},3796:e=>{const adler32=(e,t,r,n)=>{let s=e&65535|0,i=e>>>16&65535|0,a=0;while(r!==0){a=r>2e3?2e3:r;r-=a;do{s=s+t[n++]|0;i=i+s|0}while(--a);s%=65521;i%=65521}return s|i<<16|0};e.exports=adler32},1234:e=>{e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,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}},7597:e=>{const makeTable=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++){e=e&1?3988292384^e>>>1:e>>>1}t[r]=e}return t};const t=new Uint32Array(makeTable());const crc32=(e,r,n,s)=>{const i=t;const a=s+n;e^=-1;for(let t=s;t<a;t++){e=e>>>8^i[(e^r[t])&255]}return e^-1};e.exports=crc32},8492:(e,t,r)=>{const{_tr_init:n,_tr_stored_block:s,_tr_flush_block:i,_tr_tally:a,_tr_align:o}=r(6427);const l=r(3796);const c=r(7597);const u=r(7678);const{Z_NO_FLUSH:d,Z_PARTIAL_FLUSH:h,Z_FULL_FLUSH:f,Z_FINISH:_,Z_BLOCK:p,Z_OK:m,Z_STREAM_END:b,Z_STREAM_ERROR:g,Z_DATA_ERROR:w,Z_BUF_ERROR:y,Z_DEFAULT_COMPRESSION:v,Z_FILTERED:E,Z_HUFFMAN_ONLY:x,Z_RLE:k,Z_FIXED:A,Z_DEFAULT_STRATEGY:C,Z_UNKNOWN:O,Z_DEFLATED:P}=r(1234);const T=9;const D=15;const B=8;const S=29;const R=256;const I=R+1+S;const N=30;const z=19;const L=2*I+1;const U=15;const j=3;const M=258;const F=M+j+1;const H=32;const Z=42;const W=57;const K=69;const G=73;const V=91;const Y=103;const q=113;const X=666;const Q=1;const J=2;const $=3;const ee=4;const te=3;const err=(e,t)=>{e.msg=u[t];return t};const rank=e=>e*2-(e>4?9:0);const zero=e=>{let t=e.length;while(--t>=0){e[t]=0}};const slide_hash=e=>{let t,r;let n;let s=e.w_size;t=e.hash_size;n=t;do{r=e.head[--n];e.head[n]=r>=s?r-s:0}while(--t);t=s;n=t;do{r=e.prev[--n];e.prev[n]=r>=s?r-s:0}while(--t)};let HASH_ZLIB=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask;let re=HASH_ZLIB;const flush_pending=e=>{const t=e.state;let r=t.pending;if(r>e.avail_out){r=e.avail_out}if(r===0){return}e.output.set(t.pending_buf.subarray(t.pending_out,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;if(t.pending===0){t.pending_out=0}};const flush_block_only=(e,t)=>{i(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t);e.block_start=e.strstart;flush_pending(e.strm)};const put_byte=(e,t)=>{e.pending_buf[e.pending++]=t};const putShortMSB=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255;e.pending_buf[e.pending++]=t&255};const read_buf=(e,t,r,n)=>{let s=e.avail_in;if(s>n){s=n}if(s===0){return 0}e.avail_in-=s;t.set(e.input.subarray(e.next_in,e.next_in+s),r);if(e.state.wrap===1){e.adler=l(e.adler,t,s,r)}else if(e.state.wrap===2){e.adler=c(e.adler,t,s,r)}e.next_in+=s;e.total_in+=s;return s};const longest_match=(e,t)=>{let r=e.max_chain_length;let n=e.strstart;let s;let i;let a=e.prev_length;let o=e.nice_match;const l=e.strstart>e.w_size-F?e.strstart-(e.w_size-F):0;const c=e.window;const u=e.w_mask;const d=e.prev;const h=e.strstart+M;let f=c[n+a-1];let _=c[n+a];if(e.prev_length>=e.good_match){r>>=2}if(o>e.lookahead){o=e.lookahead}do{s=t;if(c[s+a]!==_||c[s+a-1]!==f||c[s]!==c[n]||c[++s]!==c[n+1]){continue}n+=2;s++;do{}while(c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&n<h);i=M-(h-n);n=h-M;if(i>a){e.match_start=t;a=i;if(i>=o){break}f=c[n+a-1];_=c[n+a]}}while((t=d[t&u])>l&&--r!==0);if(a<=e.lookahead){return a}return e.lookahead};const fill_window=e=>{const t=e.w_size;let r,n,s;do{n=e.window_size-e.lookahead-e.strstart;if(e.strstart>=t+(t-F)){e.window.set(e.window.subarray(t,t+t-n),0);e.match_start-=t;e.strstart-=t;e.block_start-=t;if(e.insert>e.strstart){e.insert=e.strstart}slide_hash(e);n+=t}if(e.strm.avail_in===0){break}r=read_buf(e.strm,e.window,e.strstart+e.lookahead,n);e.lookahead+=r;if(e.lookahead+e.insert>=j){s=e.strstart-e.insert;e.ins_h=e.window[s];e.ins_h=re(e,e.ins_h,e.window[s+1]);while(e.insert){e.ins_h=re(e,e.ins_h,e.window[s+j-1]);e.prev[s&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=s;s++;e.insert--;if(e.lookahead+e.insert<j){break}}}}while(e.lookahead<F&&e.strm.avail_in!==0)};const deflate_stored=(e,t)=>{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5;let n,i,a,o=0;let l=e.strm.avail_in;do{n=65535;a=e.bi_valid+42>>3;if(e.strm.avail_out<a){break}a=e.strm.avail_out-a;i=e.strstart-e.block_start;if(n>i+e.strm.avail_in){n=i+e.strm.avail_in}if(n>a){n=a}if(n<r&&(n===0&&t!==_||t===d||n!==i+e.strm.avail_in)){break}o=t===_&&n===i+e.strm.avail_in?1:0;s(e,0,0,o);e.pending_buf[e.pending-4]=n;e.pending_buf[e.pending-3]=n>>8;e.pending_buf[e.pending-2]=~n;e.pending_buf[e.pending-1]=~n>>8;flush_pending(e.strm);if(i){if(i>n){i=n}e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out);e.strm.next_out+=i;e.strm.avail_out-=i;e.strm.total_out+=i;e.block_start+=i;n-=i}if(n){read_buf(e.strm,e.strm.output,e.strm.next_out,n);e.strm.next_out+=n;e.strm.avail_out-=n;e.strm.total_out+=n}}while(o===0);l-=e.strm.avail_in;if(l){if(l>=e.w_size){e.matches=2;e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0);e.strstart=e.w_size;e.insert=e.strstart}else{if(e.window_size-e.strstart<=l){e.strstart-=e.w_size;e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0);if(e.matches<2){e.matches++}if(e.insert>e.strstart){e.insert=e.strstart}}e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart);e.strstart+=l;e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l}e.block_start=e.strstart}if(e.high_water<e.strstart){e.high_water=e.strstart}if(o){return ee}if(t!==d&&t!==_&&e.strm.avail_in===0&&e.strstart===e.block_start){return J}a=e.window_size-e.strstart;if(e.strm.avail_in>a&&e.block_start>=e.w_size){e.block_start-=e.w_size;e.strstart-=e.w_size;e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0);if(e.matches<2){e.matches++}a+=e.w_size;if(e.insert>e.strstart){e.insert=e.strstart}}if(a>e.strm.avail_in){a=e.strm.avail_in}if(a){read_buf(e.strm,e.window,e.strstart,a);e.strstart+=a;e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a}if(e.high_water<e.strstart){e.high_water=e.strstart}a=e.bi_valid+42>>3;a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a;r=a>e.w_size?e.w_size:a;i=e.strstart-e.block_start;if(i>=r||(i||t===_)&&t!==d&&e.strm.avail_in===0&&i<=a){n=i>a?a:i;o=t===_&&e.strm.avail_in===0&&n===i?1:0;s(e,e.block_start,n,o);e.block_start+=n;flush_pending(e.strm)}return o?$:Q};const deflate_fast=(e,t)=>{let r;let n;for(;;){if(e.lookahead<F){fill_window(e);if(e.lookahead<F&&t===d){return Q}if(e.lookahead===0){break}}r=0;if(e.lookahead>=j){e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}if(r!==0&&e.strstart-r<=e.w_size-F){e.match_length=longest_match(e,r)}if(e.match_length>=j){n=a(e,e.strstart-e.match_start,e.match_length-j);e.lookahead-=e.match_length;if(e.match_length<=e.max_lazy_match&&e.lookahead>=j){e.match_length--;do{e.strstart++;e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}while(--e.match_length!==0);e.strstart++}else{e.strstart+=e.match_length;e.match_length=0;e.ins_h=e.window[e.strstart];e.ins_h=re(e,e.ins_h,e.window[e.strstart+1])}}else{n=a(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++}if(n){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=e.strstart<j-1?e.strstart:j-1;if(t===_){flush_block_only(e,true);if(e.strm.avail_out===0){return $}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return J};const deflate_slow=(e,t)=>{let r;let n;let s;for(;;){if(e.lookahead<F){fill_window(e);if(e.lookahead<F&&t===d){return Q}if(e.lookahead===0){break}}r=0;if(e.lookahead>=j){e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);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=j-1;if(r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-F){e.match_length=longest_match(e,r);if(e.match_length<=5&&(e.strategy===E||e.match_length===j&&e.strstart-e.match_start>4096)){e.match_length=j-1}}if(e.prev_length>=j&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-j;n=a(e,e.strstart-1-e.prev_match,e.prev_length-j);e.lookahead-=e.prev_length-1;e.prev_length-=2;do{if(++e.strstart<=s){e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}}while(--e.prev_length!==0);e.match_available=0;e.match_length=j-1;e.strstart++;if(n){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}else if(e.match_available){n=a(e,0,e.window[e.strstart-1]);if(n){flush_block_only(e,false)}e.strstart++;e.lookahead--;if(e.strm.avail_out===0){return Q}}else{e.match_available=1;e.strstart++;e.lookahead--}}if(e.match_available){n=a(e,0,e.window[e.strstart-1]);e.match_available=0}e.insert=e.strstart<j-1?e.strstart:j-1;if(t===_){flush_block_only(e,true);if(e.strm.avail_out===0){return $}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return J};const deflate_rle=(e,t)=>{let r;let n;let s,i;const o=e.window;for(;;){if(e.lookahead<=M){fill_window(e);if(e.lookahead<=M&&t===d){return Q}if(e.lookahead===0){break}}e.match_length=0;if(e.lookahead>=j&&e.strstart>0){s=e.strstart-1;n=o[s];if(n===o[++s]&&n===o[++s]&&n===o[++s]){i=e.strstart+M;do{}while(n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&s<i);e.match_length=M-(i-s);if(e.match_length>e.lookahead){e.match_length=e.lookahead}}}if(e.match_length>=j){r=a(e,1,e.match_length-j);e.lookahead-=e.match_length;e.strstart+=e.match_length;e.match_length=0}else{r=a(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++}if(r){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=0;if(t===_){flush_block_only(e,true);if(e.strm.avail_out===0){return $}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return J};const deflate_huff=(e,t)=>{let r;for(;;){if(e.lookahead===0){fill_window(e);if(e.lookahead===0){if(t===d){return Q}break}}e.match_length=0;r=a(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++;if(r){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=0;if(t===_){flush_block_only(e,true);if(e.strm.avail_out===0){return $}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return J};function Config(e,t,r,n,s){this.good_length=e;this.max_lazy=t;this.nice_length=r;this.max_chain=n;this.func=s}const ne=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];const lm_init=e=>{e.window_size=2*e.w_size;zero(e.head);e.max_lazy_match=ne[e.level].max_lazy;e.good_match=ne[e.level].good_length;e.nice_match=ne[e.level].nice_length;e.max_chain_length=ne[e.level].max_chain;e.strstart=0;e.block_start=0;e.lookahead=0;e.insert=0;e.match_length=e.prev_length=j-1;e.match_available=0;e.ins_h=0};function DeflateState(){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=P;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 Uint16Array(L*2);this.dyn_dtree=new Uint16Array((2*N+1)*2);this.bl_tree=new Uint16Array((2*z+1)*2);zero(this.dyn_ltree);zero(this.dyn_dtree);zero(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new Uint16Array(U+1);this.heap=new Uint16Array(2*I+1);zero(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new Uint16Array(2*I+1);zero(this.depth);this.sym_buf=0;this.lit_bufsize=0;this.sym_next=0;this.sym_end=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}const deflateStateCheck=e=>{if(!e){return 1}const t=e.state;if(!t||t.strm!==e||t.status!==Z&&t.status!==W&&t.status!==K&&t.status!==G&&t.status!==V&&t.status!==Y&&t.status!==q&&t.status!==X){return 1}return 0};const deflateResetKeep=e=>{if(deflateStateCheck(e)){return err(e,g)}e.total_in=e.total_out=0;e.data_type=O;const t=e.state;t.pending=0;t.pending_out=0;if(t.wrap<0){t.wrap=-t.wrap}t.status=t.wrap===2?W:t.wrap?Z:q;e.adler=t.wrap===2?0:1;t.last_flush=-2;n(t);return m};const deflateReset=e=>{const t=deflateResetKeep(e);if(t===m){lm_init(e.state)}return t};const deflateSetHeader=(e,t)=>{if(deflateStateCheck(e)||e.state.wrap!==2){return g}e.state.gzhead=t;return m};const deflateInit2=(e,t,r,n,s,i)=>{if(!e){return g}let a=1;if(t===v){t=6}if(n<0){a=0;n=-n}else if(n>15){a=2;n-=16}if(s<1||s>T||r!==P||n<8||n>15||t<0||t>9||i<0||i>A||n===8&&a!==1){return err(e,g)}if(n===8){n=9}const o=new DeflateState;e.state=o;o.strm=e;o.status=Z;o.wrap=a;o.gzhead=null;o.w_bits=n;o.w_size=1<<o.w_bits;o.w_mask=o.w_size-1;o.hash_bits=s+7;o.hash_size=1<<o.hash_bits;o.hash_mask=o.hash_size-1;o.hash_shift=~~((o.hash_bits+j-1)/j);o.window=new Uint8Array(o.w_size*2);o.head=new Uint16Array(o.hash_size);o.prev=new Uint16Array(o.w_size);o.lit_bufsize=1<<s+6;o.pending_buf_size=o.lit_bufsize*4;o.pending_buf=new Uint8Array(o.pending_buf_size);o.sym_buf=o.lit_bufsize;o.sym_end=(o.lit_bufsize-1)*3;o.level=t;o.strategy=i;o.method=r;return deflateReset(e)};const deflateInit=(e,t)=>deflateInit2(e,t,P,D,B,C);const deflate=(e,t)=>{if(deflateStateCheck(e)||t>p||t<0){return e?err(e,g):g}const r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===X&&t!==_){return err(e,e.avail_out===0?y:g)}const n=r.last_flush;r.last_flush=t;if(r.pending!==0){flush_pending(e);if(e.avail_out===0){r.last_flush=-1;return m}}else if(e.avail_in===0&&rank(t)<=rank(n)&&t!==_){return err(e,y)}if(r.status===X&&e.avail_in!==0){return err(e,y)}if(r.status===Z&&r.wrap===0){r.status=q}if(r.status===Z){let t=P+(r.w_bits-8<<4)<<8;let n=-1;if(r.strategy>=x||r.level<2){n=0}else if(r.level<6){n=1}else if(r.level===6){n=2}else{n=3}t|=n<<6;if(r.strstart!==0){t|=H}t+=31-t%31;putShortMSB(r,t);if(r.strstart!==0){putShortMSB(r,e.adler>>>16);putShortMSB(r,e.adler&65535)}e.adler=1;r.status=q;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}}if(r.status===W){e.adler=0;put_byte(r,31);put_byte(r,139);put_byte(r,8);if(!r.gzhead){put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,r.level===9?2:r.strategy>=x||r.level<2?4:0);put_byte(r,te);r.status=q;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}}else{put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(!r.gzhead.extra?0:4)+(!r.gzhead.name?0:8)+(!r.gzhead.comment?0:16));put_byte(r,r.gzhead.time&255);put_byte(r,r.gzhead.time>>8&255);put_byte(r,r.gzhead.time>>16&255);put_byte(r,r.gzhead.time>>24&255);put_byte(r,r.level===9?2:r.strategy>=x||r.level<2?4:0);put_byte(r,r.gzhead.os&255);if(r.gzhead.extra&&r.gzhead.extra.length){put_byte(r,r.gzhead.extra.length&255);put_byte(r,r.gzhead.extra.length>>8&255)}if(r.gzhead.hcrc){e.adler=c(e.adler,r.pending_buf,r.pending,0)}r.gzindex=0;r.status=K}}if(r.status===K){if(r.gzhead.extra){let t=r.pending;let n=(r.gzhead.extra.length&65535)-r.gzindex;while(r.pending+n>r.pending_buf_size){let s=r.pending_buf_size-r.pending;r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+s),r.pending);r.pending=r.pending_buf_size;if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}r.gzindex+=s;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}t=0;n-=s}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+n),r.pending);r.pending+=n;if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}r.gzindex=0}r.status=G}if(r.status===G){if(r.gzhead.name){let t=r.pending;let n;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}t=0}if(r.gzindex<r.gzhead.name.length){n=r.gzhead.name.charCodeAt(r.gzindex++)&255}else{n=0}put_byte(r,n)}while(n!==0);if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}r.gzindex=0}r.status=V}if(r.status===V){if(r.gzhead.comment){let t=r.pending;let n;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}t=0}if(r.gzindex<r.gzhead.comment.length){n=r.gzhead.comment.charCodeAt(r.gzindex++)&255}else{n=0}put_byte(r,n)}while(n!==0);if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}}r.status=Y}if(r.status===Y){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size){flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}}put_byte(r,e.adler&255);put_byte(r,e.adler>>8&255);e.adler=0}r.status=q;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}}if(e.avail_in!==0||r.lookahead!==0||t!==d&&r.status!==X){let n=r.level===0?deflate_stored(r,t):r.strategy===x?deflate_huff(r,t):r.strategy===k?deflate_rle(r,t):ne[r.level].func(r,t);if(n===$||n===ee){r.status=X}if(n===Q||n===$){if(e.avail_out===0){r.last_flush=-1}return m}if(n===J){if(t===h){o(r)}else if(t!==p){s(r,0,0,false);if(t===f){zero(r.head);if(r.lookahead===0){r.strstart=0;r.block_start=0;r.insert=0}}}flush_pending(e);if(e.avail_out===0){r.last_flush=-1;return m}}}if(t!==_){return m}if(r.wrap<=0){return b}if(r.wrap===2){put_byte(r,e.adler&255);put_byte(r,e.adler>>8&255);put_byte(r,e.adler>>16&255);put_byte(r,e.adler>>24&255);put_byte(r,e.total_in&255);put_byte(r,e.total_in>>8&255);put_byte(r,e.total_in>>16&255);put_byte(r,e.total_in>>24&255)}else{putShortMSB(r,e.adler>>>16);putShortMSB(r,e.adler&65535)}flush_pending(e);if(r.wrap>0){r.wrap=-r.wrap}return r.pending!==0?m:b};const deflateEnd=e=>{if(deflateStateCheck(e)){return g}const t=e.state.status;e.state=null;return t===q?err(e,w):m};const deflateSetDictionary=(e,t)=>{let r=t.length;if(deflateStateCheck(e)){return g}const n=e.state;const s=n.wrap;if(s===2||s===1&&n.status!==Z||n.lookahead){return g}if(s===1){e.adler=l(e.adler,t,r,0)}n.wrap=0;if(r>=n.w_size){if(s===0){zero(n.head);n.strstart=0;n.block_start=0;n.insert=0}let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0);t=e;r=n.w_size}const i=e.avail_in;const a=e.next_in;const o=e.input;e.avail_in=r;e.next_in=0;e.input=t;fill_window(n);while(n.lookahead>=j){let e=n.strstart;let t=n.lookahead-(j-1);do{n.ins_h=re(n,n.ins_h,n.window[e+j-1]);n.prev[e&n.w_mask]=n.head[n.ins_h];n.head[n.ins_h]=e;e++}while(--t);n.strstart=e;n.lookahead=j-1;fill_window(n)}n.strstart+=n.lookahead;n.block_start=n.strstart;n.insert=n.lookahead;n.lookahead=0;n.match_length=n.prev_length=j-1;n.match_available=0;e.next_in=a;e.input=o;e.avail_in=i;n.wrap=s;return m};e.exports.deflateInit=deflateInit;e.exports.deflateInit2=deflateInit2;e.exports.deflateReset=deflateReset;e.exports.deflateResetKeep=deflateResetKeep;e.exports.deflateSetHeader=deflateSetHeader;e.exports.deflate=deflate;e.exports.deflateEnd=deflateEnd;e.exports.deflateSetDictionary=deflateSetDictionary;e.exports.deflateInfo="pako deflate (from Nodeca project)"},7657:e=>{function GZheader(){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=false}e.exports=GZheader},7163:e=>{const t=16209;const r=16191;e.exports=function inflate_fast(e,n){let s;let i;let a;let o;let l;let c;let u;let d;let h;let f;let _;let p;let m;let b;let g;let w;let y;let v;let E;let x;let k;let A;let C,O;const P=e.state;s=e.next_in;C=e.input;i=s+(e.avail_in-5);a=e.next_out;O=e.output;o=a-(n-e.avail_out);l=a+(e.avail_out-257);c=P.dmax;u=P.wsize;d=P.whave;h=P.wnext;f=P.window;_=P.hold;p=P.bits;m=P.lencode;b=P.distcode;g=(1<<P.lenbits)-1;w=(1<<P.distbits)-1;e:do{if(p<15){_+=C[s++]<<p;p+=8;_+=C[s++]<<p;p+=8}y=m[_&g];t:for(;;){v=y>>>24;_>>>=v;p-=v;v=y>>>16&255;if(v===0){O[a++]=y&65535}else if(v&16){E=y&65535;v&=15;if(v){if(p<v){_+=C[s++]<<p;p+=8}E+=_&(1<<v)-1;_>>>=v;p-=v}if(p<15){_+=C[s++]<<p;p+=8;_+=C[s++]<<p;p+=8}y=b[_&w];r:for(;;){v=y>>>24;_>>>=v;p-=v;v=y>>>16&255;if(v&16){x=y&65535;v&=15;if(p<v){_+=C[s++]<<p;p+=8;if(p<v){_+=C[s++]<<p;p+=8}}x+=_&(1<<v)-1;if(x>c){e.msg="invalid distance too far back";P.mode=t;break e}_>>>=v;p-=v;v=a-o;if(x>v){v=x-v;if(v>d){if(P.sane){e.msg="invalid distance too far back";P.mode=t;break e}}k=0;A=f;if(h===0){k+=u-v;if(v<E){E-=v;do{O[a++]=f[k++]}while(--v);k=a-x;A=O}}else if(h<v){k+=u+h-v;v-=h;if(v<E){E-=v;do{O[a++]=f[k++]}while(--v);k=0;if(h<E){v=h;E-=v;do{O[a++]=f[k++]}while(--v);k=a-x;A=O}}}else{k+=h-v;if(v<E){E-=v;do{O[a++]=f[k++]}while(--v);k=a-x;A=O}}while(E>2){O[a++]=A[k++];O[a++]=A[k++];O[a++]=A[k++];E-=3}if(E){O[a++]=A[k++];if(E>1){O[a++]=A[k++]}}}else{k=a-x;do{O[a++]=O[k++];O[a++]=O[k++];O[a++]=O[k++];E-=3}while(E>2);if(E){O[a++]=O[k++];if(E>1){O[a++]=O[k++]}}}}else if((v&64)===0){y=b[(y&65535)+(_&(1<<v)-1)];continue r}else{e.msg="invalid distance code";P.mode=t;break e}break}}else if((v&64)===0){y=m[(y&65535)+(_&(1<<v)-1)];continue t}else if(v&32){P.mode=r;break e}else{e.msg="invalid literal/length code";P.mode=t;break e}break}}while(s<i&&a<l);E=p>>3;s-=E;p-=E<<3;_&=(1<<p)-1;e.next_in=s;e.next_out=a;e.avail_in=s<i?5+(i-s):5-(s-i);e.avail_out=a<l?257+(l-a):257-(a-l);P.hold=_;P.bits=p;return}},422:(e,t,r)=>{const n=r(3796);const s=r(7597);const i=r(7163);const a=r(2492);const o=0;const l=1;const c=2;const{Z_FINISH:u,Z_BLOCK:d,Z_TREES:h,Z_OK:f,Z_STREAM_END:_,Z_NEED_DICT:p,Z_STREAM_ERROR:m,Z_DATA_ERROR:b,Z_MEM_ERROR:g,Z_BUF_ERROR:w,Z_DEFLATED:y}=r(1234);const v=16180;const E=16181;const x=16182;const k=16183;const A=16184;const C=16185;const O=16186;const P=16187;const T=16188;const D=16189;const B=16190;const S=16191;const R=16192;const I=16193;const N=16194;const z=16195;const L=16196;const U=16197;const j=16198;const M=16199;const F=16200;const H=16201;const Z=16202;const W=16203;const K=16204;const G=16205;const V=16206;const Y=16207;const q=16208;const X=16209;const Q=16210;const J=16211;const $=852;const ee=592;const te=15;const re=te;const zswap32=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function InflateState(){this.strm=null;this.mode=0;this.last=false;this.wrap=0;this.havedict=false;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 Uint16Array(320);this.work=new Uint16Array(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}const inflateStateCheck=e=>{if(!e){return 1}const t=e.state;if(!t||t.strm!==e||t.mode<v||t.mode>J){return 1}return 0};const inflateResetKeep=e=>{if(inflateStateCheck(e)){return m}const t=e.state;e.total_in=e.total_out=t.total=0;e.msg="";if(t.wrap){e.adler=t.wrap&1}t.mode=v;t.last=0;t.havedict=0;t.flags=-1;t.dmax=32768;t.head=null;t.hold=0;t.bits=0;t.lencode=t.lendyn=new Int32Array($);t.distcode=t.distdyn=new Int32Array(ee);t.sane=1;t.back=-1;return f};const inflateReset=e=>{if(inflateStateCheck(e)){return m}const t=e.state;t.wsize=0;t.whave=0;t.wnext=0;return inflateResetKeep(e)};const inflateReset2=(e,t)=>{let r;if(inflateStateCheck(e)){return m}const n=e.state;if(t<0){r=0;t=-t}else{r=(t>>4)+5;if(t<48){t&=15}}if(t&&(t<8||t>15)){return m}if(n.window!==null&&n.wbits!==t){n.window=null}n.wrap=r;n.wbits=t;return inflateReset(e)};const inflateInit2=(e,t)=>{if(!e){return m}const r=new InflateState;e.state=r;r.strm=e;r.window=null;r.mode=v;const n=inflateReset2(e,t);if(n!==f){e.state=null}return n};const inflateInit=e=>inflateInit2(e,re);let ne=true;let se,ie;const fixedtables=e=>{if(ne){se=new Int32Array(512);ie=new Int32Array(32);let t=0;while(t<144){e.lens[t++]=8}while(t<256){e.lens[t++]=9}while(t<280){e.lens[t++]=7}while(t<288){e.lens[t++]=8}a(l,e.lens,0,288,se,0,e.work,{bits:9});t=0;while(t<32){e.lens[t++]=5}a(c,e.lens,0,32,ie,0,e.work,{bits:5});ne=false}e.lencode=se;e.lenbits=9;e.distcode=ie;e.distbits=5};const updatewindow=(e,t,r,n)=>{let s;const i=e.state;if(i.window===null){i.wsize=1<<i.wbits;i.wnext=0;i.whave=0;i.window=new Uint8Array(i.wsize)}if(n>=i.wsize){i.window.set(t.subarray(r-i.wsize,r),0);i.wnext=0;i.whave=i.wsize}else{s=i.wsize-i.wnext;if(s>n){s=n}i.window.set(t.subarray(r-n,r-n+s),i.wnext);n-=s;if(n){i.window.set(t.subarray(r-n,r),0);i.wnext=n;i.whave=i.wsize}else{i.wnext+=s;if(i.wnext===i.wsize){i.wnext=0}if(i.whave<i.wsize){i.whave+=s}}}return 0};const inflate=(e,t)=>{let r;let $,ee;let te;let re;let ne,se;let ie;let ae;let oe,le;let ce;let ue;let de;let he=0;let fe,_e,pe;let me,be,ge;let we;let ye;const ve=new Uint8Array(4);let Ee;let xe;const ke=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(e)||!e.output||!e.input&&e.avail_in!==0){return m}r=e.state;if(r.mode===S){r.mode=R}re=e.next_out;ee=e.output;se=e.avail_out;te=e.next_in;$=e.input;ne=e.avail_in;ie=r.hold;ae=r.bits;oe=ne;le=se;ye=f;e:for(;;){switch(r.mode){case v:if(r.wrap===0){r.mode=R;break}while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.wrap&2&&ie===35615){if(r.wbits===0){r.wbits=15}r.check=0;ve[0]=ie&255;ve[1]=ie>>>8&255;r.check=s(r.check,ve,2,0);ie=0;ae=0;r.mode=E;break}if(r.head){r.head.done=false}if(!(r.wrap&1)||(((ie&255)<<8)+(ie>>8))%31){e.msg="incorrect header check";r.mode=X;break}if((ie&15)!==y){e.msg="unknown compression method";r.mode=X;break}ie>>>=4;ae-=4;we=(ie&15)+8;if(r.wbits===0){r.wbits=we}if(we>15||we>r.wbits){e.msg="invalid window size";r.mode=X;break}r.dmax=1<<r.wbits;r.flags=0;e.adler=r.check=1;r.mode=ie&512?D:S;ie=0;ae=0;break;case E:while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.flags=ie;if((r.flags&255)!==y){e.msg="unknown compression method";r.mode=X;break}if(r.flags&57344){e.msg="unknown header flags set";r.mode=X;break}if(r.head){r.head.text=ie>>8&1}if(r.flags&512&&r.wrap&4){ve[0]=ie&255;ve[1]=ie>>>8&255;r.check=s(r.check,ve,2,0)}ie=0;ae=0;r.mode=x;case x:while(ae<32){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.head){r.head.time=ie}if(r.flags&512&&r.wrap&4){ve[0]=ie&255;ve[1]=ie>>>8&255;ve[2]=ie>>>16&255;ve[3]=ie>>>24&255;r.check=s(r.check,ve,4,0)}ie=0;ae=0;r.mode=k;case k:while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.head){r.head.xflags=ie&255;r.head.os=ie>>8}if(r.flags&512&&r.wrap&4){ve[0]=ie&255;ve[1]=ie>>>8&255;r.check=s(r.check,ve,2,0)}ie=0;ae=0;r.mode=A;case A:if(r.flags&1024){while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.length=ie;if(r.head){r.head.extra_len=ie}if(r.flags&512&&r.wrap&4){ve[0]=ie&255;ve[1]=ie>>>8&255;r.check=s(r.check,ve,2,0)}ie=0;ae=0}else if(r.head){r.head.extra=null}r.mode=C;case C:if(r.flags&1024){ce=r.length;if(ce>ne){ce=ne}if(ce){if(r.head){we=r.head.extra_len-r.length;if(!r.head.extra){r.head.extra=new Uint8Array(r.head.extra_len)}r.head.extra.set($.subarray(te,te+ce),we)}if(r.flags&512&&r.wrap&4){r.check=s(r.check,$,ce,te)}ne-=ce;te+=ce;r.length-=ce}if(r.length){break e}}r.length=0;r.mode=O;case O:if(r.flags&2048){if(ne===0){break e}ce=0;do{we=$[te+ce++];if(r.head&&we&&r.length<65536){r.head.name+=String.fromCharCode(we)}}while(we&&ce<ne);if(r.flags&512&&r.wrap&4){r.check=s(r.check,$,ce,te)}ne-=ce;te+=ce;if(we){break e}}else if(r.head){r.head.name=null}r.length=0;r.mode=P;case P:if(r.flags&4096){if(ne===0){break e}ce=0;do{we=$[te+ce++];if(r.head&&we&&r.length<65536){r.head.comment+=String.fromCharCode(we)}}while(we&&ce<ne);if(r.flags&512&&r.wrap&4){r.check=s(r.check,$,ce,te)}ne-=ce;te+=ce;if(we){break e}}else if(r.head){r.head.comment=null}r.mode=T;case T:if(r.flags&512){while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.wrap&4&&ie!==(r.check&65535)){e.msg="header crc mismatch";r.mode=X;break}ie=0;ae=0}if(r.head){r.head.hcrc=r.flags>>9&1;r.head.done=true}e.adler=r.check=0;r.mode=S;break;case D:while(ae<32){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}e.adler=r.check=zswap32(ie);ie=0;ae=0;r.mode=B;case B:if(r.havedict===0){e.next_out=re;e.avail_out=se;e.next_in=te;e.avail_in=ne;r.hold=ie;r.bits=ae;return p}e.adler=r.check=1;r.mode=S;case S:if(t===d||t===h){break e}case R:if(r.last){ie>>>=ae&7;ae-=ae&7;r.mode=V;break}while(ae<3){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.last=ie&1;ie>>>=1;ae-=1;switch(ie&3){case 0:r.mode=I;break;case 1:fixedtables(r);r.mode=M;if(t===h){ie>>>=2;ae-=2;break e}break;case 2:r.mode=L;break;case 3:e.msg="invalid block type";r.mode=X}ie>>>=2;ae-=2;break;case I:ie>>>=ae&7;ae-=ae&7;while(ae<32){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if((ie&65535)!==(ie>>>16^65535)){e.msg="invalid stored block lengths";r.mode=X;break}r.length=ie&65535;ie=0;ae=0;r.mode=N;if(t===h){break e}case N:r.mode=z;case z:ce=r.length;if(ce){if(ce>ne){ce=ne}if(ce>se){ce=se}if(ce===0){break e}ee.set($.subarray(te,te+ce),re);ne-=ce;te+=ce;se-=ce;re+=ce;r.length-=ce;break}r.mode=S;break;case L:while(ae<14){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.nlen=(ie&31)+257;ie>>>=5;ae-=5;r.ndist=(ie&31)+1;ie>>>=5;ae-=5;r.ncode=(ie&15)+4;ie>>>=4;ae-=4;if(r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols";r.mode=X;break}r.have=0;r.mode=U;case U:while(r.have<r.ncode){while(ae<3){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.lens[ke[r.have++]]=ie&7;ie>>>=3;ae-=3}while(r.have<19){r.lens[ke[r.have++]]=0}r.lencode=r.lendyn;r.lenbits=7;Ee={bits:r.lenbits};ye=a(o,r.lens,0,19,r.lencode,0,r.work,Ee);r.lenbits=Ee.bits;if(ye){e.msg="invalid code lengths set";r.mode=X;break}r.have=0;r.mode=j;case j:while(r.have<r.nlen+r.ndist){for(;;){he=r.lencode[ie&(1<<r.lenbits)-1];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(pe<16){ie>>>=fe;ae-=fe;r.lens[r.have++]=pe}else{if(pe===16){xe=fe+2;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=fe;ae-=fe;if(r.have===0){e.msg="invalid bit length repeat";r.mode=X;break}we=r.lens[r.have-1];ce=3+(ie&3);ie>>>=2;ae-=2}else if(pe===17){xe=fe+3;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=fe;ae-=fe;we=0;ce=3+(ie&7);ie>>>=3;ae-=3}else{xe=fe+7;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=fe;ae-=fe;we=0;ce=11+(ie&127);ie>>>=7;ae-=7}if(r.have+ce>r.nlen+r.ndist){e.msg="invalid bit length repeat";r.mode=X;break}while(ce--){r.lens[r.have++]=we}}}if(r.mode===X){break}if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block";r.mode=X;break}r.lenbits=9;Ee={bits:r.lenbits};ye=a(l,r.lens,0,r.nlen,r.lencode,0,r.work,Ee);r.lenbits=Ee.bits;if(ye){e.msg="invalid literal/lengths set";r.mode=X;break}r.distbits=6;r.distcode=r.distdyn;Ee={bits:r.distbits};ye=a(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Ee);r.distbits=Ee.bits;if(ye){e.msg="invalid distances set";r.mode=X;break}r.mode=M;if(t===h){break e}case M:r.mode=F;case F:if(ne>=6&&se>=258){e.next_out=re;e.avail_out=se;e.next_in=te;e.avail_in=ne;r.hold=ie;r.bits=ae;i(e,le);re=e.next_out;ee=e.output;se=e.avail_out;te=e.next_in;$=e.input;ne=e.avail_in;ie=r.hold;ae=r.bits;if(r.mode===S){r.back=-1}break}r.back=0;for(;;){he=r.lencode[ie&(1<<r.lenbits)-1];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(_e&&(_e&240)===0){me=fe;be=_e;ge=pe;for(;;){he=r.lencode[ge+((ie&(1<<me+be)-1)>>me)];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(me+fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=me;ae-=me;r.back+=me}ie>>>=fe;ae-=fe;r.back+=fe;r.length=pe;if(_e===0){r.mode=G;break}if(_e&32){r.back=-1;r.mode=S;break}if(_e&64){e.msg="invalid literal/length code";r.mode=X;break}r.extra=_e&15;r.mode=H;case H:if(r.extra){xe=r.extra;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.length+=ie&(1<<r.extra)-1;ie>>>=r.extra;ae-=r.extra;r.back+=r.extra}r.was=r.length;r.mode=Z;case Z:for(;;){he=r.distcode[ie&(1<<r.distbits)-1];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if((_e&240)===0){me=fe;be=_e;ge=pe;for(;;){he=r.distcode[ge+((ie&(1<<me+be)-1)>>me)];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(me+fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=me;ae-=me;r.back+=me}ie>>>=fe;ae-=fe;r.back+=fe;if(_e&64){e.msg="invalid distance code";r.mode=X;break}r.offset=pe;r.extra=_e&15;r.mode=W;case W:if(r.extra){xe=r.extra;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.offset+=ie&(1<<r.extra)-1;ie>>>=r.extra;ae-=r.extra;r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back";r.mode=X;break}r.mode=K;case K:if(se===0){break e}ce=le-se;if(r.offset>ce){ce=r.offset-ce;if(ce>r.whave){if(r.sane){e.msg="invalid distance too far back";r.mode=X;break}}if(ce>r.wnext){ce-=r.wnext;ue=r.wsize-ce}else{ue=r.wnext-ce}if(ce>r.length){ce=r.length}de=r.window}else{de=ee;ue=re-r.offset;ce=r.length}if(ce>se){ce=se}se-=ce;r.length-=ce;do{ee[re++]=de[ue++]}while(--ce);if(r.length===0){r.mode=F}break;case G:if(se===0){break e}ee[re++]=r.length;se--;r.mode=F;break;case V:if(r.wrap){while(ae<32){if(ne===0){break e}ne--;ie|=$[te++]<<ae;ae+=8}le-=se;e.total_out+=le;r.total+=le;if(r.wrap&4&&le){e.adler=r.check=r.flags?s(r.check,ee,le,re-le):n(r.check,ee,le,re-le)}le=se;if(r.wrap&4&&(r.flags?ie:zswap32(ie))!==r.check){e.msg="incorrect data check";r.mode=X;break}ie=0;ae=0}r.mode=Y;case Y:if(r.wrap&&r.flags){while(ae<32){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.wrap&4&&ie!==(r.total&4294967295)){e.msg="incorrect length check";r.mode=X;break}ie=0;ae=0}r.mode=q;case q:ye=_;break e;case X:ye=b;break e;case Q:return g;case J:default:return m}}e.next_out=re;e.avail_out=se;e.next_in=te;e.avail_in=ne;r.hold=ie;r.bits=ae;if(r.wsize||le!==e.avail_out&&r.mode<X&&(r.mode<V||t!==u)){if(updatewindow(e,e.output,e.next_out,le-e.avail_out)){r.mode=Q;return g}}oe-=e.avail_in;le-=e.avail_out;e.total_in+=oe;e.total_out+=le;r.total+=le;if(r.wrap&4&&le){e.adler=r.check=r.flags?s(r.check,ee,le,e.next_out-le):n(r.check,ee,le,e.next_out-le)}e.data_type=r.bits+(r.last?64:0)+(r.mode===S?128:0)+(r.mode===M||r.mode===N?256:0);if((oe===0&&le===0||t===u)&&ye===f){ye=w}return ye};const inflateEnd=e=>{if(inflateStateCheck(e)){return m}let t=e.state;if(t.window){t.window=null}e.state=null;return f};const inflateGetHeader=(e,t)=>{if(inflateStateCheck(e)){return m}const r=e.state;if((r.wrap&2)===0){return m}r.head=t;t.done=false;return f};const inflateSetDictionary=(e,t)=>{const r=t.length;let s;let i;let a;if(inflateStateCheck(e)){return m}s=e.state;if(s.wrap!==0&&s.mode!==B){return m}if(s.mode===B){i=1;i=n(i,t,r,0);if(i!==s.check){return b}}a=updatewindow(e,t,r,r);if(a){s.mode=Q;return g}s.havedict=1;return f};e.exports.inflateReset=inflateReset;e.exports.inflateReset2=inflateReset2;e.exports.inflateResetKeep=inflateResetKeep;e.exports.inflateInit=inflateInit;e.exports.inflateInit2=inflateInit2;e.exports.inflate=inflate;e.exports.inflateEnd=inflateEnd;e.exports.inflateGetHeader=inflateGetHeader;e.exports.inflateSetDictionary=inflateSetDictionary;e.exports.inflateInfo="pako inflate (from Nodeca project)"},2492:e=>{const t=15;const r=852;const n=592;const s=0;const i=1;const a=2;const o=new Uint16Array([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]);const l=new Uint8Array([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]);const c=new Uint16Array([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]);const u=new Uint8Array([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]);const inflate_table=(e,d,h,f,_,p,m,b)=>{const g=b.bits;let w=0;let y=0;let v=0,E=0;let x=0;let k=0;let A=0;let C=0;let O=0;let P=0;let T;let D;let B;let S;let R;let I=null;let N;const z=new Uint16Array(t+1);const L=new Uint16Array(t+1);let U=null;let j,M,F;for(w=0;w<=t;w++){z[w]=0}for(y=0;y<f;y++){z[d[h+y]]++}x=g;for(E=t;E>=1;E--){if(z[E]!==0){break}}if(x>E){x=E}if(E===0){_[p++]=1<<24|64<<16|0;_[p++]=1<<24|64<<16|0;b.bits=1;return 0}for(v=1;v<E;v++){if(z[v]!==0){break}}if(x<v){x=v}C=1;for(w=1;w<=t;w++){C<<=1;C-=z[w];if(C<0){return-1}}if(C>0&&(e===s||E!==1)){return-1}L[1]=0;for(w=1;w<t;w++){L[w+1]=L[w]+z[w]}for(y=0;y<f;y++){if(d[h+y]!==0){m[L[d[h+y]]++]=y}}if(e===s){I=U=m;N=20}else if(e===i){I=o;U=l;N=257}else{I=c;U=u;N=0}P=0;y=0;w=v;R=p;k=x;A=0;B=-1;O=1<<x;S=O-1;if(e===i&&O>r||e===a&&O>n){return 1}for(;;){j=w-A;if(m[y]+1<N){M=0;F=m[y]}else if(m[y]>=N){M=U[m[y]-N];F=I[m[y]-N]}else{M=32+64;F=0}T=1<<w-A;D=1<<k;v=D;do{D-=T;_[R+(P>>A)+D]=j<<24|M<<16|F|0}while(D!==0);T=1<<w-1;while(P&T){T>>=1}if(T!==0){P&=T-1;P+=T}else{P=0}y++;if(--z[w]===0){if(w===E){break}w=d[h+m[y]]}if(w>x&&(P&S)!==B){if(A===0){A=x}R+=v;k=w-A;C=1<<k;while(k+A<E){C-=z[k+A];if(C<=0){break}k++;C<<=1}O+=1<<k;if(e===i&&O>r||e===a&&O>n){return 1}B=P&S;_[B]=x<<24|k<<16|R-p|0}}if(P!==0){_[R+P]=w-A<<24|64<<16|0}b.bits=x;return 0};e.exports=inflate_table},7678:e=>{e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},6427:e=>{const t=4;const r=0;const n=1;const s=2;function zero(e){let t=e.length;while(--t>=0){e[t]=0}}const i=0;const a=1;const o=2;const l=3;const c=258;const u=29;const d=256;const h=d+1+u;const f=30;const _=19;const p=2*h+1;const m=15;const b=16;const g=7;const w=256;const y=16;const v=17;const E=18;const x=new Uint8Array([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]);const k=new Uint8Array([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]);const A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);const O=512;const P=new Array((h+2)*2);zero(P);const T=new Array(f*2);zero(T);const D=new Array(O);zero(D);const B=new Array(c-l+1);zero(B);const S=new Array(u);zero(S);const R=new Array(f);zero(R);function StaticTreeDesc(e,t,r,n,s){this.static_tree=e;this.extra_bits=t;this.extra_base=r;this.elems=n;this.max_length=s;this.has_stree=e&&e.length}let I;let N;let z;function TreeDesc(e,t){this.dyn_tree=e;this.max_code=0;this.stat_desc=t}const d_code=e=>e<256?D[e]:D[256+(e>>>7)];const put_short=(e,t)=>{e.pending_buf[e.pending++]=t&255;e.pending_buf[e.pending++]=t>>>8&255};const send_bits=(e,t,r)=>{if(e.bi_valid>b-r){e.bi_buf|=t<<e.bi_valid&65535;put_short(e,e.bi_buf);e.bi_buf=t>>b-e.bi_valid;e.bi_valid+=r-b}else{e.bi_buf|=t<<e.bi_valid&65535;e.bi_valid+=r}};const send_code=(e,t,r)=>{send_bits(e,r[t*2],r[t*2+1])};const bi_reverse=(e,t)=>{let r=0;do{r|=e&1;e>>>=1;r<<=1}while(--t>0);return r>>>1};const bi_flush=e=>{if(e.bi_valid===16){put_short(e,e.bi_buf);e.bi_buf=0;e.bi_valid=0}else if(e.bi_valid>=8){e.pending_buf[e.pending++]=e.bi_buf&255;e.bi_buf>>=8;e.bi_valid-=8}};const gen_bitlen=(e,t)=>{const r=t.dyn_tree;const n=t.max_code;const s=t.stat_desc.static_tree;const i=t.stat_desc.has_stree;const a=t.stat_desc.extra_bits;const o=t.stat_desc.extra_base;const l=t.stat_desc.max_length;let c;let u,d;let h;let f;let _;let b=0;for(h=0;h<=m;h++){e.bl_count[h]=0}r[e.heap[e.heap_max]*2+1]=0;for(c=e.heap_max+1;c<p;c++){u=e.heap[c];h=r[r[u*2+1]*2+1]+1;if(h>l){h=l;b++}r[u*2+1]=h;if(u>n){continue}e.bl_count[h]++;f=0;if(u>=o){f=a[u-o]}_=r[u*2];e.opt_len+=_*(h+f);if(i){e.static_len+=_*(s[u*2+1]+f)}}if(b===0){return}do{h=l-1;while(e.bl_count[h]===0){h--}e.bl_count[h]--;e.bl_count[h+1]+=2;e.bl_count[l]--;b-=2}while(b>0);for(h=l;h!==0;h--){u=e.bl_count[h];while(u!==0){d=e.heap[--c];if(d>n){continue}if(r[d*2+1]!==h){e.opt_len+=(h-r[d*2+1])*r[d*2];r[d*2+1]=h}u--}}};const gen_codes=(e,t,r)=>{const n=new Array(m+1);let s=0;let i;let a;for(i=1;i<=m;i++){s=s+r[i-1]<<1;n[i]=s}for(a=0;a<=t;a++){let t=e[a*2+1];if(t===0){continue}e[a*2]=bi_reverse(n[t]++,t)}};const tr_static_init=()=>{let e;let t;let r;let n;let s;const i=new Array(m+1);r=0;for(n=0;n<u-1;n++){S[n]=r;for(e=0;e<1<<x[n];e++){B[r++]=n}}B[r-1]=n;s=0;for(n=0;n<16;n++){R[n]=s;for(e=0;e<1<<k[n];e++){D[s++]=n}}s>>=7;for(;n<f;n++){R[n]=s<<7;for(e=0;e<1<<k[n]-7;e++){D[256+s++]=n}}for(t=0;t<=m;t++){i[t]=0}e=0;while(e<=143){P[e*2+1]=8;e++;i[8]++}while(e<=255){P[e*2+1]=9;e++;i[9]++}while(e<=279){P[e*2+1]=7;e++;i[7]++}while(e<=287){P[e*2+1]=8;e++;i[8]++}gen_codes(P,h+1,i);for(e=0;e<f;e++){T[e*2+1]=5;T[e*2]=bi_reverse(e,5)}I=new StaticTreeDesc(P,x,d+1,h,m);N=new StaticTreeDesc(T,k,0,f,m);z=new StaticTreeDesc(new Array(0),A,0,_,g)};const init_block=e=>{let t;for(t=0;t<h;t++){e.dyn_ltree[t*2]=0}for(t=0;t<f;t++){e.dyn_dtree[t*2]=0}for(t=0;t<_;t++){e.bl_tree[t*2]=0}e.dyn_ltree[w*2]=1;e.opt_len=e.static_len=0;e.sym_next=e.matches=0};const bi_windup=e=>{if(e.bi_valid>8){put_short(e,e.bi_buf)}else if(e.bi_valid>0){e.pending_buf[e.pending++]=e.bi_buf}e.bi_buf=0;e.bi_valid=0};const smaller=(e,t,r,n)=>{const s=t*2;const i=r*2;return e[s]<e[i]||e[s]===e[i]&&n[t]<=n[r]};const pqdownheap=(e,t,r)=>{const n=e.heap[r];let s=r<<1;while(s<=e.heap_len){if(s<e.heap_len&&smaller(t,e.heap[s+1],e.heap[s],e.depth)){s++}if(smaller(t,n,e.heap[s],e.depth)){break}e.heap[r]=e.heap[s];r=s;s<<=1}e.heap[r]=n};const compress_block=(e,t,r)=>{let n;let s;let i=0;let a;let o;if(e.sym_next!==0){do{n=e.pending_buf[e.sym_buf+i++]&255;n+=(e.pending_buf[e.sym_buf+i++]&255)<<8;s=e.pending_buf[e.sym_buf+i++];if(n===0){send_code(e,s,t)}else{a=B[s];send_code(e,a+d+1,t);o=x[a];if(o!==0){s-=S[a];send_bits(e,s,o)}n--;a=d_code(n);send_code(e,a,r);o=k[a];if(o!==0){n-=R[a];send_bits(e,n,o)}}}while(i<e.sym_next)}send_code(e,w,t)};const build_tree=(e,t)=>{const r=t.dyn_tree;const n=t.stat_desc.static_tree;const s=t.stat_desc.has_stree;const i=t.stat_desc.elems;let a,o;let l=-1;let c;e.heap_len=0;e.heap_max=p;for(a=0;a<i;a++){if(r[a*2]!==0){e.heap[++e.heap_len]=l=a;e.depth[a]=0}else{r[a*2+1]=0}}while(e.heap_len<2){c=e.heap[++e.heap_len]=l<2?++l:0;r[c*2]=1;e.depth[c]=0;e.opt_len--;if(s){e.static_len-=n[c*2+1]}}t.max_code=l;for(a=e.heap_len>>1;a>=1;a--){pqdownheap(e,r,a)}c=i;do{a=e.heap[1];e.heap[1]=e.heap[e.heap_len--];pqdownheap(e,r,1);o=e.heap[1];e.heap[--e.heap_max]=a;e.heap[--e.heap_max]=o;r[c*2]=r[a*2]+r[o*2];e.depth[c]=(e.depth[a]>=e.depth[o]?e.depth[a]:e.depth[o])+1;r[a*2+1]=r[o*2+1]=c;e.heap[1]=c++;pqdownheap(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1];gen_bitlen(e,t);gen_codes(r,l,e.bl_count)};const scan_tree=(e,t,r)=>{let n;let s=-1;let i;let a=t[0*2+1];let o=0;let l=7;let c=4;if(a===0){l=138;c=3}t[(r+1)*2+1]=65535;for(n=0;n<=r;n++){i=a;a=t[(n+1)*2+1];if(++o<l&&i===a){continue}else if(o<c){e.bl_tree[i*2]+=o}else if(i!==0){if(i!==s){e.bl_tree[i*2]++}e.bl_tree[y*2]++}else if(o<=10){e.bl_tree[v*2]++}else{e.bl_tree[E*2]++}o=0;s=i;if(a===0){l=138;c=3}else if(i===a){l=6;c=3}else{l=7;c=4}}};const send_tree=(e,t,r)=>{let n;let s=-1;let i;let a=t[0*2+1];let o=0;let l=7;let c=4;if(a===0){l=138;c=3}for(n=0;n<=r;n++){i=a;a=t[(n+1)*2+1];if(++o<l&&i===a){continue}else if(o<c){do{send_code(e,i,e.bl_tree)}while(--o!==0)}else if(i!==0){if(i!==s){send_code(e,i,e.bl_tree);o--}send_code(e,y,e.bl_tree);send_bits(e,o-3,2)}else if(o<=10){send_code(e,v,e.bl_tree);send_bits(e,o-3,3)}else{send_code(e,E,e.bl_tree);send_bits(e,o-11,7)}o=0;s=i;if(a===0){l=138;c=3}else if(i===a){l=6;c=3}else{l=7;c=4}}};const build_bl_tree=e=>{let t;scan_tree(e,e.dyn_ltree,e.l_desc.max_code);scan_tree(e,e.dyn_dtree,e.d_desc.max_code);build_tree(e,e.bl_desc);for(t=_-1;t>=3;t--){if(e.bl_tree[C[t]*2+1]!==0){break}}e.opt_len+=3*(t+1)+5+5+4;return t};const send_all_trees=(e,t,r,n)=>{let s;send_bits(e,t-257,5);send_bits(e,r-1,5);send_bits(e,n-4,4);for(s=0;s<n;s++){send_bits(e,e.bl_tree[C[s]*2+1],3)}send_tree(e,e.dyn_ltree,t-1);send_tree(e,e.dyn_dtree,r-1)};const detect_data_type=e=>{let t=4093624447;let s;for(s=0;s<=31;s++,t>>>=1){if(t&1&&e.dyn_ltree[s*2]!==0){return r}}if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0){return n}for(s=32;s<d;s++){if(e.dyn_ltree[s*2]!==0){return n}}return r};let L=false;const _tr_init=e=>{if(!L){tr_static_init();L=true}e.l_desc=new TreeDesc(e.dyn_ltree,I);e.d_desc=new TreeDesc(e.dyn_dtree,N);e.bl_desc=new TreeDesc(e.bl_tree,z);e.bi_buf=0;e.bi_valid=0;init_block(e)};const _tr_stored_block=(e,t,r,n)=>{send_bits(e,(i<<1)+(n?1:0),3);bi_windup(e);put_short(e,r);put_short(e,~r);if(r){e.pending_buf.set(e.window.subarray(t,t+r),e.pending)}e.pending+=r};const _tr_align=e=>{send_bits(e,a<<1,3);send_code(e,w,P);bi_flush(e)};const _tr_flush_block=(e,r,n,i)=>{let l,c;let u=0;if(e.level>0){if(e.strm.data_type===s){e.strm.data_type=detect_data_type(e)}build_tree(e,e.l_desc);build_tree(e,e.d_desc);u=build_bl_tree(e);l=e.opt_len+3+7>>>3;c=e.static_len+3+7>>>3;if(c<=l){l=c}}else{l=c=n+5}if(n+4<=l&&r!==-1){_tr_stored_block(e,r,n,i)}else if(e.strategy===t||c===l){send_bits(e,(a<<1)+(i?1:0),3);compress_block(e,P,T)}else{send_bits(e,(o<<1)+(i?1:0),3);send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1);compress_block(e,e.dyn_ltree,e.dyn_dtree)}init_block(e);if(i){bi_windup(e)}};const _tr_tally=(e,t,r)=>{e.pending_buf[e.sym_buf+e.sym_next++]=t;e.pending_buf[e.sym_buf+e.sym_next++]=t>>8;e.pending_buf[e.sym_buf+e.sym_next++]=r;if(t===0){e.dyn_ltree[r*2]++}else{e.matches++;t--;e.dyn_ltree[(B[r]+d+1)*2]++;e.dyn_dtree[d_code(t)*2]++}return e.sym_next===e.sym_end};e.exports._tr_init=_tr_init;e.exports._tr_stored_block=_tr_stored_block;e.exports._tr_flush_block=_tr_flush_block;e.exports._tr_tally=_tr_tally;e.exports._tr_align=_tr_align},3944:e=>{function ZStream(){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}e.exports=ZStream}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var s=t[r]={exports:{}};var i=true;try{e[r].call(s.exports,s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(5926);module.exports=r})();
2
+ //# sourceMappingURL=index.js.map