UNPKG

zego-express-engine-webrtc

Version:

zego webrtc express sdk

30 lines 339 kB
!function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i(require("long"));else if("function"==typeof define&&define.amd)define(["long"],i);else{var n="object"==typeof exports?i(require("long")):i(t.long);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}("undefined"!=typeof self?self:this,function(t){return function(){var i={19:function(t,i,n){var r,e,o,s,u,c,a,l;t.exports=(l=n(9021),n(3009),n(1025),s=(e=(r=l).lib).WordArray,c=(u=r.algo).HMAC,a=u.PBKDF2=(o=e.Base).extend({cfg:o.extend({keySize:4,hasher:u.SHA256,iterations:25e4}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,i){for(var n=this.cfg,r=c.create(n.hasher,t),e=s.create(),o=s.create([1]),u=e.words,a=o.words,l=n.keySize,h=n.iterations;u.length<l;){var d=r.update(i).finalize(o);r.reset();for(var f=d.words,b=f.length,m=d,Z=1;Z<h;Z++){m=r.finalize(m),r.reset();for(var y=m.words,v=0;v<b;v++)f[v]^=y[v]}e.concat(d),a[0]++}return e.sigBytes=4*l,e}}),r.PBKDF2=function(t,i,n){return a.create(n).compute(t,i)},l.PBKDF2)},25:function(t,i,n){var r,e,o;t.exports=(o=n(9021),n(7165),r=o.lib.CipherParams,e=o.enc.Hex,o.format.Hex={stringify:function(t){return t.ciphertext.toString(e)},parse:function(t){var i=e.parse(t);return r.create({ciphertext:i})}},o.format.Hex)},477:function(){},482:function(t,i,n){var r;t.exports=(r=n(9021),n(7165),r.pad.Iso97971={pad:function(t,i){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,i)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971)},754:function(t,i,n){var r;t.exports=(r=n(9021),function(){var t=r.lib.WordArray;function i(i,n,r){for(var e=[],o=0,s=0;s<n;s++)if(s%4){var u=r[i.charCodeAt(s-1)]<<s%4*2,c=r[i.charCodeAt(s)]>>>6-s%4*2;e[o>>>2]|=(u|c)<<24-o%4*8,o++}return t.create(e,o)}r.enc.Base64={stringify:function(t){var i=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var e=[],o=0;o<n;o+=3)for(var s=(i[o>>>2]>>>24-o%4*8&255)<<16|(i[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|i[o+2>>>2]>>>24-(o+2)%4*8&255,u=0;u<4&&o+.75*u<n;u++)e.push(r.charAt(s>>>6*(3-u)&63));var c=r.charAt(64);if(c)for(;e.length%4;)e.push(c);return e.join("")},parse:function(t){var n=t.length,r=this._map,e=this._reverseMap;if(!e){e=this._reverseMap=[];for(var o=0;o<r.length;o++)e[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var u=t.indexOf(s);-1!==u&&(n=u)}return i(t,n,e)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)},795:function(t){var i;self,i=()=>(()=>{var t={453:(t,i,n)=>{"use strict";n.r(i),n.d(i,{InferenceSession:()=>b,Tensor:()=>d,env:()=>s,registerBackend:()=>o});const r={},e=[],o=(t,i,n)=>{if(!i||"function"!=typeof i.init||"function"!=typeof i.createSessionHandler)throw new TypeError("not a valid backend");{const o=r[t];if(void 0===o)r[t]={backend:i,priority:n};else{if(o.priority>n)return;if(o.priority===n&&o.backend!==i)throw new Error(`cannot register backend "${t}" using priority ${n}`)}if(n>=0){const i=e.indexOf(t);-1!==i&&e.splice(i,1);for(let i=0;i<e.length;i++)if(r[e[i]].priority<=n)return void e.splice(i,0,t);e.push(t)}}},s=new class{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(t){if(void 0!==t){if("string"!=typeof t||-1===["verbose","info","warning","error","fatal"].indexOf(t))throw new Error(`Unsupported logging level: ${t}`);this.logLevelInternal=t}}get logLevel(){return this.logLevelInternal}},u="undefined"!=typeof BigInt64Array&&"function"==typeof BigInt64Array.from,c="undefined"!=typeof BigUint64Array&&"function"==typeof BigUint64Array.from,a=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),l=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);u&&(a.set("int64",BigInt64Array),l.set(BigInt64Array,"int64")),c&&(a.set("uint64",BigUint64Array),l.set(BigUint64Array,"uint64"));class h{constructor(t,i,n){let r,e,o;if("string"==typeof t)if(r=t,o=n,"string"===t){if(!Array.isArray(i))throw new TypeError("A string tensor's data must be a string array.");e=i}else{const n=a.get(t);if(void 0===n)throw new TypeError(`Unsupported tensor type: ${t}.`);if(Array.isArray(i))e=n.from(i);else{if(!(i instanceof n))throw new TypeError(`A ${r} tensor's data must be type of ${n}`);e=i}}else if(o=i,Array.isArray(t)){if(0===t.length)throw new TypeError("Tensor type cannot be inferred from an empty array.");const i=typeof t[0];if("string"===i)r="string",e=t;else{if("boolean"!==i)throw new TypeError(`Invalid element type of data array: ${i}.`);r="bool",e=Uint8Array.from(t)}}else{const i=l.get(t.constructor);if(void 0===i)throw new TypeError(`Unsupported type for tensor data: ${t.constructor}.`);r=i,e=t}if(void 0===o)o=[e.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");const s=(t=>{let i=1;for(let n=0;n<t.length;n++){const r=t[n];if("number"!=typeof r||!Number.isSafeInteger(r))throw new TypeError(`dims[${n}] must be an integer, got: ${r}`);if(r<0)throw new RangeError(`dims[${n}] must be a non-negative integer, got: ${r}`);i*=r}return i})(o);if(s!==e.length)throw new Error(`Tensor's size(${s}) does not match data length(${e.length}).`);this.dims=o,this.type=r,this.data=e,this.size=s}static bufferToTensor(t,i){if(void 0===t)throw new Error("Image buffer must be defined");if(void 0===i.height||void 0===i.width)throw new Error("Image height and width must be defined");const{height:n,width:r}=i,e=i.norm;let o,s;o=void 0===e||void 0===e.mean?255:e.mean,s=void 0===e||void 0===e.bias?0:e.bias;const u=void 0!==i.bitmapFormat?i.bitmapFormat:"RGBA",c=void 0!==i.tensorFormat&&void 0!==i.tensorFormat?i.tensorFormat:"RGB",a=n*r,l="RGBA"===c?new Float32Array(4*a):new Float32Array(3*a);let d=4,f=0,b=1,m=2,Z=3,y=0,v=a,p=2*a,W=-1;"RGB"===u&&(d=3,f=0,b=1,m=2,Z=-1),"RGBA"===c?W=3*a:"RBG"===c?(y=0,p=a,v=2*a):"BGR"===c&&(p=0,v=a,y=2*a);for(let i=0;i<a;i++,f+=d,m+=d,b+=d,Z+=d)l[y++]=(t[f]+s)/o,l[v++]=(t[b]+s)/o,l[p++]=(t[m]+s)/o,-1!==W&&-1!==Z&&(l[W++]=(t[Z]+s)/o);return new h("float32",l,"RGBA"===c?[1,4,n,r]:[1,3,n,r])}static async fromImage(t,i){const n="undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement,r="undefined"!=typeof ImageData&&t instanceof ImageData,e="undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap,o="undefined"!=typeof String&&(t instanceof String||"string"==typeof t);let s,u={};if(n){const n=document.createElement("canvas");n.width=t.width,n.height=t.height;const r=n.getContext("2d");if(null==r)throw new Error("Can not access image data");{let n=t.height,e=t.width;if(void 0!==i&&void 0!==i.resizedHeight&&void 0!==i.resizedWidth&&(n=i.resizedHeight,e=i.resizedWidth),void 0!==i){if(u=i,void 0!==i.tensorFormat)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(u.tensorFormat="RGBA",void 0!==i.height&&i.height!==n)throw new Error("Image input config height doesn't match HTMLImageElement height");if(u.height=n,void 0!==i.width&&i.width!==e)throw new Error("Image input config width doesn't match HTMLImageElement width");u.width=e}else u.tensorFormat="RGBA",u.height=n,u.width=e;r.drawImage(t,0,0),s=r.getImageData(0,0,e,n).data}}else{if(!r){if(e){if(void 0===i)throw new Error("Please provide image config with format for Imagebitmap");if(void 0!==i.bitmapFormat)throw new Error("Image input config format must be defined for ImageBitmap");const n=document.createElement("canvas").getContext("2d");if(null!=n){const r=t.height,e=t.width;if(n.drawImage(t,0,0,e,r),s=n.getImageData(0,0,e,r).data,void 0!==i){if(void 0!==i.height&&i.height!==r)throw new Error("Image input config height doesn't match ImageBitmap height");if(u.height=r,void 0!==i.width&&i.width!==e)throw new Error("Image input config width doesn't match ImageBitmap width");u.width=e}else u.height=r,u.width=e;return h.bufferToTensor(s,u)}throw new Error("Can not access image data")}if(o)return new Promise((n,r)=>{const e=document.createElement("canvas"),o=e.getContext("2d");if(!t||!o)return r();const s=new Image;s.crossOrigin="Anonymous",s.src=t,s.onload=()=>{e.width=s.width,e.height=s.height,o.drawImage(s,0,0,e.width,e.height);const t=o.getImageData(0,0,e.width,e.height);if(void 0!==i){if(void 0!==i.height&&i.height!==e.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(u.height=e.height,void 0!==i.width&&i.width!==e.width)throw new Error("Image input config width doesn't match ImageBitmap width");u.width=e.width}else u.height=e.height,u.width=e.width;n(h.bufferToTensor(t.data,u))}});throw new Error("Input data provided is not supported - aborted tensor creation")}{let n,r;if(void 0!==i&&void 0!==i.resizedWidth&&void 0!==i.resizedHeight?(n=i.resizedHeight,r=i.resizedWidth):(n=t.height,r=t.width),void 0!==i){if(u=i,void 0!==i.bitmapFormat&&"RGBA"!==i.bitmapFormat)throw new Error("Image input config format must be RGBA for ImageData");u.bitmapFormat="RGBA"}else u.bitmapFormat="RGBA";if(u.height=n,u.width=r,void 0!==i){const i=document.createElement("canvas");i.width=r,i.height=n;const e=i.getContext("2d");if(null==e)throw new Error("Can not access image data");e.putImageData(t,0,0),s=e.getImageData(0,0,r,n).data}else s=t.data}}if(void 0!==s)return h.bufferToTensor(s,u);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(t){var i,n;const r=document.createElement("canvas").getContext("2d");let e;if(null==r)throw new Error("Can not access image data");{const o=this.dims[3],s=this.dims[2],u=this.dims[1],c=void 0!==t&&void 0!==t.format?t.format:"RGB",a=void 0!==t&&void 0!==(null===(i=t.norm)||void 0===i?void 0:i.mean)?t.norm.mean:255,l=void 0!==t&&void 0!==(null===(n=t.norm)||void 0===n?void 0:n.bias)?t.norm.bias:0,h=s*o;if(void 0!==t){if(void 0!==t.height&&t.height!==s)throw new Error("Image output config height doesn't match tensor height");if(void 0!==t.width&&t.width!==o)throw new Error("Image output config width doesn't match tensor width");if(void 0!==t.format&&4===u&&"RGBA"!==t.format||3===u&&"RGB"!==t.format&&"BGR"!==t.format)throw new Error("Tensor format doesn't match input tensor dims")}const d=4;let f=0,b=1,m=2,Z=3,y=0,v=h,p=2*h,W=-1;"RGBA"===c?(y=0,v=h,p=2*h,W=3*h):"RGB"===c?(y=0,v=h,p=2*h):"RBG"===c&&(y=0,p=h,v=2*h),e=r.createImageData(o,s);for(let t=0;t<s*o;f+=d,b+=d,m+=d,Z+=d,t++)e.data[f]=(this.data[y++]-l)*a,e.data[b]=(this.data[v++]-l)*a,e.data[m]=(this.data[p++]-l)*a,e.data[Z]=-1===W?255:(this.data[W++]-l)*a}return e}reshape(t){return new h(this.type,this.data,t)}}const d=h;class f{constructor(t){this.handler=t}async run(t,i,n){const r={};let e={};if("object"!=typeof t||null===t||t instanceof d||Array.isArray(t))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let o=!0;if("object"==typeof i){if(null===i)throw new TypeError("Unexpected argument[1]: cannot be null.");if(i instanceof d)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(i)){if(0===i.length)throw new TypeError("'fetches' cannot be an empty array.");o=!1;for(const t of i){if("string"!=typeof t)throw new TypeError("'fetches' must be a string array or an object.");if(-1===this.outputNames.indexOf(t))throw new RangeError(`'fetches' contains invalid output name: ${t}.`);r[t]=null}if("object"==typeof n&&null!==n)e=n;else if(void 0!==n)throw new TypeError("'options' must be an object.")}else{let t=!1;const s=Object.getOwnPropertyNames(i);for(const n of this.outputNames)if(-1!==s.indexOf(n)){const e=i[n];(null===e||e instanceof d)&&(t=!0,o=!1,r[n]=e)}if(t){if("object"==typeof n&&null!==n)e=n;else if(void 0!==n)throw new TypeError("'options' must be an object.")}else e=i}}else if(void 0!==i)throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const i of this.inputNames)if(void 0===t[i])throw new Error(`input '${i}' is missing in 'feeds'.`);if(o)for(const t of this.outputNames)r[t]=null;const s=await this.handler.run(t,r,e),u={};for(const t in s)Object.hasOwnProperty.call(s,t)&&(u[t]=new d(s[t].type,s[t].data,s[t].dims));return u}static async create(t,i,n,o){let s,u={};if("string"==typeof t){if(s=t,"object"==typeof i&&null!==i)u=i;else if(void 0!==i)throw new TypeError("'options' must be an object.")}else if(t instanceof Uint8Array){if(s=t,"object"==typeof i&&null!==i)u=i;else if(void 0!==i)throw new TypeError("'options' must be an object.")}else{if(!(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer))throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");{const r=t;let e=0,c=t.byteLength;if("object"==typeof i&&null!==i)u=i;else if("number"==typeof i){if(e=i,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=r.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${r.byteLength}).`);if(c=t.byteLength-e,"number"==typeof n){if(c=n,!Number.isSafeInteger(c))throw new RangeError("'byteLength' must be an integer.");if(c<=0||e+c>r.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${r.byteLength-e}].`);if("object"==typeof o&&null!==o)u=o;else if(void 0!==o)throw new TypeError("'options' must be an object.")}else if(void 0!==n)throw new TypeError("'byteLength' must be a number.")}else if(void 0!==i)throw new TypeError("'options' must be an object.");s=new Uint8Array(r,e,c)}}const c=(u.executionProviders||[]).map(t=>"string"==typeof t?t:t.name),a=await(async t=>{const i=0===t.length?e:t,n=[];for(const t of i){const i=r[t];if(i){if(i.initialized)return i.backend;if(i.aborted)continue;const r=!!i.initPromise;try{return r||(i.initPromise=i.backend.init()),await i.initPromise,i.initialized=!0,i.backend}catch(e){r||n.push({name:t,err:e}),i.aborted=!0}finally{delete i.initPromise}}}throw new Error(`no available backend found. ERR: ${n.map(t=>`[${t.name}] ${t.err}`).join(", ")}`)})(c),l=await a.createSessionHandler(s,u);return new f(l)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}}const b=f},932:(t,i,n)=>{var r,e=(r=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t={}){var i,e,o;i||(i=void 0!==t?t:{}),i.ready=new Promise(function(t,i){e=t,o=i});var s,u,c,a=Object.assign({},i),l="./this.program",h="object"==typeof window,d="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,b="";if(f){var m=n(384),Z=n(908);b=d?Z.dirname(b)+"/":"//",s=(t,i)=>(t=t.startsWith("file://")?new URL(t):Z.normalize(t),m.readFileSync(t,i?void 0:"utf8")),c=t=>((t=s(t,!0)).buffer||(t=new Uint8Array(t)),t),u=(t,i,n)=>{t=t.startsWith("file://")?new URL(t):Z.normalize(t),m.readFile(t,function(t,r){t?n(t):i(r.buffer)})},1<process.argv.length&&(l=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",function(t){throw t}),15>process.versions.node.split(".")[0]&&process.on("unhandledRejection",function(t){throw t}),i.inspect=function(){return"[Emscripten Module object]"}}else(h||d)&&(d?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),r&&(b=r),b=0!==b.indexOf("blob:")?b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=t=>{var i=new XMLHttpRequest;return i.open("GET",t,!1),i.send(null),i.responseText},d&&(c=t=>{var i=new XMLHttpRequest;return i.open("GET",t,!1),i.responseType="arraybuffer",i.send(null),new Uint8Array(i.response)}),u=(t,i,n)=>{var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?i(r.response):n()},r.onerror=n,r.send(null)});var y,v=i.print||console.log.bind(console),p=i.printErr||console.warn.bind(console);Object.assign(i,a),a=null,i.thisProgram&&(l=i.thisProgram),i.wasmBinary&&(y=i.wasmBinary),"object"!=typeof WebAssembly&&B("no native wasm support detected");var W,X,G,V,I,g=!1,w="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function Y(t,i,n){var r=(i>>>=0)+n;for(n=i;t[n]&&!(n>=r);)++n;if(16<n-i&&t.buffer&&w)return w.decode(t.subarray(i,n));for(r="";i<n;){var e=t[i++];if(128&e){var o=63&t[i++];if(192==(224&e))r+=String.fromCharCode((31&e)<<6|o);else{var s=63&t[i++];65536>(e=224==(240&e)?(15&e)<<12|o<<6|s:(7&e)<<18|o<<12|s<<6|63&t[i++])?r+=String.fromCharCode(e):(e-=65536,r+=String.fromCharCode(55296|e>>10,56320|1023&e))}}else r+=String.fromCharCode(e)}return r}function S(t,i){return(t>>>=0)?Y(G,t,i):""}function K(t,i,n,r){if(!(0<r))return 0;var e=n>>>=0;r=n+r-1;for(var o=0;o<t.length;++o){var s=t.charCodeAt(o);if(55296<=s&&57343>=s&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++o)),127>=s){if(n>=r)break;i[n++>>>0]=s}else{if(2047>=s){if(n+1>=r)break;i[n++>>>0]=192|s>>6}else{if(65535>=s){if(n+2>=r)break;i[n++>>>0]=224|s>>12}else{if(n+3>=r)break;i[n++>>>0]=240|s>>18,i[n++>>>0]=128|s>>12&63}i[n++>>>0]=128|s>>6&63}i[n++>>>0]=128|63&s}}return i[n>>>0]=0,n-e}function R(t){for(var i=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);127>=r?i++:2047>=r?i+=2:55296<=r&&57343>=r?(i+=4,++n):i+=3}return i}function k(){var t=W.buffer;i.HEAP8=X=new Int8Array(t),i.HEAP16=new Int16Array(t),i.HEAP32=V=new Int32Array(t),i.HEAPU8=G=new Uint8Array(t),i.HEAPU16=new Uint16Array(t),i.HEAPU32=I=new Uint32Array(t),i.HEAPF32=new Float32Array(t),i.HEAPF64=new Float64Array(t)}var C=[],T=[],J=[];function L(){var t=i.preRun.shift();C.unshift(t)}var x,N=0,H=null,F=null;function B(t){throw i.onAbort&&i.onAbort(t),p(t="Aborted("+t+")"),g=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),o(t),t}function P(t){return t.startsWith("data:application/octet-stream;base64,")}if(!P(x="ort-wasm.wasm")){var U=x;x=i.locateFile?i.locateFile(U,b):b+U}function z(t){try{if(t==x&&y)return new Uint8Array(y);if(c)return c(t);throw"both async and sync fetching of the wasm failed"}catch(t){B(t)}}function M(t,i,n){return function(t){if(!y&&(h||d)){if("function"==typeof fetch&&!t.startsWith("file://"))return fetch(t,{credentials:"same-origin"}).then(function(i){if(!i.ok)throw"failed to load wasm binary file at '"+t+"'";return i.arrayBuffer()}).catch(function(){return z(t)});if(u)return new Promise(function(i,n){u(t,function(t){i(new Uint8Array(t))},n)})}return Promise.resolve().then(function(){return z(t)})}(t).then(function(t){return WebAssembly.instantiate(t,i)}).then(function(t){return t}).then(n,function(t){p("failed to asynchronously prepare wasm: "+t),B(t)})}function j(t){for(;0<t.length;)t.shift()(i)}function Q(t){this.na=t-24,this.xa=function(t){I[this.na+4>>2>>>0]=t},this.ua=function(t){I[this.na+8>>2>>>0]=t},this.va=function(){V[this.na>>2>>>0]=0},this.ta=function(){X[(this.na+12|0)>>>0]=0},this.wa=function(){X[(this.na+13|0)>>>0]=0},this.ra=function(t,i){this.sa(),this.xa(t),this.ua(i),this.va(),this.ta(),this.wa()},this.sa=function(){I[this.na+16>>2>>>0]=0}}function E(t){return 0==t%4&&(0!=t%100||0==t%400)}var D=[0,31,60,91,121,152,182,213,244,274,305,335],A=[0,31,59,90,120,151,181,212,243,273,304,334];function O(t){return(E(t.getFullYear())?D:A)[t.getMonth()]+t.getDate()-1}function _(t){var i=R(t)+1,n=ut(i);return n&&K(t,X,n,i),n}var q={};function $(){if(!tt){var t,i={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(t in q)void 0===q[t]?delete i[t]:i[t]=q[t];var n=[];for(t in i)n.push(t+"="+i[t]);tt=n}return tt}var tt,it=[null,[],[]],nt=[31,29,31,30,31,30,31,31,30,31,30,31],rt=[31,28,31,30,31,30,31,31,30,31,30,31];function et(t,i,n,r){function e(t,i,n){for(t="number"==typeof t?t.toString():t||"";t.length<i;)t=n[0]+t;return t}function o(t,i){return e(t,i,"0")}function s(t,i){function n(t){return 0>t?-1:0<t?1:0}var r;return 0===(r=n(t.getFullYear()-i.getFullYear()))&&0===(r=n(t.getMonth()-i.getMonth()))&&(r=n(t.getDate()-i.getDate())),r}function u(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function c(t){var i=t.la;for(t=new Date(new Date(t.ma+1900,0,1).getTime());0<i;){var n=t.getMonth(),r=(E(t.getFullYear())?nt:rt)[n];if(!(i>r-t.getDate())){t.setDate(t.getDate()+i);break}i-=r-t.getDate()+1,t.setDate(1),11>n?t.setMonth(n+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return n=new Date(t.getFullYear()+1,0,4),i=u(new Date(t.getFullYear(),0,4)),n=u(n),0>=s(i,t)?0>=s(n,t)?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var a=V[r+40>>2>>>0];for(var l in r={Aa:V[r>>2>>>0],za:V[r+4>>2>>>0],oa:V[r+8>>2>>>0],qa:V[r+12>>2>>>0],pa:V[r+16>>2>>>0],ma:V[r+20>>2>>>0],ha:V[r+24>>2>>>0],la:V[r+28>>2>>>0],Ca:V[r+32>>2>>>0],ya:V[r+36>>2>>>0],Ba:a?S(a):""},n=S(n),a={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})n=n.replace(new RegExp(l,"g"),a[l]);var h="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),d="January February March April May June July August September October November December".split(" ");for(l in a={"%a":function(t){return h[t.ha].substring(0,3)},"%A":function(t){return h[t.ha]},"%b":function(t){return d[t.pa].substring(0,3)},"%B":function(t){return d[t.pa]},"%C":function(t){return o((t.ma+1900)/100|0,2)},"%d":function(t){return o(t.qa,2)},"%e":function(t){return e(t.qa,2," ")},"%g":function(t){return c(t).toString().substring(2)},"%G":function(t){return c(t)},"%H":function(t){return o(t.oa,2)},"%I":function(t){return 0==(t=t.oa)?t=12:12<t&&(t-=12),o(t,2)},"%j":function(t){for(var i=0,n=0;n<=t.pa-1;i+=(E(t.ma+1900)?nt:rt)[n++]);return o(t.qa+i,3)},"%m":function(t){return o(t.pa+1,2)},"%M":function(t){return o(t.za,2)},"%n":function(){return"\n"},"%p":function(t){return 0<=t.oa&&12>t.oa?"AM":"PM"},"%S":function(t){return o(t.Aa,2)},"%t":function(){return"\t"},"%u":function(t){return t.ha||7},"%U":function(t){return o(Math.floor((t.la+7-t.ha)/7),2)},"%V":function(t){var i=Math.floor((t.la+7-(t.ha+6)%7)/7);if(2>=(t.ha+371-t.la-2)%7&&i++,i)53==i&&(4==(n=(t.ha+371-t.la)%7)||3==n&&E(t.ma)||(i=1));else{i=52;var n=(t.ha+7-t.la-1)%7;(4==n||5==n&&E(t.ma%400-1))&&i++}return o(i,2)},"%w":function(t){return t.ha},"%W":function(t){return o(Math.floor((t.la+7-(t.ha+6)%7)/7),2)},"%y":function(t){return(t.ma+1900).toString().substring(2)},"%Y":function(t){return t.ma+1900},"%z":function(t){var i=0<=(t=t.ya);return t=Math.abs(t)/60,(i?"+":"-")+String("0000"+(t/60*100+t%60)).slice(-4)},"%Z":function(t){return t.Ba},"%%":function(){return"%"}},n=n.replace(/%%/g,"\0\0"),a)n.includes(l)&&(n=n.replace(new RegExp(l,"g"),a[l](r)));return l=function(t){var i=Array(R(t)+1);return K(t,i,0,i.length),i}(n=n.replace(/\0\0/g,"%")),l.length>i?0:(X.set(l,t>>>0),l.length-1)}var ot={a:function(t,i,n){throw new Q(t).ra(i,n),t},m:function(){B("To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking")},e:function(){return 0},J:function(){},w:function(){},y:function(){},p:function(){return 0},H:function(){},C:function(){},G:function(){},g:function(){},x:function(){},t:function(){},I:function(){},v:function(){},K:function(){return!0},i:function(t,i){t=new Date(1e3*(I[t>>>2]+4294967296*V[t+4>>>2])),V[i>>2>>>0]=t.getUTCSeconds(),V[i+4>>2>>>0]=t.getUTCMinutes(),V[i+8>>2>>>0]=t.getUTCHours(),V[i+12>>2>>>0]=t.getUTCDate(),V[i+16>>2>>>0]=t.getUTCMonth(),V[i+20>>2>>>0]=t.getUTCFullYear()-1900,V[i+24>>2>>>0]=t.getUTCDay(),V[i+28>>2>>>0]=(t.getTime()-Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},j:function(t,i){t=new Date(1e3*(I[t>>>2]+4294967296*V[t+4>>>2])),V[i>>2>>>0]=t.getSeconds(),V[i+4>>2>>>0]=t.getMinutes(),V[i+8>>2>>>0]=t.getHours(),V[i+12>>2>>>0]=t.getDate(),V[i+16>>2>>>0]=t.getMonth(),V[i+20>>2>>>0]=t.getFullYear()-1900,V[i+24>>2>>>0]=t.getDay(),V[i+28>>2>>>0]=0|O(t),V[i+36>>2>>>0]=-60*t.getTimezoneOffset();var n=new Date(t.getFullYear(),6,1).getTimezoneOffset(),r=new Date(t.getFullYear(),0,1).getTimezoneOffset();V[i+32>>2>>>0]=0|(n!=r&&t.getTimezoneOffset()==Math.min(r,n))},k:function(t){var i=new Date(V[t+20>>2>>>0]+1900,V[t+16>>2>>>0],V[t+12>>2>>>0],V[t+8>>2>>>0],V[t+4>>2>>>0],V[t>>2>>>0],0),n=V[t+32>>2>>>0],r=i.getTimezoneOffset(),e=new Date(i.getFullYear(),6,1).getTimezoneOffset(),o=new Date(i.getFullYear(),0,1).getTimezoneOffset(),s=Math.min(o,e);return 0>n?V[t+32>>2>>>0]=Number(e!=o&&s==r):0<n!=(s==r)&&(e=Math.max(o,e),i.setTime(i.getTime()+6e4*((0<n?s:e)-r))),V[t+24>>2>>>0]=i.getDay(),V[t+28>>2>>>0]=0|O(i),V[t>>2>>>0]=i.getSeconds(),V[t+4>>2>>>0]=i.getMinutes(),V[t+8>>2>>>0]=i.getHours(),V[t+12>>2>>>0]=i.getDate(),V[t+16>>2>>>0]=i.getMonth(),V[t+20>>2>>>0]=i.getYear(),i.getTime()/1e3|0},A:function(){return-52},B:function(){},l:function(t,i,n){function r(t){return(t=t.toTimeString().match(/\(([A-Za-z ]+)\)$/))?t[1]:"GMT"}var e=(new Date).getFullYear(),o=new Date(e,0,1),s=new Date(e,6,1);e=o.getTimezoneOffset();var u=s.getTimezoneOffset();I[t>>2>>>0]=60*Math.max(e,u),V[i>>2>>>0]=Number(e!=u),t=r(o),i=r(s),t=_(t),i=_(i),u<e?(I[n>>2>>>0]=t,I[n+4>>2>>>0]=i):(I[n>>2>>>0]=i,I[n+4>>2>>>0]=t)},c:function(){B("")},D:function(){B("To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking")},h:function(){return Date.now()},r:function(){return 4294901760},b:f?()=>{var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:()=>performance.now(),z:function(t,i,n){G.copyWithin(t>>>0,i>>>0,i+n>>>0)},q:function(t){var i=G.length;if(4294901760<(t>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=i*(1+.2/n);r=Math.min(r,t+100663296);var e=Math,o=e.min;r=Math.max(t,r),r+=(65536-r%65536)%65536;t:{var s=W.buffer;try{W.grow(o.call(e,4294901760,r)-s.byteLength+65535>>>16),k();var u=1;break t}catch(t){}u=void 0}if(u)return!0}return!1},E:function(t,i){var n=0;return $().forEach(function(r,e){var o=i+n;for(e=I[t+4*e>>2>>>0]=o,o=0;o<r.length;++o)X[(0|e++)>>>0]=r.charCodeAt(o);X[(0|e)>>>0]=0,n+=r.length+1}),0},F:function(t,i){var n=$();I[t>>2>>>0]=n.length;var r=0;return n.forEach(function(t){r+=t.length+1}),I[i>>2>>>0]=r,0},d:function(){return 52},f:function(){return 52},n:function(){return 70},s:function(t,i,n,r){for(var e=0,o=0;o<n;o++){var s=I[i>>2>>>0],u=I[i+4>>2>>>0];i+=8;for(var c=0;c<u;c++){var a=G[s+c>>>0],l=it[t];0===a||10===a?((1===t?v:p)(Y(l,0)),l.length=0):l.push(a)}e+=u}return I[r>>2>>>0]=e,0},u:et,o:function(t,i,n,r){return et(t,i,n,r)}};!function(){function t(t){if(i.asm=t=t.exports,W=i.asm.L,k(),T.unshift(i.asm.M),N--,i.monitorRunDependencies&&i.monitorRunDependencies(N),0==N&&(null!==H&&(clearInterval(H),H=null),F)){var n=F;F=null,n()}return t}var n={a:ot};if(N++,i.monitorRunDependencies&&i.monitorRunDependencies(N),i.instantiateWasm)try{return i.instantiateWasm(n,t)}catch(t){p("Module.instantiateWasm callback failed with error: "+t),o(t)}(function(t,i){var n=x;return y||"function"!=typeof WebAssembly.instantiateStreaming||P(n)||n.startsWith("file://")||f||"function"!=typeof fetch?M(n,t,i):fetch(n,{credentials:"same-origin"}).then(function(r){return WebAssembly.instantiateStreaming(r,t).then(i,function(r){return v("wasm streaming compile failed: "+r),v("falling back to ArrayBuffer instantiation"),M(n,t,i)})})})(n,function(i){t(i.instance)}).catch(o)}(),i._OrtInit=function(){return(i._OrtInit=i.asm.N).apply(null,arguments)},i._OrtCreateSessionOptions=function(){return(i._OrtCreateSessionOptions=i.asm.O).apply(null,arguments)},i._OrtAppendExecutionProvider=function(){return(i._OrtAppendExecutionProvider=i.asm.P).apply(null,arguments)},i._OrtAddSessionConfigEntry=function(){return(i._OrtAddSessionConfigEntry=i.asm.Q).apply(null,arguments)},i._OrtReleaseSessionOptions=function(){return(i._OrtReleaseSessionOptions=i.asm.R).apply(null,arguments)},i._OrtCreateSession=function(){return(i._OrtCreateSession=i.asm.S).apply(null,arguments)},i._OrtReleaseSession=function(){return(i._OrtReleaseSession=i.asm.T).apply(null,arguments)},i._OrtGetInputCount=function(){return(i._OrtGetInputCount=i.asm.U).apply(null,arguments)},i._OrtGetOutputCount=function(){return(i._OrtGetOutputCount=i.asm.V).apply(null,arguments)},i._OrtGetInputName=function(){return(i._OrtGetInputName=i.asm.W).apply(null,arguments)},i._OrtGetOutputName=function(){return(i._OrtGetOutputName=i.asm.X).apply(null,arguments)},i._OrtFree=function(){return(i._OrtFree=i.asm.Y).apply(null,arguments)},i._OrtCreateTensor=function(){return(i._OrtCreateTensor=i.asm.Z).apply(null,arguments)},i._OrtGetTensorData=function(){return(i._OrtGetTensorData=i.asm._).apply(null,arguments)},i._OrtReleaseTensor=function(){return(i._OrtReleaseTensor=i.asm.$).apply(null,arguments)},i._OrtCreateRunOptions=function(){return(i._OrtCreateRunOptions=i.asm.aa).apply(null,arguments)},i._OrtAddRunConfigEntry=function(){return(i._OrtAddRunConfigEntry=i.asm.ba).apply(null,arguments)},i._OrtReleaseRunOptions=function(){return(i._OrtReleaseRunOptions=i.asm.ca).apply(null,arguments)},i._OrtRun=function(){return(i._OrtRun=i.asm.da).apply(null,arguments)},i._OrtEndProfiling=function(){return(i._OrtEndProfiling=i.asm.ea).apply(null,arguments)};var st,ut=i._malloc=function(){return(ut=i._malloc=i.asm.fa).apply(null,arguments)};function ct(){return(ct=i.asm.ia).apply(null,arguments)}function at(){return(at=i.asm.ja).apply(null,arguments)}function lt(){return(lt=i.asm.ka).apply(null,arguments)}function ht(){function t(){if(!st&&(st=!0,i.calledRun=!0,!g)){if(j(T),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var t=i.postRun.shift();J.unshift(t)}j(J)}}if(!(0<N)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)L();j(C),0<N||(i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),t()},1)):t())}}if(i._free=function(){return(i._free=i.asm.ga).apply(null,arguments)},i.UTF8ToString=S,i.stringToUTF8=function(t,i,n){return K(t,G,i,n)},i.lengthBytesUTF8=R,i.stackAlloc=lt,i.stackSave=ct,i.stackRestore=at,F=function t(){st||ht(),st||(F=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0<i.preInit.length;)i.preInit.pop()();return ht(),t.ready});t.exports=e},200:(t,i,n)=>{"use strict";i.c8=i.rX=void 0;const r=n(453),e=n(381),o=n(157),s=n(306);i.rX=()=>{if(("number"!=typeof r.env.wasm.initTimeout||r.env.wasm.initTimeout<0)&&(r.env.wasm.initTimeout=0),"boolean"!=typeof r.env.wasm.simd&&(r.env.wasm.simd=!0),"boolean"!=typeof r.env.wasm.proxy&&(r.env.wasm.proxy=!1),"number"!=typeof r.env.wasm.numThreads||!Number.isInteger(r.env.wasm.numThreads)||r.env.wasm.numThreads<=0){const t="undefined"==typeof navigator?(0,e.cpus)().length:navigator.hardwareConcurrency;r.env.wasm.numThreads=Math.min(4,Math.ceil((t||1)/2))}},i.c8=new class{async init(){(0,i.rX)(),await(0,o.initWasm)()}async createSessionHandler(t,i){const n=new s.OnnxruntimeWebAssemblySessionHandler;return await n.loadModel(t,i),Promise.resolve(n)}}},18:function(t,i,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,i,n,r){void 0===r&&(r=n);var e=Object.getOwnPropertyDescriptor(i,n);e&&!("get"in e?!i.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(t,r,e)}:function(t,i,n,r){void 0===r&&(r=n),t[r]=i[n]}),e=this&&this.__exportStar||function(t,i){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(i,n)||r(i,t,n)};Object.defineProperty(i,"__esModule",{value:!0}),e(n(453),i);const o=n(453);{const t=n(200).c8;(0,o.registerBackend)("cpu",t,10),(0,o.registerBackend)("wasm",t,10),(0,o.registerBackend)("xnnpack",t,9)}},967:(t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.iterateExtraOptions=void 0,i.iterateExtraOptions=(t,n,r,e)=>{if("object"==typeof t&&null!==t){if(r.has(t))throw new Error("Circular reference in options");r.add(t)}Object.entries(t).forEach(([t,o])=>{const s=n?n+t:t;if("object"==typeof o)(0,i.iterateExtraOptions)(o,s+".",r,e);else if("string"==typeof o||"number"==typeof o)e(s,o.toString());else{if("boolean"!=typeof o)throw new Error("Can't handle extra config type: "+typeof o);e(s,o?"1":"0")}})}},157:function(t,i,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,i,n,r){void 0===r&&(r=n);var e=Object.getOwnPropertyDescriptor(i,n);e&&!("get"in e?!i.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(t,r,e)}:function(t,i,n,r){void 0===r&&(r=n),t[r]=i[n]}),e=this&&this.__setModuleDefault||(Object.create?function(t,i){Object.defineProperty(t,"default",{enumerable:!0,value:i})}:function(t,i){t.default=i}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(i,t,n);return e(i,t),i};Object.defineProperty(i,"__esModule",{value:!0}),i.endProfiling=i.run=i.releaseSession=i.createSession=i.createSessionFinalize=i.createSessionAllocate=i.initOrt=i.initWasm=void 0;const s=n(453),u=o(n(349)),c=n(361);"undefined"!=typeof document&&(null===document||void 0===document||document),i.initWasm=async()=>(0,c.initializeWebAssembly)(s.env.wasm),i.initOrt=async(t,i)=>{u.initOrt(t,i)},i.createSessionAllocate=async t=>u.createSessionAllocate(t),i.createSessionFinalize=async(t,i)=>u.createSessionFinalize(t,i),i.createSession=async(t,i)=>u.createSession(t,i),i.releaseSession=async t=>{u.releaseSession(t)},i.run=async(t,i,n,r,e)=>u.run(t,i,n,r,e),i.endProfiling=async t=>{u.endProfiling(t)}},586:(t,i,n)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.setRunOptions=void 0;const r=n(967),e=n(983),o=n(361);i.setRunOptions=t=>{const i=(0,o.getInstance)();let n=0;const s=[],u=t||{};try{if(void 0===(null==t?void 0:t.logSeverityLevel))u.logSeverityLevel=2;else if("number"!=typeof t.logSeverityLevel||!Number.isInteger(t.logSeverityLevel)||t.logSeverityLevel<0||t.logSeverityLevel>4)throw new Error(`log serverity level is not valid: ${t.logSeverityLevel}`);if(void 0===(null==t?void 0:t.logVerbosityLevel))u.logVerbosityLevel=0;else if("number"!=typeof t.logVerbosityLevel||!Number.isInteger(t.logVerbosityLevel))throw new Error(`log verbosity level is not valid: ${t.logVerbosityLevel}`);void 0===(null==t?void 0:t.terminate)&&(u.terminate=!1);let o=0;if(void 0!==(null==t?void 0:t.tag)&&(o=(0,e.allocWasmString)(t.tag,s)),n=i._OrtCreateRunOptions(u.logSeverityLevel,u.logVerbosityLevel,!!u.terminate,o),0===n)throw new Error("Can't create run options");return void 0!==(null==t?void 0:t.extra)&&(0,r.iterateExtraOptions)(t.extra,"",new WeakSet,(t,r)=>{const o=(0,e.allocWasmString)(t,s),u=(0,e.allocWasmString)(r,s);if(0!==i._OrtAddRunConfigEntry(n,o,u))throw new Error(`Can't set a run config entry: ${t} - ${r}`)}),[n,s]}catch(t){throw 0!==n&&i._OrtReleaseRunOptions(n),s.forEach(i._free),t}}},306:(t,i,n)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.OnnxruntimeWebAssemblySessionHandler=void 0;const r=n(806),e=n(453),o=n(850),s=n(157);let u;i.OnnxruntimeWebAssemblySessionHandler=class{async createSessionAllocate(t){const i=await fetch(t),n=await i.arrayBuffer();return(0,s.createSessionAllocate)(new Uint8Array(n))}async loadModel(t,i){if(u||(await(0,s.initOrt)(e.env.wasm.numThreads,(t=>{switch(t){case"verbose":return 0;case"info":return 1;case"warning":return 2;case"error":return 3;case"fatal":return 4;default:throw new Error(`unsupported logging level: ${t}`)}})(e.env.logLevel)),u=!0),"string"==typeof t)if("undefined"==typeof fetch){const n=await(0,o.promisify)(r.readFile)(t);[this.sessionId,this.inputNames,this.outputNames]=await(0,s.createSession)(n,i)}else{const n=await this.createSessionAllocate(t);[this.sessionId,this.inputNames,this.outputNames]=await(0,s.createSessionFinalize)(n,i)}else[this.sessionId,this.inputNames,this.outputNames]=await(0,s.createSession)(t,i)}async dispose(){return(0,s.releaseSession)(this.sessionId)}async run(t,i,n){const r=[],o=[];Object.entries(t).forEach(t=>{const i=t[0],n=t[1],e=this.inputNames.indexOf(i);if(-1===e)throw new Error(`invalid input '${i}'`);r.push(n),o.push(e)});const u=[];Object.entries(i).forEach(t=>{const i=t[0],n=this.outputNames.indexOf(i);if(-1===n)throw new Error(`invalid output '${i}'`);u.push(n)});const c=await(0,s.run)(this.sessionId,o,r.map(t=>[t.type,t.dims,t.data]),u,n),a={};for(let t=0;t<c.length;t++)a[this.outputNames[u[t]]]=new e.Tensor(c[t][0],c[t][2],c[t][1]);return a}startProfiling(){}endProfiling(){(0,s.endProfiling)(this.sessionId)}}},919:(t,i,n)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.setSessionOptions=void 0;const r=n(967),e=n(983),o=n(361);i.setSessionOptions=t=>{const i=(0,o.getInstance)();let n=0;const s=[],u=t||{};(t=>{t.extra||(t.extra={}),t.extra.session||(t.extra.session={});const i=t.extra.session;i.use_ort_model_bytes_directly||(i.use_ort_model_bytes_directly="1")})(u);try{void 0===(null==t?void 0:t.graphOptimizationLevel)&&(u.graphOptimizationLevel="all");const c=(t=>{switch(t){case"disabled":return 0;case"basic":return 1;case"extended":return 2;case"all":return 99;default:throw new Error(`unsupported graph optimization level: ${t}`)}})(u.graphOptimizationLevel);void 0===(null==t?void 0:t.enableCpuMemArena)&&(u.enableCpuMemArena=!0),void 0===(null==t?void 0:t.enableMemPattern)&&(u.enableMemPattern=!0),void 0===(null==t?void 0:t.executionMode)&&(u.executionMode="sequential");const a=(t=>{switch(t){case"sequential":return 0;case"parallel":return 1;default:throw new Error(`unsupported execution mode: ${t}`)}})(u.executionMode);let l=0;if(void 0!==(null==t?void 0:t.logId)&&(l=(0,e.allocWasmString)(t.logId,s)),void 0===(null==t?void 0:t.logSeverityLevel))u.logSeverityLevel=2;else if("number"!=typeof t.logSeverityLevel||!Number.isInteger(t.logSeverityLevel)||t.logSeverityLevel<0||t.logSeverityLevel>4)throw new Error(`log serverity level is not valid: ${t.logSeverityLevel}`);if(void 0===(null==t?void 0:t.logVerbosityLevel))u.logVerbosityLevel=0;else if("number"!=typeof t.logVerbosityLevel||!Number.isInteger(t.logVerbosityLevel))throw new Error(`log verbosity level is not valid: ${t.logVerbosityLevel}`);void 0===(null==t?void 0:t.enableProfiling)&&(u.enableProfiling=!1);let h=0;if("string"==typeof(null==t?void 0:t.optimizedModelFilePath)&&(h=(0,e.allocWasmString)(t.optimizedModelFilePath,s)),n=i._OrtCreateSessionOptions(c,!!u.enableCpuMemArena,!!u.enableMemPattern,a,!!u.enableProfiling,0,l,u.logSeverityLevel,u.logVerbosityLevel,h),0===n)throw new Error("Can't create session options");return(null==t?void 0:t.executionProviders)&&((t,i,n)=>{for(const r of i){let i="string"==typeof r?r:r.name;switch(i){case"xnnpack":i="XNNPACK";break;case"wasm":case"cpu":continue;default:throw new Error(`not supported EP: ${i}`)}const s=(0,e.allocWasmString)(i,n);if(0!==(0,o.getInstance)()._OrtAppendExecutionProvider(t,s))throw new Error(`Can't append execution provider: ${i}`)}})(n,t.executionProviders,s),void 0!==(null==t?void 0:t.extra)&&(0,r.iterateExtraOptions)(t.extra,"",new WeakSet,(t,r)=>{const o=(0,e.allocWasmString)(t,s),u=(0,e.allocWasmString)(r,s);if(0!==i._OrtAddSessionConfigEntry(n,o,u))throw new Error(`Can't set a session config entry: ${t} - ${r}`)}),[n,s]}catch(t){throw 0!==n&&i._OrtReleaseSessionOptions(n),s.forEach(i._free),t}}},983:(t,i,n)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.allocWasmString=void 0;const r=n(361);i.allocWasmString=(t,i)=>{const n=(0,r.getInstance)(),e=n.lengthBytesUTF8(t)+1,o=n._malloc(e);return n.stringToUTF8(t,o,e),i.push(o),o}},349:(t,i,n)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.extractTransferableBuffers=i.endProfiling=i.run=i.releaseSession=i.createSession=i.createSessionFinalize=i.createSessionAllocate=i.initOrt=void 0;const r=n(586),e=n(919),o=n(983),s=n(361);i.initOrt=(t,i)=>{const n=(0,s.getInstance)()._OrtInit(t,i);if(0!==n)throw new Error(`Can't initialize onnxruntime. error code = ${n}`)};const u=new Map;i.createSessionAllocate=t=>{const i=(0,s.getInstance)(),n=i._malloc(t.byteLength);return i.HEAPU8.set(t,n),[n,t.byteLength]},i.createSessionFinalize=(t,i)=>{const n=(0,s.getInstance)();let r=0,o=0,c=[];try{if([o,c]=(0,e.setSessionOptions)(i),r=n._OrtCreateSession(t[0],t[1],o),0===r)throw new Error("Can't create a session")}finally{n._free(t[0]),n._OrtReleaseSessionOptions(o),c.forEach(n._free)}const a=n._OrtGetInputCount(r),l=n._OrtGetOutputCount(r),h=[],d=[],f=[],b=[];for(let t=0;t<a;t++){const i=n._OrtGetInputName(r,t);if(0===i)throw new Error("Can't get an input name");d.push(i),h.push(n.UTF8ToString(i))}for(let t=0;t<l;t++){const i=n._OrtGetOutputName(r,t);if(0===i)throw new Error("Can't get an output name");b.push(i),f.push(n.UTF8ToString(i))}return u.set(r,[r,d,b]),[r,h,f]},i.createSession=(t,n)=>{const r=(0,i.createSessionAllocate)(t);return(0,i.createSessionFinalize)(r,n)},i.releaseSession=t=>{const i=(0,s.getInstance)(),n=u.get(t);if(!n)throw new Error("invalid session id");const r=n[0],e=n[2];n[1].forEach(i._OrtFree),e.forEach(i._OrtFree),i._OrtReleaseSession(r),u.delete(t)};const c=t=>{switch(t){case"int8":return 3;case"uint8":return 2;case"bool":return 9;case"int16":return 5;case"uint16":return 4;case"int32":return 6;case"uint32":return 12;case"float32":return 1;case"float64":return 11;case"string":return 8;case"int64":return 7;case"uint64":return 13;default:throw new Error(`unsupported data type: ${t}`)}},a=t=>{switch(t){case 3:return"int8";case 2:return"uint8";case 9:return"bool";case 5:return"int16";case 4:return"uint16";case 6:return"int32";case 12:return"uint32";case 1:return"float32";case 11:return"float64";case 8:return"string";case 7:return"int64";case 13:return"uint64";default:throw new Error(`unsupported data type: ${t}`)}},l=t=>{switch(t){case"float32":return Float32Array;case"uint8":case"bool":return Uint8Array;case"int8":return Int8Array;case"uint16":return Uint16Array;case"int16":return Int16Array;case"int32":return Int32Array;case"float64":return Float64Array;case"uint32":return Uint32Array;case"int64":return BigInt64Array;case"uint64":return BigUint64Array;default:throw new Error(`unsupported type: ${t}`)}};i.run=(t,i,n,e,h)=>{const d=(0,s.getInstance)(),f=u.get(t);if(!f)throw new Error("invalid session id");const b=f[0],m=f[1],Z=f[2],y=i.length,v=e.length;let p=0,W=[];const X=[],G=[];try{[p,W]=(0,r.setRunOptions)(h);for(let t=0;t<y;t++){const i=n[t][0],r=n[t][1],e=n[t][2];let s,u;if(Array.isArray(e)){u=4*e.length,s=d._malloc(u),G.push(s);let t=s/4;for(let i=0;i<e.length;i++){if("string"!=typeof e[i])throw new TypeError(`tensor data at index ${i} is not a string`);d.HEAPU32[t++]=(0,o.allocWasmString)(e[i],G)}}else u=e.byteLength,s=d._malloc(u),G.push(s),d.HEAPU8.set(new Uint8Array(e.buffer,e.byteOffset,u),s);const a=d.stackSave(),l=d.stackAlloc(4*r.length);try{let t=l/4;r.forEach(i=>d.HEAP32[t++]=i);const n=d._OrtCreateTensor(c(i),s,u,l,r.length);if(0===n)throw new Error("Can't create a tensor");X.push(n)}finally{d.stackRestore(a)}}const t=d.stackSave(),s=d.stackAlloc(4*y),u=d.stackAlloc(4*y),f=d.stackAlloc(4*v),V=d.stackAlloc(4*v);try{let t=s/4,n=u/4,r=f/4,o=V/4;for(let r=0;r<y;r++)d.HEAPU32[t++]=X[r],d.HEAPU32[n++]=m[i[r]];for(let t=0;t<v;t++)d.HEAPU32[r++]=0,d.HEAPU32[o++]=Z[e[t]];let c=d._OrtRun(b,u,s,y,V,v,f,p);const h=[];if(0===c)for(let t=0;t<v;t++){const i=d.HEAPU32[f/4+t],n=d.stackSave(),r=d.stackAlloc(16);let e,o=0;try{if(c=d._OrtGetTensorData(i,r,r+4,r+8,r+12),0!==c)throw new Error(`Can't access output tensor data. error code = ${c}`);let t=r/4;const n=d.HEAPU32[t++];o=d.HEAPU32[t++];const s=d.HEAPU32[t++],u=d.HEAPU32[t++],f=[];for(let t=0;t<u;t++)f.push(d.HEAPU32[s/4+t]);d._OrtFree(s);const b=0===f.length?1:f.reduce((t,i)=>t*i);if(e=a(n),"string"===e){const t=[];let i=o/4;for(let n=0;n<b;n++){const r=d.HEAPU32[i++];t.push(d.UTF8ToString(r,n===b-1?void 0:d.HEAPU32[i]-r))}h.push([e,f,t])}else{const t=new(l(e))(b);new Uint8Array(t.buffer,t.byteOffset,t.byteLength).set(d.HEAPU8.subarray(o,o+t.byteLength)),h.push([e,f,t])}}finally{d.stackRestore(n),"string"===e&&o&&d._free(o),d._OrtReleaseTensor(i)}}if(0===c)return h;throw new Error(`failed to call OrtRun(). error code = ${c}.`)}finally{d.stackRestore(t)}}finally{X.forEach(d._OrtReleaseTensor),G.forEach(d._free),d._OrtReleaseRunOptions(p),W.forEach(d._free)}},i.endProfiling=t=>{const i=(0,s.getInstance)(),n=u.get(t);if(!n)throw new Error("invalid session id");const r=i._OrtEndProfiling(n[0]);if(0===r)throw new Error("Can't get an profile file name");i._OrtFree(r)},i.extractTransferableBuffers=t=>{const i=[];for(const n of t){const t=n[2];!Array.isArray(t)&&t.buffer&&i.push(t.buffer)}return i}},361:function(t,i,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,i,n,r){void 0===r&&(r=n);var e=Object.getOwnPropertyDescriptor(i,n);e&&!("get"in e?!i.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(t,r,e)}:function(t,i,n,r){void 0===r&&(r=n),t[r]=i[n]}),e=this&&this.__setModuleDefault||(Object.create?function(t,i){Object.defineProperty(t,"default",{enumerable:!0,value:i})}:function(t,i){t.default=i}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(i,t,n);return e(i,t),i},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i,"__esModule",{value:!0}),i.dispose=i.getInstance=i.initializeWebAssembly=void 0,o(n(449));const u=s(n(932)),c=u.default;let a,l=!1,h=!1,d=!1;const f=(t,i)=>i?t?"ort-wasm-simd-threaded.wasm":"ort-wasm-threaded.wasm":t?"ort-wasm-simd.wasm":"ort-wasm.wasm";i.initializeWebAssembly=async t=>{if(l)return Promise.resolve();if(h)throw new Error("multiple calls to 'initializeWebAssembly()' detected.");if(d)throw new Error("previous call to 'initializeWebAssembly()' failed.");h=!0;const i=t.initTimeout,n=t.simd,r=t.numThreads>1&&(()=>{try{return"undefined"!=typeof SharedArrayBuffer&&("undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])))}catch(t){return!1}})(),e=n&&(()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,30,1,28,0,65,0,253,15,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,186,1,26,11]))}catch(t){return!1}})(),o="string"==typeof t.wasmPaths?t.wasmPaths:void 0,s=f(!1,r),b=f(e,r),m="object"==typeof t.wasmPaths?t.wasmPaths[b]:void 0;let Z=!1;const y=[];if(i>0&&y.push(new Promise(t=>{setTimeout(()=>{Z=!0,t()},i)})),y.push(new Promise((t,i)=>{(r?c:u.default)({locateFile:(t,i)=>t===s?null!=m?m:(null!=o?o:i)+b:i+t}).then(i=>{h=!1,l=!0,a=i,t()},t=>{h=!1,d=!0,i(t)})})),await Promise.race(y),Z)throw new Error(`WebAssembly backend initializing failed due to timeout: ${i}ms`)},i.getInstance=()=>{if(l&&a)return a;throw new Error("WebAssembly is not initialized yet.")},i.dispose=()=>{var t;!l||h||d||(h=!0,null===(t=a.PThread)||void 0===t||t.terminateAllThreads(),a=void 0,h=!1,l=!1,d=!0)}},384:()=>{},908:()=>{},806:()=>{},449:()=>{},850:()=>{},381:()=>{}},i={};function n(r){var e=i[r];if(void 0!==e)return e.exports;var o=i[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}return n.d=(t,i)=>{for(var r in i)n.o(i,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},n.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(18)})(),t.exports=i()},955:function(t,i,n){var r;t.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var t=r,i=t.lib.BlockCipher,n=t.algo,e=[],o=[],s=[],u=[],c=[],a=[],l=[],h=[],d=[],f=[];!function(){for(var t=[],i=0;i<256;i++)t[i]=i<128?i<<1:i<<1^283;var n=0,r=0;for(i=0;i<256;i++){var b=r^r<<1^r<<2^r<<3^r<<4;e[n]=b=b>>>8^255&b^99,o[b]=n;var m,Z=t[n],y=t[Z],v=t[y];s[n]=(m=257*t[b]^16843008*b)<<24|m>>>8,u[n]=m<<16|m>>>16,c[n]=m<<8|m>>>24,a[n]=m,l[b]=(m=16843009*v^65537*y^257*Z^16843008*n)<<24|m>>>8,h[b]=m<<16|m>>>16,d[b]=m<<8|m>>>24,f[b]=m,n?(n=Z^t[t[t[v^Z]]],r^=t[t[r]]):n=r=1}}();var b=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=i.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,i=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=i[s]:(a=o[s-1],s%n?n>6&&s%n==4&&(a=e[a>>>24]<<24|e[a>>>16&255]<<16|e[a>>>8&255]<<8|e[255&a]):(a=e[(a=a<<8|a>>>24)>>>24]<<24|e[a>>>16&255]<<16|e[a>>>8&255]<<8|e[255&a],a^=b[s/n|0]<<24),o[s]=o[s-n]^a);for(var u=this._invKeySchedule=[],c=0;c<r;c++){if(s=r-c,c%4)var a=o[s];else a=o[s-4];u[c]=c<4||s<=4?a:l[e[a>>>24]]^h[e[a>>>16&255]]^d[e[a>>>8&255]]^f[e[255&a]]}}},encryptBlock:function(t,i){this._doCryptBlock(t,i,this._keySchedule,s,u,c,a,e)},decryptBlock:function(t,i){var n=t[i+1];t[i+1]=t[i+3],t[i+3]=n,this._doCryptBlock(t,i,this._invKeySchedule,l,h,d,f,o),n=t[i+1],t[i+1]=t[i+3],t[i+3]=n},_doCryptBlock:function(t,i,n,r,e,o,s,u){for(var c=this._nRounds,a=t[i]^n[0],l=t[i+1]^n[1],h=t[i+2]^n[2],d=t[i+3]^n[3],f=4,b=1;b<c;b++){var m=r[a>>>24]^e[l>>>16&255]^o[h>>>8&255]^s[255&d]^n[f++],Z=r[l>>>24]^e[h>>>16&255]^o[d>>>8&255]^s[255&a]^n[f++],y=r[h>>>24]^e[d>>>16&255]^o[a>>>8&255]^s[255&l]^n[f++],v=r[d>>>24]^e[a>>>16&255]^o[l>>>8&255]^s[255&h]^n[f++];a=m,l=Z,h=y,d=v}m=(u[a>>>24]<<24|u[l>>>16&255]<<16|u[h>>>8&255]<<8|u[255&d])^n[f++],Z=(u[l>>>24]<<24|u[h>>>16&255]<<16|u[d>>>8&255]<<8|u[255&a])^n[f++],y=(u[h>>>24]<<24|u[d>>>16&255]<<16|u[a>>>8&255]<<8|u[255&l])^n[f++],v=(u[d>>>24]<<24|u[a>>>16&255]<<16|u[l>>>8&255]<<8|u[255&h])^n[f++],t[i]=m,t[i+1]=Z,t[i+2]=y,t[i+3]=v},keySize:8});t.AES=i._createHelper(m)}(),r.AES)},1025:function(t,i,n){var r,e;t.exports=(r=n(9021),e=r.enc.Utf8,void(r.algo.HMAC=r.lib.Base.extend({init:function(t,i){t=this._hasher=new t.init,"string"==typeof i&&(i=e.parse(i));var n=t.blockSize,r=4*n;i.sigBytes>r&&(i=t.finalize(i)),i.clamp();for(var o=this._oKey=i.clone(),s=this._iKey=i.clone(),u=o.words,c=s.words,a=0;a<n;a++)u[a]^=1549556828,c[a]^=909522486;o.sigBytes=s.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var i=this._hasher,n=i.finalize(t);return i.reset(),i.finalize(this._oKey.clone().concat(n))}})))},1380:function(t,i,n){var r;t.exports=(r=n(9021),n(3240),function(){var t=r,i=t.lib.Hasher,n=t.x64,e=n.Word,o=n.WordArray,s=t.algo;function u(){return e.create.apply(e,arguments)}var c=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],a=[];!function(){for(var t=0;t<80;t++)a[t]=u()}();var l=s.SHA512=i.extend({_doReset:function(){this._hash=new o.init([new e.init(1779033703,4089235720),new e.init(3144134277,2227873595),new e.init(1013904242,4271175723),new e.init(2773480762,1595750129),new e.init(1359893119,2917565137),new e.init(2600822924,725511199),new e.init(528734635,4215389547),new e.init(1541459225,327033209)])},_doProcessBlock:function(t,i){for(var n=this._hash.words,r=n[0],e=n[1],o=n[2],s=n[3],u=n[4],l=n[5],h=n[6],d=n[7],f=r.high,b=r.low,m=e.high,Z=e.low,y=o.high,v=o.low,p=s.high,W=s.low,X=u.high,G=u.low,V=l.high,I=l.low,g=h.high,w=h.low,Y=d.high,S=d.low,K=f,R=b,k=m,C=Z,T=y,J=v,L=p,x=W,N=X,H=G,F=V,B=I,P=g,U=w,z=Y,M=S,j=0;j<80;j++){var Q,E,D=a[j];if(j<16)E=D.high=0|t[i+2*j],Q=D.low=0|t[i+2*j+1];else{var A=a[j-15],O=A.high,_=A.low,q=(_>>>1|O<<31)^(_>>>8|O<<24)^(_>>>7|O<<25),$=a[j-2],tt=$.high,it=$.low,nt=(it>>>19|tt<<13)^(it<<3|tt>>>29)^(it>>>6|tt<<26),rt=a[j-7],et=a[j-16],ot=et.low;D.high=E=(E=(E=((O>>>1|_<<31)^(O>>>8|_<<24)^O>>>7)+rt.high+((Q=q+rt.low)>>>0<q>>>0?1:0))+((tt>>>19|it<<13)^(tt<<3|it>>>29)^tt>>>6)+((Q+=nt)>>>0<nt>>>0?1:0))+et.high+((Q+=ot)>>>0<ot>>>0?1:0),D.low=Q}var st,ut=N&F^~N&P,ct=H&B^~H&U,at=K&k^K&T^k&T,lt=(R>>>28|K<<4)^(R<<30|K>>>2)^(R<<25|K>>>7),ht=c[j],dt=ht.low,ft=z+((N>>>14|H<<18)^(N>>>18|H<<14)^(N<<23|H>>>9))+((st=M+((H>>>14|N<<18)^(H>>>18|N<<14)^(H<<23|N>>>9)))>>>0<M>>>0?1:0),bt=lt+(R&C^R&J^C&J);z=P,M=U,P=F,U=B,F=N,B=H,N=L+(ft=(ft=(ft=ft+ut+((st+=ct)>>>0<ct>>>0?1:0))+ht.high+((st+=dt)>>>0<dt>>>0?1:0))+E+((st+=Q)>>>0<Q>>>0?1:0))+((H=x+st|0)>>>0<x>>>0?1:0)|0,L=T,x=J,T=k,J=C,k=K,C=R,K=ft+(((K>>>28|R<<4)^(K<<30|R>>>2)^(K<<25|R>>>7))+at+(bt>>>0<lt>>>0?1:0))+((R=st+bt|0)>>>0<st>>>0?1:0)|0}b=r.low=b+R,r.high=f+K+(b>>>0<R>>>0?1:0),Z=e.low=Z+C,e.high=m+k+(Z>>>0<C>>>0?1:0),v=o.low=v+J,o.high=y+T+(v>>>0<J>>>0?1:0),W=s.low=W+x,s.high=p+L+(W>>>0<x>>>0?1:0),G=u.low=G+H,u.high=X+N+(G>>>0<H>>>0?1:0),I=l.low=I+B,l.high=V+F+(I>>>0<B>>>0?1:0),w=h.low=w+U,h.high=g+P+(w>>>0<U>>>0?1:0),S=d.low=S+M,d.high=Y+z+(S>>>0<M>>>0?1:0)},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return i[r>>>5]|=128<<24-r%32,i[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),i[31+(r+128>>>10<<5)]=n,t.sigBytes=4*i.length,this._process(),this._hash.toX32()},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=i._createHelper(l),t.HmacSHA512=i._createHmacHelper(l)}(),r.SHA512)},1396:function(t,i,n){var r;t.exports=(r=n(9021),n(3240),n(6440),n(5503),n(754),n(4725),n(4636),n(5471),n(3009),n(6308),n(1380),n(9557),n(5953),n(8056),n(1025),n(19),n(9506),n(7165),n(2169),n(6939),n(6372),n(3797),n(8454),n(2073),n(4905),n(482),n(2155),n(8124),n(25),n(955),n(7628),n(7193),n(6298),n(2696),n(3128),r)},1710:function(t,i,n){
/*!

JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>

(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.

JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/
t.exports=function t(i,n,r){function e(s,u){if(!n[s]){if(!i[s]){if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[s]={exports:{}};i[s][0].call(a.exports,function(t){return e(i[s][1][t]||t)},a,a.exports,t,i,n,r)}return n[s].exports}for(var o=void 0,s=0;s<r.length;s++)e(r[s]);return e}({1:[function(t,i,n){"use strict";var r=t("./utils"),e=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(t){for(var i,n,e,s,u,c,a=[],l=0,h=t.length,d=h,f="string"!==r.getTypeOf(t);l<t.length;)d=h-l,e=f?(i=t[l++],n=l<h?t[l++]:0,l<h?t[l++]:0):(i=t.charCodeAt(l++),n=l<h?t.charCodeAt(l++):0,l<h?t.charCodeAt(l++):0),s=(3&i)<<4|n>>4,u=1<d?(15&n)<<2|e>>6:64,c=2<d?63&e:64,a.push(o.charAt(i>>2)+o.charAt(s)+o.charAt(u)+o.charAt(c));return a.join("")},n.decode=function(t){var i,n,r,s,u,c,a=0,l=0,h="data:";if(t.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(t=t.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&f--,t.charAt(t.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=e.uint8array?new Uint8Array(0|f):new Array(0|f);a<t.length;)i=o.indexOf(t.charAt(a++))<<2|(s=o.indexOf(t.charAt(a++)))>>4,n=(15&s)<<4|(u=o.indexOf(t.charAt(a++)))>>2,r=(3&u)<<6|(c=o.indexOf(t.charAt(a++))),d[l++]=i,64!==u&&(d[l++]=n),64!==c&&(d[l++]=r);return d}},{"./support":30,"./utils":32}],2:[function(t,i,n){"use strict";var r=t("./external"),e=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function u(t,i,n,r,e){this.compressedSize=t,this.uncompressedSize=i,this.crc32=n,this.compression=r,this.compressedContent=e}u.prototype={getContentWorker:function(){var t=new e(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),i=this;return t.on("end",function(){if(this.streamInfo.data_length!==i.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new e(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(t,i,n){return t.pipe(new o).pipe(new s("uncompressedSize")).pipe(i.compressWorker(n)).pipe(new s("compressedSize")).withStreamInfo("compression",i)},i.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,n){"use strict";var r=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,n){"use strict";var r=t("./utils"),e=function(){for(var t,i=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;i[n]=t}return i}();i.exports=function(t,i){return void 0!==t&&t.length?"string"!==r.getTypeOf(t)?function(t,i,n,r){var o=e,s=r+n;t^=-1;for(var u=r;u<s;u++)t=t>>>8^o[255&(t^i[u])];return-1^t}(0|i,t,t.length,0):function(t,i,n,r){var o=e,s=r+n;t^=-1;for(var u=r;u<s;u++)t=t>>>8^o[255&(t^i.charCodeAt(u))];return-1^t}(0|i,t,t.length,0):0}},{"./utils":32}],5:[function(t,i,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(t,i,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:t("lie"),i.exports={Promise:r}},{lie:37}],7:[function(t,i,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=t("pako"),o=t("./utils"),s=t("./stream/GenericWorker"),u=r?"uint8array":"array";function c(t,i){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=i,this.meta={}}n.magic="\b\0",o.inherits(c,s),c.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(u,t.data),!1)},c.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new e[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(i){t.push({data:i,meta:t.meta})}},n.compressWorker=function(t){return new c("Deflate",t)},n.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,n){"use strict";function r(t,i){var n,r="";for(n=0;n<i;n++)r+=String.fromCharCode(255&t),t>>>=8;return r}function e(t,i,n,e,s,l){var h,d,f=t.file,b=t.compression,m=l!==u.utf8encode,Z=o.transformTo("string",l(f.name)),y=o.transformTo("string",u.utf8encode(f.name)),v=f.comment,p=o.transformTo("string",l(v)),W=o.transformTo("string",u.utf8encode(v)),X=y.length!==f.name.length,G=W.length!==v.length,V="",I="",g="",w=f.dir,Y=f.date,S={crc32:0,compressedSize:0,uncompressedSize:0};i&&!n||(S.crc32=t.crc32,S.compressedSize=t.compressedSize,S.uncompressedSize=t.uncompressedSize);var K=0;i&&(K|=8),m||!X&&!G||(K|=2048);var R=0,k=0;w&&(R|=16),"UNIX"===s?(k=798,R|=function(t,i){var n=t;return t||(n=i?16893:33204),(65535&n)<<16}(f.unixPermissions,w)):(k=20,R|=function(t){return 63&(t||0)}(f.dosPermissions)),h=Y.getUTCHours(),h<<=6,h|=Y.getUTCMinutes(),h<<=5,h|=Y.getUTCSeconds()/2,d=Y.getUTCFullYear()-1980,d<<=4,d|=Y.getUTCMonth()+1,d<<=5,d|=Y.getUTCDate(),X&&(I=r(1,1)+r(c(Z),4)+y,V+="up"+r(I.length,2)+I),G&&(g=r(1,1)+r(c(p),4)+W,V+="uc"+r(g.length,2)+g);var C="";return C+="\n\0",C+=r(K,2),C+=b.magic,C+=r(h,2),C+=r(d,2),C+=r(S.crc32,4),C+=r(S.compressedSize,4),C+=r(S.uncompressedSize,4),C+=r(Z.length,2),C+=r(V.length,2),{fileRecord:a.LOCAL_FILE_HEADER+C+Z+V,dirRecord:a.CENTRAL_FILE_HEADER+r(k,2)+C+r(p.length,2)+"\0\0\0\0"+r(R,4)+r(e,4)+Z+V+p}}var o=t("../utils"),s=t("../stream/GenericWorker"),u=t("../utf8"),c=t("../crc32"),a=t("../signature");function l(t,i,n,r){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=i,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(l,s),l.prototype.push=function(t){var i=t.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(i+100*(n-r-1))/n:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var i=this.streamFiles&&!t.file.dir;if(i){var n=e(t,i,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var i=this.streamFiles&&!t.file.dir,n=e(t,i,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),i)this.push({data:function(t){return a.DATA_DESCRIPTOR+r(t.crc32,4)+r(t.compressedSize,4)+r(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var t=this.bytesWritten,i=0;i<this.dirRecords.length;i++)this.push({data:this.dirRecords[i],meta:{percent:100}});var n=function(t,i,n,e,s){var u=o.transformTo("string",s(e));return a.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(t,2)+r(t,2)+r(i,4)+r(n,4)+r(u.length,2)+u}(this.dirRecords.length,this.bytesWritten-t,t,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(t){this._sources.push(t);var i=this;return t.on("data",function(t){i.processChunk(t)}),t.on("end",function(){i.closedSource(i.previous.streamInfo),i._sources.length?i.prepareNextSource():i.end()}),t.on("error",function(t){i.error(t)}),this},l.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(t){var i=this._sources;if(!s.prototype.error.call(this,t))return!1;for(var n=0;n<i.length;n++)try{i[n].error(t)}catch(t){}return!0},l.prototype.lock=function(){s.prototype.lock.call(this);for(var t=this._sources,i=0;i<t.length;i++)t[i].lock()},i.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,i,n){"use strict";var r=t("../compressions"),e=t("./ZipFileWorker");n.generateWorker=function(t,i,n){var o=new e(i.streamFiles,n,i.platform,i.encodeFileName),s=0;try{t.forEach(function(t,n){s++;var e=function(t,i){var n=t||i,e=r[n];if(!e)throw new Error(n+" is not a valid compression method !");return e}(n.options.compression,i.compression),u=n.dir,c=n.date;n._compressWorker(e,n.options.compressionOptions||i.compressionOptions||{}).withStreamInfo("file",{name:t,dir:u,date:c,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)}),o.entriesCount=s}catch(t){o.error(t)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,i,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 t=new r;for(var i in this)"function"!=typeof this[i]&&(t[i]=this[i]);return t}}(r.prototype=t("./object")).loadAsync=t("./load"),r.support=t("./support"),r.defaults=t("./defaults"),r.version="3.10.1",r.loadAsync=function(t,i){return(new r).loadAsync(t,i)},r.external=t("./external"),i.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,i,n){"use strict";var r=t("./utils"),e=t("./external"),o=t("./utf8"),s=t("./zipEntries"),u=t("./stream/Crc32Probe"),c=t("./nodejsUtils");function a(t){return new e.Promise(function(i,n){var r=t.decompressed.getContentWorker().pipe(new u);r.on("error",function(t){n(t)}).on("end",function(){r.streamInfo.crc32!==t.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):i()}).resume()})}i.exports=function(t,i){var n=this;return i=r.extend(i||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),c.isNode&&c.isStream(t)?e.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",t,!0,i.optimizedBinaryString,i.base64).then(function(t){var n=new s(i);return n.load(t),n}).then(function(t){var n=[e.Promise.resolve(t)],r=t.files;if(i.checkCRC32)for(var o=0;o<r.length;o++)n.push(a(r[o]));return e.Promise.all(n)}).then(function(t){for(var e=t.shift(),o=e.files,s=0;s<o.length;s++){var u=o[s],c=u.fileNameStr,a=r.resolve(u.fileNameStr);n.file(a,u.decompressed,{binary:!0,optimizedBinaryString:!0,date:u.date,dir:u.dir,comment:u.fileCommentStr.length?u.fileCommentStr:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:i.createFolders}),u.dir||(n.file(a).unsafeOriginalName=c)}return e.zipComment.length&&(n.comment=e.zipComment),n})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,i,n){"use strict";var r=t("../utils"),e=t("../stream/GenericWorker");function o(t,i){e.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(i)}r.inherits(o,e),o.prototype._bindStream=function(t){var i=this;(this._stream=t).pause(),t.on("data",function(t){i.push({data:t,meta:{percent:0}})}).on("error",function(t){i.isPaused?this.generatedError=t:i.error(t)}).on("end",function(){i.isPaused?i._upstreamEnded=!0:i.end()})},o.prototype.pause=function(){return!!e.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!e.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},i.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,i,n){"use strict";var r=t("readable-stream").Readable;function e(t,i,n){r.call(this,i),this._helper=t;var e=this;t.on("data",function(t,i){e.push(t)||e._helper.pause(),n&&n(i)}).on("error",function(t){e.emit("error",t)}).on("end",function(){e.push(null)})}t("../utils").inherits(e,r),e.prototype._read=function(){this._helper.resume()},i.exports=e},{"../utils":32,"readable-stream":16}],14:[function(t,i,n){"use strict";i.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,i);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,i)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var i=new Buffer(t);return i.fill(0),i},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,i,n){"use strict";function r(t,i,n){var r,e=o.getTypeOf(i),u=o.extend(n||{},c);u.date=u.date||new Date,null!==u.compression&&(u.compression=u.compression.toUpperCase()),"string"==typeof u.unixPermissions&&(u.unixPermissions=parseInt(u.unixPermissions,8)),u.unixPermissions&&16384&u.unixPermissions&&(u.dir=!0),u.dosPermissions&&16&u.dosPermissions&&(u.dir=!0),u.dir&&(t=m(t)),u.createFolders&&(r=b(t))&&Z.call(this,r,!0),n&&void 0!==n.binary||(u.binary=!("string"===e&&!1===u.binary&&!1===u.base64)),(i instanceof a&&0===i.uncompressedSize||u.dir||!i||0===i.length)&&(u.base64=!1,u.binary=!0,i="",u.compression="STORE",e="string");var h=null;h=i instanceof a||i instanceof s?i:d.isNode&&d.isStream(i)?new f(t,i):o.prepareContent(t,i,u.binary,u.optimizedBinaryString,u.base64);var y=new l(t,h,u);this.files[t]=y}var e=t("./utf8"),o=t("./utils"),s=t("./stream/GenericWorker"),u=t("./stream/StreamHelper"),c=t("./defaults"),a=t("./compressedObject"),l=t("./zipObject"),h=t("./generate"),d=t("./nodejsUtils"),f=t("./nodejs/NodejsStreamInputAdapter"),b=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var i=t.lastIndexOf("/");return 0<i?t.substring(0,i):""},m=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},Z=function(t,i){return i=void 0!==i?i:c.createFolders,t=m(t),this.files[t]||r.call(this,t,null,{dir:!0,createFolders:i}),this.files[t]};function y(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var i,n,r;for(i in this.files)r=this.files[i],(n=i.slice(this.root.length,i.length))&&i.slice(0,this.root.length)===this.root&&t(n,r)},filter:function(t){var i=[];return this.forEach(function(n,r){t(n,r)&&i.push(r)}),i},file:function(t,i,n){if(1!==arguments.length)return r.call(this,t=this.root+t,i,n),this;if(y(t)){var e=t;return this.filter(function(t,i){return!i.dir&&e.test(t)})}var o=this.files[this.root+t];return o&&!o.dir?o:null},folder:function(t){if(!t)return this;if(y(t))return this.filter(function(i,n){return n.dir&&t.test(i)});var i=Z.call(this,this.root+t),n=this.clone();return n.root=i.name,n},remove:function(t){var i=this.files[t=this.root+t];if(i||("/"!==t.slice(-1)&&(t+="/"),i=this.files[t]),i&&!i.dir)delete this.files[t];else for(var n=this.filter(function(i,n){return n.name.slice(0,t.length)===t}),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(t){var i,n={};try{if((n=o.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:e.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.");o.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS"),i=h.generateWorker(this,n,n.comment||this.comment||"")}catch(t){(i=new s("error")).error(t)}return new u(i,n.type||"string",n.mimeType)},generateAsync:function(t,i){return this.generateInternalStream(t).accumulate(i)},generateNodeStream:function(t,i){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(i)}};i.exports=v},{"./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(t,i,n){"use strict";i.exports=t("stream")},{stream:void 0}],17:[function(t,i,n){"use strict";var r=t("./DataReader");function e(t){r.call(this,t);for(var i=0;i<this.data.length;i++)t[i]=255&t[i]}t("../utils").inherits(e,r),e.prototype.byteAt=function(t){return this.data[this.zero+t]},e.prototype.lastIndexOfSignature=function(t){for(var i=t.charCodeAt(0),n=t.charCodeAt(1),r=t.charCodeAt(2),e=t.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===i&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===e)return o-this.zero;return-1},e.prototype.readAndCheckSignature=function(t){var i=t.charCodeAt(0),n=t.charCodeAt(1),r=t.charCodeAt(2),e=t.charCodeAt(3),o=this.readData(4);return i===o[0]&&n===o[1]&&r===o[2]&&e===o[3]},e.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var i=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,i},i.exports=e},{"../utils":32,"./DataReader":18}],18:[function(t,i,n){"use strict";var r=t("../utils");function e(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}e.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(){},readInt:function(t){var i,n=0;for(this.checkOffset(t),i=this.index+t-1;i>=this.index;i--)n=(n<<8)+this.byteAt(i);return this.index+=t,n},readString:function(t){return r.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},i.exports=e},{"../utils":32}],19:[function(t,i,n){"use strict";var r=t("./Uint8ArrayReader");function e(t){r.call(this,t)}t("../utils").inherits(e,r),e.prototype.readData=function(t){this.checkOffset(t);var i=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,i},i.exports=e},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,n){"use strict";var r=t("./DataReader");function e(t){r.call(this,t)}t("../utils").inherits(e,r),e.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},e.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},e.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},e.prototype.readData=function(t){this.checkOffset(t);var i=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,i},i.exports=e},{"../utils":32,"./DataReader":18}],21:[function(t,i,n){"use strict";var r=t("./ArrayReader");function e(t){r.call(this,t)}t("../utils").inherits(e,r),e.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var i=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,i},i.exports=e},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,n){"use strict";var r=t("../utils"),e=t("../support"),o=t("./ArrayReader"),s=t("./StringReader"),u=t("./NodeBufferReader"),c=t("./Uint8ArrayReader");i.exports=function(t){var i=r.getTypeOf(t);return r.checkSupport(i),"string"!==i||e.uint8array?"nodebuffer"===i?new u(t):e.uint8array?new c(r.transformTo("uint8array",t)):new o(r.transformTo("array",t)):new s(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,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(t,i,n){"use strict";var r=t("./GenericWorker"),e=t("../utils");function o(t){r.call(this,"ConvertWorker to "+t),this.destType=t}e.inherits(o,r),o.prototype.processChunk=function(t){this.push({data:e.transformTo(this.destType,t.data),meta:t.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,n){"use strict";var r=t("./GenericWorker"),e=t("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,r),o.prototype.processChunk=function(t){this.streamInfo.crc32=e(t.data,this.streamInfo.crc32||0),this.push(t)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,n){"use strict";var r=t("../utils"),e=t("./GenericWorker");function o(t){e.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}r.inherits(o,e),o.prototype.processChunk=function(t){t&&(this.streamInfo[this.propName]=(this.streamInfo[this.propName]||0)+t.data.length),e.prototype.processChunk.call(this,t)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,n){"use strict";var r=t("../utils"),e=t("./GenericWorker");function o(t){e.call(this,"DataWorker");var i=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){i.dataIsReady=!0,i.data=t,i.max=t&&t.length||0,i.type=r.getTypeOf(t),i.isPaused||i._tickAndRepeat()},function(t){i.error(t)})}r.inherits(o,e),o.prototype.cleanUp=function(){e.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!e.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,i=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,i);break;case"uint8array":t=this.data.subarray(this.index,i);break;case"array":case"nodebuffer":t=this.data.slice(this.index,i)}return this.index=i,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,n){"use strict";function r(t){this.name=t||"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(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,i){return this._listeners[t].push(i),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,i){if(this._listeners[t])for(var n=0;n<this._listeners[t].length;n++)this._listeners[t][n].call(this,i)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var i=this;return t.on("data",function(t){i.processChunk(t)}),t.on("end",function(){i.end()}),t.on("error",function(t){i.error(t)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,i){return this.extraStreamInfo[t]=i,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},i.exports=r},{}],29:[function(t,i,n){"use strict";var r=t("../utils"),e=t("./ConvertWorker"),o=t("./GenericWorker"),s=t("../base64"),u=t("../support"),c=t("../external"),a=null;if(u.nodestream)try{a=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,i){return new c.Promise(function(n,e){var o=[],u=t._internalType,c=t._outputType,a=t._mimeType;t.on("data",function(t,n){o.push(t),i&&i(n)}).on("error",function(t){o=[],e(t)}).on("end",function(){try{var t=function(t,i,n){switch(t){case"blob":return r.newBlob(r.transformTo("arraybuffer",i),n);case"base64":return s.encode(i);default:return r.transformTo(t,i)}}(c,function(t,i){var n,r=0,e=null,o=0;for(n=0;n<i.length;n++)o+=i[n].length;switch(t){case"string":return i.join("");case"array":return Array.prototype.concat.apply([],i);case"uint8array":for(e=new Uint8Array(o),n=0;n<i.length;n++)e.set(i[n],r),r+=i[n].length;return e;case"nodebuffer":return Buffer.concat(i);default:throw new Error("concat : unsupported type '"+t+"'")}}(u,o),a);n(t)}catch(t){e(t)}o=[]}).resume()})}function h(t,i,n){var s=i;switch(i){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=i,this._mimeType=n,r.checkSupport(s),this._worker=t.pipe(new e(s)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}h.prototype={accumulate:function(t){return l(this,t)},on:function(t,i){var n=this;return this._worker.on(t,"data"===t?function(t){i.call(n,t.data,t.meta)}:function(){r.delay(i,arguments,n)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(r.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new a(this,{objectMode:"nodebuffer"!==this._outputType},t)}},i.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,i,n){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer="undefined"!=typeof Buffer,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(t){try{var e=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);e.append(r),n.blob=0===e.getBlob("application/zip").size}catch(t){n.blob=!1}}}try{n.nodestream=!!t("readable-stream").Readable}catch(t){n.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,n){"use strict";for(var r=t("./utils"),e=t("./support"),o=t("./nodejsUtils"),s=t("./stream/GenericWorker"),u=new Array(256),c=0;c<256;c++)u[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function a(){s.call(this,"utf-8 decode"),this.leftOver=null}function l(){s.call(this,"utf-8 encode")}u[254]=u[254]=1,n.utf8encode=function(t){return e.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var i,n,r,o,s,u=t.length,c=0;for(o=0;o<u;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<u&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),c+=n<128?1:n<2048?2:n<65536?3:4;for(i=e.uint8array?new Uint8Array(c):new Array(c),o=s=0;s<c;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<u&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?i[s++]=n:(n<2048?i[s++]=192|n>>>6:(n<65536?i[s++]=224|n>>>12:(i[s++]=240|n>>>18,i[s++]=128|n>>>12&63),i[s++]=128|n>>>6&63),i[s++]=128|63&n);return i}(t)},n.utf8decode=function(t){return e.nodebuffer?r.transformTo("nodebuffer",t).toString("utf-8"):function(t){var i,n,e,o,s=t.length,c=new Array(2*s);for(i=n=0;i<s;)if((e=t[i++])<128)c[n++]=e;else if(4<(o=u[e]))c[n++]=65533,i+=o-1;else{for(e&=2===o?31:3===o?15:7;1<o&&i<s;)e=e<<6|63&t[i++],o--;1<o?c[n++]=65533:e<65536?c[n++]=e:(c[n++]=55296|(e-=65536)>>10&1023,c[n++]=56320|1023&e)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(t=r.transformTo(e.uint8array?"uint8array":"array",t))},r.inherits(a,s),a.prototype.processChunk=function(t){var i=r.transformTo(e.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(e.uint8array){var o=i;(i=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),i.set(o,this.leftOver.length)}else i=this.leftOver.concat(i);this.leftOver=null}var s=function(t,i){var n;for((i=i||t.length)>t.length&&(i=t.length),n=i-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?i:n+u[t[n]]>i?n:i}(i),c=i;s!==i.length&&(e.uint8array?(c=i.subarray(0,s),this.leftOver=i.subarray(s,i.length)):(c=i.slice(0,s),this.leftOver=i.slice(s,i.length))),this.push({data:n.utf8decode(c),meta:t.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=a,r.inherits(l,s),l.prototype.processChunk=function(t){this.push({data:n.utf8encode(t.data),meta:t.meta})},n.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,n){"use strict";var r=t("./support"),e=t("./base64"),o=t("./nodejsUtils"),s=t("./external");function u(t){return t}function c(t,i){for(var n=0;n<t.length;++n)i[n]=255&t.charCodeAt(n);return i}t("setimmediate"),n.newBlob=function(t,i){n.checkSupport("blob");try{return new Blob([t],{type:i})}catch(n){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(t),r.getBlob(i)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var a={stringifyByChunk:function(t,i,n){var r=[],e=0,o=t.length;if(o<=n)return String.fromCharCode.apply(null,t);for(;e<o;)r.push(String.fromCharCode.apply(null,"array"===i||"nodebuffer"===i?t.slice(e,Math.min(e+n,o)):t.subarray(e,Math.min(e+n,o)))),e+=n;return r.join("")},stringifyByChar:function(t){for(var i="",n=0;n<t.length;n++)i+=String.fromCharCode(t[n]);return i},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(t){return!1}}()}};function l(t){var i=65536,r=n.getTypeOf(t),e=!0;if("uint8array"===r?e=a.applyCanBeUsed.uint8array:"nodebuffer"===r&&(e=a.applyCanBeUsed.nodebuffer),e)for(;1<i;)try{return a.stringifyByChunk(t,r,i)}catch(t){i=Math.floor(i/2)}return a.stringifyByChar(t)}function h(t,i){for(var n=0;n<t.length;n++)i[n]=t[n];return i}n.applyFromCharCode=l;var d={};d.string={string:u,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return d.string.uint8array(t).buffer},uint8array:function(t){return c(t,new Uint8Array(t.length))},nodebuffer:function(t){return c(t,o.allocBuffer(t.length))}},d.array={string:l,array:u,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(t)}},d.arraybuffer={string:function(t){return l(new Uint8Array(t))},array:function(t){return h(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:u,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(new Uint8Array(t))}},d.uint8array={string:l,array:function(t){return h(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:u,nodebuffer:function(t){return o.newBufferFrom(t)}},d.nodebuffer={string:l,array:function(t){return h(t,new Array(t.length))},arraybuffer:function(t){return d.nodebuffer.uint8array(t).buffer},uint8array:function(t){return h(t,new Uint8Array(t.length))},nodebuffer:u},n.transformTo=function(t,i){if(i=i||"",!t)return i;n.checkSupport(t);var r=n.getTypeOf(i);return d[r][t](i)},n.resolve=function(t){for(var i=t.split("/"),n=[],r=0;r<i.length;r++){var e=i[r];"."===e||""===e&&0!==r&&r!==i.length-1||(".."===e?n.pop():n.push(e))}return n.join("/")},n.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":r.nodebuffer&&o.isBuffer(t)?"nodebuffer":r.uint8array&&t instanceof Uint8Array?"uint8array":r.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(t){if(!r[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(t){var i,n,r="";for(n=0;n<(t||"").length;n++)r+="\\x"+((i=t.charCodeAt(n))<16?"0":"")+i.toString(16).toUpperCase();return r},n.delay=function(t,i,n){setImmediate(function(){t.apply(n||null,i||[])})},n.inherits=function(t,i){function n(){}n.prototype=i.prototype,t.prototype=new n},n.extend=function(){var t,i,n={};for(t=0;t<arguments.length;t++)for(i in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],i)&&void 0===n[i]&&(n[i]=arguments[t][i]);return n},n.prepareContent=function(t,i,o,u,a){return s.Promise.resolve(i).then(function(t){return r.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new s.Promise(function(i,n){var r=new FileReader;r.onload=function(t){i(t.target.result)},r.onerror=function(t){n(t.target.error)},r.readAsArrayBuffer(t)}):t}).then(function(i){var l=n.getTypeOf(i);return l?("arraybuffer"===l?i=n.transformTo("uint8array",i):"string"===l&&(a?i=e.decode(i):o&&!0!==u&&(i=function(t){return c(t,r.uint8array?new Uint8Array(t.length):new Array(t.length))}(i))),i):s.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,i,n){"use strict";var r=t("./reader/readerFor"),e=t("./utils"),o=t("./signature"),s=t("./zipEntry"),u=t("./support");function c(t){this.files=[],this.loadOptions=t}c.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var i=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+e.pretty(i)+", expected "+e.pretty(t)+")")}},isSignature:function(t,i){var n=this.reader.index;this.reader.setIndex(t);var r=this.reader.readString(4)===i;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),i=e.transformTo(u.uint8array?"uint8array":"array",t);this.zipComment=this.loadOptions.decodeFileName(i)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,i,n,r=this.zip64EndOfCentralSize-44;0<r;)t=this.reader.readInt(2),i=this.reader.readInt(4),n=this.reader.readData(i),this.zip64ExtensibleData[t]={id:t,length:i,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,i;for(t=0;t<this.files.length;t++)this.reader.setIndex((i=this.files[t]).localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),i.readLocalPart(this.reader),i.handleUTF8(),i.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(t=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(t);var i=t;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===e.MAX_VALUE_16BITS||this.diskWithCentralDirStart===e.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===e.MAX_VALUE_16BITS||this.centralDirRecords===e.MAX_VALUE_16BITS||this.centralDirSize===e.MAX_VALUE_32BITS||this.centralDirOffset===e.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=i-n;if(0<r)this.isSignature(i,o.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(t){this.reader=r(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},i.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,i,n){"use strict";var r=t("./reader/readerFor"),e=t("./utils"),o=t("./compressedObject"),s=t("./crc32"),u=t("./utf8"),c=t("./compressions"),a=t("./support");function l(t,i){this.options=t,this.loadOptions=i}l.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(t){var i,n;if(t.skip(22),this.fileNameLength=t.readInt(2),n=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(i=function(t){for(var i in c)if(Object.prototype.hasOwnProperty.call(c,i)&&c[i].magic===t)return c[i];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+e.pretty(this.compressionMethod)+" unknown (inner file : "+e.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,i,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var i=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(i),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=r(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var i,n,r,e=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<e;)i=t.readInt(2),n=t.readInt(2),r=t.readData(n),this.extraFields[i]={id:i,length:n,value:r};t.setIndex(e)},handleUTF8:function(){var t=a.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var i=this.findExtraFieldUnicodePath();if(null!==i)this.fileNameStr=i;else{var n=e.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var o=e.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var i=r(t.value);return 1!==i.readInt(1)||s(this.fileName)!==i.readInt(4)?null:u.utf8decode(i.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var i=r(t.value);return 1!==i.readInt(1)||s(this.fileComment)!==i.readInt(4)?null:u.utf8decode(i.readData(t.length-5))}return null}},i.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,i,n){"use strict";function r(t,i,n){this.name=t,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=i,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var e=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),s=t("./utf8"),u=t("./compressedObject"),c=t("./stream/GenericWorker");r.prototype={internalStream:function(t){var i=null,n="string";try{if(!t)throw new Error("No output type specified.");var r="string"===(n=t.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),i=this._decompressWorker();var o=!this._dataBinary;o&&!r&&(i=i.pipe(new s.Utf8EncodeWorker)),!o&&r&&(i=i.pipe(new s.Utf8DecodeWorker))}catch(t){(i=new c("error")).error(t)}return new e(i,n,"")},async:function(t,i){return this.internalStream(t).accumulate(i)},nodeStream:function(t,i){return this.internalStream(t||"nodebuffer").toNodejsStream(i)},_compressWorker:function(t,i){if(this._data instanceof u&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new s.Utf8EncodeWorker)),u.createWorkerFrom(n,t,i)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof c?this._data:new o(this._data)}};for(var a=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<a.length;h++)r.prototype[a[h]]=l;i.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,i,r){(function(t){"use strict";var n,r,e=t.MutationObserver||t.WebKitMutationObserver;if(e){var o=0,s=new e(l),u=t.document.createTextNode("");s.observe(u,{characterData:!0}),n=function(){u.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)n="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var i=t.document.createElement("script");i.onreadystatechange=function(){l(),i.onreadystatechange=null,i.parentNode.removeChild(i),i=null},t.document.documentElement.appendChild(i)}:function(){setTimeout(l,0)};else{var c=new t.MessageChannel;c.port1.onmessage=l,n=function(){c.port2.postMessage(0)}}var a=[];function l(){var t,i;r=!0;for(var n=a.length;n;){for(i=a,a=[],t=-1;++t<n;)i[t]();n=a.length}r=!1}i.exports=function(t){1!==a.push(t)||r||n()}}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,i,n){"use strict";var r=t("immediate");function e(){}var o={},s=["REJECTED"],u=["FULFILLED"],c=["PENDING"];function a(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,t!==e&&f(this,t)}function l(t,i,n){this.promise=t,"function"==typeof i&&(this.onFulfilled=i,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(t,i,n){r(function(){var r;try{r=i(n)}catch(r){return o.reject(t,r)}r===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.resolve(t,r)})}function d(t){var i=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof i)return function(){i.apply(t,arguments)}}function f(t,i){var n=!1;function r(i){n||(n=!0,o.reject(t,i))}function e(i){n||(n=!0,o.resolve(t,i))}var s=b(function(){i(e,r)});"error"===s.status&&r(s.value)}function b(t,i){var n={};try{n.value=t(i),n.status="success"}catch(t){n.status="error",n.value=t}return n}(i.exports=a).prototype.finally=function(t){if("function"!=typeof t)return this;var i=this.constructor;return this.then(function(n){return i.resolve(t()).then(function(){return n})},function(n){return i.resolve(t()).then(function(){throw n})})},a.prototype.catch=function(t){return this.then(null,t)},a.prototype.then=function(t,i){if("function"!=typeof t&&this.state===u||"function"!=typeof i&&this.state===s)return this;var n=new this.constructor(e);return this.state!==c?h(n,this.state===u?t:i,this.outcome):this.queue.push(new l(n,t,i)),n},l.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},l.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},l.prototype.callRejected=function(t){o.reject(this.promise,t)},l.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},o.resolve=function(t,i){var n=b(d,i);if("error"===n.status)return o.reject(t,n.value);var r=n.value;if(r)f(t,r);else{t.state=u,t.outcome=i;for(var e=-1,s=t.queue.length;++e<s;)t.queue[e].callFulfilled(i)}return t},o.reject=function(t,i){t.state=s,t.outcome=i;for(var n=-1,r=t.queue.length;++n<r;)t.queue[n].callRejected(i);return t},a.resolve=function(t){return t instanceof this?t:o.resolve(new this(e),t)},a.reject=function(t){var i=new this(e);return o.reject(i,t)},a.all=function(t){var i=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,r=!1;if(!n)return this.resolve([]);for(var s=new Array(n),u=0,c=-1,a=new this(e);++c<n;)l(t[c],c);return a;function l(t,e){i.resolve(t).then(function(t){s[e]=t,++u!==n||r||(r=!0,o.resolve(a,s))},function(t){r||(r=!0,o.reject(a,t))})}},a.race=function(t){var i=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,r=!1;if(!n)return this.resolve([]);for(var s=-1,u=new this(e);++s<n;)i.resolve(t[s]).then(function(t){r||(r=!0,o.resolve(u,t))},function(t){r||(r=!0,o.reject(u,t))});return u}},{immediate:36}],38:[function(t,i,n){"use strict";var r={};(0,t("./lib/utils/common").assign)(r,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),i.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,i,n){"use strict";var r=t("./zlib/deflate"),e=t("./utils/common"),o=t("./utils/strings"),s=t("./zlib/messages"),u=t("./zlib/zstream"),c=Object.prototype.toString,a=0,l=-1,h=0,d=8;function f(t){if(!(this instanceof f))return new f(t);this.options=e.assign({level:l,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},t||{});var i=this.options;i.raw&&0<i.windowBits?i.windowBits=-i.windowBits:i.gzip&&0<i.windowBits&&i.windowBits<16&&(i.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,i.level,i.method,i.windowBits,i.memLevel,i.strategy);if(n!==a)throw new Error(s[n]);if(i.header&&r.deflateSetHeader(this.strm,i.header),i.dictionary){var b;if(b="string"==typeof i.dictionary?o.string2buf(i.dictionary):"[object ArrayBuffer]"===c.call(i.dictionary)?new Uint8Array(i.dictionary):i.dictionary,(n=r.deflateSetDictionary(this.strm,b))!==a)throw new Error(s[n]);this._dict_set=!0}}function b(t,i){var n=new f(i);if(n.push(t,!0),n.err)throw n.msg||s[n.err];return n.result}f.prototype.push=function(t,i){var n,s,u=this.strm,l=this.options.chunkSize;if(this.ended)return!1;s=i===~~i?i:!0===i?4:0,u.input="string"==typeof t?o.string2buf(t):"[object ArrayBuffer]"===c.call(t)?new Uint8Array(t):t,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new e.Buf8(l),u.next_out=0,u.avail_out=l),1!==(n=r.deflate(u,s))&&n!==a)return this.onEnd(n),!(this.ended=!0);0!==u.avail_out&&(0!==u.avail_in||4!==s&&2!==s)||this.onData("string"===this.options.to?o.buf2binstring(e.shrinkBuf(u.output,u.next_out)):e.shrinkBuf(u.output,u.next_out))}while((0<u.avail_in||0===u.avail_out)&&1!==n);return 4===s?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a):2!==s||(this.onEnd(a),!(u.avail_out=0))},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===a&&(this.result="string"===this.options.to?this.chunks.join(""):e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},n.Deflate=f,n.deflate=b,n.deflateRaw=function(t,i){return(i=i||{}).raw=!0,b(t,i)},n.gzip=function(t,i){return(i=i||{}).gzip=!0,b(t,i)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,i,n){"use strict";var r=t("./zlib/inflate"),e=t("./utils/common"),o=t("./utils/strings"),s=t("./zlib/constants"),u=t("./zlib/messages"),c=t("./zlib/zstream"),a=t("./zlib/gzheader"),l=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=e.assign({chunkSize:16384,windowBits:0,to:""},t||{});var i=this.options;i.raw&&0<=i.windowBits&&i.windowBits<16&&(i.windowBits=-i.windowBits,0===i.windowBits&&(i.windowBits=-15)),!(0<=i.windowBits&&i.windowBits<16)||t&&t.windowBits||(i.windowBits+=32),15<i.windowBits&&i.windowBits<48&&!(15&i.windowBits)&&(i.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,i.windowBits);if(n!==s.Z_OK)throw new Error(u[n]);this.header=new a,r.inflateGetHeader(this.strm,this.header)}function d(t,i){var n=new h(i);if(n.push(t,!0),n.err)throw n.msg||u[n.err];return n.result}h.prototype.push=function(t,i){var n,u,c,a,h,d,f=this.strm,b=this.options.chunkSize,m=this.options.dictionary,Z=!1;if(this.ended)return!1;u=i===~~i?i:!0===i?s.Z_FINISH:s.Z_NO_FLUSH,f.input="string"==typeof t?o.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?new Uint8Array(t):t,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new e.Buf8(b),f.next_out=0,f.avail_out=b),(n=r.inflate(f,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&m&&(d="string"==typeof m?o.string2buf(m):"[object ArrayBuffer]"===l.call(m)?new Uint8Array(m):m,n=r.inflateSetDictionary(this.strm,d)),n===s.Z_BUF_ERROR&&!0===Z&&(n=s.Z_OK,Z=!1),n!==s.Z_STREAM_END&&n!==s.Z_OK)return this.onEnd(n),!(this.ended=!0);f.next_out&&(0!==f.avail_out&&n!==s.Z_STREAM_END&&(0!==f.avail_in||u!==s.Z_FINISH&&u!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(c=o.utf8border(f.output,f.next_out),a=f.next_out-c,h=o.buf2string(f.output,c),f.next_out=a,f.avail_out=b-a,a&&e.arraySet(f.output,f.output,c,a,0),this.onData(h)):this.onData(e.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(Z=!0)}while((0<f.avail_in||0===f.avail_out)&&n!==s.Z_STREAM_END);return n===s.Z_STREAM_END&&(u=s.Z_FINISH),u===s.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===s.Z_OK):u!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(f.avail_out=0))},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===s.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},n.Inflate=h,n.inflate=d,n.inflateRaw=function(t,i){return(i=i||{}).raw=!0,d(t,i)},n.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,i,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(t){for(var i=Array.prototype.slice.call(arguments,1);i.length;){var n=i.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}}return t},n.shrinkBuf=function(t,i){return t.length===i?t:t.subarray?t.subarray(0,i):(t.length=i,t)};var e={arraySet:function(t,i,n,r,e){if(i.subarray&&t.subarray)t.set(i.subarray(n,n+r),e);else for(var o=0;o<r;o++)t[e+o]=i[n+o]},flattenChunks:function(t){var i,n,r,e,o,s;for(i=r=0,n=t.length;i<n;i++)r+=t[i].length;for(s=new Uint8Array(r),i=e=0,n=t.length;i<n;i++)s.set(o=t[i],e),e+=o.length;return s}},o={arraySet:function(t,i,n,r,e){for(var o=0;o<r;o++)t[e+o]=i[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};n.setTyped=function(t){t?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,e)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(r)},{}],42:[function(t,i,n){"use strict";var r=t("./common"),e=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){e=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new r.Buf8(256),u=0;u<256;u++)s[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function c(t,i){if(i<65537&&(t.subarray&&o||!t.subarray&&e))return String.fromCharCode.apply(null,r.shrinkBuf(t,i));for(var n="",s=0;s<i;s++)n+=String.fromCharCode(t[s]);return n}s[254]=s[254]=1,n.string2buf=function(t){var i,n,e,o,s,u=t.length,c=0;for(o=0;o<u;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<u&&56320==(64512&(e=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(e-56320),o++),c+=n<128?1:n<2048?2:n<65536?3:4;for(i=new r.Buf8(c),o=s=0;s<c;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<u&&56320==(64512&(e=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(e-56320),o++),n<128?i[s++]=n:(n<2048?i[s++]=192|n>>>6:(n<65536?i[s++]=224|n>>>12:(i[s++]=240|n>>>18,i[s++]=128|n>>>12&63),i[s++]=128|n>>>6&63),i[s++]=128|63&n);return i},n.buf2binstring=function(t){return c(t,t.length)},n.binstring2buf=function(t){for(var i=new r.Buf8(t.length),n=0,e=i.length;n<e;n++)i[n]=t.charCodeAt(n);return i},n.buf2string=function(t,i){var n,r,e,o,u=i||t.length,a=new Array(2*u);for(n=r=0;n<u;)if((e=t[n++])<128)a[r++]=e;else if(4<(o=s[e]))a[r++]=65533,n+=o-1;else{for(e&=2===o?31:3===o?15:7;1<o&&n<u;)e=e<<6|63&t[n++],o--;1<o?a[r++]=65533:e<65536?a[r++]=e:(a[r++]=55296|(e-=65536)>>10&1023,a[r++]=56320|1023&e)}return c(a,r)},n.utf8border=function(t,i){var n;for((i=i||t.length)>t.length&&(i=t.length),n=i-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?i:n+s[t[n]]>i?n:i}},{"./common":41}],43:[function(t,i,n){"use strict";i.exports=function(t,i,n,r){for(var e=65535&t,o=t>>>16&65535,s=0;0!==n;){for(n-=s=2e3<n?2e3:n;o=o+(e=e+i[r++]|0)|0,--s;);e%=65521,o%=65521}return e|o<<16}},{}],44:[function(t,i,n){"use strict";i.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,i,n){"use strict";var r=function(){for(var t,i=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;i[n]=t}return i}();i.exports=function(t,i,n,e){var o=r,s=e+n;t^=-1;for(var u=e;u<s;u++)t=t>>>8^o[255&(t^i[u])];return-1^t}},{}],46:[function(t,i,n){"use strict";var r,e=t("../utils/common"),o=t("./trees"),s=t("./adler32"),u=t("./crc32"),c=t("./messages"),a=0,l=4,h=0,d=-2,f=-1,b=4,m=2,Z=8,y=9,v=286,p=30,W=19,X=2*v+1,G=15,V=3,I=258,g=I+V+1,w=42,Y=113,S=1,K=2,R=3,k=4;function C(t,i){return t.msg=c[i],i}function T(t){return(t<<1)-(4<t?9:0)}function J(t){for(var i=t.length;0<=--i;)t[i]=0}function L(t){var i=t.state,n=i.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(e.arraySet(t.output,i.pending_buf,i.pending_out,n,t.next_out),t.next_out+=n,i.pending_out+=n,t.total_out+=n,t.avail_out-=n,i.pending-=n,0===i.pending&&(i.pending_out=0))}function x(t,i){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,i),t.block_start=t.strstart,L(t.strm)}function N(t,i){t.pending_buf[t.pending++]=i}function H(t,i){t.pending_buf[t.pending++]=i>>>8&255,t.pending_buf[t.pending++]=255&i}function F(t,i){var n,r,e=t.max_chain_length,o=t.strstart,s=t.prev_length,u=t.nice_match,c=t.strstart>t.w_size-g?t.strstart-(t.w_size-g):0,a=t.window,l=t.w_mask,h=t.prev,d=t.strstart+I,f=a[o+s-1],b=a[o+s];t.prev_length>=t.good_match&&(e>>=2),u>t.lookahead&&(u=t.lookahead);do{if(a[(n=i)+s]===b&&a[n+s-1]===f&&a[n]===a[o]&&a[++n]===a[o+1]){o+=2,n++;do{}while(a[++o]===a[++n]&&a[++o]===a[++n]&&a[++o]===a[++n]&&a[++o]===a[++n]&&a[++o]===a[++n]&&a[++o]===a[++n]&&a[++o]===a[++n]&&a[++o]===a[++n]&&o<d);if(r=I-(d-o),o=d-I,s<r){if(t.match_start=i,u<=(s=r))break;f=a[o+s-1],b=a[o+s]}}}while((i=h[i&l])>c&&0!=--e);return s<=t.lookahead?s:t.lookahead}function B(t){var i,n,r,o,c,a,l,h,d,f,b=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=b+(b-g)){for(e.arraySet(t.window,t.window,b,b,0),t.match_start-=b,t.strstart-=b,t.block_start-=b,i=n=t.hash_size;r=t.head[--i],t.head[i]=b<=r?r-b:0,--n;);for(i=n=b;r=t.prev[--i],t.prev[i]=b<=r?r-b:0,--n;);o+=b}if(0===t.strm.avail_in)break;if(l=t.window,h=t.strstart+t.lookahead,f=void 0,(d=o)<(f=(a=t.strm).avail_in)&&(f=d),n=0===f?0:(a.avail_in-=f,e.arraySet(l,a.input,a.next_in,f,h),1===a.state.wrap?a.adler=s(a.adler,l,f,h):2===a.state.wrap&&(a.adler=u(a.adler,l,f,h)),a.next_in+=f,a.total_in+=f,f),t.lookahead+=n,t.lookahead+t.insert>=V)for(t.ins_h=t.window[c=t.strstart-t.insert],t.ins_h=(t.ins_h<<t.hash_shift^t.window[c+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[c+V-1])&t.hash_mask,t.prev[c&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=c,c++,t.insert--,!(t.lookahead+t.insert<V)););}while(t.lookahead<g&&0!==t.strm.avail_in)}function P(t,i){for(var n,r;;){if(t.lookahead<g){if(B(t),t.lookahead<g&&i===a)return S;if(0===t.lookahead)break}if(n=0,t.lookahead>=V&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+V-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-g&&(t.match_length=F(t,n)),t.match_length>=V)if(r=o._tr_tally(t,t.strstart-t.match_start,t.match_length-V),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=V){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+V-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(x(t,!1),0===t.strm.avail_out))return S}return t.insert=t.strstart<V-1?t.strstart:V-1,i===l?(x(t,!0),0===t.strm.avail_out?R:k):t.last_lit&&(x(t,!1),0===t.strm.avail_out)?S:K}function U(t,i){for(var n,r,e;;){if(t.lookahead<g){if(B(t),t.lookahead<g&&i===a)return S;if(0===t.lookahead)break}if(n=0,t.lookahead>=V&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+V-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=V-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-g&&(t.match_length=F(t,n),t.match_length<=5&&(1===t.strategy||t.match_length===V&&4096<t.strstart-t.match_start)&&(t.match_length=V-1)),t.prev_length>=V&&t.match_length<=t.prev_length){for(e=t.strstart+t.lookahead-V,r=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-V),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=e&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+V-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=V-1,t.strstart++,r&&(x(t,!1),0===t.strm.avail_out))return S}else if(t.match_available){if((r=o._tr_tally(t,0,t.window[t.strstart-1]))&&x(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return S}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<V-1?t.strstart:V-1,i===l?(x(t,!0),0===t.strm.avail_out?R:k):t.last_lit&&(x(t,!1),0===t.strm.avail_out)?S:K}function z(t,i,n,r,e){this.good_length=t,this.max_lazy=i,this.nice_length=n,this.max_chain=r,this.func=e}function M(){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=Z,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 e.Buf16(2*X),this.dyn_dtree=new e.Buf16(2*(2*p+1)),this.bl_tree=new e.Buf16(2*(2*W+1)),J(this.dyn_ltree),J(this.dyn_dtree),J(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(G+1),this.heap=new e.Buf16(2*v+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*v+1),J(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function j(t){var i;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=m,(i=t.state).pending=0,i.pending_out=0,i.wrap<0&&(i.wrap=-i.wrap),i.status=i.wrap?w:Y,t.adler=2===i.wrap?0:1,i.last_flush=a,o._tr_init(i),h):C(t,d)}function Q(t){var i=j(t);return i===h&&function(t){t.window_size=2*t.w_size,J(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=V-1,t.match_available=0,t.ins_h=0}(t.state),i}function E(t,i,n,r,o,s){if(!t)return d;var u=1;if(i===f&&(i=6),r<0?(u=0,r=-r):15<r&&(u=2,r-=16),o<1||y<o||n!==Z||r<8||15<r||i<0||9<i||s<0||b<s)return C(t,d);8===r&&(r=9);var c=new M;return(t.state=c).strm=t,c.wrap=u,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+V-1)/V),c.window=new e.Buf8(2*c.w_size),c.head=new e.Buf16(c.hash_size),c.prev=new e.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new e.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=i,c.strategy=s,c.method=n,Q(t)}r=[new z(0,0,0,0,function(t,i){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(B(t),0===t.lookahead&&i===a)return S;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,x(t,!1),0===t.strm.avail_out))return S;if(t.strstart-t.block_start>=t.w_size-g&&(x(t,!1),0===t.strm.avail_out))return S}return t.insert=0,i===l?(x(t,!0),0===t.strm.avail_out?R:k):(t.strstart>t.block_start&&x(t,!1),S)}),new z(4,4,8,4,P),new z(4,5,16,8,P),new z(4,6,32,32,P),new z(4,4,16,16,U),new z(8,16,32,32,U),new z(8,16,128,128,U),new z(8,32,128,256,U),new z(32,128,258,1024,U),new z(32,258,258,4096,U)],n.deflateInit=function(t,i){return E(t,i,Z,15,8,0)},n.deflateInit2=E,n.deflateReset=Q,n.deflateResetKeep=j,n.deflateSetHeader=function(t,i){return t&&t.state?2!==t.state.wrap?d:(t.state.gzhead=i,h):d},n.deflate=function(t,i){var n,e,s,c;if(!t||!t.state||5<i||i<0)return t?C(t,d):d;if(e=t.state,!t.output||!t.input&&0!==t.avail_in||666===e.status&&i!==l)return C(t,0===t.avail_out?-5:d);if(e.strm=t,n=e.last_flush,e.last_flush=i,e.status===w)if(2===e.wrap)t.adler=0,N(e,31),N(e,139),N(e,8),e.gzhead?(N(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),N(e,255&e.gzhead.time),N(e,e.gzhead.time>>8&255),N(e,e.gzhead.time>>16&255),N(e,e.gzhead.time>>24&255),N(e,9===e.level?2:2<=e.strategy||e.level<2?4:0),N(e,255&e.gzhead.os),e.gzhead.extra&&e.gzhead.extra.length&&(N(e,255&e.gzhead.extra.length),N(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(t.adler=u(t.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=69):(N(e,0),N(e,0),N(e,0),N(e,0),N(e,0),N(e,9===e.level?2:2<=e.strategy||e.level<2?4:0),N(e,3),e.status=Y);else{var f=Z+(e.w_bits-8<<4)<<8;f|=(2<=e.strategy||e.level<2?0:e.level<6?1:6===e.level?2:3)<<6,0!==e.strstart&&(f|=32),f+=31-f%31,e.status=Y,H(e,f),0!==e.strstart&&(H(e,t.adler>>>16),H(e,65535&t.adler)),t.adler=1}if(69===e.status)if(e.gzhead.extra){for(s=e.pending;e.gzindex<(65535&e.gzhead.extra.length)&&(e.pending!==e.pending_buf_size||(e.gzhead.hcrc&&e.pending>s&&(t.adler=u(t.adler,e.pending_buf,e.pending-s,s)),L(t),s=e.pending,e.pending!==e.pending_buf_size));)N(e,255&e.gzhead.extra[e.gzindex]),e.gzindex++;e.gzhead.hcrc&&e.pending>s&&(t.adler=u(t.adler,e.pending_buf,e.pending-s,s)),e.gzindex===e.gzhead.extra.length&&(e.gzindex=0,e.status=73)}else e.status=73;if(73===e.status)if(e.gzhead.name){s=e.pending;do{if(e.pending===e.pending_buf_size&&(e.gzhead.hcrc&&e.pending>s&&(t.adler=u(t.adler,e.pending_buf,e.pending-s,s)),L(t),s=e.pending,e.pending===e.pending_buf_size)){c=1;break}c=e.gzindex<e.gzhead.name.length?255&e.gzhead.name.charCodeAt(e.gzindex++):0,N(e,c)}while(0!==c);e.gzhead.hcrc&&e.pending>s&&(t.adler=u(t.adler,e.pending_buf,e.pending-s,s)),0===c&&(e.gzindex=0,e.status=91)}else e.status=91;if(91===e.status)if(e.gzhead.comment){s=e.pending;do{if(e.pending===e.pending_buf_size&&(e.gzhead.hcrc&&e.pending>s&&(t.adler=u(t.adler,e.pending_buf,e.pending-s,s)),L(t),s=e.pending,e.pending===e.pending_buf_size)){c=1;break}c=e.gzindex<e.gzhead.comment.length?255&e.gzhead.comment.charCodeAt(e.gzindex++):0,N(e,c)}while(0!==c);e.gzhead.hcrc&&e.pending>s&&(t.adler=u(t.adler,e.pending_buf,e.pending-s,s)),0===c&&(e.status=103)}else e.status=103;if(103===e.status&&(e.gzhead.hcrc?(e.pending+2>e.pending_buf_size&&L(t),e.pending+2<=e.pending_buf_size&&(N(e,255&t.adler),N(e,t.adler>>8&255),t.adler=0,e.status=Y)):e.status=Y),0!==e.pending){if(L(t),0===t.avail_out)return e.last_flush=-1,h}else if(0===t.avail_in&&T(i)<=T(n)&&i!==l)return C(t,-5);if(666===e.status&&0!==t.avail_in)return C(t,-5);if(0!==t.avail_in||0!==e.lookahead||i!==a&&666!==e.status){var b=2===e.strategy?function(t,i){for(var n;;){if(0===t.lookahead&&(B(t),0===t.lookahead)){if(i===a)return S;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(x(t,!1),0===t.strm.avail_out))return S}return t.insert=0,i===l?(x(t,!0),0===t.strm.avail_out?R:k):t.last_lit&&(x(t,!1),0===t.strm.avail_out)?S:K}(e,i):3===e.strategy?function(t,i){for(var n,r,e,s,u=t.window;;){if(t.lookahead<=I){if(B(t),t.lookahead<=I&&i===a)return S;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=V&&0<t.strstart&&(r=u[e=t.strstart-1])===u[++e]&&r===u[++e]&&r===u[++e]){s=t.strstart+I;do{}while(r===u[++e]&&r===u[++e]&&r===u[++e]&&r===u[++e]&&r===u[++e]&&r===u[++e]&&r===u[++e]&&r===u[++e]&&e<s);t.match_length=I-(s-e),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=V?(n=o._tr_tally(t,1,t.match_length-V),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(x(t,!1),0===t.strm.avail_out))return S}return t.insert=0,i===l?(x(t,!0),0===t.strm.avail_out?R:k):t.last_lit&&(x(t,!1),0===t.strm.avail_out)?S:K}(e,i):r[e.level].func(e,i);if(b!==R&&b!==k||(e.status=666),b===S||b===R)return 0===t.avail_out&&(e.last_flush=-1),h;if(b===K&&(1===i?o._tr_align(e):5!==i&&(o._tr_stored_block(e,0,0,!1),3===i&&(J(e.head),0===e.lookahead&&(e.strstart=0,e.block_start=0,e.insert=0))),L(t),0===t.avail_out))return e.last_flush=-1,h}return i!==l?h:e.wrap<=0?1:(2===e.wrap?(N(e,255&t.adler),N(e,t.adler>>8&255),N(e,t.adler>>16&255),N(e,t.adler>>24&255),N(e,255&t.total_in),N(e,t.total_in>>8&255),N(e,t.total_in>>16&255),N(e,t.total_in>>24&255)):(H(e,t.adler>>>16),H(e,65535&t.adler)),L(t),0<e.wrap&&(e.wrap=-e.wrap),0!==e.pending?h:1)},n.deflateEnd=function(t){var i;return t&&t.state?(i=t.state.status)!==w&&69!==i&&73!==i&&91!==i&&103!==i&&i!==Y&&666!==i?C(t,d):(t.state=null,i===Y?C(t,-3):h):d},n.deflateSetDictionary=function(t,i){var n,r,o,u,c,a,l,f,b=i.length;if(!t||!t.state)return d;if(2===(u=(n=t.state).wrap)||1===u&&n.status!==w||n.lookahead)return d;for(1===u&&(t.adler=s(t.adler,i,b,0)),n.wrap=0,b>=n.w_size&&(0===u&&(J(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new e.Buf8(n.w_size),e.arraySet(f,i,b-n.w_size,n.w_size,0),i=f,b=n.w_size),c=t.avail_in,a=t.next_in,l=t.input,t.avail_in=b,t.next_in=0,t.input=i,B(n);n.lookahead>=V;){for(r=n.strstart,o=n.lookahead-(V-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+V-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--o;);n.strstart=r,n.lookahead=V-1,B(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=V-1,n.match_available=0,t.next_in=a,t.input=l,t.avail_in=c,n.wrap=u,h},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,i,n){"use strict";i.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,i,n){"use strict";i.exports=function(t,i){var n,r,e,o,s,u,c,a,l,h,d,f,b,m,Z,y,v,p,W,X,G,V,I,g,w;g=t.input,e=(r=t.next_in)+(t.avail_in-5),w=t.output,s=(o=t.next_out)-(i-t.avail_out),u=o+(t.avail_out-257),c=(n=t.state).dmax,a=n.wsize,l=n.whave,h=n.wnext,d=n.window,f=n.hold,b=n.bits,m=n.lencode,Z=n.distcode,y=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;t:do{b<15&&(f+=g[r++]<<b,f+=g[r++]<<(b+=8),b+=8),p=m[f&y];i:for(;;){if(f>>>=W=p>>>24,b-=W,0==(W=p>>>16&255))w[o++]=65535&p;else{if(!(16&W)){if(!(64&W)){p=m[(65535&p)+(f&(1<<W)-1)];continue i}if(32&W){n.mode=12;break t}t.msg="invalid literal/length code",n.mode=30;break t}X=65535&p,(W&=15)&&(b<W&&(f+=g[r++]<<b,b+=8),X+=f&(1<<W)-1,f>>>=W,b-=W),b<15&&(f+=g[r++]<<b,f+=g[r++]<<(b+=8),b+=8),p=Z[f&v];n:for(;;){if(f>>>=W=p>>>24,b-=W,!(16&(W=p>>>16&255))){if(!(64&W)){p=Z[(65535&p)+(f&(1<<W)-1)];continue n}t.msg="invalid distance code",n.mode=30;break t}if(G=65535&p,b<(W&=15)&&(f+=g[r++]<<b,(b+=8)<W&&(f+=g[r++]<<b,b+=8)),c<(G+=f&(1<<W)-1)){t.msg="invalid distance too far back",n.mode=30;break t}if(f>>>=W,b-=W,(W=o-s)<G){if(l<(W=G-W)&&n.sane){t.msg="invalid distance too far back",n.mode=30;break t}if(I=d,(V=0)===h){if(V+=a-W,W<X){for(X-=W;w[o++]=d[V++],--W;);V=o-G,I=w}}else if(h<W){if(V+=a+h-W,(W-=h)<X){for(X-=W;w[o++]=d[V++],--W;);if(V=0,h<X){for(X-=W=h;w[o++]=d[V++],--W;);V=o-G,I=w}}}else if(V+=h-W,W<X){for(X-=W;w[o++]=d[V++],--W;);V=o-G,I=w}for(;2<X;)w[o++]=I[V++],w[o++]=I[V++],w[o++]=I[V++],X-=3;X&&(w[o++]=I[V++],1<X&&(w[o++]=I[V++]))}else{for(V=o-G;w[o++]=w[V++],w[o++]=w[V++],w[o++]=w[V++],2<(X-=3););X&&(w[o++]=w[V++],1<X&&(w[o++]=w[V++]))}break}}break}}while(r<e&&o<u);r-=X=b>>3,f&=(1<<(b-=X<<3))-1,t.next_in=r,t.next_out=o,t.avail_in=r<e?e-r+5:5-(r-e),t.avail_out=o<u?u-o+257:257-(o-u),n.hold=f,n.bits=b}},{}],49:[function(t,i,n){"use strict";var r=t("../utils/common"),e=t("./adler32"),o=t("./crc32"),s=t("./inffast"),u=t("./inftrees"),c=1,a=2,l=0,h=-2,d=1,f=852,b=592;function m(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function Z(){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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(t){var i;return t&&t.state?(t.total_in=t.total_out=(i=t.state).total=0,t.msg="",i.wrap&&(t.adler=1&i.wrap),i.mode=d,i.last=0,i.havedict=0,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new r.Buf32(f),i.distcode=i.distdyn=new r.Buf32(b),i.sane=1,i.back=-1,l):h}function v(t){var i;return t&&t.state?((i=t.state).wsize=0,i.whave=0,i.wnext=0,y(t)):h}function p(t,i){var n,r;return t&&t.state?(r=t.state,i<0?(n=0,i=-i):(n=1+(i>>4),i<48&&(i&=15)),i&&(i<8||15<i)?h:(null!==r.window&&r.wbits!==i&&(r.window=null),r.wrap=n,r.wbits=i,v(t))):h}function W(t,i){var n,r;return t?(r=new Z,(t.state=r).window=null,(n=p(t,i))!==l&&(t.state=null),n):h}var X,G,V=!0;function I(t){if(V){var i;for(X=new r.Buf32(512),G=new r.Buf32(32),i=0;i<144;)t.lens[i++]=8;for(;i<256;)t.lens[i++]=9;for(;i<280;)t.lens[i++]=7;for(;i<288;)t.lens[i++]=8;for(u(c,t.lens,0,288,X,0,t.work,{bits:9}),i=0;i<32;)t.lens[i++]=5;u(a,t.lens,0,32,G,0,t.work,{bits:5}),V=!1}t.lencode=X,t.lenbits=9,t.distcode=G,t.distbits=5}function g(t,i,n,e){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new r.Buf8(s.wsize)),e>=s.wsize?(r.arraySet(s.window,i,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(e<(o=s.wsize-s.wnext)&&(o=e),r.arraySet(s.window,i,n-e,o,s.wnext),(e-=o)?(r.arraySet(s.window,i,n-e,e,0),s.wnext=e,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}n.inflateReset=v,n.inflateReset2=p,n.inflateResetKeep=y,n.inflateInit=function(t){return W(t,15)},n.inflateInit2=W,n.inflate=function(t,i){var n,f,b,Z,y,v,p,W,X,G,V,w,Y,S,K,R,k,C,T,J,L,x,N,H,F=0,B=new r.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return h;12===(n=t.state).mode&&(n.mode=13),y=t.next_out,b=t.output,Z=t.next_in,f=t.input,W=n.hold,X=n.bits,G=v=t.avail_in,V=p=t.avail_out,x=l;t:for(;;)switch(n.mode){case d:if(0===n.wrap){n.mode=13;break}for(;X<16;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if(2&n.wrap&&35615===W){B[n.check=0]=255&W,B[1]=W>>>8&255,n.check=o(n.check,B,2,0),X=W=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&W)<<8)+(W>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&W)){t.msg="unknown compression method",n.mode=30;break}if(X-=4,L=8+(15&(W>>>=4)),0===n.wbits)n.wbits=L;else if(L>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<<L,t.adler=n.check=1,n.mode=512&W?10:12,X=W=0;break;case 2:for(;X<16;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if(n.flags=W,8!=(255&n.flags)){t.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=W>>8&1),512&n.flags&&(B[0]=255&W,B[1]=W>>>8&255,n.check=o(n.check,B,2,0)),X=W=0,n.mode=3;case 3:for(;X<32;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}n.head&&(n.head.time=W),512&n.flags&&(B[0]=255&W,B[1]=W>>>8&255,B[2]=W>>>16&255,B[3]=W>>>24&255,n.check=o(n.check,B,4,0)),X=W=0,n.mode=4;case 4:for(;X<16;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}n.head&&(n.head.xflags=255&W,n.head.os=W>>8),512&n.flags&&(B[0]=255&W,B[1]=W>>>8&255,n.check=o(n.check,B,2,0)),X=W=0,n.mode=5;case 5:if(1024&n.flags){for(;X<16;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}n.length=W,n.head&&(n.head.extra_len=W),512&n.flags&&(B[0]=255&W,B[1]=W>>>8&255,n.check=o(n.check,B,2,0)),X=W=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(w=n.length)&&(w=v),w&&(n.head&&(L=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,Z,w,L)),512&n.flags&&(n.check=o(n.check,f,w,Z)),v-=w,Z+=w,n.length-=w),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===v)break t;for(w=0;L=f[Z+w++],n.head&&L&&n.length<65536&&(n.head.name+=String.fromCharCode(L)),L&&w<v;);if(512&n.flags&&(n.check=o(n.check,f,w,Z)),v-=w,Z+=w,L)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===v)break t;for(w=0;L=f[Z+w++],n.head&&L&&n.length<65536&&(n.head.comment+=String.fromCharCode(L)),L&&w<v;);if(512&n.flags&&(n.check=o(n.check,f,w,Z)),v-=w,Z+=w,L)break t}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;X<16;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if(W!==(65535&n.check)){t.msg="header crc mismatch",n.mode=30;break}X=W=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;X<32;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}t.adler=n.check=m(W),X=W=0,n.mode=11;case 11:if(0===n.havedict)return t.next_out=y,t.avail_out=p,t.next_in=Z,t.avail_in=v,n.hold=W,n.bits=X,2;t.adler=n.check=1,n.mode=12;case 12:if(5===i||6===i)break t;case 13:if(n.last){W>>>=7&X,X-=7&X,n.mode=27;break}for(;X<3;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}switch(n.last=1&W,X-=1,3&(W>>>=1)){case 0:n.mode=14;break;case 1:if(I(n),n.mode=20,6!==i)break;W>>>=2,X-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}W>>>=2,X-=2;break;case 14:for(W>>>=7&X,X-=7&X;X<32;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if((65535&W)!=(W>>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&W,X=W=0,n.mode=15,6===i)break t;case 15:n.mode=16;case 16:if(w=n.length){if(v<w&&(w=v),p<w&&(w=p),0===w)break t;r.arraySet(b,f,Z,w,y),v-=w,Z+=w,p-=w,y+=w,n.length-=w;break}n.mode=12;break;case 17:for(;X<14;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if(n.nlen=257+(31&W),X-=5,n.ndist=1+(31&(W>>>=5)),X-=5,n.ncode=4+(15&(W>>>=5)),W>>>=4,X-=4,286<n.nlen||30<n.ndist){t.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;X<3;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}n.lens[P[n.have++]]=7&W,W>>>=3,X-=3}for(;n.have<19;)n.lens[P[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,x=u(0,n.lens,0,19,n.lencode,0,n.work,N={bits:n.lenbits}),n.lenbits=N.bits,x){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;R=(F=n.lencode[W&(1<<n.lenbits)-1])>>>16&255,k=65535&F,!((K=F>>>24)<=X);){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if(k<16)W>>>=K,X-=K,n.lens[n.have++]=k;else{if(16===k){for(H=K+2;X<H;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if(W>>>=K,X-=K,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}L=n.lens[n.have-1],w=3+(3&W),W>>>=2,X-=2}else if(17===k){for(H=K+3;X<H;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}X-=K,L=0,w=3+(7&(W>>>=K)),W>>>=3,X-=3}else{for(H=K+7;X<H;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}X-=K,L=0,w=11+(127&(W>>>=K)),W>>>=7,X-=7}if(n.have+w>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;w--;)n.lens[n.have++]=L}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,x=u(c,n.lens,0,n.nlen,n.lencode,0,n.work,N={bits:n.lenbits}),n.lenbits=N.bits,x){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,x=u(a,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,N={bits:n.distbits}),n.distbits=N.bits,x){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===i)break t;case 20:n.mode=21;case 21:if(6<=v&&258<=p){t.next_out=y,t.avail_out=p,t.next_in=Z,t.avail_in=v,n.hold=W,n.bits=X,s(t,V),y=t.next_out,b=t.output,p=t.avail_out,Z=t.next_in,f=t.input,v=t.avail_in,W=n.hold,X=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;R=(F=n.lencode[W&(1<<n.lenbits)-1])>>>16&255,k=65535&F,!((K=F>>>24)<=X);){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if(R&&!(240&R)){for(C=K,T=R,J=k;R=(F=n.lencode[J+((W&(1<<C+T)-1)>>C)])>>>16&255,k=65535&F,!(C+(K=F>>>24)<=X);){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}W>>>=C,X-=C,n.back+=C}if(W>>>=K,X-=K,n.back+=K,n.length=k,0===R){n.mode=26;break}if(32&R){n.back=-1,n.mode=12;break}if(64&R){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&R,n.mode=22;case 22:if(n.extra){for(H=n.extra;X<H;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}n.length+=W&(1<<n.extra)-1,W>>>=n.extra,X-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;R=(F=n.distcode[W&(1<<n.distbits)-1])>>>16&255,k=65535&F,!((K=F>>>24)<=X);){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if(!(240&R)){for(C=K,T=R,J=k;R=(F=n.distcode[J+((W&(1<<C+T)-1)>>C)])>>>16&255,k=65535&F,!(C+(K=F>>>24)<=X);){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}W>>>=C,X-=C,n.back+=C}if(W>>>=K,X-=K,n.back+=K,64&R){t.msg="invalid distance code",n.mode=30;break}n.offset=k,n.extra=15&R,n.mode=24;case 24:if(n.extra){for(H=n.extra;X<H;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}n.offset+=W&(1<<n.extra)-1,W>>>=n.extra,X-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===p)break t;if(n.offset>(w=V-p)){if((w=n.offset-w)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}Y=w>n.wnext?n.wsize-(w-=n.wnext):n.wnext-w,w>n.length&&(w=n.length),S=n.window}else S=b,Y=y-n.offset,w=n.length;for(p<w&&(w=p),p-=w,n.length-=w;b[y++]=S[Y++],--w;);0===n.length&&(n.mode=21);break;case 26:if(0===p)break t;b[y++]=n.length,p--,n.mode=21;break;case 27:if(n.wrap){for(;X<32;){if(0===v)break t;v--,W|=f[Z++]<<X,X+=8}if(t.total_out+=V-=p,n.total+=V,V&&(t.adler=n.check=n.flags?o(n.check,b,V,y-V):e(n.check,b,V,y-V)),V=p,(n.flags?W:m(W))!==n.check){t.msg="incorrect data check",n.mode=30;break}X=W=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;X<32;){if(0===v)break t;v--,W+=f[Z++]<<X,X+=8}if(W!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=30;break}X=W=0}n.mode=29;case 29:x=1;break t;case 30:x=-3;break t;case 31:return-4;default:return h}return t.next_out=y,t.avail_out=p,t.next_in=Z,t.avail_in=v,n.hold=W,n.bits=X,(n.wsize||V!==t.avail_out&&n.mode<30&&(n.mode<27||4!==i))&&g(t,t.output,t.next_out,V-t.avail_out)?(n.mode=31,-4):(V-=t.avail_out,t.total_in+=G-=t.avail_in,t.total_out+=V,n.total+=V,n.wrap&&V&&(t.adler=n.check=n.flags?o(n.check,b,V,t.next_out-V):e(n.check,b,V,t.next_out-V)),t.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==G&&0===V||4===i)&&x===l&&(x=-5),x)},n.inflateEnd=function(t){if(!t||!t.state)return h;var i=t.state;return i.window&&(i.window=null),t.state=null,l},n.inflateGetHeader=function(t,i){var n;return t&&t.state&&2&(n=t.state).wrap?((n.head=i).done=!1,l):h},n.inflateSetDictionary=function(t,i){var n,r=i.length;return t&&t.state?0!==(n=t.state).wrap&&11!==n.mode?h:11===n.mode&&e(1,i,r,0)!==n.check?-3:g(t,i,r,r)?(n.mode=31,-4):(n.havedict=1,l):h},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,i,n){"use strict";var r=t("../utils/common"),e=[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],o=[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],s=[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],u=[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];i.exports=function(t,i,n,c,a,l,h,d){var f,b,m,Z,y,v,p,W,X,G=d.bits,V=0,I=0,g=0,w=0,Y=0,S=0,K=0,R=0,k=0,C=0,T=null,J=0,L=new r.Buf16(16),x=new r.Buf16(16),N=null,H=0;for(V=0;V<=15;V++)L[V]=0;for(I=0;I<c;I++)L[i[n+I]]++;for(Y=G,w=15;1<=w&&0===L[w];w--);if(w<Y&&(Y=w),0===w)return a[l++]=20971520,a[l++]=20971520,d.bits=1,0;for(g=1;g<w&&0===L[g];g++);for(Y<g&&(Y=g),V=R=1;V<=15;V++)if(R<<=1,(R-=L[V])<0)return-1;if(0<R&&(0===t||1!==w))return-1;for(x[1]=0,V=1;V<15;V++)x[V+1]=x[V]+L[V];for(I=0;I<c;I++)0!==i[n+I]&&(h[x[i[n+I]]++]=I);if(v=0===t?(T=N=h,19):1===t?(T=e,J-=257,N=o,H-=257,256):(T=s,N=u,-1),V=g,y=l,K=I=C=0,m=-1,Z=(k=1<<(S=Y))-1,1===t&&852<k||2===t&&592<k)return 1;for(;;){for(p=V-K,X=h[I]<v?(W=0,h[I]):h[I]>v?(W=N[H+h[I]],T[J+h[I]]):(W=96,0),f=1<<V-K,g=b=1<<S;a[y+(C>>K)+(b-=f)]=p<<24|W<<16|X,0!==b;);for(f=1<<V-1;C&f;)f>>=1;if(0!==f?(C&=f-1,C+=f):C=0,I++,0==--L[V]){if(V===w)break;V=i[n+h[I]]}if(Y<V&&(C&Z)!==m){for(0===K&&(K=Y),y+=g,R=1<<(S=V-K);S+K<w&&!((R-=L[S+K])<=0);)S++,R<<=1;if(k+=1<<S,1===t&&852<k||2===t&&592<k)return 1;a[m=C&Z]=Y<<24|S<<16|y-l}}return 0!==C&&(a[y+C]=V-K<<24|64<<16),d.bits=Y,0}},{"../utils/common":41}],51:[function(t,i,n){"use strict";i.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,i,n){"use strict";var r=t("../utils/common"),e=0,o=1;function s(t){for(var i=t.length;0<=--i;)t[i]=0}var u=0,c=29,a=256,l=a+1+c,h=30,d=19,f=2*l+1,b=15,m=16,Z=7,y=256,v=16,p=17,W=18,X=[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],G=[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],V=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],g=new Array(2*(l+2));s(g);var w=new Array(2*h);s(w);var Y=new Array(512);s(Y);var S=new Array(256);s(S);var K=new Array(c);s(K);var R,k,C,T=new Array(h);function J(t,i,n,r,e){this.static_tree=t,this.extra_bits=i,this.extra_base=n,this.elems=r,this.max_length=e,this.has_stree=t&&t.length}function L(t,i){this.dyn_tree=t,this.max_code=0,this.stat_desc=i}function x(t){return t<256?Y[t]:Y[256+(t>>>7)]}function N(t,i){t.pending_buf[t.pending++]=255&i,t.pending_buf[t.pending++]=i>>>8&255}function H(t,i,n){t.bi_valid>m-n?(t.bi_buf|=i<<t.bi_valid&65535,N(t,t.bi_buf),t.bi_buf=i>>m-t.bi_valid,t.bi_valid+=n-m):(t.bi_buf|=i<<t.bi_valid&65535,t.bi_valid+=n)}function F(t,i,n){H(t,n[2*i],n[2*i+1])}function B(t,i){for(var n=0;n|=1&t,t>>>=1,n<<=1,0<--i;);return n>>>1}function P(t,i,n){var r,e,o=new Array(b+1),s=0;for(r=1;r<=b;r++)o[r]=s=s+n[r-1]<<1;for(e=0;e<=i;e++){var u=t[2*e+1];0!==u&&(t[2*e]=B(o[u]++,u))}}function U(t){var i;for(i=0;i<l;i++)t.dyn_ltree[2*i]=0;for(i=0;i<h;i++)t.dyn_dtree[2*i]=0;for(i=0;i<d;i++)t.bl_tree[2*i]=0;t.dyn_ltree[2*y]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function z(t){8<t.bi_valid?N(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function M(t,i,n,r){var e=2*i,o=2*n;return t[e]<t[o]||t[e]===t[o]&&r[i]<=r[n]}function j(t,i,n){for(var r=t.heap[n],e=n<<1;e<=t.heap_len&&(e<t.heap_len&&M(i,t.heap[e+1],t.heap[e],t.depth)&&e++,!M(i,r,t.heap[e],t.depth));)t.heap[n]=t.heap[e],n=e,e<<=1;t.heap[n]=r}function Q(t,i,n){var r,e,o,s,u=0;if(0!==t.last_lit)for(;r=t.pending_buf[t.d_buf+2*u]<<8|t.pending_buf[t.d_buf+2*u+1],e=t.pending_buf[t.l_buf+u],u++,0===r?F(t,e,i):(F(t,(o=S[e])+a+1,i),0!==(s=X[o])&&H(t,e-=K[o],s),F(t,o=x(--r),n),0!==(s=G[o])&&H(t,r-=T[o],s)),u<t.last_lit;);F(t,y,i)}function E(t,i){var n,r,e,o=i.dyn_tree,s=i.stat_desc.static_tree,u=i.stat_desc.has_stree,c=i.stat_desc.elems,a=-1;for(t.heap_len=0,t.heap_max=f,n=0;n<c;n++)0!==o[2*n]?(t.heap[++t.heap_len]=a=n,t.depth[n]=0):o[2*n+1]=0;for(;t.heap_len<2;)o[2*(e=t.heap[++t.heap_len]=a<2?++a:0)]=1,t.depth[e]=0,t.opt_len--,u&&(t.static_len-=s[2*e+1]);for(i.max_code=a,n=t.heap_len>>1;1<=n;n--)j(t,o,n);for(e=c;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],j(t,o,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,o[2*e]=o[2*n]+o[2*r],t.depth[e]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,o[2*n+1]=o[2*r+1]=e,t.heap[1]=e++,j(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,i){var n,r,e,o,s,u,c=i.dyn_tree,a=i.max_code,l=i.stat_desc.static_tree,h=i.stat_desc.has_stree,d=i.stat_desc.extra_bits,m=i.stat_desc.extra_base,Z=i.stat_desc.max_length,y=0;for(o=0;o<=b;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<f;n++)Z<(o=c[2*c[2*(r=t.heap[n])+1]+1]+1)&&(o=Z,y++),c[2*r+1]=o,a<r||(t.bl_count[o]++,s=0,m<=r&&(s=d[r-m]),t.opt_len+=(u=c[2*r])*(o+s),h&&(t.static_len+=u*(l[2*r+1]+s)));if(0!==y){do{for(o=Z-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[Z]--,y-=2}while(0<y);for(o=Z;0!==o;o--)for(r=t.bl_count[o];0!==r;)a<(e=t.heap[--n])||(c[2*e+1]!==o&&(t.opt_len+=(o-c[2*e+1])*c[2*e],c[2*e+1]=o),r--)}}(t,i),P(o,a,t.bl_count)}function D(t,i,n){var r,e,o=-1,s=i[1],u=0,c=7,a=4;for(0===s&&(c=138,a=3),i[2*(n+1)+1]=65535,r=0;r<=n;r++)e=s,s=i[2*(r+1)+1],++u<c&&e===s||(u<a?t.bl_tree[2*e]+=u:0!==e?(e!==o&&t.bl_tree[2*e]++,t.bl_tree[2*v]++):u<=10?t.bl_tree[2*p]++:t.bl_tree[2*W]++,o=e,a=(u=0)===s?(c=138,3):e===s?(c=6,3):(c=7,4))}function A(t,i,n){var r,e,o=-1,s=i[1],u=0,c=7,a=4;for(0===s&&(c=138,a=3),r=0;r<=n;r++)if(e=s,s=i[2*(r+1)+1],!(++u<c&&e===s)){if(u<a)for(;F(t,e,t.bl_tree),0!=--u;);else 0!==e?(e!==o&&(F(t,e,t.bl_tree),u--),F(t,v,t.bl_tree),H(t,u-3,2)):u<=10?(F(t,p,t.bl_tree),H(t,u-3,3)):(F(t,W,t.bl_tree),H(t,u-11,7));o=e,a=(u=0)===s?(c=138,3):e===s?(c=6,3):(c=7,4)}}s(T);var O=!1;function _(t,i,n,e){H(t,(u<<1)+(e?1:0),3),function(t,i,n,e){z(t),e&&(N(t,n),N(t,~n)),r.arraySet(t.pending_buf,t.window,i,n,t.pending),t.pending+=n}(t,i,n,!0)}n._tr_init=function(t){O||(function(){var t,i,n,r,e,o=new Array(b+1);for(r=n=0;r<c-1;r++)for(K[r]=n,t=0;t<1<<X[r];t++)S[n++]=r;for(S[n-1]=r,r=e=0;r<16;r++)for(T[r]=e,t=0;t<1<<G[r];t++)Y[e++]=r;for(e>>=7;r<h;r++)for(T[r]=e<<7,t=0;t<1<<G[r]-7;t++)Y[256+e++]=r;for(i=0;i<=b;i++)o[i]=0;for(t=0;t<=143;)g[2*t+1]=8,t++,o[8]++;for(;t<=255;)g[2*t+1]=9,t++,o[9]++;for(;t<=279;)g[2*t+1]=7,t++,o[7]++;for(;t<=287;)g[2*t+1]=8,t++,o[8]++;for(P(g,l+1,o),t=0;t<h;t++)w[2*t+1]=5,w[2*t]=B(t,5);R=new J(g,X,a+1,l,b),k=new J(w,G,0,h,b),C=new J(new Array(0),V,0,d,Z)}(),O=!0),t.l_desc=new L(t.dyn_ltree,R),t.d_desc=new L(t.dyn_dtree,k),t.bl_desc=new L(t.bl_tree,C),t.bi_buf=0,t.bi_valid=0,U(t)},n._tr_stored_block=_,n._tr_flush_block=function(t,i,n,r){var s,u,c=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var i,n=4093624447;for(i=0;i<=31;i++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*i])return e;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(i=32;i<a;i++)if(0!==t.dyn_ltree[2*i])return o;return e}(t)),E(t,t.l_desc),E(t,t.d_desc),c=function(t){var i;for(D(t,t.dyn_ltree,t.l_desc.max_code),D(t,t.dyn_dtree,t.d_desc.max_code),E(t,t.bl_desc),i=d-1;3<=i&&0===t.bl_tree[2*I[i]+1];i--);return t.opt_len+=3*(i+1)+5+5+4,i}(t),(u=t.static_len+3+7>>>3)<=(s=t.opt_len+3+7>>>3)&&(s=u)):s=u=n+5,n+4<=s&&-1!==i?_(t,i,n,r):4===t.strategy||u===s?(H(t,2+(r?1:0),3),Q(t,g,w)):(H(t,4+(r?1:0),3),function(t,i,n,r){var e;for(H(t,i-257,5),H(t,n-1,5),H(t,r-4,4),e=0;e<r;e++)H(t,t.bl_tree[2*I[e]+1],3);A(t,t.dyn_ltree,i-1),A(t,t.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,c+1),Q(t,t.dyn_ltree,t.dyn_dtree)),U(t),r&&z(t)},n._tr_tally=function(t,i,n){return t.pending_buf[t.d_buf+2*t.last_lit]=i>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&i,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===i?t.dyn_ltree[2*n]++:(t.matches++,i--,t.dyn_ltree[2*(S[n]+a+1)]++,t.dyn_dtree[2*x(i)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){H(t,2,3),F(t,y,g),function(t){16===t.bi_valid?(N(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,i,n){"use strict";i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,r){(function(t){!function(t,i){"use strict";if(!t.setImmediate){var n,r,e,o,s=1,u={},c=!1,a=t.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(t);l=l&&l.setTimeout?l:t,n="[object process]"==={}.toString.call(t.process)?function(t){process.nextTick(function(){d(t)})}:function(){if(t.postMessage&&!t.importScripts){var i=!0,n=t.onmessage;return t.onmessage=function(){i=!1},t.postMessage("","*"),t.onmessage=n,i}}()?(o="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",f,!1):t.attachEvent("onmessage",f),function(i){t.postMessage(o+i,"*")}):t.MessageChannel?((e=new MessageChannel).port1.onmessage=function(t){d(t.data)},function(t){e.port2.postMessage(t)}):a&&"onreadystatechange"in a.createElement("script")?(r=a.documentElement,function(t){var i=a.createElement("script");i.onreadystatechange=function(){d(t),i.onreadystatechange=null,r.removeChild(i),i=null},r.appendChild(i)}):function(t){setTimeout(d,0,t)},l.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var i=new Array(arguments.length-1),r=0;r<i.length;r++)i[r]=arguments[r+1];return u[s]={callback:t,args:i},n(s),s++},l.clearImmediate=h}function h(t){delete u[t]}function d(t){if(c)setTimeout(d,0,t);else{var n=u[t];if(n){c=!0;try{!function(t){var n=t.callback,r=t.args;switch(r.length){case 0:n();break;case 1:n(r[0]);break;case 2:n(r[0],r[1]);break;case 3:n(r[0],r[1],r[2]);break;default:n.apply(i,r)}}(n)}finally{h(t),c=!1}}}}function f(i){i.source===t&&"string"==typeof i.data&&0===i.data.indexOf(o)&&d(+i.data.slice(o.length))}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},2073:function(t,i,n){var r;t.exports=(r=n(9021),n(7165),r.pad.AnsiX923={pad:function(t,i){var n=t.sigBytes,r=4*i,e=r-n%r,o=n+e-1;t.clamp(),t.words[o>>>2]|=e<<24-o%4*8,t.sigBytes+=e},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},r.pad.Ansix923)},2155:function(t,i,n){var r;t.exports=(r=n(9021),n(7165),r.pad.ZeroPadding={pad:function(t,i){var n=4*i;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){var i=t.words,n=t.sigBytes-1;for(n=t.sigBytes-1;n>=0;n--)if(i[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},r.pad.ZeroPadding)},2169:function(t,i,n){var r;t.exports=(r=n(9021),n(7165),r.mode.CFB=function(){var t=r.lib.BlockCipherMode.extend();function i(t,i,n,r){var e,o=this._iv;o?(e=o.slice(0),this._iv=void 0):e=this._prevBlock,r.encryptBlock(e,0);for(var s=0;s<n;s++)t[i+s]^=e[s]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,e=r.blockSize;i.call(this,t,n,e,r),this._prevBlock=t.slice(n,n+e)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,e=r.blockSize,o=t.slice(n,n+e);i.call(this,t,n,e,r),this._prevBlock=o}}),t}(),r.mode.CFB)},2696:function(t,i,n){var r;t.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var t=r,i=t.lib.StreamCipher,n=[],e=[],o=[],s=t.algo.RabbitLegacy=i.extend({_doReset:function(){var t=this._key.words,i=this.cfg.iv,n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var e=0;e<4;e++)u.call(this);for(e=0;e<8;e++)r[e]^=n[e+4&7];if(i){var o=i.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=a>>>16|4294901760&l,d=l<<16|65535&a;for(r[0]^=a,r[1]^=h,r[2]^=l,r[3]^=d,r[4]^=a,r[5]^=h,r[6]^=l,r[7]^=d,e=0;e<4;e++)u.call(this)}},_doProcessBlock:function(t,i){var r=this._X;u.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var e=0;e<4;e++)n[e]=16711935&(n[e]<<8|n[e]>>>24)|4278255360&(n[e]<<24|n[e]>>>8),t[i+e]^=n[e]},blockSize:4,ivSize:2});function u(){for(var t=this._X,i=this._C,n=0;n<8;n++)e[n]=i[n];for(i[0]=i[0]+1295307597+this._b|0,i[1]=i[1]+3545052371+(i[0]>>>0<e[0]>>>0?1:0)|0,i[2]=i[2]+886263092+(i[1]>>>0<e[1]>>>0?1:0)|0,i[3]=i[3]+1295307597+(i[2]>>>0<e[2]>>>0?1:0)|0,i[4]=i[4]+3545052371+(i[3]>>>0<e[3]>>>0?1:0)|0,i[5]=i[5]+886263092+(i[4]>>>0<e[4]>>>0?1:0)|0,i[6]=i[6]+1295307597+(i[5]>>>0<e[5]>>>0?1:0)|0,i[7]=i[7]+3545052371+(i[6]>>>0<e[6]>>>0?1:0)|0,this._b=i[7]>>>0<e[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+i[n],s=65535&r,u=r>>>16;o[n]=((s*s>>>17)+s*u>>>15)+u*u^((4294901760&r)*r|0)+((65535&r)*r|0)}t[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,t[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,t[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,t[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,t[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,t[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,t[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,t[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.RabbitLegacy=i._createHelper(s)}(),r.RabbitLegacy)},3009:function(t,i,n){var r;t.exports=(r=n(9021),function(t){var i=r,n=i.lib,e=n.WordArray,o=n.Hasher,s=i.algo,u=[],c=[];!function(){function i(i){for(var n=t.sqrt(i),r=2;r<=n;r++)if(!(i%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,e=0;e<64;)i(r)&&(e<8&&(u[e]=n(t.pow(r,.5))),c[e]=n(t.pow(r,1/3)),e++),r++}();var a=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new e.init(u.slice(0))},_doProcessBlock:function(t,i){for(var n=this._hash.words,r=n[0],e=n[1],o=n[2],s=n[3],u=n[4],l=n[5],h=n[6],d=n[7],f=0;f<64;f++){if(f<16)a[f]=0|t[i+f];else{var b=a[f-15],m=a[f-2];a[f]=((b<<25|b>>>7)^(b<<14|b>>>18)^b>>>3)+a[f-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+a[f-16]}var Z=r&e^r&o^e&o,y=d+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&l^~u&h)+c[f]+a[f];d=h,h=l,l=u,u=s+y|0,s=o,o=e,e=r,r=y+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+Z)|0}n[0]=n[0]+r|0,n[1]=n[1]+e|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0,n[5]=n[5]+l|0,n[6]=n[6]+h|0,n[7]=n[7]+d|0},_doFinalize:function(){var i=this._data,n=i.words,r=8*this._nDataBytes,e=8*i.sigBytes;return n[e>>>5]|=128<<24-e%32,n[14+(e+64>>>9<<4)]=t.floor(r/4294967296),n[15+(e+64>>>9<<4)]=r,i.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});i.SHA256=o._createHelper(l),i.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)},3128:function(t,i,n){var r;t.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var t=r,i=t.lib.BlockCipher;const n=16,e=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function u(t,i){let n=t.sbox[0][i>>24&255]+t.sbox[1][i>>16&255];return n^=t.sbox[2][i>>8&255],n+=t.sbox[3][255&i],n}function c(t,i,r){let e,o=i,s=r;for(let i=0;i<n;++i)o^=t.pbox[i],s=u(t,o)^s,e=o,o=s,s=e;return e=o,o=s,s=e,s^=t.pbox[n],o^=t.pbox[n+1],{left:o,right:s}}function a(t,i,r){let e,o=i,s=r;for(let i=n+1;i>1;--i)o^=t.pbox[i],s=u(t,o)^s,e=o,o=s,s=e;return e=o,o=s,s=e,s^=t.pbox[1],o^=t.pbox[0],{left:o,right:s}}function l(t,i,r){for(let i=0;i<4;i++){t.sbox[i]=[];for(let n=0;n<256;n++)t.sbox[i][n]=o[i][n]}let s=0;for(let o=0;o<n+2;o++)t.pbox[o]=e[o]^i[s],s++,s>=r&&(s=0);let u=0,a=0,l=0;for(let i=0;i<n+2;i+=2)l=c(t,u,a),u=l.left,a=l.right,t.pbox[i]=u,t.pbox[i+1]=a;for(let i=0;i<4;i++)for(let n=0;n<256;n+=2)l=c(t,u,a),u=l.left,a=l.right,t.sbox[i][n]=u,t.sbox[i][n+1]=a;return!0}var h=t.algo.Blowfish=i.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var t=this._keyPriorReset=this._key;l(s,t.words,t.sigBytes/4)}},encryptBlock:function(t,i){var n=c(s,t[i],t[i+1]);t[i]=n.left,t[i+1]=n.right},decryptBlock:function(t,i){var n=a(s,t[i],t[i+1]);t[i]=n.left,t[i+1]=n.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=i._createHelper(h)}(),r.Blowfish)},3240:function(t,i,n){var r;t.exports=(r=n(9021),function(t){var i=r.lib,n=i.Base,e=i.WordArray,o=r.x64={};o.Word=n.extend({init:function(t,i){this.high=t,this.low=i}}),o.WordArray=n.extend({init:function(i,n){i=this.words=i||[],this.sigBytes=n!=t?n:8*i.length},toX32:function(){for(var t=this.words,i=t.length,n=[],r=0;r<i;r++){var o=t[r];n.push(o.high),n.push(o.low)}return e.create(n,this.sigBytes)},clone:function(){for(var t=n.clone.call(this),i=t.words=this.words.slice(0),r=i.length,e=0;e<r;e++)i[e]=i[e].clone();return t}})}(),r)},3797:function(t,i,n){var r,e,o;t.exports=(o=n(9021),n(7165),o.mode.OFB=(r=o.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,i){var n=this._cipher,r=n.blockSize,e=this._iv,o=this._keystream;e&&(o=this._keystream=e.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var s=0;s<r;s++)t[i+s]^=o[s]}}),r.Decryptor=e,r),o.mode.OFB)},4636:function(t,i,n){var r;t.exports=(r=n(9021),function(t){var i=r,n=i.lib,e=n.WordArray,o=n.Hasher,s=i.algo,u=[];!function(){for(var i=0;i<64;i++)u[i]=4294967296*t.abs(t.sin(i+1))|0}();var c=s.MD5=o.extend({_doReset:function(){this._hash=new e.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,i){for(var n=0;n<16;n++){var r=i+n,e=t[r];t[r]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this._hash.words,s=t[i+0],c=t[i+1],f=t[i+2],b=t[i+3],m=t[i+4],Z=t[i+5],y=t[i+6],v=t[i+7],p=t[i+8],W=t[i+9],X=t[i+10],G=t[i+11],V=t[i+12],I=t[i+13],g=t[i+14],w=t[i+15],Y=o[0],S=o[1],K=o[2],R=o[3];Y=a(Y,S,K,R,s,7,u[0]),R=a(R,Y,S,K,c,12,u[1]),K=a(K,R,Y,S,f,17,u[2]),S=a(S,K,R,Y,b,22,u[3]),Y=a(Y,S,K,R,m,7,u[4]),R=a(R,Y,S,K,Z,12,u[5]),K=a(K,R,Y,S,y,17,u[6]),S=a(S,K,R,Y,v,22,u[7]),Y=a(Y,S,K,R,p,7,u[8]),R=a(R,Y,S,K,W,12,u[9]),K=a(K,R,Y,S,X,17,u[10]),S=a(S,K,R,Y,G,22,u[11]),Y=a(Y,S,K,R,V,7,u[12]),R=a(R,Y,S,K,I,12,u[13]),K=a(K,R,Y,S,g,17,u[14]),Y=l(Y,S=a(S,K,R,Y,w,22,u[15]),K,R,c,5,u[16]),R=l(R,Y,S,K,y,9,u[17]),K=l(K,R,Y,S,G,14,u[18]),S=l(S,K,R,Y,s,20,u[19]),Y=l(Y,S,K,R,Z,5,u[20]),R=l(R,Y,S,K,X,9,u[21]),K=l(K,R,Y,S,w,14,u[22]),S=l(S,K,R,Y,m,20,u[23]),Y=l(Y,S,K,R,W,5,u[24]),R=l(R,Y,S,K,g,9,u[25]),K=l(K,R,Y,S,b,14,u[26]),S=l(S,K,R,Y,p,20,u[27]),Y=l(Y,S,K,R,I,5,u[28]),R=l(R,Y,S,K,f,9,u[29]),K=l(K,R,Y,S,v,14,u[30]),Y=h(Y,S=l(S,K,R,Y,V,20,u[31]),K,R,Z,4,u[32]),R=h(R,Y,S,K,p,11,u[33]),K=h(K,R,Y,S,G,16,u[34]),S=h(S,K,R,Y,g,23,u[35]),Y=h(Y,S,K,R,c,4,u[36]),R=h(R,Y,S,K,m,11,u[37]),K=h(K,R,Y,S,v,16,u[38]),S=h(S,K,R,Y,X,23,u[39]),Y=h(Y,S,K,R,I,4,u[40]),R=h(R,Y,S,K,s,11,u[41]),K=h(K,R,Y,S,b,16,u[42]),S=h(S,K,R,Y,y,23,u[43]),Y=h(Y,S,K,R,W,4,u[44]),R=h(R,Y,S,K,V,11,u[45]),K=h(K,R,Y,S,w,16,u[46]),Y=d(Y,S=h(S,K,R,Y,f,23,u[47]),K,R,s,6,u[48]),R=d(R,Y,S,K,v,10,u[49]),K=d(K,R,Y,S,g,15,u[50]),S=d(S,K,R,Y,Z,21,u[51]),Y=d(Y,S,K,R,V,6,u[52]),R=d(R,Y,S,K,b,10,u[53]),K=d(K,R,Y,S,X,15,u[54]),S=d(S,K,R,Y,c,21,u[55]),Y=d(Y,S,K,R,p,6,u[56]),R=d(R,Y,S,K,w,10,u[57]),K=d(K,R,Y,S,y,15,u[58]),S=d(S,K,R,Y,I,21,u[59]),Y=d(Y,S,K,R,m,6,u[60]),R=d(R,Y,S,K,G,10,u[61]),K=d(K,R,Y,S,f,15,u[62]),S=d(S,K,R,Y,W,21,u[63]),o[0]=o[0]+Y|0,o[1]=o[1]+S|0,o[2]=o[2]+K|0,o[3]=o[3]+R|0},_doFinalize:function(){var i=this._data,n=i.words,r=8*this._nDataBytes,e=8*i.sigBytes;n[e>>>5]|=128<<24-e%32;var o=t.floor(r/4294967296),s=r;n[15+(e+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(e+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),i.sigBytes=4*(n.length+1),this._process();for(var u=this._hash,c=u.words,a=0;a<4;a++){var l=c[a];c[a]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return u},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function a(t,i,n,r,e,o,s){var u=t+(i&n|~i&r)+e+s;return(u<<o|u>>>32-o)+i}function l(t,i,n,r,e,o,s){var u=t+(i&r|n&~r)+e+s;return(u<<o|u>>>32-o)+i}function h(t,i,n,r,e,o,s){var u=t+(i^n^r)+e+s;return(u<<o|u>>>32-o)+i}function d(t,i,n,r,e,o,s){var u=t+(n^(i|~r))+e+s;return(u<<o|u>>>32-o)+i}i.MD5=o._createHelper(c),i.HmacMD5=o._createHmacHelper(c)}(Math),r.MD5)},4725:function(t,i,n){var r;t.exports=(r=n(9021),function(){var t=r.lib.WordArray;function i(i,n,r){for(var e=[],o=0,s=0;s<n;s++)if(s%4){var u=r[i.charCodeAt(s-1)]<<s%4*2,c=r[i.charCodeAt(s)]>>>6-s%4*2;e[o>>>2]|=(u|c)<<24-o%4*8,o++}return t.create(e,o)}r.enc.Base64url={stringify:function(t,i){void 0===i&&(i=!0);var n=t.words,r=t.sigBytes,e=i?this._safe_map:this._map;t.clamp();for(var o=[],s=0;s<r;s+=3)for(var u=(n[s>>>2]>>>24-s%4*8&255)<<16|(n[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|n[s+2>>>2]>>>24-(s+2)%4*8&255,c=0;c<4&&s+.75*c<r;c++)o.push(e.charAt(u>>>6*(3-c)&63));var a=e.charAt(64);if(a)for(;o.length%4;)o.push(a);return o.join("")},parse:function(t,n){void 0===n&&(n=!0);var r=t.length,e=n?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var s=0;s<e.length;s++)o[e.charCodeAt(s)]=s}var u=e.charAt(64);if(u){var c=t.indexOf(u);-1!==c&&(r=c)}return i(t,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),r.enc.Base64url)},4905:function(t,i,n){var r;t.exports=(r=n(9021),n(7165),r.pad.Iso10126={pad:function(t,i){var n=4*i,e=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(e-1)).concat(r.lib.WordArray.create([e<<24],1))},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},r.pad.Iso10126)},5471:function(t,i,n){var r,e,o,s,u,c,a;t.exports=(a=n(9021),o=(e=(r=a).lib).WordArray,u=[],c=r.algo.SHA1=(s=e.Hasher).extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,i){for(var n=this._hash.words,r=n[0],e=n[1],o=n[2],s=n[3],c=n[4],a=0;a<80;a++){if(a<16)u[a]=0|t[i+a];else{var l=u[a-3]^u[a-8]^u[a-14]^u[a-16];u[a]=l<<1|l>>>31}var h=(r<<5|r>>>27)+c+u[a];h+=a<20?1518500249+(e&o|~e&s):a<40?1859775393+(e^o^s):a<60?(e&o|e&s|o&s)-1894007588:(e^o^s)-899497514,c=s,s=o,o=e<<30|e>>>2,e=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+e|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),i[15+(r+64>>>9<<4)]=n,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=s._createHelper(c),r.HmacSHA1=s._createHmacHelper(c),a.SHA1)},5503:function(t,i,n){var r;t.exports=(r=n(9021),function(){var t=r.lib.WordArray,i=r.enc;function n(t){return t<<8&4278255360|t>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(t){for(var i=t.words,n=t.sigBytes,r=[],e=0;e<n;e+=2)r.push(String.fromCharCode(i[e>>>2]>>>16-e%4*8&65535));return r.join("")},parse:function(i){for(var n=i.length,r=[],e=0;e<n;e++)r[e>>>1]|=i.charCodeAt(e)<<16-e%2*16;return t.create(r,2*n)}},i.Utf16LE={stringify:function(t){for(var i=t.words,r=t.sigBytes,e=[],o=0;o<r;o+=2){var s=n(i[o>>>2]>>>16-o%4*8&65535);e.push(String.fromCharCode(s))}return e.join("")},parse:function(i){for(var r=i.length,e=[],o=0;o<r;o++)e[o>>>1]|=n(i.charCodeAt(o)<<16-o%2*16);return t.create(e,2*r)}}}(),r.enc.Utf16)},5953:function(t,i,n){var r;t.exports=(r=n(9021),n(3240),function(t){var i=r,n=i.lib,e=n.WordArray,o=n.Hasher,s=i.x64.Word,u=i.algo,c=[],a=[],l=[];!function(){for(var t=1,i=0,n=0;n<24;n++){c[t+5*i]=(n+1)*(n+2)/2%64;var r=(2*t+3*i)%5;t=i%5,i=r}for(t=0;t<5;t++)for(i=0;i<5;i++)a[t+5*i]=i+(2*t+3*i)%5*5;for(var e=1,o=0;o<24;o++){for(var u=0,h=0,d=0;d<7;d++){if(1&e){var f=(1<<d)-1;f<32?h^=1<<f:u^=1<<f-32}128&e?e=e<<1^113:e<<=1}l[o]=s.create(u,h)}}();var h=[];!function(){for(var t=0;t<25;t++)h[t]=s.create()}();var d=u.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],i=0;i<25;i++)t[i]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,i){for(var n=this._state,r=this.blockSize/2,e=0;e<r;e++){var o=t[i+2*e],s=t[i+2*e+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(k=n[e]).high^=s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),k.low^=o}for(var u=0;u<24;u++){for(var d=0;d<5;d++){for(var f=0,b=0,m=0;m<5;m++)f^=(k=n[d+5*m]).high,b^=k.low;var Z=h[d];Z.high=f,Z.low=b}for(d=0;d<5;d++){var y=h[(d+4)%5],v=h[(d+1)%5],p=v.high,W=v.low;for(f=y.high^(p<<1|W>>>31),b=y.low^(W<<1|p>>>31),m=0;m<5;m++)(k=n[d+5*m]).high^=f,k.low^=b}for(var X=1;X<25;X++){var G=(k=n[X]).high,V=k.low,I=c[X];I<32?(f=G<<I|V>>>32-I,b=V<<I|G>>>32-I):(f=V<<I-32|G>>>64-I,b=G<<I-32|V>>>64-I);var g=h[a[X]];g.high=f,g.low=b}var w=h[0],Y=n[0];for(w.high=Y.high,w.low=Y.low,d=0;d<5;d++)for(m=0;m<5;m++){var S=h[X=d+5*m],K=h[(d+1)%5+5*m],R=h[(d+2)%5+5*m];(k=n[X]).high=S.high^~K.high&R.high,k.low=S.low^~K.low&R.low}var k,C=l[u];(k=n[0]).high^=C.high,k.low^=C.low}},_doFinalize:function(){var i=this._data,n=i.words,r=8*i.sigBytes,o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/o)*o>>>5)-1]|=128,i.sigBytes=4*n.length,this._process();for(var s=this._state,u=this.cfg.outputLength/8,c=u/8,a=[],l=0;l<c;l++){var h=s[l],d=h.high,f=h.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),a.push(f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)),a.push(d)}return new e.init(a,u)},clone:function(){for(var t=o.clone.call(this),i=t._state=this._state.slice(0),n=0;n<25;n++)i[n]=i[n].clone();return t}});i.SHA3=o._createHelper(d),i.HmacSHA3=o._createHmacHelper(d)}(Math),r.SHA3)},6298:function(t,i,n){var r;t.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var t=r,i=t.lib.StreamCipher,n=[],e=[],o=[],s=t.algo.Rabbit=i.extend({_doReset:function(){for(var t=this._key.words,i=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],e=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)u.call(this);for(n=0;n<8;n++)e[n]^=r[n+4&7];if(i){var o=i.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=a>>>16|4294901760&l,d=l<<16|65535&a;for(e[0]^=a,e[1]^=h,e[2]^=l,e[3]^=d,e[4]^=a,e[5]^=h,e[6]^=l,e[7]^=d,n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(t,i){var r=this._X;u.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var e=0;e<4;e++)n[e]=16711935&(n[e]<<8|n[e]>>>24)|4278255360&(n[e]<<24|n[e]>>>8),t[i+e]^=n[e]},blockSize:4,ivSize:2});function u(){for(var t=this._X,i=this._C,n=0;n<8;n++)e[n]=i[n];for(i[0]=i[0]+1295307597+this._b|0,i[1]=i[1]+3545052371+(i[0]>>>0<e[0]>>>0?1:0)|0,i[2]=i[2]+886263092+(i[1]>>>0<e[1]>>>0?1:0)|0,i[3]=i[3]+1295307597+(i[2]>>>0<e[2]>>>0?1:0)|0,i[4]=i[4]+3545052371+(i[3]>>>0<e[3]>>>0?1:0)|0,i[5]=i[5]+886263092+(i[4]>>>0<e[4]>>>0?1:0)|0,i[6]=i[6]+1295307597+(i[5]>>>0<e[5]>>>0?1:0)|0,i[7]=i[7]+3545052371+(i[6]>>>0<e[6]>>>0?1:0)|0,this._b=i[7]>>>0<e[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+i[n],s=65535&r,u=r>>>16;o[n]=((s*s>>>17)+s*u>>>15)+u*u^((4294901760&r)*r|0)+((65535&r)*r|0)}t[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,t[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,t[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,t[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,t[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,t[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,t[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,t[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.Rabbit=i._createHelper(s)}(),r.Rabbit)},6308:function(t,i,n){var r,e,o,s,u,c;t.exports=(c=n(9021),n(3009),e=(r=c).lib.WordArray,u=(o=r.algo).SHA224=(s=o.SHA256).extend({_doReset:function(){this._hash=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=s._doFinalize.call(this);return t.sigBytes-=4,t}}),r.SHA224=s._createHelper(u),r.HmacSHA224=s._createHmacHelper(u),c.SHA224)},6372:function(t,i,n){var r;t.exports=(r=n(9021),n(7165),
/** @preserve
	 * Counter block mode compatible with  Dr Brian Gladman fileenc.c
	 * derived from CryptoJS.mode.CTR
	 * Jan Hruby jhruby.web@gmail.com
	 */
r.mode.CTRGladman=function(){var t=r.lib.BlockCipherMode.extend();function i(t){if(255&~(t>>24))t+=1<<24;else{var i=t>>16&255,n=t>>8&255,r=255&t;255===i?(i=0,255===n?(n=0,255===r?r=0:++r):++n):++i,t=0,t+=i<<16,t+=n<<8,t+=r}return t}function n(t){return 0===(t[0]=i(t[0]))&&(t[1]=i(t[1])),t}var e=t.Encryptor=t.extend({processBlock:function(t,i){var r=this._cipher,e=r.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),n(s);var u=s.slice(0);r.encryptBlock(u,0);for(var c=0;c<e;c++)t[i+c]^=u[c]}});return t.Decryptor=e,t}(),r.mode.CTRGladman)},6440:function(t,i,n){var r;t.exports=(r=n(9021),function(){if("function"==typeof ArrayBuffer){var t=r.lib.WordArray,i=t.init,n=t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var n=t.byteLength,r=[],e=0;e<n;e++)r[e>>>2]|=t[e]<<24-e%4*8;i.call(this,r,n)}else i.apply(this,arguments)};n.prototype=t}}(),r.lib.WordArray)},6939:function(t,i,n){var r,e,o;t.exports=(o=n(9021),n(7165),o.mode.CTR=(r=o.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,i){var n=this._cipher,r=n.blockSize,e=this._iv,o=this._counter;e&&(o=this._counter=e.slice(0),this._iv=void 0);var s=o.slice(0);n.encryptBlock(s,0),o[r-1]=o[r-1]+1|0;for(var u=0;u<r;u++)t[i+u]^=s[u]}}),r.Decryptor=e,r),o.mode.CTR)},6994:function(i){"use strict";i.exports=t},7165:function(t,i,n){var r;t.exports=(r=n(9021),n(9506),void(r.lib.Cipher||function(t){var i=r,n=i.lib,e=n.Base,o=n.WordArray,s=n.BufferedBlockAlgorithm,u=i.enc,c=u.Base64,a=i.algo.EvpKDF,l=n.Cipher=s.extend({cfg:e.extend(),createEncryptor:function(t,i){return this.create(this._ENC_XFORM_MODE,t,i)},createDecryptor:function(t,i){return this.create(this._DEC_XFORM_MODE,t,i)},init:function(t,i,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=i,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?p:y}return function(i){return{encrypt:function(n,r,e){return t(r).encrypt(i,n,r,e)},decrypt:function(n,r,e){return t(r).decrypt(i,n,r,e)}}}}()}),h=(n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),i.mode={}),d=n.BlockCipherMode=e.extend({createEncryptor:function(t,i){return this.Encryptor.create(t,i)},createDecryptor:function(t,i){return this.Decryptor.create(t,i)},init:function(t,i){this._cipher=t,this._iv=i}}),f=h.CBC=function(){var i=d.extend();function n(i,n,r){var e,o=this._iv;o?(e=o,this._iv=t):e=this._prevBlock;for(var s=0;s<r;s++)i[n+s]^=e[s]}return i.Encryptor=i.extend({processBlock:function(t,i){var r=this._cipher,e=r.blockSize;n.call(this,t,i,e),r.encryptBlock(t,i),this._prevBlock=t.slice(i,i+e)}}),i.Decryptor=i.extend({processBlock:function(t,i){var r=this._cipher,e=r.blockSize,o=t.slice(i,i+e);r.decryptBlock(t,i),n.call(this,t,i,e),this._prevBlock=o}}),i}(),b=(i.pad={}).Pkcs7={pad:function(t,i){for(var n=4*i,r=n-t.sigBytes%n,e=r<<24|r<<16|r<<8|r,s=[],u=0;u<r;u+=4)s.push(e);var c=o.create(s,r);t.concat(c)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},m=(n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:f,padding:b}),reset:function(){var t;l.reset.call(this);var i=this.cfg,n=i.iv,r=i.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,i){this._mode.processBlock(t,i)},_doFinalize:function(){var t,i=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(i.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),i.unpad(t)),t},blockSize:4}),n.CipherParams=e.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),Z=(i.format={}).OpenSSL={stringify:function(t){var i=t.ciphertext,n=t.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(i):i).toString(c)},parse:function(t){var i,n=c.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(i=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:i})}},y=n.SerializableCipher=e.extend({cfg:e.extend({format:Z}),encrypt:function(t,i,n,r){r=this.cfg.extend(r);var e=t.createEncryptor(n,r),o=e.finalize(i),s=e.cfg;return m.create({ciphertext:o,key:n,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,i,n,r){return r=this.cfg.extend(r),i=this._parse(i,r.format),t.createDecryptor(n,r).finalize(i.ciphertext)},_parse:function(t,i){return"string"==typeof t?i.parse(t,this):t}}),v=(i.kdf={}).OpenSSL={execute:function(t,i,n,r,e){if(r||(r=o.random(8)),e)s=a.create({keySize:i+n,hasher:e}).compute(t,r);else var s=a.create({keySize:i+n}).compute(t,r);var u=o.create(s.words.slice(i),4*n);return s.sigBytes=4*i,m.create({key:s,iv:u,salt:r})}},p=n.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:v}),encrypt:function(t,i,n,r){var e=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize,r.salt,r.hasher);r.iv=e.iv;var o=y.encrypt.call(this,t,i,e.key,r);return o.mixIn(e),o},decrypt:function(t,i,n,r){r=this.cfg.extend(r),i=this._parse(i,r.format);var e=r.kdf.execute(n,t.keySize,t.ivSize,i.salt,r.hasher);return r.iv=e.iv,y.decrypt.call(this,t,i,e.key,r)}})}()))},7193:function(t,i,n){var r;t.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var t=r,i=t.lib.StreamCipher,n=t.algo,e=n.RC4=i.extend({_doReset:function(){for(var t=this._key,i=t.words,n=t.sigBytes,r=this._S=[],e=0;e<256;e++)r[e]=e;e=0;for(var o=0;e<256;e++){var s=e%n,u=r[e];r[e]=r[o=(o+r[e]+(i[s>>>2]>>>24-s%4*8&255))%256],r[o]=u}this._i=this._j=0},_doProcessBlock:function(t,i){t[i]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,i=this._i,n=this._j,r=0,e=0;e<4;e++){var o=t[i=(i+1)%256];t[i]=t[n=(n+t[i])%256],t[n]=o,r|=t[(t[i]+t[n])%256]<<24-8*e}return this._i=i,this._j=n,r}t.RC4=i._createHelper(e);var s=n.RC4Drop=e.extend({cfg:e.cfg.extend({drop:192}),_doReset:function(){e._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=i._createHelper(s)}(),r.RC4)},7628:function(t,i,n){var r;t.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var t=r,i=t.lib,n=i.WordArray,e=i.BlockCipher,o=t.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],u=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=e.extend({_doReset:function(){for(var t=this._key.words,i=[],n=0;n<56;n++){var r=s[n]-1;i[n]=t[r>>>5]>>>31-r%32&1}for(var e=this._subKeys=[],o=0;o<16;o++){var a=e[o]=[],l=c[o];for(n=0;n<24;n++)a[n/6|0]|=i[(u[n]-1+l)%28]<<31-n%6,a[4+(n/6|0)]|=i[28+(u[n+24]-1+l)%28]<<31-n%6;for(a[0]=a[0]<<1|a[0]>>>31,n=1;n<7;n++)a[n]=a[n]>>>4*(n-1)+3;a[7]=a[7]<<5|a[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=e[15-n]},encryptBlock:function(t,i){this._doCryptBlock(t,i,this._subKeys)},decryptBlock:function(t,i){this._doCryptBlock(t,i,this._invSubKeys)},_doCryptBlock:function(t,i,n){this._lBlock=t[i],this._rBlock=t[i+1],d.call(this,4,252645135),d.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),d.call(this,1,1431655765);for(var r=0;r<16;r++){for(var e=n[r],o=this._lBlock,s=this._rBlock,u=0,c=0;c<8;c++)u|=a[c][((s^e[c])&l[c])>>>0];this._lBlock=s,this._rBlock=o^u}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,d.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),t[i]=this._lBlock,t[i+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(t,i){var n=(this._lBlock>>>t^this._rBlock)&i;this._rBlock^=n,this._lBlock^=n<<t}function f(t,i){var n=(this._rBlock>>>t^this._lBlock)&i;this._lBlock^=n,this._rBlock^=n<<t}t.DES=e._createHelper(h);var b=o.TripleDES=e.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var i=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),e=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=h.createEncryptor(n.create(i)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.createEncryptor(n.create(e))},encryptBlock:function(t,i){this._des1.encryptBlock(t,i),this._des2.decryptBlock(t,i),this._des3.encryptBlock(t,i)},decryptBlock:function(t,i){this._des3.decryptBlock(t,i),this._des2.encryptBlock(t,i),this._des1.decryptBlock(t,i)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=e._createHelper(b)}(),r.TripleDES)},8056:function(t,i,n){var r;t.exports=(r=n(9021),
/** @preserve
	(c) 2012 by Cédric Mesnil. All rights reserved.

	Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

	    - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
	    - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	*/
function(){var t=r,i=t.lib,n=i.WordArray,e=i.Hasher,o=t.algo,s=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),a=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=n.create([0,1518500249,1859775393,2400959708,2840853838]),h=n.create([1352829926,1548603684,1836072691,2053994217,0]),d=o.RIPEMD160=e.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,i){for(var n=0;n<16;n++){var r=i+n,e=t[r];t[r]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o,d,p,W,X,G,V,I,g,w,Y,S=this._hash.words,K=l.words,R=h.words,k=s.words,C=u.words,T=c.words,J=a.words;for(G=o=S[0],V=d=S[1],I=p=S[2],g=W=S[3],w=X=S[4],n=0;n<80;n+=1)Y=o+t[i+k[n]]|0,Y+=n<16?f(d,p,W)+K[0]:n<32?b(d,p,W)+K[1]:n<48?m(d,p,W)+K[2]:n<64?Z(d,p,W)+K[3]:y(d,p,W)+K[4],Y=(Y=v(Y|=0,T[n]))+X|0,o=X,X=W,W=v(p,10),p=d,d=Y,Y=G+t[i+C[n]]|0,Y+=n<16?y(V,I,g)+R[0]:n<32?Z(V,I,g)+R[1]:n<48?m(V,I,g)+R[2]:n<64?b(V,I,g)+R[3]:f(V,I,g)+R[4],Y=(Y=v(Y|=0,J[n]))+w|0,G=w,w=g,g=v(I,10),I=V,V=Y;Y=S[1]+p+g|0,S[1]=S[2]+W+w|0,S[2]=S[3]+X+G|0,S[3]=S[4]+o+V|0,S[4]=S[0]+d+I|0,S[0]=Y},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(i.length+1),this._process();for(var e=this._hash,o=e.words,s=0;s<5;s++){var u=o[s];o[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return e},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t}});function f(t,i,n){return t^i^n}function b(t,i,n){return t&i|~t&n}function m(t,i,n){return(t|~i)^n}function Z(t,i,n){return t&n|i&~n}function y(t,i,n){return t^(i|~n)}function v(t,i){return t<<i|t>>>32-i}t.RIPEMD160=e._createHelper(d),t.HmacRIPEMD160=e._createHmacHelper(d)}(Math),r.RIPEMD160)},8124:function(t,i,n){var r;t.exports=(r=n(9021),n(7165),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},8454:function(t,i,n){var r,e;t.exports=(e=n(9021),n(7165),e.mode.ECB=((r=e.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,i){this._cipher.encryptBlock(t,i)}}),r.Decryptor=r.extend({processBlock:function(t,i){this._cipher.decryptBlock(t,i)}}),r),e.mode.ECB)},9021:function(t,i,n){var r;t.exports=(r=r||function(t,i){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(477)}catch(t){}var e=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(i){var n;return t.prototype=i,n=new t,t.prototype=null,n}}(),s={},u=s.lib={},c=u.Base={extend:function(t){var i=o(this);return t&&i.mixIn(t),i.hasOwnProperty("init")&&this.init!==i.init||(i.init=function(){i.$super.init.apply(this,arguments)}),i.init.prototype=i,i.$super=this,i},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var i in t)t.hasOwnProperty(i)&&(this[i]=t[i]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=u.WordArray=c.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=i?n:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var i=this.words,n=t.words,r=this.sigBytes,e=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<e;o++)i[r+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else for(var s=0;s<e;s+=4)i[r+s>>>2]=n[s>>>2];return this.sigBytes+=e,this},clamp:function(){var i=this.words,n=this.sigBytes;i[n>>>2]&=4294967295<<32-n%4*8,i.length=t.ceil(n/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var i=[],n=0;n<t;n+=4)i.push(e());return new a.init(i,t)}}),l=s.enc={},h=l.Hex={stringify:function(t){for(var i=t.words,n=t.sigBytes,r=[],e=0;e<n;e++){var o=i[e>>>2]>>>24-e%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var i=t.length,n=[],r=0;r<i;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new a.init(n,i/2)}},d=l.Latin1={stringify:function(t){for(var i=t.words,n=t.sigBytes,r=[],e=0;e<n;e++)r.push(String.fromCharCode(i[e>>>2]>>>24-e%4*8&255));return r.join("")},parse:function(t){for(var i=t.length,n=[],r=0;r<i;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new a.init(n,i)}},f=l.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},b=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(i){var n,r=this._data,e=r.words,o=r.sigBytes,s=this.blockSize,u=o/(4*s),c=(u=i?t.ceil(u):t.max((0|u)-this._minBufferSize,0))*s,l=t.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(e,h);n=e.splice(0,c),r.sigBytes-=l}return new a.init(n,l)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),m=(u.Hasher=b.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){b.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(i,n){return new t.init(n).finalize(i)}},_createHmacHelper:function(t){return function(i,n){return new m.HMAC.init(t,n).finalize(i)}}}),s.algo={});return s}(Math),r)},9506:function(t,i,n){var r,e,o,s,u,c,a;t.exports=(a=n(9021),n(5471),n(1025),s=(e=(r=a).lib).WordArray,c=(u=r.algo).EvpKDF=(o=e.Base).extend({cfg:o.extend({keySize:4,hasher:u.MD5,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,i){for(var n,r=this.cfg,e=r.hasher.create(),o=s.create(),u=o.words,c=r.keySize,a=r.iterations;u.length<c;){n&&e.update(n),n=e.update(t).finalize(i),e.reset();for(var l=1;l<a;l++)n=e.finalize(n),e.reset();o.concat(n)}return o.sigBytes=4*c,o}}),r.EvpKDF=function(t,i,n){return c.create(n).compute(t,i)},a.EvpKDF)},9557:function(t,i,n){var r,e,o,s,u,c,a,l;t.exports=(l=n(9021),n(3240),n(1380),o=(e=(r=l).x64).Word,s=e.WordArray,a=(u=r.algo).SHA384=(c=u.SHA512).extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var t=c._doFinalize.call(this);return t.sigBytes-=16,t}}),r.SHA384=c._createHelper(a),r.HmacSHA384=c._createHmacHelper(a),l.SHA384)}},n={};function r(t){var e=n[t];if(void 0!==e)return e.exports;var o=n[t]={exports:{}};return i[t].call(o.exports,o,o.exports,r),o.exports}r.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(i,{a:i}),i},r.d=function(t,i){for(var n in i)r.o(i,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};return function(){"use strict";r.r(e),r.d(e,{BackgroundProcess:function(){return si}});var t=function(t){return t},i="/sdk/init_background_process",n=t,o="/sdk/enable_background_process",s=function(t){return t},u=function(t){return t},c=t,a="zc.p.0.bbm.0",l="zc.p.0.ebbr",h="zc.p.0.bbp.da",d="zc.p.0.bbp.ea",f="zc.p.0.bbp.0",b=function(){function t(){}return t.createError=function(t,i){return{code:t.code,message:t.message+(i?" "+i:"")}},t}(),m=function(t,i,n,r){return new(n||(n=Promise))(function(e,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(s,u)}c((r=r.apply(t,i||[])).next())})},Z=function(t,i){var n,r,e,o,s={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(e=2&u[0]?r.return:u[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,u[1])).done)return e;switch(r=0,e&&(u=[2&u[0],e.value]),u[0]){case 0:case 1:e=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(e=s.trys,(e=e.length>0&&e[e.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!e||u[1]>e[0]&&u[1]<e[3])){s.label=u[1];break}if(6===u[0]&&s.label<e[1]){s.label=e[1],e=u;break}if(e&&s.label<e[2]){s.label=e[2],s.ops.push(u);break}e[2]&&s.ops.pop(),s.trys.pop();continue}u=i.call(t,s)}catch(t){u=[6,t],r=0}finally{n=e=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},y=function(){function t(){this.isFirstNode=!0,this.isLastNode=!0,this.hasAnother=!1}return t.prototype.connect=function(t){return m(this,void 0,void 0,function(){return Z(this,function(i){switch(i.label){case 0:return this.next=t,this.output?[4,t.setInput(this.output)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2,t]}})})},t.prototype.disconnect=function(t){return m(this,void 0,void 0,function(){return Z(this,function(i){switch(i.label){case 0:return this.next?[4,this.next.setInput(null,t)]:[3,2];case 1:i.sent(),this.next=void 0,i.label=2;case 2:return[2]}})})},t.prototype.setNodePos=function(t,i,n){void 0!==t&&(this.isFirstNode=t),void 0!==i&&(this.isLastNode=i),"boolean"==typeof n&&(this.hasAnother=!n)},t}(),v=function(){function t(t){this.gl=t,this.program=null,this.program=null}return t.prototype.createProgram=function(t,i){var n=this.gl,r=this.loadShader(n.VERTEX_SHADER,t),e=this.loadShader(n.FRAGMENT_SHADER,i);if(!r||!e)return null;var o=n.createProgram();return o?(this.program=o,n.attachShader(o,r),n.attachShader(o,e),n.linkProgram(o),o):null},t.prototype.loadShader=function(t,i){var n=this.gl,r=n.createShader(t);return null==r?null:(n.shaderSource(r,i),n.compileShader(r),r)},t.prototype.deleteProgram=function(){var t;this.program&&(null===(t=this.gl)||void 0===t||t.deleteProgram(this.program))},t}(),p="\nattribute vec4 aPosition;\nattribute vec2 aTexCoord;\nattribute vec2 aTexCoord2;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\n\nvoid main(){\n    gl_Position = aPosition;\n    vTexCoord = aTexCoord;\n    vTexCoord2 = aTexCoord2;\n}\n",W=r(795),X=(r(6994),{code:1000018,message:L}),G={code:1100001,message:J},V={code:1103054,message:x},I={code:1103090,message:"background blur model failed to init."},g={code:1103091,message:"use background blur before loading model"},w={code:1103094,message:"localstream video is muted, please open it with api 'mutePublishStreamVideo'."},Y={code:1103096,message:"background blur not support."},S={code:1103098,message:"background effect overload"},K={code:1103100,message:"background process is start, but not subscribe yet"},R="/sdk/init",k=R,C=Promise,T=document;var J="input param error",L="local stream wrong",x="no preview";var N=function(t,i,n,r){return new(n||(n=Promise))(function(e,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(s,u)}c((r=r.apply(t,i||[])).next())})},H=function(t,i){var n,r,e,o,s={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(e=2&u[0]?r.return:u[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,u[1])).done)return e;switch(r=0,e&&(u=[2&u[0],e.value]),u[0]){case 0:case 1:e=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(e=s.trys,(e=e.length>0&&e[e.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!e||u[1]>e[0]&&u[1]<e[3])){s.label=u[1];break}if(6===u[0]&&s.label<e[1]){s.label=e[1],e=u;break}if(e&&s.label<e[2]){s.label=e[2],s.ops.push(u);break}e[2]&&s.ops.pop(),s.trys.pop();continue}u=i.call(t,s)}catch(t){u=[6,t],r=0}finally{n=e=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},F="zc.p.0.sbe.4",B=function(){function t(t,i){this.tt=t,this.it=i,this.recordedFrameCount=0,this.targetFrameRate=0,this.recordingDuration=0,this.modelTimes={max:0,a:0,b:0,c:0,d:0,count:0},this.renderTimes={max:0,count:0},this.recordAnalysisInterval=30,this.enableStat=!1}return t.prototype.startRecordBackgroundEffectOutput=function(t){return N(this,void 0,void 0,function(){var i,n,r,e=this;return H(this,function(o){switch(o.label){case 0:return this.enableStat=!!this.tt.settingConfig.getSetting("bg_fps_stat"),this.enableStat&&(this.recordTimer=setTimeout(function(){e.recordFps()},1e3*this.recordAnalysisInterval)),i=6,this.recordID?(this.it.warn(F+" detector is already recording"),[2,{result:!0}]):(n=(new Date).getTime(),this.recordID=n,this.targetFrameRate=t,this.recordedFrameCount=0,this.recordingDuration=i,[4,new C(function(t){window.setTimeout(t,1e3*e.recordingDuration)})]);case 1:return o.sent(),this.recordID!==n?(this.recordID=void 0,[2,{result:!0}]):(this.recordID=void 0,r=this.recordedFrameCount/i,this.recordedFrameCount<this.targetFrameRate*this.recordingDuration/2?(this.it.warn(F+" detect effect overload: current fps: "+r),[2,{result:!1,targetFPS:this.targetFrameRate,currentFPS:r}]):(this.it.info(F+" detect effect current fps: "+r),[2,{result:!0}]))}})})},t.prototype.recordFps=function(){var t=this;this.recordTimer&&(clearTimeout(this.recordTimer),this.recordTimer=null);var i=this.renderTimes.count/this.recordAnalysisInterval;this.it.info(F+" bgd m: "+this.modelTimes.max+" mf: "+this.modelTimes.count/this.recordAnalysisInterval+" "+JSON.stringify([this.modelTimes.a,this.modelTimes.b,this.modelTimes.c,this.modelTimes.d])+"; r: "+this.renderTimes.max+" rf: "+i),this.clearData(),this.recordTimer=setTimeout(function(){t.recordFps()},1e3*this.recordAnalysisInterval)},t.prototype.stopRecordFps=function(){this.recordTimer&&(clearTimeout(this.recordTimer),this.recordTimer=null),this.clearData()},t.prototype.clearData=function(){this.modelTimes.count=0,this.modelTimes.a=this.modelTimes.b=this.modelTimes.c=this.modelTimes.d=0,this.renderTimes.count=0,this.modelTimes.max=0,this.renderTimes.max=0},t.prototype.stopRecordBeautyEffectOutput=function(){this.recordedFrameCount=this.targetFrameRate=0,this.recordID=void 0,this.stopRecordFps()},t.prototype.addFrame=function(){this.recordID&&(this.recordedFrameCount+=1)},t.prototype.addFrameTime=function(t,i){this.enableStat&&("model"===t?(this.modelTimes.max=Math.max(this.modelTimes.max,i),this.modelTimes.count++,this.distributeStat(this.modelTimes,i)):"render"===t&&(this.renderTimes.max=Math.max(this.renderTimes.max,i),this.renderTimes.count++))},t.prototype.distributeStat=function(t,i){switch(!0){case i<=20&&i>0:t.a++;break;case i<=35&&i>20:t.b++;break;case i<=50&&i>35:t.c++;break;case i>50:t.d++}},t}();function P(t){return void 0===t}function U(t){return t instanceof MediaStream}function z(t){return t instanceof HTMLImageElement}var M,j;!function(t){t[t.SWITCH_ONE=1]="SWITCH_ONE",t[t.SWITCH_TWO=2]="SWITCH_TWO"}(M||(M={})),function(t){t[t.ZegoGeoFenceTypeNone=0]="ZegoGeoFenceTypeNone",t[t.ZegoGeoFenceTypeInclude=1]="ZegoGeoFenceTypeInclude",t[t.ZegoGeoFenceTypeExclude=2]="ZegoGeoFenceTypeExclude"}(j||(j={}));var Q,E;!function(t){t[t.TT_NONE=0]="TT_NONE",t[t.TT_PC=1]="TT_PC",t[t.TT_IOS=2]="TT_IOS",t[t.TT_ANDROID=3]="TT_ANDROID",t[t.TT_MAC=4]="TT_MAC",t[t.TT_LINUX=5]="TT_LINUX",t[t.TT_WEB=6]="TT_WEB",t[t.TT_MINIPROGRAM=7]="TT_MINIPROGRAM",t[t.TT_UNKNOWN=32]="TT_UNKNOWN"}(Q||(Q={})),function(t){t[t.disconnected=0]="disconnected",t[t.connecting=1]="connecting",t[t.connected=2]="connected"}(E||(E={}));var D,A,O,_;!function(t){t[t.logout=0]="logout",t[t.trylogin=1]="trylogin",t[t.login=2]="login"}(D||(D={})),function(t){t[t.I=0]="I",t[t.H=10]="H",t[t.M=100]="M",t[t.L=1e3]="L"}(A||(A={})),function(t){t[t.offline=0]="offline",t[t.online=1]="online"}(O||(O={})),function(t){t[t.NT_NONE=0]="NT_NONE",t[t.NT_LINE=1]="NT_LINE",t[t.NT_WIFI=2]="NT_WIFI",t[t.NT_2G=3]="NT_2G",t[t.NT_3G=4]="NT_3G",t[t.NT_4G=5]="NT_4G",t[t.NT_UNKNOWN=32]="NT_UNKNOWN"}(_||(_={}));var q;!function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error",t[t.report=99]="report",t[t.disable=100]="disable"}(q||(q={}));var $,tt,it;!function(t){t[t.disable=0]="disable",t[t.websocket=1]="websocket",t[t.https=2]="https"}($||($={})),function(t){t[t.SDKProject_ZegoWebRTC=6]="SDKProject_ZegoWebRTC",t[t.SDKProject_ZegoMiniProgram=7]="SDKProject_ZegoMiniProgram"}(tt||(tt={})),function(t){t[t.UDP=0]="UDP",t[t.RTMP=1]="RTMP",t[t.FLV=2]="FLV",t[t.HLS=3]="HLS",t[t.WEBRTC=4]="WEBRTC"}(it||(it={}));var nt,rt;nt=1,function(){var t=1}();!function(t){t[t.ClientType_None=0]="ClientType_None",t[t.ClientType_H5=1]="ClientType_H5",t[t.ClientType_SmallPragram=2]="ClientType_SmallPragram",t[t.ClientType_Webrtc=3]="ClientType_Webrtc"}(rt||(rt={}));var et,ot,st,ut,ct,at,lt,ht,dt,ft,bt,mt,Zt;!function(t){t[t.Default=0]="Default",t[t.Extranet=1]="Extranet",t[t.Intranet=2]="Intranet"}(et||(et={})),function(t){t[t.logout=0]="logout",t[t.trylogin=1]="trylogin",t[t.login=2]="login"}(ot||(ot={})),function(t){t[t.logout=0]="logout",t[t.trylogin=1]="trylogin",t[t.login=2]="login",t[t.reconnect=3]="reconnect"}(st||(st={})),function(t){t[t.stop=0]="stop",t[t.start=1]="start"}(ut||(ut={})),function(t){t[t.CDN=0]="CDN",t[t.RTC=1]="RTC",t[t.L3=2]="L3",t[t.DG=3]="DG"}(ct||(ct={})),function(t){t[t.useAnalyzer=0]="useAnalyzer",t[t.useWorklet=1]="useWorklet"}(at||(at={})),function(t){t[t.Default=3]="Default",t[t.StandardVideoCall=4]="StandardVideoCall",t[t.HighVideoCall=5]="HighVideoCall",t[t.StandardChatroom=6]="StandardChatroom",t[t.HighQualityChatroom=7]="HighQualityChatroom",t[t.Broadcast=8]="Broadcast",t[t.Karaoke=9]="Karaoke",t[t.UNKNOWN=100]="UNKNOWN"}(lt||(lt={})),function(t){t.WIN32="WIN32",t.MAC="Mac",t.ANDROID="Android",t.LINUX="Linux",t.IOS="iOS",t.Harmony="Harmony",t.UNKNOWN="WTF"}(ht||(ht={})),function(t){t.CDN="cdn",t.L3="l3",t.RTC="rtc"}(dt||(dt={})),function(t){t[t.RTC=0]="RTC",t[t.CDN=1]="CDN",t[t.L3=2]="L3",t[t.DG=3]="DG",t[t.CUSTOM=5]="CUSTOM"}(ft||(ft={})),function(t){t[t.offline=0]="offline",t[t.online=1]="online"}(bt||(bt={})),function(t){t[t.MinQuality=0]="MinQuality",t[t.DieQuality=0]="DieQuality",t[t.PoorMinQuality=1]="PoorMinQuality",t[t.MiddleMinQuality=30]="MiddleMinQuality",t[t.GoodMinQuality=60]="GoodMinQuality",t[t.ExcellentMinQuality=85]="ExcellentMinQuality",t[t.MaxQuality=100]="MaxQuality"}(mt||(mt={})),function(t){t[t.Unknown=-1]="Unknown",t[t.Excellent=0]="Excellent",t[t.Good=1]="Good",t[t.Middle=2]="Middle",t[t.Poor=3]="Poor",t[t.Die=4]="Die"}(Zt||(Zt={}));var yt,vt,pt=function(){function t(t,i){void 0===t&&(t=null),void 0===i&&(i=null),this.next=null,this.prev=null,this._id=t,this._data=i}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id?this._id:null},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(t){this._data=t},enumerable:!1,configurable:!0}),t.prototype.hasNext=function(){return this.next&&this.next.id},t.prototype.hasPrev=function(){return this.prev&&this.prev.id},t}();!function(){function t(){this.start=new pt,this.end=new pt,this._idCounter=0,this._numNodes=0,this.start.next=this.end,this.start.prev=null,this.end.prev=this.start,this.end.next=null}t.prototype.insertBefore=function(t,i){var n=new pt(this._idCounter,i);return n.next=t,n.prev=t.prev,t.prev&&(t.prev.next=n),t.prev=n,++this._idCounter,++this._numNodes,n},t.prototype.addLast=function(t){return this.insertBefore(this.end,t)},t.prototype.add=function(t){return this.addLast(t)},t.prototype.getFirst=function(){return 0===this._numNodes?null:this.start.next},t.prototype.getLast=function(){return 0===this._numNodes?null:this.end.prev},t.prototype.size=function(){return this._numNodes},t.prototype.getFromFirst=function(t){var i=0,n=this.start.next;if(t>=0)for(;i<t&&null!==n;)n=n.next,++i;else n=null;if(null===n)throw"Index out of bounds.";return n},t.prototype.get=function(t){return 0===t?this.getFirst():t===this._numNodes-1?this.getLast():this.getFromFirst(t)},t.prototype.remove=function(t){return t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),--this._numNodes,t},t.prototype.removeFirst=function(){var t=null;return this._numNodes>0&&this.start.next&&(t=this.remove(this.start.next)),t},t.prototype.removeLast=function(){var t=null;return this._numNodes>0&&this.end.prev&&(t=this.remove(this.end.prev)),t},t.prototype.removeAll=function(){this.start.next=this.end,this.end.prev=this.start,this._numNodes=0,this._idCounter=0},t.prototype.each=function(t){for(var i=this.start;i.hasNext();)t(i=i.next)},t.prototype.find=function(t){for(var i=this.start,n=!1,r=null;i.hasNext()&&!n;)t(i=i.next)&&(r=i,n=!0);return r},t.prototype.map=function(t){for(var i=this.start,n=[];i.hasNext();)t(i=i.next)&&n.push(i);return n},t.prototype.push=function(t){return this.addLast(t)},t.prototype.unshift=function(t){this.insertBefore(this._numNodes>0?this.start.next:this.end,t)},t.prototype.pop=function(){return this.removeLast()},t.prototype.shift=function(){return this.removeFirst()}}();function Wt(){return navigator.userAgent||""}function Xt(){var t,i=navigator.userAgent,n=i.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*([\d\.]+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(t=/\brv[ :]+([\d\.]+)/g.exec(i)||[])[1]||""}:"Chrome"===n[1]&&null!=(t=i.match(/\bOPR|Edge\/([\d\.]+)/))?{name:"Opera",version:t[1]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(t=i.match(/version\/([\d+\.]+)/i))&&n.splice(1,1,t[1]),{name:n[0],version:n[1]})}!function(t){t.ONLY_BASELINE="only_baseline",t.HARD_SOFT_ENCODEC_FIRST="hard_or_soft_encodec_first",t.HIGH_PROFILE_FIRST="high_profile_first"}(yt||(yt={})),function(t){t[t.None=0]="None",t[t.Vocalist=1]="Vocalist",t[t.BackingSinging=2]="BackingSinging"}(vt||(vt={}));var Gt,Vt=(Gt=function(t,i){return Gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},Gt(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}Gt(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),It=function(t,i,n,r){return new(n||(n=Promise))(function(e,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(s,u)}c((r=r.apply(t,i||[])).next())})},gt=function(t,i){var n,r,e,o,s={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(e=2&u[0]?r.return:u[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,u[1])).done)return e;switch(r=0,e&&(u=[2&u[0],e.value]),u[0]){case 0:case 1:e=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(e=s.trys,(e=e.length>0&&e[e.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!e||u[1]>e[0]&&u[1]<e[3])){s.label=u[1];break}if(6===u[0]&&s.label<e[1]){s.label=e[1],e=u;break}if(e&&s.label<e[2]){s.label=e[2],s.ops.push(u);break}e[2]&&s.ops.pop(),s.trys.pop();continue}u=i.call(t,s)}catch(t){u=[6,t],r=0}finally{n=e=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},wt=b.createError,Yt={contain:0,cover:1,fill:2},St=function(t){function i(i,n,r,e){var o=t.call(this)||this;return o.it=i,o.tt=n,o.preview=r,o.onnxs=e,o.gl=null,o.nt=!0,o.alphaDataType=Qt,o.focalNum=25,o.shouldRun=!1,o.renderId=0,o.runErrorCounter=0,o.rt=!1,o.et=0,o.lastRenderTime=0,o.isRending=!1,o.vertices=new Float32Array([-1,1,0,1,-1,-1,0,0,1,1,1,1,1,-1,1,0]),o.options={type:"blur",objectFit:"cover"},o.fps=15,o.fit=1,o.videoInited=!1,o.vw=0,o.vh=0,o.renderQueue=[],o.renderCount=0,o.isRelease=!1,o.renderState="",o.failedTimes=0,o.setVcMgrInfo(),o.imgCanvas=T.createElement("canvas"),o.imgCanvas.width=Mt,o.imgCanvas.height=jt,o.imgCtx=o.imgCanvas.getContext("2d",{willReadFrequently:!0}),o.input=r.videoTrack,o.modelTime=document.getElementById("model_time"),"safari"==Xt().name.toLowerCase()&&(o.renTime=T.createElement("label"),o.renTime.setAttribute("style","visibility:hidden"),T.body.append(o.renTime)),o.detector=new B(n,i),o.it.info(f+" background blur node inited"),o}return Vt(i,t),Object.defineProperty(i.prototype,"ot",{get:function(){return this.tt.browser},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"frameGap",{get:function(){return 1e3/this.fps},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"vcMgr",{get:function(){return this.preview.vcMgr},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"renderOutputBuffer",{get:function(){return!this.isLastNode},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"output",{get:function(){return this.canvasTrack&&"live"===this.canvasTrack.readyState||(this.canvasTrack=this.getCanvasTrack(this.rt)),this.isRending?{track:this.canvasTrack,frameInfo:this.blurFrameInfo}:null},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"renderCanvas",{get:function(){return this.canvas},enumerable:!1,configurable:!0}),i.prototype.setVcMgrInfo=function(){var t,i;if(this.it.info("".concat(f," set vmi ").concat(null===(t=this.vcMgr)||void 0===t?void 0:t.inited)),this.vcMgr&&(null===(i=this.vcMgr)||void 0===i?void 0:i.inited)){var n=this.vcMgr,r=n.canvasEl,e=n.videoEl,o=n.gl,s=n.originWidth,u=n.originHeight;r&&(this.canvas=r),e&&(this.video=e),o&&(o!==this.gl&&(this.renderQueue=[]),this.gl=o),s&&(this.width=s),u&&(this.height=u)}},i.prototype.videoRendering=function(){return It(this,void 0,void 0,function(){var t=this;return gt(this,function(i){return[2,new Promise(function(i,n){var r;t.vcMgr&&!(null===(r=t.vcMgr)||void 0===r?void 0:r.inited)?(t.vcMgr.onInited=function(){t.it.info("".concat(f," vr on inited")),i()},t.vcMgr.onRenderFail=function(i){t.it.info("".concat(f," vr fail")),t.et=1,n(i)}):(t.it.info("".concat(f," vr was inited")),i())})]})})},i.prototype.pauseRender=function(t){t&&(this.stopRendering(!1),"safari"===this.ot&&(this.canvasTrack=null))},i.prototype.outputChange=function(){var t;return It(this,void 0,void 0,function(){return gt(this,function(i){switch(i.label){case 0:return this.output&&this.next?(this.it.info(f+" replace next node input"),[4,null===(t=this.next)||void 0===t?void 0:t.setInput(this.output)]):[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},Object.defineProperty(i.prototype,"enabled",{get:function(){return this.shouldRun},enumerable:!1,configurable:!0}),i.prototype.resetTexture=function(t){if(this.gl){var i=this.gl;i.bindTexture(i.TEXTURE_2D,t),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,this.width,this.height,0,i.RGBA,i.UNSIGNED_BYTE,null)}},i.prototype.setRenderResolution=function(t,i){this.canvas.width=t,this.canvas.height=i,this.width=t,this.height=i},i.prototype.initVideo=function(){var t,i,n;return It(this,void 0,void 0,function(){var r,e;return gt(this,function(o){switch(o.label){case 0:return[4,this.videoRendering()];case 1:return o.sent(),this.setVcMgrInfo(),r=null===(t=this.vcMgr)||void 0===t?void 0:t.originWidth,e=null===(i=this.vcMgr)||void 0===i?void 0:i.originHeight,this.setRenderResolution(r,e),this.initWebGL(r,e),this.it.info(f+" iv "+r+" "+e),(null===(n=this.vcMgr)||void 0===n?void 0:n.fps)&&(this.fps=this.vcMgr.fps),this.videoInited=!0,this.setBackgroundImgTexture(),this.it.info(f+" video inited."),[2]}})})},i.prototype.getCanvasTrack=function(t){return this.vcMgr?this.vcMgr.getCanvasTrack(t):null},i.prototype.replaceOutputTrack=function(){var t;this.isRending||(this.isRending=!0,null===(t=this.vcMgr)||void 0===t||t.setRenderTask(!0,"background"),this.outputChange())},i.prototype.render=function(t){var i=this;this.requestAnimationTimer&&(clearTimeout(this.requestAnimationTimer),this.requestAnimationTimer=null);var n=0===this.lastRenderTime,r=Date.now();this.lastRenderTime=r,this.runTask().then(function(){var e=Date.now();n&&i.executeRenderingTasks();var o=e-r;i.detector.addFrameTime("model",o),i.shouldRun&&i.renderId==t&&(i.requestAnimationTimer=setTimeout(function(){i.render(t)},o<i.frameGap?i.frameGap-o:0))}).catch(function(t){-1===(null==t?void 0:t.code)&&("safari"!==i.ot&&"firefox"!==i.ot||(i.nt=!1,i.stopRendering(!1)))})},i.prototype.runTask=function(){return this.runAlphaDatas()},i.prototype.runAlphaDatas=function(){return It(this,void 0,void 0,function(){var t=this;return gt(this,function(i){return[2,new C(function(i,n){if(t.gl){var r=t.gl;if(t.checkResolution(t.video),0!=t.video.videoWidth&&0!=t.video.videoHeight){t.nt&&r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT),r.viewport(0,0,t.width,t.height),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1);var e=r.createTexture();e&&(r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,e),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t.video),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1),t.getAlphaDatas().then(function(n){t.isRelease||(t.renderQueue.length>3&&t.renderQueue.shift(),t.renderQueue.push({vTexture:e,alphas:n,w:t.width,h:t.height}),i())}).catch(function(t){console.debug(t),n(t)}))}else n({code:-1})}})]})})},i.prototype.renderImage=function(t,i,n,r,e){var o,s,u;this.renderCount++;var c=Date.now();"blur"===this.options.type?(this.setBackgroundBlur(t,{texture:n,w:r,h:e}),this.drawBlurs(i,null===(o=this.blurUpInfo)||void 0===o?void 0:o.texture,n,r,e)):"img"===this.options.type?this.drawBlurs(i,null===(s=this.fitFrameInfo)||void 0===s?void 0:s.texture,n,r,e):"none"===this.options.type&&this.drawNoBgs(i,n,r,e);var a=Date.now()-c;this.detector.addFrameTime("render",a),this.renTime&&(this.renTime.innerText=a+""),this.detector.addFrame(),this.renderCount>=("firefox"===this.ot?8:5)&&(this.replaceOutputTrack(),null===(u=this.vcMgr)||void 0===u||u.actionListener("renderFrame")),this.renderCount>=5&&(this.nt=!0)},i.prototype.startRendering=function(){return It(this,void 0,void 0,function(){var t=this;return gt(this,function(i){return this.it.info(f+" start render"),this.shouldRun=!0,this.renderId++,this.renderCount=0,this.render(this.renderId),this.detector.startRecordBackgroundEffectOutput(this.fps).then(function(i){!i.result&&t.onError&&t.onError(S,{targetFPS:i.targetFPS,currentFPS:i.currentFPS})}),[2]})})},i.prototype.setProcessConfig=function(t){if([0,1].includes(null==t?void 0:t.segmentation)&&0===(null==t?void 0:t.segmentation)){if(!this.onnxs.realSegOnnx)throw wt(g);0==this.alphaDataType?(this.onnxSession=this.onnxs.realSegOnnx.session,this.tensors=this.onnxs.realSegOnnx.tensors):(this.seg=this.onnxs.realSegOnnx.seg,this.worker=this.onnxs.worker)}},i.prototype.enable=function(t){var i;return It(this,void 0,void 0,function(){return gt(this,function(n){switch(n.label){case 0:return this.it.info(f+" enable call"),this.input===t||!(null===(i=this.vcMgr)||void 0===i?void 0:i.hasBeautyTask)&&"safari"!==this.ot||(this.it.info(f+" enable track change"),this.nt=!1,this.stopRendering(!1)),this.enabled?(this.it.info(f+" enabled"),[2]):[4,this.startRendering()];case 1:return n.sent(),this.it.info(f+" background blur node enabled"),[2]}})})},i.prototype.disable=function(){this.it.info(h+" call"),this.enabled&&(this.stopRendering(),this.it.info(h+" background blur node disabled"))},i.prototype.stopRendering=function(t){var i;void 0===t&&(t=!0),t&&(null===(i=this.vcMgr)||void 0===i||i.setRenderTask(!1,"background")),this.shouldRun=!1,this.requestAnimationTimer&&clearTimeout(this.requestAnimationTimer),this.requestAnimationTimer=null,this.renderQueue=[],this.lastRenderTime=0,this.replaceTrackTimer&&clearTimeout(this.replaceTrackTimer),this.replaceTrackTimer=null,this.renderCount=0,this.isRending=!1,this.detector.stopRecordBeautyEffectOutput()},i.prototype.reset=function(){return It(this,void 0,void 0,function(){return gt(this,function(t){switch(t.label){case 0:return this.it.info(f+" reset video start"),[4,this.initVideo()];case 1:return t.sent(),this.it.info(f+" reset video end"),[2]}})})},i.prototype.setInput=function(t,i){return It(this,void 0,void 0,function(){var n;return gt(this,function(r){switch(r.label){case 0:if(this.it.info(f+" set input call "),this.hasAnother&&(this.nt=!1),null===t)return this.it.info(f+" set input null "),(null==i?void 0:i.shouldClear)?(this.setClearGL(),[2]):(this.disable(),[2]);if(null===(n=null==t?void 0:t.track))return this.it.info(f+" set input track null "),this.input=null,[2];r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this.reset()];case 2:return r.sent(),[4,this.enable(n)];case 3:return r.sent(),this.input=n,[3,5];case 4:return r.sent(),[3,5];case 5:return this.it.info(f+" set input"),[2]}})})},i.prototype.setClearGL=function(){this.nt=!1,this.renderCount=0},i.prototype.releaseGLResource=function(t){var i,n;(null==t?void 0:t.frameBuffer)&&(null===(i=this.gl)||void 0===i||i.deleteFramebuffer(null==t?void 0:t.frameBuffer)),(null==t?void 0:t.texture)&&(null===(n=this.gl)||void 0===n||n.deleteTexture(null==t?void 0:t.texture))},i.prototype.releaseGL=function(){var t,i,n,r,e,o;this.releaseGLResource(this.blurDownInfo),this.releaseGLResource(this.blurUpInfo),this.releaseGLResource(this.fitFrameInfo),this.releaseGLResource(this.blurFrameInfo),null===(t=this.blurDownShader)||void 0===t||t.deleteProgram(),null===(i=this.blurUpShader)||void 0===i||i.deleteProgram(),null===(n=this.fitShader)||void 0===n||n.deleteProgram(),null===(r=this.blurShader)||void 0===r||r.deleteProgram(),null===(e=this.noBgShader)||void 0===e||e.deleteProgram(),null===(o=this.gl)||void 0===o||o.deleteBuffer(this.vertexBufferObject),this.canvasTrack=null,this.input=null},i.prototype.release=function(){var t;this.stopRendering(),this.releaseGL(),null===(t=this.worker)||void 0===t||t.release(),this.worker=null,this.isRelease=!0,this.it.info(f+" background blur node destroied.")},i.prototype.setOptions=function(t){var i;return It(this,void 0,void 0,function(){return gt(this,function(n){if(this.options=Object.assign(this.options,t),"blur"===this.options.type)switch(t.blurDegree){case 1:this.focalNum=25;break;case 2:this.focalNum=35;break;case 3:this.focalNum=50}else"img"===(null===(i=this.options)||void 0===i?void 0:i.type)?this.setBackgroundImgTexture():this.options;return[2]})})},i.prototype.setBackgroundImgTexture=function(){var t;if("img"===(null===(t=this.options)||void 0===t?void 0:t.type)){if(this.options.objectFit){var i=Yt[this.options.objectFit];this.fit=[0,1,2].includes(i)?i:this.fit}this.options.source&&z(this.options.source)&&this.options.source.naturalWidth||this.it.error(f+" options source must be image and loaded"),this.options.source&&this.videoInited&&this.loadImageTexture()}},i.prototype.handleInitError=function(){if(this.failedTimes++,this.failedTimes>30)throw this.failedTimes=0,this.it.error(f+" get webgl context failed"),wt(Y)},i.prototype.initWebGL=function(t,i){return It(this,void 0,void 0,function(){return gt(this,function(n){return this.width=t,this.height=i,this.initGL(t,i),this.initShaders(),[2]})})},i.prototype.initShaders=function(){this.gl&&(this.blurDownShader=new v(this.gl),this.blurDownShader.createProgram(p,"\n      precision highp float;\n      uniform sampler2D u_ColorSampler;\n      uniform float imageWidth;\n      uniform float imageHeight;\n      uniform int focal;\n      varying vec2 vTexCoord;\n      vec4 blur(int blurRadius,sampler2D sampler,float width,float height){\n        const float PI = 3.14159265;\n        const int maxBlur = 100;\n\n        int center = blurRadius;\n\n        float sita = pow(float(blurRadius) / 6.0, 2.0);\n        float radio = sqrt(0.5 / PI / sita);\n        float sum = 0.0;\n        vec4 sumVec4 = vec4(0.0);\n\n        for(int i = 0; i < maxBlur; i++) if(i<center + 1){\n            \n            float weight =  radio * exp(-pow(float(i), 2.0) / sita / 2.0);\n            float ii = float(i);\n            if(i == 0){\n                vec4 color = texture2D(sampler, vTexCoord);\n                sumVec4 += color * weight;\n                sum += weight;\n            }else{\n                vec4 left = texture2D(sampler, vec2( vTexCoord.x - ii/width, vTexCoord.y));\n                vec4 right = texture2D(sampler, vec2( vTexCoord.x + ii/width, vTexCoord.y));\n                sumVec4 += left * weight;\n                sumVec4 += right * weight;\n                sum += 2.0 * weight;\n            }\n\n        }\n        return vec4(sumVec4.r/sum, sumVec4.g/sum, sumVec4.b/sum, sumVec4.a/sum);\n      }\n      void main(){\n        gl_FragColor = blur(focal, u_ColorSampler, imageWidth, imageHeight);\n      }\n"),this.blurUpShader=new v(this.gl),this.blurUpShader.createProgram(p,"\n    precision highp float;\n    uniform sampler2D u_ColorSampler;\n    uniform float imageWidth;\n    uniform float imageHeight;\n    uniform int focal;\n    varying vec2 vTexCoord;\n    vec4 blur(int blurRadius,sampler2D sampler,float width,float height){\n        const float PI = 3.14159265;\n        const int maxBlur = 100;\n\n        if(blurRadius > maxBlur){\n            blurRadius = maxBlur;\n        }\n        int center = blurRadius;\n\n        float sita = pow(float(blurRadius) / 6.0, 2.0);\n        float radio = sqrt(0.5 / PI / sita);\n        float sum = 0.0;\n        vec4 sumVec4 = vec4(0.0);\n\n        for(int i = 0; i < maxBlur; i++) if(i<center + 1){\n\n            float weight =  radio * exp(-pow(float(i), 2.0) / sita / 2.0);\n            float ii = float(i);\n            if(i == 0){\n                vec4 color = texture2D(sampler, vTexCoord);\n                sumVec4 += color * weight;\n                sum += weight;\n            }else{\n                vec4 left = texture2D(sampler, vec2( vTexCoord.x, vTexCoord.y - ii/height));\n                vec4 right = texture2D(sampler, vec2( vTexCoord.x, vTexCoord.y + ii/height));\n                sumVec4 += left * weight;\n                sumVec4 += right * weight;\n                sum += 2.0 * weight;\n            }\n\n        }\n        return vec4(sumVec4.r/sum, sumVec4.g/sum, sumVec4.b/sum, sumVec4.a/sum);\n    }\n    void main(){\n        gl_FragColor = blur(focal, u_ColorSampler, imageWidth, imageHeight);\n    }\n"),this.blurShader=new v(this.gl),this.blurShader.createProgram(p,"\n  precision highp float;\n  uniform sampler2D u_ColorSampler;\n  uniform sampler2D aSampler;\n  uniform sampler2D vSampler;\n  varying vec2 vTexCoord;\n  varying vec2 vTexCoord2;\n  void main(){\n      vec4 uTexture = texture2D(u_ColorSampler, vTexCoord);\n      vec4 vTexture = texture2D(vSampler, vTexCoord2);\n      vec4 aTexture = texture2D(aSampler, vTexCoord2);\n\n      aTexture.a = (aTexture.a - 0.3) * 2.0;\n      if (aTexture.a < 0.0) {\n          aTexture.a = 0.0;\n      } else if (aTexture.a > 1.0) {\n          aTexture.a = 1.0;\n      }\n      gl_FragColor = vec4((vTexture.rgb * aTexture.a + uTexture.rgb * (1.0 - aTexture.a)), 1.0);\n      // if (aTexture.a > 0.0) {\n      //     gl_FragColor = vTexture;\n      // } else {\n      //     gl_FragColor = uTexture;\n      // }\n  }\n"),this.fitShader=new v(this.gl),this.fitShader.createProgram(p,"\n    precision highp float;\n\n    uniform sampler2D imgSampler;\n    uniform int fit;\n    uniform float bg_ratio;\n    varying vec2 vTexCoord;\n\n    void main() {\n        vec2 uv_scale = vTexCoord;\n        if (fit == 0) {\n            if (bg_ratio <= 1.0) {\n                uv_scale = vec2(vTexCoord.x / bg_ratio, vTexCoord.y);\n                uv_scale.x -= (1.0 - bg_ratio) / bg_ratio / 2.0;\n                if (vTexCoord.x > (1.0 - bg_ratio) / 2.0 && vTexCoord.x < (1.0 + bg_ratio) / 2.0) {\n                    gl_FragColor = texture2D(imgSampler, uv_scale);\n                } else {\n                    gl_FragColor = vec4(0, 0, 0, 1.0);\n                }\n            } else {\n                float y_bg_ratio = 1.0 / bg_ratio;\n                uv_scale = vec2(vTexCoord.x, vTexCoord.y / y_bg_ratio);\n                uv_scale.y -= (1.0 - y_bg_ratio) / y_bg_ratio / 2.0;\n                if (vTexCoord.y > (1.0 - y_bg_ratio) / 2.0 && vTexCoord.y < (1.0 + y_bg_ratio) / 2.0) {\n                    gl_FragColor = texture2D(imgSampler, uv_scale);\n                } else {\n                    gl_FragColor = vec4(0, 0, 0, 1.0);\n                }\n            }\n        } else if (fit == 1) {\n            if (bg_ratio <= 1.0) {\n                uv_scale = vec2(vTexCoord.x, vTexCoord.y * bg_ratio);\n                uv_scale.y += (1.0 - bg_ratio) / 2.0;\n                gl_FragColor = texture2D(imgSampler, uv_scale);\n            } else {\n                float y_bg_ratio = 1.0 / bg_ratio;\n                uv_scale = vec2(vTexCoord.x * y_bg_ratio, vTexCoord.y);\n                uv_scale.x += (1.0 - y_bg_ratio) / 2.0;\n                gl_FragColor = texture2D(imgSampler, uv_scale);\n            }\n        } else {\n            gl_FragColor = texture2D(imgSampler, vTexCoord);\n        }\n    }"),this.noBgShader=new v(this.gl),this.noBgShader.createProgram(p,"\n  precision highp float;\n  uniform sampler2D aSampler;\n  uniform sampler2D vSampler;\n  varying vec2 vTexCoord;\n  varying vec2 vTexCoord2;\n  void main(){\n      vec4 vTexture = texture2D(vSampler, vTexCoord);\n      vec4 aTexture = texture2D(aSampler, vTexCoord2);\n\n      aTexture.a = (aTexture.a - 0.3) * 2.0;\n      if (aTexture.a > 0.0) {\n          gl_FragColor = vTexture;\n      } else {\n          gl_FragColor = vec4(0, 0, 0, 0);\n      }\n  }\n"))},i.prototype.initGL=function(t,i){var n=this.gl;if(!n)return this.it.error(f+" webgl context not found");this.blurDownInfo=this.createFrameBuffer(),this.blurUpInfo=this.createFrameBuffer(),this.fitFrameInfo=this.createFrameBuffer(),this.blurFrameInfo=this.createFrameBuffer(),this.FSIZE=this.vertices.BYTES_PER_ELEMENT,this.vertexBufferObject=n.createBuffer(),n.viewport(0,0,t,i)},i.prototype.checkResolution=function(t){if((this.width!==t.videoWidth||this.height!==t.videoHeight)&&(Math.abs(this.width-t.videoWidth)>2||Math.abs(this.height-t.videoHeight)>2)){if(0===t.videoHeight||0===t.videoWidth)return;this.it.info(f+" resolution changed to ".concat(t.videoWidth,"x").concat(t.videoHeight,", reset resolution.")),this.resetResolution(t.videoWidth,t.videoHeight),"img"===this.options.type&&this.loadImageTexture()}},i.prototype.resetResolution=function(t,i){var n,r,e,o,s,u,c,a,l,h;this.it.info(f+" reset resolution"),this.renderQueue=[],this.setRenderResolution(t,i),(null===(n=this.blurDownInfo)||void 0===n?void 0:n.texture)&&this.resetTexture(null===(r=this.blurDownInfo)||void 0===r?void 0:r.texture),(null===(e=this.blurUpInfo)||void 0===e?void 0:e.texture)&&this.resetTexture(null===(o=this.blurUpInfo)||void 0===o?void 0:o.texture),(null===(s=this.fitFrameInfo)||void 0===s?void 0:s.texture)&&this.resetTexture(null===(u=this.fitFrameInfo)||void 0===u?void 0:u.texture),(null===(c=this.blurFrameInfo)||void 0===c?void 0:c.texture)&&this.resetTexture(null===(a=this.blurFrameInfo)||void 0===a?void 0:a.texture),null===(l=this.vcMgr)||void 0===l||l.resetResolution(t,i),null===(h=this.gl)||void 0===h||h.viewport(0,0,this.width,this.height),"safari"===this.ot&&(this.canvasTrack=null,this.rt=!0,this.outputChange(),this.rt=!1)},i.prototype.setBackgroundBlur=function(t,i){var n;this.drawBuffer(t,this.blurDownShader,this.blurDownInfo,i),this.drawBuffer(t,this.blurUpShader,this.blurUpInfo,{texture:null===(n=this.blurDownInfo)||void 0===n?void 0:n.texture,w:i.w,h:i.h})},i.prototype.loadImageTexture=function(){if(this.options.source){var t=this.gl;if(t){var i=this.fitShader.program;if(i)if(this.width&&this.height){t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.useProgram(i),t.bindFramebuffer(t.FRAMEBUFFER,this.fitFrameInfo.frameBuffer),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBufferObject),t.bufferData(t.ARRAY_BUFFER,this.vertices,t.STATIC_DRAW);var n=t.getAttribLocation(i,"aPosition"),r=t.getAttribLocation(i,"aTexCoord");t.vertexAttribPointer(n,2,t.FLOAT,!1,4*this.FSIZE,0),t.vertexAttribPointer(r,2,t.FLOAT,!1,4*this.FSIZE,2*this.FSIZE),t.enableVertexAttribArray(n),t.enableVertexAttribArray(r);var e=t.getUniformLocation(i,"imgSampler"),o=t.getUniformLocation(i,"fit");this.it.info(f+" fit ".concat(this.fit)),t.uniform1i(o,this.fit);var s=t.getUniformLocation(i,"bg_ratio");t.uniform1f(s,this.options.source.naturalWidth*this.height/this.options.source.naturalHeight/this.width);var u=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,u),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.options.source),t.uniform1i(e,0),this.nt&&(t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)),t.drawArrays(t.TRIANGLE_STRIP,0,4),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteTexture(u)}else this.it.info(f+" load img width: ".concat(this.width," height: ").concat(this.height))}}},i.prototype.drawBuffer=function(t,i,n,r){var e=i.program;if(!e)return this.it.info(f+" shader has no program"),null;t.useProgram(e),t.bindFramebuffer(t.FRAMEBUFFER,n.frameBuffer),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBufferObject),t.bufferData(t.ARRAY_BUFFER,this.vertices,t.STATIC_DRAW);var o=t.getAttribLocation(e,"aPosition"),s=t.getAttribLocation(e,"aTexCoord");t.vertexAttribPointer(o,2,t.FLOAT,!1,4*this.FSIZE,0),t.vertexAttribPointer(s,2,t.FLOAT,!1,4*this.FSIZE,2*this.FSIZE),t.enableVertexAttribArray(o),t.enableVertexAttribArray(s),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),r.texture&&(t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,r.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE));var u=t.getUniformLocation(e,"u_ColorSampler"),c=t.getUniformLocation(e,"imageWidth"),a=t.getUniformLocation(e,"imageHeight"),l=t.getUniformLocation(e,"focal");return t.uniform1i(u,0),t.uniform1f(c,r.w),t.uniform1f(a,r.h),t.uniform1i(l,this.focalNum),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),this.nt&&(t.clearColor(1,1,1,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)),t.drawArrays(t.TRIANGLE_STRIP,0,4),t.bindFramebuffer(t.FRAMEBUFFER,null),n.texture},i.prototype.createFrameBuffer=function(){var t=this.gl;if(t){var i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE);var n=t.createFramebuffer();return t.bindFramebuffer(t.FRAMEBUFFER,n),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0),t.bindFramebuffer(t.FRAMEBUFFER,null),{texture:i,frameBuffer:n}}},i.prototype.getAlphaDatas=function(){return It(this,void 0,void 0,function(){var t=this;return gt(this,function(i){return[2,new C(function(i,n){return It(t,void 0,void 0,function(){var t;return gt(this,function(r){return this.imgCtx?(this.imgCtx.drawImage(this.video,0,0,this.imgCanvas.width,this.imgCanvas.height),this.imgData=null===(t=this.imgCtx.getImageData(0,0,this.imgCanvas.width,this.imgCanvas.height))||void 0===t?void 0:t.data,this.worker.runFeeds(this.imgData.buffer,this.seg,this.width,this.height).then(function(t){var n=new Uint8Array(t);i(n)}).catch(function(t){n(t)}),this.executeRenderingTasks(),[2]):[2]})})})]})})},i.prototype.drawBack=function(){},i.prototype.executeRenderingTasks=function(){if(this.renderQueue.length>0){var t=this.renderQueue.shift();if(t)this.renderImage(this.gl,t.alphas,t.vTexture,t.w,t.h),this.drawBack()}},i.prototype.getAlphaData=function(){return It(this,void 0,void 0,function(){var t=this;return gt(this,function(i){return[2,new C(function(i,n){var r,e,o,s,u;if(t.imgCtx){t.imgCtx.drawImage(t.video,0,0,t.imgCanvas.width,t.imgCanvas.height),t.imgData=null===(r=t.imgCtx.getImageData(0,0,t.imgCanvas.width,t.imgCanvas.height))||void 0===r?void 0:r.data,t.imgFloatData=Float32Array.from(t.imgData);var c=new Float32Array([t.height,t.width]),a=new W.Tensor("float32",c,[1,2]);t.imgTensor=new W.Tensor("float32",t.imgFloatData,[1,t.imgCanvas.height,t.imgCanvas.width,4]);var l={src:t.imgTensor,dim:a,r1:null===(e=t.tensors)||void 0===e?void 0:e.r1,r2:null===(o=t.tensors)||void 0===o?void 0:o.r2,r3:null===(s=t.tensors)||void 0===s?void 0:s.r3,r4:null===(u=t.tensors)||void 0===u?void 0:u.r4};(new Date).getTime();t.onnxSession.run(l).then(function(n){(new Date).getTime();t.tensors.r1=n.o1,t.tensors.r2=n.o2,t.tensors.r3=n.o3,t.tensors.r4=n.o4;var r=new Uint8Array(n.res.data);i(r)}).catch(function(t){n(t)})}})]})})},i.prototype.loadOnnxTexture=function(t,i,n,r){if(!this.gl)return null;var e=this.gl,o=e.getUniformLocation(i,"aSampler");this.nt&&(e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT));var s=e.createTexture();return e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,s),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,n,r,0,e.ALPHA,e.UNSIGNED_BYTE,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.uniform1i(o,1),s},i.prototype.drawBlurs=function(t,i,n,r,e){var o=this.gl;if(o){var s=this.blurShader.program;if(s&&(o.useProgram(s),this.renderOutputBuffer&&o.bindFramebuffer(o.FRAMEBUFFER,this.blurFrameInfo.frameBuffer),t.length===r*e)){var u=this.loadOnnxTexture(t,s,r,e);o.viewport(0,0,this.width,this.height),o.bindBuffer(o.ARRAY_BUFFER,this.vertexBufferObject),o.bufferData(o.ARRAY_BUFFER,this.vertices,o.STATIC_DRAW);var c=o.getAttribLocation(s,"aPosition"),a=o.getAttribLocation(s,"aTexCoord"),l=o.getAttribLocation(s,"aTexCoord2");o.vertexAttribPointer(c,2,o.FLOAT,!1,4*this.FSIZE,0),o.vertexAttribPointer(a,2,o.FLOAT,!1,4*this.FSIZE,2*this.FSIZE),o.vertexAttribPointer(l,2,o.FLOAT,!1,4*this.FSIZE,2*this.FSIZE),o.enableVertexAttribArray(c),o.enableVertexAttribArray(a),o.enableVertexAttribArray(l);var h=o.getUniformLocation(s,"u_ColorSampler");this.nt&&(o.clearColor(1,1,1,0),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT)),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,1),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,i),o.uniform1i(h,0);var d=o.getUniformLocation(s,"vSampler");o.activeTexture(o.TEXTURE2),o.bindTexture(o.TEXTURE_2D,n),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.uniform1i(d,2),o.drawArrays(o.TRIANGLE_STRIP,0,4),this.renderOutputBuffer&&o.bindFramebuffer(o.FRAMEBUFFER,null),o.deleteTexture(u),o.deleteTexture(n)}}},i.prototype.drawNoBgs=function(t,i,n,r){var e=this.gl;if(e){var o=this.noBgShader.program;if(o){e.useProgram(o),this.renderOutputBuffer&&e.bindFramebuffer(e.FRAMEBUFFER,this.blurFrameInfo.frameBuffer);var s=this.loadOnnxTexture(t,o,n,r);e.viewport(0,0,this.width,this.height),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBufferObject),e.bufferData(e.ARRAY_BUFFER,this.vertices,e.STATIC_DRAW);var u=e.getAttribLocation(o,"aPosition"),c=e.getAttribLocation(o,"aTexCoord"),a=e.getAttribLocation(o,"aTexCoord2");e.vertexAttribPointer(u,2,e.FLOAT,!1,4*this.FSIZE,0),e.vertexAttribPointer(c,2,e.FLOAT,!1,4*this.FSIZE,2*this.FSIZE),e.vertexAttribPointer(a,2,e.FLOAT,!1,4*this.FSIZE,2*this.FSIZE),e.enableVertexAttribArray(u),e.enableVertexAttribArray(c),e.enableVertexAttribArray(a);var l=e.getUniformLocation(o,"vSampler");e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.uniform1i(l,2),e.drawArrays(e.TRIANGLE_STRIP,0,4),this.renderOutputBuffer&&e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(s),e.deleteTexture(i)}}},i.prototype.onError=function(t,i){this.tt.actionListener("backgroundEffectError",this.preview.localStream,t.code,t.message)},i}(y),Kt=function(t,i,n,r){return new(n||(n=Promise))(function(e,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(s,u)}c((r=r.apply(t,i||[])).next())})},Rt=function(t,i){var n,r,e,o,s={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(e=2&u[0]?r.return:u[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,u[1])).done)return e;switch(r=0,e&&(u=[2&u[0],e.value]),u[0]){case 0:case 1:e=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(e=s.trys,(e=e.length>0&&e[e.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!e||u[1]>e[0]&&u[1]<e[3])){s.label=u[1];break}if(6===u[0]&&s.label<e[1]){s.label=e[1],e=u;break}if(e&&s.label<e[2]){s.label=e[2],s.ops.push(u);break}e[2]&&s.ops.pop(),s.trys.pop();continue}u=i.call(t,s)}catch(t){u=[6,t],r=0}finally{n=e=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},kt=function(){function t(t,i,n,r){this.it=t,this.tt=i,this.preview=n,this._enabled=!1,this.processNode=new St(t,i,this.preview,r)}return Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoNodeQueue",{get:function(){return this.preview.videoNodeQueue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vcMgr",{get:function(){return this.preview.vcMgr},enumerable:!1,configurable:!0}),t.prototype.enable=function(t){var i;return Kt(this,void 0,void 0,function(){return Rt(this,function(n){switch(n.label){case 0:return this.it.info(d+" call"),this.enabled?[2]:(t&&this.processNode.setProcessConfig(t),this.videoNodeQueue.isConnected(this.processNode)?[3,4]:this.preview.videoTrack&&(null===(i=this.vcMgr)||void 0===i?void 0:i.renderTrack)!==this.preview.videoTrack?[4,this.videoNodeQueue.replaceNewSourceByTrack(this.preview.videoTrack)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[4,this.videoNodeQueue.pushFront(this.processNode)];case 3:n.sent(),n.label=4;case 4:return this._enabled=!0,this.it.info(d+" background blur processor enabled"),[2]}})})},t.prototype.disable=function(){return Kt(this,void 0,void 0,function(){return Rt(this,function(t){switch(t.label){case 0:return this.it.info(h+" call"),this.enabled?[4,this.videoNodeQueue.remove(this.processNode)]:[2];case 1:return t.sent(),this._enabled=!1,this.it.info(h+" background blur processor disabled"),[2]}})})},t.prototype.setOptions=function(t){this.processNode.setOptions(t)},t.prototype.getCanvas=function(){return this.processNode.renderCanvas},t.prototype.setDrawBack=function(t){this.processNode.drawBack=t},t.prototype.pauseRender=function(t){this.processNode.pauseRender(t)},t.prototype.release=function(){this.processNode.release(),this.processNode=null},t}(),Ct=function(t,i,n,r){return new(n||(n=Promise))(function(e,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(s,u)}c((r=r.apply(t,i||[])).next())})},Tt=function(t,i){var n,r,e,o,s={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(e=2&u[0]?r.return:u[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,u[1])).done)return e;switch(r=0,e&&(u=[2&u[0],e.value]),u[0]){case 0:case 1:e=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(e=s.trys,(e=e.length>0&&e[e.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!e||u[1]>e[0]&&u[1]<e[3])){s.label=u[1];break}if(6===u[0]&&s.label<e[1]){s.label=e[1],e=u;break}if(e&&s.label<e[2]){s.label=e[2],s.ops.push(u);break}e[2]&&s.ops.pop(),s.trys.pop();continue}u=i.call(t,s)}catch(t){u=[6,t],r=0}finally{n=e=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},Jt=function(){function t(t){var i=this;this.tt=t,this.sessionMap={},this.rADataMap={},this.gADataMap={},this.seq=0;var n=this.worker=this.createWorker(function(){var t,i={};self.onmessage=function(n){var r,e,o,s,u,c,a,l,h=n.data[n.data.length-1];if("session"===h){var d=n.data,f=d[0],b=d[2],m=d[3],Z=function(t){for(var i=atob(t),n=new Uint8Array(i.length),r=0;r<i.length;r++)n[r]=i.charCodeAt(r);var e=new Blob([n],{type:"application/javascript"});return URL.createObjectURL(e)}(d[1]);self.importScripts(Z);var y=URL.createObjectURL(b);ort.env.wasm.numThreads=1,ort.env.wasm.wasmPaths={"ort-wasm.wasm":y,"ort-wasm-simd.wasm":y},0===m&&ort.InferenceSession.create(f,{executionProviders:["wasm"]}).then(function(t){var n,r,e,o,s,u,c,a=(n=new Float32Array(50176).fill(0),r=new ort.Tensor("float32",n,[1,16,56,56]),e=new Float32Array(15680).fill(0),o=new ort.Tensor("float32",e,[1,20,28,28]),s=new Float32Array(7840).fill(0),u=new ort.Tensor("float32",s,[1,40,14,14]),c=new Float32Array(2352).fill(0),{r1:r,r2:o,r3:u,r4:new ort.Tensor("float32",c,[1,48,7,7])});i[m]={s:t,t:a},self.postMessage([m,"sessionInited"])}).catch(function(t){self.postMessage([t,m,"sessionFail"])})}else if("feeds"===h){var v=n.data,p=v[1],W=v[2],X=v[3],G=v[4];t=new ort.Tensor("float32",Float32Array.from(new Uint8ClampedArray(v[0])),[1,112,112,4]);var V=new Float32Array([X,W]),I=new ort.Tensor("float32",V,[1,2]),g={src:t,dim:I,r1:null===(e=null===(r=i[G])||void 0===r?void 0:r.t)||void 0===e?void 0:e.r1,r2:null===(s=null===(o=i[G])||void 0===o?void 0:o.t)||void 0===s?void 0:s.r2,r3:null===(c=null===(u=i[G])||void 0===u?void 0:u.t)||void 0===c?void 0:c.r3,r4:null===(l=null===(a=i[G])||void 0===a?void 0:a.t)||void 0===l?void 0:l.r4};i[G].s.run(g).then(function(t){i[G].t.r1=t.o1,i[G].t.r2=t.o2,i[G].t.r3=t.o3,i[G].t.r4=t.o4;var n=new Uint8Array(t.res.data).buffer;self.postMessage([n,p,G,"feeds"],[n])}).catch(function(t){})}}});n.postMessage("Hello World"),n.onmessage=function(t){var n=t.data[t.data.length-1],r=t.data[t.data.length-2];if("sessionInited"===n)i.sessionMap[r]&&i.sessionMap[r].suc(),delete i.sessionMap[r];else if("sessionFail"===n){i.sessionMap[r]&&i.sessionMap[r].fail(t.data[0]),delete i.sessionMap[r]}else if("feeds"===n){var e=t.data,o=e[1];0==r&&i.rADataMap[o]&&(i.rADataMap[o](e[0]),delete i.rADataMap[o])}}}return t.prototype.createWorker=function(t){var i=new Blob(["("+t.toString()+")()"],{type:"application/javascript"}),n=window.URL.createObjectURL(i);return new Worker(n)},t.prototype.createSession=function(t,i,n){var r=this;return new C(function(e,o){var s=i.buffer,u=r.tt.browserInfo,c=u.version.split("."),a="Safari"===u.name||"Chrome"===u.name&&parseInt(c[0])<91?"zego-wasm.wasm":"zego-wasm-simd.wasm",l=n.endsWith("/")?"":"/";fetch(n+l+a).then(function(i){return Ct(r,void 0,void 0,function(){var n;return Tt(this,function(r){switch(r.label){case 0:return[4,i.blob()];case 1:return n=r.sent(),this.worker.postMessage([s,"LyohCiogT05OWCBSdW50aW1lIFdlYiB2MS4xNS4wCiogQ29weXJpZ2h0IChjKSBNaWNyb3NvZnQgQ29ycG9yYXRpb24uIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiogTGljZW5zZWQgdW5kZXIgdGhlIE1JVCBMaWNlbnNlLgoqLwohZnVuY3Rpb24oZSx0KXsib2JqZWN0Ij09dHlwZW9mIGV4cG9ydHMmJiJvYmplY3QiPT10eXBlb2YgbW9kdWxlP21vZHVsZS5leHBvcnRzPXQoKToiZnVuY3Rpb24iPT10eXBlb2YgZGVmaW5lJiZkZWZpbmUuYW1kP2RlZmluZShbXSx0KToib2JqZWN0Ij09dHlwZW9mIGV4cG9ydHM/ZXhwb3J0cy5vcnQ9dCgpOmUub3J0PXQoKX0oc2VsZiwoKCk9PigoKT0+e3ZhciBlPXs0NTM6KGUsdCxuKT0+eyJ1c2Ugc3RyaWN0IjtuLnIodCksbi5kKHQse0luZmVyZW5jZVNlc3Npb246KCk9PnAsVGVuc29yOigpPT5kLGVudjooKT0+YSxyZWdpc3RlckJhY2tlbmQ6KCk9Pml9KTtjb25zdCByPXt9LG89W10saT0oZSx0LG4pPT57aWYoIXR8fCJmdW5jdGlvbiIhPXR5cGVvZiB0LmluaXR8fCJmdW5jdGlvbiIhPXR5cGVvZiB0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k9Pntmb3IodmFyIHIgaW4gdCluLm8odCxyKSYmIW4ubyhlLHIpJiZPYmplY3QuZGVmaW5lUHJvcGVydHkoZSxyLHtlbnVtZXJhYmxlOiEwLGdldDp0W3JdfSl9LG4ubz0oZSx0KT0+T2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKGUsdCksbi5yPWU9PnsidW5kZWZpbmVkIiE9dHlwZW9mIFN5bWJvbCYmU3ltYm9sLnRvU3RyaW5nVGFnJiZPYmplY3QuZGVmaW5lUHJvcGVydHkoZSxTeW1ib2wudG9TdHJpbmdUYWcse3ZhbHVlOiJNb2R1bGUifSksT2JqZWN0LmRlZmluZVByb3BlcnR5KGUsIl9fZXNNb2R1bGUiLHt2YWx1ZTohMH0pfSxuKDE4KX0pKCkpKTs=",n,t,"session"],[s]),this.sessionMap[t]={suc:e,fail:o},[2]}})})}).catch(function(t){o(t)})})},t.prototype.runFeeds=function(t,i,n,r){var e=this;return new C(function(o,s){e.seq++,0==i&&(e.rADataMap[e.seq]=o),e.worker.postMessage([t,e.seq,n,r,i,"feeds"],[t])})},t.prototype.release=function(){this.rADataMap={}},t}(),Lt=r(1396),xt=r.n(Lt),Nt=r(1710),Ht=r.n(Nt),Ft=function(t,i,n,r){return new(n||(n=Promise))(function(e,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(s,u)}c((r=r.apply(t,i||[])).next())})},Bt=function(t,i){var n,r,e,o,s={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(e=2&u[0]?r.return:u[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,u[1])).done)return e;switch(r=0,e&&(u=[2&u[0],e.value]),u[0]){case 0:case 1:e=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(e=s.trys,(e=e.length>0&&e[e.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!e||u[1]>e[0]&&u[1]<e[3])){s.label=u[1];break}if(6===u[0]&&s.label<e[1]){s.label=e[1],e=u;break}if(e&&s.label<e[2]){s.label=e[2],s.ops.push(u);break}e[2]&&s.ops.pop(),s.trys.pop();continue}u=i.call(t,s)}catch(t){u=[6,t],r=0}finally{n=e=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};xt().enc.u8array={stringify:function(t){for(var i=t.words,n=t.sigBytes,r=new Uint8Array(n),e=0;e<n;e++){r[e]=i[e>>>2]>>>24-e%4*8&255}return r},parse:function(t){for(var i=t.length,n=[],r=0;r<i;r++)n[r>>>2]|=(255&t[r])<<24-r%4*8;return xt().lib.WordArray.create(n,i)}};var Pt=[12,38,175,226,26,104,22,115,84,19,253,104,183,221,143,160,193,87,166,144,255,205,179,84,97,16,7,213,126,219,30,76,233],Ut=[255,21,76,211,85,254,8,161,1,0,52,171,34,79,19,7],zt=b.createError,Mt=112,jt=112,Qt=1,Et=function(){function t(t,i,n){this.it=t,this.tt=i,this.st=n,this.modelInputW=Mt,this.modelInputH=jt,this.alphaDataType=Qt,this.processorMap=null,this.onnxInited=!1}return t.prototype.getPreview=function(t){var i=this.st.checkPreview(t);if(!i)throw zt(V);return i},t.prototype.initModule=function(t,i){return Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.initSessions(t,i,this.modelInputW,this.modelInputH)];case 1:return r.sent(),[3,3];case 2:throw n=r.sent(),zt(I,n.message);case 3:return[2]}})})},t.prototype.getProcessor=function(t){var i;return Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){if(!this.onnxInited)throw zt(g,"Background Blur Module has not been loaded.");if(this.processorMap||(this.processorMap=new Map),!this.processorMap.get(t.id)){n=this.getPreview(t);try{null===(i=n.vcMgr)||void 0===i||i.init(n.videoTrack)}catch(t){if(1001===t)throw Y}this.processorMap.set(t.id,new kt(this.it,this.tt,n,{realSegOnnx:this.realSegOnnx,greenOnnx:this.greenOnnx,worker:this.worker}))}return[2,this.processorMap.get(t.id)]})})},t.prototype.initSessions=function(t,i,n,r){return Ft(this,void 0,void 0,function(){var e,o;return Bt(this,function(s){switch(s.label){case 0:return this.worker=new Jt(this.tt),0!==t?[3,3]:[4,this.getMData(i+"/web.data")];case 1:return e=s.sent(),o=this,[4,this.getSession(i,t,e,n,r)];case 2:o.realSegOnnx=s.sent(),this.onnxInited=!0,s.label=3;case 3:return[2]}})})},t.prototype.getMData=function(t){var i=this;return new C(function(n,r){return Ft(i,void 0,void 0,function(){var i,e,o,s,u=this;return Bt(this,function(c){return i=new Uint8Array(Pt),e=new Uint8Array(Ut),o=xt().enc.u8array.parse(i),s=xt().enc.u8array.parse(e),fetch(t).then(function(t){return Ft(u,void 0,void 0,function(){var i,e=this;return Bt(this,function(u){switch(u.label){case 0:return[4,t.blob()];case 1:return(i=u.sent()).size<1e4&&i.type?(r({message:"can not fetch the data, please check the path is correct"}),[2]):(Ht().loadAsync(i).then(function(t){for(var i in t.files)t.files[i].dir||/\.(txt)$/.test(t.files[i].name)&&t.file(t.files[i].name).async("arraybuffer").then(function(t){var i,r,e,u=new Uint8Array(t),c=(i=u,r=xt().enc.u8array.parse(i).toString(xt().enc.Base64),e=xt().AES.decrypt(r,o,{iv:s,mode:xt().mode.CFB,padding:xt().pad.NoPadding}),xt().enc.u8array.stringify(e));n(c)}).catch(function(t){e.it.warn(a+" load data "+JSON.stringify(t))})}),[2])}})})}).catch(function(t){u.it.warn(a+" fetch data "+JSON.stringify(t)),r(t)}),[2]})})})},t.prototype.getSession=function(t,i,n,r,e){return Ft(this,void 0,void 0,function(){var r,e,o,s,u,c,l,h,d,f,b,m,Z;return Bt(this,function(y){switch(y.label){case 0:return W.env.wasm.wasmPaths={"ort-wasm.wasm":t+"/zego-wasm.wasm","ort-wasm-simd.wasm":t+"/zego-wasm-simd.wasm"},0!=this.alphaDataType?[3,2]:[4,W.InferenceSession.create(n,{executionProviders:["wasm"],graphOptimizationLevel:"extended",executionMode:"parallel"})];case 1:return r=y.sent(),d=(h=(l=(c=this.modelInputW/2)/2)/2)/2,f=new Float32Array(16*c*c).fill(0),e=new W.Tensor("float32",f,[1,16,c,c]),b=new Float32Array(20*l*l).fill(0),o=new W.Tensor("float32",b,[1,20,l,l]),m=new Float32Array(40*h*h).fill(0),s=new W.Tensor("float32",m,[1,40,h,h]),Z=new Float32Array(48*d*d).fill(0),u=new W.Tensor("float32",Z,[1,48,d,d]),[3,4];case 2:return[4,this.worker.createSession(i,n,t)];case 3:y.sent(),y.label=4;case 4:return this.it.info(a+" session inited"),[2,{session:r,seg:i,tensors:{r1:e,r2:o,r3:s,r4:u}}]}})})},t.prototype.releaseMap=function(t){var i;null===(i=this.processorMap)||void 0===i||i.delete(t.id)},t}();function Dt(t,i){if(t&&!U(t)&&t.zegoStream){if(i.info("cu.gs type:zego"),U(t.stream))return t.stream;throw new Error("The ZegoLocalStream type requires first calling the capture api to capture the stream")}return t}var At,Ot=function(){return Ot=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},Ot.apply(this,arguments)},_t=function(t,i,n,r){return new(n||(n=Promise))(function(e,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(s,u)}c((r=r.apply(t,i||[])).next())})},qt=function(t,i){var n,r,e,o,s={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(e=2&u[0]?r.return:u[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,u[1])).done)return e;switch(r=0,e&&(u=[2&u[0],e.value]),u[0]){case 0:case 1:e=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(e=s.trys,(e=e.length>0&&e[e.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!e||u[1]>e[0]&&u[1]<e[3])){s.label=u[1];break}if(6===u[0]&&s.label<e[1]){s.label=e[1],e=u;break}if(e&&s.label<e[2]){s.label=e[2],s.ops.push(u);break}e[2]&&s.ops.pop(),s.trys.pop();continue}u=i.call(t,s)}catch(t){u=[6,t],r=0}finally{n=e=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};!function(t){t[t.I=0]="I",t[t.H=10]="H",t[t.M=100]="M",t[t.L=1e3]="L"}(At||(At={}));var $t=b.createError;function ti(t,i,n,r,e){return function(o,s){t.error(i+" "+o.message+(s?" "+s:"")),r.setError(e,{code:o.code,message:o.message+(s||"")}),n({errorCode:o.code||-1,extendedData:o.message+(s?" "+s:"")})}}function ii(t,i,n){return!P(t)||(n(G," param '".concat(i,"' is needed, cannot be undefined.")),!1)}function ni(t,i,n,r,e){return!!("string"==typeof n&&typeof t===n||function(t){return null!==t&&t instanceof Object}(t)&&t instanceof n)||(e(G," param '".concat(i,"' should be the type of '").concat(r,"'")),!1)}function ri(t,i){if("Safari"===t.name){var n=t.version.split(".");if(parseInt(n[0])<14||14===parseInt(n[0])&&parseInt(n[1])<=1)return i(Y," Not support safari, please switch other browser and retry."),!1}if(null===(e=null===(r=Wt())||void 0===r?void 0:r.toLowerCase())||void 0===e?void 0:e.match(/MicroMessenger/i))return i(Y," Not support the browser, please switch other browser and retry."),!1;var r,e,o=!P(WebGLRenderingContext),s=!P(WebAssembly);return o?!!s||(i(Y," browser not support WebAssembly, please switch other browser and retry."),!1):(i(Y," browser not support webgl, please switch other browser and retry."),!1)}function ei(t,i,n){return i.backgroundBlurManager||(i.backgroundBlurManager=new Et(t,i,n)),i.backgroundBlurManager}var oi={initBackgroundModule:function(t,r){var e=this;return new C(function(o,s){return _t(e,void 0,void 0,function(){var e,u,c;return qt(this,function(a){switch(a.label){case 0:if((e=this.reporter.createSpan(At.H,{key:k},{key:""},i)).setAttributes({segmentation:n(t)}),u=ti(this.logger,"zc.p.0.lbm",s,this.stateCenter.reporter,e),!ri(this.stateCenter.browserInfo,u))return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,ei(this.logger,this.stateCenter,this.streamCenter).initModule(t,r)];case 2:return a.sent(),[3,4];case 3:return c=a.sent(),u(c),[2];case 4:return e.end(),o({errorCode:0,extendedData:"Background blur model successfully loaded"}),[2]}})})})},enableBackgroundProcess:function(t,i,n){var r,e,a=this;var h=Dt(t,this.logger),d=function(t){var i=a.streamCenter.checkPreview(t);if(!i)throw $t(V);return i}(h),f=this.streamCenter.getPublishList(h);if(null===(r=d.streamCompositor)||void 0===r?void 0:r.outputStream){var b=this.streamCenter.getPublishList(null===(e=d.streamCompositor)||void 0===e?void 0:e.outputStream);f.push.apply(f,b)}var m=function(t){return _t(a,void 0,void 0,function(){return qt(this,function(i){switch(i.label){case 0:return[4,ei(this.logger,this.stateCenter,this.streamCenter).getProcessor(t)];case 1:return[2,i.sent()]}})})};return new C(function(t,r){return _t(a,void 0,void 0,function(){var e,a,b,Z;return qt(this,function(y){switch(y.label){case 0:(e=this.reporter.createSpan(At.H,{key:k},{key:""},o)).setAttributes({segmentation:c(n),media_stream_id:s(h.id),enable:u(i)}),a=ti(this.logger,l,r,this.stateCenter.reporter,e),y.label=1;case 1:return y.trys.push([1,7,,8]),ri(this.stateCenter.browserInfo,a)&&ii(h,"localStream",a)&&ii(i,"enable",a)&&ni(h,"localStream",MediaStream,"MediaStream",a)&&ni(i,"enable","boolean","boolean",a)?0===h.getVideoTracks().length?(a(X,"input stream should have video track"),[2]):d.isVideoEnabled?f.length>0&&!1===this.stateCenter.supportBg?(a(K),[2]):[4,m(h)]:(a(w),[2]):[2];case 2:return b=y.sent(),d.backgroundProcessor=b,i?[4,b.enable({segmentation:n})]:[3,4];case 3:return y.sent(),d.isBackgroundBlur=!0,[3,6];case 4:return[4,b.disable()];case 5:y.sent(),d.isBackgroundBlur=!1,y.label=6;case 6:return[3,8];case 7:return Z=y.sent(),this.logger.error(l+" "+Z),a(Z),[2];case 8:return e.end(),t({errorCode:0,extendedData:"Blur Background"+(i?"enabled.":"disabled.")}),[2]}})})})},setBackgroundBlurOptions:function(t,i){return _t(this,void 0,void 0,function(){var n,r,e=this;return qt(this,function(o){switch(o.label){case 0:n=Dt(t,this.logger),r=function(t){return _t(e,void 0,void 0,function(){return qt(this,function(i){switch(i.label){case 0:return[4,ei(this.logger,this.stateCenter,this.streamCenter).getProcessor(t)];case 1:return[2,i.sent()]}})})},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r(n)];case 2:return o.sent().setOptions(Ot(Ot({},i),{type:"blur"})),[2,!0];case 3:return o.sent(),[2,!1];case 4:return[2]}})})},setVirtualBackgroundOptions:function(t,i){return _t(this,void 0,void 0,function(){var n,r,e=this;return qt(this,function(o){switch(o.label){case 0:if(!i.source&&!i.objectFit)return this.logger.error(l+" options must have source or ObjectFit"),[2,!1];if(i.source&&(!z(i.source)||!i.source.naturalWidth))return this.logger.error(l+" options source must be image and loaded"),[2,!1];n=Dt(t,this.logger),r=function(t){return _t(e,void 0,void 0,function(){return qt(this,function(i){switch(i.label){case 0:return[4,ei(this.logger,this.stateCenter,this.streamCenter).getProcessor(t)];case 1:return[2,i.sent()]}})})},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r(n)];case 2:return o.sent().setOptions(Ot(Ot({},i),{type:"img"})),[2,!0];case 3:return o.sent(),[2,!1];case 4:return[2]}})})},setTransparentBackgroundOptions:function(t){return _t(this,void 0,void 0,function(){var i,n,r=this;return qt(this,function(e){switch(e.label){case 0:i=Dt(t,this.logger),n=function(t){return _t(r,void 0,void 0,function(){return qt(this,function(i){switch(i.label){case 0:return[4,ei(this.logger,this.stateCenter,this.streamCenter).getProcessor(t)];case 1:return[2,i.sent()]}})})},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,n(i)];case 2:return e.sent().setOptions({type:"none"}),[2,!0];case 3:return e.sent(),[2,!1];case 4:return[2]}})})}},si={install:function(t){for(var i in oi)Object.defineProperty(t.prototype,i,{value:oi[i],writable:!1})},get type(){return"BackgroundProcess"}}}(),e}()});