ecg-dicom-web-viewer
Version:
Together with the cornerstone library, this project allows reading and drawing ECGs from a dcm in web version.
2 lines • 1.2 MB
JavaScript
/*! For license information please see index.umd.js.LICENSE.txt */
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.$=n():e.$=n()}(self,(()=>(()=>{"use strict";var e={151:(e,n,a)=>{a.d(n,{A:()=>o});var r=a(379),t=a.n(r),i=a(364),v=a.n(i)()(t());v.push([e.id,"/*Table Data Study*/\n#infoECG {\n height: auto;\n}\n.divTableRow {\n display: table-row;\n}\n.divTableHeading {\n background-color: #eee;\n display: table-header-group;\n}\n.divTableCell,\n.divTableHead {\n display: table-cell;\n font-size: 13px;\n font-weight: 700;\n color: #000000;\n}\n.divTableCell i {\n font-weight: normal;\n}\n.divTableHeading {\n background-color: #eee;\n display: table-header-group;\n font-weight: bold;\n}\n.divTableFoot {\n background-color: #eee;\n display: table-footer-group;\n font-weight: bold;\n}\n#divTableBody {\n height: auto;\n background: #f9f8f2;\n width: 100%;\n display: table;\n padding: 10px;\n}\n\n/** Buttons **/\n#toolsECG {\n background: #f9f8f2;\n width: 100%;\n display: flow-root;\n border-top: 2px solid rgb(0, 0, 0);\n}\n.divTools {\n float: right;\n font-size: 13px;\n font-weight: 700;\n margin-left: 1.5rem;\n}\n.divTools i {\n font-weight: normal;\n}\n.divTools button {\n background-color: #dadada;\n color: black;\n padding: 5px 15px;\n margin: 4px 2px;\n border-radius: 10%;\n}\n\n/*Zoom buttons*/\n#zoomButons {\n position: absolute;\n width: 30px;\n top: 125px;\n right: 2px;\n}\n\n#zoomButons button {\n background-color: #dadada;\n color: black;\n padding: 5px;\n width: 30px;\n height: 30px;\n margin: 0px 0px 2px 0px;\n border-radius: 10%;\n}\n",""]);const o=v},364:e=>{e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var a="",r=void 0!==n[5];return n[4]&&(a+="@supports (".concat(n[4],") {")),n[2]&&(a+="@media ".concat(n[2]," {")),r&&(a+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),a+=e(n),r&&(a+="}"),n[2]&&(a+="}"),n[4]&&(a+="}"),a})).join("")},n.i=function(e,a,r,t,i){"string"==typeof e&&(e=[[null,e,void 0]]);var v={};if(r)for(var o=0;o<this.length;o++){var m=this[o][0];null!=m&&(v[m]=!0)}for(var s=0;s<e.length;s++){var S=[].concat(e[s]);r&&v[S[0]]||(void 0!==i&&(void 0===S[5]||(S[1]="@layer".concat(S[5].length>0?" ".concat(S[5]):""," {").concat(S[1],"}")),S[5]=i),a&&(S[2]?(S[1]="@media ".concat(S[2]," {").concat(S[1],"}"),S[2]=a):S[2]=a),t&&(S[4]?(S[1]="@supports (".concat(S[4],") {").concat(S[1],"}"),S[4]=t):S[4]="".concat(t)),n.push(S))}},n}},379:e=>{e.exports=function(e){return e[1]}},886:(e,n,a)=>{a.r(n),a.d(n,{DICOMWEB:()=>Ct,adapters:()=>fo,anonymizer:()=>os,data:()=>ts,default:()=>ms,derivations:()=>is,log:()=>v,normalizers:()=>vs,sr:()=>as,utilities:()=>Fo});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==a.g?a.g:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i={exports:{}};!function(e){var n,a;n=r,a=function(){var e=function(){},n="undefined",a=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],t={},i=null;function v(e,n){var a=e[n];if("function"==typeof a.bind)return a.bind(e);try{return Function.prototype.bind.call(a,e)}catch(n){return function(){return Function.prototype.apply.apply(a,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function m(){for(var a=this.getLevel(),t=0;t<r.length;t++){var i=r[t];this[i]=t<a?e:this.methodFactory(i,a,this.name)}if(this.log=this.debug,typeof console===n&&a<this.levels.SILENT)return"No console available for logging"}function s(e){return function(){typeof console!==n&&(m.call(this),this[e].apply(this,arguments))}}function S(r,t,i){return function(r){return"debug"===r&&(r="log"),typeof console!==n&&("trace"===r&&a?o:void 0!==console[r]?v(console,r):void 0!==console.log?v(console,"log"):e)}(r)||s.apply(this,arguments)}function g(e,a){var v,o,s,g=this,I="loglevel";function D(){var e;if(typeof window!==n&&I){try{e=window.localStorage[I]}catch(e){}if(typeof e===n)try{var a=window.document.cookie,r=encodeURIComponent(I),t=a.indexOf(r+"=");-1!==t&&(e=/^([^;]+)/.exec(a.slice(t+r.length+1))[1])}catch(e){}return void 0===g.levels[e]&&(e=void 0),e}}function c(e){var n=e;if("string"==typeof n&&void 0!==g.levels[n.toUpperCase()]&&(n=g.levels[n.toUpperCase()]),"number"==typeof n&&n>=0&&n<=g.levels.SILENT)return n;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?I+=":"+e:"symbol"==typeof e&&(I=void 0),g.name=e,g.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},g.methodFactory=a||S,g.getLevel=function(){return null!=s?s:null!=o?o:v},g.setLevel=function(e,a){return s=c(e),!1!==a&&function(e){var a=(r[e]||"silent").toUpperCase();if(typeof window!==n&&I){try{return void(window.localStorage[I]=a)}catch(e){}try{window.document.cookie=encodeURIComponent(I)+"="+a+";"}catch(e){}}}(s),m.call(g)},g.setDefaultLevel=function(e){o=c(e),D()||g.setLevel(e,!1)},g.resetLevel=function(){s=null,function(){if(typeof window!==n&&I){try{window.localStorage.removeItem(I)}catch(e){}try{window.document.cookie=encodeURIComponent(I)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),m.call(g)},g.enableAll=function(e){g.setLevel(g.levels.TRACE,e)},g.disableAll=function(e){g.setLevel(g.levels.SILENT,e)},g.rebuild=function(){if(i!==g&&(v=c(i.getLevel())),m.call(g),i===g)for(var e in t)t[e].rebuild()},v=c(i?i.getLevel():"WARN");var C=D();null!=C&&(s=c(C)),m.call(g)}(i=new g).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var n=t[e];return n||(n=t[e]=new g(e,i.methodFactory)),n};var I=typeof window!==n?window.log:void 0;return i.noConflict=function(){return typeof window!==n&&window.log===i&&(window.log=I),i},i.getLoggers=function(){return t},i.default=i,i},e.exports?e.exports=a():n.log=a()}(i);var v=t(i.exports);v.setLevel("warn");var o=v.getLogger("validation.dcmjs"),m={getBytesForBinaryFrame:s,pack:function(e){var n=e.length;v.debug("numPixels: "+n);for(var a=s(n),r=new Uint8Array(a),t=0,i=0;i<n;i++){t=Math.floor(i/8);var o=(0!==e[i])<<i%8;r[t]|=o}return r},unpack:function(e){for(var n=new Uint8Array(e),a=new Uint8Array(8*n.length),r=0;r<a.length;r++){var t=r%8,i=Math.floor(r/8);a[r]=255*((n[i]&1<<t)>>t)}return a}};function s(e){var n=e%8,a=Math.floor(e/8);return n>0&&a++,a}function S(e,n,a){return n=A(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(n,a||[],A(e).constructor):n.apply(e,a))}function g(e,n,a){if(I())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,n);var t=new(e.bind.apply(e,r));return a&&d(t,a.prototype),t}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function D(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,r)}return a}function c(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?D(Object(a),!0).forEach((function(n){O(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):D(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function C(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:String(n)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function M(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function l(e,n){for(var a=0;a<n.length;a++){var r=n[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function E(e,n,a){return n&&l(e.prototype,n),a&&l(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e,n,a){return(n=C(n))in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function P(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&d(e,n)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function d(e,n){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},d(e,n)}function T(e){var n="function"==typeof Map?new Map:void 0;return T=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(n){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,a)}function a(){return g(e,arguments,A(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),d(a,e)},T(e)}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,n,a){var r=function(e,n){for(;!Object.prototype.hasOwnProperty.call(e,n)&&null!==(e=A(e)););return e}(e,n);if(r){var t=Object.getOwnPropertyDescriptor(r,n);return t.get?t.get.call(arguments.length<3?e:a):t.value}},f.apply(this,arguments)}function R(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,t,i,v,o=[],m=!0,s=!1;try{if(i=(a=a.call(e)).next,0===n){if(Object(a)!==a)return;m=!1}else for(;!(m=(r=i.call(a)).done)&&(o.push(r.value),o.length!==n);m=!0);}catch(e){s=!0,t=e}finally{try{if(!m&&null!=a.return&&(v=a.return(),Object(v)!==v))return}finally{if(s)throw t}}return o}}(e,n)||h(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,n){if(e){if("string"==typeof e)return N(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?N(e,n):void 0}}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var a=0,r=new Array(n);a<n;a++)r[a]=e[a];return r}function _(e,n){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=h(e))||n){a&&(e=a);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,v=!0,o=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return v=e.done,e},e:function(e){o=!0,i=e},f:function(){try{v||null==a.return||a.return()}finally{if(o)throw i}}}}function L(e){let n=e.length;for(;--n>=0;)e[n]=0}const y=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),U=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),G=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),F=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),b=new Array(576);L(b);const w=new Array(60);L(w);const V=new Array(512);L(V);const q=new Array(256);L(q);const Q=new Array(29);L(Q);const B=new Array(30);function k(e,n,a,r,t){this.static_tree=e,this.extra_bits=n,this.extra_base=a,this.elems=r,this.max_length=t,this.has_stree=e&&e.length}let x,H,W;function z(e,n){this.dyn_tree=e,this.max_code=0,this.stat_desc=n}L(B);const j=e=>e<256?V[e]:V[256+(e>>>7)],X=(e,n)=>{e.pending_buf[e.pending++]=255&n,e.pending_buf[e.pending++]=n>>>8&255},Y=(e,n,a)=>{e.bi_valid>16-a?(e.bi_buf|=n<<e.bi_valid&65535,X(e,e.bi_buf),e.bi_buf=n>>16-e.bi_valid,e.bi_valid+=a-16):(e.bi_buf|=n<<e.bi_valid&65535,e.bi_valid+=a)},K=(e,n,a)=>{Y(e,a[2*n],a[2*n+1])},Z=(e,n)=>{let a=0;do{a|=1&e,e>>>=1,a<<=1}while(--n>0);return a>>>1},J=(e,n,a)=>{const r=new Array(16);let t,i,v=0;for(t=1;t<=15;t++)v=v+a[t-1]<<1,r[t]=v;for(i=0;i<=n;i++){let n=e[2*i+1];0!==n&&(e[2*i]=Z(r[n]++,n))}},$=e=>{let n;for(n=0;n<286;n++)e.dyn_ltree[2*n]=0;for(n=0;n<30;n++)e.dyn_dtree[2*n]=0;for(n=0;n<19;n++)e.bl_tree[2*n]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},ee=e=>{e.bi_valid>8?X(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},ne=(e,n,a,r)=>{const t=2*n,i=2*a;return e[t]<e[i]||e[t]===e[i]&&r[n]<=r[a]},ae=(e,n,a)=>{const r=e.heap[a];let t=a<<1;for(;t<=e.heap_len&&(t<e.heap_len&&ne(n,e.heap[t+1],e.heap[t],e.depth)&&t++,!ne(n,r,e.heap[t],e.depth));)e.heap[a]=e.heap[t],a=t,t<<=1;e.heap[a]=r},re=(e,n,a)=>{let r,t,i,v,o=0;if(0!==e.sym_next)do{r=255&e.pending_buf[e.sym_buf+o++],r+=(255&e.pending_buf[e.sym_buf+o++])<<8,t=e.pending_buf[e.sym_buf+o++],0===r?K(e,t,n):(i=q[t],K(e,i+256+1,n),v=y[i],0!==v&&(t-=Q[i],Y(e,t,v)),r--,i=j(r),K(e,i,a),v=U[i],0!==v&&(r-=B[i],Y(e,r,v)))}while(o<e.sym_next);K(e,256,n)},te=(e,n)=>{const a=n.dyn_tree,r=n.stat_desc.static_tree,t=n.stat_desc.has_stree,i=n.stat_desc.elems;let v,o,m,s=-1;for(e.heap_len=0,e.heap_max=573,v=0;v<i;v++)0!==a[2*v]?(e.heap[++e.heap_len]=s=v,e.depth[v]=0):a[2*v+1]=0;for(;e.heap_len<2;)m=e.heap[++e.heap_len]=s<2?++s:0,a[2*m]=1,e.depth[m]=0,e.opt_len--,t&&(e.static_len-=r[2*m+1]);for(n.max_code=s,v=e.heap_len>>1;v>=1;v--)ae(e,a,v);m=i;do{v=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ae(e,a,1),o=e.heap[1],e.heap[--e.heap_max]=v,e.heap[--e.heap_max]=o,a[2*m]=a[2*v]+a[2*o],e.depth[m]=(e.depth[v]>=e.depth[o]?e.depth[v]:e.depth[o])+1,a[2*v+1]=a[2*o+1]=m,e.heap[1]=m++,ae(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,n)=>{const a=n.dyn_tree,r=n.max_code,t=n.stat_desc.static_tree,i=n.stat_desc.has_stree,v=n.stat_desc.extra_bits,o=n.stat_desc.extra_base,m=n.stat_desc.max_length;let s,S,g,I,D,c,C=0;for(I=0;I<=15;I++)e.bl_count[I]=0;for(a[2*e.heap[e.heap_max]+1]=0,s=e.heap_max+1;s<573;s++)S=e.heap[s],I=a[2*a[2*S+1]+1]+1,I>m&&(I=m,C++),a[2*S+1]=I,S>r||(e.bl_count[I]++,D=0,S>=o&&(D=v[S-o]),c=a[2*S],e.opt_len+=c*(I+D),i&&(e.static_len+=c*(t[2*S+1]+D)));if(0!==C){do{for(I=m-1;0===e.bl_count[I];)I--;e.bl_count[I]--,e.bl_count[I+1]+=2,e.bl_count[m]--,C-=2}while(C>0);for(I=m;0!==I;I--)for(S=e.bl_count[I];0!==S;)g=e.heap[--s],g>r||(a[2*g+1]!==I&&(e.opt_len+=(I-a[2*g+1])*a[2*g],a[2*g+1]=I),S--)}})(e,n),J(a,s,e.bl_count)},ie=(e,n,a)=>{let r,t,i=-1,v=n[1],o=0,m=7,s=4;for(0===v&&(m=138,s=3),n[2*(a+1)+1]=65535,r=0;r<=a;r++)t=v,v=n[2*(r+1)+1],++o<m&&t===v||(o<s?e.bl_tree[2*t]+=o:0!==t?(t!==i&&e.bl_tree[2*t]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=0,i=t,0===v?(m=138,s=3):t===v?(m=6,s=3):(m=7,s=4))},ve=(e,n,a)=>{let r,t,i=-1,v=n[1],o=0,m=7,s=4;for(0===v&&(m=138,s=3),r=0;r<=a;r++)if(t=v,v=n[2*(r+1)+1],!(++o<m&&t===v)){if(o<s)do{K(e,t,e.bl_tree)}while(0!=--o);else 0!==t?(t!==i&&(K(e,t,e.bl_tree),o--),K(e,16,e.bl_tree),Y(e,o-3,2)):o<=10?(K(e,17,e.bl_tree),Y(e,o-3,3)):(K(e,18,e.bl_tree),Y(e,o-11,7));o=0,i=t,0===v?(m=138,s=3):t===v?(m=6,s=3):(m=7,s=4)}};let oe=!1;const me=(e,n,a,r)=>{Y(e,0+(r?1:0),3),ee(e),X(e,a),X(e,~a),a&&e.pending_buf.set(e.window.subarray(n,n+a),e.pending),e.pending+=a};var se={_tr_init:e=>{oe||((()=>{let e,n,a,r,t;const i=new Array(16);for(a=0,r=0;r<28;r++)for(Q[r]=a,e=0;e<1<<y[r];e++)q[a++]=r;for(q[a-1]=r,t=0,r=0;r<16;r++)for(B[r]=t,e=0;e<1<<U[r];e++)V[t++]=r;for(t>>=7;r<30;r++)for(B[r]=t<<7,e=0;e<1<<U[r]-7;e++)V[256+t++]=r;for(n=0;n<=15;n++)i[n]=0;for(e=0;e<=143;)b[2*e+1]=8,e++,i[8]++;for(;e<=255;)b[2*e+1]=9,e++,i[9]++;for(;e<=279;)b[2*e+1]=7,e++,i[7]++;for(;e<=287;)b[2*e+1]=8,e++,i[8]++;for(J(b,287,i),e=0;e<30;e++)w[2*e+1]=5,w[2*e]=Z(e,5);x=new k(b,y,257,286,15),H=new k(w,U,0,30,15),W=new k(new Array(0),G,0,19,7)})(),oe=!0),e.l_desc=new z(e.dyn_ltree,x),e.d_desc=new z(e.dyn_dtree,H),e.bl_desc=new z(e.bl_tree,W),e.bi_buf=0,e.bi_valid=0,$(e)},_tr_stored_block:me,_tr_flush_block:(e,n,a,r)=>{let t,i,v=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let n,a=4093624447;for(n=0;n<=31;n++,a>>>=1)if(1&a&&0!==e.dyn_ltree[2*n])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(n=32;n<256;n++)if(0!==e.dyn_ltree[2*n])return 1;return 0})(e)),te(e,e.l_desc),te(e,e.d_desc),v=(e=>{let n;for(ie(e,e.dyn_ltree,e.l_desc.max_code),ie(e,e.dyn_dtree,e.d_desc.max_code),te(e,e.bl_desc),n=18;n>=3&&0===e.bl_tree[2*F[n]+1];n--);return e.opt_len+=3*(n+1)+5+5+4,n})(e),t=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=t&&(t=i)):t=i=a+5,a+4<=t&&-1!==n?me(e,n,a,r):4===e.strategy||i===t?(Y(e,2+(r?1:0),3),re(e,b,w)):(Y(e,4+(r?1:0),3),((e,n,a,r)=>{let t;for(Y(e,n-257,5),Y(e,a-1,5),Y(e,r-4,4),t=0;t<r;t++)Y(e,e.bl_tree[2*F[t]+1],3);ve(e,e.dyn_ltree,n-1),ve(e,e.dyn_dtree,a-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,v+1),re(e,e.dyn_ltree,e.dyn_dtree)),$(e),r&&ee(e)},_tr_tally:(e,n,a)=>(e.pending_buf[e.sym_buf+e.sym_next++]=n,e.pending_buf[e.sym_buf+e.sym_next++]=n>>8,e.pending_buf[e.sym_buf+e.sym_next++]=a,0===n?e.dyn_ltree[2*a]++:(e.matches++,n--,e.dyn_ltree[2*(q[a]+256+1)]++,e.dyn_dtree[2*j(n)]++),e.sym_next===e.sym_end),_tr_align:e=>{Y(e,2,3),K(e,256,b),(e=>{16===e.bi_valid?(X(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)}},Se=(e,n,a,r)=>{let t=65535&e,i=e>>>16&65535,v=0;for(;0!==a;){v=a>2e3?2e3:a,a-=v;do{t=t+n[r++]|0,i=i+t|0}while(--v);t%=65521,i%=65521}return t|i<<16};const ge=new Uint32Array((()=>{let e,n=[];for(var a=0;a<256;a++){e=a;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;n[a]=e}return n})());var Ie=(e,n,a,r)=>{const t=ge,i=r+a;e^=-1;for(let a=r;a<i;a++)e=e>>>8^t[255&(e^n[a])];return~e},De={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"},ce={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Ce,_tr_stored_block:ue,_tr_flush_block:Me,_tr_tally:le,_tr_align:Ee}=se,{Z_NO_FLUSH:Oe,Z_PARTIAL_FLUSH:Pe,Z_FULL_FLUSH:Ae,Z_FINISH:de,Z_BLOCK:Te,Z_OK:fe,Z_STREAM_END:Re,Z_STREAM_ERROR:pe,Z_DATA_ERROR:he,Z_BUF_ERROR:Ne,Z_DEFAULT_COMPRESSION:_e,Z_FILTERED:Le,Z_HUFFMAN_ONLY:ye,Z_RLE:Ue,Z_FIXED:Ge,Z_DEFAULT_STRATEGY:Fe,Z_UNKNOWN:be,Z_DEFLATED:we}=ce,Ve=258,qe=262,Qe=42,Be=113,ke=666,xe=(e,n)=>(e.msg=De[n],n),He=e=>2*e-(e>4?9:0),We=e=>{let n=e.length;for(;--n>=0;)e[n]=0},ze=e=>{let n,a,r,t=e.w_size;n=e.hash_size,r=n;do{a=e.head[--r],e.head[r]=a>=t?a-t:0}while(--n);n=t,r=n;do{a=e.prev[--r],e.prev[r]=a>=t?a-t:0}while(--n)};let je=(e,n,a)=>(n<<e.hash_shift^a)&e.hash_mask;const Xe=e=>{const n=e.state;let a=n.pending;a>e.avail_out&&(a=e.avail_out),0!==a&&(e.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+a),e.next_out),e.next_out+=a,n.pending_out+=a,e.total_out+=a,e.avail_out-=a,n.pending-=a,0===n.pending&&(n.pending_out=0))},Ye=(e,n)=>{Me(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,n),e.block_start=e.strstart,Xe(e.strm)},Ke=(e,n)=>{e.pending_buf[e.pending++]=n},Ze=(e,n)=>{e.pending_buf[e.pending++]=n>>>8&255,e.pending_buf[e.pending++]=255&n},Je=(e,n,a,r)=>{let t=e.avail_in;return t>r&&(t=r),0===t?0:(e.avail_in-=t,n.set(e.input.subarray(e.next_in,e.next_in+t),a),1===e.state.wrap?e.adler=Se(e.adler,n,t,a):2===e.state.wrap&&(e.adler=Ie(e.adler,n,t,a)),e.next_in+=t,e.total_in+=t,t)},$e=(e,n)=>{let a,r,t=e.max_chain_length,i=e.strstart,v=e.prev_length,o=e.nice_match;const m=e.strstart>e.w_size-qe?e.strstart-(e.w_size-qe):0,s=e.window,S=e.w_mask,g=e.prev,I=e.strstart+Ve;let D=s[i+v-1],c=s[i+v];e.prev_length>=e.good_match&&(t>>=2),o>e.lookahead&&(o=e.lookahead);do{if(a=n,s[a+v]===c&&s[a+v-1]===D&&s[a]===s[i]&&s[++a]===s[i+1]){i+=2,a++;do{}while(s[++i]===s[++a]&&s[++i]===s[++a]&&s[++i]===s[++a]&&s[++i]===s[++a]&&s[++i]===s[++a]&&s[++i]===s[++a]&&s[++i]===s[++a]&&s[++i]===s[++a]&&i<I);if(r=Ve-(I-i),i=I-Ve,r>v){if(e.match_start=n,v=r,r>=o)break;D=s[i+v-1],c=s[i+v]}}}while((n=g[n&S])>m&&0!=--t);return v<=e.lookahead?v:e.lookahead},en=e=>{const n=e.w_size;let a,r,t;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-qe)&&(e.window.set(e.window.subarray(n,n+n-r),0),e.match_start-=n,e.strstart-=n,e.block_start-=n,e.insert>e.strstart&&(e.insert=e.strstart),ze(e),r+=n),0===e.strm.avail_in)break;if(a=Je(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=a,e.lookahead+e.insert>=3)for(t=e.strstart-e.insert,e.ins_h=e.window[t],e.ins_h=je(e,e.ins_h,e.window[t+1]);e.insert&&(e.ins_h=je(e,e.ins_h,e.window[t+3-1]),e.prev[t&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=t,t++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<qe&&0!==e.strm.avail_in)},nn=(e,n)=>{let a,r,t,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,v=0,o=e.strm.avail_in;do{if(a=65535,t=e.bi_valid+42>>3,e.strm.avail_out<t)break;if(t=e.strm.avail_out-t,r=e.strstart-e.block_start,a>r+e.strm.avail_in&&(a=r+e.strm.avail_in),a>t&&(a=t),a<i&&(0===a&&n!==de||n===Oe||a!==r+e.strm.avail_in))break;v=n===de&&a===r+e.strm.avail_in?1:0,ue(e,0,0,v),e.pending_buf[e.pending-4]=a,e.pending_buf[e.pending-3]=a>>8,e.pending_buf[e.pending-2]=~a,e.pending_buf[e.pending-1]=~a>>8,Xe(e.strm),r&&(r>a&&(r=a),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,a-=r),a&&(Je(e.strm,e.strm.output,e.strm.next_out,a),e.strm.next_out+=a,e.strm.avail_out-=a,e.strm.total_out+=a)}while(0===v);return o-=e.strm.avail_in,o&&(o>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=o&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-o,e.strm.next_in),e.strstart),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),v?4:n!==Oe&&n!==de&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(t=e.window_size-e.strstart,e.strm.avail_in>t&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,t+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),t>e.strm.avail_in&&(t=e.strm.avail_in),t&&(Je(e.strm,e.window,e.strstart,t),e.strstart+=t,e.insert+=t>e.w_size-e.insert?e.w_size-e.insert:t),e.high_water<e.strstart&&(e.high_water=e.strstart),t=e.bi_valid+42>>3,t=e.pending_buf_size-t>65535?65535:e.pending_buf_size-t,i=t>e.w_size?e.w_size:t,r=e.strstart-e.block_start,(r>=i||(r||n===de)&&n!==Oe&&0===e.strm.avail_in&&r<=t)&&(a=r>t?t:r,v=n===de&&0===e.strm.avail_in&&a===r?1:0,ue(e,e.block_start,a,v),e.block_start+=a,Xe(e.strm)),v?3:1)},an=(e,n)=>{let a,r;for(;;){if(e.lookahead<qe){if(en(e),e.lookahead<qe&&n===Oe)return 1;if(0===e.lookahead)break}if(a=0,e.lookahead>=3&&(e.ins_h=je(e,e.ins_h,e.window[e.strstart+3-1]),a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==a&&e.strstart-a<=e.w_size-qe&&(e.match_length=$e(e,a)),e.match_length>=3)if(r=le(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=je(e,e.ins_h,e.window[e.strstart+3-1]),a=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=je(e,e.ins_h,e.window[e.strstart+1]);else r=le(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ye(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,n===de?(Ye(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ye(e,!1),0===e.strm.avail_out)?1:2},rn=(e,n)=>{let a,r,t;for(;;){if(e.lookahead<qe){if(en(e),e.lookahead<qe&&n===Oe)return 1;if(0===e.lookahead)break}if(a=0,e.lookahead>=3&&(e.ins_h=je(e,e.ins_h,e.window[e.strstart+3-1]),a=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!==a&&e.prev_length<e.max_lazy_match&&e.strstart-a<=e.w_size-qe&&(e.match_length=$e(e,a),e.match_length<=5&&(e.strategy===Le||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){t=e.strstart+e.lookahead-3,r=le(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=t&&(e.ins_h=je(e,e.ins_h,e.window[e.strstart+3-1]),a=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++,r&&(Ye(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=le(e,0,e.window[e.strstart-1]),r&&Ye(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&&(r=le(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,n===de?(Ye(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ye(e,!1),0===e.strm.avail_out)?1:2};function tn(e,n,a,r,t){this.good_length=e,this.max_lazy=n,this.nice_length=a,this.max_chain=r,this.func=t}const vn=[new tn(0,0,0,0,nn),new tn(4,4,8,4,an),new tn(4,5,16,8,an),new tn(4,6,32,32,an),new tn(4,4,16,16,rn),new tn(8,16,32,32,rn),new tn(8,16,128,128,rn),new tn(8,32,128,256,rn),new tn(32,128,258,1024,rn),new tn(32,258,258,4096,rn)];function on(){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=we,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),We(this.dyn_ltree),We(this.dyn_dtree),We(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),We(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),We(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const mn=e=>{if(!e)return 1;const n=e.state;return!n||n.strm!==e||n.status!==Qe&&57!==n.status&&69!==n.status&&73!==n.status&&91!==n.status&&103!==n.status&&n.status!==Be&&n.status!==ke?1:0},sn=e=>{if(mn(e))return xe(e,pe);e.total_in=e.total_out=0,e.data_type=be;const n=e.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=2===n.wrap?57:n.wrap?Qe:Be,e.adler=2===n.wrap?0:1,n.last_flush=-2,Ce(n),fe},Sn=e=>{const n=sn(e);var a;return n===fe&&((a=e.state).window_size=2*a.w_size,We(a.head),a.max_lazy_match=vn[a.level].max_lazy,a.good_match=vn[a.level].good_length,a.nice_match=vn[a.level].nice_length,a.max_chain_length=vn[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),n},gn=(e,n,a,r,t,i)=>{if(!e)return pe;let v=1;if(n===_e&&(n=6),r<0?(v=0,r=-r):r>15&&(v=2,r-=16),t<1||t>9||a!==we||r<8||r>15||n<0||n>9||i<0||i>Ge||8===r&&1!==v)return xe(e,pe);8===r&&(r=9);const o=new on;return e.state=o,o.strm=e,o.status=Qe,o.wrap=v,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=t+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<t+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=n,o.strategy=i,o.method=a,Sn(e)};var In=gn,Dn=(e,n)=>mn(e)||2!==e.state.wrap?pe:(e.state.gzhead=n,fe),cn=(e,n)=>{if(mn(e)||n>Te||n<0)return e?xe(e,pe):pe;const a=e.state;if(!e.output||0!==e.avail_in&&!e.input||a.status===ke&&n!==de)return xe(e,0===e.avail_out?Ne:pe);const r=a.last_flush;if(a.last_flush=n,0!==a.pending){if(Xe(e),0===e.avail_out)return a.last_flush=-1,fe}else if(0===e.avail_in&&He(n)<=He(r)&&n!==de)return xe(e,Ne);if(a.status===ke&&0!==e.avail_in)return xe(e,Ne);if(a.status===Qe&&0===a.wrap&&(a.status=Be),a.status===Qe){let n=we+(a.w_bits-8<<4)<<8,r=-1;if(r=a.strategy>=ye||a.level<2?0:a.level<6?1:6===a.level?2:3,n|=r<<6,0!==a.strstart&&(n|=32),n+=31-n%31,Ze(a,n),0!==a.strstart&&(Ze(a,e.adler>>>16),Ze(a,65535&e.adler)),e.adler=1,a.status=Be,Xe(e),0!==a.pending)return a.last_flush=-1,fe}if(57===a.status)if(e.adler=0,Ke(a,31),Ke(a,139),Ke(a,8),a.gzhead)Ke(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),Ke(a,255&a.gzhead.time),Ke(a,a.gzhead.time>>8&255),Ke(a,a.gzhead.time>>16&255),Ke(a,a.gzhead.time>>24&255),Ke(a,9===a.level?2:a.strategy>=ye||a.level<2?4:0),Ke(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(Ke(a,255&a.gzhead.extra.length),Ke(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=Ie(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(Ke(a,0),Ke(a,0),Ke(a,0),Ke(a,0),Ke(a,0),Ke(a,9===a.level?2:a.strategy>=ye||a.level<2?4:0),Ke(a,3),a.status=Be,Xe(e),0!==a.pending)return a.last_flush=-1,fe;if(69===a.status){if(a.gzhead.extra){let n=a.pending,r=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+r>a.pending_buf_size;){let t=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+t),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>n&&(e.adler=Ie(e.adler,a.pending_buf,a.pending-n,n)),a.gzindex+=t,Xe(e),0!==a.pending)return a.last_flush=-1,fe;n=0,r-=t}let t=new Uint8Array(a.gzhead.extra);a.pending_buf.set(t.subarray(a.gzindex,a.gzindex+r),a.pending),a.pending+=r,a.gzhead.hcrc&&a.pending>n&&(e.adler=Ie(e.adler,a.pending_buf,a.pending-n,n)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let n,r=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>r&&(e.adler=Ie(e.adler,a.pending_buf,a.pending-r,r)),Xe(e),0!==a.pending)return a.last_flush=-1,fe;r=0}n=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,Ke(a,n)}while(0!==n);a.gzhead.hcrc&&a.pending>r&&(e.adler=Ie(e.adler,a.pending_buf,a.pending-r,r)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let n,r=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>r&&(e.adler=Ie(e.adler,a.pending_buf,a.pending-r,r)),Xe(e),0!==a.pending)return a.last_flush=-1,fe;r=0}n=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,Ke(a,n)}while(0!==n);a.gzhead.hcrc&&a.pending>r&&(e.adler=Ie(e.adler,a.pending_buf,a.pending-r,r))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(Xe(e),0!==a.pending))return a.last_flush=-1,fe;Ke(a,255&e.adler),Ke(a,e.adler>>8&255),e.adler=0}if(a.status=Be,Xe(e),0!==a.pending)return a.last_flush=-1,fe}if(0!==e.avail_in||0!==a.lookahead||n!==Oe&&a.status!==ke){let r=0===a.level?nn(a,n):a.strategy===ye?((e,n)=>{let a;for(;;){if(0===e.lookahead&&(en(e),0===e.lookahead)){if(n===Oe)return 1;break}if(e.match_length=0,a=le(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,a&&(Ye(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,n===de?(Ye(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ye(e,!1),0===e.strm.avail_out)?1:2})(a,n):a.strategy===Ue?((e,n)=>{let a,r,t,i;const v=e.window;for(;;){if(e.lookahead<=Ve){if(en(e),e.lookahead<=Ve&&n===Oe)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(t=e.strstart-1,r=v[t],r===v[++t]&&r===v[++t]&&r===v[++t])){i=e.strstart+Ve;do{}while(r===v[++t]&&r===v[++t]&&r===v[++t]&&r===v[++t]&&r===v[++t]&&r===v[++t]&&r===v[++t]&&r===v[++t]&&t<i);e.match_length=Ve-(i-t),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(a=le(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(a=le(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),a&&(Ye(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,n===de?(Ye(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ye(e,!1),0===e.strm.avail_out)?1:2})(a,n):vn[a.level].func(a,n);if(3!==r&&4!==r||(a.status=ke),1===r||3===r)return 0===e.avail_out&&(a.last_flush=-1),fe;if(2===r&&(n===Pe?Ee(a):n!==Te&&(ue(a,0,0,!1),n===Ae&&(We(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),Xe(e),0===e.avail_out))return a.last_flush=-1,fe}return n!==de?fe:a.wrap<=0?Re:(2===a.wrap?(Ke(a,255&e.adler),Ke(a,e.adler>>8&255),Ke(a,e.adler>>16&255),Ke(a,e.adler>>24&255),Ke(a,255&e.total_in),Ke(a,e.total_in>>8&255),Ke(a,e.total_in>>16&255),Ke(a,e.total_in>>24&255)):(Ze(a,e.adler>>>16),Ze(a,65535&e.adler)),Xe(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?fe:Re)},Cn=e=>{if(mn(e))return pe;const n=e.state.status;return e.state=null,n===Be?xe(e,he):fe},un=(e,n)=>{let a=n.length;if(mn(e))return pe;const r=e.state,t=r.wrap;if(2===t||1===t&&r.status!==Qe||r.lookahead)return pe;if(1===t&&(e.adler=Se(e.adler,n,a,0)),r.wrap=0,a>=r.w_size){0===t&&(We(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(n.subarray(a-r.w_size,a),0),n=e,a=r.w_size}const i=e.avail_in,v=e.next_in,o=e.input;for(e.avail_in=a,e.next_in=0,e.input=n,en(r);r.lookahead>=3;){let e=r.strstart,n=r.lookahead-2;do{r.ins_h=je(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--n);r.strstart=e,r.lookahead=2,en(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=v,e.input=o,e.avail_in=i,r.wrap=t,fe};const Mn=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var ln=function(e){const n=Array.prototype.slice.call(arguments,1);for(;n.length;){const a=n.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const n in a)Mn(a,n)&&(e[n]=a[n])}}return e},En=e=>{let n=0;for(let a=0,r=e.length;a<r;a++)n+=e[a].length;const a=new Uint8Array(n);for(let n=0,r=0,t=e.length;n<t;n++){let t=e[n];a.set(t,r),r+=t.length}return a};let On=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){On=!1}const Pn=new Uint8Array(256);for(let e=0;e<256;e++)Pn[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Pn[254]=Pn[254]=1;var An=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let n,a,r,t,i,v=e.length,o=0;for(t=0;t<v;t++)a=e.charCodeAt(t),55296==(64512&a)&&t+1<v&&(r=e.charCodeAt(t+1),56320==(64512&r)&&(a=65536+(a-55296<<10)+(r-56320),t++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(n=new Uint8Array(o),i=0,t=0;i<o;t++)a=e.charCodeAt(t),55296==(64512&a)&&t+1<v&&(r=e.charCodeAt(t+1),56320==(64512&r)&&(a=65536+(a-55296<<10)+(r-56320),t++)),a<128?n[i++]=a:a<2048?(n[i++]=192|a>>>6,n[i++]=128|63&a):a<65536?(n[i++]=224|a>>>12,n[i++]=128|a>>>6&63,n[i++]=128|63&a):(n[i++]=240|a>>>18,n[i++]=128|a>>>12&63,n[i++]=128|a>>>6&63,n[i++]=128|63&a);return n},dn=(e,n)=>{const a=n||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,n));let r,t;const i=new Array(2*a);for(t=0,r=0;r<a;){let n=e[r++];if(n<128){i[t++]=n;continue}let v=Pn[n];if(v>4)i[t++]=65533,r+=v-1;else{for(n&=2===v?31:3===v?15:7;v>1&&r<a;)n=n<<6|63&e[r++],v--;v>1?i[t++]=65533:n<65536?i[t++]=n:(n-=65536,i[t++]=55296|n>>10&1023,i[t++]=56320|1023&n)}}return((e,n)=>{if(n<65534&&e.subarray&&On)return String.fromCharCode.apply(null,e.length===n?e:e.subarray(0,n));let a="";for(let r=0;r<n;r++)a+=String.fromCharCode(e[r]);return a})(i,t)},Tn=(e,n)=>{(n=n||e.length)>e.length&&(n=e.length);let a=n-1;for(;a>=0&&128==(192&e[a]);)a--;return a<0||0===a?n:a+Pn[e[a]]>n?a:n},fn=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};const Rn=Object.prototype.toString,{Z_NO_FLUSH:pn,Z_SYNC_FLUSH:hn,Z_FULL_FLUSH:Nn,Z_FINISH:_n,Z_OK:Ln,Z_STREAM_END:yn,Z_DEFAULT_COMPRESSION:Un,Z_DEFAULT_STRATEGY:Gn,Z_DEFLATED:Fn}=ce;function bn(e){this.options=ln({level:Un,method:Fn,chunkSize:16384,windowBits:15,memLevel:8,strategy:Gn},e||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new fn,this.strm.avail_out=0;let a=In(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(a!==Ln)throw new Error(De[a]);if(n.header&&Dn(this.strm,n.header),n.dictionary){let e;if(e="string"==typeof n.dictionary?An(n.dictionary):"[object ArrayBuffer]"===Rn.call(n.dictionary)?new Uint8Array(n.dictionary):n.dictionary,a=un(this.strm,e),a!==Ln)throw new Error(De[a]);this._dict_set=!0}}function wn(e,n){const a=new bn(n);if(a.push(e,!0),a.err)throw a.msg||De[a.err];return a.result}bn.prototype.push=function(e,n){const a=this.strm,r=this.options.chunkSize;let t,i;if(this.ended)return!1;for(i=n===~~n?n:!0===n?_n:pn,"string"==typeof e?a.input=An(e):"[object ArrayBuffer]"===Rn.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(r),a.next_out=0,a.avail_out=r),(i===hn||i===Nn)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(t=cn(a,i),t===yn)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),t=Cn(this.strm),this.onEnd(t),this.ended=!0,t===Ln;if(0!==a.avail_out){if(i>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},bn.prototype.onData=function(e){this.chunks.push(e)},bn.prototype.onEnd=function(e){e===Ln&&(this.result=En(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Vn={Deflate:bn,deflate:wn,deflateRaw:function(e,n){return(n=n||{}).raw=!0,wn(e,n)},gzip:function(e,n){return(n=n||{}).gzip=!0,wn(e,n)},constants:ce};const qn=16209;var Qn=function(e,n){let a,r,t,i,v,o,m,s,S,g,I,D,c,C,u,M,l,E,O,P,A,d,T,f;const R=e.state;a=e.next_in,T=e.input,r=a+(e.avail_in-5),t=e.next_out,f=e.output,i=t-(n-e.avail_out),v=t+(e.avail_out-257),o=R.dmax,m=R.wsize,s=R.whave,S=R.wnext,g=R.window,I=R.hold,D=R.bits,c=R.lencode,C=R.distcode,u=(1<<R.lenbits)-1,M=(1<<R.distbits)-1;e:do{D<15&&(I+=T[a++]<<D,D+=8,I+=T[a++]<<D,D+=8),l=c[I&u];n:for(;;){if(E=l>>>24,I>>>=E,D-=E,E=l>>>16&255,0===E)f[t++]=65535&l;else{if(!(16&E)){if(64&E){if(32&E){R.mode=16191;break e}e.msg="invalid literal/length code",R.mode=qn;break e}l=c[(65535&l)+(I&(1<<E)-1)];continue n}for(O=65535&l,E&=15,E&&(D<E&&(I+=T[a++]<<D,D+=8),O+=I&(1<<E)-1,I>>>=E,D-=E),D<15&&(I+=T[a++]<<D,D+=8,I+=T[a++]<<D,D+=8),l=C[I&M];;){if(E=l>>>24,I>>>=E,D-=E,E=l>>>16&255,16&E){if(P=65535&l,E&=15,D<E&&(I+=T[a++]<<D,D+=8,D<E&&(I+=T[a++]<<D,D+=8)),P+=I&(1<<E)-1,P>o){e.msg="invalid distance too far back",R.mode=qn;break e}if(I>>>=E,D-=E,E=t-i,P>E){if(E=P-E,E>s&&R.sane){e.msg="invalid distance too far back",R.mode=qn;break e}if(A=0,d=g,0===S){if(A+=m-E,E<O){O-=E;do{f[t++]=g[A++]}while(--E);A=t-P,d=f}}else if(S<E){if(A+=m+S-E,E-=S,E<O){O-=E;do{f[t++]=g[A++]}while(--E);if(A=0,S<O){E=S,O-=E;do{f[t++]=g[A++]}while(--E);A=t-P,d=f}}}else if(A+=S-E,E<O){O-=E;do{f[t++]=g[A++]}while(--E);A=t-P,d=f}for(;O>2;)f[t++]=d[A++],f[t++]=d[A++],f[t++]=d[A++],O-=3;O&&(f[t++]=d[A++],O>1&&(f[t++]=d[A++]))}else{A=t-P;do{f[t++]=f[A++],f[t++]=f[A++],f[t++]=f[A++],O-=3}while(O>2);O&&(f[t++]=f[A++],O>1&&(f[t++]=f[A++]))}break}if(64&E){e.msg="invalid distance code",R.mode=qn;break e}l=C[(65535&l)+(I&(1<<E)-1)]}}break}}while(a<r&&t<v);O=D>>3,a-=O,D-=O<<3,I&=(1<<D)-1,e.next_in=a,e.next_out=t,e.avail_in=a<r?r-a+5:5-(a-r),e.avail_out=t<v?v-t+257:257-(t-v),R.hold=I,R.bits=D};const Bn=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),kn=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),xn=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Hn=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Wn=(e,n,a,r,t,i,v,o)=>{const m=o.bits;let s,S,g,I,D,c,C=0,u=0,M=0,l=0,E=0,O=0,P=0,A=0,d=0,T=0,f=null;const R=new Uint16Array(16),p=new Uint16Array(16);let h,N,_,L=null;for(C=0;C<=15;C++)R[C]=0;for(u=0;u<r;u++)R[n[a+u]]++;for(E=m,l=15;l>=1&&0===R[l];l--);if(E>l&&(E=l),0===l)return t[i++]=20971520,t[i++]=20971520,o.bits=1,0;for(M=1;M<l&&0===R[M];M++);for(E<M&&(E=M),A=1,C=1;C<=15;C++)if(A<<=1,A-=R[C],A<0)return-1;if(A>0&&(0===e||1!==l))return-1;for(p[1]=0,C=1;C<15;C++)p[C+1]=p[C]+R[C];for(u=0;u<r;u++)0!==n[a+u]&&(v[p[n[a+u]]++]=u);if(0===e?(f=L=v,c=20):1===e?(f=Bn,L=kn,c=257):(f=xn,L=Hn,c=0),T=0,u=0,C=M,D=i,O=E,P=0,g=-1,d=1<<E,I=d-1,1===e&&d>852||2===e&&d>592)return 1;for(;;){h=C-P,v[u]+1<c?(N=0,_=v[u]):v[u]>=c?(N=L[v[u]-c],_=f[v[u]-c]):(N=96,_=0),s=1<<C-P,S=1<<O,M=S;do{S-=s,t[D+(T>>P)+S]=h<<24|N<<16|_}while(0!==S);for(s=1<<C-1;T&s;)s>>=1;if(0!==s?(T&=s-1,T+=s):T=0,u++,0==--R[C]){if(C===l)break;C=n[a+v[u]]}if(C>E&&(T&I)!==g){for(0===P&&(P=E),D+=M,O=C-P,A=1<<O;O+P<l&&(A-=R[O+P],!(A<=0));)O++,A<<=1;if(d+=1<<O,1===e&&d>852||2===e&&d>592)return 1;g=T&I,t[g]=E<<24|O<<16|D-i}}return 0!==T&&(t[D+T]=C-P<<24|64<<16),o.bits=E,0};const{Z_FINISH:zn,Z_BLOCK:jn,Z_TREES:Xn,Z_OK:Yn,Z_STREAM_END:Kn,Z_NEED_DICT:Zn,Z_STREAM_ERROR:Jn,Z_DATA_ERROR:$n,Z_MEM_ERROR:ea,Z_BUF_ERROR:na,Z_DEFLATED:aa}=ce,ra=16180,ta=16190,ia=16191,va=16192,oa=16194,ma=16199,sa=16200,Sa=16206,ga=16209,Ia=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Da(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ca=e=>{if(!e)return 1;const n=e.state;return!n||n.strm!==e||n.mode<ra||n.mode>16211?1:0},Ca=e=>{if(ca(e))return Jn;const n=e.state;return e.total_in=e.total_out=n.total=0,e.msg="",n.wrap&&(e.adler=1&n.wrap),n.mode=ra,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(852),n.distcode=n.distdyn=new Int32Array(592),n.sane=1,n.back=-1,Yn},ua=e=>{if(ca(e))return Jn;const n=e.state;return n.wsize=0,n.whave=0,n.wnext=0,Ca(e)},Ma=(e,n)=>{let a;if(ca(e))return Jn;const r=e.state;return n<0?(a=0,n=-n):(a=5+(n>>4),n<48&&(n&=15)),n&&(n<8||n>15)?Jn:(null!==r.window&&r.wbits!==n&&(r.window=null),r.wrap=a,r.wbits=n,ua(e))},la=(e,n)=>{if(!e)return Jn;const a=new Da;e.state=a,a.strm=e,a.window=null,a.mode=ra;const r=Ma(e,n);return r!==Yn&&(e.state=null),r};let Ea,Oa,Pa=!0;const Aa=e=>{if(Pa){Ea=new Int32Array(512),Oa=new Int32Array(32);let n=0;for(;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(Wn(1,e.lens,0,288,Ea,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;Wn(2,e.lens,0,32,Oa,0,e.work,{bits:5}),Pa=!1}e.lencode=Ea,e.lenbits=9,e.distcode=Oa,e.distbits=5},da=(e,n,a,r)=>{let t;const i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),r>=i.wsize?(i.window.set(n.subarray(a-i.wsize,a),0),i.wnext=0,i.whave=i.wsize):(t=i.wsize-i.wnext,t>r&&(t=r),i.window.set(n.subarray(a-r,a-r+t),i.wnext),(r-=t)?(i.window.set(n.subarray(a-r,a),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=t,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=t))),0};var Ta=ua,fa=la,Ra=(e,n)=>{let a,r,t,i,v,o,m,s,S,g,I,D,c,C,u,M,l,E,O,P,A,d,T=0;const f=new Uint8Array(4);let R,p;const h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ca(e)||!e.output||!e.input&&0!==e.avail_in)return Jn;a=e.state,a.mode===ia&&(a.mode=va),v=e.next_out,t=e.output,m=e.avail_out,i=e.next_in,r=e.input,o=e.avail_in,s=a.hold,S=a.bits,g=o,I=m,d=Yn;e:for(;;)switch(a.mode){case ra:if(0===a.wrap){a.mode=va;break}for(;S<16;){if(0===o)break e;o--,s+=r[i++]<<S,S+=8}if(2&a.wrap&&35615===s){0===a.wbits&&(a.wbits=15),a.check=0,f[0]=255&s,f[1]=s>>>8&255,a.check=Ie(a.check,f,2,0),s=0,S=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&s)<<8)+(s>>8))%31){e.msg="incorrect header check",a.mode=ga;break}if((15&s)!==aa){e.msg="unknown compression method",a.mode=ga;break}if(s>>>=4,S-=4,A=8+(15&s),0===a.wbits&&(a.wbits=A),A>15||A>a.wbits){e.msg="invalid window size",a.mode=ga;break}a.dmax=1<<a.wbits,a.flags=0,e.adler=a.check=1,a.mode=512&s?16189:ia,s=0,S=0;break;case 16181:for(;S<16;){if(0===o)break e;o--,s+=r[i++]<<S,S+=8}if(a.flags=s,(255&a.flags)!==aa){e.msg="unknown compression method",a.mode=ga;break}if(57344&a.flags){e.msg="unknown header flags set",a.mode=ga;break}a.head&&(a.head.text=s>>8&1),512&a.flags&&4&a.wrap&&(f[0]=255&s,f[1]=s>>>8&255,a.check=Ie(a.check,f,2,0)),s=0,S=0,a.mode=16182;case 16182:for(;S<32;){if(0===o)break e;o--,s+=r[i++]<<S,S+=8}a.head&&(a.head.time=s),512&a.flags&&4&a.wrap&&(f[0]=255&s,f[1]=s>>>8&255,f[2]=s>>>16&255,f[3]=s>>>24&255,a.check=Ie(a.check,f,4,0)),s=0,S=0,a.mode=16183;case 16183:for(;S<16;){if(0===o)break e;o--,s+=r[i++]<<S,S+=8}a.head&&(a.head.xflags=255&s,a.head.os=s>>8),512&a.flags&&4&a.wrap&&(f[0]=255&s,f[1]=s>>>8&255,a.check=Ie(a.check,f,2,0)),s=0,S=0,a.mode=16184;case 16184:if(1024&a.flags){for(;S<16;){if(0===o)break e;o--,s+=r[i++]<<S,S+=8}a.length=s,a.head&&(a.head.extra_len=s),512&a.flags&&4&a.wrap&&(f[0]=255&s,f[1]=s>>>8&255,a.check=Ie(a.check,f,2,0)),s=0,S=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(D=a.length,D>o&&(D=o),D&&(a.head&&(A=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(r.subarray(i,i+D),A)),512&a.flags&&4&a.wrap&&(a.check=Ie(a.check,r,D,i)),o-=D,i+=D,a.length-=D),a.length))break e;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break e;D=0;do{A=r[i+D++],a.head&&A&&a.length<65536&&(a.head.name+=String.fromCharCode(A))}while(A&&D<o);if(512&a.flags&&4&a.wrap&&(a.check=Ie(a.check,r,D,i)),o-=D,i+=D,A)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break e;D=0;do{A=r[i+D++],a.head&&A&&a.length<65536&&(a.head.comment+=String.fromCharCode(A))}while(A&&D<o);if(512&a.flags&&4&a.wrap&&(a.check=Ie(a.check,r,D,i)),o-=D,i+=D,A)break e}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;S<16;){if(0===o)break e;o--,s+=r[i++]<<S,S+=8}if(4&a.wrap&&s!==(65535&a.check)){e.msg="header crc mismatch",a.mode=ga;break}s=0,S=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),e.adler=a.check=0,a.mode=ia;break;case 16189:for(;S<32;){if(0===o)break e;o--,s+=r[i++]<<S,S+=8}e.adler=a.check=Ia(s),s=0,S=0,a.mode=ta;case ta:if(0===a.havedict)return e.next_out=v,e.avail_out=m,e.next_in=i,e.avail_in=o,a.hold=s,a.bits=S,Zn;e.adler=a.check=1,a.mode=ia;case ia:if(n===jn||n===Xn)break e;case va:if(a.last){s>>>=7&S,S-=7&S,a.mode=Sa;break}for(;S<3;){if(0===o)break e;o--,s+=r[i++]<<S,S+=8}switch(a.last=1&s,s>>>=1,S-=1,3&s){case 0:a.mode=16193;break;case 1:if(Aa(a),a.mode=ma,n===Xn){s>>>=2,S-=2;break e}break;case 2:a.mode=16196;break;case 3:e.msg="invalid block type",a.mode=ga}s>>>=2,S-=2;break;case 16193:for