Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@excaliburjs/plugin-aseprite

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@excaliburjs/plugin-aseprite - npm Package Compare versions

Comparing version 0.29.1 to 0.29.2

2

dist/excalibur-aseprite.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("excalibur")):"function"==typeof define&&define.amd?define(["excalibur"],e):"object"==typeof exports?exports.ex=e(require("excalibur")):(t.ex=t.ex||{},t.ex.Plugin=t.ex.Plugin||{},t.ex.Plugin.Aseprite=e(t.ex))}(self,(t=>(()=>{"use strict";var e={668:(t,e,s)=>{const{Deflate:i,deflate:r,deflateRaw:a,gzip:n}=s(303),{Inflate:o,inflate:h,inflateRaw:l,ungzip:d}=s(83),_=s(681);t.exports.Deflate=i,t.exports.deflate=r,t.exports.deflateRaw=a,t.exports.gzip=n,t.exports.Inflate=o,t.exports.inflate=h,t.exports.inflateRaw=l,t.exports.ungzip=d,t.exports.constants=_},303:(t,e,s)=>{const i=s(411),r=s(805),a=s(996),n=s(674),o=s(442),h=Object.prototype.toString,{Z_NO_FLUSH:l,Z_SYNC_FLUSH:d,Z_FULL_FLUSH:_,Z_FINISH:c,Z_OK:u,Z_STREAM_END:f,Z_DEFAULT_COMPRESSION:p,Z_DEFAULT_STRATEGY:w,Z_DEFLATED:g}=s(681);function m(t){this.options=r.assign({level:p,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:w},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;let s=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(s!==u)throw new Error(n[s]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?a.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,s=i.deflateSetDictionary(this.strm,t),s!==u)throw new Error(n[s]);this._dict_set=!0}}function b(t,e){const s=new m(e);if(s.push(t,!0),s.err)throw s.msg||n[s.err];return s.result}m.prototype.push=function(t,e){const s=this.strm,r=this.options.chunkSize;let n,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?c:l,"string"==typeof t?s.input=a.string2buf(t):"[object ArrayBuffer]"===h.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;)if(0===s.avail_out&&(s.output=new Uint8Array(r),s.next_out=0,s.avail_out=r),(o===d||o===_)&&s.avail_out<=6)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else{if(n=i.deflate(s,o),n===f)return s.next_out>0&&this.onData(s.output.subarray(0,s.next_out)),n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===u;if(0!==s.avail_out){if(o>0&&s.next_out>0)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else if(0===s.avail_in)break}else this.onData(s.output)}return!0},m.prototype.onData=function(t){this.chunks.push(t)},m.prototype.onEnd=function(t){t===u&&(this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Deflate=m,t.exports.deflate=b,t.exports.deflateRaw=function(t,e){return(e=e||{}).raw=!0,b(t,e)},t.exports.gzip=function(t,e){return(e=e||{}).gzip=!0,b(t,e)},t.exports.constants=s(681)},83:(t,e,s)=>{const i=s(447),r=s(805),a=s(996),n=s(674),o=s(442),h=s(414),l=Object.prototype.toString,{Z_NO_FLUSH:d,Z_FINISH:_,Z_OK:c,Z_STREAM_END:u,Z_NEED_DICT:f,Z_STREAM_ERROR:p,Z_DATA_ERROR:w,Z_MEM_ERROR:g}=s(681);function m(t){this.options=r.assign({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;let s=i.inflateInit2(this.strm,e.windowBits);if(s!==c)throw new Error(n[s]);if(this.header=new h,i.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=a.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(s=i.inflateSetDictionary(this.strm,e.dictionary),s!==c)))throw new Error(n[s])}function b(t,e){const s=new m(e);if(s.push(t),s.err)throw s.msg||n[s.err];return s.result}m.prototype.push=function(t,e){const s=this.strm,r=this.options.chunkSize,n=this.options.dictionary;let o,h,m;if(this.ended)return!1;for(h=e===~~e?e:!0===e?_:d,"[object ArrayBuffer]"===l.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(r),s.next_out=0,s.avail_out=r),o=i.inflate(s,h),o===f&&n&&(o=i.inflateSetDictionary(s,n),o===c?o=i.inflate(s,h):o===w&&(o=f));s.avail_in>0&&o===u&&s.state.wrap>0&&0!==t[s.next_in];)i.inflateReset(s),o=i.inflate(s,h);switch(o){case p:case w:case f:case g:return this.onEnd(o),this.ended=!0,!1}if(m=s.avail_out,s.next_out&&(0===s.avail_out||o===u))if("string"===this.options.to){let t=a.utf8border(s.output,s.next_out),e=s.next_out-t,i=a.buf2string(s.output,t);s.next_out=e,s.avail_out=r-e,e&&s.output.set(s.output.subarray(t,t+e),0),this.onData(i)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(o!==c||0!==m){if(o===u)return o=i.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},m.prototype.onData=function(t){this.chunks.push(t)},m.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Inflate=m,t.exports.inflate=b,t.exports.inflateRaw=function(t,e){return(e=e||{}).raw=!0,b(t,e)},t.exports.ungzip=b,t.exports.constants=s(681)},805:t=>{const e=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);t.exports.assign=function(t){const s=Array.prototype.slice.call(arguments,1);for(;s.length;){const i=s.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const s in i)e(i,s)&&(t[s]=i[s])}}return t},t.exports.flattenChunks=t=>{let e=0;for(let s=0,i=t.length;s<i;s++)e+=t[s].length;const s=new Uint8Array(e);for(let e=0,i=0,r=t.length;e<r;e++){let r=t[e];s.set(r,i),i+=r.length}return s}},996:t=>{let e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){e=!1}const s=new Uint8Array(256);for(let t=0;t<256;t++)s[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;s[254]=s[254]=1,t.exports.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,s,i,r,a,n=t.length,o=0;for(r=0;r<n;r++)s=t.charCodeAt(r),55296==(64512&s)&&r+1<n&&(i=t.charCodeAt(r+1),56320==(64512&i)&&(s=65536+(s-55296<<10)+(i-56320),r++)),o+=s<128?1:s<2048?2:s<65536?3:4;for(e=new Uint8Array(o),a=0,r=0;a<o;r++)s=t.charCodeAt(r),55296==(64512&s)&&r+1<n&&(i=t.charCodeAt(r+1),56320==(64512&i)&&(s=65536+(s-55296<<10)+(i-56320),r++)),s<128?e[a++]=s:s<2048?(e[a++]=192|s>>>6,e[a++]=128|63&s):s<65536?(e[a++]=224|s>>>12,e[a++]=128|s>>>6&63,e[a++]=128|63&s):(e[a++]=240|s>>>18,e[a++]=128|s>>>12&63,e[a++]=128|s>>>6&63,e[a++]=128|63&s);return e},t.exports.buf2string=(t,i)=>{const r=i||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,i));let a,n;const o=new Array(2*r);for(n=0,a=0;a<r;){let e=t[a++];if(e<128){o[n++]=e;continue}let i=s[e];if(i>4)o[n++]=65533,a+=i-1;else{for(e&=2===i?31:3===i?15:7;i>1&&a<r;)e=e<<6|63&t[a++],i--;i>1?o[n++]=65533:e<65536?o[n++]=e:(e-=65536,o[n++]=55296|e>>10&1023,o[n++]=56320|1023&e)}}return((t,s)=>{if(s<65534&&t.subarray&&e)return String.fromCharCode.apply(null,t.length===s?t:t.subarray(0,s));let i="";for(let e=0;e<s;e++)i+=String.fromCharCode(t[e]);return i})(o,n)},t.exports.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let i=e-1;for(;i>=0&&128==(192&t[i]);)i--;return i<0||0===i?e:i+s[t[i]]>e?i:e}},269:t=>{t.exports=(t,e,s,i)=>{let r=65535&t|0,a=t>>>16&65535|0,n=0;for(;0!==s;){n=s>2e3?2e3:s,s-=n;do{r=r+e[i++]|0,a=a+r|0}while(--n);r%=65521,a%=65521}return r|a<<16|0}},681:t=>{t.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}},823:t=>{const e=new Uint32Array((()=>{let t,e=[];for(var s=0;s<256;s++){t=s;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[s]=t}return e})());t.exports=(t,s,i,r)=>{const a=e,n=r+i;t^=-1;for(let e=r;e<n;e++)t=t>>>8^a[255&(t^s[e])];return-1^t}},411:(t,e,s)=>{const{_tr_init:i,_tr_stored_block:r,_tr_flush_block:a,_tr_tally:n,_tr_align:o}=s(665),h=s(269),l=s(823),d=s(674),{Z_NO_FLUSH:_,Z_PARTIAL_FLUSH:c,Z_FULL_FLUSH:u,Z_FINISH:f,Z_BLOCK:p,Z_OK:w,Z_STREAM_END:g,Z_STREAM_ERROR:m,Z_DATA_ERROR:b,Z_BUF_ERROR:y,Z_DEFAULT_COMPRESSION:v,Z_FILTERED:x,Z_HUFFMAN_ONLY:k,Z_RLE:A,Z_FIXED:R,Z_DEFAULT_STRATEGY:z,Z_UNKNOWN:D,Z_DEFLATED:S}=s(681),E=258,O=262,T=42,U=113,Z=666,B=(t,e)=>(t.msg=d[e],e),I=t=>2*t-(t>4?9:0),F=t=>{let e=t.length;for(;--e>=0;)t[e]=0},P=t=>{let e,s,i,r=t.w_size;e=t.hash_size,i=e;do{s=t.head[--i],t.head[i]=s>=r?s-r:0}while(--e);e=r,i=e;do{s=t.prev[--i],t.prev[i]=s>=r?s-r:0}while(--e)};let C=(t,e,s)=>(e<<t.hash_shift^s)&t.hash_mask;const L=t=>{const e=t.state;let s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+s),t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))},W=(t,e)=>{a(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,L(t.strm)},N=(t,e)=>{t.pending_buf[t.pending++]=e},j=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},M=(t,e,s,i)=>{let r=t.avail_in;return r>i&&(r=i),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),s),1===t.state.wrap?t.adler=h(t.adler,e,r,s):2===t.state.wrap&&(t.adler=l(t.adler,e,r,s)),t.next_in+=r,t.total_in+=r,r)},H=(t,e)=>{let s,i,r=t.max_chain_length,a=t.strstart,n=t.prev_length,o=t.nice_match;const h=t.strstart>t.w_size-O?t.strstart-(t.w_size-O):0,l=t.window,d=t.w_mask,_=t.prev,c=t.strstart+E;let u=l[a+n-1],f=l[a+n];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do{if(s=e,l[s+n]===f&&l[s+n-1]===u&&l[s]===l[a]&&l[++s]===l[a+1]){a+=2,s++;do{}while(l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&a<c);if(i=E-(c-a),a=c-E,i>n){if(t.match_start=e,n=i,i>=o)break;u=l[a+n-1],f=l[a+n]}}}while((e=_[e&d])>h&&0!=--r);return n<=t.lookahead?n:t.lookahead},Y=t=>{const e=t.w_size;let s,i,r;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-O)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),P(t),i+=e),0===t.strm.avail_in)break;if(s=M(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=s,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=C(t,t.ins_h,t.window[r+1]);t.insert&&(t.ins_h=C(t,t.ins_h,t.window[r+3-1]),t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<O&&0!==t.strm.avail_in)},V=(t,e)=>{let s,i,a,n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o=0,h=t.strm.avail_in;do{if(s=65535,a=t.bi_valid+42>>3,t.strm.avail_out<a)break;if(a=t.strm.avail_out-a,i=t.strstart-t.block_start,s>i+t.strm.avail_in&&(s=i+t.strm.avail_in),s>a&&(s=a),s<n&&(0===s&&e!==f||e===_||s!==i+t.strm.avail_in))break;o=e===f&&s===i+t.strm.avail_in?1:0,r(t,0,0,o),t.pending_buf[t.pending-4]=s,t.pending_buf[t.pending-3]=s>>8,t.pending_buf[t.pending-2]=~s,t.pending_buf[t.pending-1]=~s>>8,L(t.strm),i&&(i>s&&(i=s),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,s-=i),s&&(M(t.strm,t.strm.output,t.strm.next_out,s),t.strm.next_out+=s,t.strm.avail_out-=s,t.strm.total_out+=s)}while(0===o);return h-=t.strm.avail_in,h&&(h>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=h&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-h,t.strm.next_in),t.strstart),t.strstart+=h,t.insert+=h>t.w_size-t.insert?t.w_size-t.insert:h),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?4:e!==_&&e!==f&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(a=t.window_size-t.strstart,t.strm.avail_in>a&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,a+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),a>t.strm.avail_in&&(a=t.strm.avail_in),a&&(M(t.strm,t.window,t.strstart,a),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.high_water<t.strstart&&(t.high_water=t.strstart),a=t.bi_valid+42>>3,a=t.pending_buf_size-a>65535?65535:t.pending_buf_size-a,n=a>t.w_size?t.w_size:a,i=t.strstart-t.block_start,(i>=n||(i||e===f)&&e!==_&&0===t.strm.avail_in&&i<=a)&&(s=i>a?a:i,o=e===f&&0===t.strm.avail_in&&s===i?1:0,r(t,t.block_start,s,o),t.block_start+=s,L(t.strm)),o?3:1)},G=(t,e)=>{let s,i;for(;;){if(t.lookahead<O){if(Y(t),t.lookahead<O&&e===_)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=C(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==s&&t.strstart-s<=t.w_size-O&&(t.match_length=H(t,s)),t.match_length>=3)if(i=n(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=C(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=C(t,t.ins_h,t.window[t.strstart+1]);else i=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2},K=(t,e)=>{let s,i,r;for(;;){if(t.lookahead<O){if(Y(t),t.lookahead<O&&e===_)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=C(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==s&&t.prev_length<t.max_lazy_match&&t.strstart-s<=t.w_size-O&&(t.match_length=H(t,s),t.match_length<=5&&(t.strategy===x||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,i=n(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=C(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(W(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=n(t,0,t.window[t.strstart-1]),i&&W(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=n(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2};function J(t,e,s,i,r){this.good_length=t,this.max_lazy=e,this.nice_length=s,this.max_chain=i,this.func=r}const $=[new J(0,0,0,0,V),new J(4,4,8,4,G),new J(4,5,16,8,G),new J(4,6,32,32,G),new J(4,4,16,16,K),new J(8,16,32,32,K),new J(8,16,128,128,K),new J(8,32,128,256,K),new J(32,128,258,1024,K),new J(32,258,258,4096,K)];function X(){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=S,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(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),F(this.dyn_ltree),F(this.dyn_dtree),F(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),F(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),F(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 q=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==T&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==U&&e.status!==Z?1:0},Q=t=>{if(q(t))return B(t,m);t.total_in=t.total_out=0,t.data_type=D;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?T:U,t.adler=2===e.wrap?0:1,e.last_flush=-2,i(e),w},tt=t=>{const e=Q(t);var s;return e===w&&((s=t.state).window_size=2*s.w_size,F(s.head),s.max_lazy_match=$[s.level].max_lazy,s.good_match=$[s.level].good_length,s.nice_match=$[s.level].nice_length,s.max_chain_length=$[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=2,s.match_available=0,s.ins_h=0),e},et=(t,e,s,i,r,a)=>{if(!t)return m;let n=1;if(e===v&&(e=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),r<1||r>9||s!==S||i<8||i>15||e<0||e>9||a<0||a>R||8===i&&1!==n)return B(t,m);8===i&&(i=9);const o=new X;return t.state=o,o.strm=t,o.status=T,o.wrap=n,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=r+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<r+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=a,o.method=s,tt(t)};t.exports.deflateInit=(t,e)=>et(t,e,S,15,8,z),t.exports.deflateInit2=et,t.exports.deflateReset=tt,t.exports.deflateResetKeep=Q,t.exports.deflateSetHeader=(t,e)=>q(t)||2!==t.state.wrap?m:(t.state.gzhead=e,w),t.exports.deflate=(t,e)=>{if(q(t)||e>p||e<0)return t?B(t,m):m;const s=t.state;if(!t.output||0!==t.avail_in&&!t.input||s.status===Z&&e!==f)return B(t,0===t.avail_out?y:m);const i=s.last_flush;if(s.last_flush=e,0!==s.pending){if(L(t),0===t.avail_out)return s.last_flush=-1,w}else if(0===t.avail_in&&I(e)<=I(i)&&e!==f)return B(t,y);if(s.status===Z&&0!==t.avail_in)return B(t,y);if(s.status===T&&0===s.wrap&&(s.status=U),s.status===T){let e=S+(s.w_bits-8<<4)<<8,i=-1;if(i=s.strategy>=k||s.level<2?0:s.level<6?1:6===s.level?2:3,e|=i<<6,0!==s.strstart&&(e|=32),e+=31-e%31,j(s,e),0!==s.strstart&&(j(s,t.adler>>>16),j(s,65535&t.adler)),t.adler=1,s.status=U,L(t),0!==s.pending)return s.last_flush=-1,w}if(57===s.status)if(t.adler=0,N(s,31),N(s,139),N(s,8),s.gzhead)N(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),N(s,255&s.gzhead.time),N(s,s.gzhead.time>>8&255),N(s,s.gzhead.time>>16&255),N(s,s.gzhead.time>>24&255),N(s,9===s.level?2:s.strategy>=k||s.level<2?4:0),N(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(N(s,255&s.gzhead.extra.length),N(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=l(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(N(s,0),N(s,0),N(s,0),N(s,0),N(s,0),N(s,9===s.level?2:s.strategy>=k||s.level<2?4:0),N(s,3),s.status=U,L(t),0!==s.pending)return s.last_flush=-1,w;if(69===s.status){if(s.gzhead.extra){let e=s.pending,i=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+i>s.pending_buf_size;){let r=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=l(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=r,L(t),0!==s.pending)return s.last_flush=-1,w;e=0,i-=r}let r=new Uint8Array(s.gzhead.extra);s.pending_buf.set(r.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending+=i,s.gzhead.hcrc&&s.pending>e&&(t.adler=l(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),L(t),0!==s.pending)return s.last_flush=-1,w;i=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,N(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),L(t),0!==s.pending)return s.last_flush=-1,w;i=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,N(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(L(t),0!==s.pending))return s.last_flush=-1,w;N(s,255&t.adler),N(s,t.adler>>8&255),t.adler=0}if(s.status=U,L(t),0!==s.pending)return s.last_flush=-1,w}if(0!==t.avail_in||0!==s.lookahead||e!==_&&s.status!==Z){let i=0===s.level?V(s,e):s.strategy===k?((t,e)=>{let s;for(;;){if(0===t.lookahead&&(Y(t),0===t.lookahead)){if(e===_)return 1;break}if(t.match_length=0,s=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2})(s,e):s.strategy===A?((t,e)=>{let s,i,r,a;const o=t.window;for(;;){if(t.lookahead<=E){if(Y(t),t.lookahead<=E&&e===_)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(r=t.strstart-1,i=o[r],i===o[++r]&&i===o[++r]&&i===o[++r])){a=t.strstart+E;do{}while(i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&r<a);t.match_length=E-(a-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(s=n(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2})(s,e):$[s.level].func(s,e);if(3!==i&&4!==i||(s.status=Z),1===i||3===i)return 0===t.avail_out&&(s.last_flush=-1),w;if(2===i&&(e===c?o(s):e!==p&&(r(s,0,0,!1),e===u&&(F(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),L(t),0===t.avail_out))return s.last_flush=-1,w}return e!==f?w:s.wrap<=0?g:(2===s.wrap?(N(s,255&t.adler),N(s,t.adler>>8&255),N(s,t.adler>>16&255),N(s,t.adler>>24&255),N(s,255&t.total_in),N(s,t.total_in>>8&255),N(s,t.total_in>>16&255),N(s,t.total_in>>24&255)):(j(s,t.adler>>>16),j(s,65535&t.adler)),L(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?w:g)},t.exports.deflateEnd=t=>{if(q(t))return m;const e=t.state.status;return t.state=null,e===U?B(t,b):w},t.exports.deflateSetDictionary=(t,e)=>{let s=e.length;if(q(t))return m;const i=t.state,r=i.wrap;if(2===r||1===r&&i.status!==T||i.lookahead)return m;if(1===r&&(t.adler=h(t.adler,e,s,0)),i.wrap=0,s>=i.w_size){0===r&&(F(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(s-i.w_size,s),0),e=t,s=i.w_size}const a=t.avail_in,n=t.next_in,o=t.input;for(t.avail_in=s,t.next_in=0,t.input=e,Y(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=C(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,Y(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=n,t.input=o,t.avail_in=a,i.wrap=r,w},t.exports.deflateInfo="pako deflate (from Nodeca project)"},414:t=>{t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},293:t=>{const e=16209;t.exports=function(t,s){let i,r,a,n,o,h,l,d,_,c,u,f,p,w,g,m,b,y,v,x,k,A,R,z;const D=t.state;i=t.next_in,R=t.input,r=i+(t.avail_in-5),a=t.next_out,z=t.output,n=a-(s-t.avail_out),o=a+(t.avail_out-257),h=D.dmax,l=D.wsize,d=D.whave,_=D.wnext,c=D.window,u=D.hold,f=D.bits,p=D.lencode,w=D.distcode,g=(1<<D.lenbits)-1,m=(1<<D.distbits)-1;t:do{f<15&&(u+=R[i++]<<f,f+=8,u+=R[i++]<<f,f+=8),b=p[u&g];e:for(;;){if(y=b>>>24,u>>>=y,f-=y,y=b>>>16&255,0===y)z[a++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=p[(65535&b)+(u&(1<<y)-1)];continue e}if(32&y){D.mode=16191;break t}t.msg="invalid literal/length code",D.mode=e;break t}v=65535&b,y&=15,y&&(f<y&&(u+=R[i++]<<f,f+=8),v+=u&(1<<y)-1,u>>>=y,f-=y),f<15&&(u+=R[i++]<<f,f+=8,u+=R[i++]<<f,f+=8),b=w[u&m];s:for(;;){if(y=b>>>24,u>>>=y,f-=y,y=b>>>16&255,!(16&y)){if(0==(64&y)){b=w[(65535&b)+(u&(1<<y)-1)];continue s}t.msg="invalid distance code",D.mode=e;break t}if(x=65535&b,y&=15,f<y&&(u+=R[i++]<<f,f+=8,f<y&&(u+=R[i++]<<f,f+=8)),x+=u&(1<<y)-1,x>h){t.msg="invalid distance too far back",D.mode=e;break t}if(u>>>=y,f-=y,y=a-n,x>y){if(y=x-y,y>d&&D.sane){t.msg="invalid distance too far back",D.mode=e;break t}if(k=0,A=c,0===_){if(k+=l-y,y<v){v-=y;do{z[a++]=c[k++]}while(--y);k=a-x,A=z}}else if(_<y){if(k+=l+_-y,y-=_,y<v){v-=y;do{z[a++]=c[k++]}while(--y);if(k=0,_<v){y=_,v-=y;do{z[a++]=c[k++]}while(--y);k=a-x,A=z}}}else if(k+=_-y,y<v){v-=y;do{z[a++]=c[k++]}while(--y);k=a-x,A=z}for(;v>2;)z[a++]=A[k++],z[a++]=A[k++],z[a++]=A[k++],v-=3;v&&(z[a++]=A[k++],v>1&&(z[a++]=A[k++]))}else{k=a-x;do{z[a++]=z[k++],z[a++]=z[k++],z[a++]=z[k++],v-=3}while(v>2);v&&(z[a++]=z[k++],v>1&&(z[a++]=z[k++]))}break}}break}}while(i<r&&a<o);v=f>>3,i-=v,f-=v<<3,u&=(1<<f)-1,t.next_in=i,t.next_out=a,t.avail_in=i<r?r-i+5:5-(i-r),t.avail_out=a<o?o-a+257:257-(a-o),D.hold=u,D.bits=f}},447:(t,e,s)=>{const i=s(269),r=s(823),a=s(293),n=s(998),{Z_FINISH:o,Z_BLOCK:h,Z_TREES:l,Z_OK:d,Z_STREAM_END:_,Z_NEED_DICT:c,Z_STREAM_ERROR:u,Z_DATA_ERROR:f,Z_MEM_ERROR:p,Z_BUF_ERROR:w,Z_DEFLATED:g}=s(681),m=16180,b=16190,y=16191,v=16192,x=16194,k=16199,A=16200,R=16206,z=16209,D=16210,S=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function E(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const O=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<m||e.mode>16211?1:0},T=t=>{if(O(t))return u;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=m,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,d},U=t=>{if(O(t))return u;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,T(t)},Z=(t,e)=>{let s;if(O(t))return u;const i=t.state;return e<0?(s=0,e=-e):(s=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?u:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=s,i.wbits=e,U(t))},B=(t,e)=>{if(!t)return u;const s=new E;t.state=s,s.strm=t,s.window=null,s.mode=m;const i=Z(t,e);return i!==d&&(t.state=null),i};let I,F,P=!0;const C=t=>{if(P){I=new Int32Array(512),F=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(n(1,t.lens,0,288,I,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;n(2,t.lens,0,32,F,0,t.work,{bits:5}),P=!1}t.lencode=I,t.lenbits=9,t.distcode=F,t.distbits=5},L=(t,e,s,i)=>{let r;const a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),i>=a.wsize?(a.window.set(e.subarray(s-a.wsize,s),0),a.wnext=0,a.whave=a.wsize):(r=a.wsize-a.wnext,r>i&&(r=i),a.window.set(e.subarray(s-i,s-i+r),a.wnext),(i-=r)?(a.window.set(e.subarray(s-i,s),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0};t.exports.inflateReset=U,t.exports.inflateReset2=Z,t.exports.inflateResetKeep=T,t.exports.inflateInit=t=>B(t,15),t.exports.inflateInit2=B,t.exports.inflate=(t,e)=>{let s,E,T,U,Z,B,I,F,P,W,N,j,M,H,Y,V,G,K,J,$,X,q,Q=0;const tt=new Uint8Array(4);let et,st;const it=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(O(t)||!t.output||!t.input&&0!==t.avail_in)return u;s=t.state,s.mode===y&&(s.mode=v),Z=t.next_out,T=t.output,I=t.avail_out,U=t.next_in,E=t.input,B=t.avail_in,F=s.hold,P=s.bits,W=B,N=I,q=d;t:for(;;)switch(s.mode){case m:if(0===s.wrap){s.mode=v;break}for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(2&s.wrap&&35615===F){0===s.wbits&&(s.wbits=15),s.check=0,tt[0]=255&F,tt[1]=F>>>8&255,s.check=r(s.check,tt,2,0),F=0,P=0,s.mode=16181;break}if(s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&F)<<8)+(F>>8))%31){t.msg="incorrect header check",s.mode=z;break}if((15&F)!==g){t.msg="unknown compression method",s.mode=z;break}if(F>>>=4,P-=4,X=8+(15&F),0===s.wbits&&(s.wbits=X),X>15||X>s.wbits){t.msg="invalid window size",s.mode=z;break}s.dmax=1<<s.wbits,s.flags=0,t.adler=s.check=1,s.mode=512&F?16189:y,F=0,P=0;break;case 16181:for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(s.flags=F,(255&s.flags)!==g){t.msg="unknown compression method",s.mode=z;break}if(57344&s.flags){t.msg="unknown header flags set",s.mode=z;break}s.head&&(s.head.text=F>>8&1),512&s.flags&&4&s.wrap&&(tt[0]=255&F,tt[1]=F>>>8&255,s.check=r(s.check,tt,2,0)),F=0,P=0,s.mode=16182;case 16182:for(;P<32;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.head&&(s.head.time=F),512&s.flags&&4&s.wrap&&(tt[0]=255&F,tt[1]=F>>>8&255,tt[2]=F>>>16&255,tt[3]=F>>>24&255,s.check=r(s.check,tt,4,0)),F=0,P=0,s.mode=16183;case 16183:for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.head&&(s.head.xflags=255&F,s.head.os=F>>8),512&s.flags&&4&s.wrap&&(tt[0]=255&F,tt[1]=F>>>8&255,s.check=r(s.check,tt,2,0)),F=0,P=0,s.mode=16184;case 16184:if(1024&s.flags){for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.length=F,s.head&&(s.head.extra_len=F),512&s.flags&&4&s.wrap&&(tt[0]=255&F,tt[1]=F>>>8&255,s.check=r(s.check,tt,2,0)),F=0,P=0}else s.head&&(s.head.extra=null);s.mode=16185;case 16185:if(1024&s.flags&&(j=s.length,j>B&&(j=B),j&&(s.head&&(X=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(E.subarray(U,U+j),X)),512&s.flags&&4&s.wrap&&(s.check=r(s.check,E,j,U)),B-=j,U+=j,s.length-=j),s.length))break t;s.length=0,s.mode=16186;case 16186:if(2048&s.flags){if(0===B)break t;j=0;do{X=E[U+j++],s.head&&X&&s.length<65536&&(s.head.name+=String.fromCharCode(X))}while(X&&j<B);if(512&s.flags&&4&s.wrap&&(s.check=r(s.check,E,j,U)),B-=j,U+=j,X)break t}else s.head&&(s.head.name=null);s.length=0,s.mode=16187;case 16187:if(4096&s.flags){if(0===B)break t;j=0;do{X=E[U+j++],s.head&&X&&s.length<65536&&(s.head.comment+=String.fromCharCode(X))}while(X&&j<B);if(512&s.flags&&4&s.wrap&&(s.check=r(s.check,E,j,U)),B-=j,U+=j,X)break t}else s.head&&(s.head.comment=null);s.mode=16188;case 16188:if(512&s.flags){for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(4&s.wrap&&F!==(65535&s.check)){t.msg="header crc mismatch",s.mode=z;break}F=0,P=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),t.adler=s.check=0,s.mode=y;break;case 16189:for(;P<32;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}t.adler=s.check=S(F),F=0,P=0,s.mode=b;case b:if(0===s.havedict)return t.next_out=Z,t.avail_out=I,t.next_in=U,t.avail_in=B,s.hold=F,s.bits=P,c;t.adler=s.check=1,s.mode=y;case y:if(e===h||e===l)break t;case v:if(s.last){F>>>=7&P,P-=7&P,s.mode=R;break}for(;P<3;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}switch(s.last=1&F,F>>>=1,P-=1,3&F){case 0:s.mode=16193;break;case 1:if(C(s),s.mode=k,e===l){F>>>=2,P-=2;break t}break;case 2:s.mode=16196;break;case 3:t.msg="invalid block type",s.mode=z}F>>>=2,P-=2;break;case 16193:for(F>>>=7&P,P-=7&P;P<32;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if((65535&F)!=(F>>>16^65535)){t.msg="invalid stored block lengths",s.mode=z;break}if(s.length=65535&F,F=0,P=0,s.mode=x,e===l)break t;case x:s.mode=16195;case 16195:if(j=s.length,j){if(j>B&&(j=B),j>I&&(j=I),0===j)break t;T.set(E.subarray(U,U+j),Z),B-=j,U+=j,I-=j,Z+=j,s.length-=j;break}s.mode=y;break;case 16196:for(;P<14;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(s.nlen=257+(31&F),F>>>=5,P-=5,s.ndist=1+(31&F),F>>>=5,P-=5,s.ncode=4+(15&F),F>>>=4,P-=4,s.nlen>286||s.ndist>30){t.msg="too many length or distance symbols",s.mode=z;break}s.have=0,s.mode=16197;case 16197:for(;s.have<s.ncode;){for(;P<3;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.lens[it[s.have++]]=7&F,F>>>=3,P-=3}for(;s.have<19;)s.lens[it[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,et={bits:s.lenbits},q=n(0,s.lens,0,19,s.lencode,0,s.work,et),s.lenbits=et.bits,q){t.msg="invalid code lengths set",s.mode=z;break}s.have=0,s.mode=16198;case 16198:for(;s.have<s.nlen+s.ndist;){for(;Q=s.lencode[F&(1<<s.lenbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(G<16)F>>>=Y,P-=Y,s.lens[s.have++]=G;else{if(16===G){for(st=Y+2;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(F>>>=Y,P-=Y,0===s.have){t.msg="invalid bit length repeat",s.mode=z;break}X=s.lens[s.have-1],j=3+(3&F),F>>>=2,P-=2}else if(17===G){for(st=Y+3;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}F>>>=Y,P-=Y,X=0,j=3+(7&F),F>>>=3,P-=3}else{for(st=Y+7;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}F>>>=Y,P-=Y,X=0,j=11+(127&F),F>>>=7,P-=7}if(s.have+j>s.nlen+s.ndist){t.msg="invalid bit length repeat",s.mode=z;break}for(;j--;)s.lens[s.have++]=X}}if(s.mode===z)break;if(0===s.lens[256]){t.msg="invalid code -- missing end-of-block",s.mode=z;break}if(s.lenbits=9,et={bits:s.lenbits},q=n(1,s.lens,0,s.nlen,s.lencode,0,s.work,et),s.lenbits=et.bits,q){t.msg="invalid literal/lengths set",s.mode=z;break}if(s.distbits=6,s.distcode=s.distdyn,et={bits:s.distbits},q=n(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,et),s.distbits=et.bits,q){t.msg="invalid distances set",s.mode=z;break}if(s.mode=k,e===l)break t;case k:s.mode=A;case A:if(B>=6&&I>=258){t.next_out=Z,t.avail_out=I,t.next_in=U,t.avail_in=B,s.hold=F,s.bits=P,a(t,N),Z=t.next_out,T=t.output,I=t.avail_out,U=t.next_in,E=t.input,B=t.avail_in,F=s.hold,P=s.bits,s.mode===y&&(s.back=-1);break}for(s.back=0;Q=s.lencode[F&(1<<s.lenbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(V&&0==(240&V)){for(K=Y,J=V,$=G;Q=s.lencode[$+((F&(1<<K+J)-1)>>K)],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(K+Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}F>>>=K,P-=K,s.back+=K}if(F>>>=Y,P-=Y,s.back+=Y,s.length=G,0===V){s.mode=16205;break}if(32&V){s.back=-1,s.mode=y;break}if(64&V){t.msg="invalid literal/length code",s.mode=z;break}s.extra=15&V,s.mode=16201;case 16201:if(s.extra){for(st=s.extra;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.length+=F&(1<<s.extra)-1,F>>>=s.extra,P-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=16202;case 16202:for(;Q=s.distcode[F&(1<<s.distbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(0==(240&V)){for(K=Y,J=V,$=G;Q=s.distcode[$+((F&(1<<K+J)-1)>>K)],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(K+Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}F>>>=K,P-=K,s.back+=K}if(F>>>=Y,P-=Y,s.back+=Y,64&V){t.msg="invalid distance code",s.mode=z;break}s.offset=G,s.extra=15&V,s.mode=16203;case 16203:if(s.extra){for(st=s.extra;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.offset+=F&(1<<s.extra)-1,F>>>=s.extra,P-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){t.msg="invalid distance too far back",s.mode=z;break}s.mode=16204;case 16204:if(0===I)break t;if(j=N-I,s.offset>j){if(j=s.offset-j,j>s.whave&&s.sane){t.msg="invalid distance too far back",s.mode=z;break}j>s.wnext?(j-=s.wnext,M=s.wsize-j):M=s.wnext-j,j>s.length&&(j=s.length),H=s.window}else H=T,M=Z-s.offset,j=s.length;j>I&&(j=I),I-=j,s.length-=j;do{T[Z++]=H[M++]}while(--j);0===s.length&&(s.mode=A);break;case 16205:if(0===I)break t;T[Z++]=s.length,I--,s.mode=A;break;case R:if(s.wrap){for(;P<32;){if(0===B)break t;B--,F|=E[U++]<<P,P+=8}if(N-=I,t.total_out+=N,s.total+=N,4&s.wrap&&N&&(t.adler=s.check=s.flags?r(s.check,T,N,Z-N):i(s.check,T,N,Z-N)),N=I,4&s.wrap&&(s.flags?F:S(F))!==s.check){t.msg="incorrect data check",s.mode=z;break}F=0,P=0}s.mode=16207;case 16207:if(s.wrap&&s.flags){for(;P<32;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(4&s.wrap&&F!==(4294967295&s.total)){t.msg="incorrect length check",s.mode=z;break}F=0,P=0}s.mode=16208;case 16208:q=_;break t;case z:q=f;break t;case D:return p;default:return u}return t.next_out=Z,t.avail_out=I,t.next_in=U,t.avail_in=B,s.hold=F,s.bits=P,(s.wsize||N!==t.avail_out&&s.mode<z&&(s.mode<R||e!==o))&&L(t,t.output,t.next_out,N-t.avail_out)?(s.mode=D,p):(W-=t.avail_in,N-=t.avail_out,t.total_in+=W,t.total_out+=N,s.total+=N,4&s.wrap&&N&&(t.adler=s.check=s.flags?r(s.check,T,N,t.next_out-N):i(s.check,T,N,t.next_out-N)),t.data_type=s.bits+(s.last?64:0)+(s.mode===y?128:0)+(s.mode===k||s.mode===x?256:0),(0===W&&0===N||e===o)&&q===d&&(q=w),q)},t.exports.inflateEnd=t=>{if(O(t))return u;let e=t.state;return e.window&&(e.window=null),t.state=null,d},t.exports.inflateGetHeader=(t,e)=>{if(O(t))return u;const s=t.state;return 0==(2&s.wrap)?u:(s.head=e,e.done=!1,d)},t.exports.inflateSetDictionary=(t,e)=>{const s=e.length;let r,a,n;return O(t)?u:(r=t.state,0!==r.wrap&&r.mode!==b?u:r.mode===b&&(a=1,a=i(a,e,s,0),a!==r.check)?f:(n=L(t,e,s,s),n?(r.mode=D,p):(r.havedict=1,d)))},t.exports.inflateInfo="pako inflate (from Nodeca project)"},998:t=>{const e=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]),s=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]),i=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]),r=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]);t.exports=(t,a,n,o,h,l,d,_)=>{const c=_.bits;let u,f,p,w,g,m,b=0,y=0,v=0,x=0,k=0,A=0,R=0,z=0,D=0,S=0,E=null;const O=new Uint16Array(16),T=new Uint16Array(16);let U,Z,B,I=null;for(b=0;b<=15;b++)O[b]=0;for(y=0;y<o;y++)O[a[n+y]]++;for(k=c,x=15;x>=1&&0===O[x];x--);if(k>x&&(k=x),0===x)return h[l++]=20971520,h[l++]=20971520,_.bits=1,0;for(v=1;v<x&&0===O[v];v++);for(k<v&&(k=v),z=1,b=1;b<=15;b++)if(z<<=1,z-=O[b],z<0)return-1;if(z>0&&(0===t||1!==x))return-1;for(T[1]=0,b=1;b<15;b++)T[b+1]=T[b]+O[b];for(y=0;y<o;y++)0!==a[n+y]&&(d[T[a[n+y]]++]=y);if(0===t?(E=I=d,m=20):1===t?(E=e,I=s,m=257):(E=i,I=r,m=0),S=0,y=0,b=v,g=l,A=k,R=0,p=-1,D=1<<k,w=D-1,1===t&&D>852||2===t&&D>592)return 1;for(;;){U=b-R,d[y]+1<m?(Z=0,B=d[y]):d[y]>=m?(Z=I[d[y]-m],B=E[d[y]-m]):(Z=96,B=0),u=1<<b-R,f=1<<A,v=f;do{f-=u,h[g+(S>>R)+f]=U<<24|Z<<16|B|0}while(0!==f);for(u=1<<b-1;S&u;)u>>=1;if(0!==u?(S&=u-1,S+=u):S=0,y++,0==--O[b]){if(b===x)break;b=a[n+d[y]]}if(b>k&&(S&w)!==p){for(0===R&&(R=k),g+=v,A=b-R,z=1<<A;A+R<x&&(z-=O[A+R],!(z<=0));)A++,z<<=1;if(D+=1<<A,1===t&&D>852||2===t&&D>592)return 1;p=S&w,h[p]=k<<24|A<<16|g-l|0}}return 0!==S&&(h[g+S]=b-R<<24|64<<16|0),_.bits=k,0}},674:t=>{t.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"}},665:t=>{function e(t){let e=t.length;for(;--e>=0;)t[e]=0}const s=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]),i=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]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=new Array(576);e(n);const o=new Array(60);e(o);const h=new Array(512);e(h);const l=new Array(256);e(l);const d=new Array(29);e(d);const _=new Array(30);function c(t,e,s,i,r){this.static_tree=t,this.extra_bits=e,this.extra_base=s,this.elems=i,this.max_length=r,this.has_stree=t&&t.length}let u,f,p;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(_);const g=t=>t<256?h[t]:h[256+(t>>>7)],m=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},b=(t,e,s)=>{t.bi_valid>16-s?(t.bi_buf|=e<<t.bi_valid&65535,m(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=s-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=s)},y=(t,e,s)=>{b(t,s[2*e],s[2*e+1])},v=(t,e)=>{let s=0;do{s|=1&t,t>>>=1,s<<=1}while(--e>0);return s>>>1},x=(t,e,s)=>{const i=new Array(16);let r,a,n=0;for(r=1;r<=15;r++)n=n+s[r-1]<<1,i[r]=n;for(a=0;a<=e;a++){let e=t[2*a+1];0!==e&&(t[2*a]=v(i[e]++,e))}},k=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},A=t=>{t.bi_valid>8?m(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},R=(t,e,s,i)=>{const r=2*e,a=2*s;return t[r]<t[a]||t[r]===t[a]&&i[e]<=i[s]},z=(t,e,s)=>{const i=t.heap[s];let r=s<<1;for(;r<=t.heap_len&&(r<t.heap_len&&R(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!R(e,i,t.heap[r],t.depth));)t.heap[s]=t.heap[r],s=r,r<<=1;t.heap[s]=i},D=(t,e,r)=>{let a,n,o,h,c=0;if(0!==t.sym_next)do{a=255&t.pending_buf[t.sym_buf+c++],a+=(255&t.pending_buf[t.sym_buf+c++])<<8,n=t.pending_buf[t.sym_buf+c++],0===a?y(t,n,e):(o=l[n],y(t,o+256+1,e),h=s[o],0!==h&&(n-=d[o],b(t,n,h)),a--,o=g(a),y(t,o,r),h=i[o],0!==h&&(a-=_[o],b(t,a,h)))}while(c<t.sym_next);y(t,256,e)},S=(t,e)=>{const s=e.dyn_tree,i=e.stat_desc.static_tree,r=e.stat_desc.has_stree,a=e.stat_desc.elems;let n,o,h,l=-1;for(t.heap_len=0,t.heap_max=573,n=0;n<a;n++)0!==s[2*n]?(t.heap[++t.heap_len]=l=n,t.depth[n]=0):s[2*n+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=l<2?++l:0,s[2*h]=1,t.depth[h]=0,t.opt_len--,r&&(t.static_len-=i[2*h+1]);for(e.max_code=l,n=t.heap_len>>1;n>=1;n--)z(t,s,n);h=a;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],z(t,s,1),o=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=o,s[2*h]=s[2*n]+s[2*o],t.depth[h]=(t.depth[n]>=t.depth[o]?t.depth[n]:t.depth[o])+1,s[2*n+1]=s[2*o+1]=h,t.heap[1]=h++,z(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const s=e.dyn_tree,i=e.max_code,r=e.stat_desc.static_tree,a=e.stat_desc.has_stree,n=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let l,d,_,c,u,f,p=0;for(c=0;c<=15;c++)t.bl_count[c]=0;for(s[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;l<573;l++)d=t.heap[l],c=s[2*s[2*d+1]+1]+1,c>h&&(c=h,p++),s[2*d+1]=c,d>i||(t.bl_count[c]++,u=0,d>=o&&(u=n[d-o]),f=s[2*d],t.opt_len+=f*(c+u),a&&(t.static_len+=f*(r[2*d+1]+u)));if(0!==p){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,p-=2}while(p>0);for(c=h;0!==c;c--)for(d=t.bl_count[c];0!==d;)_=t.heap[--l],_>i||(s[2*_+1]!==c&&(t.opt_len+=(c-s[2*_+1])*s[2*_],s[2*_+1]=c),d--)}})(t,e),x(s,l,t.bl_count)},E=(t,e,s)=>{let i,r,a=-1,n=e[1],o=0,h=7,l=4;for(0===n&&(h=138,l=3),e[2*(s+1)+1]=65535,i=0;i<=s;i++)r=n,n=e[2*(i+1)+1],++o<h&&r===n||(o<l?t.bl_tree[2*r]+=o:0!==r?(r!==a&&t.bl_tree[2*r]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,a=r,0===n?(h=138,l=3):r===n?(h=6,l=3):(h=7,l=4))},O=(t,e,s)=>{let i,r,a=-1,n=e[1],o=0,h=7,l=4;for(0===n&&(h=138,l=3),i=0;i<=s;i++)if(r=n,n=e[2*(i+1)+1],!(++o<h&&r===n)){if(o<l)do{y(t,r,t.bl_tree)}while(0!=--o);else 0!==r?(r!==a&&(y(t,r,t.bl_tree),o--),y(t,16,t.bl_tree),b(t,o-3,2)):o<=10?(y(t,17,t.bl_tree),b(t,o-3,3)):(y(t,18,t.bl_tree),b(t,o-11,7));o=0,a=r,0===n?(h=138,l=3):r===n?(h=6,l=3):(h=7,l=4)}};let T=!1;const U=(t,e,s,i)=>{b(t,0+(i?1:0),3),A(t),m(t,s),m(t,~s),s&&t.pending_buf.set(t.window.subarray(e,e+s),t.pending),t.pending+=s};t.exports._tr_init=t=>{T||((()=>{let t,e,a,w,g;const m=new Array(16);for(a=0,w=0;w<28;w++)for(d[w]=a,t=0;t<1<<s[w];t++)l[a++]=w;for(l[a-1]=w,g=0,w=0;w<16;w++)for(_[w]=g,t=0;t<1<<i[w];t++)h[g++]=w;for(g>>=7;w<30;w++)for(_[w]=g<<7,t=0;t<1<<i[w]-7;t++)h[256+g++]=w;for(e=0;e<=15;e++)m[e]=0;for(t=0;t<=143;)n[2*t+1]=8,t++,m[8]++;for(;t<=255;)n[2*t+1]=9,t++,m[9]++;for(;t<=279;)n[2*t+1]=7,t++,m[7]++;for(;t<=287;)n[2*t+1]=8,t++,m[8]++;for(x(n,287,m),t=0;t<30;t++)o[2*t+1]=5,o[2*t]=v(t,5);u=new c(n,s,257,286,15),f=new c(o,i,0,30,15),p=new c(new Array(0),r,0,19,7)})(),T=!0),t.l_desc=new w(t.dyn_ltree,u),t.d_desc=new w(t.dyn_dtree,f),t.bl_desc=new w(t.bl_tree,p),t.bi_buf=0,t.bi_valid=0,k(t)},t.exports._tr_stored_block=U,t.exports._tr_flush_block=(t,e,s,i)=>{let r,h,l=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,s=4093624447;for(e=0;e<=31;e++,s>>>=1)if(1&s&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),S(t,t.l_desc),S(t,t.d_desc),l=(t=>{let e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),S(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*a[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),r=t.opt_len+3+7>>>3,h=t.static_len+3+7>>>3,h<=r&&(r=h)):r=h=s+5,s+4<=r&&-1!==e?U(t,e,s,i):4===t.strategy||h===r?(b(t,2+(i?1:0),3),D(t,n,o)):(b(t,4+(i?1:0),3),((t,e,s,i)=>{let r;for(b(t,e-257,5),b(t,s-1,5),b(t,i-4,4),r=0;r<i;r++)b(t,t.bl_tree[2*a[r]+1],3);O(t,t.dyn_ltree,e-1),O(t,t.dyn_dtree,s-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,l+1),D(t,t.dyn_ltree,t.dyn_dtree)),k(t),i&&A(t)},t.exports._tr_tally=(t,e,s)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=s,0===e?t.dyn_ltree[2*s]++:(t.matches++,e--,t.dyn_ltree[2*(l[s]+256+1)]++,t.dyn_dtree[2*g(e)]++),t.sym_next===t.sym_end),t.exports._tr_align=t=>{b(t,2,3),y(t,256,n),(t=>{16===t.bi_valid?(m(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},442:t=>{t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},504:(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteJsonParser=void 0;const i=s(418),r=s(657);e.AsepriteJsonParser=class{constructor(t,e){this.asepriteRaw=t,this.image=e,this._animations=new Map}getSpriteSheet(){return this._spriteSheet}getAnimations(){return this._animations}getAsepriteSheet(){return new r.AsepriteSpriteSheet(this.getSpriteSheet(),this.getAnimations())}parse(){const t=this.asepriteRaw,e=this.image;for(let s of t.meta.frameTags){let r=s.from,a=s.to,n=(0,i.range)(r,a),o=Object.values(t.frames).filter(((t,e)=>n.includes(e))).map((t=>({duration:t.duration,graphic:new i.Sprite({image:e,sourceView:{x:t.frame.x,y:t.frame.y,width:t.frame.w,height:t.frame.h},destSize:{width:t.frame.w,height:t.frame.h}})}))),h=i.AnimationStrategy.Loop;switch(s.direction){case"pingpong":h=i.AnimationStrategy.PingPong;break;case"reverse":o.reverse()}this._animations.set(s.name,new i.Animation({frames:o,strategy:h}))}const s=[];for(let r of Object.values(t.frames))s.push(new i.Sprite({image:e,sourceView:{x:r.frame.x,y:r.frame.y,width:r.frame.w,height:r.frame.h}}));this._spriteSheet=new i.SpriteSheet({sprites:s,rows:t.meta.size.h/s[0].height,columns:t.meta.size.w/s[0].width})}}},177:function(t,e,s){var i=this&&this.__awaiter||function(t,e,s,i){return new(s||(s=Promise))((function(r,a){function n(t){try{h(i.next(t))}catch(t){a(t)}}function o(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,o)}h((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteNativeParser=e.AnimationTypes=void 0;const r=s(418),a=s(668),n=s(657);e.AnimationTypes={Forward:0,Reverse:1,PingPong:2,PingPongReverse:3},e.AsepriteNativeParser=class{constructor(t){this.arraybuffer=t,this._cursor=0,this._colorDepth="RGBA",this._transparentIndex=0,this._frames=0,this._exFrames=[],this._sprites=[],this._tags=new Map,this._canvasFrames=[],this._indexedColors=new Map,this._currentLayer=0,this._layerData=new Map,this.height=0,this.width=0,this._dataView=new DataView(t)}parse(){return i(this,void 0,void 0,(function*(){this._parseHeader();for(let t=0;t<this._frames;t++){const t=document.createElement("canvas");t.width=this.width,t.height=this.height;const e=t.getContext("2d");e.imageSmoothingEnabled=!1,this._canvasFrames.push(e),yield this._parseFrame(e)}}))}getAsepriteSheet(){return new n.AsepriteSpriteSheet(this.getSpriteSheet(),this.getAnimations())}getFrames(){return this._exFrames}getSpriteSheet(){return new r.SpriteSheet({sprites:this._sprites})}getAnimations(){const t=new Map;for(let e of this._tags.keys())t.set(e,this.getAnimation(e));return t}getAnimation(t){const s=this._tags.get(t);if(!s)throw Error(`No animation by name [${t}] in aseprite file`);const i=this._exFrames.slice(s.from,s.to+1),a=s.type;let n=r.AnimationStrategy.Loop;a!==e.AnimationTypes.PingPong&&a!==e.AnimationTypes.PingPongReverse||(n=r.AnimationStrategy.PingPong);let o=!1;return a!==e.AnimationTypes.Reverse&&a!==e.AnimationTypes.PingPongReverse||(o=!0),new r.Animation({frames:i,strategy:n,reverse:o})}_parseFrame(t){return i(this,void 0,void 0,(function*(){this._readDWORD(),this._readWORD();const e=this._readWORD(),s=this._readWORD();this._readBYTE(),this._readBYTE();const i=this._readDWORD(),a=0===i?e:i;for(let e=0;e<a;e++)yield this._parseChunk(t);const n=t.canvas.toDataURL("image/png"),o=new r.ImageSource(n);yield o.load();const h=o.toSprite();this._sprites.push(h),this._exFrames.push({duration:s,graphic:h})}))}_parseChunk(t){var e;return i(this,void 0,void 0,(function*(){const s=this._cursor,i=this._readDWORD(),n=this._readWORD();if(8197===n){const r=this._readWORD(),n=this._layerData.get(r),o=this._readSHORT(),h=this._readSHORT(),l=this._readBYTE(),d=this._readWORD();if(this._readSHORT(),this._advanceBytes(5),0===d)throw Error("Unexpected raw image data");if(1===d){const e=this._readWORD(),s=this._canvasFrames[e];t.drawImage(s.canvas,0,0)}else if(2===d){const r=this._readWORD(),d=this._readWORD(),_=i-(this._cursor-s),c=this._readBytes(_),u=(0,a.inflate)(c),f=this._transformImageDataToRGBA(u),p=new Uint8ClampedArray(f),w=new ImageData(p,r,d),g=yield createImageBitmap(w);t.save(),t.globalAlpha=l/255*(null!==(e=null==n?void 0:n.opacity)&&void 0!==e?e:255)/255,t.drawImage(g,o,h),t.restore()}}else if(8216===n){const t=this._readWORD();this._advanceBytes(8);for(let e=0;e<t;e++){const t=this._readWORD(),e=this._readWORD(),s=this._readBYTE(),i=this._readWORD();this._advanceBytes(6),this._advanceBytes(3),this._advanceBytes(1);const r=this._readString();this._tags.set(r,{name:r,from:t,to:e,type:s,repeat:i})}}else if(8217===n){this._readDWORD();const t=this._readDWORD(),e=this._readDWORD();this._readBytes(8);for(let s=t;s<e-t+1;s++){const t=this._readWORD(),e=this._readBYTE(),i=this._readBYTE(),a=this._readBYTE(),n=this._readBYTE();this._indexedColors.set(s,new r.Color(e,i,a,n/255)),1===t&&this._readString()}}else if(8196===n){this._readWORD();const t=this._readWORD(),e=(this._readWORD(),this._readWORD(),this._readWORD(),this._readWORD(),this._readBYTE());this._advanceBytes(3);const s=this._readString();2===t&&this._readDWORD(),this._layerData.set(this._currentLayer++,{name:s,opacity:e})}else this._advanceBytes(i-6)}))}_parseHeader(){if(this._readDWORD(),42464!==this._readWORD())throw Error("Aseprite file corrupted! Header invalid");const t=this._readWORD();this._frames=t,this.width=this._readWORD(),this.height=this._readWORD();const e=this._readWORD();32===e?this._colorDepth="RGBA":16===e?this._colorDepth="Grayscale":8===e&&(this._colorDepth="Indexed"),this._readDWORD(),this._readWORD(),this._readDWORD(),this._readDWORD();const s=this._readBYTE();this._transparentIndex=s,this._advanceBytes(3),this._readWORD(),this._readBYTE(),this._readBYTE(),this._readSHORT(),this._readSHORT(),this._readWORD(),this._readWORD(),this._advanceBytes(84)}_transformImageDataToRGBA(t){var e;if("Grayscale"===this._colorDepth){const e=t.byteLength/2*4,s=new Uint8Array(e);for(let i=0;i<e;i+=4){const e=2*Math.floor(i/4);s[i+0]=t[e+0],s[i+1]=t[e+0],s[i+2]=t[e+0],s[i+3]=t[e+1]}return s}if("Indexed"===this._colorDepth){const s=4*t.byteLength,i=new Uint8Array(s);for(let a=0;a<s;a+=4){const s=Math.floor(a/4);let n=r.Color.Transparent;n=t[s]===this._transparentIndex?r.Color.Transparent:null!==(e=this._indexedColors.get(t[s]))&&void 0!==e?e:r.Color.Transparent,i[a+0]=n.r,i[a+1]=n.g,i[a+2]=n.b,i[a+3]=Math.ceil(255*n.a)}return i}return t}_readString(){const t=this._readWORD(),e=this._readBytes(t);return(new TextDecoder).decode(e)}_readBytes(t){const e=new Uint8Array(this.arraybuffer.slice(this._cursor,this._cursor+t));return this._cursor+=t,e}_readPixel(){var t;if("RGBA"===this._colorDepth){const t=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const e=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const s=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const i=this._dataView.getInt16(this._cursor,!0);return this._cursor+=2,new r.Color(t,e,s,i/255)}if("Grayscale"===this._colorDepth){const t=this._readBYTE(),e=this._readBYTE();return new r.Color(t,t,t,e/255)}if("Indexed"===this._colorDepth){const e=this._readBYTE();return null!==(t=this._indexedColors.get(e))&&void 0!==t?t:r.Color.Transparent}return r.Color.Transparent}_readFixed(){const t=this._dataView.getUint16(this._cursor,!0);this._cursor+=2;const e=this._dataView.getUint16(this._cursor,!0);return this._cursor+=2,parseFloat(t+"."+e)}_readDWORD(){const t=this._dataView.getUint32(this._cursor,!0);return this._cursor+=4,t}_readWORD(){const t=this._dataView.getUint16(this._cursor,!0);return this._cursor+=2,t}_readSHORT(){const t=this._dataView.getInt16(this._cursor,!0);return this._cursor+=2,t}_readBYTE(){const t=this._dataView.getUint8(this._cursor);return this._cursor+=1,t}_advanceBytes(t){this._cursor+=t}}},661:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteRawJson=void 0,e.AsepriteRawJson=class{}},313:function(t,e,s){var i=this&&this.__awaiter||function(t,e,s,i){return new(s||(s=Promise))((function(r,a){function n(t){try{h(i.next(t))}catch(t){a(t)}}function o(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,o)}h((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteResource=void 0;const r=s(418),a=s(177),n=s(504);class o{_hasFileExtension(t,e){const s=/.*\.([A-Za-z0-9]+)(?:(?:\?|\#).*)*$/;if(t){const i=t.match(s);if(null==i?void 0:i.length)return i[1]===e}return!1}constructor(t,e=!1){this.bustCache=e,this._type="native",this._path=t,this._hasFileExtension(t,"ase")||this._hasFileExtension(t,"aseprite")?(this._nativeResource=new r.Resource(t,"arraybuffer",e),this._type="native"):(this._jsonResource=new r.Resource(t,"json",e),this._type="json"),this.convertPath=(t,e)=>{if(0===e.indexOf("/"))return e;const s=t.split("/"),i=e.split("/");return s[s.length-1].includes(".")&&s.pop(),s.concat(i).join("/")}}load(){var t;return i(this,void 0,void 0,(function*(){if("json"===this._type&&this._jsonResource){const t=yield this._jsonResource.load(),e=this.convertPath(this._jsonResource.path,t.meta.image),s=new r.ImageSource(e,this.bustCache);return yield s.load(),this._jsonParser=new n.AsepriteJsonParser(t,s),this._jsonParser.parse(),this.data=this._jsonParser.getAsepriteSheet()}{const e=yield null===(t=this._nativeResource)||void 0===t?void 0:t.load();if(!e)throw Error(`Could not load aseprite resource ${this._path}`);return this._nativeParser=new a.AsepriteNativeParser(e),yield this._nativeParser.parse(),this.data=this._nativeParser.getAsepriteSheet()}}))}getSpriteSheet(){if(this.isLoaded())return this.data.getSpriteSheet();r.Logger.getInstance().warn("AsepriteResource must be loaded before .getSpriteSheet() is called")}getAnimation(t){return this.isLoaded()?"json"===this._type?this.data.getAnimation(t):this._nativeParser.getAnimation(t):(r.Logger.getInstance().warn("AsepriteResource must be loaded before .getAnimation() is called"),null)}clone(){const t=new o(this._path,this.bustCache);return t.data=this.data.clone(),t}isLoaded(){return!!this.data}}e.AsepriteResource=o},657:(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteSpriteSheet=void 0;const i=s(418);class r{constructor(t,e){this.animations=e,this._spriteSheet=t}getSpriteSheet(){return this._spriteSheet}getAnimation(t){if(!this.animations.has(t))throw new Error(`No animation exists with name ${t}, check your exported Aseprite file`);return this.animations.get(t)}clone(){const t=new Map;for(let[e,s]of this.animations.entries())t.set(e,s.clone());const e=new i.SpriteSheet({sprites:this._spriteSheet.sprites,rows:this._spriteSheet.rows,columns:this._spriteSheet.columns});return new r(e,t)}}e.AsepriteSpriteSheet=r},156:function(t,e,s){var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(e,s);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,r)}:function(t,e,s,i){void 0===i&&(i=s),t[i]=e[s]}),r=this&&this.__exportStar||function(t,e){for(var s in t)"default"===s||Object.prototype.hasOwnProperty.call(e,s)||i(e,t,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(s(661),e),r(s(313),e),r(s(657),e),r(s(504),e),r(s(177),e)},418:e=>{e.exports=t}},s={};return function t(i){var r=s[i];if(void 0!==r)return r.exports;var a=s[i]={exports:{}};return e[i].call(a.exports,a,a.exports,t),a.exports}(156)})()));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("excalibur")):"function"==typeof define&&define.amd?define(["excalibur"],e):"object"==typeof exports?exports.ex=e(require("excalibur")):(t.ex=t.ex||{},t.ex.Plugin=t.ex.Plugin||{},t.ex.Plugin.Aseprite=e(t.ex))}(self,(t=>(()=>{"use strict";var e={668:(t,e,s)=>{const{Deflate:i,deflate:a,deflateRaw:r,gzip:n}=s(303),{Inflate:o,inflate:h,inflateRaw:l,ungzip:d}=s(83),_=s(681);t.exports.Deflate=i,t.exports.deflate=a,t.exports.deflateRaw=r,t.exports.gzip=n,t.exports.Inflate=o,t.exports.inflate=h,t.exports.inflateRaw=l,t.exports.ungzip=d,t.exports.constants=_},303:(t,e,s)=>{const i=s(411),a=s(805),r=s(996),n=s(674),o=s(442),h=Object.prototype.toString,{Z_NO_FLUSH:l,Z_SYNC_FLUSH:d,Z_FULL_FLUSH:_,Z_FINISH:c,Z_OK:u,Z_STREAM_END:f,Z_DEFAULT_COMPRESSION:p,Z_DEFAULT_STRATEGY:w,Z_DEFLATED:m}=s(681);function g(t){this.options=a.assign({level:p,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:w},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;let s=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(s!==u)throw new Error(n[s]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?r.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,s=i.deflateSetDictionary(this.strm,t),s!==u)throw new Error(n[s]);this._dict_set=!0}}function b(t,e){const s=new g(e);if(s.push(t,!0),s.err)throw s.msg||n[s.err];return s.result}g.prototype.push=function(t,e){const s=this.strm,a=this.options.chunkSize;let n,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?c:l,"string"==typeof t?s.input=r.string2buf(t):"[object ArrayBuffer]"===h.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;)if(0===s.avail_out&&(s.output=new Uint8Array(a),s.next_out=0,s.avail_out=a),(o===d||o===_)&&s.avail_out<=6)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else{if(n=i.deflate(s,o),n===f)return s.next_out>0&&this.onData(s.output.subarray(0,s.next_out)),n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===u;if(0!==s.avail_out){if(o>0&&s.next_out>0)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else if(0===s.avail_in)break}else this.onData(s.output)}return!0},g.prototype.onData=function(t){this.chunks.push(t)},g.prototype.onEnd=function(t){t===u&&(this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Deflate=g,t.exports.deflate=b,t.exports.deflateRaw=function(t,e){return(e=e||{}).raw=!0,b(t,e)},t.exports.gzip=function(t,e){return(e=e||{}).gzip=!0,b(t,e)},t.exports.constants=s(681)},83:(t,e,s)=>{const i=s(447),a=s(805),r=s(996),n=s(674),o=s(442),h=s(414),l=Object.prototype.toString,{Z_NO_FLUSH:d,Z_FINISH:_,Z_OK:c,Z_STREAM_END:u,Z_NEED_DICT:f,Z_STREAM_ERROR:p,Z_DATA_ERROR:w,Z_MEM_ERROR:m}=s(681);function g(t){this.options=a.assign({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;let s=i.inflateInit2(this.strm,e.windowBits);if(s!==c)throw new Error(n[s]);if(this.header=new h,i.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=r.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(s=i.inflateSetDictionary(this.strm,e.dictionary),s!==c)))throw new Error(n[s])}function b(t,e){const s=new g(e);if(s.push(t),s.err)throw s.msg||n[s.err];return s.result}g.prototype.push=function(t,e){const s=this.strm,a=this.options.chunkSize,n=this.options.dictionary;let o,h,g;if(this.ended)return!1;for(h=e===~~e?e:!0===e?_:d,"[object ArrayBuffer]"===l.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(a),s.next_out=0,s.avail_out=a),o=i.inflate(s,h),o===f&&n&&(o=i.inflateSetDictionary(s,n),o===c?o=i.inflate(s,h):o===w&&(o=f));s.avail_in>0&&o===u&&s.state.wrap>0&&0!==t[s.next_in];)i.inflateReset(s),o=i.inflate(s,h);switch(o){case p:case w:case f:case m:return this.onEnd(o),this.ended=!0,!1}if(g=s.avail_out,s.next_out&&(0===s.avail_out||o===u))if("string"===this.options.to){let t=r.utf8border(s.output,s.next_out),e=s.next_out-t,i=r.buf2string(s.output,t);s.next_out=e,s.avail_out=a-e,e&&s.output.set(s.output.subarray(t,t+e),0),this.onData(i)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(o!==c||0!==g){if(o===u)return o=i.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},g.prototype.onData=function(t){this.chunks.push(t)},g.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Inflate=g,t.exports.inflate=b,t.exports.inflateRaw=function(t,e){return(e=e||{}).raw=!0,b(t,e)},t.exports.ungzip=b,t.exports.constants=s(681)},805:t=>{const e=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);t.exports.assign=function(t){const s=Array.prototype.slice.call(arguments,1);for(;s.length;){const i=s.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const s in i)e(i,s)&&(t[s]=i[s])}}return t},t.exports.flattenChunks=t=>{let e=0;for(let s=0,i=t.length;s<i;s++)e+=t[s].length;const s=new Uint8Array(e);for(let e=0,i=0,a=t.length;e<a;e++){let a=t[e];s.set(a,i),i+=a.length}return s}},996:t=>{let e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){e=!1}const s=new Uint8Array(256);for(let t=0;t<256;t++)s[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;s[254]=s[254]=1,t.exports.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,s,i,a,r,n=t.length,o=0;for(a=0;a<n;a++)s=t.charCodeAt(a),55296==(64512&s)&&a+1<n&&(i=t.charCodeAt(a+1),56320==(64512&i)&&(s=65536+(s-55296<<10)+(i-56320),a++)),o+=s<128?1:s<2048?2:s<65536?3:4;for(e=new Uint8Array(o),r=0,a=0;r<o;a++)s=t.charCodeAt(a),55296==(64512&s)&&a+1<n&&(i=t.charCodeAt(a+1),56320==(64512&i)&&(s=65536+(s-55296<<10)+(i-56320),a++)),s<128?e[r++]=s:s<2048?(e[r++]=192|s>>>6,e[r++]=128|63&s):s<65536?(e[r++]=224|s>>>12,e[r++]=128|s>>>6&63,e[r++]=128|63&s):(e[r++]=240|s>>>18,e[r++]=128|s>>>12&63,e[r++]=128|s>>>6&63,e[r++]=128|63&s);return e},t.exports.buf2string=(t,i)=>{const a=i||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,i));let r,n;const o=new Array(2*a);for(n=0,r=0;r<a;){let e=t[r++];if(e<128){o[n++]=e;continue}let i=s[e];if(i>4)o[n++]=65533,r+=i-1;else{for(e&=2===i?31:3===i?15:7;i>1&&r<a;)e=e<<6|63&t[r++],i--;i>1?o[n++]=65533:e<65536?o[n++]=e:(e-=65536,o[n++]=55296|e>>10&1023,o[n++]=56320|1023&e)}}return((t,s)=>{if(s<65534&&t.subarray&&e)return String.fromCharCode.apply(null,t.length===s?t:t.subarray(0,s));let i="";for(let e=0;e<s;e++)i+=String.fromCharCode(t[e]);return i})(o,n)},t.exports.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let i=e-1;for(;i>=0&&128==(192&t[i]);)i--;return i<0||0===i?e:i+s[t[i]]>e?i:e}},269:t=>{t.exports=(t,e,s,i)=>{let a=65535&t,r=t>>>16&65535,n=0;for(;0!==s;){n=s>2e3?2e3:s,s-=n;do{a=a+e[i++]|0,r=r+a|0}while(--n);a%=65521,r%=65521}return a|r<<16}},681:t=>{t.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}},823:t=>{const e=new Uint32Array((()=>{let t,e=[];for(var s=0;s<256;s++){t=s;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[s]=t}return e})());t.exports=(t,s,i,a)=>{const r=e,n=a+i;t^=-1;for(let e=a;e<n;e++)t=t>>>8^r[255&(t^s[e])];return~t}},411:(t,e,s)=>{const{_tr_init:i,_tr_stored_block:a,_tr_flush_block:r,_tr_tally:n,_tr_align:o}=s(665),h=s(269),l=s(823),d=s(674),{Z_NO_FLUSH:_,Z_PARTIAL_FLUSH:c,Z_FULL_FLUSH:u,Z_FINISH:f,Z_BLOCK:p,Z_OK:w,Z_STREAM_END:m,Z_STREAM_ERROR:g,Z_DATA_ERROR:b,Z_BUF_ERROR:v,Z_DEFAULT_COMPRESSION:y,Z_FILTERED:x,Z_HUFFMAN_ONLY:k,Z_RLE:R,Z_FIXED:A,Z_DEFAULT_STRATEGY:z,Z_UNKNOWN:D,Z_DEFLATED:S}=s(681),E=258,O=262,T=42,U=113,Z=666,B=(t,e)=>(t.msg=d[e],e),F=t=>2*t-(t>4?9:0),I=t=>{let e=t.length;for(;--e>=0;)t[e]=0},C=t=>{let e,s,i,a=t.w_size;e=t.hash_size,i=e;do{s=t.head[--i],t.head[i]=s>=a?s-a:0}while(--e);e=a,i=e;do{s=t.prev[--i],t.prev[i]=s>=a?s-a:0}while(--e)};let L=(t,e,s)=>(e<<t.hash_shift^s)&t.hash_mask;const P=t=>{const e=t.state;let s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+s),t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))},W=(t,e)=>{r(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,P(t.strm)},N=(t,e)=>{t.pending_buf[t.pending++]=e},j=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},M=(t,e,s,i)=>{let a=t.avail_in;return a>i&&(a=i),0===a?0:(t.avail_in-=a,e.set(t.input.subarray(t.next_in,t.next_in+a),s),1===t.state.wrap?t.adler=h(t.adler,e,a,s):2===t.state.wrap&&(t.adler=l(t.adler,e,a,s)),t.next_in+=a,t.total_in+=a,a)},H=(t,e)=>{let s,i,a=t.max_chain_length,r=t.strstart,n=t.prev_length,o=t.nice_match;const h=t.strstart>t.w_size-O?t.strstart-(t.w_size-O):0,l=t.window,d=t.w_mask,_=t.prev,c=t.strstart+E;let u=l[r+n-1],f=l[r+n];t.prev_length>=t.good_match&&(a>>=2),o>t.lookahead&&(o=t.lookahead);do{if(s=e,l[s+n]===f&&l[s+n-1]===u&&l[s]===l[r]&&l[++s]===l[r+1]){r+=2,s++;do{}while(l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&r<c);if(i=E-(c-r),r=c-E,i>n){if(t.match_start=e,n=i,i>=o)break;u=l[r+n-1],f=l[r+n]}}}while((e=_[e&d])>h&&0!=--a);return n<=t.lookahead?n:t.lookahead},Y=t=>{const e=t.w_size;let s,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-O)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),C(t),i+=e),0===t.strm.avail_in)break;if(s=M(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=s,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=L(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=L(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<O&&0!==t.strm.avail_in)},V=(t,e)=>{let s,i,r,n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o=0,h=t.strm.avail_in;do{if(s=65535,r=t.bi_valid+42>>3,t.strm.avail_out<r)break;if(r=t.strm.avail_out-r,i=t.strstart-t.block_start,s>i+t.strm.avail_in&&(s=i+t.strm.avail_in),s>r&&(s=r),s<n&&(0===s&&e!==f||e===_||s!==i+t.strm.avail_in))break;o=e===f&&s===i+t.strm.avail_in?1:0,a(t,0,0,o),t.pending_buf[t.pending-4]=s,t.pending_buf[t.pending-3]=s>>8,t.pending_buf[t.pending-2]=~s,t.pending_buf[t.pending-1]=~s>>8,P(t.strm),i&&(i>s&&(i=s),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,s-=i),s&&(M(t.strm,t.strm.output,t.strm.next_out,s),t.strm.next_out+=s,t.strm.avail_out-=s,t.strm.total_out+=s)}while(0===o);return h-=t.strm.avail_in,h&&(h>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=h&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-h,t.strm.next_in),t.strstart),t.strstart+=h,t.insert+=h>t.w_size-t.insert?t.w_size-t.insert:h),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?4:e!==_&&e!==f&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(r=t.window_size-t.strstart,t.strm.avail_in>r&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,r+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),r>t.strm.avail_in&&(r=t.strm.avail_in),r&&(M(t.strm,t.window,t.strstart,r),t.strstart+=r,t.insert+=r>t.w_size-t.insert?t.w_size-t.insert:r),t.high_water<t.strstart&&(t.high_water=t.strstart),r=t.bi_valid+42>>3,r=t.pending_buf_size-r>65535?65535:t.pending_buf_size-r,n=r>t.w_size?t.w_size:r,i=t.strstart-t.block_start,(i>=n||(i||e===f)&&e!==_&&0===t.strm.avail_in&&i<=r)&&(s=i>r?r:i,o=e===f&&0===t.strm.avail_in&&s===i?1:0,a(t,t.block_start,s,o),t.block_start+=s,P(t.strm)),o?3:1)},G=(t,e)=>{let s,i;for(;;){if(t.lookahead<O){if(Y(t),t.lookahead<O&&e===_)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==s&&t.strstart-s<=t.w_size-O&&(t.match_length=H(t,s)),t.match_length>=3)if(i=n(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=L(t,t.ins_h,t.window[t.strstart+1]);else i=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2},K=(t,e)=>{let s,i,a;for(;;){if(t.lookahead<O){if(Y(t),t.lookahead<O&&e===_)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==s&&t.prev_length<t.max_lazy_match&&t.strstart-s<=t.w_size-O&&(t.match_length=H(t,s),t.match_length<=5&&(t.strategy===x||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){a=t.strstart+t.lookahead-3,i=n(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=a&&(t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(W(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=n(t,0,t.window[t.strstart-1]),i&&W(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=n(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2};function J(t,e,s,i,a){this.good_length=t,this.max_lazy=e,this.nice_length=s,this.max_chain=i,this.func=a}const $=[new J(0,0,0,0,V),new J(4,4,8,4,G),new J(4,5,16,8,G),new J(4,6,32,32,G),new J(4,4,16,16,K),new J(8,16,32,32,K),new J(8,16,128,128,K),new J(8,32,128,256,K),new J(32,128,258,1024,K),new J(32,258,258,4096,K)];function X(){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=S,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(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),I(this.dyn_ltree),I(this.dyn_dtree),I(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),I(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),I(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 q=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==T&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==U&&e.status!==Z?1:0},Q=t=>{if(q(t))return B(t,g);t.total_in=t.total_out=0,t.data_type=D;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?T:U,t.adler=2===e.wrap?0:1,e.last_flush=-2,i(e),w},tt=t=>{const e=Q(t);var s;return e===w&&((s=t.state).window_size=2*s.w_size,I(s.head),s.max_lazy_match=$[s.level].max_lazy,s.good_match=$[s.level].good_length,s.nice_match=$[s.level].nice_length,s.max_chain_length=$[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=2,s.match_available=0,s.ins_h=0),e},et=(t,e,s,i,a,r)=>{if(!t)return g;let n=1;if(e===y&&(e=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),a<1||a>9||s!==S||i<8||i>15||e<0||e>9||r<0||r>A||8===i&&1!==n)return B(t,g);8===i&&(i=9);const o=new X;return t.state=o,o.strm=t,o.status=T,o.wrap=n,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=a+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<a+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=r,o.method=s,tt(t)};t.exports.deflateInit=(t,e)=>et(t,e,S,15,8,z),t.exports.deflateInit2=et,t.exports.deflateReset=tt,t.exports.deflateResetKeep=Q,t.exports.deflateSetHeader=(t,e)=>q(t)||2!==t.state.wrap?g:(t.state.gzhead=e,w),t.exports.deflate=(t,e)=>{if(q(t)||e>p||e<0)return t?B(t,g):g;const s=t.state;if(!t.output||0!==t.avail_in&&!t.input||s.status===Z&&e!==f)return B(t,0===t.avail_out?v:g);const i=s.last_flush;if(s.last_flush=e,0!==s.pending){if(P(t),0===t.avail_out)return s.last_flush=-1,w}else if(0===t.avail_in&&F(e)<=F(i)&&e!==f)return B(t,v);if(s.status===Z&&0!==t.avail_in)return B(t,v);if(s.status===T&&0===s.wrap&&(s.status=U),s.status===T){let e=S+(s.w_bits-8<<4)<<8,i=-1;if(i=s.strategy>=k||s.level<2?0:s.level<6?1:6===s.level?2:3,e|=i<<6,0!==s.strstart&&(e|=32),e+=31-e%31,j(s,e),0!==s.strstart&&(j(s,t.adler>>>16),j(s,65535&t.adler)),t.adler=1,s.status=U,P(t),0!==s.pending)return s.last_flush=-1,w}if(57===s.status)if(t.adler=0,N(s,31),N(s,139),N(s,8),s.gzhead)N(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),N(s,255&s.gzhead.time),N(s,s.gzhead.time>>8&255),N(s,s.gzhead.time>>16&255),N(s,s.gzhead.time>>24&255),N(s,9===s.level?2:s.strategy>=k||s.level<2?4:0),N(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(N(s,255&s.gzhead.extra.length),N(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=l(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(N(s,0),N(s,0),N(s,0),N(s,0),N(s,0),N(s,9===s.level?2:s.strategy>=k||s.level<2?4:0),N(s,3),s.status=U,P(t),0!==s.pending)return s.last_flush=-1,w;if(69===s.status){if(s.gzhead.extra){let e=s.pending,i=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+i>s.pending_buf_size;){let a=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+a),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=l(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=a,P(t),0!==s.pending)return s.last_flush=-1,w;e=0,i-=a}let a=new Uint8Array(s.gzhead.extra);s.pending_buf.set(a.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending+=i,s.gzhead.hcrc&&s.pending>e&&(t.adler=l(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),P(t),0!==s.pending)return s.last_flush=-1,w;i=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,N(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),P(t),0!==s.pending)return s.last_flush=-1,w;i=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,N(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(P(t),0!==s.pending))return s.last_flush=-1,w;N(s,255&t.adler),N(s,t.adler>>8&255),t.adler=0}if(s.status=U,P(t),0!==s.pending)return s.last_flush=-1,w}if(0!==t.avail_in||0!==s.lookahead||e!==_&&s.status!==Z){let i=0===s.level?V(s,e):s.strategy===k?((t,e)=>{let s;for(;;){if(0===t.lookahead&&(Y(t),0===t.lookahead)){if(e===_)return 1;break}if(t.match_length=0,s=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2})(s,e):s.strategy===R?((t,e)=>{let s,i,a,r;const o=t.window;for(;;){if(t.lookahead<=E){if(Y(t),t.lookahead<=E&&e===_)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(a=t.strstart-1,i=o[a],i===o[++a]&&i===o[++a]&&i===o[++a])){r=t.strstart+E;do{}while(i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&a<r);t.match_length=E-(r-a),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(s=n(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2})(s,e):$[s.level].func(s,e);if(3!==i&&4!==i||(s.status=Z),1===i||3===i)return 0===t.avail_out&&(s.last_flush=-1),w;if(2===i&&(e===c?o(s):e!==p&&(a(s,0,0,!1),e===u&&(I(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),P(t),0===t.avail_out))return s.last_flush=-1,w}return e!==f?w:s.wrap<=0?m:(2===s.wrap?(N(s,255&t.adler),N(s,t.adler>>8&255),N(s,t.adler>>16&255),N(s,t.adler>>24&255),N(s,255&t.total_in),N(s,t.total_in>>8&255),N(s,t.total_in>>16&255),N(s,t.total_in>>24&255)):(j(s,t.adler>>>16),j(s,65535&t.adler)),P(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?w:m)},t.exports.deflateEnd=t=>{if(q(t))return g;const e=t.state.status;return t.state=null,e===U?B(t,b):w},t.exports.deflateSetDictionary=(t,e)=>{let s=e.length;if(q(t))return g;const i=t.state,a=i.wrap;if(2===a||1===a&&i.status!==T||i.lookahead)return g;if(1===a&&(t.adler=h(t.adler,e,s,0)),i.wrap=0,s>=i.w_size){0===a&&(I(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(s-i.w_size,s),0),e=t,s=i.w_size}const r=t.avail_in,n=t.next_in,o=t.input;for(t.avail_in=s,t.next_in=0,t.input=e,Y(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=L(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,Y(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=n,t.input=o,t.avail_in=r,i.wrap=a,w},t.exports.deflateInfo="pako deflate (from Nodeca project)"},414:t=>{t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},293:t=>{const e=16209;t.exports=function(t,s){let i,a,r,n,o,h,l,d,_,c,u,f,p,w,m,g,b,v,y,x,k,R,A,z;const D=t.state;i=t.next_in,A=t.input,a=i+(t.avail_in-5),r=t.next_out,z=t.output,n=r-(s-t.avail_out),o=r+(t.avail_out-257),h=D.dmax,l=D.wsize,d=D.whave,_=D.wnext,c=D.window,u=D.hold,f=D.bits,p=D.lencode,w=D.distcode,m=(1<<D.lenbits)-1,g=(1<<D.distbits)-1;t:do{f<15&&(u+=A[i++]<<f,f+=8,u+=A[i++]<<f,f+=8),b=p[u&m];e:for(;;){if(v=b>>>24,u>>>=v,f-=v,v=b>>>16&255,0===v)z[r++]=65535&b;else{if(!(16&v)){if(64&v){if(32&v){D.mode=16191;break t}t.msg="invalid literal/length code",D.mode=e;break t}b=p[(65535&b)+(u&(1<<v)-1)];continue e}for(y=65535&b,v&=15,v&&(f<v&&(u+=A[i++]<<f,f+=8),y+=u&(1<<v)-1,u>>>=v,f-=v),f<15&&(u+=A[i++]<<f,f+=8,u+=A[i++]<<f,f+=8),b=w[u&g];;){if(v=b>>>24,u>>>=v,f-=v,v=b>>>16&255,16&v){if(x=65535&b,v&=15,f<v&&(u+=A[i++]<<f,f+=8,f<v&&(u+=A[i++]<<f,f+=8)),x+=u&(1<<v)-1,x>h){t.msg="invalid distance too far back",D.mode=e;break t}if(u>>>=v,f-=v,v=r-n,x>v){if(v=x-v,v>d&&D.sane){t.msg="invalid distance too far back",D.mode=e;break t}if(k=0,R=c,0===_){if(k+=l-v,v<y){y-=v;do{z[r++]=c[k++]}while(--v);k=r-x,R=z}}else if(_<v){if(k+=l+_-v,v-=_,v<y){y-=v;do{z[r++]=c[k++]}while(--v);if(k=0,_<y){v=_,y-=v;do{z[r++]=c[k++]}while(--v);k=r-x,R=z}}}else if(k+=_-v,v<y){y-=v;do{z[r++]=c[k++]}while(--v);k=r-x,R=z}for(;y>2;)z[r++]=R[k++],z[r++]=R[k++],z[r++]=R[k++],y-=3;y&&(z[r++]=R[k++],y>1&&(z[r++]=R[k++]))}else{k=r-x;do{z[r++]=z[k++],z[r++]=z[k++],z[r++]=z[k++],y-=3}while(y>2);y&&(z[r++]=z[k++],y>1&&(z[r++]=z[k++]))}break}if(64&v){t.msg="invalid distance code",D.mode=e;break t}b=w[(65535&b)+(u&(1<<v)-1)]}}break}}while(i<a&&r<o);y=f>>3,i-=y,f-=y<<3,u&=(1<<f)-1,t.next_in=i,t.next_out=r,t.avail_in=i<a?a-i+5:5-(i-a),t.avail_out=r<o?o-r+257:257-(r-o),D.hold=u,D.bits=f}},447:(t,e,s)=>{const i=s(269),a=s(823),r=s(293),n=s(998),{Z_FINISH:o,Z_BLOCK:h,Z_TREES:l,Z_OK:d,Z_STREAM_END:_,Z_NEED_DICT:c,Z_STREAM_ERROR:u,Z_DATA_ERROR:f,Z_MEM_ERROR:p,Z_BUF_ERROR:w,Z_DEFLATED:m}=s(681),g=16180,b=16190,v=16191,y=16192,x=16194,k=16199,R=16200,A=16206,z=16209,D=16210,S=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function E(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const O=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<g||e.mode>16211?1:0},T=t=>{if(O(t))return u;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=g,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,d},U=t=>{if(O(t))return u;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,T(t)},Z=(t,e)=>{let s;if(O(t))return u;const i=t.state;return e<0?(s=0,e=-e):(s=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?u:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=s,i.wbits=e,U(t))},B=(t,e)=>{if(!t)return u;const s=new E;t.state=s,s.strm=t,s.window=null,s.mode=g;const i=Z(t,e);return i!==d&&(t.state=null),i};let F,I,C=!0;const L=t=>{if(C){F=new Int32Array(512),I=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(n(1,t.lens,0,288,F,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;n(2,t.lens,0,32,I,0,t.work,{bits:5}),C=!1}t.lencode=F,t.lenbits=9,t.distcode=I,t.distbits=5},P=(t,e,s,i)=>{let a;const r=t.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),i>=r.wsize?(r.window.set(e.subarray(s-r.wsize,s),0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>i&&(a=i),r.window.set(e.subarray(s-i,s-i+a),r.wnext),(i-=a)?(r.window.set(e.subarray(s-i,s),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0};t.exports.inflateReset=U,t.exports.inflateReset2=Z,t.exports.inflateResetKeep=T,t.exports.inflateInit=t=>B(t,15),t.exports.inflateInit2=B,t.exports.inflate=(t,e)=>{let s,E,T,U,Z,B,F,I,C,W,N,j,M,H,Y,V,G,K,J,$,X,q,Q=0;const tt=new Uint8Array(4);let et,st;const it=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(O(t)||!t.output||!t.input&&0!==t.avail_in)return u;s=t.state,s.mode===v&&(s.mode=y),Z=t.next_out,T=t.output,F=t.avail_out,U=t.next_in,E=t.input,B=t.avail_in,I=s.hold,C=s.bits,W=B,N=F,q=d;t:for(;;)switch(s.mode){case g:if(0===s.wrap){s.mode=y;break}for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(2&s.wrap&&35615===I){0===s.wbits&&(s.wbits=15),s.check=0,tt[0]=255&I,tt[1]=I>>>8&255,s.check=a(s.check,tt,2,0),I=0,C=0,s.mode=16181;break}if(s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&I)<<8)+(I>>8))%31){t.msg="incorrect header check",s.mode=z;break}if((15&I)!==m){t.msg="unknown compression method",s.mode=z;break}if(I>>>=4,C-=4,X=8+(15&I),0===s.wbits&&(s.wbits=X),X>15||X>s.wbits){t.msg="invalid window size",s.mode=z;break}s.dmax=1<<s.wbits,s.flags=0,t.adler=s.check=1,s.mode=512&I?16189:v,I=0,C=0;break;case 16181:for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(s.flags=I,(255&s.flags)!==m){t.msg="unknown compression method",s.mode=z;break}if(57344&s.flags){t.msg="unknown header flags set",s.mode=z;break}s.head&&(s.head.text=I>>8&1),512&s.flags&&4&s.wrap&&(tt[0]=255&I,tt[1]=I>>>8&255,s.check=a(s.check,tt,2,0)),I=0,C=0,s.mode=16182;case 16182:for(;C<32;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.head&&(s.head.time=I),512&s.flags&&4&s.wrap&&(tt[0]=255&I,tt[1]=I>>>8&255,tt[2]=I>>>16&255,tt[3]=I>>>24&255,s.check=a(s.check,tt,4,0)),I=0,C=0,s.mode=16183;case 16183:for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.head&&(s.head.xflags=255&I,s.head.os=I>>8),512&s.flags&&4&s.wrap&&(tt[0]=255&I,tt[1]=I>>>8&255,s.check=a(s.check,tt,2,0)),I=0,C=0,s.mode=16184;case 16184:if(1024&s.flags){for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.length=I,s.head&&(s.head.extra_len=I),512&s.flags&&4&s.wrap&&(tt[0]=255&I,tt[1]=I>>>8&255,s.check=a(s.check,tt,2,0)),I=0,C=0}else s.head&&(s.head.extra=null);s.mode=16185;case 16185:if(1024&s.flags&&(j=s.length,j>B&&(j=B),j&&(s.head&&(X=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(E.subarray(U,U+j),X)),512&s.flags&&4&s.wrap&&(s.check=a(s.check,E,j,U)),B-=j,U+=j,s.length-=j),s.length))break t;s.length=0,s.mode=16186;case 16186:if(2048&s.flags){if(0===B)break t;j=0;do{X=E[U+j++],s.head&&X&&s.length<65536&&(s.head.name+=String.fromCharCode(X))}while(X&&j<B);if(512&s.flags&&4&s.wrap&&(s.check=a(s.check,E,j,U)),B-=j,U+=j,X)break t}else s.head&&(s.head.name=null);s.length=0,s.mode=16187;case 16187:if(4096&s.flags){if(0===B)break t;j=0;do{X=E[U+j++],s.head&&X&&s.length<65536&&(s.head.comment+=String.fromCharCode(X))}while(X&&j<B);if(512&s.flags&&4&s.wrap&&(s.check=a(s.check,E,j,U)),B-=j,U+=j,X)break t}else s.head&&(s.head.comment=null);s.mode=16188;case 16188:if(512&s.flags){for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(4&s.wrap&&I!==(65535&s.check)){t.msg="header crc mismatch",s.mode=z;break}I=0,C=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),t.adler=s.check=0,s.mode=v;break;case 16189:for(;C<32;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}t.adler=s.check=S(I),I=0,C=0,s.mode=b;case b:if(0===s.havedict)return t.next_out=Z,t.avail_out=F,t.next_in=U,t.avail_in=B,s.hold=I,s.bits=C,c;t.adler=s.check=1,s.mode=v;case v:if(e===h||e===l)break t;case y:if(s.last){I>>>=7&C,C-=7&C,s.mode=A;break}for(;C<3;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}switch(s.last=1&I,I>>>=1,C-=1,3&I){case 0:s.mode=16193;break;case 1:if(L(s),s.mode=k,e===l){I>>>=2,C-=2;break t}break;case 2:s.mode=16196;break;case 3:t.msg="invalid block type",s.mode=z}I>>>=2,C-=2;break;case 16193:for(I>>>=7&C,C-=7&C;C<32;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if((65535&I)!=(I>>>16^65535)){t.msg="invalid stored block lengths",s.mode=z;break}if(s.length=65535&I,I=0,C=0,s.mode=x,e===l)break t;case x:s.mode=16195;case 16195:if(j=s.length,j){if(j>B&&(j=B),j>F&&(j=F),0===j)break t;T.set(E.subarray(U,U+j),Z),B-=j,U+=j,F-=j,Z+=j,s.length-=j;break}s.mode=v;break;case 16196:for(;C<14;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(s.nlen=257+(31&I),I>>>=5,C-=5,s.ndist=1+(31&I),I>>>=5,C-=5,s.ncode=4+(15&I),I>>>=4,C-=4,s.nlen>286||s.ndist>30){t.msg="too many length or distance symbols",s.mode=z;break}s.have=0,s.mode=16197;case 16197:for(;s.have<s.ncode;){for(;C<3;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.lens[it[s.have++]]=7&I,I>>>=3,C-=3}for(;s.have<19;)s.lens[it[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,et={bits:s.lenbits},q=n(0,s.lens,0,19,s.lencode,0,s.work,et),s.lenbits=et.bits,q){t.msg="invalid code lengths set",s.mode=z;break}s.have=0,s.mode=16198;case 16198:for(;s.have<s.nlen+s.ndist;){for(;Q=s.lencode[I&(1<<s.lenbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(G<16)I>>>=Y,C-=Y,s.lens[s.have++]=G;else{if(16===G){for(st=Y+2;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(I>>>=Y,C-=Y,0===s.have){t.msg="invalid bit length repeat",s.mode=z;break}X=s.lens[s.have-1],j=3+(3&I),I>>>=2,C-=2}else if(17===G){for(st=Y+3;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}I>>>=Y,C-=Y,X=0,j=3+(7&I),I>>>=3,C-=3}else{for(st=Y+7;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}I>>>=Y,C-=Y,X=0,j=11+(127&I),I>>>=7,C-=7}if(s.have+j>s.nlen+s.ndist){t.msg="invalid bit length repeat",s.mode=z;break}for(;j--;)s.lens[s.have++]=X}}if(s.mode===z)break;if(0===s.lens[256]){t.msg="invalid code -- missing end-of-block",s.mode=z;break}if(s.lenbits=9,et={bits:s.lenbits},q=n(1,s.lens,0,s.nlen,s.lencode,0,s.work,et),s.lenbits=et.bits,q){t.msg="invalid literal/lengths set",s.mode=z;break}if(s.distbits=6,s.distcode=s.distdyn,et={bits:s.distbits},q=n(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,et),s.distbits=et.bits,q){t.msg="invalid distances set",s.mode=z;break}if(s.mode=k,e===l)break t;case k:s.mode=R;case R:if(B>=6&&F>=258){t.next_out=Z,t.avail_out=F,t.next_in=U,t.avail_in=B,s.hold=I,s.bits=C,r(t,N),Z=t.next_out,T=t.output,F=t.avail_out,U=t.next_in,E=t.input,B=t.avail_in,I=s.hold,C=s.bits,s.mode===v&&(s.back=-1);break}for(s.back=0;Q=s.lencode[I&(1<<s.lenbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(V&&!(240&V)){for(K=Y,J=V,$=G;Q=s.lencode[$+((I&(1<<K+J)-1)>>K)],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(K+Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}I>>>=K,C-=K,s.back+=K}if(I>>>=Y,C-=Y,s.back+=Y,s.length=G,0===V){s.mode=16205;break}if(32&V){s.back=-1,s.mode=v;break}if(64&V){t.msg="invalid literal/length code",s.mode=z;break}s.extra=15&V,s.mode=16201;case 16201:if(s.extra){for(st=s.extra;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.length+=I&(1<<s.extra)-1,I>>>=s.extra,C-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=16202;case 16202:for(;Q=s.distcode[I&(1<<s.distbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(!(240&V)){for(K=Y,J=V,$=G;Q=s.distcode[$+((I&(1<<K+J)-1)>>K)],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(K+Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}I>>>=K,C-=K,s.back+=K}if(I>>>=Y,C-=Y,s.back+=Y,64&V){t.msg="invalid distance code",s.mode=z;break}s.offset=G,s.extra=15&V,s.mode=16203;case 16203:if(s.extra){for(st=s.extra;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.offset+=I&(1<<s.extra)-1,I>>>=s.extra,C-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){t.msg="invalid distance too far back",s.mode=z;break}s.mode=16204;case 16204:if(0===F)break t;if(j=N-F,s.offset>j){if(j=s.offset-j,j>s.whave&&s.sane){t.msg="invalid distance too far back",s.mode=z;break}j>s.wnext?(j-=s.wnext,M=s.wsize-j):M=s.wnext-j,j>s.length&&(j=s.length),H=s.window}else H=T,M=Z-s.offset,j=s.length;j>F&&(j=F),F-=j,s.length-=j;do{T[Z++]=H[M++]}while(--j);0===s.length&&(s.mode=R);break;case 16205:if(0===F)break t;T[Z++]=s.length,F--,s.mode=R;break;case A:if(s.wrap){for(;C<32;){if(0===B)break t;B--,I|=E[U++]<<C,C+=8}if(N-=F,t.total_out+=N,s.total+=N,4&s.wrap&&N&&(t.adler=s.check=s.flags?a(s.check,T,N,Z-N):i(s.check,T,N,Z-N)),N=F,4&s.wrap&&(s.flags?I:S(I))!==s.check){t.msg="incorrect data check",s.mode=z;break}I=0,C=0}s.mode=16207;case 16207:if(s.wrap&&s.flags){for(;C<32;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(4&s.wrap&&I!==(4294967295&s.total)){t.msg="incorrect length check",s.mode=z;break}I=0,C=0}s.mode=16208;case 16208:q=_;break t;case z:q=f;break t;case D:return p;default:return u}return t.next_out=Z,t.avail_out=F,t.next_in=U,t.avail_in=B,s.hold=I,s.bits=C,(s.wsize||N!==t.avail_out&&s.mode<z&&(s.mode<A||e!==o))&&P(t,t.output,t.next_out,N-t.avail_out)?(s.mode=D,p):(W-=t.avail_in,N-=t.avail_out,t.total_in+=W,t.total_out+=N,s.total+=N,4&s.wrap&&N&&(t.adler=s.check=s.flags?a(s.check,T,N,t.next_out-N):i(s.check,T,N,t.next_out-N)),t.data_type=s.bits+(s.last?64:0)+(s.mode===v?128:0)+(s.mode===k||s.mode===x?256:0),(0===W&&0===N||e===o)&&q===d&&(q=w),q)},t.exports.inflateEnd=t=>{if(O(t))return u;let e=t.state;return e.window&&(e.window=null),t.state=null,d},t.exports.inflateGetHeader=(t,e)=>{if(O(t))return u;const s=t.state;return 2&s.wrap?(s.head=e,e.done=!1,d):u},t.exports.inflateSetDictionary=(t,e)=>{const s=e.length;let a,r,n;return O(t)?u:(a=t.state,0!==a.wrap&&a.mode!==b?u:a.mode===b&&(r=1,r=i(r,e,s,0),r!==a.check)?f:(n=P(t,e,s,s),n?(a.mode=D,p):(a.havedict=1,d)))},t.exports.inflateInfo="pako inflate (from Nodeca project)"},998:t=>{const e=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]),s=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]),i=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]),a=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]);t.exports=(t,r,n,o,h,l,d,_)=>{const c=_.bits;let u,f,p,w,m,g,b=0,v=0,y=0,x=0,k=0,R=0,A=0,z=0,D=0,S=0,E=null;const O=new Uint16Array(16),T=new Uint16Array(16);let U,Z,B,F=null;for(b=0;b<=15;b++)O[b]=0;for(v=0;v<o;v++)O[r[n+v]]++;for(k=c,x=15;x>=1&&0===O[x];x--);if(k>x&&(k=x),0===x)return h[l++]=20971520,h[l++]=20971520,_.bits=1,0;for(y=1;y<x&&0===O[y];y++);for(k<y&&(k=y),z=1,b=1;b<=15;b++)if(z<<=1,z-=O[b],z<0)return-1;if(z>0&&(0===t||1!==x))return-1;for(T[1]=0,b=1;b<15;b++)T[b+1]=T[b]+O[b];for(v=0;v<o;v++)0!==r[n+v]&&(d[T[r[n+v]]++]=v);if(0===t?(E=F=d,g=20):1===t?(E=e,F=s,g=257):(E=i,F=a,g=0),S=0,v=0,b=y,m=l,R=k,A=0,p=-1,D=1<<k,w=D-1,1===t&&D>852||2===t&&D>592)return 1;for(;;){U=b-A,d[v]+1<g?(Z=0,B=d[v]):d[v]>=g?(Z=F[d[v]-g],B=E[d[v]-g]):(Z=96,B=0),u=1<<b-A,f=1<<R,y=f;do{f-=u,h[m+(S>>A)+f]=U<<24|Z<<16|B}while(0!==f);for(u=1<<b-1;S&u;)u>>=1;if(0!==u?(S&=u-1,S+=u):S=0,v++,0==--O[b]){if(b===x)break;b=r[n+d[v]]}if(b>k&&(S&w)!==p){for(0===A&&(A=k),m+=y,R=b-A,z=1<<R;R+A<x&&(z-=O[R+A],!(z<=0));)R++,z<<=1;if(D+=1<<R,1===t&&D>852||2===t&&D>592)return 1;p=S&w,h[p]=k<<24|R<<16|m-l}}return 0!==S&&(h[m+S]=b-A<<24|64<<16),_.bits=k,0}},674:t=>{t.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"}},665:t=>{function e(t){let e=t.length;for(;--e>=0;)t[e]=0}const s=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]),i=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]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),r=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=new Array(576);e(n);const o=new Array(60);e(o);const h=new Array(512);e(h);const l=new Array(256);e(l);const d=new Array(29);e(d);const _=new Array(30);function c(t,e,s,i,a){this.static_tree=t,this.extra_bits=e,this.extra_base=s,this.elems=i,this.max_length=a,this.has_stree=t&&t.length}let u,f,p;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(_);const m=t=>t<256?h[t]:h[256+(t>>>7)],g=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},b=(t,e,s)=>{t.bi_valid>16-s?(t.bi_buf|=e<<t.bi_valid&65535,g(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=s-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=s)},v=(t,e,s)=>{b(t,s[2*e],s[2*e+1])},y=(t,e)=>{let s=0;do{s|=1&t,t>>>=1,s<<=1}while(--e>0);return s>>>1},x=(t,e,s)=>{const i=new Array(16);let a,r,n=0;for(a=1;a<=15;a++)n=n+s[a-1]<<1,i[a]=n;for(r=0;r<=e;r++){let e=t[2*r+1];0!==e&&(t[2*r]=y(i[e]++,e))}},k=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},R=t=>{t.bi_valid>8?g(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=(t,e,s,i)=>{const a=2*e,r=2*s;return t[a]<t[r]||t[a]===t[r]&&i[e]<=i[s]},z=(t,e,s)=>{const i=t.heap[s];let a=s<<1;for(;a<=t.heap_len&&(a<t.heap_len&&A(e,t.heap[a+1],t.heap[a],t.depth)&&a++,!A(e,i,t.heap[a],t.depth));)t.heap[s]=t.heap[a],s=a,a<<=1;t.heap[s]=i},D=(t,e,a)=>{let r,n,o,h,c=0;if(0!==t.sym_next)do{r=255&t.pending_buf[t.sym_buf+c++],r+=(255&t.pending_buf[t.sym_buf+c++])<<8,n=t.pending_buf[t.sym_buf+c++],0===r?v(t,n,e):(o=l[n],v(t,o+256+1,e),h=s[o],0!==h&&(n-=d[o],b(t,n,h)),r--,o=m(r),v(t,o,a),h=i[o],0!==h&&(r-=_[o],b(t,r,h)))}while(c<t.sym_next);v(t,256,e)},S=(t,e)=>{const s=e.dyn_tree,i=e.stat_desc.static_tree,a=e.stat_desc.has_stree,r=e.stat_desc.elems;let n,o,h,l=-1;for(t.heap_len=0,t.heap_max=573,n=0;n<r;n++)0!==s[2*n]?(t.heap[++t.heap_len]=l=n,t.depth[n]=0):s[2*n+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=l<2?++l:0,s[2*h]=1,t.depth[h]=0,t.opt_len--,a&&(t.static_len-=i[2*h+1]);for(e.max_code=l,n=t.heap_len>>1;n>=1;n--)z(t,s,n);h=r;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],z(t,s,1),o=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=o,s[2*h]=s[2*n]+s[2*o],t.depth[h]=(t.depth[n]>=t.depth[o]?t.depth[n]:t.depth[o])+1,s[2*n+1]=s[2*o+1]=h,t.heap[1]=h++,z(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const s=e.dyn_tree,i=e.max_code,a=e.stat_desc.static_tree,r=e.stat_desc.has_stree,n=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let l,d,_,c,u,f,p=0;for(c=0;c<=15;c++)t.bl_count[c]=0;for(s[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;l<573;l++)d=t.heap[l],c=s[2*s[2*d+1]+1]+1,c>h&&(c=h,p++),s[2*d+1]=c,d>i||(t.bl_count[c]++,u=0,d>=o&&(u=n[d-o]),f=s[2*d],t.opt_len+=f*(c+u),r&&(t.static_len+=f*(a[2*d+1]+u)));if(0!==p){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,p-=2}while(p>0);for(c=h;0!==c;c--)for(d=t.bl_count[c];0!==d;)_=t.heap[--l],_>i||(s[2*_+1]!==c&&(t.opt_len+=(c-s[2*_+1])*s[2*_],s[2*_+1]=c),d--)}})(t,e),x(s,l,t.bl_count)},E=(t,e,s)=>{let i,a,r=-1,n=e[1],o=0,h=7,l=4;for(0===n&&(h=138,l=3),e[2*(s+1)+1]=65535,i=0;i<=s;i++)a=n,n=e[2*(i+1)+1],++o<h&&a===n||(o<l?t.bl_tree[2*a]+=o:0!==a?(a!==r&&t.bl_tree[2*a]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,r=a,0===n?(h=138,l=3):a===n?(h=6,l=3):(h=7,l=4))},O=(t,e,s)=>{let i,a,r=-1,n=e[1],o=0,h=7,l=4;for(0===n&&(h=138,l=3),i=0;i<=s;i++)if(a=n,n=e[2*(i+1)+1],!(++o<h&&a===n)){if(o<l)do{v(t,a,t.bl_tree)}while(0!=--o);else 0!==a?(a!==r&&(v(t,a,t.bl_tree),o--),v(t,16,t.bl_tree),b(t,o-3,2)):o<=10?(v(t,17,t.bl_tree),b(t,o-3,3)):(v(t,18,t.bl_tree),b(t,o-11,7));o=0,r=a,0===n?(h=138,l=3):a===n?(h=6,l=3):(h=7,l=4)}};let T=!1;const U=(t,e,s,i)=>{b(t,0+(i?1:0),3),R(t),g(t,s),g(t,~s),s&&t.pending_buf.set(t.window.subarray(e,e+s),t.pending),t.pending+=s};t.exports._tr_init=t=>{T||((()=>{let t,e,r,w,m;const g=new Array(16);for(r=0,w=0;w<28;w++)for(d[w]=r,t=0;t<1<<s[w];t++)l[r++]=w;for(l[r-1]=w,m=0,w=0;w<16;w++)for(_[w]=m,t=0;t<1<<i[w];t++)h[m++]=w;for(m>>=7;w<30;w++)for(_[w]=m<<7,t=0;t<1<<i[w]-7;t++)h[256+m++]=w;for(e=0;e<=15;e++)g[e]=0;for(t=0;t<=143;)n[2*t+1]=8,t++,g[8]++;for(;t<=255;)n[2*t+1]=9,t++,g[9]++;for(;t<=279;)n[2*t+1]=7,t++,g[7]++;for(;t<=287;)n[2*t+1]=8,t++,g[8]++;for(x(n,287,g),t=0;t<30;t++)o[2*t+1]=5,o[2*t]=y(t,5);u=new c(n,s,257,286,15),f=new c(o,i,0,30,15),p=new c(new Array(0),a,0,19,7)})(),T=!0),t.l_desc=new w(t.dyn_ltree,u),t.d_desc=new w(t.dyn_dtree,f),t.bl_desc=new w(t.bl_tree,p),t.bi_buf=0,t.bi_valid=0,k(t)},t.exports._tr_stored_block=U,t.exports._tr_flush_block=(t,e,s,i)=>{let a,h,l=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,s=4093624447;for(e=0;e<=31;e++,s>>>=1)if(1&s&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),S(t,t.l_desc),S(t,t.d_desc),l=(t=>{let e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),S(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*r[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),a=t.opt_len+3+7>>>3,h=t.static_len+3+7>>>3,h<=a&&(a=h)):a=h=s+5,s+4<=a&&-1!==e?U(t,e,s,i):4===t.strategy||h===a?(b(t,2+(i?1:0),3),D(t,n,o)):(b(t,4+(i?1:0),3),((t,e,s,i)=>{let a;for(b(t,e-257,5),b(t,s-1,5),b(t,i-4,4),a=0;a<i;a++)b(t,t.bl_tree[2*r[a]+1],3);O(t,t.dyn_ltree,e-1),O(t,t.dyn_dtree,s-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,l+1),D(t,t.dyn_ltree,t.dyn_dtree)),k(t),i&&R(t)},t.exports._tr_tally=(t,e,s)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=s,0===e?t.dyn_ltree[2*s]++:(t.matches++,e--,t.dyn_ltree[2*(l[s]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),t.exports._tr_align=t=>{b(t,2,3),v(t,256,n),(t=>{16===t.bi_valid?(g(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},442:t=>{t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},504:(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteJsonParser=void 0;const i=s(418),a=s(657);e.AsepriteJsonParser=class{constructor(t,e){this.asepriteRaw=t,this.image=e,this._animations=new Map}getSpriteSheet(){return this._spriteSheet}getAnimations(){return this._animations}getAsepriteSheet(){return new a.AsepriteSpriteSheet(this.getSpriteSheet(),this.getAnimations())}_parseRawToFrames(t,e,s){const a=this.image,r=(0,i.range)(t,e);return Object.values(this.asepriteRaw.frames).filter(((t,e)=>r.includes(e))).map((t=>({duration:t.duration,graphic:new i.Sprite({image:a,sourceView:{x:t.frame.x,y:t.frame.y,width:t.frame.w,height:t.frame.h},destSize:{width:t.frame.w,height:t.frame.h}})})))}parse(){const t=this.asepriteRaw,e=this.image;this._animations.set("ex.___all",new i.Animation({frames:this._parseRawToFrames(0,Object.entries(this.asepriteRaw.frames).length-1,this.asepriteRaw.frames),strategy:i.AnimationStrategy.Loop}));for(let e of t.meta.frameTags){let s=e.from,a=e.to,r=this._parseRawToFrames(s,a,t.frames),n=i.AnimationStrategy.Loop;switch(e.direction){case"pingpong":n=i.AnimationStrategy.PingPong;break;case"reverse":r.reverse()}this._animations.set(e.name,new i.Animation({frames:r,strategy:n}))}const s=[];for(let a of Object.values(t.frames))s.push(new i.Sprite({image:e,sourceView:{x:a.frame.x,y:a.frame.y,width:a.frame.w,height:a.frame.h}}));this._spriteSheet=new i.SpriteSheet({sprites:s,rows:t.meta.size.h/s[0].height,columns:t.meta.size.w/s[0].width})}}},177:function(t,e,s){var i=this&&this.__awaiter||function(t,e,s,i){return new(s||(s=Promise))((function(a,r){function n(t){try{h(i.next(t))}catch(t){r(t)}}function o(t){try{h(i.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?a(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,o)}h((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteNativeParser=e.AnimationTypes=void 0;const a=s(418),r=s(668),n=s(657);e.AnimationTypes={Forward:0,Reverse:1,PingPong:2,PingPongReverse:3},e.AsepriteNativeParser=class{constructor(t){this.arraybuffer=t,this._cursor=0,this._colorDepth="RGBA",this._transparentIndex=0,this._frames=0,this._exFrames=[],this._sprites=[],this._tags=new Map,this._canvasFrames=[],this._indexedColors=new Map,this._currentLayer=0,this._layerData=new Map,this.height=0,this.width=0,this._animationCache=new Map,this._dataView=new DataView(t)}parse(){return i(this,void 0,void 0,(function*(){this._parseHeader();for(let t=0;t<this._frames;t++){const t=document.createElement("canvas");t.width=this.width,t.height=this.height;const e=t.getContext("2d");e.imageSmoothingEnabled=!1,this._canvasFrames.push(e),yield this._parseFrame(e)}}))}getAsepriteSheet(){return new n.AsepriteSpriteSheet(this.getSpriteSheet(),this.getAnimations())}getFrames(){return this._exFrames}getSpriteSheet(){return new a.SpriteSheet({sprites:this._sprites})}getAnimations(){const t=new Map;for(let e of this._tags.keys())t.set(e,this.getAnimation(e));return t}getAnimation(t){if(t&&this._animationCache.has(t))return this._animationCache.get(t);let s,i=e.AnimationTypes.Forward;if(t){const e=this._tags.get(t);if(!e)throw Error(`No animation by name [${t}] in aseprite file`);s=this._exFrames.slice(e.from,e.to+1),i=e.type}else s=this._exFrames;let r=a.AnimationStrategy.Loop;i!==e.AnimationTypes.PingPong&&i!==e.AnimationTypes.PingPongReverse||(r=a.AnimationStrategy.PingPong);let n=!1;i!==e.AnimationTypes.Reverse&&i!==e.AnimationTypes.PingPongReverse||(n=!0);const o=new a.Animation({frames:s,strategy:r,reverse:n});return t&&this._animationCache.set(t,o),o}_parseFrame(t){return i(this,void 0,void 0,(function*(){this._readDWORD(),this._readWORD();const e=this._readWORD(),s=this._readWORD();this._readBYTE(),this._readBYTE();const i=this._readDWORD(),r=0===i?e:i;for(let e=0;e<r;e++)yield this._parseChunk(t);const n=t.canvas.toDataURL("image/png"),o=new a.ImageSource(n);yield o.load();const h=o.toSprite();this._sprites.push(h),this._exFrames.push({duration:s,graphic:h})}))}_parseChunk(t){var e;return i(this,void 0,void 0,(function*(){const s=this._cursor,i=this._readDWORD(),n=this._readWORD();if(8197===n){const a=this._readWORD(),n=this._layerData.get(a),o=this._readSHORT(),h=this._readSHORT(),l=this._readBYTE(),d=this._readWORD();if(this._readSHORT(),this._advanceBytes(5),0===d)throw Error("Unexpected raw image data");if(1===d){const e=this._readWORD(),s=this._canvasFrames[e];(null==n?void 0:n.visible)&&(t.save(),t.drawImage(s.canvas,0,0),t.restore())}else if(2===d){const a=this._readWORD(),d=this._readWORD(),_=i-(this._cursor-s),c=this._readBytes(_),u=(0,r.inflate)(c),f=this._transformImageDataToRGBA(u),p=new Uint8ClampedArray(f),w=new ImageData(p,a,d),m=yield createImageBitmap(w);(null==n?void 0:n.visible)&&(t.save(),t.globalAlpha=l/255*(null!==(e=null==n?void 0:n.opacity)&&void 0!==e?e:255)/255,t.drawImage(m,o,h),t.restore())}}else if(8216===n){const t=this._readWORD();this._advanceBytes(8);for(let e=0;e<t;e++){const t=this._readWORD(),e=this._readWORD(),s=this._readBYTE(),i=this._readWORD();this._advanceBytes(6),this._advanceBytes(3),this._advanceBytes(1);const a=this._readString();this._tags.set(a,{name:a,from:t,to:e,type:s,repeat:i})}}else if(8217===n){this._readDWORD();const t=this._readDWORD(),e=this._readDWORD();this._readBytes(8);for(let s=t;s<e-t+1;s++){const t=this._readWORD(),e=this._readBYTE(),i=this._readBYTE(),r=this._readBYTE(),n=this._readBYTE();this._indexedColors.set(s,new a.Color(e,i,r,n/255)),1===t&&this._readString()}}else if(8196===n){const t=!(1&~this._readWORD()),e=this._readWORD(),s=(this._readWORD(),this._readWORD(),this._readWORD(),this._readWORD(),this._readBYTE());this._advanceBytes(3);const i=this._readString();2===e&&this._readDWORD(),this._layerData.set(this._currentLayer++,{name:i,opacity:s,visible:t})}else this._advanceBytes(i-6)}))}_parseHeader(){if(this._readDWORD(),42464!==this._readWORD())throw Error("Aseprite file corrupted! Header invalid");const t=this._readWORD();this._frames=t,this.width=this._readWORD(),this.height=this._readWORD();const e=this._readWORD();32===e?this._colorDepth="RGBA":16===e?this._colorDepth="Grayscale":8===e&&(this._colorDepth="Indexed"),this._readDWORD(),this._readWORD(),this._readDWORD(),this._readDWORD();const s=this._readBYTE();this._transparentIndex=s,this._advanceBytes(3),this._readWORD(),this._readBYTE(),this._readBYTE(),this._readSHORT(),this._readSHORT(),this._readWORD(),this._readWORD(),this._advanceBytes(84)}_transformImageDataToRGBA(t){var e;if("Grayscale"===this._colorDepth){const e=t.byteLength/2*4,s=new Uint8Array(e);for(let i=0;i<e;i+=4){const e=2*Math.floor(i/4);s[i+0]=t[e+0],s[i+1]=t[e+0],s[i+2]=t[e+0],s[i+3]=t[e+1]}return s}if("Indexed"===this._colorDepth){const s=4*t.byteLength,i=new Uint8Array(s);for(let r=0;r<s;r+=4){const s=Math.floor(r/4);let n=a.Color.Transparent;n=t[s]===this._transparentIndex?a.Color.Transparent:null!==(e=this._indexedColors.get(t[s]))&&void 0!==e?e:a.Color.Transparent,i[r+0]=n.r,i[r+1]=n.g,i[r+2]=n.b,i[r+3]=Math.ceil(255*n.a)}return i}return t}_readString(){const t=this._readWORD(),e=this._readBytes(t);return(new TextDecoder).decode(e)}_readBytes(t){const e=new Uint8Array(this.arraybuffer.slice(this._cursor,this._cursor+t));return this._cursor+=t,e}_readPixel(){var t;if("RGBA"===this._colorDepth){const t=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const e=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const s=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const i=this._dataView.getInt16(this._cursor,!0);return this._cursor+=2,new a.Color(t,e,s,i/255)}if("Grayscale"===this._colorDepth){const t=this._readBYTE(),e=this._readBYTE();return new a.Color(t,t,t,e/255)}if("Indexed"===this._colorDepth){const e=this._readBYTE();return null!==(t=this._indexedColors.get(e))&&void 0!==t?t:a.Color.Transparent}return a.Color.Transparent}_readFixed(){const t=this._dataView.getUint16(this._cursor,!0);this._cursor+=2;const e=this._dataView.getUint16(this._cursor,!0);return this._cursor+=2,parseFloat(t+"."+e)}_readDWORD(){const t=this._dataView.getUint32(this._cursor,!0);return this._cursor+=4,t}_readWORD(){const t=this._dataView.getUint16(this._cursor,!0);return this._cursor+=2,t}_readSHORT(){const t=this._dataView.getInt16(this._cursor,!0);return this._cursor+=2,t}_readBYTE(){const t=this._dataView.getUint8(this._cursor);return this._cursor+=1,t}_advanceBytes(t){this._cursor+=t}}},661:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteRawJson=void 0,e.AsepriteRawJson=class{}},313:function(t,e,s){var i=this&&this.__awaiter||function(t,e,s,i){return new(s||(s=Promise))((function(a,r){function n(t){try{h(i.next(t))}catch(t){r(t)}}function o(t){try{h(i.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?a(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,o)}h((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteResource=void 0;const a=s(418),r=s(177),n=s(504);class o{_hasFileExtension(t,e){const s=/.*\.([A-Za-z0-9]+)(?:(?:\?|\#).*)*$/;if(t){const i=t.match(s);if(null==i?void 0:i.length)return i[1]===e}return!1}constructor(t,e=!1){this.bustCache=e,this._type="native",this._path=t,this._hasFileExtension(t,"ase")||this._hasFileExtension(t,"aseprite")?(this._nativeResource=new a.Resource(t,"arraybuffer",e),this._type="native"):(this._jsonResource=new a.Resource(t,"json",e),this._type="json"),this.convertPath=(t,e)=>{if(0===e.indexOf("/"))return e;const s=t.split("/"),i=e.split("/");return s[s.length-1].includes(".")&&s.pop(),s.concat(i).join("/")}}load(){var t,e;return i(this,void 0,void 0,(function*(){if("json"===this._type&&this._jsonResource){const e=yield this._jsonResource.load(),s=this.convertPath(this._jsonResource.path,null!==(t=e.meta.image)&&void 0!==t?t:this._jsonResource.path.replace(".json",".png")),i=new a.ImageSource(s,this.bustCache);return yield i.load(),this._jsonParser=new n.AsepriteJsonParser(e,i),this._jsonParser.parse(),this.data=this._jsonParser.getAsepriteSheet()}{const t=yield null===(e=this._nativeResource)||void 0===e?void 0:e.load();if(!t)throw Error(`Could not load aseprite resource ${this._path}`);return this._nativeParser=new r.AsepriteNativeParser(t),yield this._nativeParser.parse(),this.data=this._nativeParser.getAsepriteSheet()}}))}getSpriteSheet(){if(this.isLoaded())return this.data.getSpriteSheet();a.Logger.getInstance().warn("AsepriteResource must be loaded before .getSpriteSheet() is called")}getAnimation(t){return this.isLoaded()?"json"===this._type?this.data.getAnimation(t):this._nativeParser.getAnimation(t):(a.Logger.getInstance().warn("AsepriteResource must be loaded before .getAnimation() is called"),null)}clone(){const t=new o(this._path,this.bustCache);return t.data=this.data.clone(),t}isLoaded(){return!!this.data}}e.AsepriteResource=o},657:(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteSpriteSheet=void 0;const i=s(418);class a{constructor(t,e){this.animations=e,this._spriteSheet=t}getSpriteSheet(){return this._spriteSheet}getAnimation(t){if(!t)return this.animations.get("ex.___all");if(!this.animations.has(t))throw new Error(`No animation exists with name ${t}, check your exported Aseprite file`);return this.animations.get(t)}clone(){const t=new Map;for(let[e,s]of this.animations.entries())t.set(e,s.clone());const e=new i.SpriteSheet({sprites:this._spriteSheet.sprites,rows:this._spriteSheet.rows,columns:this._spriteSheet.columns});return new a(e,t)}}e.AsepriteSpriteSheet=a},156:function(t,e,s){var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){void 0===i&&(i=s);var a=Object.getOwnPropertyDescriptor(e,s);a&&!("get"in a?!e.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,a)}:function(t,e,s,i){void 0===i&&(i=s),t[i]=e[s]}),a=this&&this.__exportStar||function(t,e){for(var s in t)"default"===s||Object.prototype.hasOwnProperty.call(e,s)||i(e,t,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(s(661),e),a(s(313),e),a(s(657),e),a(s(504),e),a(s(177),e)},418:e=>{e.exports=t}},s={};return function t(i){var a=s[i];if(void 0!==a)return a.exports;var r=s[i]={exports:{}};return e[i].call(r.exports,r,r.exports,t),r.exports}(156)})()));
//# sourceMappingURL=excalibur-aseprite.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("excalibur")):"function"==typeof define&&define.amd?define(["excalibur"],e):"object"==typeof exports?exports.ex=e(require("excalibur")):(t.ex=t.ex||{},t.ex.Plugin=t.ex.Plugin||{},t.ex.Plugin.Aseprite=e(t.ex))}(self,(t=>(()=>{"use strict";var e={668:(t,e,s)=>{const{Deflate:i,deflate:r,deflateRaw:a,gzip:n}=s(303),{Inflate:o,inflate:h,inflateRaw:l,ungzip:d}=s(83),_=s(681);t.exports.Deflate=i,t.exports.deflate=r,t.exports.deflateRaw=a,t.exports.gzip=n,t.exports.Inflate=o,t.exports.inflate=h,t.exports.inflateRaw=l,t.exports.ungzip=d,t.exports.constants=_},303:(t,e,s)=>{const i=s(411),r=s(805),a=s(996),n=s(674),o=s(442),h=Object.prototype.toString,{Z_NO_FLUSH:l,Z_SYNC_FLUSH:d,Z_FULL_FLUSH:_,Z_FINISH:c,Z_OK:u,Z_STREAM_END:f,Z_DEFAULT_COMPRESSION:p,Z_DEFAULT_STRATEGY:w,Z_DEFLATED:g}=s(681);function m(t){this.options=r.assign({level:p,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:w},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;let s=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(s!==u)throw new Error(n[s]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?a.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,s=i.deflateSetDictionary(this.strm,t),s!==u)throw new Error(n[s]);this._dict_set=!0}}function b(t,e){const s=new m(e);if(s.push(t,!0),s.err)throw s.msg||n[s.err];return s.result}m.prototype.push=function(t,e){const s=this.strm,r=this.options.chunkSize;let n,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?c:l,"string"==typeof t?s.input=a.string2buf(t):"[object ArrayBuffer]"===h.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;)if(0===s.avail_out&&(s.output=new Uint8Array(r),s.next_out=0,s.avail_out=r),(o===d||o===_)&&s.avail_out<=6)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else{if(n=i.deflate(s,o),n===f)return s.next_out>0&&this.onData(s.output.subarray(0,s.next_out)),n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===u;if(0!==s.avail_out){if(o>0&&s.next_out>0)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else if(0===s.avail_in)break}else this.onData(s.output)}return!0},m.prototype.onData=function(t){this.chunks.push(t)},m.prototype.onEnd=function(t){t===u&&(this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Deflate=m,t.exports.deflate=b,t.exports.deflateRaw=function(t,e){return(e=e||{}).raw=!0,b(t,e)},t.exports.gzip=function(t,e){return(e=e||{}).gzip=!0,b(t,e)},t.exports.constants=s(681)},83:(t,e,s)=>{const i=s(447),r=s(805),a=s(996),n=s(674),o=s(442),h=s(414),l=Object.prototype.toString,{Z_NO_FLUSH:d,Z_FINISH:_,Z_OK:c,Z_STREAM_END:u,Z_NEED_DICT:f,Z_STREAM_ERROR:p,Z_DATA_ERROR:w,Z_MEM_ERROR:g}=s(681);function m(t){this.options=r.assign({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;let s=i.inflateInit2(this.strm,e.windowBits);if(s!==c)throw new Error(n[s]);if(this.header=new h,i.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=a.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(s=i.inflateSetDictionary(this.strm,e.dictionary),s!==c)))throw new Error(n[s])}function b(t,e){const s=new m(e);if(s.push(t),s.err)throw s.msg||n[s.err];return s.result}m.prototype.push=function(t,e){const s=this.strm,r=this.options.chunkSize,n=this.options.dictionary;let o,h,m;if(this.ended)return!1;for(h=e===~~e?e:!0===e?_:d,"[object ArrayBuffer]"===l.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(r),s.next_out=0,s.avail_out=r),o=i.inflate(s,h),o===f&&n&&(o=i.inflateSetDictionary(s,n),o===c?o=i.inflate(s,h):o===w&&(o=f));s.avail_in>0&&o===u&&s.state.wrap>0&&0!==t[s.next_in];)i.inflateReset(s),o=i.inflate(s,h);switch(o){case p:case w:case f:case g:return this.onEnd(o),this.ended=!0,!1}if(m=s.avail_out,s.next_out&&(0===s.avail_out||o===u))if("string"===this.options.to){let t=a.utf8border(s.output,s.next_out),e=s.next_out-t,i=a.buf2string(s.output,t);s.next_out=e,s.avail_out=r-e,e&&s.output.set(s.output.subarray(t,t+e),0),this.onData(i)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(o!==c||0!==m){if(o===u)return o=i.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},m.prototype.onData=function(t){this.chunks.push(t)},m.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Inflate=m,t.exports.inflate=b,t.exports.inflateRaw=function(t,e){return(e=e||{}).raw=!0,b(t,e)},t.exports.ungzip=b,t.exports.constants=s(681)},805:t=>{const e=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);t.exports.assign=function(t){const s=Array.prototype.slice.call(arguments,1);for(;s.length;){const i=s.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const s in i)e(i,s)&&(t[s]=i[s])}}return t},t.exports.flattenChunks=t=>{let e=0;for(let s=0,i=t.length;s<i;s++)e+=t[s].length;const s=new Uint8Array(e);for(let e=0,i=0,r=t.length;e<r;e++){let r=t[e];s.set(r,i),i+=r.length}return s}},996:t=>{let e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){e=!1}const s=new Uint8Array(256);for(let t=0;t<256;t++)s[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;s[254]=s[254]=1,t.exports.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,s,i,r,a,n=t.length,o=0;for(r=0;r<n;r++)s=t.charCodeAt(r),55296==(64512&s)&&r+1<n&&(i=t.charCodeAt(r+1),56320==(64512&i)&&(s=65536+(s-55296<<10)+(i-56320),r++)),o+=s<128?1:s<2048?2:s<65536?3:4;for(e=new Uint8Array(o),a=0,r=0;a<o;r++)s=t.charCodeAt(r),55296==(64512&s)&&r+1<n&&(i=t.charCodeAt(r+1),56320==(64512&i)&&(s=65536+(s-55296<<10)+(i-56320),r++)),s<128?e[a++]=s:s<2048?(e[a++]=192|s>>>6,e[a++]=128|63&s):s<65536?(e[a++]=224|s>>>12,e[a++]=128|s>>>6&63,e[a++]=128|63&s):(e[a++]=240|s>>>18,e[a++]=128|s>>>12&63,e[a++]=128|s>>>6&63,e[a++]=128|63&s);return e},t.exports.buf2string=(t,i)=>{const r=i||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,i));let a,n;const o=new Array(2*r);for(n=0,a=0;a<r;){let e=t[a++];if(e<128){o[n++]=e;continue}let i=s[e];if(i>4)o[n++]=65533,a+=i-1;else{for(e&=2===i?31:3===i?15:7;i>1&&a<r;)e=e<<6|63&t[a++],i--;i>1?o[n++]=65533:e<65536?o[n++]=e:(e-=65536,o[n++]=55296|e>>10&1023,o[n++]=56320|1023&e)}}return((t,s)=>{if(s<65534&&t.subarray&&e)return String.fromCharCode.apply(null,t.length===s?t:t.subarray(0,s));let i="";for(let e=0;e<s;e++)i+=String.fromCharCode(t[e]);return i})(o,n)},t.exports.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let i=e-1;for(;i>=0&&128==(192&t[i]);)i--;return i<0||0===i?e:i+s[t[i]]>e?i:e}},269:t=>{t.exports=(t,e,s,i)=>{let r=65535&t|0,a=t>>>16&65535|0,n=0;for(;0!==s;){n=s>2e3?2e3:s,s-=n;do{r=r+e[i++]|0,a=a+r|0}while(--n);r%=65521,a%=65521}return r|a<<16|0}},681:t=>{t.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}},823:t=>{const e=new Uint32Array((()=>{let t,e=[];for(var s=0;s<256;s++){t=s;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[s]=t}return e})());t.exports=(t,s,i,r)=>{const a=e,n=r+i;t^=-1;for(let e=r;e<n;e++)t=t>>>8^a[255&(t^s[e])];return-1^t}},411:(t,e,s)=>{const{_tr_init:i,_tr_stored_block:r,_tr_flush_block:a,_tr_tally:n,_tr_align:o}=s(665),h=s(269),l=s(823),d=s(674),{Z_NO_FLUSH:_,Z_PARTIAL_FLUSH:c,Z_FULL_FLUSH:u,Z_FINISH:f,Z_BLOCK:p,Z_OK:w,Z_STREAM_END:g,Z_STREAM_ERROR:m,Z_DATA_ERROR:b,Z_BUF_ERROR:y,Z_DEFAULT_COMPRESSION:v,Z_FILTERED:x,Z_HUFFMAN_ONLY:k,Z_RLE:A,Z_FIXED:R,Z_DEFAULT_STRATEGY:z,Z_UNKNOWN:D,Z_DEFLATED:S}=s(681),E=258,O=262,T=42,U=113,Z=666,B=(t,e)=>(t.msg=d[e],e),I=t=>2*t-(t>4?9:0),F=t=>{let e=t.length;for(;--e>=0;)t[e]=0},P=t=>{let e,s,i,r=t.w_size;e=t.hash_size,i=e;do{s=t.head[--i],t.head[i]=s>=r?s-r:0}while(--e);e=r,i=e;do{s=t.prev[--i],t.prev[i]=s>=r?s-r:0}while(--e)};let C=(t,e,s)=>(e<<t.hash_shift^s)&t.hash_mask;const L=t=>{const e=t.state;let s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+s),t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))},W=(t,e)=>{a(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,L(t.strm)},N=(t,e)=>{t.pending_buf[t.pending++]=e},j=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},M=(t,e,s,i)=>{let r=t.avail_in;return r>i&&(r=i),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),s),1===t.state.wrap?t.adler=h(t.adler,e,r,s):2===t.state.wrap&&(t.adler=l(t.adler,e,r,s)),t.next_in+=r,t.total_in+=r,r)},H=(t,e)=>{let s,i,r=t.max_chain_length,a=t.strstart,n=t.prev_length,o=t.nice_match;const h=t.strstart>t.w_size-O?t.strstart-(t.w_size-O):0,l=t.window,d=t.w_mask,_=t.prev,c=t.strstart+E;let u=l[a+n-1],f=l[a+n];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do{if(s=e,l[s+n]===f&&l[s+n-1]===u&&l[s]===l[a]&&l[++s]===l[a+1]){a+=2,s++;do{}while(l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&l[++a]===l[++s]&&a<c);if(i=E-(c-a),a=c-E,i>n){if(t.match_start=e,n=i,i>=o)break;u=l[a+n-1],f=l[a+n]}}}while((e=_[e&d])>h&&0!=--r);return n<=t.lookahead?n:t.lookahead},Y=t=>{const e=t.w_size;let s,i,r;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-O)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),P(t),i+=e),0===t.strm.avail_in)break;if(s=M(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=s,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=C(t,t.ins_h,t.window[r+1]);t.insert&&(t.ins_h=C(t,t.ins_h,t.window[r+3-1]),t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<O&&0!==t.strm.avail_in)},V=(t,e)=>{let s,i,a,n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o=0,h=t.strm.avail_in;do{if(s=65535,a=t.bi_valid+42>>3,t.strm.avail_out<a)break;if(a=t.strm.avail_out-a,i=t.strstart-t.block_start,s>i+t.strm.avail_in&&(s=i+t.strm.avail_in),s>a&&(s=a),s<n&&(0===s&&e!==f||e===_||s!==i+t.strm.avail_in))break;o=e===f&&s===i+t.strm.avail_in?1:0,r(t,0,0,o),t.pending_buf[t.pending-4]=s,t.pending_buf[t.pending-3]=s>>8,t.pending_buf[t.pending-2]=~s,t.pending_buf[t.pending-1]=~s>>8,L(t.strm),i&&(i>s&&(i=s),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,s-=i),s&&(M(t.strm,t.strm.output,t.strm.next_out,s),t.strm.next_out+=s,t.strm.avail_out-=s,t.strm.total_out+=s)}while(0===o);return h-=t.strm.avail_in,h&&(h>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=h&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-h,t.strm.next_in),t.strstart),t.strstart+=h,t.insert+=h>t.w_size-t.insert?t.w_size-t.insert:h),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?4:e!==_&&e!==f&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(a=t.window_size-t.strstart,t.strm.avail_in>a&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,a+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),a>t.strm.avail_in&&(a=t.strm.avail_in),a&&(M(t.strm,t.window,t.strstart,a),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.high_water<t.strstart&&(t.high_water=t.strstart),a=t.bi_valid+42>>3,a=t.pending_buf_size-a>65535?65535:t.pending_buf_size-a,n=a>t.w_size?t.w_size:a,i=t.strstart-t.block_start,(i>=n||(i||e===f)&&e!==_&&0===t.strm.avail_in&&i<=a)&&(s=i>a?a:i,o=e===f&&0===t.strm.avail_in&&s===i?1:0,r(t,t.block_start,s,o),t.block_start+=s,L(t.strm)),o?3:1)},G=(t,e)=>{let s,i;for(;;){if(t.lookahead<O){if(Y(t),t.lookahead<O&&e===_)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=C(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==s&&t.strstart-s<=t.w_size-O&&(t.match_length=H(t,s)),t.match_length>=3)if(i=n(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=C(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=C(t,t.ins_h,t.window[t.strstart+1]);else i=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2},K=(t,e)=>{let s,i,r;for(;;){if(t.lookahead<O){if(Y(t),t.lookahead<O&&e===_)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=C(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==s&&t.prev_length<t.max_lazy_match&&t.strstart-s<=t.w_size-O&&(t.match_length=H(t,s),t.match_length<=5&&(t.strategy===x||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,i=n(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=C(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(W(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=n(t,0,t.window[t.strstart-1]),i&&W(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=n(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2};function J(t,e,s,i,r){this.good_length=t,this.max_lazy=e,this.nice_length=s,this.max_chain=i,this.func=r}const $=[new J(0,0,0,0,V),new J(4,4,8,4,G),new J(4,5,16,8,G),new J(4,6,32,32,G),new J(4,4,16,16,K),new J(8,16,32,32,K),new J(8,16,128,128,K),new J(8,32,128,256,K),new J(32,128,258,1024,K),new J(32,258,258,4096,K)];function X(){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=S,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(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),F(this.dyn_ltree),F(this.dyn_dtree),F(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),F(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),F(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 q=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==T&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==U&&e.status!==Z?1:0},Q=t=>{if(q(t))return B(t,m);t.total_in=t.total_out=0,t.data_type=D;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?T:U,t.adler=2===e.wrap?0:1,e.last_flush=-2,i(e),w},tt=t=>{const e=Q(t);var s;return e===w&&((s=t.state).window_size=2*s.w_size,F(s.head),s.max_lazy_match=$[s.level].max_lazy,s.good_match=$[s.level].good_length,s.nice_match=$[s.level].nice_length,s.max_chain_length=$[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=2,s.match_available=0,s.ins_h=0),e},et=(t,e,s,i,r,a)=>{if(!t)return m;let n=1;if(e===v&&(e=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),r<1||r>9||s!==S||i<8||i>15||e<0||e>9||a<0||a>R||8===i&&1!==n)return B(t,m);8===i&&(i=9);const o=new X;return t.state=o,o.strm=t,o.status=T,o.wrap=n,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=r+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<r+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=a,o.method=s,tt(t)};t.exports.deflateInit=(t,e)=>et(t,e,S,15,8,z),t.exports.deflateInit2=et,t.exports.deflateReset=tt,t.exports.deflateResetKeep=Q,t.exports.deflateSetHeader=(t,e)=>q(t)||2!==t.state.wrap?m:(t.state.gzhead=e,w),t.exports.deflate=(t,e)=>{if(q(t)||e>p||e<0)return t?B(t,m):m;const s=t.state;if(!t.output||0!==t.avail_in&&!t.input||s.status===Z&&e!==f)return B(t,0===t.avail_out?y:m);const i=s.last_flush;if(s.last_flush=e,0!==s.pending){if(L(t),0===t.avail_out)return s.last_flush=-1,w}else if(0===t.avail_in&&I(e)<=I(i)&&e!==f)return B(t,y);if(s.status===Z&&0!==t.avail_in)return B(t,y);if(s.status===T&&0===s.wrap&&(s.status=U),s.status===T){let e=S+(s.w_bits-8<<4)<<8,i=-1;if(i=s.strategy>=k||s.level<2?0:s.level<6?1:6===s.level?2:3,e|=i<<6,0!==s.strstart&&(e|=32),e+=31-e%31,j(s,e),0!==s.strstart&&(j(s,t.adler>>>16),j(s,65535&t.adler)),t.adler=1,s.status=U,L(t),0!==s.pending)return s.last_flush=-1,w}if(57===s.status)if(t.adler=0,N(s,31),N(s,139),N(s,8),s.gzhead)N(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),N(s,255&s.gzhead.time),N(s,s.gzhead.time>>8&255),N(s,s.gzhead.time>>16&255),N(s,s.gzhead.time>>24&255),N(s,9===s.level?2:s.strategy>=k||s.level<2?4:0),N(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(N(s,255&s.gzhead.extra.length),N(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=l(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(N(s,0),N(s,0),N(s,0),N(s,0),N(s,0),N(s,9===s.level?2:s.strategy>=k||s.level<2?4:0),N(s,3),s.status=U,L(t),0!==s.pending)return s.last_flush=-1,w;if(69===s.status){if(s.gzhead.extra){let e=s.pending,i=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+i>s.pending_buf_size;){let r=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=l(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=r,L(t),0!==s.pending)return s.last_flush=-1,w;e=0,i-=r}let r=new Uint8Array(s.gzhead.extra);s.pending_buf.set(r.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending+=i,s.gzhead.hcrc&&s.pending>e&&(t.adler=l(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),L(t),0!==s.pending)return s.last_flush=-1,w;i=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,N(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),L(t),0!==s.pending)return s.last_flush=-1,w;i=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,N(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(L(t),0!==s.pending))return s.last_flush=-1,w;N(s,255&t.adler),N(s,t.adler>>8&255),t.adler=0}if(s.status=U,L(t),0!==s.pending)return s.last_flush=-1,w}if(0!==t.avail_in||0!==s.lookahead||e!==_&&s.status!==Z){let i=0===s.level?V(s,e):s.strategy===k?((t,e)=>{let s;for(;;){if(0===t.lookahead&&(Y(t),0===t.lookahead)){if(e===_)return 1;break}if(t.match_length=0,s=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2})(s,e):s.strategy===A?((t,e)=>{let s,i,r,a;const o=t.window;for(;;){if(t.lookahead<=E){if(Y(t),t.lookahead<=E&&e===_)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(r=t.strstart-1,i=o[r],i===o[++r]&&i===o[++r]&&i===o[++r])){a=t.strstart+E;do{}while(i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&r<a);t.match_length=E-(a-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(s=n(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2})(s,e):$[s.level].func(s,e);if(3!==i&&4!==i||(s.status=Z),1===i||3===i)return 0===t.avail_out&&(s.last_flush=-1),w;if(2===i&&(e===c?o(s):e!==p&&(r(s,0,0,!1),e===u&&(F(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),L(t),0===t.avail_out))return s.last_flush=-1,w}return e!==f?w:s.wrap<=0?g:(2===s.wrap?(N(s,255&t.adler),N(s,t.adler>>8&255),N(s,t.adler>>16&255),N(s,t.adler>>24&255),N(s,255&t.total_in),N(s,t.total_in>>8&255),N(s,t.total_in>>16&255),N(s,t.total_in>>24&255)):(j(s,t.adler>>>16),j(s,65535&t.adler)),L(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?w:g)},t.exports.deflateEnd=t=>{if(q(t))return m;const e=t.state.status;return t.state=null,e===U?B(t,b):w},t.exports.deflateSetDictionary=(t,e)=>{let s=e.length;if(q(t))return m;const i=t.state,r=i.wrap;if(2===r||1===r&&i.status!==T||i.lookahead)return m;if(1===r&&(t.adler=h(t.adler,e,s,0)),i.wrap=0,s>=i.w_size){0===r&&(F(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(s-i.w_size,s),0),e=t,s=i.w_size}const a=t.avail_in,n=t.next_in,o=t.input;for(t.avail_in=s,t.next_in=0,t.input=e,Y(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=C(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,Y(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=n,t.input=o,t.avail_in=a,i.wrap=r,w},t.exports.deflateInfo="pako deflate (from Nodeca project)"},414:t=>{t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},293:t=>{const e=16209;t.exports=function(t,s){let i,r,a,n,o,h,l,d,_,c,u,f,p,w,g,m,b,y,v,x,k,A,R,z;const D=t.state;i=t.next_in,R=t.input,r=i+(t.avail_in-5),a=t.next_out,z=t.output,n=a-(s-t.avail_out),o=a+(t.avail_out-257),h=D.dmax,l=D.wsize,d=D.whave,_=D.wnext,c=D.window,u=D.hold,f=D.bits,p=D.lencode,w=D.distcode,g=(1<<D.lenbits)-1,m=(1<<D.distbits)-1;t:do{f<15&&(u+=R[i++]<<f,f+=8,u+=R[i++]<<f,f+=8),b=p[u&g];e:for(;;){if(y=b>>>24,u>>>=y,f-=y,y=b>>>16&255,0===y)z[a++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=p[(65535&b)+(u&(1<<y)-1)];continue e}if(32&y){D.mode=16191;break t}t.msg="invalid literal/length code",D.mode=e;break t}v=65535&b,y&=15,y&&(f<y&&(u+=R[i++]<<f,f+=8),v+=u&(1<<y)-1,u>>>=y,f-=y),f<15&&(u+=R[i++]<<f,f+=8,u+=R[i++]<<f,f+=8),b=w[u&m];s:for(;;){if(y=b>>>24,u>>>=y,f-=y,y=b>>>16&255,!(16&y)){if(0==(64&y)){b=w[(65535&b)+(u&(1<<y)-1)];continue s}t.msg="invalid distance code",D.mode=e;break t}if(x=65535&b,y&=15,f<y&&(u+=R[i++]<<f,f+=8,f<y&&(u+=R[i++]<<f,f+=8)),x+=u&(1<<y)-1,x>h){t.msg="invalid distance too far back",D.mode=e;break t}if(u>>>=y,f-=y,y=a-n,x>y){if(y=x-y,y>d&&D.sane){t.msg="invalid distance too far back",D.mode=e;break t}if(k=0,A=c,0===_){if(k+=l-y,y<v){v-=y;do{z[a++]=c[k++]}while(--y);k=a-x,A=z}}else if(_<y){if(k+=l+_-y,y-=_,y<v){v-=y;do{z[a++]=c[k++]}while(--y);if(k=0,_<v){y=_,v-=y;do{z[a++]=c[k++]}while(--y);k=a-x,A=z}}}else if(k+=_-y,y<v){v-=y;do{z[a++]=c[k++]}while(--y);k=a-x,A=z}for(;v>2;)z[a++]=A[k++],z[a++]=A[k++],z[a++]=A[k++],v-=3;v&&(z[a++]=A[k++],v>1&&(z[a++]=A[k++]))}else{k=a-x;do{z[a++]=z[k++],z[a++]=z[k++],z[a++]=z[k++],v-=3}while(v>2);v&&(z[a++]=z[k++],v>1&&(z[a++]=z[k++]))}break}}break}}while(i<r&&a<o);v=f>>3,i-=v,f-=v<<3,u&=(1<<f)-1,t.next_in=i,t.next_out=a,t.avail_in=i<r?r-i+5:5-(i-r),t.avail_out=a<o?o-a+257:257-(a-o),D.hold=u,D.bits=f}},447:(t,e,s)=>{const i=s(269),r=s(823),a=s(293),n=s(998),{Z_FINISH:o,Z_BLOCK:h,Z_TREES:l,Z_OK:d,Z_STREAM_END:_,Z_NEED_DICT:c,Z_STREAM_ERROR:u,Z_DATA_ERROR:f,Z_MEM_ERROR:p,Z_BUF_ERROR:w,Z_DEFLATED:g}=s(681),m=16180,b=16190,y=16191,v=16192,x=16194,k=16199,A=16200,R=16206,z=16209,D=16210,S=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function E(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const O=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<m||e.mode>16211?1:0},T=t=>{if(O(t))return u;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=m,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,d},U=t=>{if(O(t))return u;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,T(t)},Z=(t,e)=>{let s;if(O(t))return u;const i=t.state;return e<0?(s=0,e=-e):(s=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?u:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=s,i.wbits=e,U(t))},B=(t,e)=>{if(!t)return u;const s=new E;t.state=s,s.strm=t,s.window=null,s.mode=m;const i=Z(t,e);return i!==d&&(t.state=null),i};let I,F,P=!0;const C=t=>{if(P){I=new Int32Array(512),F=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(n(1,t.lens,0,288,I,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;n(2,t.lens,0,32,F,0,t.work,{bits:5}),P=!1}t.lencode=I,t.lenbits=9,t.distcode=F,t.distbits=5},L=(t,e,s,i)=>{let r;const a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),i>=a.wsize?(a.window.set(e.subarray(s-a.wsize,s),0),a.wnext=0,a.whave=a.wsize):(r=a.wsize-a.wnext,r>i&&(r=i),a.window.set(e.subarray(s-i,s-i+r),a.wnext),(i-=r)?(a.window.set(e.subarray(s-i,s),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0};t.exports.inflateReset=U,t.exports.inflateReset2=Z,t.exports.inflateResetKeep=T,t.exports.inflateInit=t=>B(t,15),t.exports.inflateInit2=B,t.exports.inflate=(t,e)=>{let s,E,T,U,Z,B,I,F,P,W,N,j,M,H,Y,V,G,K,J,$,X,q,Q=0;const tt=new Uint8Array(4);let et,st;const it=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(O(t)||!t.output||!t.input&&0!==t.avail_in)return u;s=t.state,s.mode===y&&(s.mode=v),Z=t.next_out,T=t.output,I=t.avail_out,U=t.next_in,E=t.input,B=t.avail_in,F=s.hold,P=s.bits,W=B,N=I,q=d;t:for(;;)switch(s.mode){case m:if(0===s.wrap){s.mode=v;break}for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(2&s.wrap&&35615===F){0===s.wbits&&(s.wbits=15),s.check=0,tt[0]=255&F,tt[1]=F>>>8&255,s.check=r(s.check,tt,2,0),F=0,P=0,s.mode=16181;break}if(s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&F)<<8)+(F>>8))%31){t.msg="incorrect header check",s.mode=z;break}if((15&F)!==g){t.msg="unknown compression method",s.mode=z;break}if(F>>>=4,P-=4,X=8+(15&F),0===s.wbits&&(s.wbits=X),X>15||X>s.wbits){t.msg="invalid window size",s.mode=z;break}s.dmax=1<<s.wbits,s.flags=0,t.adler=s.check=1,s.mode=512&F?16189:y,F=0,P=0;break;case 16181:for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(s.flags=F,(255&s.flags)!==g){t.msg="unknown compression method",s.mode=z;break}if(57344&s.flags){t.msg="unknown header flags set",s.mode=z;break}s.head&&(s.head.text=F>>8&1),512&s.flags&&4&s.wrap&&(tt[0]=255&F,tt[1]=F>>>8&255,s.check=r(s.check,tt,2,0)),F=0,P=0,s.mode=16182;case 16182:for(;P<32;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.head&&(s.head.time=F),512&s.flags&&4&s.wrap&&(tt[0]=255&F,tt[1]=F>>>8&255,tt[2]=F>>>16&255,tt[3]=F>>>24&255,s.check=r(s.check,tt,4,0)),F=0,P=0,s.mode=16183;case 16183:for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.head&&(s.head.xflags=255&F,s.head.os=F>>8),512&s.flags&&4&s.wrap&&(tt[0]=255&F,tt[1]=F>>>8&255,s.check=r(s.check,tt,2,0)),F=0,P=0,s.mode=16184;case 16184:if(1024&s.flags){for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.length=F,s.head&&(s.head.extra_len=F),512&s.flags&&4&s.wrap&&(tt[0]=255&F,tt[1]=F>>>8&255,s.check=r(s.check,tt,2,0)),F=0,P=0}else s.head&&(s.head.extra=null);s.mode=16185;case 16185:if(1024&s.flags&&(j=s.length,j>B&&(j=B),j&&(s.head&&(X=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(E.subarray(U,U+j),X)),512&s.flags&&4&s.wrap&&(s.check=r(s.check,E,j,U)),B-=j,U+=j,s.length-=j),s.length))break t;s.length=0,s.mode=16186;case 16186:if(2048&s.flags){if(0===B)break t;j=0;do{X=E[U+j++],s.head&&X&&s.length<65536&&(s.head.name+=String.fromCharCode(X))}while(X&&j<B);if(512&s.flags&&4&s.wrap&&(s.check=r(s.check,E,j,U)),B-=j,U+=j,X)break t}else s.head&&(s.head.name=null);s.length=0,s.mode=16187;case 16187:if(4096&s.flags){if(0===B)break t;j=0;do{X=E[U+j++],s.head&&X&&s.length<65536&&(s.head.comment+=String.fromCharCode(X))}while(X&&j<B);if(512&s.flags&&4&s.wrap&&(s.check=r(s.check,E,j,U)),B-=j,U+=j,X)break t}else s.head&&(s.head.comment=null);s.mode=16188;case 16188:if(512&s.flags){for(;P<16;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(4&s.wrap&&F!==(65535&s.check)){t.msg="header crc mismatch",s.mode=z;break}F=0,P=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),t.adler=s.check=0,s.mode=y;break;case 16189:for(;P<32;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}t.adler=s.check=S(F),F=0,P=0,s.mode=b;case b:if(0===s.havedict)return t.next_out=Z,t.avail_out=I,t.next_in=U,t.avail_in=B,s.hold=F,s.bits=P,c;t.adler=s.check=1,s.mode=y;case y:if(e===h||e===l)break t;case v:if(s.last){F>>>=7&P,P-=7&P,s.mode=R;break}for(;P<3;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}switch(s.last=1&F,F>>>=1,P-=1,3&F){case 0:s.mode=16193;break;case 1:if(C(s),s.mode=k,e===l){F>>>=2,P-=2;break t}break;case 2:s.mode=16196;break;case 3:t.msg="invalid block type",s.mode=z}F>>>=2,P-=2;break;case 16193:for(F>>>=7&P,P-=7&P;P<32;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if((65535&F)!=(F>>>16^65535)){t.msg="invalid stored block lengths",s.mode=z;break}if(s.length=65535&F,F=0,P=0,s.mode=x,e===l)break t;case x:s.mode=16195;case 16195:if(j=s.length,j){if(j>B&&(j=B),j>I&&(j=I),0===j)break t;T.set(E.subarray(U,U+j),Z),B-=j,U+=j,I-=j,Z+=j,s.length-=j;break}s.mode=y;break;case 16196:for(;P<14;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(s.nlen=257+(31&F),F>>>=5,P-=5,s.ndist=1+(31&F),F>>>=5,P-=5,s.ncode=4+(15&F),F>>>=4,P-=4,s.nlen>286||s.ndist>30){t.msg="too many length or distance symbols",s.mode=z;break}s.have=0,s.mode=16197;case 16197:for(;s.have<s.ncode;){for(;P<3;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.lens[it[s.have++]]=7&F,F>>>=3,P-=3}for(;s.have<19;)s.lens[it[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,et={bits:s.lenbits},q=n(0,s.lens,0,19,s.lencode,0,s.work,et),s.lenbits=et.bits,q){t.msg="invalid code lengths set",s.mode=z;break}s.have=0,s.mode=16198;case 16198:for(;s.have<s.nlen+s.ndist;){for(;Q=s.lencode[F&(1<<s.lenbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(G<16)F>>>=Y,P-=Y,s.lens[s.have++]=G;else{if(16===G){for(st=Y+2;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(F>>>=Y,P-=Y,0===s.have){t.msg="invalid bit length repeat",s.mode=z;break}X=s.lens[s.have-1],j=3+(3&F),F>>>=2,P-=2}else if(17===G){for(st=Y+3;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}F>>>=Y,P-=Y,X=0,j=3+(7&F),F>>>=3,P-=3}else{for(st=Y+7;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}F>>>=Y,P-=Y,X=0,j=11+(127&F),F>>>=7,P-=7}if(s.have+j>s.nlen+s.ndist){t.msg="invalid bit length repeat",s.mode=z;break}for(;j--;)s.lens[s.have++]=X}}if(s.mode===z)break;if(0===s.lens[256]){t.msg="invalid code -- missing end-of-block",s.mode=z;break}if(s.lenbits=9,et={bits:s.lenbits},q=n(1,s.lens,0,s.nlen,s.lencode,0,s.work,et),s.lenbits=et.bits,q){t.msg="invalid literal/lengths set",s.mode=z;break}if(s.distbits=6,s.distcode=s.distdyn,et={bits:s.distbits},q=n(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,et),s.distbits=et.bits,q){t.msg="invalid distances set",s.mode=z;break}if(s.mode=k,e===l)break t;case k:s.mode=A;case A:if(B>=6&&I>=258){t.next_out=Z,t.avail_out=I,t.next_in=U,t.avail_in=B,s.hold=F,s.bits=P,a(t,N),Z=t.next_out,T=t.output,I=t.avail_out,U=t.next_in,E=t.input,B=t.avail_in,F=s.hold,P=s.bits,s.mode===y&&(s.back=-1);break}for(s.back=0;Q=s.lencode[F&(1<<s.lenbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(V&&0==(240&V)){for(K=Y,J=V,$=G;Q=s.lencode[$+((F&(1<<K+J)-1)>>K)],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(K+Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}F>>>=K,P-=K,s.back+=K}if(F>>>=Y,P-=Y,s.back+=Y,s.length=G,0===V){s.mode=16205;break}if(32&V){s.back=-1,s.mode=y;break}if(64&V){t.msg="invalid literal/length code",s.mode=z;break}s.extra=15&V,s.mode=16201;case 16201:if(s.extra){for(st=s.extra;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.length+=F&(1<<s.extra)-1,F>>>=s.extra,P-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=16202;case 16202:for(;Q=s.distcode[F&(1<<s.distbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(0==(240&V)){for(K=Y,J=V,$=G;Q=s.distcode[$+((F&(1<<K+J)-1)>>K)],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(K+Y<=P);){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}F>>>=K,P-=K,s.back+=K}if(F>>>=Y,P-=Y,s.back+=Y,64&V){t.msg="invalid distance code",s.mode=z;break}s.offset=G,s.extra=15&V,s.mode=16203;case 16203:if(s.extra){for(st=s.extra;P<st;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}s.offset+=F&(1<<s.extra)-1,F>>>=s.extra,P-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){t.msg="invalid distance too far back",s.mode=z;break}s.mode=16204;case 16204:if(0===I)break t;if(j=N-I,s.offset>j){if(j=s.offset-j,j>s.whave&&s.sane){t.msg="invalid distance too far back",s.mode=z;break}j>s.wnext?(j-=s.wnext,M=s.wsize-j):M=s.wnext-j,j>s.length&&(j=s.length),H=s.window}else H=T,M=Z-s.offset,j=s.length;j>I&&(j=I),I-=j,s.length-=j;do{T[Z++]=H[M++]}while(--j);0===s.length&&(s.mode=A);break;case 16205:if(0===I)break t;T[Z++]=s.length,I--,s.mode=A;break;case R:if(s.wrap){for(;P<32;){if(0===B)break t;B--,F|=E[U++]<<P,P+=8}if(N-=I,t.total_out+=N,s.total+=N,4&s.wrap&&N&&(t.adler=s.check=s.flags?r(s.check,T,N,Z-N):i(s.check,T,N,Z-N)),N=I,4&s.wrap&&(s.flags?F:S(F))!==s.check){t.msg="incorrect data check",s.mode=z;break}F=0,P=0}s.mode=16207;case 16207:if(s.wrap&&s.flags){for(;P<32;){if(0===B)break t;B--,F+=E[U++]<<P,P+=8}if(4&s.wrap&&F!==(4294967295&s.total)){t.msg="incorrect length check",s.mode=z;break}F=0,P=0}s.mode=16208;case 16208:q=_;break t;case z:q=f;break t;case D:return p;default:return u}return t.next_out=Z,t.avail_out=I,t.next_in=U,t.avail_in=B,s.hold=F,s.bits=P,(s.wsize||N!==t.avail_out&&s.mode<z&&(s.mode<R||e!==o))&&L(t,t.output,t.next_out,N-t.avail_out)?(s.mode=D,p):(W-=t.avail_in,N-=t.avail_out,t.total_in+=W,t.total_out+=N,s.total+=N,4&s.wrap&&N&&(t.adler=s.check=s.flags?r(s.check,T,N,t.next_out-N):i(s.check,T,N,t.next_out-N)),t.data_type=s.bits+(s.last?64:0)+(s.mode===y?128:0)+(s.mode===k||s.mode===x?256:0),(0===W&&0===N||e===o)&&q===d&&(q=w),q)},t.exports.inflateEnd=t=>{if(O(t))return u;let e=t.state;return e.window&&(e.window=null),t.state=null,d},t.exports.inflateGetHeader=(t,e)=>{if(O(t))return u;const s=t.state;return 0==(2&s.wrap)?u:(s.head=e,e.done=!1,d)},t.exports.inflateSetDictionary=(t,e)=>{const s=e.length;let r,a,n;return O(t)?u:(r=t.state,0!==r.wrap&&r.mode!==b?u:r.mode===b&&(a=1,a=i(a,e,s,0),a!==r.check)?f:(n=L(t,e,s,s),n?(r.mode=D,p):(r.havedict=1,d)))},t.exports.inflateInfo="pako inflate (from Nodeca project)"},998:t=>{const e=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]),s=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]),i=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]),r=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]);t.exports=(t,a,n,o,h,l,d,_)=>{const c=_.bits;let u,f,p,w,g,m,b=0,y=0,v=0,x=0,k=0,A=0,R=0,z=0,D=0,S=0,E=null;const O=new Uint16Array(16),T=new Uint16Array(16);let U,Z,B,I=null;for(b=0;b<=15;b++)O[b]=0;for(y=0;y<o;y++)O[a[n+y]]++;for(k=c,x=15;x>=1&&0===O[x];x--);if(k>x&&(k=x),0===x)return h[l++]=20971520,h[l++]=20971520,_.bits=1,0;for(v=1;v<x&&0===O[v];v++);for(k<v&&(k=v),z=1,b=1;b<=15;b++)if(z<<=1,z-=O[b],z<0)return-1;if(z>0&&(0===t||1!==x))return-1;for(T[1]=0,b=1;b<15;b++)T[b+1]=T[b]+O[b];for(y=0;y<o;y++)0!==a[n+y]&&(d[T[a[n+y]]++]=y);if(0===t?(E=I=d,m=20):1===t?(E=e,I=s,m=257):(E=i,I=r,m=0),S=0,y=0,b=v,g=l,A=k,R=0,p=-1,D=1<<k,w=D-1,1===t&&D>852||2===t&&D>592)return 1;for(;;){U=b-R,d[y]+1<m?(Z=0,B=d[y]):d[y]>=m?(Z=I[d[y]-m],B=E[d[y]-m]):(Z=96,B=0),u=1<<b-R,f=1<<A,v=f;do{f-=u,h[g+(S>>R)+f]=U<<24|Z<<16|B|0}while(0!==f);for(u=1<<b-1;S&u;)u>>=1;if(0!==u?(S&=u-1,S+=u):S=0,y++,0==--O[b]){if(b===x)break;b=a[n+d[y]]}if(b>k&&(S&w)!==p){for(0===R&&(R=k),g+=v,A=b-R,z=1<<A;A+R<x&&(z-=O[A+R],!(z<=0));)A++,z<<=1;if(D+=1<<A,1===t&&D>852||2===t&&D>592)return 1;p=S&w,h[p]=k<<24|A<<16|g-l|0}}return 0!==S&&(h[g+S]=b-R<<24|64<<16|0),_.bits=k,0}},674:t=>{t.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"}},665:t=>{function e(t){let e=t.length;for(;--e>=0;)t[e]=0}const s=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]),i=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]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=new Array(576);e(n);const o=new Array(60);e(o);const h=new Array(512);e(h);const l=new Array(256);e(l);const d=new Array(29);e(d);const _=new Array(30);function c(t,e,s,i,r){this.static_tree=t,this.extra_bits=e,this.extra_base=s,this.elems=i,this.max_length=r,this.has_stree=t&&t.length}let u,f,p;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(_);const g=t=>t<256?h[t]:h[256+(t>>>7)],m=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},b=(t,e,s)=>{t.bi_valid>16-s?(t.bi_buf|=e<<t.bi_valid&65535,m(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=s-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=s)},y=(t,e,s)=>{b(t,s[2*e],s[2*e+1])},v=(t,e)=>{let s=0;do{s|=1&t,t>>>=1,s<<=1}while(--e>0);return s>>>1},x=(t,e,s)=>{const i=new Array(16);let r,a,n=0;for(r=1;r<=15;r++)n=n+s[r-1]<<1,i[r]=n;for(a=0;a<=e;a++){let e=t[2*a+1];0!==e&&(t[2*a]=v(i[e]++,e))}},k=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},A=t=>{t.bi_valid>8?m(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},R=(t,e,s,i)=>{const r=2*e,a=2*s;return t[r]<t[a]||t[r]===t[a]&&i[e]<=i[s]},z=(t,e,s)=>{const i=t.heap[s];let r=s<<1;for(;r<=t.heap_len&&(r<t.heap_len&&R(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!R(e,i,t.heap[r],t.depth));)t.heap[s]=t.heap[r],s=r,r<<=1;t.heap[s]=i},D=(t,e,r)=>{let a,n,o,h,c=0;if(0!==t.sym_next)do{a=255&t.pending_buf[t.sym_buf+c++],a+=(255&t.pending_buf[t.sym_buf+c++])<<8,n=t.pending_buf[t.sym_buf+c++],0===a?y(t,n,e):(o=l[n],y(t,o+256+1,e),h=s[o],0!==h&&(n-=d[o],b(t,n,h)),a--,o=g(a),y(t,o,r),h=i[o],0!==h&&(a-=_[o],b(t,a,h)))}while(c<t.sym_next);y(t,256,e)},S=(t,e)=>{const s=e.dyn_tree,i=e.stat_desc.static_tree,r=e.stat_desc.has_stree,a=e.stat_desc.elems;let n,o,h,l=-1;for(t.heap_len=0,t.heap_max=573,n=0;n<a;n++)0!==s[2*n]?(t.heap[++t.heap_len]=l=n,t.depth[n]=0):s[2*n+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=l<2?++l:0,s[2*h]=1,t.depth[h]=0,t.opt_len--,r&&(t.static_len-=i[2*h+1]);for(e.max_code=l,n=t.heap_len>>1;n>=1;n--)z(t,s,n);h=a;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],z(t,s,1),o=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=o,s[2*h]=s[2*n]+s[2*o],t.depth[h]=(t.depth[n]>=t.depth[o]?t.depth[n]:t.depth[o])+1,s[2*n+1]=s[2*o+1]=h,t.heap[1]=h++,z(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const s=e.dyn_tree,i=e.max_code,r=e.stat_desc.static_tree,a=e.stat_desc.has_stree,n=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let l,d,_,c,u,f,p=0;for(c=0;c<=15;c++)t.bl_count[c]=0;for(s[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;l<573;l++)d=t.heap[l],c=s[2*s[2*d+1]+1]+1,c>h&&(c=h,p++),s[2*d+1]=c,d>i||(t.bl_count[c]++,u=0,d>=o&&(u=n[d-o]),f=s[2*d],t.opt_len+=f*(c+u),a&&(t.static_len+=f*(r[2*d+1]+u)));if(0!==p){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,p-=2}while(p>0);for(c=h;0!==c;c--)for(d=t.bl_count[c];0!==d;)_=t.heap[--l],_>i||(s[2*_+1]!==c&&(t.opt_len+=(c-s[2*_+1])*s[2*_],s[2*_+1]=c),d--)}})(t,e),x(s,l,t.bl_count)},E=(t,e,s)=>{let i,r,a=-1,n=e[1],o=0,h=7,l=4;for(0===n&&(h=138,l=3),e[2*(s+1)+1]=65535,i=0;i<=s;i++)r=n,n=e[2*(i+1)+1],++o<h&&r===n||(o<l?t.bl_tree[2*r]+=o:0!==r?(r!==a&&t.bl_tree[2*r]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,a=r,0===n?(h=138,l=3):r===n?(h=6,l=3):(h=7,l=4))},O=(t,e,s)=>{let i,r,a=-1,n=e[1],o=0,h=7,l=4;for(0===n&&(h=138,l=3),i=0;i<=s;i++)if(r=n,n=e[2*(i+1)+1],!(++o<h&&r===n)){if(o<l)do{y(t,r,t.bl_tree)}while(0!=--o);else 0!==r?(r!==a&&(y(t,r,t.bl_tree),o--),y(t,16,t.bl_tree),b(t,o-3,2)):o<=10?(y(t,17,t.bl_tree),b(t,o-3,3)):(y(t,18,t.bl_tree),b(t,o-11,7));o=0,a=r,0===n?(h=138,l=3):r===n?(h=6,l=3):(h=7,l=4)}};let T=!1;const U=(t,e,s,i)=>{b(t,0+(i?1:0),3),A(t),m(t,s),m(t,~s),s&&t.pending_buf.set(t.window.subarray(e,e+s),t.pending),t.pending+=s};t.exports._tr_init=t=>{T||((()=>{let t,e,a,w,g;const m=new Array(16);for(a=0,w=0;w<28;w++)for(d[w]=a,t=0;t<1<<s[w];t++)l[a++]=w;for(l[a-1]=w,g=0,w=0;w<16;w++)for(_[w]=g,t=0;t<1<<i[w];t++)h[g++]=w;for(g>>=7;w<30;w++)for(_[w]=g<<7,t=0;t<1<<i[w]-7;t++)h[256+g++]=w;for(e=0;e<=15;e++)m[e]=0;for(t=0;t<=143;)n[2*t+1]=8,t++,m[8]++;for(;t<=255;)n[2*t+1]=9,t++,m[9]++;for(;t<=279;)n[2*t+1]=7,t++,m[7]++;for(;t<=287;)n[2*t+1]=8,t++,m[8]++;for(x(n,287,m),t=0;t<30;t++)o[2*t+1]=5,o[2*t]=v(t,5);u=new c(n,s,257,286,15),f=new c(o,i,0,30,15),p=new c(new Array(0),r,0,19,7)})(),T=!0),t.l_desc=new w(t.dyn_ltree,u),t.d_desc=new w(t.dyn_dtree,f),t.bl_desc=new w(t.bl_tree,p),t.bi_buf=0,t.bi_valid=0,k(t)},t.exports._tr_stored_block=U,t.exports._tr_flush_block=(t,e,s,i)=>{let r,h,l=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,s=4093624447;for(e=0;e<=31;e++,s>>>=1)if(1&s&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),S(t,t.l_desc),S(t,t.d_desc),l=(t=>{let e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),S(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*a[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),r=t.opt_len+3+7>>>3,h=t.static_len+3+7>>>3,h<=r&&(r=h)):r=h=s+5,s+4<=r&&-1!==e?U(t,e,s,i):4===t.strategy||h===r?(b(t,2+(i?1:0),3),D(t,n,o)):(b(t,4+(i?1:0),3),((t,e,s,i)=>{let r;for(b(t,e-257,5),b(t,s-1,5),b(t,i-4,4),r=0;r<i;r++)b(t,t.bl_tree[2*a[r]+1],3);O(t,t.dyn_ltree,e-1),O(t,t.dyn_dtree,s-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,l+1),D(t,t.dyn_ltree,t.dyn_dtree)),k(t),i&&A(t)},t.exports._tr_tally=(t,e,s)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=s,0===e?t.dyn_ltree[2*s]++:(t.matches++,e--,t.dyn_ltree[2*(l[s]+256+1)]++,t.dyn_dtree[2*g(e)]++),t.sym_next===t.sym_end),t.exports._tr_align=t=>{b(t,2,3),y(t,256,n),(t=>{16===t.bi_valid?(m(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},442:t=>{t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},504:(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteJsonParser=void 0;const i=s(418),r=s(657);e.AsepriteJsonParser=class{constructor(t,e){this.asepriteRaw=t,this.image=e,this._animations=new Map}getSpriteSheet(){return this._spriteSheet}getAnimations(){return this._animations}getAsepriteSheet(){return new r.AsepriteSpriteSheet(this.getSpriteSheet(),this.getAnimations())}parse(){const t=this.asepriteRaw,e=this.image;for(let s of t.meta.frameTags){let r=s.from,a=s.to,n=(0,i.range)(r,a),o=Object.values(t.frames).filter(((t,e)=>n.includes(e))).map((t=>({duration:t.duration,graphic:new i.Sprite({image:e,sourceView:{x:t.frame.x,y:t.frame.y,width:t.frame.w,height:t.frame.h},destSize:{width:t.frame.w,height:t.frame.h}})}))),h=i.AnimationStrategy.Loop;switch(s.direction){case"pingpong":h=i.AnimationStrategy.PingPong;break;case"reverse":o.reverse()}this._animations.set(s.name,new i.Animation({frames:o,strategy:h}))}const s=[];for(let r of Object.values(t.frames))s.push(new i.Sprite({image:e,sourceView:{x:r.frame.x,y:r.frame.y,width:r.frame.w,height:r.frame.h}}));this._spriteSheet=new i.SpriteSheet({sprites:s,rows:t.meta.size.h/s[0].height,columns:t.meta.size.w/s[0].width})}}},177:function(t,e,s){var i=this&&this.__awaiter||function(t,e,s,i){return new(s||(s=Promise))((function(r,a){function n(t){try{h(i.next(t))}catch(t){a(t)}}function o(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,o)}h((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteNativeParser=e.AnimationTypes=void 0;const r=s(418),a=s(668),n=s(657);e.AnimationTypes={Forward:0,Reverse:1,PingPong:2,PingPongReverse:3},e.AsepriteNativeParser=class{constructor(t){this.arraybuffer=t,this._cursor=0,this._colorDepth="RGBA",this._transparentIndex=0,this._frames=0,this._exFrames=[],this._sprites=[],this._tags=new Map,this._canvasFrames=[],this._indexedColors=new Map,this._currentLayer=0,this._layerData=new Map,this.height=0,this.width=0,this._dataView=new DataView(t)}parse(){return i(this,void 0,void 0,(function*(){this._parseHeader();for(let t=0;t<this._frames;t++){const t=document.createElement("canvas");t.width=this.width,t.height=this.height;const e=t.getContext("2d");e.imageSmoothingEnabled=!1,this._canvasFrames.push(e),yield this._parseFrame(e)}}))}getAsepriteSheet(){return new n.AsepriteSpriteSheet(this.getSpriteSheet(),this.getAnimations())}getFrames(){return this._exFrames}getSpriteSheet(){return new r.SpriteSheet({sprites:this._sprites})}getAnimations(){const t=new Map;for(let e of this._tags.keys())t.set(e,this.getAnimation(e));return t}getAnimation(t){const s=this._tags.get(t);if(!s)throw Error(`No animation by name [${t}] in aseprite file`);const i=this._exFrames.slice(s.from,s.to+1),a=s.type;let n=r.AnimationStrategy.Loop;a!==e.AnimationTypes.PingPong&&a!==e.AnimationTypes.PingPongReverse||(n=r.AnimationStrategy.PingPong);let o=!1;return a!==e.AnimationTypes.Reverse&&a!==e.AnimationTypes.PingPongReverse||(o=!0),new r.Animation({frames:i,strategy:n,reverse:o})}_parseFrame(t){return i(this,void 0,void 0,(function*(){this._readDWORD(),this._readWORD();const e=this._readWORD(),s=this._readWORD();this._readBYTE(),this._readBYTE();const i=this._readDWORD(),a=0===i?e:i;for(let e=0;e<a;e++)yield this._parseChunk(t);const n=t.canvas.toDataURL("image/png"),o=new r.ImageSource(n);yield o.load();const h=o.toSprite();this._sprites.push(h),this._exFrames.push({duration:s,graphic:h})}))}_parseChunk(t){var e;return i(this,void 0,void 0,(function*(){const s=this._cursor,i=this._readDWORD(),n=this._readWORD();if(8197===n){const r=this._readWORD(),n=this._layerData.get(r),o=this._readSHORT(),h=this._readSHORT(),l=this._readBYTE(),d=this._readWORD();if(this._readSHORT(),this._advanceBytes(5),0===d)throw Error("Unexpected raw image data");if(1===d){const e=this._readWORD(),s=this._canvasFrames[e];t.drawImage(s.canvas,0,0)}else if(2===d){const r=this._readWORD(),d=this._readWORD(),_=i-(this._cursor-s),c=this._readBytes(_),u=(0,a.inflate)(c),f=this._transformImageDataToRGBA(u),p=new Uint8ClampedArray(f),w=new ImageData(p,r,d),g=yield createImageBitmap(w);t.save(),t.globalAlpha=l/255*(null!==(e=null==n?void 0:n.opacity)&&void 0!==e?e:255)/255,t.drawImage(g,o,h),t.restore()}}else if(8216===n){const t=this._readWORD();this._advanceBytes(8);for(let e=0;e<t;e++){const t=this._readWORD(),e=this._readWORD(),s=this._readBYTE(),i=this._readWORD();this._advanceBytes(6),this._advanceBytes(3),this._advanceBytes(1);const r=this._readString();this._tags.set(r,{name:r,from:t,to:e,type:s,repeat:i})}}else if(8217===n){this._readDWORD();const t=this._readDWORD(),e=this._readDWORD();this._readBytes(8);for(let s=t;s<e-t+1;s++){const t=this._readWORD(),e=this._readBYTE(),i=this._readBYTE(),a=this._readBYTE(),n=this._readBYTE();this._indexedColors.set(s,new r.Color(e,i,a,n/255)),1===t&&this._readString()}}else if(8196===n){this._readWORD();const t=this._readWORD(),e=(this._readWORD(),this._readWORD(),this._readWORD(),this._readWORD(),this._readBYTE());this._advanceBytes(3);const s=this._readString();2===t&&this._readDWORD(),this._layerData.set(this._currentLayer++,{name:s,opacity:e})}else this._advanceBytes(i-6)}))}_parseHeader(){if(this._readDWORD(),42464!==this._readWORD())throw Error("Aseprite file corrupted! Header invalid");const t=this._readWORD();this._frames=t,this.width=this._readWORD(),this.height=this._readWORD();const e=this._readWORD();32===e?this._colorDepth="RGBA":16===e?this._colorDepth="Grayscale":8===e&&(this._colorDepth="Indexed"),this._readDWORD(),this._readWORD(),this._readDWORD(),this._readDWORD();const s=this._readBYTE();this._transparentIndex=s,this._advanceBytes(3),this._readWORD(),this._readBYTE(),this._readBYTE(),this._readSHORT(),this._readSHORT(),this._readWORD(),this._readWORD(),this._advanceBytes(84)}_transformImageDataToRGBA(t){var e;if("Grayscale"===this._colorDepth){const e=t.byteLength/2*4,s=new Uint8Array(e);for(let i=0;i<e;i+=4){const e=2*Math.floor(i/4);s[i+0]=t[e+0],s[i+1]=t[e+0],s[i+2]=t[e+0],s[i+3]=t[e+1]}return s}if("Indexed"===this._colorDepth){const s=4*t.byteLength,i=new Uint8Array(s);for(let a=0;a<s;a+=4){const s=Math.floor(a/4);let n=r.Color.Transparent;n=t[s]===this._transparentIndex?r.Color.Transparent:null!==(e=this._indexedColors.get(t[s]))&&void 0!==e?e:r.Color.Transparent,i[a+0]=n.r,i[a+1]=n.g,i[a+2]=n.b,i[a+3]=Math.ceil(255*n.a)}return i}return t}_readString(){const t=this._readWORD(),e=this._readBytes(t);return(new TextDecoder).decode(e)}_readBytes(t){const e=new Uint8Array(this.arraybuffer.slice(this._cursor,this._cursor+t));return this._cursor+=t,e}_readPixel(){var t;if("RGBA"===this._colorDepth){const t=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const e=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const s=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const i=this._dataView.getInt16(this._cursor,!0);return this._cursor+=2,new r.Color(t,e,s,i/255)}if("Grayscale"===this._colorDepth){const t=this._readBYTE(),e=this._readBYTE();return new r.Color(t,t,t,e/255)}if("Indexed"===this._colorDepth){const e=this._readBYTE();return null!==(t=this._indexedColors.get(e))&&void 0!==t?t:r.Color.Transparent}return r.Color.Transparent}_readFixed(){const t=this._dataView.getUint16(this._cursor,!0);this._cursor+=2;const e=this._dataView.getUint16(this._cursor,!0);return this._cursor+=2,parseFloat(t+"."+e)}_readDWORD(){const t=this._dataView.getUint32(this._cursor,!0);return this._cursor+=4,t}_readWORD(){const t=this._dataView.getUint16(this._cursor,!0);return this._cursor+=2,t}_readSHORT(){const t=this._dataView.getInt16(this._cursor,!0);return this._cursor+=2,t}_readBYTE(){const t=this._dataView.getUint8(this._cursor);return this._cursor+=1,t}_advanceBytes(t){this._cursor+=t}}},661:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteRawJson=void 0,e.AsepriteRawJson=class{}},313:function(t,e,s){var i=this&&this.__awaiter||function(t,e,s,i){return new(s||(s=Promise))((function(r,a){function n(t){try{h(i.next(t))}catch(t){a(t)}}function o(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,o)}h((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteResource=void 0;const r=s(418),a=s(177),n=s(504);class o{_hasFileExtension(t,e){const s=/.*\.([A-Za-z0-9]+)(?:(?:\?|\#).*)*$/;if(t){const i=t.match(s);if(null==i?void 0:i.length)return i[1]===e}return!1}constructor(t,e=!1){this.bustCache=e,this._type="native",this._path=t,this._hasFileExtension(t,"ase")||this._hasFileExtension(t,"aseprite")?(this._nativeResource=new r.Resource(t,"arraybuffer",e),this._type="native"):(this._jsonResource=new r.Resource(t,"json",e),this._type="json"),this.convertPath=(t,e)=>{if(0===e.indexOf("/"))return e;const s=t.split("/"),i=e.split("/");return s[s.length-1].includes(".")&&s.pop(),s.concat(i).join("/")}}load(){var t;return i(this,void 0,void 0,(function*(){if("json"===this._type&&this._jsonResource){const t=yield this._jsonResource.load(),e=this.convertPath(this._jsonResource.path,t.meta.image),s=new r.ImageSource(e,this.bustCache);return yield s.load(),this._jsonParser=new n.AsepriteJsonParser(t,s),this._jsonParser.parse(),this.data=this._jsonParser.getAsepriteSheet()}{const e=yield null===(t=this._nativeResource)||void 0===t?void 0:t.load();if(!e)throw Error(`Could not load aseprite resource ${this._path}`);return this._nativeParser=new a.AsepriteNativeParser(e),yield this._nativeParser.parse(),this.data=this._nativeParser.getAsepriteSheet()}}))}getSpriteSheet(){if(this.isLoaded())return this.data.getSpriteSheet();r.Logger.getInstance().warn("AsepriteResource must be loaded before .getSpriteSheet() is called")}getAnimation(t){return this.isLoaded()?"json"===this._type?this.data.getAnimation(t):this._nativeParser.getAnimation(t):(r.Logger.getInstance().warn("AsepriteResource must be loaded before .getAnimation() is called"),null)}clone(){const t=new o(this._path,this.bustCache);return t.data=this.data.clone(),t}isLoaded(){return!!this.data}}e.AsepriteResource=o},657:(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteSpriteSheet=void 0;const i=s(418);class r{constructor(t,e){this.animations=e,this._spriteSheet=t}getSpriteSheet(){return this._spriteSheet}getAnimation(t){if(!this.animations.has(t))throw new Error(`No animation exists with name ${t}, check your exported Aseprite file`);return this.animations.get(t)}clone(){const t=new Map;for(let[e,s]of this.animations.entries())t.set(e,s.clone());const e=new i.SpriteSheet({sprites:this._spriteSheet.sprites,rows:this._spriteSheet.rows,columns:this._spriteSheet.columns});return new r(e,t)}}e.AsepriteSpriteSheet=r},156:function(t,e,s){var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(e,s);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,r)}:function(t,e,s,i){void 0===i&&(i=s),t[i]=e[s]}),r=this&&this.__exportStar||function(t,e){for(var s in t)"default"===s||Object.prototype.hasOwnProperty.call(e,s)||i(e,t,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(s(661),e),r(s(313),e),r(s(657),e),r(s(504),e),r(s(177),e)},418:e=>{e.exports=t}},s={};return function t(i){var r=s[i];if(void 0!==r)return r.exports;var a=s[i]={exports:{}};return e[i].call(a.exports,a,a.exports,t),a.exports}(156)})()));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("excalibur")):"function"==typeof define&&define.amd?define(["excalibur"],e):"object"==typeof exports?exports.ex=e(require("excalibur")):(t.ex=t.ex||{},t.ex.Plugin=t.ex.Plugin||{},t.ex.Plugin.Aseprite=e(t.ex))}(self,(t=>(()=>{"use strict";var e={668:(t,e,s)=>{const{Deflate:i,deflate:a,deflateRaw:r,gzip:n}=s(303),{Inflate:o,inflate:h,inflateRaw:l,ungzip:d}=s(83),_=s(681);t.exports.Deflate=i,t.exports.deflate=a,t.exports.deflateRaw=r,t.exports.gzip=n,t.exports.Inflate=o,t.exports.inflate=h,t.exports.inflateRaw=l,t.exports.ungzip=d,t.exports.constants=_},303:(t,e,s)=>{const i=s(411),a=s(805),r=s(996),n=s(674),o=s(442),h=Object.prototype.toString,{Z_NO_FLUSH:l,Z_SYNC_FLUSH:d,Z_FULL_FLUSH:_,Z_FINISH:c,Z_OK:u,Z_STREAM_END:f,Z_DEFAULT_COMPRESSION:p,Z_DEFAULT_STRATEGY:w,Z_DEFLATED:m}=s(681);function g(t){this.options=a.assign({level:p,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:w},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;let s=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(s!==u)throw new Error(n[s]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?r.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,s=i.deflateSetDictionary(this.strm,t),s!==u)throw new Error(n[s]);this._dict_set=!0}}function b(t,e){const s=new g(e);if(s.push(t,!0),s.err)throw s.msg||n[s.err];return s.result}g.prototype.push=function(t,e){const s=this.strm,a=this.options.chunkSize;let n,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?c:l,"string"==typeof t?s.input=r.string2buf(t):"[object ArrayBuffer]"===h.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;)if(0===s.avail_out&&(s.output=new Uint8Array(a),s.next_out=0,s.avail_out=a),(o===d||o===_)&&s.avail_out<=6)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else{if(n=i.deflate(s,o),n===f)return s.next_out>0&&this.onData(s.output.subarray(0,s.next_out)),n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===u;if(0!==s.avail_out){if(o>0&&s.next_out>0)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else if(0===s.avail_in)break}else this.onData(s.output)}return!0},g.prototype.onData=function(t){this.chunks.push(t)},g.prototype.onEnd=function(t){t===u&&(this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Deflate=g,t.exports.deflate=b,t.exports.deflateRaw=function(t,e){return(e=e||{}).raw=!0,b(t,e)},t.exports.gzip=function(t,e){return(e=e||{}).gzip=!0,b(t,e)},t.exports.constants=s(681)},83:(t,e,s)=>{const i=s(447),a=s(805),r=s(996),n=s(674),o=s(442),h=s(414),l=Object.prototype.toString,{Z_NO_FLUSH:d,Z_FINISH:_,Z_OK:c,Z_STREAM_END:u,Z_NEED_DICT:f,Z_STREAM_ERROR:p,Z_DATA_ERROR:w,Z_MEM_ERROR:m}=s(681);function g(t){this.options=a.assign({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;let s=i.inflateInit2(this.strm,e.windowBits);if(s!==c)throw new Error(n[s]);if(this.header=new h,i.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=r.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(s=i.inflateSetDictionary(this.strm,e.dictionary),s!==c)))throw new Error(n[s])}function b(t,e){const s=new g(e);if(s.push(t),s.err)throw s.msg||n[s.err];return s.result}g.prototype.push=function(t,e){const s=this.strm,a=this.options.chunkSize,n=this.options.dictionary;let o,h,g;if(this.ended)return!1;for(h=e===~~e?e:!0===e?_:d,"[object ArrayBuffer]"===l.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(a),s.next_out=0,s.avail_out=a),o=i.inflate(s,h),o===f&&n&&(o=i.inflateSetDictionary(s,n),o===c?o=i.inflate(s,h):o===w&&(o=f));s.avail_in>0&&o===u&&s.state.wrap>0&&0!==t[s.next_in];)i.inflateReset(s),o=i.inflate(s,h);switch(o){case p:case w:case f:case m:return this.onEnd(o),this.ended=!0,!1}if(g=s.avail_out,s.next_out&&(0===s.avail_out||o===u))if("string"===this.options.to){let t=r.utf8border(s.output,s.next_out),e=s.next_out-t,i=r.buf2string(s.output,t);s.next_out=e,s.avail_out=a-e,e&&s.output.set(s.output.subarray(t,t+e),0),this.onData(i)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(o!==c||0!==g){if(o===u)return o=i.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},g.prototype.onData=function(t){this.chunks.push(t)},g.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Inflate=g,t.exports.inflate=b,t.exports.inflateRaw=function(t,e){return(e=e||{}).raw=!0,b(t,e)},t.exports.ungzip=b,t.exports.constants=s(681)},805:t=>{const e=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);t.exports.assign=function(t){const s=Array.prototype.slice.call(arguments,1);for(;s.length;){const i=s.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const s in i)e(i,s)&&(t[s]=i[s])}}return t},t.exports.flattenChunks=t=>{let e=0;for(let s=0,i=t.length;s<i;s++)e+=t[s].length;const s=new Uint8Array(e);for(let e=0,i=0,a=t.length;e<a;e++){let a=t[e];s.set(a,i),i+=a.length}return s}},996:t=>{let e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){e=!1}const s=new Uint8Array(256);for(let t=0;t<256;t++)s[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;s[254]=s[254]=1,t.exports.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,s,i,a,r,n=t.length,o=0;for(a=0;a<n;a++)s=t.charCodeAt(a),55296==(64512&s)&&a+1<n&&(i=t.charCodeAt(a+1),56320==(64512&i)&&(s=65536+(s-55296<<10)+(i-56320),a++)),o+=s<128?1:s<2048?2:s<65536?3:4;for(e=new Uint8Array(o),r=0,a=0;r<o;a++)s=t.charCodeAt(a),55296==(64512&s)&&a+1<n&&(i=t.charCodeAt(a+1),56320==(64512&i)&&(s=65536+(s-55296<<10)+(i-56320),a++)),s<128?e[r++]=s:s<2048?(e[r++]=192|s>>>6,e[r++]=128|63&s):s<65536?(e[r++]=224|s>>>12,e[r++]=128|s>>>6&63,e[r++]=128|63&s):(e[r++]=240|s>>>18,e[r++]=128|s>>>12&63,e[r++]=128|s>>>6&63,e[r++]=128|63&s);return e},t.exports.buf2string=(t,i)=>{const a=i||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,i));let r,n;const o=new Array(2*a);for(n=0,r=0;r<a;){let e=t[r++];if(e<128){o[n++]=e;continue}let i=s[e];if(i>4)o[n++]=65533,r+=i-1;else{for(e&=2===i?31:3===i?15:7;i>1&&r<a;)e=e<<6|63&t[r++],i--;i>1?o[n++]=65533:e<65536?o[n++]=e:(e-=65536,o[n++]=55296|e>>10&1023,o[n++]=56320|1023&e)}}return((t,s)=>{if(s<65534&&t.subarray&&e)return String.fromCharCode.apply(null,t.length===s?t:t.subarray(0,s));let i="";for(let e=0;e<s;e++)i+=String.fromCharCode(t[e]);return i})(o,n)},t.exports.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let i=e-1;for(;i>=0&&128==(192&t[i]);)i--;return i<0||0===i?e:i+s[t[i]]>e?i:e}},269:t=>{t.exports=(t,e,s,i)=>{let a=65535&t,r=t>>>16&65535,n=0;for(;0!==s;){n=s>2e3?2e3:s,s-=n;do{a=a+e[i++]|0,r=r+a|0}while(--n);a%=65521,r%=65521}return a|r<<16}},681:t=>{t.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}},823:t=>{const e=new Uint32Array((()=>{let t,e=[];for(var s=0;s<256;s++){t=s;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[s]=t}return e})());t.exports=(t,s,i,a)=>{const r=e,n=a+i;t^=-1;for(let e=a;e<n;e++)t=t>>>8^r[255&(t^s[e])];return~t}},411:(t,e,s)=>{const{_tr_init:i,_tr_stored_block:a,_tr_flush_block:r,_tr_tally:n,_tr_align:o}=s(665),h=s(269),l=s(823),d=s(674),{Z_NO_FLUSH:_,Z_PARTIAL_FLUSH:c,Z_FULL_FLUSH:u,Z_FINISH:f,Z_BLOCK:p,Z_OK:w,Z_STREAM_END:m,Z_STREAM_ERROR:g,Z_DATA_ERROR:b,Z_BUF_ERROR:v,Z_DEFAULT_COMPRESSION:y,Z_FILTERED:x,Z_HUFFMAN_ONLY:k,Z_RLE:R,Z_FIXED:A,Z_DEFAULT_STRATEGY:z,Z_UNKNOWN:D,Z_DEFLATED:S}=s(681),E=258,O=262,T=42,U=113,Z=666,B=(t,e)=>(t.msg=d[e],e),F=t=>2*t-(t>4?9:0),I=t=>{let e=t.length;for(;--e>=0;)t[e]=0},C=t=>{let e,s,i,a=t.w_size;e=t.hash_size,i=e;do{s=t.head[--i],t.head[i]=s>=a?s-a:0}while(--e);e=a,i=e;do{s=t.prev[--i],t.prev[i]=s>=a?s-a:0}while(--e)};let L=(t,e,s)=>(e<<t.hash_shift^s)&t.hash_mask;const P=t=>{const e=t.state;let s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+s),t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))},W=(t,e)=>{r(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,P(t.strm)},N=(t,e)=>{t.pending_buf[t.pending++]=e},j=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},M=(t,e,s,i)=>{let a=t.avail_in;return a>i&&(a=i),0===a?0:(t.avail_in-=a,e.set(t.input.subarray(t.next_in,t.next_in+a),s),1===t.state.wrap?t.adler=h(t.adler,e,a,s):2===t.state.wrap&&(t.adler=l(t.adler,e,a,s)),t.next_in+=a,t.total_in+=a,a)},H=(t,e)=>{let s,i,a=t.max_chain_length,r=t.strstart,n=t.prev_length,o=t.nice_match;const h=t.strstart>t.w_size-O?t.strstart-(t.w_size-O):0,l=t.window,d=t.w_mask,_=t.prev,c=t.strstart+E;let u=l[r+n-1],f=l[r+n];t.prev_length>=t.good_match&&(a>>=2),o>t.lookahead&&(o=t.lookahead);do{if(s=e,l[s+n]===f&&l[s+n-1]===u&&l[s]===l[r]&&l[++s]===l[r+1]){r+=2,s++;do{}while(l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&r<c);if(i=E-(c-r),r=c-E,i>n){if(t.match_start=e,n=i,i>=o)break;u=l[r+n-1],f=l[r+n]}}}while((e=_[e&d])>h&&0!=--a);return n<=t.lookahead?n:t.lookahead},Y=t=>{const e=t.w_size;let s,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-O)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),C(t),i+=e),0===t.strm.avail_in)break;if(s=M(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=s,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=L(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=L(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<O&&0!==t.strm.avail_in)},V=(t,e)=>{let s,i,r,n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o=0,h=t.strm.avail_in;do{if(s=65535,r=t.bi_valid+42>>3,t.strm.avail_out<r)break;if(r=t.strm.avail_out-r,i=t.strstart-t.block_start,s>i+t.strm.avail_in&&(s=i+t.strm.avail_in),s>r&&(s=r),s<n&&(0===s&&e!==f||e===_||s!==i+t.strm.avail_in))break;o=e===f&&s===i+t.strm.avail_in?1:0,a(t,0,0,o),t.pending_buf[t.pending-4]=s,t.pending_buf[t.pending-3]=s>>8,t.pending_buf[t.pending-2]=~s,t.pending_buf[t.pending-1]=~s>>8,P(t.strm),i&&(i>s&&(i=s),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,s-=i),s&&(M(t.strm,t.strm.output,t.strm.next_out,s),t.strm.next_out+=s,t.strm.avail_out-=s,t.strm.total_out+=s)}while(0===o);return h-=t.strm.avail_in,h&&(h>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=h&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-h,t.strm.next_in),t.strstart),t.strstart+=h,t.insert+=h>t.w_size-t.insert?t.w_size-t.insert:h),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?4:e!==_&&e!==f&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(r=t.window_size-t.strstart,t.strm.avail_in>r&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,r+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),r>t.strm.avail_in&&(r=t.strm.avail_in),r&&(M(t.strm,t.window,t.strstart,r),t.strstart+=r,t.insert+=r>t.w_size-t.insert?t.w_size-t.insert:r),t.high_water<t.strstart&&(t.high_water=t.strstart),r=t.bi_valid+42>>3,r=t.pending_buf_size-r>65535?65535:t.pending_buf_size-r,n=r>t.w_size?t.w_size:r,i=t.strstart-t.block_start,(i>=n||(i||e===f)&&e!==_&&0===t.strm.avail_in&&i<=r)&&(s=i>r?r:i,o=e===f&&0===t.strm.avail_in&&s===i?1:0,a(t,t.block_start,s,o),t.block_start+=s,P(t.strm)),o?3:1)},G=(t,e)=>{let s,i;for(;;){if(t.lookahead<O){if(Y(t),t.lookahead<O&&e===_)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==s&&t.strstart-s<=t.w_size-O&&(t.match_length=H(t,s)),t.match_length>=3)if(i=n(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=L(t,t.ins_h,t.window[t.strstart+1]);else i=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2},K=(t,e)=>{let s,i,a;for(;;){if(t.lookahead<O){if(Y(t),t.lookahead<O&&e===_)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==s&&t.prev_length<t.max_lazy_match&&t.strstart-s<=t.w_size-O&&(t.match_length=H(t,s),t.match_length<=5&&(t.strategy===x||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){a=t.strstart+t.lookahead-3,i=n(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=a&&(t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(W(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=n(t,0,t.window[t.strstart-1]),i&&W(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=n(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2};function J(t,e,s,i,a){this.good_length=t,this.max_lazy=e,this.nice_length=s,this.max_chain=i,this.func=a}const $=[new J(0,0,0,0,V),new J(4,4,8,4,G),new J(4,5,16,8,G),new J(4,6,32,32,G),new J(4,4,16,16,K),new J(8,16,32,32,K),new J(8,16,128,128,K),new J(8,32,128,256,K),new J(32,128,258,1024,K),new J(32,258,258,4096,K)];function X(){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=S,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(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),I(this.dyn_ltree),I(this.dyn_dtree),I(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),I(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),I(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 q=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==T&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==U&&e.status!==Z?1:0},Q=t=>{if(q(t))return B(t,g);t.total_in=t.total_out=0,t.data_type=D;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?T:U,t.adler=2===e.wrap?0:1,e.last_flush=-2,i(e),w},tt=t=>{const e=Q(t);var s;return e===w&&((s=t.state).window_size=2*s.w_size,I(s.head),s.max_lazy_match=$[s.level].max_lazy,s.good_match=$[s.level].good_length,s.nice_match=$[s.level].nice_length,s.max_chain_length=$[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=2,s.match_available=0,s.ins_h=0),e},et=(t,e,s,i,a,r)=>{if(!t)return g;let n=1;if(e===y&&(e=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),a<1||a>9||s!==S||i<8||i>15||e<0||e>9||r<0||r>A||8===i&&1!==n)return B(t,g);8===i&&(i=9);const o=new X;return t.state=o,o.strm=t,o.status=T,o.wrap=n,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=a+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<a+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=r,o.method=s,tt(t)};t.exports.deflateInit=(t,e)=>et(t,e,S,15,8,z),t.exports.deflateInit2=et,t.exports.deflateReset=tt,t.exports.deflateResetKeep=Q,t.exports.deflateSetHeader=(t,e)=>q(t)||2!==t.state.wrap?g:(t.state.gzhead=e,w),t.exports.deflate=(t,e)=>{if(q(t)||e>p||e<0)return t?B(t,g):g;const s=t.state;if(!t.output||0!==t.avail_in&&!t.input||s.status===Z&&e!==f)return B(t,0===t.avail_out?v:g);const i=s.last_flush;if(s.last_flush=e,0!==s.pending){if(P(t),0===t.avail_out)return s.last_flush=-1,w}else if(0===t.avail_in&&F(e)<=F(i)&&e!==f)return B(t,v);if(s.status===Z&&0!==t.avail_in)return B(t,v);if(s.status===T&&0===s.wrap&&(s.status=U),s.status===T){let e=S+(s.w_bits-8<<4)<<8,i=-1;if(i=s.strategy>=k||s.level<2?0:s.level<6?1:6===s.level?2:3,e|=i<<6,0!==s.strstart&&(e|=32),e+=31-e%31,j(s,e),0!==s.strstart&&(j(s,t.adler>>>16),j(s,65535&t.adler)),t.adler=1,s.status=U,P(t),0!==s.pending)return s.last_flush=-1,w}if(57===s.status)if(t.adler=0,N(s,31),N(s,139),N(s,8),s.gzhead)N(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),N(s,255&s.gzhead.time),N(s,s.gzhead.time>>8&255),N(s,s.gzhead.time>>16&255),N(s,s.gzhead.time>>24&255),N(s,9===s.level?2:s.strategy>=k||s.level<2?4:0),N(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(N(s,255&s.gzhead.extra.length),N(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=l(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(N(s,0),N(s,0),N(s,0),N(s,0),N(s,0),N(s,9===s.level?2:s.strategy>=k||s.level<2?4:0),N(s,3),s.status=U,P(t),0!==s.pending)return s.last_flush=-1,w;if(69===s.status){if(s.gzhead.extra){let e=s.pending,i=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+i>s.pending_buf_size;){let a=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+a),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=l(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=a,P(t),0!==s.pending)return s.last_flush=-1,w;e=0,i-=a}let a=new Uint8Array(s.gzhead.extra);s.pending_buf.set(a.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending+=i,s.gzhead.hcrc&&s.pending>e&&(t.adler=l(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),P(t),0!==s.pending)return s.last_flush=-1,w;i=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,N(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i)),P(t),0!==s.pending)return s.last_flush=-1,w;i=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,N(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>i&&(t.adler=l(t.adler,s.pending_buf,s.pending-i,i))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(P(t),0!==s.pending))return s.last_flush=-1,w;N(s,255&t.adler),N(s,t.adler>>8&255),t.adler=0}if(s.status=U,P(t),0!==s.pending)return s.last_flush=-1,w}if(0!==t.avail_in||0!==s.lookahead||e!==_&&s.status!==Z){let i=0===s.level?V(s,e):s.strategy===k?((t,e)=>{let s;for(;;){if(0===t.lookahead&&(Y(t),0===t.lookahead)){if(e===_)return 1;break}if(t.match_length=0,s=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2})(s,e):s.strategy===R?((t,e)=>{let s,i,a,r;const o=t.window;for(;;){if(t.lookahead<=E){if(Y(t),t.lookahead<=E&&e===_)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(a=t.strstart-1,i=o[a],i===o[++a]&&i===o[++a]&&i===o[++a])){r=t.strstart+E;do{}while(i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&a<r);t.match_length=E-(r-a),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(s=n(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(W(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===f?(W(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(W(t,!1),0===t.strm.avail_out)?1:2})(s,e):$[s.level].func(s,e);if(3!==i&&4!==i||(s.status=Z),1===i||3===i)return 0===t.avail_out&&(s.last_flush=-1),w;if(2===i&&(e===c?o(s):e!==p&&(a(s,0,0,!1),e===u&&(I(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),P(t),0===t.avail_out))return s.last_flush=-1,w}return e!==f?w:s.wrap<=0?m:(2===s.wrap?(N(s,255&t.adler),N(s,t.adler>>8&255),N(s,t.adler>>16&255),N(s,t.adler>>24&255),N(s,255&t.total_in),N(s,t.total_in>>8&255),N(s,t.total_in>>16&255),N(s,t.total_in>>24&255)):(j(s,t.adler>>>16),j(s,65535&t.adler)),P(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?w:m)},t.exports.deflateEnd=t=>{if(q(t))return g;const e=t.state.status;return t.state=null,e===U?B(t,b):w},t.exports.deflateSetDictionary=(t,e)=>{let s=e.length;if(q(t))return g;const i=t.state,a=i.wrap;if(2===a||1===a&&i.status!==T||i.lookahead)return g;if(1===a&&(t.adler=h(t.adler,e,s,0)),i.wrap=0,s>=i.w_size){0===a&&(I(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(s-i.w_size,s),0),e=t,s=i.w_size}const r=t.avail_in,n=t.next_in,o=t.input;for(t.avail_in=s,t.next_in=0,t.input=e,Y(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=L(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,Y(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=n,t.input=o,t.avail_in=r,i.wrap=a,w},t.exports.deflateInfo="pako deflate (from Nodeca project)"},414:t=>{t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},293:t=>{const e=16209;t.exports=function(t,s){let i,a,r,n,o,h,l,d,_,c,u,f,p,w,m,g,b,v,y,x,k,R,A,z;const D=t.state;i=t.next_in,A=t.input,a=i+(t.avail_in-5),r=t.next_out,z=t.output,n=r-(s-t.avail_out),o=r+(t.avail_out-257),h=D.dmax,l=D.wsize,d=D.whave,_=D.wnext,c=D.window,u=D.hold,f=D.bits,p=D.lencode,w=D.distcode,m=(1<<D.lenbits)-1,g=(1<<D.distbits)-1;t:do{f<15&&(u+=A[i++]<<f,f+=8,u+=A[i++]<<f,f+=8),b=p[u&m];e:for(;;){if(v=b>>>24,u>>>=v,f-=v,v=b>>>16&255,0===v)z[r++]=65535&b;else{if(!(16&v)){if(64&v){if(32&v){D.mode=16191;break t}t.msg="invalid literal/length code",D.mode=e;break t}b=p[(65535&b)+(u&(1<<v)-1)];continue e}for(y=65535&b,v&=15,v&&(f<v&&(u+=A[i++]<<f,f+=8),y+=u&(1<<v)-1,u>>>=v,f-=v),f<15&&(u+=A[i++]<<f,f+=8,u+=A[i++]<<f,f+=8),b=w[u&g];;){if(v=b>>>24,u>>>=v,f-=v,v=b>>>16&255,16&v){if(x=65535&b,v&=15,f<v&&(u+=A[i++]<<f,f+=8,f<v&&(u+=A[i++]<<f,f+=8)),x+=u&(1<<v)-1,x>h){t.msg="invalid distance too far back",D.mode=e;break t}if(u>>>=v,f-=v,v=r-n,x>v){if(v=x-v,v>d&&D.sane){t.msg="invalid distance too far back",D.mode=e;break t}if(k=0,R=c,0===_){if(k+=l-v,v<y){y-=v;do{z[r++]=c[k++]}while(--v);k=r-x,R=z}}else if(_<v){if(k+=l+_-v,v-=_,v<y){y-=v;do{z[r++]=c[k++]}while(--v);if(k=0,_<y){v=_,y-=v;do{z[r++]=c[k++]}while(--v);k=r-x,R=z}}}else if(k+=_-v,v<y){y-=v;do{z[r++]=c[k++]}while(--v);k=r-x,R=z}for(;y>2;)z[r++]=R[k++],z[r++]=R[k++],z[r++]=R[k++],y-=3;y&&(z[r++]=R[k++],y>1&&(z[r++]=R[k++]))}else{k=r-x;do{z[r++]=z[k++],z[r++]=z[k++],z[r++]=z[k++],y-=3}while(y>2);y&&(z[r++]=z[k++],y>1&&(z[r++]=z[k++]))}break}if(64&v){t.msg="invalid distance code",D.mode=e;break t}b=w[(65535&b)+(u&(1<<v)-1)]}}break}}while(i<a&&r<o);y=f>>3,i-=y,f-=y<<3,u&=(1<<f)-1,t.next_in=i,t.next_out=r,t.avail_in=i<a?a-i+5:5-(i-a),t.avail_out=r<o?o-r+257:257-(r-o),D.hold=u,D.bits=f}},447:(t,e,s)=>{const i=s(269),a=s(823),r=s(293),n=s(998),{Z_FINISH:o,Z_BLOCK:h,Z_TREES:l,Z_OK:d,Z_STREAM_END:_,Z_NEED_DICT:c,Z_STREAM_ERROR:u,Z_DATA_ERROR:f,Z_MEM_ERROR:p,Z_BUF_ERROR:w,Z_DEFLATED:m}=s(681),g=16180,b=16190,v=16191,y=16192,x=16194,k=16199,R=16200,A=16206,z=16209,D=16210,S=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function E(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const O=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<g||e.mode>16211?1:0},T=t=>{if(O(t))return u;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=g,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,d},U=t=>{if(O(t))return u;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,T(t)},Z=(t,e)=>{let s;if(O(t))return u;const i=t.state;return e<0?(s=0,e=-e):(s=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?u:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=s,i.wbits=e,U(t))},B=(t,e)=>{if(!t)return u;const s=new E;t.state=s,s.strm=t,s.window=null,s.mode=g;const i=Z(t,e);return i!==d&&(t.state=null),i};let F,I,C=!0;const L=t=>{if(C){F=new Int32Array(512),I=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(n(1,t.lens,0,288,F,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;n(2,t.lens,0,32,I,0,t.work,{bits:5}),C=!1}t.lencode=F,t.lenbits=9,t.distcode=I,t.distbits=5},P=(t,e,s,i)=>{let a;const r=t.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),i>=r.wsize?(r.window.set(e.subarray(s-r.wsize,s),0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>i&&(a=i),r.window.set(e.subarray(s-i,s-i+a),r.wnext),(i-=a)?(r.window.set(e.subarray(s-i,s),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0};t.exports.inflateReset=U,t.exports.inflateReset2=Z,t.exports.inflateResetKeep=T,t.exports.inflateInit=t=>B(t,15),t.exports.inflateInit2=B,t.exports.inflate=(t,e)=>{let s,E,T,U,Z,B,F,I,C,W,N,j,M,H,Y,V,G,K,J,$,X,q,Q=0;const tt=new Uint8Array(4);let et,st;const it=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(O(t)||!t.output||!t.input&&0!==t.avail_in)return u;s=t.state,s.mode===v&&(s.mode=y),Z=t.next_out,T=t.output,F=t.avail_out,U=t.next_in,E=t.input,B=t.avail_in,I=s.hold,C=s.bits,W=B,N=F,q=d;t:for(;;)switch(s.mode){case g:if(0===s.wrap){s.mode=y;break}for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(2&s.wrap&&35615===I){0===s.wbits&&(s.wbits=15),s.check=0,tt[0]=255&I,tt[1]=I>>>8&255,s.check=a(s.check,tt,2,0),I=0,C=0,s.mode=16181;break}if(s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&I)<<8)+(I>>8))%31){t.msg="incorrect header check",s.mode=z;break}if((15&I)!==m){t.msg="unknown compression method",s.mode=z;break}if(I>>>=4,C-=4,X=8+(15&I),0===s.wbits&&(s.wbits=X),X>15||X>s.wbits){t.msg="invalid window size",s.mode=z;break}s.dmax=1<<s.wbits,s.flags=0,t.adler=s.check=1,s.mode=512&I?16189:v,I=0,C=0;break;case 16181:for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(s.flags=I,(255&s.flags)!==m){t.msg="unknown compression method",s.mode=z;break}if(57344&s.flags){t.msg="unknown header flags set",s.mode=z;break}s.head&&(s.head.text=I>>8&1),512&s.flags&&4&s.wrap&&(tt[0]=255&I,tt[1]=I>>>8&255,s.check=a(s.check,tt,2,0)),I=0,C=0,s.mode=16182;case 16182:for(;C<32;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.head&&(s.head.time=I),512&s.flags&&4&s.wrap&&(tt[0]=255&I,tt[1]=I>>>8&255,tt[2]=I>>>16&255,tt[3]=I>>>24&255,s.check=a(s.check,tt,4,0)),I=0,C=0,s.mode=16183;case 16183:for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.head&&(s.head.xflags=255&I,s.head.os=I>>8),512&s.flags&&4&s.wrap&&(tt[0]=255&I,tt[1]=I>>>8&255,s.check=a(s.check,tt,2,0)),I=0,C=0,s.mode=16184;case 16184:if(1024&s.flags){for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.length=I,s.head&&(s.head.extra_len=I),512&s.flags&&4&s.wrap&&(tt[0]=255&I,tt[1]=I>>>8&255,s.check=a(s.check,tt,2,0)),I=0,C=0}else s.head&&(s.head.extra=null);s.mode=16185;case 16185:if(1024&s.flags&&(j=s.length,j>B&&(j=B),j&&(s.head&&(X=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(E.subarray(U,U+j),X)),512&s.flags&&4&s.wrap&&(s.check=a(s.check,E,j,U)),B-=j,U+=j,s.length-=j),s.length))break t;s.length=0,s.mode=16186;case 16186:if(2048&s.flags){if(0===B)break t;j=0;do{X=E[U+j++],s.head&&X&&s.length<65536&&(s.head.name+=String.fromCharCode(X))}while(X&&j<B);if(512&s.flags&&4&s.wrap&&(s.check=a(s.check,E,j,U)),B-=j,U+=j,X)break t}else s.head&&(s.head.name=null);s.length=0,s.mode=16187;case 16187:if(4096&s.flags){if(0===B)break t;j=0;do{X=E[U+j++],s.head&&X&&s.length<65536&&(s.head.comment+=String.fromCharCode(X))}while(X&&j<B);if(512&s.flags&&4&s.wrap&&(s.check=a(s.check,E,j,U)),B-=j,U+=j,X)break t}else s.head&&(s.head.comment=null);s.mode=16188;case 16188:if(512&s.flags){for(;C<16;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(4&s.wrap&&I!==(65535&s.check)){t.msg="header crc mismatch",s.mode=z;break}I=0,C=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),t.adler=s.check=0,s.mode=v;break;case 16189:for(;C<32;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}t.adler=s.check=S(I),I=0,C=0,s.mode=b;case b:if(0===s.havedict)return t.next_out=Z,t.avail_out=F,t.next_in=U,t.avail_in=B,s.hold=I,s.bits=C,c;t.adler=s.check=1,s.mode=v;case v:if(e===h||e===l)break t;case y:if(s.last){I>>>=7&C,C-=7&C,s.mode=A;break}for(;C<3;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}switch(s.last=1&I,I>>>=1,C-=1,3&I){case 0:s.mode=16193;break;case 1:if(L(s),s.mode=k,e===l){I>>>=2,C-=2;break t}break;case 2:s.mode=16196;break;case 3:t.msg="invalid block type",s.mode=z}I>>>=2,C-=2;break;case 16193:for(I>>>=7&C,C-=7&C;C<32;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if((65535&I)!=(I>>>16^65535)){t.msg="invalid stored block lengths",s.mode=z;break}if(s.length=65535&I,I=0,C=0,s.mode=x,e===l)break t;case x:s.mode=16195;case 16195:if(j=s.length,j){if(j>B&&(j=B),j>F&&(j=F),0===j)break t;T.set(E.subarray(U,U+j),Z),B-=j,U+=j,F-=j,Z+=j,s.length-=j;break}s.mode=v;break;case 16196:for(;C<14;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(s.nlen=257+(31&I),I>>>=5,C-=5,s.ndist=1+(31&I),I>>>=5,C-=5,s.ncode=4+(15&I),I>>>=4,C-=4,s.nlen>286||s.ndist>30){t.msg="too many length or distance symbols",s.mode=z;break}s.have=0,s.mode=16197;case 16197:for(;s.have<s.ncode;){for(;C<3;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.lens[it[s.have++]]=7&I,I>>>=3,C-=3}for(;s.have<19;)s.lens[it[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,et={bits:s.lenbits},q=n(0,s.lens,0,19,s.lencode,0,s.work,et),s.lenbits=et.bits,q){t.msg="invalid code lengths set",s.mode=z;break}s.have=0,s.mode=16198;case 16198:for(;s.have<s.nlen+s.ndist;){for(;Q=s.lencode[I&(1<<s.lenbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(G<16)I>>>=Y,C-=Y,s.lens[s.have++]=G;else{if(16===G){for(st=Y+2;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(I>>>=Y,C-=Y,0===s.have){t.msg="invalid bit length repeat",s.mode=z;break}X=s.lens[s.have-1],j=3+(3&I),I>>>=2,C-=2}else if(17===G){for(st=Y+3;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}I>>>=Y,C-=Y,X=0,j=3+(7&I),I>>>=3,C-=3}else{for(st=Y+7;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}I>>>=Y,C-=Y,X=0,j=11+(127&I),I>>>=7,C-=7}if(s.have+j>s.nlen+s.ndist){t.msg="invalid bit length repeat",s.mode=z;break}for(;j--;)s.lens[s.have++]=X}}if(s.mode===z)break;if(0===s.lens[256]){t.msg="invalid code -- missing end-of-block",s.mode=z;break}if(s.lenbits=9,et={bits:s.lenbits},q=n(1,s.lens,0,s.nlen,s.lencode,0,s.work,et),s.lenbits=et.bits,q){t.msg="invalid literal/lengths set",s.mode=z;break}if(s.distbits=6,s.distcode=s.distdyn,et={bits:s.distbits},q=n(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,et),s.distbits=et.bits,q){t.msg="invalid distances set",s.mode=z;break}if(s.mode=k,e===l)break t;case k:s.mode=R;case R:if(B>=6&&F>=258){t.next_out=Z,t.avail_out=F,t.next_in=U,t.avail_in=B,s.hold=I,s.bits=C,r(t,N),Z=t.next_out,T=t.output,F=t.avail_out,U=t.next_in,E=t.input,B=t.avail_in,I=s.hold,C=s.bits,s.mode===v&&(s.back=-1);break}for(s.back=0;Q=s.lencode[I&(1<<s.lenbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(V&&!(240&V)){for(K=Y,J=V,$=G;Q=s.lencode[$+((I&(1<<K+J)-1)>>K)],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(K+Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}I>>>=K,C-=K,s.back+=K}if(I>>>=Y,C-=Y,s.back+=Y,s.length=G,0===V){s.mode=16205;break}if(32&V){s.back=-1,s.mode=v;break}if(64&V){t.msg="invalid literal/length code",s.mode=z;break}s.extra=15&V,s.mode=16201;case 16201:if(s.extra){for(st=s.extra;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.length+=I&(1<<s.extra)-1,I>>>=s.extra,C-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=16202;case 16202:for(;Q=s.distcode[I&(1<<s.distbits)-1],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(!(240&V)){for(K=Y,J=V,$=G;Q=s.distcode[$+((I&(1<<K+J)-1)>>K)],Y=Q>>>24,V=Q>>>16&255,G=65535&Q,!(K+Y<=C);){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}I>>>=K,C-=K,s.back+=K}if(I>>>=Y,C-=Y,s.back+=Y,64&V){t.msg="invalid distance code",s.mode=z;break}s.offset=G,s.extra=15&V,s.mode=16203;case 16203:if(s.extra){for(st=s.extra;C<st;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}s.offset+=I&(1<<s.extra)-1,I>>>=s.extra,C-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){t.msg="invalid distance too far back",s.mode=z;break}s.mode=16204;case 16204:if(0===F)break t;if(j=N-F,s.offset>j){if(j=s.offset-j,j>s.whave&&s.sane){t.msg="invalid distance too far back",s.mode=z;break}j>s.wnext?(j-=s.wnext,M=s.wsize-j):M=s.wnext-j,j>s.length&&(j=s.length),H=s.window}else H=T,M=Z-s.offset,j=s.length;j>F&&(j=F),F-=j,s.length-=j;do{T[Z++]=H[M++]}while(--j);0===s.length&&(s.mode=R);break;case 16205:if(0===F)break t;T[Z++]=s.length,F--,s.mode=R;break;case A:if(s.wrap){for(;C<32;){if(0===B)break t;B--,I|=E[U++]<<C,C+=8}if(N-=F,t.total_out+=N,s.total+=N,4&s.wrap&&N&&(t.adler=s.check=s.flags?a(s.check,T,N,Z-N):i(s.check,T,N,Z-N)),N=F,4&s.wrap&&(s.flags?I:S(I))!==s.check){t.msg="incorrect data check",s.mode=z;break}I=0,C=0}s.mode=16207;case 16207:if(s.wrap&&s.flags){for(;C<32;){if(0===B)break t;B--,I+=E[U++]<<C,C+=8}if(4&s.wrap&&I!==(4294967295&s.total)){t.msg="incorrect length check",s.mode=z;break}I=0,C=0}s.mode=16208;case 16208:q=_;break t;case z:q=f;break t;case D:return p;default:return u}return t.next_out=Z,t.avail_out=F,t.next_in=U,t.avail_in=B,s.hold=I,s.bits=C,(s.wsize||N!==t.avail_out&&s.mode<z&&(s.mode<A||e!==o))&&P(t,t.output,t.next_out,N-t.avail_out)?(s.mode=D,p):(W-=t.avail_in,N-=t.avail_out,t.total_in+=W,t.total_out+=N,s.total+=N,4&s.wrap&&N&&(t.adler=s.check=s.flags?a(s.check,T,N,t.next_out-N):i(s.check,T,N,t.next_out-N)),t.data_type=s.bits+(s.last?64:0)+(s.mode===v?128:0)+(s.mode===k||s.mode===x?256:0),(0===W&&0===N||e===o)&&q===d&&(q=w),q)},t.exports.inflateEnd=t=>{if(O(t))return u;let e=t.state;return e.window&&(e.window=null),t.state=null,d},t.exports.inflateGetHeader=(t,e)=>{if(O(t))return u;const s=t.state;return 2&s.wrap?(s.head=e,e.done=!1,d):u},t.exports.inflateSetDictionary=(t,e)=>{const s=e.length;let a,r,n;return O(t)?u:(a=t.state,0!==a.wrap&&a.mode!==b?u:a.mode===b&&(r=1,r=i(r,e,s,0),r!==a.check)?f:(n=P(t,e,s,s),n?(a.mode=D,p):(a.havedict=1,d)))},t.exports.inflateInfo="pako inflate (from Nodeca project)"},998:t=>{const e=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]),s=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]),i=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]),a=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]);t.exports=(t,r,n,o,h,l,d,_)=>{const c=_.bits;let u,f,p,w,m,g,b=0,v=0,y=0,x=0,k=0,R=0,A=0,z=0,D=0,S=0,E=null;const O=new Uint16Array(16),T=new Uint16Array(16);let U,Z,B,F=null;for(b=0;b<=15;b++)O[b]=0;for(v=0;v<o;v++)O[r[n+v]]++;for(k=c,x=15;x>=1&&0===O[x];x--);if(k>x&&(k=x),0===x)return h[l++]=20971520,h[l++]=20971520,_.bits=1,0;for(y=1;y<x&&0===O[y];y++);for(k<y&&(k=y),z=1,b=1;b<=15;b++)if(z<<=1,z-=O[b],z<0)return-1;if(z>0&&(0===t||1!==x))return-1;for(T[1]=0,b=1;b<15;b++)T[b+1]=T[b]+O[b];for(v=0;v<o;v++)0!==r[n+v]&&(d[T[r[n+v]]++]=v);if(0===t?(E=F=d,g=20):1===t?(E=e,F=s,g=257):(E=i,F=a,g=0),S=0,v=0,b=y,m=l,R=k,A=0,p=-1,D=1<<k,w=D-1,1===t&&D>852||2===t&&D>592)return 1;for(;;){U=b-A,d[v]+1<g?(Z=0,B=d[v]):d[v]>=g?(Z=F[d[v]-g],B=E[d[v]-g]):(Z=96,B=0),u=1<<b-A,f=1<<R,y=f;do{f-=u,h[m+(S>>A)+f]=U<<24|Z<<16|B}while(0!==f);for(u=1<<b-1;S&u;)u>>=1;if(0!==u?(S&=u-1,S+=u):S=0,v++,0==--O[b]){if(b===x)break;b=r[n+d[v]]}if(b>k&&(S&w)!==p){for(0===A&&(A=k),m+=y,R=b-A,z=1<<R;R+A<x&&(z-=O[R+A],!(z<=0));)R++,z<<=1;if(D+=1<<R,1===t&&D>852||2===t&&D>592)return 1;p=S&w,h[p]=k<<24|R<<16|m-l}}return 0!==S&&(h[m+S]=b-A<<24|64<<16),_.bits=k,0}},674:t=>{t.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"}},665:t=>{function e(t){let e=t.length;for(;--e>=0;)t[e]=0}const s=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]),i=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]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),r=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=new Array(576);e(n);const o=new Array(60);e(o);const h=new Array(512);e(h);const l=new Array(256);e(l);const d=new Array(29);e(d);const _=new Array(30);function c(t,e,s,i,a){this.static_tree=t,this.extra_bits=e,this.extra_base=s,this.elems=i,this.max_length=a,this.has_stree=t&&t.length}let u,f,p;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(_);const m=t=>t<256?h[t]:h[256+(t>>>7)],g=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},b=(t,e,s)=>{t.bi_valid>16-s?(t.bi_buf|=e<<t.bi_valid&65535,g(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=s-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=s)},v=(t,e,s)=>{b(t,s[2*e],s[2*e+1])},y=(t,e)=>{let s=0;do{s|=1&t,t>>>=1,s<<=1}while(--e>0);return s>>>1},x=(t,e,s)=>{const i=new Array(16);let a,r,n=0;for(a=1;a<=15;a++)n=n+s[a-1]<<1,i[a]=n;for(r=0;r<=e;r++){let e=t[2*r+1];0!==e&&(t[2*r]=y(i[e]++,e))}},k=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},R=t=>{t.bi_valid>8?g(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=(t,e,s,i)=>{const a=2*e,r=2*s;return t[a]<t[r]||t[a]===t[r]&&i[e]<=i[s]},z=(t,e,s)=>{const i=t.heap[s];let a=s<<1;for(;a<=t.heap_len&&(a<t.heap_len&&A(e,t.heap[a+1],t.heap[a],t.depth)&&a++,!A(e,i,t.heap[a],t.depth));)t.heap[s]=t.heap[a],s=a,a<<=1;t.heap[s]=i},D=(t,e,a)=>{let r,n,o,h,c=0;if(0!==t.sym_next)do{r=255&t.pending_buf[t.sym_buf+c++],r+=(255&t.pending_buf[t.sym_buf+c++])<<8,n=t.pending_buf[t.sym_buf+c++],0===r?v(t,n,e):(o=l[n],v(t,o+256+1,e),h=s[o],0!==h&&(n-=d[o],b(t,n,h)),r--,o=m(r),v(t,o,a),h=i[o],0!==h&&(r-=_[o],b(t,r,h)))}while(c<t.sym_next);v(t,256,e)},S=(t,e)=>{const s=e.dyn_tree,i=e.stat_desc.static_tree,a=e.stat_desc.has_stree,r=e.stat_desc.elems;let n,o,h,l=-1;for(t.heap_len=0,t.heap_max=573,n=0;n<r;n++)0!==s[2*n]?(t.heap[++t.heap_len]=l=n,t.depth[n]=0):s[2*n+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=l<2?++l:0,s[2*h]=1,t.depth[h]=0,t.opt_len--,a&&(t.static_len-=i[2*h+1]);for(e.max_code=l,n=t.heap_len>>1;n>=1;n--)z(t,s,n);h=r;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],z(t,s,1),o=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=o,s[2*h]=s[2*n]+s[2*o],t.depth[h]=(t.depth[n]>=t.depth[o]?t.depth[n]:t.depth[o])+1,s[2*n+1]=s[2*o+1]=h,t.heap[1]=h++,z(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const s=e.dyn_tree,i=e.max_code,a=e.stat_desc.static_tree,r=e.stat_desc.has_stree,n=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let l,d,_,c,u,f,p=0;for(c=0;c<=15;c++)t.bl_count[c]=0;for(s[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;l<573;l++)d=t.heap[l],c=s[2*s[2*d+1]+1]+1,c>h&&(c=h,p++),s[2*d+1]=c,d>i||(t.bl_count[c]++,u=0,d>=o&&(u=n[d-o]),f=s[2*d],t.opt_len+=f*(c+u),r&&(t.static_len+=f*(a[2*d+1]+u)));if(0!==p){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,p-=2}while(p>0);for(c=h;0!==c;c--)for(d=t.bl_count[c];0!==d;)_=t.heap[--l],_>i||(s[2*_+1]!==c&&(t.opt_len+=(c-s[2*_+1])*s[2*_],s[2*_+1]=c),d--)}})(t,e),x(s,l,t.bl_count)},E=(t,e,s)=>{let i,a,r=-1,n=e[1],o=0,h=7,l=4;for(0===n&&(h=138,l=3),e[2*(s+1)+1]=65535,i=0;i<=s;i++)a=n,n=e[2*(i+1)+1],++o<h&&a===n||(o<l?t.bl_tree[2*a]+=o:0!==a?(a!==r&&t.bl_tree[2*a]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,r=a,0===n?(h=138,l=3):a===n?(h=6,l=3):(h=7,l=4))},O=(t,e,s)=>{let i,a,r=-1,n=e[1],o=0,h=7,l=4;for(0===n&&(h=138,l=3),i=0;i<=s;i++)if(a=n,n=e[2*(i+1)+1],!(++o<h&&a===n)){if(o<l)do{v(t,a,t.bl_tree)}while(0!=--o);else 0!==a?(a!==r&&(v(t,a,t.bl_tree),o--),v(t,16,t.bl_tree),b(t,o-3,2)):o<=10?(v(t,17,t.bl_tree),b(t,o-3,3)):(v(t,18,t.bl_tree),b(t,o-11,7));o=0,r=a,0===n?(h=138,l=3):a===n?(h=6,l=3):(h=7,l=4)}};let T=!1;const U=(t,e,s,i)=>{b(t,0+(i?1:0),3),R(t),g(t,s),g(t,~s),s&&t.pending_buf.set(t.window.subarray(e,e+s),t.pending),t.pending+=s};t.exports._tr_init=t=>{T||((()=>{let t,e,r,w,m;const g=new Array(16);for(r=0,w=0;w<28;w++)for(d[w]=r,t=0;t<1<<s[w];t++)l[r++]=w;for(l[r-1]=w,m=0,w=0;w<16;w++)for(_[w]=m,t=0;t<1<<i[w];t++)h[m++]=w;for(m>>=7;w<30;w++)for(_[w]=m<<7,t=0;t<1<<i[w]-7;t++)h[256+m++]=w;for(e=0;e<=15;e++)g[e]=0;for(t=0;t<=143;)n[2*t+1]=8,t++,g[8]++;for(;t<=255;)n[2*t+1]=9,t++,g[9]++;for(;t<=279;)n[2*t+1]=7,t++,g[7]++;for(;t<=287;)n[2*t+1]=8,t++,g[8]++;for(x(n,287,g),t=0;t<30;t++)o[2*t+1]=5,o[2*t]=y(t,5);u=new c(n,s,257,286,15),f=new c(o,i,0,30,15),p=new c(new Array(0),a,0,19,7)})(),T=!0),t.l_desc=new w(t.dyn_ltree,u),t.d_desc=new w(t.dyn_dtree,f),t.bl_desc=new w(t.bl_tree,p),t.bi_buf=0,t.bi_valid=0,k(t)},t.exports._tr_stored_block=U,t.exports._tr_flush_block=(t,e,s,i)=>{let a,h,l=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,s=4093624447;for(e=0;e<=31;e++,s>>>=1)if(1&s&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),S(t,t.l_desc),S(t,t.d_desc),l=(t=>{let e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),S(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*r[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),a=t.opt_len+3+7>>>3,h=t.static_len+3+7>>>3,h<=a&&(a=h)):a=h=s+5,s+4<=a&&-1!==e?U(t,e,s,i):4===t.strategy||h===a?(b(t,2+(i?1:0),3),D(t,n,o)):(b(t,4+(i?1:0),3),((t,e,s,i)=>{let a;for(b(t,e-257,5),b(t,s-1,5),b(t,i-4,4),a=0;a<i;a++)b(t,t.bl_tree[2*r[a]+1],3);O(t,t.dyn_ltree,e-1),O(t,t.dyn_dtree,s-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,l+1),D(t,t.dyn_ltree,t.dyn_dtree)),k(t),i&&R(t)},t.exports._tr_tally=(t,e,s)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=s,0===e?t.dyn_ltree[2*s]++:(t.matches++,e--,t.dyn_ltree[2*(l[s]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),t.exports._tr_align=t=>{b(t,2,3),v(t,256,n),(t=>{16===t.bi_valid?(g(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},442:t=>{t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},504:(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteJsonParser=void 0;const i=s(418),a=s(657);e.AsepriteJsonParser=class{constructor(t,e){this.asepriteRaw=t,this.image=e,this._animations=new Map}getSpriteSheet(){return this._spriteSheet}getAnimations(){return this._animations}getAsepriteSheet(){return new a.AsepriteSpriteSheet(this.getSpriteSheet(),this.getAnimations())}_parseRawToFrames(t,e,s){const a=this.image,r=(0,i.range)(t,e);return Object.values(this.asepriteRaw.frames).filter(((t,e)=>r.includes(e))).map((t=>({duration:t.duration,graphic:new i.Sprite({image:a,sourceView:{x:t.frame.x,y:t.frame.y,width:t.frame.w,height:t.frame.h},destSize:{width:t.frame.w,height:t.frame.h}})})))}parse(){const t=this.asepriteRaw,e=this.image;this._animations.set("ex.___all",new i.Animation({frames:this._parseRawToFrames(0,Object.entries(this.asepriteRaw.frames).length-1,this.asepriteRaw.frames),strategy:i.AnimationStrategy.Loop}));for(let e of t.meta.frameTags){let s=e.from,a=e.to,r=this._parseRawToFrames(s,a,t.frames),n=i.AnimationStrategy.Loop;switch(e.direction){case"pingpong":n=i.AnimationStrategy.PingPong;break;case"reverse":r.reverse()}this._animations.set(e.name,new i.Animation({frames:r,strategy:n}))}const s=[];for(let a of Object.values(t.frames))s.push(new i.Sprite({image:e,sourceView:{x:a.frame.x,y:a.frame.y,width:a.frame.w,height:a.frame.h}}));this._spriteSheet=new i.SpriteSheet({sprites:s,rows:t.meta.size.h/s[0].height,columns:t.meta.size.w/s[0].width})}}},177:function(t,e,s){var i=this&&this.__awaiter||function(t,e,s,i){return new(s||(s=Promise))((function(a,r){function n(t){try{h(i.next(t))}catch(t){r(t)}}function o(t){try{h(i.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?a(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,o)}h((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteNativeParser=e.AnimationTypes=void 0;const a=s(418),r=s(668),n=s(657);e.AnimationTypes={Forward:0,Reverse:1,PingPong:2,PingPongReverse:3},e.AsepriteNativeParser=class{constructor(t){this.arraybuffer=t,this._cursor=0,this._colorDepth="RGBA",this._transparentIndex=0,this._frames=0,this._exFrames=[],this._sprites=[],this._tags=new Map,this._canvasFrames=[],this._indexedColors=new Map,this._currentLayer=0,this._layerData=new Map,this.height=0,this.width=0,this._animationCache=new Map,this._dataView=new DataView(t)}parse(){return i(this,void 0,void 0,(function*(){this._parseHeader();for(let t=0;t<this._frames;t++){const t=document.createElement("canvas");t.width=this.width,t.height=this.height;const e=t.getContext("2d");e.imageSmoothingEnabled=!1,this._canvasFrames.push(e),yield this._parseFrame(e)}}))}getAsepriteSheet(){return new n.AsepriteSpriteSheet(this.getSpriteSheet(),this.getAnimations())}getFrames(){return this._exFrames}getSpriteSheet(){return new a.SpriteSheet({sprites:this._sprites})}getAnimations(){const t=new Map;for(let e of this._tags.keys())t.set(e,this.getAnimation(e));return t}getAnimation(t){if(t&&this._animationCache.has(t))return this._animationCache.get(t);let s,i=e.AnimationTypes.Forward;if(t){const e=this._tags.get(t);if(!e)throw Error(`No animation by name [${t}] in aseprite file`);s=this._exFrames.slice(e.from,e.to+1),i=e.type}else s=this._exFrames;let r=a.AnimationStrategy.Loop;i!==e.AnimationTypes.PingPong&&i!==e.AnimationTypes.PingPongReverse||(r=a.AnimationStrategy.PingPong);let n=!1;i!==e.AnimationTypes.Reverse&&i!==e.AnimationTypes.PingPongReverse||(n=!0);const o=new a.Animation({frames:s,strategy:r,reverse:n});return t&&this._animationCache.set(t,o),o}_parseFrame(t){return i(this,void 0,void 0,(function*(){this._readDWORD(),this._readWORD();const e=this._readWORD(),s=this._readWORD();this._readBYTE(),this._readBYTE();const i=this._readDWORD(),r=0===i?e:i;for(let e=0;e<r;e++)yield this._parseChunk(t);const n=t.canvas.toDataURL("image/png"),o=new a.ImageSource(n);yield o.load();const h=o.toSprite();this._sprites.push(h),this._exFrames.push({duration:s,graphic:h})}))}_parseChunk(t){var e;return i(this,void 0,void 0,(function*(){const s=this._cursor,i=this._readDWORD(),n=this._readWORD();if(8197===n){const a=this._readWORD(),n=this._layerData.get(a),o=this._readSHORT(),h=this._readSHORT(),l=this._readBYTE(),d=this._readWORD();if(this._readSHORT(),this._advanceBytes(5),0===d)throw Error("Unexpected raw image data");if(1===d){const e=this._readWORD(),s=this._canvasFrames[e];(null==n?void 0:n.visible)&&(t.save(),t.drawImage(s.canvas,0,0),t.restore())}else if(2===d){const a=this._readWORD(),d=this._readWORD(),_=i-(this._cursor-s),c=this._readBytes(_),u=(0,r.inflate)(c),f=this._transformImageDataToRGBA(u),p=new Uint8ClampedArray(f),w=new ImageData(p,a,d),m=yield createImageBitmap(w);(null==n?void 0:n.visible)&&(t.save(),t.globalAlpha=l/255*(null!==(e=null==n?void 0:n.opacity)&&void 0!==e?e:255)/255,t.drawImage(m,o,h),t.restore())}}else if(8216===n){const t=this._readWORD();this._advanceBytes(8);for(let e=0;e<t;e++){const t=this._readWORD(),e=this._readWORD(),s=this._readBYTE(),i=this._readWORD();this._advanceBytes(6),this._advanceBytes(3),this._advanceBytes(1);const a=this._readString();this._tags.set(a,{name:a,from:t,to:e,type:s,repeat:i})}}else if(8217===n){this._readDWORD();const t=this._readDWORD(),e=this._readDWORD();this._readBytes(8);for(let s=t;s<e-t+1;s++){const t=this._readWORD(),e=this._readBYTE(),i=this._readBYTE(),r=this._readBYTE(),n=this._readBYTE();this._indexedColors.set(s,new a.Color(e,i,r,n/255)),1===t&&this._readString()}}else if(8196===n){const t=!(1&~this._readWORD()),e=this._readWORD(),s=(this._readWORD(),this._readWORD(),this._readWORD(),this._readWORD(),this._readBYTE());this._advanceBytes(3);const i=this._readString();2===e&&this._readDWORD(),this._layerData.set(this._currentLayer++,{name:i,opacity:s,visible:t})}else this._advanceBytes(i-6)}))}_parseHeader(){if(this._readDWORD(),42464!==this._readWORD())throw Error("Aseprite file corrupted! Header invalid");const t=this._readWORD();this._frames=t,this.width=this._readWORD(),this.height=this._readWORD();const e=this._readWORD();32===e?this._colorDepth="RGBA":16===e?this._colorDepth="Grayscale":8===e&&(this._colorDepth="Indexed"),this._readDWORD(),this._readWORD(),this._readDWORD(),this._readDWORD();const s=this._readBYTE();this._transparentIndex=s,this._advanceBytes(3),this._readWORD(),this._readBYTE(),this._readBYTE(),this._readSHORT(),this._readSHORT(),this._readWORD(),this._readWORD(),this._advanceBytes(84)}_transformImageDataToRGBA(t){var e;if("Grayscale"===this._colorDepth){const e=t.byteLength/2*4,s=new Uint8Array(e);for(let i=0;i<e;i+=4){const e=2*Math.floor(i/4);s[i+0]=t[e+0],s[i+1]=t[e+0],s[i+2]=t[e+0],s[i+3]=t[e+1]}return s}if("Indexed"===this._colorDepth){const s=4*t.byteLength,i=new Uint8Array(s);for(let r=0;r<s;r+=4){const s=Math.floor(r/4);let n=a.Color.Transparent;n=t[s]===this._transparentIndex?a.Color.Transparent:null!==(e=this._indexedColors.get(t[s]))&&void 0!==e?e:a.Color.Transparent,i[r+0]=n.r,i[r+1]=n.g,i[r+2]=n.b,i[r+3]=Math.ceil(255*n.a)}return i}return t}_readString(){const t=this._readWORD(),e=this._readBytes(t);return(new TextDecoder).decode(e)}_readBytes(t){const e=new Uint8Array(this.arraybuffer.slice(this._cursor,this._cursor+t));return this._cursor+=t,e}_readPixel(){var t;if("RGBA"===this._colorDepth){const t=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const e=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const s=this._dataView.getInt16(this._cursor,!0);this._cursor+=2;const i=this._dataView.getInt16(this._cursor,!0);return this._cursor+=2,new a.Color(t,e,s,i/255)}if("Grayscale"===this._colorDepth){const t=this._readBYTE(),e=this._readBYTE();return new a.Color(t,t,t,e/255)}if("Indexed"===this._colorDepth){const e=this._readBYTE();return null!==(t=this._indexedColors.get(e))&&void 0!==t?t:a.Color.Transparent}return a.Color.Transparent}_readFixed(){const t=this._dataView.getUint16(this._cursor,!0);this._cursor+=2;const e=this._dataView.getUint16(this._cursor,!0);return this._cursor+=2,parseFloat(t+"."+e)}_readDWORD(){const t=this._dataView.getUint32(this._cursor,!0);return this._cursor+=4,t}_readWORD(){const t=this._dataView.getUint16(this._cursor,!0);return this._cursor+=2,t}_readSHORT(){const t=this._dataView.getInt16(this._cursor,!0);return this._cursor+=2,t}_readBYTE(){const t=this._dataView.getUint8(this._cursor);return this._cursor+=1,t}_advanceBytes(t){this._cursor+=t}}},661:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteRawJson=void 0,e.AsepriteRawJson=class{}},313:function(t,e,s){var i=this&&this.__awaiter||function(t,e,s,i){return new(s||(s=Promise))((function(a,r){function n(t){try{h(i.next(t))}catch(t){r(t)}}function o(t){try{h(i.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?a(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,o)}h((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteResource=void 0;const a=s(418),r=s(177),n=s(504);class o{_hasFileExtension(t,e){const s=/.*\.([A-Za-z0-9]+)(?:(?:\?|\#).*)*$/;if(t){const i=t.match(s);if(null==i?void 0:i.length)return i[1]===e}return!1}constructor(t,e=!1){this.bustCache=e,this._type="native",this._path=t,this._hasFileExtension(t,"ase")||this._hasFileExtension(t,"aseprite")?(this._nativeResource=new a.Resource(t,"arraybuffer",e),this._type="native"):(this._jsonResource=new a.Resource(t,"json",e),this._type="json"),this.convertPath=(t,e)=>{if(0===e.indexOf("/"))return e;const s=t.split("/"),i=e.split("/");return s[s.length-1].includes(".")&&s.pop(),s.concat(i).join("/")}}load(){var t,e;return i(this,void 0,void 0,(function*(){if("json"===this._type&&this._jsonResource){const e=yield this._jsonResource.load(),s=this.convertPath(this._jsonResource.path,null!==(t=e.meta.image)&&void 0!==t?t:this._jsonResource.path.replace(".json",".png")),i=new a.ImageSource(s,this.bustCache);return yield i.load(),this._jsonParser=new n.AsepriteJsonParser(e,i),this._jsonParser.parse(),this.data=this._jsonParser.getAsepriteSheet()}{const t=yield null===(e=this._nativeResource)||void 0===e?void 0:e.load();if(!t)throw Error(`Could not load aseprite resource ${this._path}`);return this._nativeParser=new r.AsepriteNativeParser(t),yield this._nativeParser.parse(),this.data=this._nativeParser.getAsepriteSheet()}}))}getSpriteSheet(){if(this.isLoaded())return this.data.getSpriteSheet();a.Logger.getInstance().warn("AsepriteResource must be loaded before .getSpriteSheet() is called")}getAnimation(t){return this.isLoaded()?"json"===this._type?this.data.getAnimation(t):this._nativeParser.getAnimation(t):(a.Logger.getInstance().warn("AsepriteResource must be loaded before .getAnimation() is called"),null)}clone(){const t=new o(this._path,this.bustCache);return t.data=this.data.clone(),t}isLoaded(){return!!this.data}}e.AsepriteResource=o},657:(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsepriteSpriteSheet=void 0;const i=s(418);class a{constructor(t,e){this.animations=e,this._spriteSheet=t}getSpriteSheet(){return this._spriteSheet}getAnimation(t){if(!t)return this.animations.get("ex.___all");if(!this.animations.has(t))throw new Error(`No animation exists with name ${t}, check your exported Aseprite file`);return this.animations.get(t)}clone(){const t=new Map;for(let[e,s]of this.animations.entries())t.set(e,s.clone());const e=new i.SpriteSheet({sprites:this._spriteSheet.sprites,rows:this._spriteSheet.rows,columns:this._spriteSheet.columns});return new a(e,t)}}e.AsepriteSpriteSheet=a},156:function(t,e,s){var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){void 0===i&&(i=s);var a=Object.getOwnPropertyDescriptor(e,s);a&&!("get"in a?!e.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,a)}:function(t,e,s,i){void 0===i&&(i=s),t[i]=e[s]}),a=this&&this.__exportStar||function(t,e){for(var s in t)"default"===s||Object.prototype.hasOwnProperty.call(e,s)||i(e,t,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(s(661),e),a(s(313),e),a(s(657),e),a(s(504),e),a(s(177),e)},418:e=>{e.exports=t}},s={};return function t(i){var a=s[i];if(void 0!==a)return a.exports;var r=s[i]={exports:{}};return e[i].call(r.exports,r,r.exports,t),r.exports}(156)})()));
//# sourceMappingURL=excalibur-aseprite.min.js.map
{
"name": "@excaliburjs/plugin-aseprite",
"version": "0.29.1",
"version": "0.29.2",
"description": "Aseprite Resource Plugin for Excalibur",

@@ -28,3 +28,3 @@ "main": "./dist/excalibur-aseprite.js",

"devDependencies": {
"@playwright/test": "1.45.2",
"@playwright/test": "1.47.2",
"@types/jasmine": "3.10.18",

@@ -38,3 +38,3 @@ "@types/node": "^20.12.7",

"jasmine": "3.99.0",
"karma": "6.4.3",
"karma": "6.4.4",
"karma-chrome-launcher": "3.2.0",

@@ -46,3 +46,3 @@ "karma-jasmine": "4.0.2",

"typescript": "4.9.5",
"webpack": "5.93.0",
"webpack": "5.95.0",
"webpack-cli": "4.10.0",

@@ -49,0 +49,0 @@ "webpack-dev-server": "4.15.2"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc