@loaders.gl/compression 3.1.0-alpha.3 → 3.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.min.js +1 -1
- package/dist/es5/bundle.js +7 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/es5/compression-worker.js +27 -0
- package/dist/es5/compression-worker.js.map +1 -0
- package/dist/es5/index.js +92 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/lib/brotli-compression.js +220 -0
- package/dist/es5/lib/brotli-compression.js.map +1 -0
- package/dist/es5/lib/compression.js +200 -0
- package/dist/es5/lib/compression.js.map +1 -0
- package/dist/es5/lib/deflate-compression.js +420 -0
- package/dist/es5/lib/deflate-compression.js.map +1 -0
- package/dist/es5/lib/gzip-compression.js +57 -0
- package/dist/es5/lib/gzip-compression.js.map +1 -0
- package/dist/es5/lib/lz4-compression.js +157 -0
- package/dist/es5/lib/lz4-compression.js.map +1 -0
- package/dist/es5/lib/lzo-compression.js +157 -0
- package/dist/es5/lib/lzo-compression.js.map +1 -0
- package/dist/es5/lib/no-compression.js +116 -0
- package/dist/es5/lib/no-compression.js.map +1 -0
- package/dist/es5/lib/snappy-compression.js +66 -0
- package/dist/es5/lib/snappy-compression.js.map +1 -0
- package/dist/es5/lib/zstd-compression.js +125 -0
- package/dist/es5/lib/zstd-compression.js.map +1 -0
- package/dist/es5/types.js +2 -0
- package/dist/{types.js.map → es5/types.js.map} +0 -0
- package/dist/es5/workers/worker.js +129 -0
- package/dist/es5/workers/worker.js.map +1 -0
- package/dist/{bundle.js → esm/bundle.js} +0 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/esm/compression-worker.js +14 -0
- package/dist/esm/compression-worker.js.map +1 -0
- package/dist/{index.js → esm/index.js} +0 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/{lib → esm/lib}/brotli-compression.js +0 -0
- package/dist/esm/lib/brotli-compression.js.map +1 -0
- package/dist/{lib → esm/lib}/compression.js +0 -0
- package/dist/esm/lib/compression.js.map +1 -0
- package/dist/{lib → esm/lib}/deflate-compression.js +0 -0
- package/dist/esm/lib/deflate-compression.js.map +1 -0
- package/dist/{lib → esm/lib}/gzip-compression.js +0 -0
- package/dist/esm/lib/gzip-compression.js.map +1 -0
- package/dist/{lib → esm/lib}/lz4-compression.js +0 -0
- package/dist/esm/lib/lz4-compression.js.map +1 -0
- package/dist/{lib → esm/lib}/lzo-compression.js +0 -0
- package/dist/esm/lib/lzo-compression.js.map +1 -0
- package/dist/{lib → esm/lib}/no-compression.js +0 -0
- package/dist/esm/lib/no-compression.js.map +1 -0
- package/dist/{lib → esm/lib}/snappy-compression.js +0 -0
- package/dist/esm/lib/snappy-compression.js.map +1 -0
- package/dist/{lib → esm/lib}/zstd-compression.js +0 -0
- package/dist/esm/lib/zstd-compression.js.map +1 -0
- package/dist/{types.js → esm/types.js} +0 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/{workers → esm/workers}/worker.js +0 -0
- package/dist/esm/workers/worker.js.map +1 -0
- package/package.json +6 -6
- package/dist/bundle.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/brotli-compression.js.map +0 -1
- package/dist/lib/compression.js.map +0 -1
- package/dist/lib/deflate-compression.js.map +0 -1
- package/dist/lib/gzip-compression.js.map +0 -1
- package/dist/lib/lz4-compression.js.map +0 -1
- package/dist/lib/lzo-compression.js.map +0 -1
- package/dist/lib/no-compression.js.map +0 -1
- package/dist/lib/snappy-compression.js.map +0 -1
- package/dist/lib/zstd-compression.js.map +0 -1
- package/dist/workers/worker.js.map +0 -1
package/dist/dist.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=15)}([function(e,t){},function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){var t,r,n,i,s,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)s=e[t],a.set(s,i),i+=s.length;return a}},a={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,s)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(n)},,function(e,t,r){"use strict";var n={};(0,r(1).assign)(n,r(16),r(19),r(12)),e.exports=n},function(e,t,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t){var r,n,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(e){r=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,u=[],h=!1,c=-1;function d(){h&&l&&(h=!1,l.length?u=l.concat(u):c=-1,u.length&&f())}function f(){if(!h){var e=o(d);h=!0;for(var t=u.length;t;){for(l=u,u=[];++c<t;)l&&l[c].run();c=-1,t=u.length}l=null,h=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function _(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new _(e,t)),1!==u.length||h||o(f)},_.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){},function(e,t,r){"use strict";(function(e){function n(){return"object"==typeof e&&"object"==typeof e.versions&&void 0!==e.versions.node}function i(e){return e instanceof Uint8Array&&(!n()||!Buffer.isBuffer(e))}function s(e){return e instanceof ArrayBuffer}function a(e){return!!n()&&Buffer.isBuffer(e)}var o=r(24).SnappyDecompressor,l=r(25).SnappyCompressor,u="Argument compressed must be type of ArrayBuffer, Buffer, or Uint8Array";t.uncompress=function(e){if(!i(e)&&!s(e)&&!a(e))throw new TypeError(u);var t=!1,r=!1;i(e)?t=!0:s(e)&&(r=!0,e=new Uint8Array(e));var n,l,h=new o(e),c=h.readUncompressedLength();if(-1===c)throw new Error("Invalid Snappy bitstream");if(t){if(n=new Uint8Array(c),!h.uncompressToBuffer(n))throw new Error("Invalid Snappy bitstream")}else if(r){if(n=new ArrayBuffer(c),l=new Uint8Array(n),!h.uncompressToBuffer(l))throw new Error("Invalid Snappy bitstream")}else if(n=Buffer.alloc(c),!h.uncompressToBuffer(n))throw new Error("Invalid Snappy bitstream");return n},t.compress=function(e){if(!i(e)&&!s(e)&&!a(e))throw new TypeError(u);var t=!1,r=!1;i(e)?t=!0:s(e)&&(r=!0,e=new Uint8Array(e));var n,o,h,c=new l(e),d=c.maxCompressedLength();if(t?(n=new Uint8Array(d),h=c.compressToBuffer(n)):r?(n=new ArrayBuffer(d),o=new Uint8Array(n),h=c.compressToBuffer(o)):(n=Buffer.alloc(d),h=c.compressToBuffer(n)),!n.slice){var f=new Uint8Array(Array.prototype.slice.call(n,0,h));if(t)return f;if(r)return f.buffer;throw new Error("Not implemented")}return n.slice(0,h)}}).call(this,r(5))},function(e,t,r){"use strict";e.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{s=s+(i=i+t[n++]|0)|0}while(--a);i%=65521,s%=65521}return i|s<<16|0}},function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t,r,i){var s=n,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^s[255&(e^t[o])];return-1^e}},function(e,t,r){"use strict";var n=r(1),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var a=new n.Buf8(256),o=0;o<256;o++)a[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,t.string2buf=function(e){var t,r,i,s,a,o=e.length,l=0;for(s=0;s<o;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(l),a=0,s=0;a<l;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},t.buf2string=function(e,t){var r,n,i,s,o=t||e.length,u=new Array(2*o);for(n=0,r=0;r<o;)if((i=e[r++])<128)u[n++]=i;else if((s=a[i])>4)u[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&r<o;)i=i<<6|63&e[r++],s--;s>1?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return l(u,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},function(e,t,r){"use strict";e.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}},function(e,t,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_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}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";(function(e,n){r.d(t,"a",(function(){return i}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document,"object"!=typeof n||"[object process]"!==String(n)||n.browser;const i="undefined"!=typeof window&&void 0!==window.orientation,s=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);s&&parseFloat(s[1])}).call(this,r(13),r(5))},function(e,t,r){const n=r(26);globalThis.loaders=globalThis.loaders||{},e.exports=Object.assign(globalThis.loaders,n)},function(e,t,r){"use strict";var n=r(17),i=r(1),s=r(10),a=r(4),o=r(11),l=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var h;if(h="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,h)))throw new Error(a[r]);this._dict_set=!0}}function h(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,o=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?o.input=s.string2buf(e):"[object ArrayBuffer]"===l.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new i.Buf8(u),o.next_out=0,o.avail_out=u),1!==(r=n.deflate(o,a))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(s.buf2binstring(i.shrinkBuf(o.output,o.next_out))):this.onData(i.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),o.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=u,t.deflate=h,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,h(e,t)}},function(e,t,r){"use strict";var n,i=r(1),s=r(18),a=r(8),o=r(9),l=r(4);function u(e,t){return e.msg=l[t],t}function h(e){return(e<<1)-(e>4?9:0)}function c(e){for(var t=e.length;--t>=0;)e[t]=0}function d(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function f(e,t){s._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,d(e.strm)}function _(e,t){e.pending_buf[e.pending++]=t}function p(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function m(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,h=e.w_mask,c=e.prev,d=e.strstart+258,f=u[s+a-1],_=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===_&&u[r+a-1]===f&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<d);if(n=258-(d-s),s=d-258,n>a){if(e.match_start=t,a=n,n>=o)break;f=u[s+a-1],_=u[s+a]}}}while((t=c[t&h])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead}function b(e){var t,r,n,s,l,u,h,c,d,f,_=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=_+(_-262)){i.arraySet(e.window,e.window,_,_,0),e.match_start-=_,e.strstart-=_,e.block_start-=_,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=_?n-_:0}while(--r);t=r=_;do{n=e.prev[--t],e.prev[t]=n>=_?n-_:0}while(--r);s+=_}if(0===e.strm.avail_in)break;if(u=e.strm,h=e.window,c=e.strstart+e.lookahead,d=s,f=void 0,(f=u.avail_in)>d&&(f=d),r=0===f?0:(u.avail_in-=f,i.arraySet(h,u.input,u.next_in,f,c),1===u.state.wrap?u.adler=a(u.adler,h,f,c):2===u.state.wrap&&(u.adler=o(u.adler,h,f,c)),u.next_in+=f,u.total_in+=f,f),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function w(e,t){for(var r,n;;){if(e.lookahead<262){if(b(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-262&&(e.match_length=m(e,r)),e.match_length>=3)if(n=s._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(f(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(f(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(f(e,!1),0===e.strm.avail_out)?1:2}function g(e,t){for(var r,n,i;;){if(e.lookahead<262){if(b(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-262&&(e.match_length=m(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(f(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=s._tr_tally(e,0,e.window[e.strstart-1]))&&f(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=s._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(f(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(f(e,!1),0===e.strm.avail_out)?1:2}function v(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function y(){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=8,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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),c(this.dyn_ltree),c(this.dyn_dtree),c(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),c(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),c(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,s._tr_init(t),0):u(e,-2)}function x(e){var t,r=k(e);return 0===r&&((t=e.state).window_size=2*t.w_size,c(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function z(e,t,r,n,s,a){if(!e)return-2;var o=1;if(-1===t&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),s<1||s>9||8!==r||n<8||n>15||t<0||t>9||a<0||a>4)return u(e,-2);8===n&&(n=9);var l=new y;return e.state=l,l.strm=e,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=s+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<s+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=r,x(e)}n=[new v(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(b(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,f(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(f(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(f(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(f(e,!1),e.strm.avail_out),1)})),new v(4,4,8,4,w),new v(4,5,16,8,w),new v(4,6,32,32,w),new v(4,4,16,16,g),new v(8,16,32,32,g),new v(8,16,128,128,g),new v(8,32,128,256,g),new v(32,128,258,1024,g),new v(32,258,258,4096,g)],t.deflateInit=function(e,t){return z(e,t,8,15,8,0)},t.deflateInit2=z,t.deflateReset=x,t.deflateResetKeep=k,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var r,i,a,l;if(!e||!e.state||t>5||t<0)return e?u(e,-2):-2;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return u(e,0===e.avail_out?-5:-2);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,_(i,31),_(i,139),_(i,8),i.gzhead?(_(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),_(i,255&i.gzhead.time),_(i,i.gzhead.time>>8&255),_(i,i.gzhead.time>>16&255),_(i,i.gzhead.time>>24&255),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(_(i,255&i.gzhead.extra.length),_(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=o(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(_(i,0),_(i,0),_(i,0),_(i,0),_(i,0),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,3),i.status=113);else{var m=8+(i.w_bits-8<<4)<<8;m|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(m|=32),m+=31-m%31,i.status=113,p(i,m),0!==i.strstart&&(p(i,e.adler>>>16),p(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),d(e),a=i.pending,i.pending!==i.pending_buf_size));)_(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),d(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,_(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),d(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,_(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&d(e),i.pending+2<=i.pending_buf_size&&(_(i,255&e.adler),_(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(d(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&h(t)<=h(r)&&4!==t)return u(e,-5);if(666===i.status&&0!==e.avail_in)return u(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var w=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(b(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(f(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(f(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(f(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,o=e.window;;){if(e.lookahead<=258){if(b(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=o[i=e.strstart-1])===o[++i]&&n===o[++i]&&n===o[++i]){a=e.strstart+258;do{}while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=s._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(f(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(f(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(f(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==w&&4!==w||(i.status=666),1===w||3===w)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===t?s._tr_align(i):5!==t&&(s._tr_stored_block(i,0,0,!1),3===t&&(c(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),d(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(_(i,255&e.adler),_(i,e.adler>>8&255),_(i,e.adler>>16&255),_(i,e.adler>>24&255),_(i,255&e.total_in),_(i,e.total_in>>8&255),_(i,e.total_in>>16&255),_(i,e.total_in>>24&255)):(p(i,e.adler>>>16),p(i,65535&e.adler)),d(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?u(e,-2):(e.state=null,113===t?u(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var r,n,s,o,l,u,h,d,f=t.length;if(!e||!e.state)return-2;if(2===(o=(r=e.state).wrap)||1===o&&42!==r.status||r.lookahead)return-2;for(1===o&&(e.adler=a(e.adler,t,f,0)),r.wrap=0,f>=r.w_size&&(0===o&&(c(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,t,f-r.w_size,r.w_size,0),t=d,f=r.w_size),l=e.avail_in,u=e.next_in,h=e.input,e.avail_in=f,e.next_in=0,e.input=t,b(r);r.lookahead>=3;){n=r.strstart,s=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--s);r.strstart=n,r.lookahead=2,b(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=u,e.input=h,e.avail_in=l,r.wrap=o,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,r){"use strict";var n=r(1);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var s=[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],a=[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],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var h=new Array(60);i(h);var c=new Array(512);i(c);var d=new Array(256);i(d);var f=new Array(29);i(f);var _,p,m,b=new Array(30);function w(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function g(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function v(e){return e<256?c[e]:c[256+(e>>>7)]}function y(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function k(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,y(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function x(e,t,r){k(e,r[2*t],r[2*t+1])}function z(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function S(e,t,r){var n,i,s=new Array(16),a=0;for(n=1;n<=15;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=z(s[o]++,o))}}function B(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function E(e){e.bi_valid>8?y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function A(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function C(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&A(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!A(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function O(e,t,r){var n,i,o,l,u=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],i=e.pending_buf[e.l_buf+u],u++,0===n?x(e,i,t):(x(e,(o=d[i])+256+1,t),0!==(l=s[o])&&k(e,i-=f[o],l),x(e,o=v(--n),r),0!==(l=a[o])&&k(e,n-=b[o],l))}while(u<e.last_lit);x(e,256,t)}function j(e,t){var r,n,i,s=t.dyn_tree,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<l;r++)0!==s[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=a[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;r>=1;r--)C(e,s,r);i=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],C(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,C(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,l=t.dyn_tree,u=t.max_code,h=t.stat_desc.static_tree,c=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,_=t.stat_desc.max_length,p=0;for(s=0;s<=15;s++)e.bl_count[s]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(s=l[2*l[2*(n=e.heap[r])+1]+1]+1)>_&&(s=_,p++),l[2*n+1]=s,n>u||(e.bl_count[s]++,a=0,n>=f&&(a=d[n-f]),o=l[2*n],e.opt_len+=o*(s+a),c&&(e.static_len+=o*(h[2*n+1]+a)));if(0!==p){do{for(s=_-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[_]--,p-=2}while(p>0);for(s=_;0!==s;s--)for(n=e.bl_count[s];0!==n;)(i=e.heap[--r])>u||(l[2*i+1]!==s&&(e.opt_len+=(s-l[2*i+1])*l[2*i],l[2*i+1]=s),n--)}}(e,t),S(s,u,e.bl_count)}function T(e,t,r){var n,i,s=-1,a=t[1],o=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++o<l&&i===a||(o<u?e.bl_tree[2*i]+=o:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=0,s=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4))}function Z(e,t,r){var n,i,s=-1,a=t[1],o=0,l=7,u=4;for(0===a&&(l=138,u=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++o<l&&i===a)){if(o<u)do{x(e,i,e.bl_tree)}while(0!=--o);else 0!==i?(i!==s&&(x(e,i,e.bl_tree),o--),x(e,16,e.bl_tree),k(e,o-3,2)):o<=10?(x(e,17,e.bl_tree),k(e,o-3,3)):(x(e,18,e.bl_tree),k(e,o-11,7));o=0,s=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4)}}i(b);var U=!1;function D(e,t,r,i){k(e,0+(i?1:0),3),function(e,t,r,i){E(e),i&&(y(e,r),y(e,~r)),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}t._tr_init=function(e){U||(!function(){var e,t,r,n,i,l=new Array(16);for(r=0,n=0;n<28;n++)for(f[n]=r,e=0;e<1<<s[n];e++)d[r++]=n;for(d[r-1]=n,i=0,n=0;n<16;n++)for(b[n]=i,e=0;e<1<<a[n];e++)c[i++]=n;for(i>>=7;n<30;n++)for(b[n]=i<<7,e=0;e<1<<a[n]-7;e++)c[256+i++]=n;for(t=0;t<=15;t++)l[t]=0;for(e=0;e<=143;)u[2*e+1]=8,e++,l[8]++;for(;e<=255;)u[2*e+1]=9,e++,l[9]++;for(;e<=279;)u[2*e+1]=7,e++,l[7]++;for(;e<=287;)u[2*e+1]=8,e++,l[8]++;for(S(u,287,l),e=0;e<30;e++)h[2*e+1]=5,h[2*e]=z(e,5);_=new w(u,s,257,286,15),p=new w(h,a,0,30,15),m=new w(new Array(0),o,0,19,7)}(),U=!0),e.l_desc=new g(e.dyn_ltree,_),e.d_desc=new g(e.dyn_dtree,p),e.bl_desc=new g(e.bl_tree,m),e.bi_buf=0,e.bi_valid=0,B(e)},t._tr_stored_block=D,t._tr_flush_block=function(e,t,r,n){var i,s,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),j(e,e.l_desc),j(e,e.d_desc),a=function(e){var t;for(T(e,e.dyn_ltree,e.l_desc.max_code),T(e,e.dyn_dtree,e.d_desc.max_code),j(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?D(e,t,r,n):4===e.strategy||s===i?(k(e,2+(n?1:0),3),O(e,u,h)):(k(e,4+(n?1:0),3),function(e,t,r,n){var i;for(k(e,t-257,5),k(e,r-1,5),k(e,n-4,4),i=0;i<n;i++)k(e,e.bl_tree[2*l[i]+1],3);Z(e,e.dyn_ltree,t-1),Z(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),O(e,e.dyn_ltree,e.dyn_dtree)),B(e),n&&E(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(d[r]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){k(e,2,3),x(e,256,u),function(e){16===e.bi_valid?(y(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,r){"use strict";var n=r(20),i=r(1),s=r(10),a=r(12),o=r(4),l=r(11),u=r(23),h=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(o[r]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(o[r])}function d(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}c.prototype.push=function(e,t){var r,o,l,u,c,d=this.strm,f=this.options.chunkSize,_=this.options.dictionary,p=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?d.input=s.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(f),d.next_out=0,d.avail_out=f),(r=n.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&_&&(r=n.inflateSetDictionary(this.strm,_)),r===a.Z_BUF_ERROR&&!0===p&&(r=a.Z_OK,p=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==a.Z_STREAM_END&&(0!==d.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(d.output,d.next_out),u=d.next_out-l,c=s.buf2string(d.output,l),d.next_out=u,d.avail_out=f-u,u&&i.arraySet(d.output,d.output,l,u,0),this.onData(c)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(p=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=c,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},function(e,t,r){"use strict";var n=r(1),i=r(8),s=r(9),a=r(21),o=r(22);function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function u(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):-2}function c(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,h(e)):-2}function d(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,c(e))):-2}function f(e,t){var r,n;return e?(n=new u,e.state=n,n.window=null,0!==(r=d(e,t))&&(e.state=null),r):-2}var _,p,m=!0;function b(e){if(m){var t;for(_=new n.Buf32(512),p=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(1,e.lens,0,288,_,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(2,e.lens,0,32,p,0,e.work,{bits:5}),m=!1}e.lencode=_,e.lenbits=9,e.distcode=p,e.distbits=5}function w(e,t,r,i){var s,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((s=a.wsize-a.wnext)>i&&(s=i),n.arraySet(a.window,t,r-i,s,a.wnext),(i-=s)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0}t.inflateReset=c,t.inflateReset2=d,t.inflateResetKeep=h,t.inflateInit=function(e){return f(e,15)},t.inflateInit2=f,t.inflate=function(e,t){var r,u,h,c,d,f,_,p,m,g,v,y,k,x,z,S,B,E,A,C,O,j,T,Z,U=0,D=new n.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(r=e.state).mode&&(r.mode=13),d=e.next_out,h=e.output,_=e.avail_out,c=e.next_in,u=e.input,f=e.avail_in,p=r.hold,m=r.bits,g=f,v=_,j=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(2&r.wrap&&35615===p){r.check=0,D[0]=255&p,D[1]=p>>>8&255,r.check=s(r.check,D,2,0),p=0,m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&p)<<8)+(p>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&p)){e.msg="unknown compression method",r.mode=30;break}if(m-=4,O=8+(15&(p>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<O,e.adler=r.check=1,r.mode=512&p?10:12,p=0,m=0;break;case 2:for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(r.flags=p,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=p>>8&1),512&r.flags&&(D[0]=255&p,D[1]=p>>>8&255,r.check=s(r.check,D,2,0)),p=0,m=0,r.mode=3;case 3:for(;m<32;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.head&&(r.head.time=p),512&r.flags&&(D[0]=255&p,D[1]=p>>>8&255,D[2]=p>>>16&255,D[3]=p>>>24&255,r.check=s(r.check,D,4,0)),p=0,m=0,r.mode=4;case 4:for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.head&&(r.head.xflags=255&p,r.head.os=p>>8),512&r.flags&&(D[0]=255&p,D[1]=p>>>8&255,r.check=s(r.check,D,2,0)),p=0,m=0,r.mode=5;case 5:if(1024&r.flags){for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.length=p,r.head&&(r.head.extra_len=p),512&r.flags&&(D[0]=255&p,D[1]=p>>>8&255,r.check=s(r.check,D,2,0)),p=0,m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((y=r.length)>f&&(y=f),y&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,u,c,y,O)),512&r.flags&&(r.check=s(r.check,u,y,c)),f-=y,c+=y,r.length-=y),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===f)break e;y=0;do{O=u[c+y++],r.head&&O&&r.length<65536&&(r.head.name+=String.fromCharCode(O))}while(O&&y<f);if(512&r.flags&&(r.check=s(r.check,u,y,c)),f-=y,c+=y,O)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===f)break e;y=0;do{O=u[c+y++],r.head&&O&&r.length<65536&&(r.head.comment+=String.fromCharCode(O))}while(O&&y<f);if(512&r.flags&&(r.check=s(r.check,u,y,c)),f-=y,c+=y,O)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(p!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}p=0,m=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;m<32;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}e.adler=r.check=l(p),p=0,m=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=d,e.avail_out=_,e.next_in=c,e.avail_in=f,r.hold=p,r.bits=m,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){p>>>=7&m,m-=7&m,r.mode=27;break}for(;m<3;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}switch(r.last=1&p,m-=1,3&(p>>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6===t){p>>>=2,m-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}p>>>=2,m-=2;break;case 14:for(p>>>=7&m,m-=7&m;m<32;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if((65535&p)!=(p>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&p,p=0,m=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(y=r.length){if(y>f&&(y=f),y>_&&(y=_),0===y)break e;n.arraySet(h,u,c,y,d),f-=y,c+=y,_-=y,d+=y,r.length-=y;break}r.mode=12;break;case 17:for(;m<14;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(r.nlen=257+(31&p),p>>>=5,m-=5,r.ndist=1+(31&p),p>>>=5,m-=5,r.ncode=4+(15&p),p>>>=4,m-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;m<3;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.lens[M[r.have++]]=7&p,p>>>=3,m-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},j=o(0,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,j){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;S=(U=r.lencode[p&(1<<r.lenbits)-1])>>>16&255,B=65535&U,!((z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(B<16)p>>>=z,m-=z,r.lens[r.have++]=B;else{if(16===B){for(Z=z+2;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(p>>>=z,m-=z,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}O=r.lens[r.have-1],y=3+(3&p),p>>>=2,m-=2}else if(17===B){for(Z=z+3;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}m-=z,O=0,y=3+(7&(p>>>=z)),p>>>=3,m-=3}else{for(Z=z+7;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}m-=z,O=0,y=11+(127&(p>>>=z)),p>>>=7,m-=7}if(r.have+y>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;y--;)r.lens[r.have++]=O}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,T={bits:r.lenbits},j=o(1,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,j){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},j=o(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,j){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(f>=6&&_>=258){e.next_out=d,e.avail_out=_,e.next_in=c,e.avail_in=f,r.hold=p,r.bits=m,a(e,v),d=e.next_out,h=e.output,_=e.avail_out,c=e.next_in,u=e.input,f=e.avail_in,p=r.hold,m=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;S=(U=r.lencode[p&(1<<r.lenbits)-1])>>>16&255,B=65535&U,!((z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(S&&0==(240&S)){for(E=z,A=S,C=B;S=(U=r.lencode[C+((p&(1<<E+A)-1)>>E)])>>>16&255,B=65535&U,!(E+(z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}p>>>=E,m-=E,r.back+=E}if(p>>>=z,m-=z,r.back+=z,r.length=B,0===S){r.mode=26;break}if(32&S){r.back=-1,r.mode=12;break}if(64&S){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&S,r.mode=22;case 22:if(r.extra){for(Z=r.extra;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.length+=p&(1<<r.extra)-1,p>>>=r.extra,m-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;S=(U=r.distcode[p&(1<<r.distbits)-1])>>>16&255,B=65535&U,!((z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(0==(240&S)){for(E=z,A=S,C=B;S=(U=r.distcode[C+((p&(1<<E+A)-1)>>E)])>>>16&255,B=65535&U,!(E+(z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}p>>>=E,m-=E,r.back+=E}if(p>>>=z,m-=z,r.back+=z,64&S){e.msg="invalid distance code",r.mode=30;break}r.offset=B,r.extra=15&S,r.mode=24;case 24:if(r.extra){for(Z=r.extra;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.offset+=p&(1<<r.extra)-1,p>>>=r.extra,m-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===_)break e;if(y=v-_,r.offset>y){if((y=r.offset-y)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}y>r.wnext?(y-=r.wnext,k=r.wsize-y):k=r.wnext-y,y>r.length&&(y=r.length),x=r.window}else x=h,k=d-r.offset,y=r.length;y>_&&(y=_),_-=y,r.length-=y;do{h[d++]=x[k++]}while(--y);0===r.length&&(r.mode=21);break;case 26:if(0===_)break e;h[d++]=r.length,_--,r.mode=21;break;case 27:if(r.wrap){for(;m<32;){if(0===f)break e;f--,p|=u[c++]<<m,m+=8}if(v-=_,e.total_out+=v,r.total+=v,v&&(e.adler=r.check=r.flags?s(r.check,h,v,d-v):i(r.check,h,v,d-v)),v=_,(r.flags?p:l(p))!==r.check){e.msg="incorrect data check",r.mode=30;break}p=0,m=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;m<32;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(p!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}p=0,m=0}r.mode=29;case 29:j=1;break e;case 30:j=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=d,e.avail_out=_,e.next_in=c,e.avail_in=f,r.hold=p,r.bits=m,(r.wsize||v!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&w(e,e.output,e.next_out,v-e.avail_out)?(r.mode=31,-4):(g-=e.avail_in,v-=e.avail_out,e.total_in+=g,e.total_out+=v,r.total+=v,r.wrap&&v&&(e.adler=r.check=r.flags?s(r.check,h,v,e.next_out-v):i(r.check,h,v,e.next_out-v)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===g&&0===v||4===t)&&0===j&&(j=-5),j)},t.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?-2:(r.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?-2:11===r.mode&&i(1,t,n,0)!==r.check?-3:w(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,r){"use strict";e.exports=function(e,t){var r,n,i,s,a,o,l,u,h,c,d,f,_,p,m,b,w,g,v,y,k,x,z,S,B;r=e.state,n=e.next_in,S=e.input,i=n+(e.avail_in-5),s=e.next_out,B=e.output,a=s-(t-e.avail_out),o=s+(e.avail_out-257),l=r.dmax,u=r.wsize,h=r.whave,c=r.wnext,d=r.window,f=r.hold,_=r.bits,p=r.lencode,m=r.distcode,b=(1<<r.lenbits)-1,w=(1<<r.distbits)-1;e:do{_<15&&(f+=S[n++]<<_,_+=8,f+=S[n++]<<_,_+=8),g=p[f&b];t:for(;;){if(f>>>=v=g>>>24,_-=v,0===(v=g>>>16&255))B[s++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=p[(65535&g)+(f&(1<<v)-1)];continue t}if(32&v){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}y=65535&g,(v&=15)&&(_<v&&(f+=S[n++]<<_,_+=8),y+=f&(1<<v)-1,f>>>=v,_-=v),_<15&&(f+=S[n++]<<_,_+=8,f+=S[n++]<<_,_+=8),g=m[f&w];r:for(;;){if(f>>>=v=g>>>24,_-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=m[(65535&g)+(f&(1<<v)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&g,_<(v&=15)&&(f+=S[n++]<<_,(_+=8)<v&&(f+=S[n++]<<_,_+=8)),(k+=f&(1<<v)-1)>l){e.msg="invalid distance too far back",r.mode=30;break e}if(f>>>=v,_-=v,k>(v=s-a)){if((v=k-v)>h&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=0,z=d,0===c){if(x+=u-v,v<y){y-=v;do{B[s++]=d[x++]}while(--v);x=s-k,z=B}}else if(c<v){if(x+=u+c-v,(v-=c)<y){y-=v;do{B[s++]=d[x++]}while(--v);if(x=0,c<y){y-=v=c;do{B[s++]=d[x++]}while(--v);x=s-k,z=B}}}else if(x+=c-v,v<y){y-=v;do{B[s++]=d[x++]}while(--v);x=s-k,z=B}for(;y>2;)B[s++]=z[x++],B[s++]=z[x++],B[s++]=z[x++],y-=3;y&&(B[s++]=z[x++],y>1&&(B[s++]=z[x++]))}else{x=s-k;do{B[s++]=B[x++],B[s++]=B[x++],B[s++]=B[x++],y-=3}while(y>2);y&&(B[s++]=B[x++],y>1&&(B[s++]=B[x++]))}break}}break}}while(n<i&&s<o);n-=y=_>>3,f&=(1<<(_-=y<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=s<o?o-s+257:257-(s-o),r.hold=f,r.bits=_}},function(e,t,r){"use strict";var n=r(1),i=[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=[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],a=[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],o=[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];e.exports=function(e,t,r,l,u,h,c,d){var f,_,p,m,b,w,g,v,y,k=d.bits,x=0,z=0,S=0,B=0,E=0,A=0,C=0,O=0,j=0,T=0,Z=null,U=0,D=new n.Buf16(16),M=new n.Buf16(16),P=null,R=0;for(x=0;x<=15;x++)D[x]=0;for(z=0;z<l;z++)D[t[r+z]]++;for(E=k,B=15;B>=1&&0===D[B];B--);if(E>B&&(E=B),0===B)return u[h++]=20971520,u[h++]=20971520,d.bits=1,0;for(S=1;S<B&&0===D[S];S++);for(E<S&&(E=S),O=1,x=1;x<=15;x++)if(O<<=1,(O-=D[x])<0)return-1;if(O>0&&(0===e||1!==B))return-1;for(M[1]=0,x=1;x<15;x++)M[x+1]=M[x]+D[x];for(z=0;z<l;z++)0!==t[r+z]&&(c[M[t[r+z]]++]=z);if(0===e?(Z=P=c,w=19):1===e?(Z=i,U-=257,P=s,R-=257,w=256):(Z=a,P=o,w=-1),T=0,z=0,x=S,b=h,A=E,C=0,p=-1,m=(j=1<<E)-1,1===e&&j>852||2===e&&j>592)return 1;for(;;){g=x-C,c[z]<w?(v=0,y=c[z]):c[z]>w?(v=P[R+c[z]],y=Z[U+c[z]]):(v=96,y=0),f=1<<x-C,S=_=1<<A;do{u[b+(T>>C)+(_-=f)]=g<<24|v<<16|y|0}while(0!==_);for(f=1<<x-1;T&f;)f>>=1;if(0!==f?(T&=f-1,T+=f):T=0,z++,0==--D[x]){if(x===B)break;x=t[r+c[z]]}if(x>E&&(T&m)!==p){for(0===C&&(C=E),b+=S,O=1<<(A=x-C);A+C<B&&!((O-=D[A+C])<=0);)A++,O<<=1;if(j+=1<<A,1===e&&j>852||2===e&&j>592)return 1;u[p=T&m]=E<<24|A<<16|b-h|0}}return 0!==T&&(u[b+T]=x-C<<24|64<<16|0),d.bits=E,0}},function(e,t,r){"use strict";e.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}},function(e,t,r){"use strict";var n=[0,255,65535,16777215,4294967295];function i(e,t,r,n,i){var s;for(s=0;s<i;s++)r[n+s]=e[t+s]}function s(e,t,r,n){var i;for(i=0;i<n;i++)e[t+i]=e[t-r+i]}function a(e){this.array=e,this.pos=0}a.prototype.readUncompressedLength=function(){for(var e,t,r=0,n=0;n<32&&this.pos<this.array.length;){if(e=this.array[this.pos],this.pos+=1,(t=127&e)<<n>>>n!==t)return-1;if(r|=t<<n,e<128)return r;n+=7}return-1},a.prototype.uncompressToBuffer=function(e){for(var t,r,a,o,l=this.array,u=l.length,h=this.pos,c=0;h<l.length;)if(t=l[h],h+=1,0==(3&t)){if((r=1+(t>>>2))>60){if(h+3>=u)return!1;a=r-60,r=1+((r=l[h]+(l[h+1]<<8)+(l[h+2]<<16)+(l[h+3]<<24))&n[a]),h+=a}if(h+r>u)return!1;i(l,h,e,c,r),h+=r,c+=r}else{switch(3&t){case 1:r=4+(t>>>2&7),o=l[h]+(t>>>5<<8),h+=1;break;case 2:if(h+1>=u)return!1;r=1+(t>>>2),o=l[h]+(l[h+1]<<8),h+=2;break;case 3:if(h+3>=u)return!1;r=1+(t>>>2),o=l[h]+(l[h+1]<<8)+(l[h+2]<<16)+(l[h+3]<<24),h+=4}if(0===o||o>c)return!1;s(e,c,o,r),c+=r}return!0},t.SnappyDecompressor=a},function(e,t,r){"use strict";var n=new Array(15);function i(e,t){return 506832829*e>>>t}function s(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24)}function a(e,t,r){return e[t]===e[r]&&e[t+1]===e[r+1]&&e[t+2]===e[r+2]&&e[t+3]===e[r+3]}function o(e,t,r,n,i){return r<=60?(n[i]=r-1<<2,i+=1):r<256?(n[i]=240,n[i+1]=r-1,i+=2):(n[i]=244,n[i+1]=r-1&255,n[i+2]=r-1>>>8,i+=3),function(e,t,r,n,i){var s;for(s=0;s<i;s++)r[n+s]=e[t+s]}(e,t,n,i,r),i+r}function l(e,t,r,n){return n<12&&r<2048?(e[t]=1+(n-4<<2)+(r>>>8<<5),e[t+1]=255&r,t+2):(e[t]=2+(n-1<<2),e[t+1]=255&r,e[t+2]=r>>>8,t+3)}function u(e,t,r,n){for(;n>=68;)t=l(e,t,r,64),n-=64;return n>64&&(t=l(e,t,r,60),n-=60),l(e,t,r,n)}function h(e,t,r,l,h){for(var c=1;1<<c<=r&&c<=14;)c+=1;var d=32-(c-=1);void 0===n[c]&&(n[c]=new Uint16Array(1<<c));var f,_=n[c];for(f=0;f<_.length;f++)_[f]=0;var p,m,b,w,g,v,y,k,x,z,S=t+r,B=t,E=t,A=!0;if(r>=15)for(p=S-15,b=i(s(e,t+=1),d);A;){v=32,w=t;do{if(m=b,y=v>>>5,v+=1,w=(t=w)+y,t>p){A=!1;break}b=i(s(e,w),d),g=B+_[m],_[m]=t-B}while(!a(e,t,g));if(!A)break;h=o(e,E,t-E,l,h);do{for(k=t,x=4;t+x<S&&e[t+x]===e[g+x];)x+=1;if(t+=x,h=u(l,h,k-g,x),E=t,t>=p){A=!1;break}_[i(s(e,t-1),d)]=t-1-B,g=B+_[z=i(s(e,t),d)],_[z]=t-B}while(a(e,t,g));if(!A)break;b=i(s(e,t+=1),d)}return E<S&&(h=o(e,E,S-E,l,h)),h}function c(e){this.array=e}c.prototype.maxCompressedLength=function(){var e=this.array.length;return 32+e+Math.floor(e/6)},c.prototype.compressToBuffer=function(e){var t,r=this.array,n=r.length,i=0,s=0;for(s=function(e,t,r){do{t[r]=127&e,(e>>>=7)>0&&(t[r]+=128),r+=1}while(e>0);return r}(n,e,s);i<n;)s=h(r,i,t=Math.min(n-i,65536),e,s),i+=t;return s},t.SnappyCompressor=c},function(e,t,r){"use strict";r.r(t),r.d(t,"Compression",(function(){return u})),r.d(t,"NoCompression",(function(){return c})),r.d(t,"DeflateCompression",(function(){return g})),r.d(t,"GZipCompression",(function(){return y})),r.d(t,"LZ4Compression",(function(){return B})),r.d(t,"ZstdCompression",(function(){return A})),r.d(t,"SnappyCompression",(function(){return j})),r.d(t,"BrotliCompression",(function(){return M})),r.d(t,"LZOCompression",(function(){return R})),r.d(t,"CompressionWorker",(function(){return ie})),r.d(t,"compressOnWorker",(function(){return se}));var n=r(6);function i(e){return e&&"object"==typeof e&&e.isBuffer}function s(e){return n.toBuffer?n.toBuffer(e):e}function a(e){if(i(e))return function(e){if(i(e)){return new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer}return e}(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if("string"==typeof e){const t=e;return(new TextEncoder).encode(t).buffer}if(e&&"object"==typeof e&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}async function o(e){const t=[];for await(const r of e)t.push(r);return function(...e){const t=e.map(e=>e instanceof ArrayBuffer?new Uint8Array(e):e),r=t.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(r);let i=0;for(const e of t)n.set(e,i),i+=e.byteLength;return n.buffer}(...t)}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class u{constructor(e){l(this,"name",void 0),l(this,"extensions",void 0),l(this,"contentEncodings",void 0),l(this,"isSupported",void 0),this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(){}async compress(e){return await this.preload(),this.compressSync(e)}async decompress(e,t){return await this.preload(),this.decompressSync(e,t)}compressSync(e){throw new Error(this.name+": sync compression not supported")}decompressSync(e,t){throw new Error(this.name+": sync decompression not supported")}async*compressBatches(e){const t=await this.concatenate(e);yield this.compress(t)}async*decompressBatches(e){const t=await this.concatenate(e);yield this.decompress(t)}concatenate(e){return o(e)}improveError(e){return e.message.includes(this.name)||(e.message=`${this.name} ${e.message}`),e}}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends u{constructor(e){super(e),h(this,"name","uncompressed"),h(this,"extensions",[]),h(this,"contentEncodings",[]),h(this,"isSupported",!0),h(this,"options",void 0),this.options=e||{}}compressSync(e){return e}decompressSync(e){return e}async*compressBatches(e){return yield*e}async*decompressBatches(e){return yield*e}}var d=r(29),f=r(3),_=r.n(f),p=r(0),m=r.n(p),b=r(30);function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class g extends u{constructor(e={}){super(e),w(this,"name","deflate"),w(this,"extensions",[]),w(this,"contentEncodings",["deflate"]),w(this,"isSupported",!0),w(this,"options",void 0),w(this,"_chunks",[]),this.options=e}async compress(e){var t;if(!d.a&&null!==(t=this.options.deflate)&&void 0!==t&&t.useZlib){var r;return a(null!==(r=this.options.deflate)&&void 0!==r&&r.gzip?await Object(b.promisify)(m.a.gzip)(e):await Object(b.promisify)(m.a.deflate)(e))}return this.compressSync(e)}async decompress(e){var t;if(!d.a&&null!==(t=this.options.deflate)&&void 0!==t&&t.useZlib){var r;return a(null!==(r=this.options.deflate)&&void 0!==r&&r.gzip?await Object(b.promisify)(m.a.gunzip)(e):await Object(b.promisify)(m.a.inflate)(e))}return this.decompressSync(e)}compressSync(e){var t,r;if(!d.a&&null!==(t=this.options.deflate)&&void 0!==t&&t.useZlib){var n;return a(null!==(n=this.options.deflate)&&void 0!==n&&n.gzip?m.a.gzipSync(e):m.a.deflateSync(e))}const i=(null===(r=this.options)||void 0===r?void 0:r.deflate)||{},s=new Uint8Array(e);return _.a.deflate(s,i).buffer}decompressSync(e){var t,r;if(!d.a&&null!==(t=this.options.deflate)&&void 0!==t&&t.useZlib){var n;return a(null!==(n=this.options.deflate)&&void 0!==n&&n.gzip?m.a.gunzipSync(e):m.a.inflateSync(e))}const i=(null===(r=this.options)||void 0===r?void 0:r.deflate)||{},s=new Uint8Array(e);return _.a.inflate(s,i).buffer}async*compressBatches(e){var t;const r=(null===(t=this.options)||void 0===t?void 0:t.deflate)||{},n=new _.a.Deflate(r);yield*this.transformBatches(n,e)}async*decompressBatches(e){var t;const r=(null===(t=this.options)||void 0===t?void 0:t.deflate)||{},n=new _.a.Inflate(r);yield*this.transformBatches(n,e)}async*transformBatches(e,t){e.onData=this._onData.bind(this),e.onEnd=this._onEnd.bind(this);for await(const r of t){const t=new Uint8Array(r);if(!e.push(t,!1))throw new Error(this._getError()+"write");const n=this._getChunks();yield*n}const r=new Uint8Array(0),n=(e.push(r,!0),this._getChunks());yield*n}_onData(e){this._chunks.push(e)}_onEnd(e){if(0!==e)throw new Error(this._getError(e)+this._chunks.length)}_getChunks(){const e=this._chunks;return this._chunks=[],e}_getError(e=0){return`${this.name}: ${{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"}[e]}`}}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class y extends g{constructor(e){super({...e,deflate:{...null==e?void 0:e.gzip,gzip:!0}}),v(this,"name","gzip"),v(this,"extensions",["gz","gzip"]),v(this,"contentEncodings",["gzip","x-gzip"]),v(this,"isSupported",!0)}}function k(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let x,z,S;class B extends u{constructor(e){var t,r;if(super(e),k(this,"name","lz4"),k(this,"extensions",["lz4"]),k(this,"contentEncodings",["x-lz4"]),k(this,"isSupported",!0),k(this,"options",void 0),this.options=e,x=x||(null===(t=this.options)||void 0===t||null===(r=t.modules)||void 0===r?void 0:r.lz4js),!x)throw new Error(this.name)}compressSync(e){const t=new Uint8Array(e);return x.compress(t).buffer}decompressSync(e,t){try{const r=this.checkMagicNumber(e),n=new Uint8Array(e);if(r)return x.decompress(n,t).buffer;if(!t){const e=new Error("Need to provide maxSize");throw this.improveError(e)}let i=new Uint8Array(t);const s=this.decodeBlock(n,i);return i=i.slice(0,s),a(i)}catch(e){throw this.improveError(e)}}decodeBlock(e,t,r,n){r=r||0,n=n||e.length-r;let i=0;for(let s=r;s<n;){const r=e[s++];let a=r>>4;if(a>0){let r=a+240;for(;255===r;)r=e[s++],a+=r;const o=s+a;for(;s<o;)t[i++]=e[s++];if(s===n)return i}const o=e[s++]|e[s++]<<8;if(0===o||o>i)return-(s-2);let l=15&r,u=l+240;for(;255===u;)u=e[s++],l+=u;let h=i-o;const c=i+l+4;for(;i<c;)t[i++]=t[h++]}return i}checkMagicNumber(e){return 407708164===new Uint32Array(e.slice(0,4))[0]}}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class A extends u{constructor(e){var t,r;if(super(e),E(this,"name","zstd"),E(this,"extensions",[]),E(this,"contentEncodings",[]),E(this,"isSupported",!0),E(this,"options",void 0),this.options=e,z=null===(t=this.options)||void 0===t||null===(r=t.modules)||void 0===r?void 0:r["zstd-codec"],!z)throw new Error(this.name)}async preload(){S=S||await new Promise(e=>z.run(t=>e(t)))}compressSync(e){const t=new S.Simple,r=new Uint8Array(e);return t.compress(r).buffer}decompressSync(e){const t=new S.Simple,r=new Uint8Array(e);return t.decompress(r).buffer}}var C=r(7);function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class j extends u{constructor(e){super(e),O(this,"name","snappy"),O(this,"extensions",[]),O(this,"contentEncodings",[]),O(this,"isSupported",!0),O(this,"options",void 0),this.options=e||{}}compressSync(e){return Object(C.compress)(e)}decompressSync(e){return Object(C.uncompress)(e)}}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Z={mode:0,quality:8,lgwin:22};let U,D;class M extends u{constructor(e){super(e),T(this,"name","brotli"),T(this,"extensions",["br"]),T(this,"contentEncodings",["br"]),T(this,"isSupported",!0),T(this,"options",void 0),this.options=e}async preload(){var e,t;if(U=U||(null===(e=this.options)||void 0===e||null===(t=e.modules)||void 0===t?void 0:t.brotli),!U)throw new Error(this.name)}async compress(e){var t;if(!d.a&&null!==(t=this.options.brotli)&&void 0!==t&&t.useZlib){return a(await Object(b.promisify)(m.a.brotliCompress)(e))}return this.compressSync(e)}compressSync(e){var t,r;if(!d.a&&null!==(t=this.options.brotli)&&void 0!==t&&t.useZlib){return a(m.a.brotliCompressSync(e))}const n={...Z,...null===(r=this.options)||void 0===r?void 0:r.brotli},i=new Uint8Array(e);return U.compress(i,n)}async decompress(e){var t;if(!d.a&&null!==(t=this.options.brotli)&&void 0!==t&&t.useZlib){return a(await Object(b.promisify)(m.a.brotliDecompress)(e))}return this.decompressSync(e)}decompressSync(e){var t,r;if(!d.a&&null!==(t=this.options.brotli)&&void 0!==t&&t.useZlib){return a(m.a.brotliDecompressSync(e))}const n={...Z,...null===(r=this.options)||void 0===r?void 0:r.brotli},i=new Uint8Array(e);return U.decompress(i,n)}}function P(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class R extends u{constructor(e){var t,r;if(super(e),P(this,"name","lzo"),P(this,"extensions",[]),P(this,"contentEncodings",[]),P(this,"isSupported",!1),P(this,"options",void 0),this.options=e,D=D||(null===(t=this.options)||void 0===t||null===(r=t.modules)||void 0===r?void 0:r.lzo),!D)throw new Error(this.name)}async preload(){}async compress(e){await this.preload();const t=s(e);return D.compress(t).buffer}async decompress(e){try{await this.preload();const t=s(e);return D.decompress(t).buffer}catch(e){throw e}}}var L=r(14);function N(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}const I=new Map;function F(e){N(e.source&&!e.url||!e.source&&e.url);let t=I.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return W((t=e,`try {\n importScripts('${t}');\n} catch (error) {\n console.error(error);\n throw error;\n}`));var t}(e.url),I.set(e.url,t)),e.source&&(t=W(e.source),I.set(e.source,t))),N(t),t}function W(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function $(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}function H(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Q=()=>{};class K{static isSupported(){return"undefined"!=typeof Worker}constructor(e){H(this,"name",void 0),H(this,"source",void 0),H(this,"url",void 0),H(this,"terminated",!1),H(this,"worker",void 0),H(this,"onMessage",void 0),H(this,"onError",void 0),H(this,"_loadableURL","");const{name:t,source:r,url:n}=e;N(r||n),this.name=t,this.source=r,this.url=n,this.onMessage=Q,this.onError=e=>console.log(e),this.worker=this._createBrowserWorker()}destroy(){this.onMessage=Q,this.onError=Q,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||function e(t,r=!0,n){const i=n||new Set;if(t){if($(t))i.add(t);else if($(t.buffer))i.add(t.buffer);else if(ArrayBuffer.isView(t));else if(r&&"object"==typeof t)for(const n in t)e(t[n],r,i)}else;return void 0===n?Array.from(i):[]}(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=e.message+" in "),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=F({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}}function J(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class Y{constructor(e,t){J(this,"name",void 0),J(this,"workerThread",void 0),J(this,"isRunning",void 0),J(this,"result",void 0),J(this,"_resolve",void 0),J(this,"_reject",void 0),this.name=e,this.workerThread=t,this.isRunning=!0,this._resolve=()=>{},this._reject=()=>{},this.result=new Promise((e,t)=>{this._resolve=e,this._reject=t})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){N(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){N(this.isRunning),this.isRunning=!1,this._reject(e)}}function G(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class V{constructor(e){G(this,"name","unnamed"),G(this,"source",void 0),G(this,"url",void 0),G(this,"maxConcurrency",1),G(this,"maxMobileConcurrency",1),G(this,"onDebug",()=>{}),G(this,"reuseWorkers",!0),G(this,"props",{}),G(this,"jobQueue",[]),G(this,"idleQueue",[]),G(this,"count",0),G(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e,t=((e,t,r)=>e.done(r)),r=((e,t)=>e.error(t))){const n=new Promise(n=>(this.jobQueue.push({name:e,onMessage:t,onError:r,onStart:n}),this));return this._startQueuedJob(),await n}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const r=new Y(t.name,e);e.onMessage=e=>t.onMessage(r,e.type,e.payload),e.onError=e=>t.onError(r,e),t.onStart(r);try{await r.result}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new K({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return L.a?this.maxMobileConcurrency:this.maxConcurrency}}function X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const q={maxConcurrency:3,maxMobileConcurrency:1,onDebug:()=>{},reuseWorkers:!0};class ee{static isSupported(){return K.isSupported()}static getWorkerFarm(e={}){return ee._workerFarm=ee._workerFarm||new ee({}),ee._workerFarm.setProps(e),ee._workerFarm}constructor(e){X(this,"props",void 0),X(this,"workerPools",new Map),this.props={...q},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy()}setProps(e){this.props={...this.props,...e};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:r,url:n}=e;let i=this.workerPools.get(t);return i||(i=new V({name:t,source:r,url:n}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function te(e){return JSON.parse(function(e){const t=new Set;return JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))try{return JSON.parse(JSON.stringify(r))}catch(e){return}t.add(r)}return r})}(e))}X(ee,"_workerFarm",void 0);async function re(e,t,r={},n={}){const i=function(e){const t="3.1.0-alpha.3"!==e.version?" (worker-utils@3.1.0-alpha.3)":"";return`${e.name}@${e.version}${t}`}(e),s=function(e,t={}){const r=t[e.id]||{},n=e.id+"-worker.js";let i=r.workerUrl;if("test"===t._workerType&&(i=`modules/${e.module}/dist/${n}`),!i){let t=e.version;"latest"===t&&(t="beta");const r=t?"@"+t:"";i=`https://unpkg.com/@loaders.gl/${e.module}${r}/dist/${n}`}return N(i),i}(e,r),a=ee.getWorkerFarm(r).getWorkerPool({name:i,url:s}),o=r.jobName||e.name,l=await a.startJob(o,ne.bind(null,n)),u=te(r);l.postMessage("process",{input:t,options:u});return(await l.result).result}async function ne(e,t,r,n){switch(r){case"done":t.done(n);break;case"error":t.error(n.error);break;case"process":const{id:i,input:s,options:a}=n;try{if(!e.process)return void t.postMessage("error",{id:i,error:"Worker not set up to process on main thread"});const r=await e.process(s,a);t.postMessage("done",{id:i,result:r})}catch(e){const r=e instanceof Error?e.message:"unknown error";t.postMessage("error",{id:i,error:r})}break;default:console.warn("process-on-worker: unknown message "+r)}}const ie={id:"compression",name:"compression",module:"compression",version:"3.1.0-alpha.3",options:{}};function se(e,t){return re(ie,e,t)}},,,function(e,t,r){"use strict";(function(e,n){r.d(t,"a",(function(){return i}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document;const i=Boolean("object"!=typeof n||"[object process]"!==String(n)||n.browser),s=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);s&&parseFloat(s[1])}).call(this,r(13),r(5))},function(e,t){}])}));
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=15)}([function(e,t){},function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){var t,r,n,i,s,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)s=e[t],a.set(s,i),i+=s.length;return a}},a={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,s)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(n)},,function(e,t,r){"use strict";var n={};(0,r(1).assign)(n,r(16),r(19),r(12)),e.exports=n},function(e,t,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t){var r,n,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(e){r=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,u=[],h=!1,c=-1;function d(){h&&l&&(h=!1,l.length?u=l.concat(u):c=-1,u.length&&f())}function f(){if(!h){var e=o(d);h=!0;for(var t=u.length;t;){for(l=u,u=[];++c<t;)l&&l[c].run();c=-1,t=u.length}l=null,h=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function _(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new _(e,t)),1!==u.length||h||o(f)},_.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){},function(e,t,r){"use strict";(function(e){function n(){return"object"==typeof e&&"object"==typeof e.versions&&void 0!==e.versions.node}function i(e){return e instanceof Uint8Array&&(!n()||!Buffer.isBuffer(e))}function s(e){return e instanceof ArrayBuffer}function a(e){return!!n()&&Buffer.isBuffer(e)}var o=r(24).SnappyDecompressor,l=r(25).SnappyCompressor,u="Argument compressed must be type of ArrayBuffer, Buffer, or Uint8Array";t.uncompress=function(e){if(!i(e)&&!s(e)&&!a(e))throw new TypeError(u);var t=!1,r=!1;i(e)?t=!0:s(e)&&(r=!0,e=new Uint8Array(e));var n,l,h=new o(e),c=h.readUncompressedLength();if(-1===c)throw new Error("Invalid Snappy bitstream");if(t){if(n=new Uint8Array(c),!h.uncompressToBuffer(n))throw new Error("Invalid Snappy bitstream")}else if(r){if(n=new ArrayBuffer(c),l=new Uint8Array(n),!h.uncompressToBuffer(l))throw new Error("Invalid Snappy bitstream")}else if(n=Buffer.alloc(c),!h.uncompressToBuffer(n))throw new Error("Invalid Snappy bitstream");return n},t.compress=function(e){if(!i(e)&&!s(e)&&!a(e))throw new TypeError(u);var t=!1,r=!1;i(e)?t=!0:s(e)&&(r=!0,e=new Uint8Array(e));var n,o,h,c=new l(e),d=c.maxCompressedLength();if(t?(n=new Uint8Array(d),h=c.compressToBuffer(n)):r?(n=new ArrayBuffer(d),o=new Uint8Array(n),h=c.compressToBuffer(o)):(n=Buffer.alloc(d),h=c.compressToBuffer(n)),!n.slice){var f=new Uint8Array(Array.prototype.slice.call(n,0,h));if(t)return f;if(r)return f.buffer;throw new Error("Not implemented")}return n.slice(0,h)}}).call(this,r(5))},function(e,t,r){"use strict";e.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{s=s+(i=i+t[n++]|0)|0}while(--a);i%=65521,s%=65521}return i|s<<16|0}},function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t,r,i){var s=n,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^s[255&(e^t[o])];return-1^e}},function(e,t,r){"use strict";var n=r(1),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var a=new n.Buf8(256),o=0;o<256;o++)a[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,t.string2buf=function(e){var t,r,i,s,a,o=e.length,l=0;for(s=0;s<o;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(l),a=0,s=0;a<l;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},t.buf2string=function(e,t){var r,n,i,s,o=t||e.length,u=new Array(2*o);for(n=0,r=0;r<o;)if((i=e[r++])<128)u[n++]=i;else if((s=a[i])>4)u[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&r<o;)i=i<<6|63&e[r++],s--;s>1?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return l(u,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},function(e,t,r){"use strict";e.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}},function(e,t,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_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}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";(function(e,n){r.d(t,"a",(function(){return i}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document,"object"!=typeof n||"[object process]"!==String(n)||n.browser;const i="undefined"!=typeof window&&void 0!==window.orientation,s=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);s&&parseFloat(s[1])}).call(this,r(13),r(5))},function(e,t,r){const n=r(26);globalThis.loaders=globalThis.loaders||{},e.exports=Object.assign(globalThis.loaders,n)},function(e,t,r){"use strict";var n=r(17),i=r(1),s=r(10),a=r(4),o=r(11),l=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var h;if(h="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,h)))throw new Error(a[r]);this._dict_set=!0}}function h(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,o=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?o.input=s.string2buf(e):"[object ArrayBuffer]"===l.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new i.Buf8(u),o.next_out=0,o.avail_out=u),1!==(r=n.deflate(o,a))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(s.buf2binstring(i.shrinkBuf(o.output,o.next_out))):this.onData(i.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),o.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=u,t.deflate=h,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,h(e,t)}},function(e,t,r){"use strict";var n,i=r(1),s=r(18),a=r(8),o=r(9),l=r(4);function u(e,t){return e.msg=l[t],t}function h(e){return(e<<1)-(e>4?9:0)}function c(e){for(var t=e.length;--t>=0;)e[t]=0}function d(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function f(e,t){s._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,d(e.strm)}function _(e,t){e.pending_buf[e.pending++]=t}function p(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function m(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,h=e.w_mask,c=e.prev,d=e.strstart+258,f=u[s+a-1],_=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===_&&u[r+a-1]===f&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<d);if(n=258-(d-s),s=d-258,n>a){if(e.match_start=t,a=n,n>=o)break;f=u[s+a-1],_=u[s+a]}}}while((t=c[t&h])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead}function b(e){var t,r,n,s,l,u,h,c,d,f,_=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=_+(_-262)){i.arraySet(e.window,e.window,_,_,0),e.match_start-=_,e.strstart-=_,e.block_start-=_,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=_?n-_:0}while(--r);t=r=_;do{n=e.prev[--t],e.prev[t]=n>=_?n-_:0}while(--r);s+=_}if(0===e.strm.avail_in)break;if(u=e.strm,h=e.window,c=e.strstart+e.lookahead,d=s,f=void 0,(f=u.avail_in)>d&&(f=d),r=0===f?0:(u.avail_in-=f,i.arraySet(h,u.input,u.next_in,f,c),1===u.state.wrap?u.adler=a(u.adler,h,f,c):2===u.state.wrap&&(u.adler=o(u.adler,h,f,c)),u.next_in+=f,u.total_in+=f,f),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function w(e,t){for(var r,n;;){if(e.lookahead<262){if(b(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-262&&(e.match_length=m(e,r)),e.match_length>=3)if(n=s._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(f(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(f(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(f(e,!1),0===e.strm.avail_out)?1:2}function g(e,t){for(var r,n,i;;){if(e.lookahead<262){if(b(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-262&&(e.match_length=m(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(f(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=s._tr_tally(e,0,e.window[e.strstart-1]))&&f(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=s._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(f(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(f(e,!1),0===e.strm.avail_out)?1:2}function v(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function y(){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=8,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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),c(this.dyn_ltree),c(this.dyn_dtree),c(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),c(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),c(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,s._tr_init(t),0):u(e,-2)}function x(e){var t,r=k(e);return 0===r&&((t=e.state).window_size=2*t.w_size,c(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function z(e,t,r,n,s,a){if(!e)return-2;var o=1;if(-1===t&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),s<1||s>9||8!==r||n<8||n>15||t<0||t>9||a<0||a>4)return u(e,-2);8===n&&(n=9);var l=new y;return e.state=l,l.strm=e,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=s+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<s+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=r,x(e)}n=[new v(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(b(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,f(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(f(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(f(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(f(e,!1),e.strm.avail_out),1)})),new v(4,4,8,4,w),new v(4,5,16,8,w),new v(4,6,32,32,w),new v(4,4,16,16,g),new v(8,16,32,32,g),new v(8,16,128,128,g),new v(8,32,128,256,g),new v(32,128,258,1024,g),new v(32,258,258,4096,g)],t.deflateInit=function(e,t){return z(e,t,8,15,8,0)},t.deflateInit2=z,t.deflateReset=x,t.deflateResetKeep=k,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var r,i,a,l;if(!e||!e.state||t>5||t<0)return e?u(e,-2):-2;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return u(e,0===e.avail_out?-5:-2);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,_(i,31),_(i,139),_(i,8),i.gzhead?(_(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),_(i,255&i.gzhead.time),_(i,i.gzhead.time>>8&255),_(i,i.gzhead.time>>16&255),_(i,i.gzhead.time>>24&255),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(_(i,255&i.gzhead.extra.length),_(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=o(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(_(i,0),_(i,0),_(i,0),_(i,0),_(i,0),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,3),i.status=113);else{var m=8+(i.w_bits-8<<4)<<8;m|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(m|=32),m+=31-m%31,i.status=113,p(i,m),0!==i.strstart&&(p(i,e.adler>>>16),p(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),d(e),a=i.pending,i.pending!==i.pending_buf_size));)_(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),d(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,_(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),d(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,_(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&d(e),i.pending+2<=i.pending_buf_size&&(_(i,255&e.adler),_(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(d(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&h(t)<=h(r)&&4!==t)return u(e,-5);if(666===i.status&&0!==e.avail_in)return u(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var w=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(b(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(f(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(f(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(f(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,o=e.window;;){if(e.lookahead<=258){if(b(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=o[i=e.strstart-1])===o[++i]&&n===o[++i]&&n===o[++i]){a=e.strstart+258;do{}while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=s._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(f(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(f(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(f(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==w&&4!==w||(i.status=666),1===w||3===w)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===t?s._tr_align(i):5!==t&&(s._tr_stored_block(i,0,0,!1),3===t&&(c(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),d(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(_(i,255&e.adler),_(i,e.adler>>8&255),_(i,e.adler>>16&255),_(i,e.adler>>24&255),_(i,255&e.total_in),_(i,e.total_in>>8&255),_(i,e.total_in>>16&255),_(i,e.total_in>>24&255)):(p(i,e.adler>>>16),p(i,65535&e.adler)),d(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?u(e,-2):(e.state=null,113===t?u(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var r,n,s,o,l,u,h,d,f=t.length;if(!e||!e.state)return-2;if(2===(o=(r=e.state).wrap)||1===o&&42!==r.status||r.lookahead)return-2;for(1===o&&(e.adler=a(e.adler,t,f,0)),r.wrap=0,f>=r.w_size&&(0===o&&(c(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,t,f-r.w_size,r.w_size,0),t=d,f=r.w_size),l=e.avail_in,u=e.next_in,h=e.input,e.avail_in=f,e.next_in=0,e.input=t,b(r);r.lookahead>=3;){n=r.strstart,s=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--s);r.strstart=n,r.lookahead=2,b(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=u,e.input=h,e.avail_in=l,r.wrap=o,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,r){"use strict";var n=r(1);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var s=[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],a=[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],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var h=new Array(60);i(h);var c=new Array(512);i(c);var d=new Array(256);i(d);var f=new Array(29);i(f);var _,p,m,b=new Array(30);function w(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function g(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function v(e){return e<256?c[e]:c[256+(e>>>7)]}function y(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function k(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,y(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function x(e,t,r){k(e,r[2*t],r[2*t+1])}function z(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function S(e,t,r){var n,i,s=new Array(16),a=0;for(n=1;n<=15;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=z(s[o]++,o))}}function B(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function E(e){e.bi_valid>8?y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function A(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function C(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&A(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!A(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function O(e,t,r){var n,i,o,l,u=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],i=e.pending_buf[e.l_buf+u],u++,0===n?x(e,i,t):(x(e,(o=d[i])+256+1,t),0!==(l=s[o])&&k(e,i-=f[o],l),x(e,o=v(--n),r),0!==(l=a[o])&&k(e,n-=b[o],l))}while(u<e.last_lit);x(e,256,t)}function j(e,t){var r,n,i,s=t.dyn_tree,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<l;r++)0!==s[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=a[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;r>=1;r--)C(e,s,r);i=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],C(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,C(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,l=t.dyn_tree,u=t.max_code,h=t.stat_desc.static_tree,c=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,_=t.stat_desc.max_length,p=0;for(s=0;s<=15;s++)e.bl_count[s]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(s=l[2*l[2*(n=e.heap[r])+1]+1]+1)>_&&(s=_,p++),l[2*n+1]=s,n>u||(e.bl_count[s]++,a=0,n>=f&&(a=d[n-f]),o=l[2*n],e.opt_len+=o*(s+a),c&&(e.static_len+=o*(h[2*n+1]+a)));if(0!==p){do{for(s=_-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[_]--,p-=2}while(p>0);for(s=_;0!==s;s--)for(n=e.bl_count[s];0!==n;)(i=e.heap[--r])>u||(l[2*i+1]!==s&&(e.opt_len+=(s-l[2*i+1])*l[2*i],l[2*i+1]=s),n--)}}(e,t),S(s,u,e.bl_count)}function T(e,t,r){var n,i,s=-1,a=t[1],o=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++o<l&&i===a||(o<u?e.bl_tree[2*i]+=o:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=0,s=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4))}function Z(e,t,r){var n,i,s=-1,a=t[1],o=0,l=7,u=4;for(0===a&&(l=138,u=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++o<l&&i===a)){if(o<u)do{x(e,i,e.bl_tree)}while(0!=--o);else 0!==i?(i!==s&&(x(e,i,e.bl_tree),o--),x(e,16,e.bl_tree),k(e,o-3,2)):o<=10?(x(e,17,e.bl_tree),k(e,o-3,3)):(x(e,18,e.bl_tree),k(e,o-11,7));o=0,s=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4)}}i(b);var U=!1;function D(e,t,r,i){k(e,0+(i?1:0),3),function(e,t,r,i){E(e),i&&(y(e,r),y(e,~r)),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}t._tr_init=function(e){U||(!function(){var e,t,r,n,i,l=new Array(16);for(r=0,n=0;n<28;n++)for(f[n]=r,e=0;e<1<<s[n];e++)d[r++]=n;for(d[r-1]=n,i=0,n=0;n<16;n++)for(b[n]=i,e=0;e<1<<a[n];e++)c[i++]=n;for(i>>=7;n<30;n++)for(b[n]=i<<7,e=0;e<1<<a[n]-7;e++)c[256+i++]=n;for(t=0;t<=15;t++)l[t]=0;for(e=0;e<=143;)u[2*e+1]=8,e++,l[8]++;for(;e<=255;)u[2*e+1]=9,e++,l[9]++;for(;e<=279;)u[2*e+1]=7,e++,l[7]++;for(;e<=287;)u[2*e+1]=8,e++,l[8]++;for(S(u,287,l),e=0;e<30;e++)h[2*e+1]=5,h[2*e]=z(e,5);_=new w(u,s,257,286,15),p=new w(h,a,0,30,15),m=new w(new Array(0),o,0,19,7)}(),U=!0),e.l_desc=new g(e.dyn_ltree,_),e.d_desc=new g(e.dyn_dtree,p),e.bl_desc=new g(e.bl_tree,m),e.bi_buf=0,e.bi_valid=0,B(e)},t._tr_stored_block=D,t._tr_flush_block=function(e,t,r,n){var i,s,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),j(e,e.l_desc),j(e,e.d_desc),a=function(e){var t;for(T(e,e.dyn_ltree,e.l_desc.max_code),T(e,e.dyn_dtree,e.d_desc.max_code),j(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?D(e,t,r,n):4===e.strategy||s===i?(k(e,2+(n?1:0),3),O(e,u,h)):(k(e,4+(n?1:0),3),function(e,t,r,n){var i;for(k(e,t-257,5),k(e,r-1,5),k(e,n-4,4),i=0;i<n;i++)k(e,e.bl_tree[2*l[i]+1],3);Z(e,e.dyn_ltree,t-1),Z(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),O(e,e.dyn_ltree,e.dyn_dtree)),B(e),n&&E(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(d[r]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){k(e,2,3),x(e,256,u),function(e){16===e.bi_valid?(y(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,r){"use strict";var n=r(20),i=r(1),s=r(10),a=r(12),o=r(4),l=r(11),u=r(23),h=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(o[r]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(o[r])}function d(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}c.prototype.push=function(e,t){var r,o,l,u,c,d=this.strm,f=this.options.chunkSize,_=this.options.dictionary,p=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?d.input=s.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(f),d.next_out=0,d.avail_out=f),(r=n.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&_&&(r=n.inflateSetDictionary(this.strm,_)),r===a.Z_BUF_ERROR&&!0===p&&(r=a.Z_OK,p=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==a.Z_STREAM_END&&(0!==d.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(d.output,d.next_out),u=d.next_out-l,c=s.buf2string(d.output,l),d.next_out=u,d.avail_out=f-u,u&&i.arraySet(d.output,d.output,l,u,0),this.onData(c)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(p=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=c,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},function(e,t,r){"use strict";var n=r(1),i=r(8),s=r(9),a=r(21),o=r(22);function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function u(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):-2}function c(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,h(e)):-2}function d(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,c(e))):-2}function f(e,t){var r,n;return e?(n=new u,e.state=n,n.window=null,0!==(r=d(e,t))&&(e.state=null),r):-2}var _,p,m=!0;function b(e){if(m){var t;for(_=new n.Buf32(512),p=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(1,e.lens,0,288,_,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(2,e.lens,0,32,p,0,e.work,{bits:5}),m=!1}e.lencode=_,e.lenbits=9,e.distcode=p,e.distbits=5}function w(e,t,r,i){var s,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((s=a.wsize-a.wnext)>i&&(s=i),n.arraySet(a.window,t,r-i,s,a.wnext),(i-=s)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0}t.inflateReset=c,t.inflateReset2=d,t.inflateResetKeep=h,t.inflateInit=function(e){return f(e,15)},t.inflateInit2=f,t.inflate=function(e,t){var r,u,h,c,d,f,_,p,m,g,v,y,k,x,z,S,B,E,A,C,O,j,T,Z,U=0,D=new n.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(r=e.state).mode&&(r.mode=13),d=e.next_out,h=e.output,_=e.avail_out,c=e.next_in,u=e.input,f=e.avail_in,p=r.hold,m=r.bits,g=f,v=_,j=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(2&r.wrap&&35615===p){r.check=0,D[0]=255&p,D[1]=p>>>8&255,r.check=s(r.check,D,2,0),p=0,m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&p)<<8)+(p>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&p)){e.msg="unknown compression method",r.mode=30;break}if(m-=4,O=8+(15&(p>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<O,e.adler=r.check=1,r.mode=512&p?10:12,p=0,m=0;break;case 2:for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(r.flags=p,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=p>>8&1),512&r.flags&&(D[0]=255&p,D[1]=p>>>8&255,r.check=s(r.check,D,2,0)),p=0,m=0,r.mode=3;case 3:for(;m<32;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.head&&(r.head.time=p),512&r.flags&&(D[0]=255&p,D[1]=p>>>8&255,D[2]=p>>>16&255,D[3]=p>>>24&255,r.check=s(r.check,D,4,0)),p=0,m=0,r.mode=4;case 4:for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.head&&(r.head.xflags=255&p,r.head.os=p>>8),512&r.flags&&(D[0]=255&p,D[1]=p>>>8&255,r.check=s(r.check,D,2,0)),p=0,m=0,r.mode=5;case 5:if(1024&r.flags){for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.length=p,r.head&&(r.head.extra_len=p),512&r.flags&&(D[0]=255&p,D[1]=p>>>8&255,r.check=s(r.check,D,2,0)),p=0,m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((y=r.length)>f&&(y=f),y&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,u,c,y,O)),512&r.flags&&(r.check=s(r.check,u,y,c)),f-=y,c+=y,r.length-=y),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===f)break e;y=0;do{O=u[c+y++],r.head&&O&&r.length<65536&&(r.head.name+=String.fromCharCode(O))}while(O&&y<f);if(512&r.flags&&(r.check=s(r.check,u,y,c)),f-=y,c+=y,O)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===f)break e;y=0;do{O=u[c+y++],r.head&&O&&r.length<65536&&(r.head.comment+=String.fromCharCode(O))}while(O&&y<f);if(512&r.flags&&(r.check=s(r.check,u,y,c)),f-=y,c+=y,O)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;m<16;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(p!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}p=0,m=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;m<32;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}e.adler=r.check=l(p),p=0,m=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=d,e.avail_out=_,e.next_in=c,e.avail_in=f,r.hold=p,r.bits=m,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){p>>>=7&m,m-=7&m,r.mode=27;break}for(;m<3;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}switch(r.last=1&p,m-=1,3&(p>>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6===t){p>>>=2,m-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}p>>>=2,m-=2;break;case 14:for(p>>>=7&m,m-=7&m;m<32;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if((65535&p)!=(p>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&p,p=0,m=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(y=r.length){if(y>f&&(y=f),y>_&&(y=_),0===y)break e;n.arraySet(h,u,c,y,d),f-=y,c+=y,_-=y,d+=y,r.length-=y;break}r.mode=12;break;case 17:for(;m<14;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(r.nlen=257+(31&p),p>>>=5,m-=5,r.ndist=1+(31&p),p>>>=5,m-=5,r.ncode=4+(15&p),p>>>=4,m-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;m<3;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.lens[M[r.have++]]=7&p,p>>>=3,m-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},j=o(0,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,j){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;S=(U=r.lencode[p&(1<<r.lenbits)-1])>>>16&255,B=65535&U,!((z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(B<16)p>>>=z,m-=z,r.lens[r.have++]=B;else{if(16===B){for(Z=z+2;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(p>>>=z,m-=z,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}O=r.lens[r.have-1],y=3+(3&p),p>>>=2,m-=2}else if(17===B){for(Z=z+3;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}m-=z,O=0,y=3+(7&(p>>>=z)),p>>>=3,m-=3}else{for(Z=z+7;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}m-=z,O=0,y=11+(127&(p>>>=z)),p>>>=7,m-=7}if(r.have+y>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;y--;)r.lens[r.have++]=O}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,T={bits:r.lenbits},j=o(1,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,j){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},j=o(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,j){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(f>=6&&_>=258){e.next_out=d,e.avail_out=_,e.next_in=c,e.avail_in=f,r.hold=p,r.bits=m,a(e,v),d=e.next_out,h=e.output,_=e.avail_out,c=e.next_in,u=e.input,f=e.avail_in,p=r.hold,m=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;S=(U=r.lencode[p&(1<<r.lenbits)-1])>>>16&255,B=65535&U,!((z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(S&&0==(240&S)){for(E=z,A=S,C=B;S=(U=r.lencode[C+((p&(1<<E+A)-1)>>E)])>>>16&255,B=65535&U,!(E+(z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}p>>>=E,m-=E,r.back+=E}if(p>>>=z,m-=z,r.back+=z,r.length=B,0===S){r.mode=26;break}if(32&S){r.back=-1,r.mode=12;break}if(64&S){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&S,r.mode=22;case 22:if(r.extra){for(Z=r.extra;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.length+=p&(1<<r.extra)-1,p>>>=r.extra,m-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;S=(U=r.distcode[p&(1<<r.distbits)-1])>>>16&255,B=65535&U,!((z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(0==(240&S)){for(E=z,A=S,C=B;S=(U=r.distcode[C+((p&(1<<E+A)-1)>>E)])>>>16&255,B=65535&U,!(E+(z=U>>>24)<=m);){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}p>>>=E,m-=E,r.back+=E}if(p>>>=z,m-=z,r.back+=z,64&S){e.msg="invalid distance code",r.mode=30;break}r.offset=B,r.extra=15&S,r.mode=24;case 24:if(r.extra){for(Z=r.extra;m<Z;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}r.offset+=p&(1<<r.extra)-1,p>>>=r.extra,m-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===_)break e;if(y=v-_,r.offset>y){if((y=r.offset-y)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}y>r.wnext?(y-=r.wnext,k=r.wsize-y):k=r.wnext-y,y>r.length&&(y=r.length),x=r.window}else x=h,k=d-r.offset,y=r.length;y>_&&(y=_),_-=y,r.length-=y;do{h[d++]=x[k++]}while(--y);0===r.length&&(r.mode=21);break;case 26:if(0===_)break e;h[d++]=r.length,_--,r.mode=21;break;case 27:if(r.wrap){for(;m<32;){if(0===f)break e;f--,p|=u[c++]<<m,m+=8}if(v-=_,e.total_out+=v,r.total+=v,v&&(e.adler=r.check=r.flags?s(r.check,h,v,d-v):i(r.check,h,v,d-v)),v=_,(r.flags?p:l(p))!==r.check){e.msg="incorrect data check",r.mode=30;break}p=0,m=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;m<32;){if(0===f)break e;f--,p+=u[c++]<<m,m+=8}if(p!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}p=0,m=0}r.mode=29;case 29:j=1;break e;case 30:j=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=d,e.avail_out=_,e.next_in=c,e.avail_in=f,r.hold=p,r.bits=m,(r.wsize||v!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&w(e,e.output,e.next_out,v-e.avail_out)?(r.mode=31,-4):(g-=e.avail_in,v-=e.avail_out,e.total_in+=g,e.total_out+=v,r.total+=v,r.wrap&&v&&(e.adler=r.check=r.flags?s(r.check,h,v,e.next_out-v):i(r.check,h,v,e.next_out-v)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===g&&0===v||4===t)&&0===j&&(j=-5),j)},t.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?-2:(r.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?-2:11===r.mode&&i(1,t,n,0)!==r.check?-3:w(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,r){"use strict";e.exports=function(e,t){var r,n,i,s,a,o,l,u,h,c,d,f,_,p,m,b,w,g,v,y,k,x,z,S,B;r=e.state,n=e.next_in,S=e.input,i=n+(e.avail_in-5),s=e.next_out,B=e.output,a=s-(t-e.avail_out),o=s+(e.avail_out-257),l=r.dmax,u=r.wsize,h=r.whave,c=r.wnext,d=r.window,f=r.hold,_=r.bits,p=r.lencode,m=r.distcode,b=(1<<r.lenbits)-1,w=(1<<r.distbits)-1;e:do{_<15&&(f+=S[n++]<<_,_+=8,f+=S[n++]<<_,_+=8),g=p[f&b];t:for(;;){if(f>>>=v=g>>>24,_-=v,0===(v=g>>>16&255))B[s++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=p[(65535&g)+(f&(1<<v)-1)];continue t}if(32&v){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}y=65535&g,(v&=15)&&(_<v&&(f+=S[n++]<<_,_+=8),y+=f&(1<<v)-1,f>>>=v,_-=v),_<15&&(f+=S[n++]<<_,_+=8,f+=S[n++]<<_,_+=8),g=m[f&w];r:for(;;){if(f>>>=v=g>>>24,_-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=m[(65535&g)+(f&(1<<v)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&g,_<(v&=15)&&(f+=S[n++]<<_,(_+=8)<v&&(f+=S[n++]<<_,_+=8)),(k+=f&(1<<v)-1)>l){e.msg="invalid distance too far back",r.mode=30;break e}if(f>>>=v,_-=v,k>(v=s-a)){if((v=k-v)>h&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=0,z=d,0===c){if(x+=u-v,v<y){y-=v;do{B[s++]=d[x++]}while(--v);x=s-k,z=B}}else if(c<v){if(x+=u+c-v,(v-=c)<y){y-=v;do{B[s++]=d[x++]}while(--v);if(x=0,c<y){y-=v=c;do{B[s++]=d[x++]}while(--v);x=s-k,z=B}}}else if(x+=c-v,v<y){y-=v;do{B[s++]=d[x++]}while(--v);x=s-k,z=B}for(;y>2;)B[s++]=z[x++],B[s++]=z[x++],B[s++]=z[x++],y-=3;y&&(B[s++]=z[x++],y>1&&(B[s++]=z[x++]))}else{x=s-k;do{B[s++]=B[x++],B[s++]=B[x++],B[s++]=B[x++],y-=3}while(y>2);y&&(B[s++]=B[x++],y>1&&(B[s++]=B[x++]))}break}}break}}while(n<i&&s<o);n-=y=_>>3,f&=(1<<(_-=y<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=s<o?o-s+257:257-(s-o),r.hold=f,r.bits=_}},function(e,t,r){"use strict";var n=r(1),i=[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=[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],a=[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],o=[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];e.exports=function(e,t,r,l,u,h,c,d){var f,_,p,m,b,w,g,v,y,k=d.bits,x=0,z=0,S=0,B=0,E=0,A=0,C=0,O=0,j=0,T=0,Z=null,U=0,D=new n.Buf16(16),M=new n.Buf16(16),P=null,R=0;for(x=0;x<=15;x++)D[x]=0;for(z=0;z<l;z++)D[t[r+z]]++;for(E=k,B=15;B>=1&&0===D[B];B--);if(E>B&&(E=B),0===B)return u[h++]=20971520,u[h++]=20971520,d.bits=1,0;for(S=1;S<B&&0===D[S];S++);for(E<S&&(E=S),O=1,x=1;x<=15;x++)if(O<<=1,(O-=D[x])<0)return-1;if(O>0&&(0===e||1!==B))return-1;for(M[1]=0,x=1;x<15;x++)M[x+1]=M[x]+D[x];for(z=0;z<l;z++)0!==t[r+z]&&(c[M[t[r+z]]++]=z);if(0===e?(Z=P=c,w=19):1===e?(Z=i,U-=257,P=s,R-=257,w=256):(Z=a,P=o,w=-1),T=0,z=0,x=S,b=h,A=E,C=0,p=-1,m=(j=1<<E)-1,1===e&&j>852||2===e&&j>592)return 1;for(;;){g=x-C,c[z]<w?(v=0,y=c[z]):c[z]>w?(v=P[R+c[z]],y=Z[U+c[z]]):(v=96,y=0),f=1<<x-C,S=_=1<<A;do{u[b+(T>>C)+(_-=f)]=g<<24|v<<16|y|0}while(0!==_);for(f=1<<x-1;T&f;)f>>=1;if(0!==f?(T&=f-1,T+=f):T=0,z++,0==--D[x]){if(x===B)break;x=t[r+c[z]]}if(x>E&&(T&m)!==p){for(0===C&&(C=E),b+=S,O=1<<(A=x-C);A+C<B&&!((O-=D[A+C])<=0);)A++,O<<=1;if(j+=1<<A,1===e&&j>852||2===e&&j>592)return 1;u[p=T&m]=E<<24|A<<16|b-h|0}}return 0!==T&&(u[b+T]=x-C<<24|64<<16|0),d.bits=E,0}},function(e,t,r){"use strict";e.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}},function(e,t,r){"use strict";var n=[0,255,65535,16777215,4294967295];function i(e,t,r,n,i){var s;for(s=0;s<i;s++)r[n+s]=e[t+s]}function s(e,t,r,n){var i;for(i=0;i<n;i++)e[t+i]=e[t-r+i]}function a(e){this.array=e,this.pos=0}a.prototype.readUncompressedLength=function(){for(var e,t,r=0,n=0;n<32&&this.pos<this.array.length;){if(e=this.array[this.pos],this.pos+=1,(t=127&e)<<n>>>n!==t)return-1;if(r|=t<<n,e<128)return r;n+=7}return-1},a.prototype.uncompressToBuffer=function(e){for(var t,r,a,o,l=this.array,u=l.length,h=this.pos,c=0;h<l.length;)if(t=l[h],h+=1,0==(3&t)){if((r=1+(t>>>2))>60){if(h+3>=u)return!1;a=r-60,r=1+((r=l[h]+(l[h+1]<<8)+(l[h+2]<<16)+(l[h+3]<<24))&n[a]),h+=a}if(h+r>u)return!1;i(l,h,e,c,r),h+=r,c+=r}else{switch(3&t){case 1:r=4+(t>>>2&7),o=l[h]+(t>>>5<<8),h+=1;break;case 2:if(h+1>=u)return!1;r=1+(t>>>2),o=l[h]+(l[h+1]<<8),h+=2;break;case 3:if(h+3>=u)return!1;r=1+(t>>>2),o=l[h]+(l[h+1]<<8)+(l[h+2]<<16)+(l[h+3]<<24),h+=4}if(0===o||o>c)return!1;s(e,c,o,r),c+=r}return!0},t.SnappyDecompressor=a},function(e,t,r){"use strict";var n=new Array(15);function i(e,t){return 506832829*e>>>t}function s(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24)}function a(e,t,r){return e[t]===e[r]&&e[t+1]===e[r+1]&&e[t+2]===e[r+2]&&e[t+3]===e[r+3]}function o(e,t,r,n,i){return r<=60?(n[i]=r-1<<2,i+=1):r<256?(n[i]=240,n[i+1]=r-1,i+=2):(n[i]=244,n[i+1]=r-1&255,n[i+2]=r-1>>>8,i+=3),function(e,t,r,n,i){var s;for(s=0;s<i;s++)r[n+s]=e[t+s]}(e,t,n,i,r),i+r}function l(e,t,r,n){return n<12&&r<2048?(e[t]=1+(n-4<<2)+(r>>>8<<5),e[t+1]=255&r,t+2):(e[t]=2+(n-1<<2),e[t+1]=255&r,e[t+2]=r>>>8,t+3)}function u(e,t,r,n){for(;n>=68;)t=l(e,t,r,64),n-=64;return n>64&&(t=l(e,t,r,60),n-=60),l(e,t,r,n)}function h(e,t,r,l,h){for(var c=1;1<<c<=r&&c<=14;)c+=1;var d=32-(c-=1);void 0===n[c]&&(n[c]=new Uint16Array(1<<c));var f,_=n[c];for(f=0;f<_.length;f++)_[f]=0;var p,m,b,w,g,v,y,k,x,z,S=t+r,B=t,E=t,A=!0;if(r>=15)for(p=S-15,b=i(s(e,t+=1),d);A;){v=32,w=t;do{if(m=b,y=v>>>5,v+=1,w=(t=w)+y,t>p){A=!1;break}b=i(s(e,w),d),g=B+_[m],_[m]=t-B}while(!a(e,t,g));if(!A)break;h=o(e,E,t-E,l,h);do{for(k=t,x=4;t+x<S&&e[t+x]===e[g+x];)x+=1;if(t+=x,h=u(l,h,k-g,x),E=t,t>=p){A=!1;break}_[i(s(e,t-1),d)]=t-1-B,g=B+_[z=i(s(e,t),d)],_[z]=t-B}while(a(e,t,g));if(!A)break;b=i(s(e,t+=1),d)}return E<S&&(h=o(e,E,S-E,l,h)),h}function c(e){this.array=e}c.prototype.maxCompressedLength=function(){var e=this.array.length;return 32+e+Math.floor(e/6)},c.prototype.compressToBuffer=function(e){var t,r=this.array,n=r.length,i=0,s=0;for(s=function(e,t,r){do{t[r]=127&e,(e>>>=7)>0&&(t[r]+=128),r+=1}while(e>0);return r}(n,e,s);i<n;)s=h(r,i,t=Math.min(n-i,65536),e,s),i+=t;return s},t.SnappyCompressor=c},function(e,t,r){"use strict";r.r(t),r.d(t,"Compression",(function(){return u})),r.d(t,"NoCompression",(function(){return c})),r.d(t,"DeflateCompression",(function(){return g})),r.d(t,"GZipCompression",(function(){return y})),r.d(t,"LZ4Compression",(function(){return B})),r.d(t,"ZstdCompression",(function(){return A})),r.d(t,"SnappyCompression",(function(){return j})),r.d(t,"BrotliCompression",(function(){return M})),r.d(t,"LZOCompression",(function(){return R})),r.d(t,"CompressionWorker",(function(){return ie})),r.d(t,"compressOnWorker",(function(){return se}));var n=r(6);function i(e){return e&&"object"==typeof e&&e.isBuffer}function s(e){return n.toBuffer?n.toBuffer(e):e}function a(e){if(i(e))return function(e){if(i(e)){return new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer}return e}(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if("string"==typeof e){const t=e;return(new TextEncoder).encode(t).buffer}if(e&&"object"==typeof e&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}async function o(e){const t=[];for await(const r of e)t.push(r);return function(...e){const t=e.map(e=>e instanceof ArrayBuffer?new Uint8Array(e):e),r=t.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(r);let i=0;for(const e of t)n.set(e,i),i+=e.byteLength;return n.buffer}(...t)}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class u{constructor(e){l(this,"name",void 0),l(this,"extensions",void 0),l(this,"contentEncodings",void 0),l(this,"isSupported",void 0),this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(){}async compress(e){return await this.preload(),this.compressSync(e)}async decompress(e,t){return await this.preload(),this.decompressSync(e,t)}compressSync(e){throw new Error(this.name+": sync compression not supported")}decompressSync(e,t){throw new Error(this.name+": sync decompression not supported")}async*compressBatches(e){const t=await this.concatenate(e);yield this.compress(t)}async*decompressBatches(e){const t=await this.concatenate(e);yield this.decompress(t)}concatenate(e){return o(e)}improveError(e){return e.message.includes(this.name)||(e.message=`${this.name} ${e.message}`),e}}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends u{constructor(e){super(e),h(this,"name","uncompressed"),h(this,"extensions",[]),h(this,"contentEncodings",[]),h(this,"isSupported",!0),h(this,"options",void 0),this.options=e||{}}compressSync(e){return e}decompressSync(e){return e}async*compressBatches(e){return yield*e}async*decompressBatches(e){return yield*e}}var d=r(29),f=r(3),_=r.n(f),p=r(0),m=r.n(p),b=r(30);function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class g extends u{constructor(e={}){super(e),w(this,"name","deflate"),w(this,"extensions",[]),w(this,"contentEncodings",["deflate"]),w(this,"isSupported",!0),w(this,"options",void 0),w(this,"_chunks",[]),this.options=e}async compress(e){var t;if(!d.a&&null!==(t=this.options.deflate)&&void 0!==t&&t.useZlib){var r;return a(null!==(r=this.options.deflate)&&void 0!==r&&r.gzip?await Object(b.promisify)(m.a.gzip)(e):await Object(b.promisify)(m.a.deflate)(e))}return this.compressSync(e)}async decompress(e){var t;if(!d.a&&null!==(t=this.options.deflate)&&void 0!==t&&t.useZlib){var r;return a(null!==(r=this.options.deflate)&&void 0!==r&&r.gzip?await Object(b.promisify)(m.a.gunzip)(e):await Object(b.promisify)(m.a.inflate)(e))}return this.decompressSync(e)}compressSync(e){var t,r;if(!d.a&&null!==(t=this.options.deflate)&&void 0!==t&&t.useZlib){var n;return a(null!==(n=this.options.deflate)&&void 0!==n&&n.gzip?m.a.gzipSync(e):m.a.deflateSync(e))}const i=(null===(r=this.options)||void 0===r?void 0:r.deflate)||{},s=new Uint8Array(e);return _.a.deflate(s,i).buffer}decompressSync(e){var t,r;if(!d.a&&null!==(t=this.options.deflate)&&void 0!==t&&t.useZlib){var n;return a(null!==(n=this.options.deflate)&&void 0!==n&&n.gzip?m.a.gunzipSync(e):m.a.inflateSync(e))}const i=(null===(r=this.options)||void 0===r?void 0:r.deflate)||{},s=new Uint8Array(e);return _.a.inflate(s,i).buffer}async*compressBatches(e){var t;const r=(null===(t=this.options)||void 0===t?void 0:t.deflate)||{},n=new _.a.Deflate(r);yield*this.transformBatches(n,e)}async*decompressBatches(e){var t;const r=(null===(t=this.options)||void 0===t?void 0:t.deflate)||{},n=new _.a.Inflate(r);yield*this.transformBatches(n,e)}async*transformBatches(e,t){e.onData=this._onData.bind(this),e.onEnd=this._onEnd.bind(this);for await(const r of t){const t=new Uint8Array(r);if(!e.push(t,!1))throw new Error(this._getError()+"write");const n=this._getChunks();yield*n}const r=new Uint8Array(0),n=(e.push(r,!0),this._getChunks());yield*n}_onData(e){this._chunks.push(e)}_onEnd(e){if(0!==e)throw new Error(this._getError(e)+this._chunks.length)}_getChunks(){const e=this._chunks;return this._chunks=[],e}_getError(e=0){return`${this.name}: ${{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"}[e]}`}}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class y extends g{constructor(e){super({...e,deflate:{...null==e?void 0:e.gzip,gzip:!0}}),v(this,"name","gzip"),v(this,"extensions",["gz","gzip"]),v(this,"contentEncodings",["gzip","x-gzip"]),v(this,"isSupported",!0)}}function k(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let x,z,S;class B extends u{constructor(e){var t,r;if(super(e),k(this,"name","lz4"),k(this,"extensions",["lz4"]),k(this,"contentEncodings",["x-lz4"]),k(this,"isSupported",!0),k(this,"options",void 0),this.options=e,x=x||(null===(t=this.options)||void 0===t||null===(r=t.modules)||void 0===r?void 0:r.lz4js),!x)throw new Error(this.name)}compressSync(e){const t=new Uint8Array(e);return x.compress(t).buffer}decompressSync(e,t){try{const r=this.checkMagicNumber(e),n=new Uint8Array(e);if(r)return x.decompress(n,t).buffer;if(!t){const e=new Error("Need to provide maxSize");throw this.improveError(e)}let i=new Uint8Array(t);const s=this.decodeBlock(n,i);return i=i.slice(0,s),a(i)}catch(e){throw this.improveError(e)}}decodeBlock(e,t,r,n){r=r||0,n=n||e.length-r;let i=0;for(let s=r;s<n;){const r=e[s++];let a=r>>4;if(a>0){let r=a+240;for(;255===r;)r=e[s++],a+=r;const o=s+a;for(;s<o;)t[i++]=e[s++];if(s===n)return i}const o=e[s++]|e[s++]<<8;if(0===o||o>i)return-(s-2);let l=15&r,u=l+240;for(;255===u;)u=e[s++],l+=u;let h=i-o;const c=i+l+4;for(;i<c;)t[i++]=t[h++]}return i}checkMagicNumber(e){return 407708164===new Uint32Array(e.slice(0,4))[0]}}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class A extends u{constructor(e){var t,r;if(super(e),E(this,"name","zstd"),E(this,"extensions",[]),E(this,"contentEncodings",[]),E(this,"isSupported",!0),E(this,"options",void 0),this.options=e,z=null===(t=this.options)||void 0===t||null===(r=t.modules)||void 0===r?void 0:r["zstd-codec"],!z)throw new Error(this.name)}async preload(){S=S||await new Promise(e=>z.run(t=>e(t)))}compressSync(e){const t=new S.Simple,r=new Uint8Array(e);return t.compress(r).buffer}decompressSync(e){const t=new S.Simple,r=new Uint8Array(e);return t.decompress(r).buffer}}var C=r(7);function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class j extends u{constructor(e){super(e),O(this,"name","snappy"),O(this,"extensions",[]),O(this,"contentEncodings",[]),O(this,"isSupported",!0),O(this,"options",void 0),this.options=e||{}}compressSync(e){return Object(C.compress)(e)}decompressSync(e){return Object(C.uncompress)(e)}}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Z={mode:0,quality:8,lgwin:22};let U,D;class M extends u{constructor(e){super(e),T(this,"name","brotli"),T(this,"extensions",["br"]),T(this,"contentEncodings",["br"]),T(this,"isSupported",!0),T(this,"options",void 0),this.options=e}async preload(){var e,t;if(U=U||(null===(e=this.options)||void 0===e||null===(t=e.modules)||void 0===t?void 0:t.brotli),!U)throw new Error(this.name)}async compress(e){var t;if(!d.a&&null!==(t=this.options.brotli)&&void 0!==t&&t.useZlib){return a(await Object(b.promisify)(m.a.brotliCompress)(e))}return this.compressSync(e)}compressSync(e){var t,r;if(!d.a&&null!==(t=this.options.brotli)&&void 0!==t&&t.useZlib){return a(m.a.brotliCompressSync(e))}const n={...Z,...null===(r=this.options)||void 0===r?void 0:r.brotli},i=new Uint8Array(e);return U.compress(i,n)}async decompress(e){var t;if(!d.a&&null!==(t=this.options.brotli)&&void 0!==t&&t.useZlib){return a(await Object(b.promisify)(m.a.brotliDecompress)(e))}return this.decompressSync(e)}decompressSync(e){var t,r;if(!d.a&&null!==(t=this.options.brotli)&&void 0!==t&&t.useZlib){return a(m.a.brotliDecompressSync(e))}const n={...Z,...null===(r=this.options)||void 0===r?void 0:r.brotli},i=new Uint8Array(e);return U.decompress(i,n)}}function P(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class R extends u{constructor(e){var t,r;if(super(e),P(this,"name","lzo"),P(this,"extensions",[]),P(this,"contentEncodings",[]),P(this,"isSupported",!1),P(this,"options",void 0),this.options=e,D=D||(null===(t=this.options)||void 0===t||null===(r=t.modules)||void 0===r?void 0:r.lzo),!D)throw new Error(this.name)}async preload(){}async compress(e){await this.preload();const t=s(e);return D.compress(t).buffer}async decompress(e){try{await this.preload();const t=s(e);return D.decompress(t).buffer}catch(e){throw e}}}var L=r(14);function N(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}const I=new Map;function F(e){N(e.source&&!e.url||!e.source&&e.url);let t=I.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return W((t=e,`try {\n importScripts('${t}');\n} catch (error) {\n console.error(error);\n throw error;\n}`));var t}(e.url),I.set(e.url,t)),e.source&&(t=W(e.source),I.set(e.source,t))),N(t),t}function W(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function $(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}function H(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Q=()=>{};class K{static isSupported(){return"undefined"!=typeof Worker}constructor(e){H(this,"name",void 0),H(this,"source",void 0),H(this,"url",void 0),H(this,"terminated",!1),H(this,"worker",void 0),H(this,"onMessage",void 0),H(this,"onError",void 0),H(this,"_loadableURL","");const{name:t,source:r,url:n}=e;N(r||n),this.name=t,this.source=r,this.url=n,this.onMessage=Q,this.onError=e=>console.log(e),this.worker=this._createBrowserWorker()}destroy(){this.onMessage=Q,this.onError=Q,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||function e(t,r=!0,n){const i=n||new Set;if(t){if($(t))i.add(t);else if($(t.buffer))i.add(t.buffer);else if(ArrayBuffer.isView(t));else if(r&&"object"==typeof t)for(const n in t)e(t[n],r,i)}else;return void 0===n?Array.from(i):[]}(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=e.message+" in "),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=F({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}}function J(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class Y{constructor(e,t){J(this,"name",void 0),J(this,"workerThread",void 0),J(this,"isRunning",void 0),J(this,"result",void 0),J(this,"_resolve",void 0),J(this,"_reject",void 0),this.name=e,this.workerThread=t,this.isRunning=!0,this._resolve=()=>{},this._reject=()=>{},this.result=new Promise((e,t)=>{this._resolve=e,this._reject=t})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){N(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){N(this.isRunning),this.isRunning=!1,this._reject(e)}}function G(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class V{constructor(e){G(this,"name","unnamed"),G(this,"source",void 0),G(this,"url",void 0),G(this,"maxConcurrency",1),G(this,"maxMobileConcurrency",1),G(this,"onDebug",()=>{}),G(this,"reuseWorkers",!0),G(this,"props",{}),G(this,"jobQueue",[]),G(this,"idleQueue",[]),G(this,"count",0),G(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e,t=((e,t,r)=>e.done(r)),r=((e,t)=>e.error(t))){const n=new Promise(n=>(this.jobQueue.push({name:e,onMessage:t,onError:r,onStart:n}),this));return this._startQueuedJob(),await n}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const r=new Y(t.name,e);e.onMessage=e=>t.onMessage(r,e.type,e.payload),e.onError=e=>t.onError(r,e),t.onStart(r);try{await r.result}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new K({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return L.a?this.maxMobileConcurrency:this.maxConcurrency}}function X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const q={maxConcurrency:3,maxMobileConcurrency:1,onDebug:()=>{},reuseWorkers:!0};class ee{static isSupported(){return K.isSupported()}static getWorkerFarm(e={}){return ee._workerFarm=ee._workerFarm||new ee({}),ee._workerFarm.setProps(e),ee._workerFarm}constructor(e){X(this,"props",void 0),X(this,"workerPools",new Map),this.props={...q},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy()}setProps(e){this.props={...this.props,...e};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:r,url:n}=e;let i=this.workerPools.get(t);return i||(i=new V({name:t,source:r,url:n}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function te(e){return JSON.parse(function(e){const t=new Set;return JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))try{return JSON.parse(JSON.stringify(r))}catch(e){return}t.add(r)}return r})}(e))}X(ee,"_workerFarm",void 0);async function re(e,t,r={},n={}){const i=function(e){const t="3.1.0-alpha.4"!==e.version?" (worker-utils@3.1.0-alpha.4)":"";return`${e.name}@${e.version}${t}`}(e),s=function(e,t={}){const r=t[e.id]||{},n=e.id+"-worker.js";let i=r.workerUrl;if("test"===t._workerType&&(i=`modules/${e.module}/dist/${n}`),!i){let t=e.version;"latest"===t&&(t="beta");const r=t?"@"+t:"";i=`https://unpkg.com/@loaders.gl/${e.module}${r}/dist/${n}`}return N(i),i}(e,r),a=ee.getWorkerFarm(r).getWorkerPool({name:i,url:s}),o=r.jobName||e.name,l=await a.startJob(o,ne.bind(null,n)),u=te(r);l.postMessage("process",{input:t,options:u});return(await l.result).result}async function ne(e,t,r,n){switch(r){case"done":t.done(n);break;case"error":t.error(n.error);break;case"process":const{id:i,input:s,options:a}=n;try{if(!e.process)return void t.postMessage("error",{id:i,error:"Worker not set up to process on main thread"});const r=await e.process(s,a);t.postMessage("done",{id:i,result:r})}catch(e){const r=e instanceof Error?e.message:"unknown error";t.postMessage("error",{id:i,error:r})}break;default:console.warn("process-on-worker: unknown message "+r)}}const ie={id:"compression",name:"compression",module:"compression",version:"3.1.0-alpha.4",options:{}};function se(e,t){return re(ie,e,t)}},,,function(e,t,r){"use strict";(function(e,n){r.d(t,"a",(function(){return i}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document;const i=Boolean("object"!=typeof n||"[object process]"!==String(n)||n.browser),s=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);s&&parseFloat(s[1])}).call(this,r(13),r(5))},function(e,t){}])}));
|
|
2
2
|
//# sourceMappingURL=dist.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/bundle.ts"],"names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"mappings":";;AACA,IAAMA,aAAa,GAAGC,OAAO,CAAC,SAAD,CAA7B;;AACAC,UAAU,CAACC,OAAX,GAAqBD,UAAU,CAACC,OAAX,IAAsB,EAA3C;AACAC,MAAM,CAACC,OAAP,GAAiBC,MAAM,CAACC,MAAP,CAAcL,UAAU,CAACC,OAAzB,EAAkCH,aAAlC,CAAjB","sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"file":"bundle.js"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.compressOnWorker = compressOnWorker;
|
|
7
|
+
exports._typecheckCompressionWorker = exports.CompressionWorker = void 0;
|
|
8
|
+
|
|
9
|
+
var _workerUtils = require("@loaders.gl/worker-utils");
|
|
10
|
+
|
|
11
|
+
var VERSION = typeof "3.1.0-alpha.4" !== 'undefined' ? "3.1.0-alpha.4" : 'latest';
|
|
12
|
+
var CompressionWorker = {
|
|
13
|
+
id: 'compression',
|
|
14
|
+
name: 'compression',
|
|
15
|
+
module: 'compression',
|
|
16
|
+
version: VERSION,
|
|
17
|
+
options: {}
|
|
18
|
+
};
|
|
19
|
+
exports.CompressionWorker = CompressionWorker;
|
|
20
|
+
|
|
21
|
+
function compressOnWorker(data, options) {
|
|
22
|
+
return (0, _workerUtils.processOnWorker)(CompressionWorker, data, options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var _typecheckCompressionWorker = CompressionWorker;
|
|
26
|
+
exports._typecheckCompressionWorker = _typecheckCompressionWorker;
|
|
27
|
+
//# sourceMappingURL=compression-worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/compression-worker.ts"],"names":["VERSION","CompressionWorker","id","name","module","version","options","compressOnWorker","data","_typecheckCompressionWorker"],"mappings":";;;;;;;;AACA;;AAIA,IAAMA,OAAO,GAAG,2BAAuB,WAAvB,qBAAmD,QAAnE;AAUO,IAAMC,iBAAiB,GAAG;AAC/BC,EAAAA,EAAE,EAAE,aAD2B;AAE/BC,EAAAA,IAAI,EAAE,aAFyB;AAG/BC,EAAAA,MAAM,EAAE,aAHuB;AAI/BC,EAAAA,OAAO,EAAEL,OAJsB;AAK/BM,EAAAA,OAAO,EAAE;AALsB,CAA1B;;;AAWA,SAASC,gBAAT,CACLC,IADK,EAELF,OAFK,EAGiB;AACtB,SAAO,kCAAgBL,iBAAhB,EAAmCO,IAAnC,EAAyCF,OAAzC,CAAP;AACD;;AAEM,IAAMG,2BAAyC,GAAGR,iBAAlD","sourcesContent":["import type {WorkerObject} from '@loaders.gl/worker-utils';\nimport {processOnWorker} from '@loaders.gl/worker-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type CompressionWorkerOptions = {\n compression: string;\n operation: 'compress' | 'decompress';\n};\n\n/**\n * Worker for Zlib real-time compression and decompression\n */\nexport const CompressionWorker = {\n id: 'compression',\n name: 'compression',\n module: 'compression',\n version: VERSION,\n options: {}\n};\n\n/**\n * Provide type safety\n */\nexport function compressOnWorker(\n data: ArrayBuffer,\n options: CompressionWorkerOptions\n): Promise<ArrayBuffer> {\n return processOnWorker(CompressionWorker, data, options);\n}\n\nexport const _typecheckCompressionWorker: WorkerObject = CompressionWorker;\n"],"file":"compression-worker.js"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Compression", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _compression.Compression;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "NoCompression", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _noCompression.NoCompression;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "DeflateCompression", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _deflateCompression.DeflateCompression;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "GZipCompression", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _gzipCompression.GZipCompression;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "LZ4Compression", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _lz4Compression.LZ4Compression;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "ZstdCompression", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _zstdCompression.ZstdCompression;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "SnappyCompression", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _snappyCompression.SnappyCompression;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "BrotliCompression", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _brotliCompression.BrotliCompression;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "LZOCompression", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _lzoCompression.LZOCompression;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "CompressionWorker", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function get() {
|
|
63
|
+
return _compressionWorker.CompressionWorker;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "compressOnWorker", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function get() {
|
|
69
|
+
return _compressionWorker.compressOnWorker;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
var _compression = require("./lib/compression");
|
|
74
|
+
|
|
75
|
+
var _noCompression = require("./lib/no-compression");
|
|
76
|
+
|
|
77
|
+
var _deflateCompression = require("./lib/deflate-compression");
|
|
78
|
+
|
|
79
|
+
var _gzipCompression = require("./lib/gzip-compression");
|
|
80
|
+
|
|
81
|
+
var _lz4Compression = require("./lib/lz4-compression");
|
|
82
|
+
|
|
83
|
+
var _zstdCompression = require("./lib/zstd-compression");
|
|
84
|
+
|
|
85
|
+
var _snappyCompression = require("./lib/snappy-compression");
|
|
86
|
+
|
|
87
|
+
var _brotliCompression = require("./lib/brotli-compression");
|
|
88
|
+
|
|
89
|
+
var _lzoCompression = require("./lib/lzo-compression");
|
|
90
|
+
|
|
91
|
+
var _compressionWorker = require("./compression-worker");
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA","sourcesContent":["export type {CompressionOptions} from './lib/compression';\n\nexport {Compression} from './lib/compression';\nexport {NoCompression} from './lib/no-compression';\nexport {DeflateCompression} from './lib/deflate-compression';\nexport {GZipCompression} from './lib/gzip-compression';\nexport {LZ4Compression} from './lib/lz4-compression';\nexport {ZstdCompression} from './lib/zstd-compression';\nexport {SnappyCompression} from './lib/snappy-compression';\nexport {BrotliCompression} from './lib/brotli-compression';\nexport {LZOCompression} from './lib/lzo-compression';\n\nexport type {CompressionWorkerOptions} from './compression-worker';\nexport {CompressionWorker, compressOnWorker} from './compression-worker';\n"],"file":"index.js"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.BrotliCompression = void 0;
|
|
9
|
+
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
+
|
|
14
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
+
|
|
16
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
+
|
|
18
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
19
|
+
|
|
20
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
+
|
|
22
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
23
|
+
|
|
24
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
25
|
+
|
|
26
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
27
|
+
|
|
28
|
+
var _compression = require("./compression");
|
|
29
|
+
|
|
30
|
+
var _loaderUtils = require("@loaders.gl/loader-utils");
|
|
31
|
+
|
|
32
|
+
var _zlib = _interopRequireDefault(require("zlib"));
|
|
33
|
+
|
|
34
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
35
|
+
|
|
36
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
37
|
+
|
|
38
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
39
|
+
|
|
40
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
|
+
|
|
42
|
+
var DEFAULT_BROTLI_OPTIONS = {
|
|
43
|
+
brotli: {
|
|
44
|
+
mode: 0,
|
|
45
|
+
quality: 8,
|
|
46
|
+
lgwin: 22
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var brotli;
|
|
50
|
+
|
|
51
|
+
var BrotliCompression = function (_Compression) {
|
|
52
|
+
(0, _inherits2.default)(BrotliCompression, _Compression);
|
|
53
|
+
|
|
54
|
+
var _super = _createSuper(BrotliCompression);
|
|
55
|
+
|
|
56
|
+
function BrotliCompression(options) {
|
|
57
|
+
var _this;
|
|
58
|
+
|
|
59
|
+
(0, _classCallCheck2.default)(this, BrotliCompression);
|
|
60
|
+
_this = _super.call(this, options);
|
|
61
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "name", 'brotli');
|
|
62
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "extensions", ['br']);
|
|
63
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "contentEncodings", ['br']);
|
|
64
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isSupported", true);
|
|
65
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "options", void 0);
|
|
66
|
+
_this.options = options;
|
|
67
|
+
return _this;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
(0, _createClass2.default)(BrotliCompression, [{
|
|
71
|
+
key: "preload",
|
|
72
|
+
value: function () {
|
|
73
|
+
var _preload = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee() {
|
|
74
|
+
var _this$options, _this$options$modules;
|
|
75
|
+
|
|
76
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
77
|
+
while (1) {
|
|
78
|
+
switch (_context.prev = _context.next) {
|
|
79
|
+
case 0:
|
|
80
|
+
brotli = brotli || ((_this$options = this.options) === null || _this$options === void 0 ? void 0 : (_this$options$modules = _this$options.modules) === null || _this$options$modules === void 0 ? void 0 : _this$options$modules.brotli);
|
|
81
|
+
|
|
82
|
+
if (brotli) {
|
|
83
|
+
_context.next = 3;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
throw new Error(this.name);
|
|
88
|
+
|
|
89
|
+
case 3:
|
|
90
|
+
case "end":
|
|
91
|
+
return _context.stop();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}, _callee, this);
|
|
95
|
+
}));
|
|
96
|
+
|
|
97
|
+
function preload() {
|
|
98
|
+
return _preload.apply(this, arguments);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return preload;
|
|
102
|
+
}()
|
|
103
|
+
}, {
|
|
104
|
+
key: "compress",
|
|
105
|
+
value: function () {
|
|
106
|
+
var _compress = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee2(input) {
|
|
107
|
+
var _this$options$brotli;
|
|
108
|
+
|
|
109
|
+
var buffer;
|
|
110
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
111
|
+
while (1) {
|
|
112
|
+
switch (_context2.prev = _context2.next) {
|
|
113
|
+
case 0:
|
|
114
|
+
if (!(!_loaderUtils.isBrowser && (_this$options$brotli = this.options.brotli) !== null && _this$options$brotli !== void 0 && _this$options$brotli.useZlib)) {
|
|
115
|
+
_context2.next = 5;
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
_context2.next = 3;
|
|
120
|
+
return (0, _loaderUtils.promisify)(_zlib.default.brotliCompress)(input);
|
|
121
|
+
|
|
122
|
+
case 3:
|
|
123
|
+
buffer = _context2.sent;
|
|
124
|
+
return _context2.abrupt("return", (0, _loaderUtils.toArrayBuffer)(buffer));
|
|
125
|
+
|
|
126
|
+
case 5:
|
|
127
|
+
return _context2.abrupt("return", this.compressSync(input));
|
|
128
|
+
|
|
129
|
+
case 6:
|
|
130
|
+
case "end":
|
|
131
|
+
return _context2.stop();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}, _callee2, this);
|
|
135
|
+
}));
|
|
136
|
+
|
|
137
|
+
function compress(_x) {
|
|
138
|
+
return _compress.apply(this, arguments);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return compress;
|
|
142
|
+
}()
|
|
143
|
+
}, {
|
|
144
|
+
key: "compressSync",
|
|
145
|
+
value: function compressSync(input) {
|
|
146
|
+
var _this$options$brotli2, _this$options2;
|
|
147
|
+
|
|
148
|
+
if (!_loaderUtils.isBrowser && (_this$options$brotli2 = this.options.brotli) !== null && _this$options$brotli2 !== void 0 && _this$options$brotli2.useZlib) {
|
|
149
|
+
var buffer = _zlib.default.brotliCompressSync(input);
|
|
150
|
+
|
|
151
|
+
return (0, _loaderUtils.toArrayBuffer)(buffer);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
var brotliOptions = _objectSpread(_objectSpread({}, DEFAULT_BROTLI_OPTIONS.brotli), (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.brotli);
|
|
155
|
+
|
|
156
|
+
var inputArray = new Uint8Array(input);
|
|
157
|
+
return brotli.compress(inputArray, brotliOptions);
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
key: "decompress",
|
|
161
|
+
value: function () {
|
|
162
|
+
var _decompress = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee3(input) {
|
|
163
|
+
var _this$options$brotli3;
|
|
164
|
+
|
|
165
|
+
var buffer;
|
|
166
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
167
|
+
while (1) {
|
|
168
|
+
switch (_context3.prev = _context3.next) {
|
|
169
|
+
case 0:
|
|
170
|
+
if (!(!_loaderUtils.isBrowser && (_this$options$brotli3 = this.options.brotli) !== null && _this$options$brotli3 !== void 0 && _this$options$brotli3.useZlib)) {
|
|
171
|
+
_context3.next = 5;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
_context3.next = 3;
|
|
176
|
+
return (0, _loaderUtils.promisify)(_zlib.default.brotliDecompress)(input);
|
|
177
|
+
|
|
178
|
+
case 3:
|
|
179
|
+
buffer = _context3.sent;
|
|
180
|
+
return _context3.abrupt("return", (0, _loaderUtils.toArrayBuffer)(buffer));
|
|
181
|
+
|
|
182
|
+
case 5:
|
|
183
|
+
return _context3.abrupt("return", this.decompressSync(input));
|
|
184
|
+
|
|
185
|
+
case 6:
|
|
186
|
+
case "end":
|
|
187
|
+
return _context3.stop();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}, _callee3, this);
|
|
191
|
+
}));
|
|
192
|
+
|
|
193
|
+
function decompress(_x2) {
|
|
194
|
+
return _decompress.apply(this, arguments);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return decompress;
|
|
198
|
+
}()
|
|
199
|
+
}, {
|
|
200
|
+
key: "decompressSync",
|
|
201
|
+
value: function decompressSync(input) {
|
|
202
|
+
var _this$options$brotli4, _this$options3;
|
|
203
|
+
|
|
204
|
+
if (!_loaderUtils.isBrowser && (_this$options$brotli4 = this.options.brotli) !== null && _this$options$brotli4 !== void 0 && _this$options$brotli4.useZlib) {
|
|
205
|
+
var buffer = _zlib.default.brotliDecompressSync(input);
|
|
206
|
+
|
|
207
|
+
return (0, _loaderUtils.toArrayBuffer)(buffer);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
var brotliOptions = _objectSpread(_objectSpread({}, DEFAULT_BROTLI_OPTIONS.brotli), (_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.brotli);
|
|
211
|
+
|
|
212
|
+
var inputArray = new Uint8Array(input);
|
|
213
|
+
return brotli.decompress(inputArray, brotliOptions);
|
|
214
|
+
}
|
|
215
|
+
}]);
|
|
216
|
+
return BrotliCompression;
|
|
217
|
+
}(_compression.Compression);
|
|
218
|
+
|
|
219
|
+
exports.BrotliCompression = BrotliCompression;
|
|
220
|
+
//# sourceMappingURL=brotli-compression.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/brotli-compression.ts"],"names":["DEFAULT_BROTLI_OPTIONS","brotli","mode","quality","lgwin","BrotliCompression","options","modules","Error","name","input","isBrowser","useZlib","zlib","brotliCompress","buffer","compressSync","brotliCompressSync","brotliOptions","inputArray","Uint8Array","compress","brotliDecompress","decompressSync","brotliDecompressSync","decompress","Compression"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;AACA;;AAGA;;;;;;;;;;AAYA,IAAMA,sBAAsB,GAAG;AAC7BC,EAAAA,MAAM,EAAE;AACNC,IAAAA,IAAI,EAAE,CADA;AAENC,IAAAA,OAAO,EAAE,CAFH;AAGNC,IAAAA,KAAK,EAAE;AAHD;AADqB,CAA/B;AAQA,IAAIH,MAAJ;;IAKaI,iB;;;;;AAOX,6BAAYC,OAAZ,EAA+C;AAAA;;AAAA;AAC7C,8BAAMA,OAAN;AAD6C,uFANvB,QAMuB;AAAA,6FALzB,CAAC,IAAD,CAKyB;AAAA,mGAJnB,CAAC,IAAD,CAImB;AAAA,8FAHxB,IAGwB;AAAA;AAE7C,UAAKA,OAAL,GAAeA,OAAf;AAF6C;AAG9C;;;;;+EAMD;AAAA;;AAAA;AAAA;AAAA;AAAA;AACEL,gBAAAA,MAAM,GAAGA,MAAM,sBAAI,KAAKK,OAAT,2EAAI,cAAcC,OAAlB,0DAAI,sBAAuBN,MAA3B,CAAf;;AADF,oBAEOA,MAFP;AAAA;AAAA;AAAA;;AAAA,sBAGU,IAAIO,KAAJ,CAAU,KAAKC,IAAf,CAHV;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;gFAOA,kBAAeC,KAAf;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAEM,CAACC,sBAAD,4BAAc,KAAKL,OAAL,CAAaL,MAA3B,iDAAc,qBAAqBW,OAFzC;AAAA;AAAA;AAAA;;AAAA;AAAA,uBAGyB,4BAAUC,cAAKC,cAAf,EAA+BJ,KAA/B,CAHzB;;AAAA;AAGUK,gBAAAA,MAHV;AAAA,kDAIW,gCAAcA,MAAd,CAJX;;AAAA;AAAA,kDAMS,KAAKC,YAAL,CAAkBN,KAAlB,CANT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;WASA,sBAAaA,KAAb,EAA8C;AAAA;;AAE5C,UAAI,CAACC,sBAAD,6BAAc,KAAKL,OAAL,CAAaL,MAA3B,kDAAc,sBAAqBW,OAAvC,EAAgD;AAC9C,YAAMG,MAAM,GAAGF,cAAKI,kBAAL,CAAwBP,KAAxB,CAAf;;AACA,eAAO,gCAAcK,MAAd,CAAP;AACD;;AACD,UAAMG,aAAa,mCAAOlB,sBAAsB,CAACC,MAA9B,qBAAyC,KAAKK,OAA9C,mDAAyC,eAAcL,MAAvD,CAAnB;;AACA,UAAMkB,UAAU,GAAG,IAAIC,UAAJ,CAAeV,KAAf,CAAnB;AAEA,aAAOT,MAAM,CAACoB,QAAP,CAAgBF,UAAhB,EAA4BD,aAA5B,CAAP;AACD;;;;kFAED,kBAAiBR,KAAjB;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAEM,CAACC,sBAAD,6BAAc,KAAKL,OAAL,CAAaL,MAA3B,kDAAc,sBAAqBW,OAFzC;AAAA;AAAA;AAAA;;AAAA;AAAA,uBAGyB,4BAAUC,cAAKS,gBAAf,EAAiCZ,KAAjC,CAHzB;;AAAA;AAGUK,gBAAAA,MAHV;AAAA,kDAIW,gCAAcA,MAAd,CAJX;;AAAA;AAAA,kDAMS,KAAKQ,cAAL,CAAoBb,KAApB,CANT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;WASA,wBAAeA,KAAf,EAAgD;AAAA;;AAE9C,UAAI,CAACC,sBAAD,6BAAc,KAAKL,OAAL,CAAaL,MAA3B,kDAAc,sBAAqBW,OAAvC,EAAgD;AAC9C,YAAMG,MAAM,GAAGF,cAAKW,oBAAL,CAA0Bd,KAA1B,CAAf;;AACA,eAAO,gCAAcK,MAAd,CAAP;AACD;;AACD,UAAMG,aAAa,mCAAOlB,sBAAsB,CAACC,MAA9B,qBAAyC,KAAKK,OAA9C,mDAAyC,eAAcL,MAAvD,CAAnB;;AACA,UAAMkB,UAAU,GAAG,IAAIC,UAAJ,CAAeV,KAAf,CAAnB;AAEA,aAAOT,MAAM,CAACwB,UAAP,CAAkBN,UAAlB,EAA8BD,aAA9B,CAAP;AACD;;;EA/DoCQ,wB","sourcesContent":["// BROTLI\nimport type {CompressionOptions} from './compression';\nimport {Compression} from './compression';\nimport {isBrowser, toArrayBuffer} from '@loaders.gl/loader-utils';\nimport type brotliNamespace from 'brotli';\n// import brotli from 'brotli'; // https://bundlephobia.com/package/brotli\nimport zlib from 'zlib';\nimport {promisify} from '@loaders.gl/loader-utils';\n\nexport type BrotliCompressionOptions = CompressionOptions & {\n brotli?: {\n mode?: number;\n quality?: number;\n lgwin?: number;\n useZlib?: boolean;\n };\n};\n\nconst DEFAULT_BROTLI_OPTIONS = {\n brotli: {\n mode: 0,\n quality: 8,\n lgwin: 22\n }\n};\n\nlet brotli: typeof brotliNamespace;\n\n/**\n * brotli compression / decompression\n */\nexport class BrotliCompression extends Compression {\n readonly name: string = 'brotli';\n readonly extensions = ['br'];\n readonly contentEncodings = ['br'];\n readonly isSupported = true;\n readonly options: BrotliCompressionOptions;\n\n constructor(options: BrotliCompressionOptions) {\n super(options);\n this.options = options;\n }\n\n /**\n * brotli is an injectable dependency due to big size\n * @param options\n */\n async preload(): Promise<void> {\n brotli = brotli || this.options?.modules?.brotli;\n if (!brotli) {\n throw new Error(this.name);\n }\n }\n\n async compress(input: ArrayBuffer): Promise<ArrayBuffer> {\n // On Node.js we can use built-in zlib\n if (!isBrowser && this.options.brotli?.useZlib) {\n const buffer = await promisify(zlib.brotliCompress)(input);\n return toArrayBuffer(buffer);\n }\n return this.compressSync(input);\n }\n\n compressSync(input: ArrayBuffer): ArrayBuffer {\n // On Node.js we can use built-in zlib\n if (!isBrowser && this.options.brotli?.useZlib) {\n const buffer = zlib.brotliCompressSync(input);\n return toArrayBuffer(buffer);\n }\n const brotliOptions = {...DEFAULT_BROTLI_OPTIONS.brotli, ...this.options?.brotli};\n const inputArray = new Uint8Array(input);\n // @ts-ignore brotli types state that only Buffers are accepted...\n return brotli.compress(inputArray, brotliOptions);\n }\n\n async decompress(input: ArrayBuffer): Promise<ArrayBuffer> {\n // On Node.js we can use built-in zlib\n if (!isBrowser && this.options.brotli?.useZlib) {\n const buffer = await promisify(zlib.brotliDecompress)(input);\n return toArrayBuffer(buffer);\n }\n return this.decompressSync(input);\n }\n\n decompressSync(input: ArrayBuffer): ArrayBuffer {\n // On Node.js we can use built-in zlib\n if (!isBrowser && this.options.brotli?.useZlib) {\n const buffer = zlib.brotliDecompressSync(input);\n return toArrayBuffer(buffer);\n }\n const brotliOptions = {...DEFAULT_BROTLI_OPTIONS.brotli, ...this.options?.brotli};\n const inputArray = new Uint8Array(input);\n // @ts-ignore brotli types state that only Buffers are accepted...\n return brotli.decompress(inputArray, brotliOptions);\n }\n}\n"],"file":"brotli-compression.js"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Compression = void 0;
|
|
9
|
+
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
+
|
|
14
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
+
|
|
16
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
+
|
|
18
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
|
+
|
|
20
|
+
var _awaitAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/awaitAsyncGenerator"));
|
|
21
|
+
|
|
22
|
+
var _wrapAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapAsyncGenerator"));
|
|
23
|
+
|
|
24
|
+
var _loaderUtils = require("@loaders.gl/loader-utils");
|
|
25
|
+
|
|
26
|
+
var Compression = function () {
|
|
27
|
+
function Compression(options) {
|
|
28
|
+
(0, _classCallCheck2.default)(this, Compression);
|
|
29
|
+
(0, _defineProperty2.default)(this, "name", void 0);
|
|
30
|
+
(0, _defineProperty2.default)(this, "extensions", void 0);
|
|
31
|
+
(0, _defineProperty2.default)(this, "contentEncodings", void 0);
|
|
32
|
+
(0, _defineProperty2.default)(this, "isSupported", void 0);
|
|
33
|
+
this.compressBatches = this.compressBatches.bind(this);
|
|
34
|
+
this.decompressBatches = this.decompressBatches.bind(this);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
(0, _createClass2.default)(Compression, [{
|
|
38
|
+
key: "preload",
|
|
39
|
+
value: function () {
|
|
40
|
+
var _preload = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee() {
|
|
41
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
42
|
+
while (1) {
|
|
43
|
+
switch (_context.prev = _context.next) {
|
|
44
|
+
case 0:
|
|
45
|
+
return _context.abrupt("return");
|
|
46
|
+
|
|
47
|
+
case 1:
|
|
48
|
+
case "end":
|
|
49
|
+
return _context.stop();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}, _callee);
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
function preload() {
|
|
56
|
+
return _preload.apply(this, arguments);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return preload;
|
|
60
|
+
}()
|
|
61
|
+
}, {
|
|
62
|
+
key: "compress",
|
|
63
|
+
value: function () {
|
|
64
|
+
var _compress = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee2(input) {
|
|
65
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
66
|
+
while (1) {
|
|
67
|
+
switch (_context2.prev = _context2.next) {
|
|
68
|
+
case 0:
|
|
69
|
+
_context2.next = 2;
|
|
70
|
+
return this.preload();
|
|
71
|
+
|
|
72
|
+
case 2:
|
|
73
|
+
return _context2.abrupt("return", this.compressSync(input));
|
|
74
|
+
|
|
75
|
+
case 3:
|
|
76
|
+
case "end":
|
|
77
|
+
return _context2.stop();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, _callee2, this);
|
|
81
|
+
}));
|
|
82
|
+
|
|
83
|
+
function compress(_x) {
|
|
84
|
+
return _compress.apply(this, arguments);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return compress;
|
|
88
|
+
}()
|
|
89
|
+
}, {
|
|
90
|
+
key: "decompress",
|
|
91
|
+
value: function () {
|
|
92
|
+
var _decompress = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee3(input, size) {
|
|
93
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
94
|
+
while (1) {
|
|
95
|
+
switch (_context3.prev = _context3.next) {
|
|
96
|
+
case 0:
|
|
97
|
+
_context3.next = 2;
|
|
98
|
+
return this.preload();
|
|
99
|
+
|
|
100
|
+
case 2:
|
|
101
|
+
return _context3.abrupt("return", this.decompressSync(input, size));
|
|
102
|
+
|
|
103
|
+
case 3:
|
|
104
|
+
case "end":
|
|
105
|
+
return _context3.stop();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}, _callee3, this);
|
|
109
|
+
}));
|
|
110
|
+
|
|
111
|
+
function decompress(_x2, _x3) {
|
|
112
|
+
return _decompress.apply(this, arguments);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return decompress;
|
|
116
|
+
}()
|
|
117
|
+
}, {
|
|
118
|
+
key: "compressSync",
|
|
119
|
+
value: function compressSync(input) {
|
|
120
|
+
throw new Error("".concat(this.name, ": sync compression not supported"));
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "decompressSync",
|
|
124
|
+
value: function decompressSync(input, size) {
|
|
125
|
+
throw new Error("".concat(this.name, ": sync decompression not supported"));
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
key: "compressBatches",
|
|
129
|
+
value: function compressBatches(asyncIterator) {
|
|
130
|
+
var _this = this;
|
|
131
|
+
|
|
132
|
+
return (0, _wrapAsyncGenerator2.default)(_regenerator.default.mark(function _callee4() {
|
|
133
|
+
var input;
|
|
134
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
135
|
+
while (1) {
|
|
136
|
+
switch (_context4.prev = _context4.next) {
|
|
137
|
+
case 0:
|
|
138
|
+
_context4.next = 2;
|
|
139
|
+
return (0, _awaitAsyncGenerator2.default)(_this.concatenate(asyncIterator));
|
|
140
|
+
|
|
141
|
+
case 2:
|
|
142
|
+
input = _context4.sent;
|
|
143
|
+
_context4.next = 5;
|
|
144
|
+
return _this.compress(input);
|
|
145
|
+
|
|
146
|
+
case 5:
|
|
147
|
+
case "end":
|
|
148
|
+
return _context4.stop();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, _callee4);
|
|
152
|
+
}))();
|
|
153
|
+
}
|
|
154
|
+
}, {
|
|
155
|
+
key: "decompressBatches",
|
|
156
|
+
value: function decompressBatches(asyncIterator) {
|
|
157
|
+
var _this2 = this;
|
|
158
|
+
|
|
159
|
+
return (0, _wrapAsyncGenerator2.default)(_regenerator.default.mark(function _callee5() {
|
|
160
|
+
var input;
|
|
161
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
162
|
+
while (1) {
|
|
163
|
+
switch (_context5.prev = _context5.next) {
|
|
164
|
+
case 0:
|
|
165
|
+
_context5.next = 2;
|
|
166
|
+
return (0, _awaitAsyncGenerator2.default)(_this2.concatenate(asyncIterator));
|
|
167
|
+
|
|
168
|
+
case 2:
|
|
169
|
+
input = _context5.sent;
|
|
170
|
+
_context5.next = 5;
|
|
171
|
+
return _this2.decompress(input);
|
|
172
|
+
|
|
173
|
+
case 5:
|
|
174
|
+
case "end":
|
|
175
|
+
return _context5.stop();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}, _callee5);
|
|
179
|
+
}))();
|
|
180
|
+
}
|
|
181
|
+
}, {
|
|
182
|
+
key: "concatenate",
|
|
183
|
+
value: function concatenate(asyncIterator) {
|
|
184
|
+
return (0, _loaderUtils.concatenateArrayBuffersAsync)(asyncIterator);
|
|
185
|
+
}
|
|
186
|
+
}, {
|
|
187
|
+
key: "improveError",
|
|
188
|
+
value: function improveError(error) {
|
|
189
|
+
if (!error.message.includes(this.name)) {
|
|
190
|
+
error.message = "".concat(this.name, " ").concat(error.message);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return error;
|
|
194
|
+
}
|
|
195
|
+
}]);
|
|
196
|
+
return Compression;
|
|
197
|
+
}();
|
|
198
|
+
|
|
199
|
+
exports.Compression = Compression;
|
|
200
|
+
//# sourceMappingURL=compression.js.map
|