@mosip/react-inji-verify-sdk
Version:
A react component library to perform Inji verify tasks, such as OpenId4VP sharing, Reading VC QR codes
2 lines • 1.85 MB
JavaScript
/*! For license information please see index.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("@mosip/react-inji-verify-sdk",["react"],t):"object"==typeof exports?exports["@mosip/react-inji-verify-sdk"]=t(require("react")):e["@mosip/react-inji-verify-sdk"]=t(e.react)}(self,e=>(()=>{var t={157:(e,t,n)=>{const r=n(6886),i=n(9953),s=n(9899),a=n(8820),o=n(6421),l=n(7756),c=n(1332),h=n(7518),u=n(4764),d=n(1427),f=n(4565),p=n(208),g=n(9801);function m(e,t,n){const r=e.size,i=f.getEncodedBits(t,n);let s,a;for(s=0;s<15;s++)a=1==(i>>s&1),s<6?e.set(s,8,a,!0):s<8?e.set(s+1,8,a,!0):e.set(r-15+s,8,a,!0),s<8?e.set(8,r-s-1,a,!0):s<9?e.set(8,15-s-1+1,a,!0):e.set(8,15-s-1,a,!0);e.set(r-8,8,1,!0)}function b(e,t,n,i){let f;if(Array.isArray(e))f=g.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=g.rawSplit(e);r=d.getBestVersionForData(t,n)}f=g.fromString(e,r||40)}}const b=d.getBestVersionForData(f,n);if(!b)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<b)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+b+".\n")}else t=b;const y=function(e,t,n){const i=new s;n.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(i)});const a=8*(r.getSymbolTotalCodewords(e)-h.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const o=(a-i.getLengthInBits())/8;for(let e=0;e<o;e++)i.put(e%2?17:236,8);return function(e,t,n){const i=r.getSymbolTotalCodewords(t),s=i-h.getTotalCodewordsCount(t,n),a=h.getBlocksCount(t,n),o=a-i%a,l=Math.floor(i/a),c=Math.floor(s/a),d=c+1,f=l-c,p=new u(f);let g=0;const m=new Array(a),b=new Array(a);let y=0;const w=new Uint8Array(e.buffer);for(let e=0;e<a;e++){const t=e<o?c:d;m[e]=w.slice(g,g+t),b[e]=p.encode(m[e]),g+=t,y=Math.max(y,t)}const v=new Uint8Array(i);let x,_,A=0;for(x=0;x<y;x++)for(_=0;_<a;_++)x<m[_].length&&(v[A++]=m[_][x]);for(x=0;x<f;x++)for(_=0;_<a;_++)v[A++]=b[_][x];return v}(i,e,t)}(t,n,f),w=r.getSymbolSize(t),v=new a(w);return function(e,t){const n=e.size,r=l.getPositions(t);for(let t=0;t<r.length;t++){const i=r[t][0],s=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)s+r<=-1||n<=s+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,s+r,!0,!0):e.set(i+t,s+r,!1,!0))}}(v,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(v),function(e,t){const n=o.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}(v,t),m(v,n,0),t>=7&&function(e,t){const n=e.size,r=d.getEncodedBits(t);let i,s,a;for(let t=0;t<18;t++)i=Math.floor(t/3),s=t%3+n-8-3,a=1==(r>>t&1),e.set(i,s,a,!0),e.set(s,i,a,!0)}(v,t),function(e,t){const n=e.size;let r=-1,i=n-1,s=7,a=0;for(let o=n-1;o>0;o-=2)for(6===o&&o--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,o-n)){let r=!1;a<t.length&&(r=1==(t[a]>>>s&1)),e.set(i,o-n,r),s--,-1===s&&(a++,s=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(v,y),isNaN(i)&&(i=c.getBestMask(v,m.bind(null,v,n))),c.applyMask(i,v),m(v,n,i),{modules:v,version:t,errorCorrectionLevel:n,maskPattern:i,segments:f}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let n,s,a=i.M;return void 0!==t&&(a=i.from(t.errorCorrectionLevel,i.M),n=d.from(t.version),s=c.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),b(e,n,a,s)}},208:(e,t,n)=>{const r=n(1878),i=n(7044);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},1020:(e,t,n)=>{"use strict";var r=n(9155),i=Symbol.for("react.element"),s=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,l={},c=null,h=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(h=t.ref),t)s.call(t,r)&&!o.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:h,props:l,_owner:a.current}}t.jsx=l,t.jsxs=l},1113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1193:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1601),i=n.n(r),s=n(6314),a=n.n(s)()(i());a.push([e.id,".qrcode-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.loader {\n position: absolute;\n top: 45%;\n left: 45%;\n transform: translate(-50%, -75%); /* Center the loader */\n border: 4px solid rgba(0, 0, 0, 0.1);\n border-left-color: #3498db;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.qr-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n width: 100%;\n}\n\n.qr-wrapper.no-zoom {\n max-width: 28rem;\n margin-left: auto;\n margin-right: auto;\n}\n\n.scan-container {\n position: relative;\n overflow: hidden;\n aspect-ratio: 1 / 1;\n margin: auto;\n border-radius: 0.5rem;\n}\n\n.scan-container.zoom-enabled {\n position: fixed;\n inset: 0;\n width: 100%;\n height: 100%;\n z-index: 10;\n}\n\n.scan-container.no-zoom {\n width: 100%;\n max-width: 28rem;\n margin-left: auto;\n margin-right: auto;\n aspect-ratio: 1 / 1;\n border-radius: 0.5rem;\n}\n\n.qr-close-button {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n background-color: #1f2937;\n color: white;\n padding: 0.5rem;\n border-radius: 9999px;\n z-index: 10;\n outline: none;\n}\n\n.qr-close-button:hover {\n background-color: #374151;\n}\n\n.qr-close-button:focus {\n outline: none;\n}\n\n.qr-video {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n\n.qr-overlay {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 1rem;\n background: transparent;\n z-index: 10;\n}\n\n.centered-row {\n width: 80%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 0.5rem;\n}\n\n.zoom-button {\n color: white;\n border: 1px solid #3b82f6;\n padding: 0.5rem;\n border-radius: 9999px;\n margin-right: 0.75rem;\n cursor: pointer;\n}\n\n.zoom-button.disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.slider-container {\n flex-grow: 1;\n margin-left: 0.5rem;\n margin-right: 0.5rem;\n}\n\n.zoom-button-decrease {\n color: white;\n border: 1px solid #374151;\n padding: 0.5rem;\n border-radius: 9999px;\n margin-right: 0.75rem;\n cursor: pointer;\n}\n\n.zoom-button-decrease.disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.zoom-button-increase {\n color: white;\n padding: 0.5rem;\n border: 1px solid #374151;\n border-radius: 9999px;\n margin-left: 0.75rem;\n cursor: pointer;\n}\n\n.zoom-button-increase.disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.upload-container {\n margin-top: 1rem;\n width: 100%;\n}\n\n.upload-container.fixed-enabled {\n display: none;\n}\n\n.upload-container.default {\n max-width: 24rem;\n}\n\n.upload-button {\n cursor: pointer;\n width: 100%;\n padding: 0.75rem 1rem;\n border-radius: 0.375rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n text-align: center;\n}\n\n.upload-button-default {\n background-color: #d1d5db;\n color: black;\n}\n",""]);const o=a},1332:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let n=0,r=0,i=0,s=null,a=null;for(let o=0;o<t;o++){r=i=0,s=a=null;for(let l=0;l<t;l++){let t=e.get(o,l);t===s?r++:(r>=5&&(n+=r-5+3),s=t,r=1),t=e.get(l,o),t===a?i++:(i>=5&&(n+=i-5+3),a=t,i=1)}r>=5&&(n+=r-5+3),i>=5&&(n+=i-5+3)}return n},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return 3*n},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,i=0;for(let s=0;s<t;s++){r=i=0;for(let a=0;a<t;a++)r=r<<1&2047|e.get(s,a),a>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|e.get(a,s),a>=10&&(1488===i||93===i)&&n++}return 40*n},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return 10*Math.abs(Math.ceil(100*t/n/5)-10)},t.applyMask=function(e,t){const r=t.size;for(let i=0;i<r;i++)for(let s=0;s<r;s++)t.isReserved(s,i)||t.xor(s,i,n(e,s,i))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let i=0,s=1/0;for(let a=0;a<r;a++){n(a),t.applyMask(a,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),r<s&&(s=r,i=a)}return i}},1333:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},1427:(e,t,n)=>{const r=n(6886),i=n(7518),s=n(9953),a=n(208),o=n(1878),l=r.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}function h(e,t){let n=0;return e.forEach(function(e){const r=c(e.mode,t);n+=r+e.getBitsLength()}),n}t.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!o.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const s=8*(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(n===a.MIXED)return s;const l=s-c(n,e);switch(n){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,n){let r;const i=s.from(n,s.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(h(e,r)<=t.getCapacity(r,n,a.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-l>=0;)t^=7973<<r.getBCHDigit(t)-l;return e<<12|t}},1433:(e,t,n)=>{const r=n(208),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(e){this.mode=r.ALPHANUMERIC,this.data=e}s.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=s},1447:(e,t,n)=>{"use strict";const r=n(3269),i=n(4823),s=n(7293),a=n(1998),{Z_FINISH:o,Z_BLOCK:l,Z_TREES:c,Z_OK:h,Z_STREAM_END:u,Z_NEED_DICT:d,Z_STREAM_ERROR:f,Z_DATA_ERROR:p,Z_MEM_ERROR:g,Z_BUF_ERROR:m,Z_DEFLATED:b}=n(9681),y=16180,w=16190,v=16191,x=16192,_=16194,A=16199,k=16200,S=16206,C=16209,E=16210,I=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function T(){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 R=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<y||t.mode>16211?1:0},M=e=>{if(R(e))return f;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=y,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,h},P=e=>{if(R(e))return f;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,M(e)},B=(e,t)=>{let n;if(R(e))return f;const r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?f:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,P(e))},D=(e,t)=>{if(!e)return f;const n=new T;e.state=n,n.strm=e,n.window=null,n.mode=y;const r=B(e,t);return r!==h&&(e.state=null),r};let F,N,O=!0;const L=e=>{if(O){F=new Int32Array(512),N=new Int32Array(32);let t=0;for(;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(a(1,e.lens,0,288,F,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,N,0,e.work,{bits:5}),O=!1}e.lencode=F,e.lenbits=9,e.distcode=N,e.distbits=5},U=(e,t,n,r)=>{let i;const s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(n-s.wsize,n),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(t.subarray(n-r,n-r+i),s.wnext),(r-=i)?(s.window.set(t.subarray(n-r,n),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0};e.exports.inflateReset=P,e.exports.inflateReset2=B,e.exports.inflateResetKeep=M,e.exports.inflateInit=e=>D(e,15),e.exports.inflateInit2=D,e.exports.inflate=(e,t)=>{let n,T,M,P,B,D,F,N,O,j,$,z,H,q,W,G,V,X,K,Y,Z,J,Q=0;const ee=new Uint8Array(4);let te,ne;const re=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(R(e)||!e.output||!e.input&&0!==e.avail_in)return f;n=e.state,n.mode===v&&(n.mode=x),B=e.next_out,M=e.output,F=e.avail_out,P=e.next_in,T=e.input,D=e.avail_in,N=n.hold,O=n.bits,j=D,$=F,J=h;e:for(;;)switch(n.mode){case y:if(0===n.wrap){n.mode=x;break}for(;O<16;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if(2&n.wrap&&35615===N){0===n.wbits&&(n.wbits=15),n.check=0,ee[0]=255&N,ee[1]=N>>>8&255,n.check=i(n.check,ee,2,0),N=0,O=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&N)<<8)+(N>>8))%31){e.msg="incorrect header check",n.mode=C;break}if((15&N)!==b){e.msg="unknown compression method",n.mode=C;break}if(N>>>=4,O-=4,Z=8+(15&N),0===n.wbits&&(n.wbits=Z),Z>15||Z>n.wbits){e.msg="invalid window size",n.mode=C;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&N?16189:v,N=0,O=0;break;case 16181:for(;O<16;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if(n.flags=N,(255&n.flags)!==b){e.msg="unknown compression method",n.mode=C;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=C;break}n.head&&(n.head.text=N>>8&1),512&n.flags&&4&n.wrap&&(ee[0]=255&N,ee[1]=N>>>8&255,n.check=i(n.check,ee,2,0)),N=0,O=0,n.mode=16182;case 16182:for(;O<32;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}n.head&&(n.head.time=N),512&n.flags&&4&n.wrap&&(ee[0]=255&N,ee[1]=N>>>8&255,ee[2]=N>>>16&255,ee[3]=N>>>24&255,n.check=i(n.check,ee,4,0)),N=0,O=0,n.mode=16183;case 16183:for(;O<16;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}n.head&&(n.head.xflags=255&N,n.head.os=N>>8),512&n.flags&&4&n.wrap&&(ee[0]=255&N,ee[1]=N>>>8&255,n.check=i(n.check,ee,2,0)),N=0,O=0,n.mode=16184;case 16184:if(1024&n.flags){for(;O<16;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}n.length=N,n.head&&(n.head.extra_len=N),512&n.flags&&4&n.wrap&&(ee[0]=255&N,ee[1]=N>>>8&255,n.check=i(n.check,ee,2,0)),N=0,O=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(z=n.length,z>D&&(z=D),z&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(T.subarray(P,P+z),Z)),512&n.flags&&4&n.wrap&&(n.check=i(n.check,T,z,P)),D-=z,P+=z,n.length-=z),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===D)break e;z=0;do{Z=T[P+z++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&z<D);if(512&n.flags&&4&n.wrap&&(n.check=i(n.check,T,z,P)),D-=z,P+=z,Z)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===D)break e;z=0;do{Z=T[P+z++],n.head&&Z&&n.length<65536&&(n.head.comment+=String.fromCharCode(Z))}while(Z&&z<D);if(512&n.flags&&4&n.wrap&&(n.check=i(n.check,T,z,P)),D-=z,P+=z,Z)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;O<16;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if(4&n.wrap&&N!==(65535&n.check)){e.msg="header crc mismatch",n.mode=C;break}N=0,O=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=v;break;case 16189:for(;O<32;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}e.adler=n.check=I(N),N=0,O=0,n.mode=w;case w:if(0===n.havedict)return e.next_out=B,e.avail_out=F,e.next_in=P,e.avail_in=D,n.hold=N,n.bits=O,d;e.adler=n.check=1,n.mode=v;case v:if(t===l||t===c)break e;case x:if(n.last){N>>>=7&O,O-=7&O,n.mode=S;break}for(;O<3;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}switch(n.last=1&N,N>>>=1,O-=1,3&N){case 0:n.mode=16193;break;case 1:if(L(n),n.mode=A,t===c){N>>>=2,O-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=C}N>>>=2,O-=2;break;case 16193:for(N>>>=7&O,O-=7&O;O<32;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if((65535&N)!=(N>>>16^65535)){e.msg="invalid stored block lengths",n.mode=C;break}if(n.length=65535&N,N=0,O=0,n.mode=_,t===c)break e;case _:n.mode=16195;case 16195:if(z=n.length,z){if(z>D&&(z=D),z>F&&(z=F),0===z)break e;M.set(T.subarray(P,P+z),B),D-=z,P+=z,F-=z,B+=z,n.length-=z;break}n.mode=v;break;case 16196:for(;O<14;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if(n.nlen=257+(31&N),N>>>=5,O-=5,n.ndist=1+(31&N),N>>>=5,O-=5,n.ncode=4+(15&N),N>>>=4,O-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=C;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;O<3;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}n.lens[re[n.have++]]=7&N,N>>>=3,O-=3}for(;n.have<19;)n.lens[re[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,te={bits:n.lenbits},J=a(0,n.lens,0,19,n.lencode,0,n.work,te),n.lenbits=te.bits,J){e.msg="invalid code lengths set",n.mode=C;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;Q=n.lencode[N&(1<<n.lenbits)-1],W=Q>>>24,G=Q>>>16&255,V=65535&Q,!(W<=O);){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if(V<16)N>>>=W,O-=W,n.lens[n.have++]=V;else{if(16===V){for(ne=W+2;O<ne;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if(N>>>=W,O-=W,0===n.have){e.msg="invalid bit length repeat",n.mode=C;break}Z=n.lens[n.have-1],z=3+(3&N),N>>>=2,O-=2}else if(17===V){for(ne=W+3;O<ne;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}N>>>=W,O-=W,Z=0,z=3+(7&N),N>>>=3,O-=3}else{for(ne=W+7;O<ne;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}N>>>=W,O-=W,Z=0,z=11+(127&N),N>>>=7,O-=7}if(n.have+z>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=C;break}for(;z--;)n.lens[n.have++]=Z}}if(n.mode===C)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=C;break}if(n.lenbits=9,te={bits:n.lenbits},J=a(1,n.lens,0,n.nlen,n.lencode,0,n.work,te),n.lenbits=te.bits,J){e.msg="invalid literal/lengths set",n.mode=C;break}if(n.distbits=6,n.distcode=n.distdyn,te={bits:n.distbits},J=a(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,te),n.distbits=te.bits,J){e.msg="invalid distances set",n.mode=C;break}if(n.mode=A,t===c)break e;case A:n.mode=k;case k:if(D>=6&&F>=258){e.next_out=B,e.avail_out=F,e.next_in=P,e.avail_in=D,n.hold=N,n.bits=O,s(e,$),B=e.next_out,M=e.output,F=e.avail_out,P=e.next_in,T=e.input,D=e.avail_in,N=n.hold,O=n.bits,n.mode===v&&(n.back=-1);break}for(n.back=0;Q=n.lencode[N&(1<<n.lenbits)-1],W=Q>>>24,G=Q>>>16&255,V=65535&Q,!(W<=O);){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if(G&&!(240&G)){for(X=W,K=G,Y=V;Q=n.lencode[Y+((N&(1<<X+K)-1)>>X)],W=Q>>>24,G=Q>>>16&255,V=65535&Q,!(X+W<=O);){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}N>>>=X,O-=X,n.back+=X}if(N>>>=W,O-=W,n.back+=W,n.length=V,0===G){n.mode=16205;break}if(32&G){n.back=-1,n.mode=v;break}if(64&G){e.msg="invalid literal/length code",n.mode=C;break}n.extra=15&G,n.mode=16201;case 16201:if(n.extra){for(ne=n.extra;O<ne;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}n.length+=N&(1<<n.extra)-1,N>>>=n.extra,O-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;Q=n.distcode[N&(1<<n.distbits)-1],W=Q>>>24,G=Q>>>16&255,V=65535&Q,!(W<=O);){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if(!(240&G)){for(X=W,K=G,Y=V;Q=n.distcode[Y+((N&(1<<X+K)-1)>>X)],W=Q>>>24,G=Q>>>16&255,V=65535&Q,!(X+W<=O);){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}N>>>=X,O-=X,n.back+=X}if(N>>>=W,O-=W,n.back+=W,64&G){e.msg="invalid distance code",n.mode=C;break}n.offset=V,n.extra=15&G,n.mode=16203;case 16203:if(n.extra){for(ne=n.extra;O<ne;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}n.offset+=N&(1<<n.extra)-1,N>>>=n.extra,O-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=C;break}n.mode=16204;case 16204:if(0===F)break e;if(z=$-F,n.offset>z){if(z=n.offset-z,z>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=C;break}z>n.wnext?(z-=n.wnext,H=n.wsize-z):H=n.wnext-z,z>n.length&&(z=n.length),q=n.window}else q=M,H=B-n.offset,z=n.length;z>F&&(z=F),F-=z,n.length-=z;do{M[B++]=q[H++]}while(--z);0===n.length&&(n.mode=k);break;case 16205:if(0===F)break e;M[B++]=n.length,F--,n.mode=k;break;case S:if(n.wrap){for(;O<32;){if(0===D)break e;D--,N|=T[P++]<<O,O+=8}if($-=F,e.total_out+=$,n.total+=$,4&n.wrap&&$&&(e.adler=n.check=n.flags?i(n.check,M,$,B-$):r(n.check,M,$,B-$)),$=F,4&n.wrap&&(n.flags?N:I(N))!==n.check){e.msg="incorrect data check",n.mode=C;break}N=0,O=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;O<32;){if(0===D)break e;D--,N+=T[P++]<<O,O+=8}if(4&n.wrap&&N!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=C;break}N=0,O=0}n.mode=16208;case 16208:J=u;break e;case C:J=p;break e;case E:return g;default:return f}return e.next_out=B,e.avail_out=F,e.next_in=P,e.avail_in=D,n.hold=N,n.bits=O,(n.wsize||$!==e.avail_out&&n.mode<C&&(n.mode<S||t!==o))&&U(e,e.output,e.next_out,$-e.avail_out)?(n.mode=E,g):(j-=e.avail_in,$-=e.avail_out,e.total_in+=j,e.total_out+=$,n.total+=$,4&n.wrap&&$&&(e.adler=n.check=n.flags?i(n.check,M,$,e.next_out-$):r(n.check,M,$,e.next_out-$)),e.data_type=n.bits+(n.last?64:0)+(n.mode===v?128:0)+(n.mode===A||n.mode===_?256:0),(0===j&&0===$||t===o)&&J===h&&(J=m),J)},e.exports.inflateEnd=e=>{if(R(e))return f;let t=e.state;return t.window&&(t.window=null),e.state=null,h},e.exports.inflateGetHeader=(e,t)=>{if(R(e))return f;const n=e.state;return 2&n.wrap?(n.head=t,t.done=!1,h):f},e.exports.inflateSetDictionary=(e,t)=>{const n=t.length;let i,s,a;return R(e)?f:(i=e.state,0!==i.wrap&&i.mode!==w?f:i.mode===w&&(s=1,s=r(s,t,n,0),s!==i.check)?p:(a=U(e,t,n,n),a?(i.mode=E,g):(i.havedict=1,h)))},e.exports.inflateInfo="pako inflate (from Nodeca project)"},1601:e=>{"use strict";e.exports=function(e){return e[1]}},1668:(e,t,n)=>{"use strict";const{Deflate:r,deflate:i,deflateRaw:s,gzip:a}=n(3303),{Inflate:o,inflate:l,inflateRaw:c,ungzip:h}=n(7083),u=n(9681);e.exports.Deflate=r,e.exports.deflate=i,e.exports.deflateRaw=s,e.exports.gzip=a,e.exports.Inflate=o,e.exports.inflate=l,e.exports.inflateRaw=c,e.exports.ungzip=h,e.exports.constants=u},1710:(e,t,n)=>{e.exports=function e(t,n,r){function i(a,o){if(!n[a]){if(!t[a]){if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){return i(t[a][1][e]||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var s=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,i,a,o,l,c,h=[],u=0,d=e.length,f=d,p="string"!==r.getTypeOf(e);u<e.length;)f=d-u,i=p?(t=e[u++],n=u<d?e[u++]:0,u<d?e[u++]:0):(t=e.charCodeAt(u++),n=u<d?e.charCodeAt(u++):0,u<d?e.charCodeAt(u++):0),a=t>>2,o=(3&t)<<4|n>>4,l=1<f?(15&n)<<2|i>>6:64,c=2<f?63&i:64,h.push(s.charAt(a)+s.charAt(o)+s.charAt(l)+s.charAt(c));return h.join("")},n.decode=function(e){var t,n,r,a,o,l,c=0,h=0,u="data:";if(e.substr(0,5)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===s.charAt(64)&&f--,e.charAt(e.length-2)===s.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=i.uint8array?new Uint8Array(0|f):new Array(0|f);c<e.length;)t=s.indexOf(e.charAt(c++))<<2|(a=s.indexOf(e.charAt(c++)))>>4,n=(15&a)<<4|(o=s.indexOf(e.charAt(c++)))>>2,r=(3&o)<<6|(l=s.indexOf(e.charAt(c++))),d[h++]=t,64!==o&&(d[h++]=n),64!==l&&(d[h++]=r);return d}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,n){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n){var r=i,s=0+n;e^=-1;for(var a=0;a<s;a++)e=e>>>8^r[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,n){var r=i,s=0+n;e^=-1;for(var a=0;a<s;a++)e=e>>>8^r[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=r?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",s.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function i(e,t,n,i,a,h){var u,d,f=e.file,p=e.compression,g=h!==o.utf8encode,m=s.transformTo("string",h(f.name)),b=s.transformTo("string",o.utf8encode(f.name)),y=f.comment,w=s.transformTo("string",h(y)),v=s.transformTo("string",o.utf8encode(y)),x=b.length!==f.name.length,_=v.length!==y.length,A="",k="",S="",C=f.dir,E=f.date,I={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var T=0;t&&(T|=8),g||!x&&!_||(T|=2048);var R=0,M=0;C&&(R|=16),"UNIX"===a?(M=798,R|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(f.unixPermissions,C)):(M=20,R|=function(e){return 63&(e||0)}(f.dosPermissions)),u=E.getUTCHours(),u<<=6,u|=E.getUTCMinutes(),u<<=5,u|=E.getUTCSeconds()/2,d=E.getUTCFullYear()-1980,d<<=4,d|=E.getUTCMonth()+1,d<<=5,d|=E.getUTCDate(),x&&(k=r(1,1)+r(l(m),4)+b,A+="up"+r(k.length,2)+k),_&&(S=r(1,1)+r(l(w),4)+v,A+="uc"+r(S.length,2)+S);var P="";return P+="\n\0",P+=r(T,2),P+=p.magic,P+=r(u,2),P+=r(d,2),P+=r(I.crc32,4),P+=r(I.compressedSize,4),P+=r(I.uncompressedSize,4),P+=r(m.length,2),P+=r(A.length,2),{fileRecord:c.LOCAL_FILE_HEADER+P+m+A,dirRecord:c.CENTRAL_FILE_HEADER+r(M,2)+P+r(w.length,2)+"\0\0\0\0"+r(R,4)+r(i,4)+m+A+w}}var s=e("../utils"),a=e("../stream/GenericWorker"),o=e("../utf8"),l=e("../crc32"),c=e("../signature");function h(e,t,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(h,a),h.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},h.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,i=function(e,t,n,i,a){var o=s.transformTo("string",a(i));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(o.length,2)+o}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},h.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(e){var t=this._sources;if(!a.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},h.prototype.lock=function(){a.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){"use strict";var r=e("../compressions"),i=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var s=new i(t.streamFiles,n,t.platform,t.encodeFileName),a=0;try{e.forEach(function(e,n){a++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw new Error(n+" is not a valid compression method !");return i}(n.options.compression,t.compression),o=n.options.compressionOptions||t.compressionOptions||{},l=n.dir,c=n.date;n._compressWorker(i,o).withStreamInfo("file",{name:e,dir:l,date:c,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(s)}),s.entriesCount=a}catch(e){s.error(e)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(r.prototype=e("./object")).loadAsync=e("./load"),r.support=e("./support"),r.defaults=e("./defaults"),r.version="3.10.1",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=e("./external"),t.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./external"),s=e("./utf8"),a=e("./zipEntries"),o=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new i.Promise(function(t,n){var r=e.decompressed.getContentWorker().pipe(new o);r.on("error",function(e){n(e)}).on("end",function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}t.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new a(t);return n.load(e),n}).then(function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var s=0;s<r.length;s++)n.push(c(r[s]));return i.Promise.all(n)}).then(function(e){for(var i=e.shift(),s=i.files,a=0;a<s.length;a++){var o=s[a],l=o.fileNameStr,c=r.resolve(o.fileNameStr);n.file(c,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:t.createFolders}),o.dir||(n.file(c).unsafeOriginalName=l)}return i.zipComment.length&&(n.comment=i.zipComment),n})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../stream/GenericWorker");function s(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(s,i),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},s.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){"use strict";var r=e("readable-stream").Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on("data",function(e,t){i.push(e)||i._helper.pause(),n&&n(t)}).on("error",function(e){i.emit("error",e)}).on("end",function(){i.push(null)})}e("../utils").inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,n){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,n){"use strict";function r(e,t,n){var r,i=s.getTypeOf(t),o=s.extend(n||{},l);o.date=o.date||new Date,null!==o.compression&&(o.compression=o.compression.toUpperCase()),"string"==typeof o.unixPermissions&&(o.unixPermissions=parseInt(o.unixPermissions,8)),o.unixPermissions&&16384&o.unixPermissions&&(o.dir=!0),o.dosPermissions&&16&o.dosPermissions&&(o.dir=!0),o.dir&&(e=g(e)),o.createFolders&&(r=p(e))&&m.call(this,r,!0);var u="string"===i&&!1===o.binary&&!1===o.base64;n&&void 0!==n.binary||(o.binary=!u),(t instanceof c&&0===t.uncompressedSize||o.dir||!t||0===t.length)&&(o.base64=!1,o.binary=!0,t="",o.compression="STORE",i="string");var b;b=t instanceof c||t instanceof a?t:d.isNode&&d.isStream(t)?new f(e,t):s.prepareContent(e,t,o.binary,o.optimizedBinaryString,o.base64);var y=new h(e,b,o);this.files[e]=y}var i=e("./utf8"),s=e("./utils"),a=e("./stream/GenericWorker"),o=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),h=e("./zipObject"),u=e("./generate"),d=e("./nodejsUtils"),f=e("./nodejs/NodejsStreamInputAdapter"),p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:l.createFolders,e=g(e),this.files[e]||r.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function b(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(1!==arguments.length)return e=this.root+e,r.call(this,e,t,n),this;if(b(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var s=this.files[this.root+e];return s&&!s.dir?s:null},folder:function(e){if(!e)return this;if(b(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=m.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=s.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");s.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var r=n.comment||this.comment||"";t=u.generateWorker(this,n,r)}catch(e){(t=new a("error")).error(e)}return new o(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=y},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===n&&this.data[s+2]===r&&this.data[s+3]===i)return s-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&n===s[1]&&r===s[2]&&i===s[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){"use strict";var r=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e("./ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new l(r.transformTo("uint8array",e)):new s(r.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function s(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,r),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function s(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,r),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)