zmp-sdk 2.14.3 → 2.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.min.js +11 -12
- package/dist/index.es.js +11 -12
- package/dist/index.js +3 -3
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zmp={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}function r(e){return e&&e.default||e}var i=n((function(e,n){(function(){var r,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,u=32,c=64,l=128,f=256,h=1/0,d=9007199254740991,p=NaN,v=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",u],["partialRight",c],["rearg",f]],_="[object Arguments]",m="[object Array]",y="[object Boolean]",w="[object Date]",b="[object Error]",k="[object Function]",E="[object GeneratorFunction]",S="[object Map]",A="[object Number]",C="[object Object]",T="[object Promise]",x="[object RegExp]",R="[object Set]",O="[object String]",I="[object Symbol]",N="[object WeakMap]",j="[object ArrayBuffer]",L="[object DataView]",P="[object Float32Array]",B="[object Float64Array]",M="[object Int8Array]",z="[object Int16Array]",U="[object Int32Array]",D="[object Uint8Array]",F="[object Uint8ClampedArray]",q="[object Uint16Array]",Z="[object Uint32Array]",W=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,G=RegExp(K.source),J=RegExp(Y.source),V=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(re.source),oe=/^\s+/,ae=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,_e=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",xe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="['’]",Oe="[\\ud800-\\udfff]",Ie="["+xe+"]",Ne="["+Ee+"]",je="\\d+",Le="[\\u2700-\\u27bf]",Pe="["+Ae+"]",Be="[^\\ud800-\\udfff"+xe+je+Se+Ae+Ce+"]",Me="\\ud83c[\\udffb-\\udfff]",ze="[^\\ud800-\\udfff]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Ce+"]",qe="(?:"+Pe+"|"+Be+")",Ze="(?:"+Fe+"|"+Be+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Ne+"|"+Me+")"+"?",Ke="[\\ufe0e\\ufe0f]?",Ye=Ke+He+("(?:\\u200d(?:"+[ze,Ue,De].join("|")+")"+Ke+He+")*"),Ge="(?:"+[Le,Ue,De].join("|")+")"+Ye,Je="(?:"+[ze+Ne+"?",Ne,Ue,De,Oe].join("|")+")",Ve=RegExp(Re,"g"),Xe=RegExp(Ne,"g"),Qe=RegExp(Me+"(?="+Me+")|"+Je+Ye,"g"),et=RegExp([Fe+"?"+Pe+"+"+We+"(?="+[Ie,Fe,"$"].join("|")+")",Ze+"+"+$e+"(?="+[Ie,Fe+qe,"$"].join("|")+")",Fe+"?"+qe+"+"+We,Fe+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je,Ge].join("|"),"g"),tt=RegExp("[\\u200d\\ud800-\\udfff"+Ee+Te+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],it=-1,ot={};ot[P]=ot[B]=ot[M]=ot[z]=ot[U]=ot[D]=ot[F]=ot[q]=ot[Z]=!0,ot[_]=ot[m]=ot[j]=ot[y]=ot[L]=ot[w]=ot[b]=ot[k]=ot[S]=ot[A]=ot[C]=ot[x]=ot[R]=ot[O]=ot[N]=!1;var at={};at[_]=at[m]=at[j]=at[L]=at[y]=at[w]=at[P]=at[B]=at[M]=at[z]=at[U]=at[S]=at[A]=at[C]=at[x]=at[R]=at[O]=at[I]=at[D]=at[F]=at[q]=at[Z]=!0,at[b]=at[k]=at[N]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,ct=parseInt,lt="object"==typeof t&&t&&t.Object===Object&&t,ft="object"==typeof self&&self&&self.Object===Object&&self,ht=lt||ft||Function("return this")(),dt=n&&!n.nodeType&&n,pt=dt&&e&&!e.nodeType&&e,vt=pt&&pt.exports===dt,gt=vt&<.process,_t=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}(),mt=_t&&_t.isArrayBuffer,yt=_t&&_t.isDate,wt=_t&&_t.isMap,bt=_t&&_t.isRegExp,kt=_t&&_t.isSet,Et=_t&&_t.isTypedArray;function St(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function At(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function xt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Ot(e,t){return!!(null==e?0:e.length)&&Dt(e,t,0)>-1}function It(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function jt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Lt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Pt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Mt=Wt("length");function zt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ut(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Dt(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ut(e,qt,n)}function Ft(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function qt(e){return e!=e}function Zt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:p}function Wt(e){return function(t){return null==t?r:t[e]}}function $t(e){return function(t){return null==e?r:e[t]}}function Ht(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Kt(e,t){for(var n,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==r&&(n=n===r?a:n+a)}return n}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,pn(e)+1).replace(oe,""):e}function Jt(e){return function(t){return e(t)}}function Vt(e,t){return Nt(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&Dt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Dt(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var nn=$t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=$t({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(e){return"\\"+st[e]}function an(e){return tt.test(e)}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function cn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function hn(e){return an(e)?function(e){var t=Qe.lastIndex=0;for(;Qe.test(e);)++t;return t}(e):Mt(e)}function dn(e){return an(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var vn=$t({"&":"&","<":"<",">":">",""":'"',"'":"'"});var gn=function e(t){var n,ae=(t=null==t?ht:gn.defaults(ht.Object(),t,gn.pick(ht,rt))).Array,Ee=t.Date,Se=t.Error,Ae=t.Function,Ce=t.Math,Te=t.Object,xe=t.RegExp,Re=t.String,Oe=t.TypeError,Ie=ae.prototype,Ne=Ae.prototype,je=Te.prototype,Le=t["__core-js_shared__"],Pe=Ne.toString,Be=je.hasOwnProperty,Me=0,ze=(n=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ue=je.toString,De=Pe.call(Te),Fe=ht._,qe=xe("^"+Pe.call(Be).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ze=vt?t.Buffer:r,We=t.Symbol,$e=t.Uint8Array,He=Ze?Ze.allocUnsafe:r,Ke=un(Te.getPrototypeOf,Te),Ye=Te.create,Ge=je.propertyIsEnumerable,Je=Ie.splice,Qe=We?We.isConcatSpreadable:r,tt=We?We.iterator:r,st=We?We.toStringTag:r,lt=function(){try{var e=po(Te,"defineProperty");return e({},"",{}),e}catch(e){}}(),ft=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,dt=Ee&&Ee.now!==ht.Date.now&&Ee.now,pt=t.setTimeout!==ht.setTimeout&&t.setTimeout,gt=Ce.ceil,_t=Ce.floor,Mt=Te.getOwnPropertySymbols,$t=Ze?Ze.isBuffer:r,_n=t.isFinite,mn=Ie.join,yn=un(Te.keys,Te),wn=Ce.max,bn=Ce.min,kn=Ee.now,En=t.parseInt,Sn=Ce.random,An=Ie.reverse,Cn=po(t,"DataView"),Tn=po(t,"Map"),xn=po(t,"Promise"),Rn=po(t,"Set"),On=po(t,"WeakMap"),In=po(Te,"create"),Nn=On&&new On,jn={},Ln=Fo(Cn),Pn=Fo(Tn),Bn=Fo(xn),Mn=Fo(Rn),zn=Fo(On),Un=We?We.prototype:r,Dn=Un?Un.valueOf:r,Fn=Un?Un.toString:r;function qn(e){if(is(e)&&!Ka(e)&&!(e instanceof Hn)){if(e instanceof $n)return e;if(Be.call(e,"__wrapped__"))return qo(e)}return new $n(e)}var Zn=function(){function e(){}return function(t){if(!rs(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function Wn(){}function $n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Vn(e){var t=this.__data__=new Yn(e);this.size=t.size}function Xn(e,t){var n=Ka(e),r=!n&&Ha(e),i=!n&&!r&&Va(e),o=!n&&!r&&!i&&hs(e),a=n||r||i||o,s=a?Yt(e.length,Re):[],u=s.length;for(var c in e)!t&&!Be.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Qn(e){var t=e.length;return t?e[Jr(0,t-1)]:r}function er(e,t){return zo(Ii(e),cr(t,0,e.length))}function tr(e){return zo(Ii(e))}function nr(e,t,n){(n!==r&&!Za(e[t],n)||n===r&&!(t in e))&&sr(e,t,n)}function rr(e,t,n){var i=e[t];Be.call(e,t)&&Za(i,n)&&(n!==r||t in e)||sr(e,t,n)}function ir(e,t){for(var n=e.length;n--;)if(Za(e[n][0],t))return n;return-1}function or(e,t,n,r){return pr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ar(e,t){return e&&Ni(t,Ls(t),e)}function sr(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ur(e,t){for(var n=-1,i=t.length,o=ae(i),a=null==e;++n<i;)o[n]=a?r:Rs(e,t[n]);return o}function cr(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function lr(e,t,n,i,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,i,o,a):n(e)),s!==r)return s;if(!rs(e))return e;var f=Ka(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Be.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Ii(e,s)}else{var h=_o(e),d=h==k||h==E;if(Va(e))return Ai(e,u);if(h==C||h==_||d&&!o){if(s=c||d?{}:yo(e),!u)return c?function(e,t){return Ni(e,go(e),t)}(e,function(e,t){return e&&Ni(t,Ps(t),e)}(s,e)):function(e,t){return Ni(e,vo(e),t)}(e,ar(s,e))}else{if(!at[h])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case j:return Ci(e);case y:case w:return new r(+e);case L:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case B:case M:case z:case U:case D:case F:case q:case Z:return Ti(e,n);case S:return new r;case A:case O:return new r(e);case x:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case I:return i=e,Dn?Te(Dn.call(i)):{}}var i}(e,h,u)}}a||(a=new Vn);var p=a.get(e);if(p)return p;a.set(e,s),cs(e)?e.forEach((function(r){s.add(lr(r,t,n,r,e,a))})):os(e)&&e.forEach((function(r,i){s.set(i,lr(r,t,n,i,e,a))}));var v=f?r:(l?c?ao:oo:c?Ps:Ls)(e);return Ct(v||e,(function(r,i){v&&(r=e[i=r]),rr(s,i,lr(r,t,n,i,e,a))})),s}function fr(e,t,n){var i=n.length;if(null==e)return!i;for(e=Te(e);i--;){var o=n[i],a=t[o],s=e[o];if(s===r&&!(o in e)||!a(s))return!1}return!0}function hr(e,t,n){if("function"!=typeof e)throw new Oe(i);return Lo((function(){e.apply(r,n)}),t)}function dr(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Nt(t,Jt(n))),r?(o=It,a=!1):t.length>=200&&(o=Xt,a=!1,t=new Jn(t));e:for(;++i<s;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var h=c;h--;)if(t[h]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}qn.templateSettings={escape:V,evaluate:X,interpolate:Q,variable:"",imports:{_:qn}},qn.prototype=Wn.prototype,qn.prototype.constructor=qn,$n.prototype=Zn(Wn.prototype),$n.prototype.constructor=$n,Hn.prototype=Zn(Wn.prototype),Hn.prototype.constructor=Hn,Kn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Kn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Kn.prototype.get=function(e){var t=this.__data__;if(In){var n=t[e];return n===o?r:n}return Be.call(t,e)?t[e]:r},Kn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==r:Be.call(t,e)},Kn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===r?o:t,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0)&&(n==t.length-1?t.pop():Je.call(t,n,1),--this.size,!0)},Yn.prototype.get=function(e){var t=this.__data__,n=ir(t,e);return n<0?r:t[n][1]},Yn.prototype.has=function(e){return ir(this.__data__,e)>-1},Yn.prototype.set=function(e,t){var n=this.__data__,r=ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(Tn||Yn),string:new Kn}},Gn.prototype.delete=function(e){var t=fo(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return fo(this,e).get(e)},Gn.prototype.has=function(e){return fo(this,e).has(e)},Gn.prototype.set=function(e,t){var n=fo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(e){return this.__data__.set(e,o),this},Jn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Vn.prototype.get=function(e){return this.__data__.get(e)},Vn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!Tn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var pr=Pi(kr),vr=Pi(Er,!0);function gr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function _r(e,t,n){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(u===r?s==s&&!fs(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return pr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=wo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?yr(s,t-1,n,r,i):jt(i,s):r||(i[i.length]=s)}return i}var wr=Bi(),br=Bi(!0);function kr(e,t){return e&&wr(e,t,Ls)}function Er(e,t){return e&&br(e,t,Ls)}function Sr(e,t){return Rt(t,(function(t){return es(e[t])}))}function Ar(e,t){for(var n=0,i=(t=bi(t,e)).length;null!=e&&n<i;)e=e[Do(t[n++])];return n&&n==i?e:r}function Cr(e,t,n){var r=t(e);return Ka(e)?r:jt(r,n(e))}function Tr(e){return null==e?e===r?"[object Undefined]":"[object Null]":st&&st in Te(e)?function(e){var t=Be.call(e,st),n=e[st];try{e[st]=r;var i=!0}catch(e){}var o=Ue.call(e);i&&(t?e[st]=n:delete e[st]);return o}(e):function(e){return Ue.call(e)}(e)}function xr(e,t){return e>t}function Rr(e,t){return null!=e&&Be.call(e,t)}function Or(e,t){return null!=e&&t in Te(e)}function Ir(e,t,n){for(var i=n?It:Ot,o=e[0].length,a=e.length,s=a,u=ae(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=Nt(f,Jt(t))),c=bn(f.length,c),u[s]=!n&&(t||o>=120&&f.length>=120)?new Jn(s&&f):r}f=e[0];var h=-1,d=u[0];e:for(;++h<o&&l.length<c;){var p=f[h],v=t?t(p):p;if(p=n||0!==p?p:0,!(d?Xt(d,v):i(l,v,n))){for(s=a;--s;){var g=u[s];if(!(g?Xt(g,v):i(e[s],v,n)))continue e}d&&d.push(v),l.push(p)}}return l}function Nr(e,t,n){var i=null==(e=Oo(e,t=bi(t,e)))?e:e[Do(Qo(t))];return null==i?r:St(i,e,n)}function jr(e){return is(e)&&Tr(e)==_}function Lr(e,t,n,i,o){return e===t||(null==e||null==t||!is(e)&&!is(t)?e!=e&&t!=t:function(e,t,n,i,o,a){var s=Ka(e),u=Ka(t),c=s?m:_o(e),l=u?m:_o(t),f=(c=c==_?C:c)==C,h=(l=l==_?C:l)==C,d=c==l;if(d&&Va(e)){if(!Va(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Vn),s||hs(e)?ro(e,t,n,i,o,a):function(e,t,n,r,i,o,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case y:case w:case A:return Za(+e,+t);case b:return e.name==t.name&&e.message==t.message;case x:case O:return e==t+"";case S:var s=sn;case R:var u=1&r;if(s||(s=ln),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ro(s(e),s(t),r,i,o,a);return a.delete(e),l;case I:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,c,n,i,o,a);if(!(1&n)){var p=f&&Be.call(e,"__wrapped__"),v=h&&Be.call(t,"__wrapped__");if(p||v){var g=p?e.value():e,k=v?t.value():t;return a||(a=new Vn),o(g,k,n,i,a)}}if(!d)return!1;return a||(a=new Vn),function(e,t,n,i,o,a){var s=1&n,u=oo(e),c=u.length,l=oo(t).length;if(c!=l&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:Be.call(t,h)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var v=!0;a.set(e,t),a.set(t,e);var g=s;for(;++f<c;){var _=e[h=u[f]],m=t[h];if(i)var y=s?i(m,_,h,t,e,a):i(_,m,h,e,t,a);if(!(y===r?_===m||o(_,m,n,i,a):y)){v=!1;break}g||(g="constructor"==h)}if(v&&!g){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,n,i,o,a)}(e,t,n,i,Lr,o))}function Pr(e,t,n,i){var o=n.length,a=o,s=!i;if(null==e)return!a;for(e=Te(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===r&&!(c in e))return!1}else{var h=new Vn;if(i)var d=i(l,f,c,e,t,h);if(!(d===r?Lr(f,l,3,i,h):d))return!1}}return!0}function Br(e){return!(!rs(e)||(t=e,ze&&ze in t))&&(es(e)?qe:_e).test(Fo(e));var t}function Mr(e){return"function"==typeof e?e:null==e?au:"object"==typeof e?Ka(e)?Zr(e[0],e[1]):qr(e):vu(e)}function zr(e){if(!Co(e))return yn(e);var t=[];for(var n in Te(e))Be.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ur(e){if(!rs(e))return function(e){var t=[];if(null!=e)for(var n in Te(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var r in e)("constructor"!=r||!t&&Be.call(e,r))&&n.push(r);return n}function Dr(e,t){return e<t}function Fr(e,t){var n=-1,r=Ga(e)?ae(e.length):[];return pr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function qr(e){var t=ho(e);return 1==t.length&&t[0][2]?xo(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Zr(e,t){return Eo(e)&&To(t)?xo(Do(e),t):function(n){var i=Rs(n,e);return i===r&&i===t?Os(n,e):Lr(t,i,3)}}function Wr(e,t,n,i,o){e!==t&&wr(t,(function(a,s){if(o||(o=new Vn),rs(a))!function(e,t,n,i,o,a,s){var u=No(e,n),c=No(t,n),l=s.get(c);if(l)return void nr(e,n,l);var f=a?a(u,c,n+"",e,t,s):r,h=f===r;if(h){var d=Ka(c),p=!d&&Va(c),v=!d&&!p&&hs(c);f=c,d||p||v?Ka(u)?f=u:Ja(u)?f=Ii(u):p?(h=!1,f=Ai(c,!0)):v?(h=!1,f=Ti(c,!0)):f=[]:ss(c)||Ha(c)?(f=u,Ha(u)?f=ws(u):rs(u)&&!es(u)||(f=yo(c))):h=!1}h&&(s.set(c,f),o(f,c,i,a,s),s.delete(c));nr(e,n,f)}(e,t,s,n,Wr,i,o);else{var u=i?i(No(e,s),a,s+"",e,t,o):r;u===r&&(u=a),nr(e,s,u)}}),Ps)}function $r(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:r}function Hr(e,t,n){t=t.length?Nt(t,(function(e){return Ka(e)?function(t){return Ar(t,1===e.length?e[0]:e)}:e})):[au];var r=-1;return t=Nt(t,Jt(lo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Fr(e,(function(e,n,i){return{criteria:Nt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=xi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Kr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Ar(e,a);n(s,a)&&ti(o,bi(a,e),s)}return o}function Yr(e,t,n,r){var i=r?Ft:Dt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Nt(e,Jt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Je.call(s,u,1),Je.call(e,u,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Je.call(e,i,1):di(e,i)}}return e}function Jr(e,t){return e+_t(Sn()*(t-e+1))}function Vr(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=_t(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Po(Ro(e,t,au),e+"")}function Qr(e){return Qn(Zs(e))}function ei(e,t){var n=Zs(e);return zo(n,cr(t,0,n.length))}function ti(e,t,n,i){if(!rs(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Do(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=i?i(f,c,u):r)===r&&(l=rs(f)?f:bo(t[o+1])?[]:{})}rr(u,c,l),u=u[c]}return e}var ni=Nn?function(e,t){return Nn.set(e,t),e}:au,ri=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:ru(t),writable:!0})}:au;function ii(e){return zo(Zs(e))}function oi(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=ae(i);++r<i;)o[r]=e[r+t];return o}function ai(e,t){var n;return pr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function si(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!fs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ui(e,t,au,n)}function ui(e,t,n,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=fs(t),l=t===r;o<a;){var f=_t((o+a)/2),h=n(e[f]),d=h!==r,p=null===h,v=h==h,g=fs(h);if(s)var _=i||v;else _=l?v&&(i||d):u?v&&d&&(i||!p):c?v&&d&&!p&&(i||!g):!p&&!g&&(i?h<=t:h<t);_?o=f+1:a=f}return bn(a,4294967294)}function ci(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Za(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function li(e){return"number"==typeof e?e:fs(e)?p:+e}function fi(e){if("string"==typeof e)return e;if(Ka(e))return Nt(e,fi)+"";if(fs(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function hi(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=It;else if(o>=200){var c=t?null:Vi(e);if(c)return ln(c);a=!1,i=Xt,u=new Jn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function di(e,t){return null==(e=Oo(e,t=bi(t,e)))||delete e[Do(Qo(t))]}function pi(e,t,n,r){return ti(e,t,n(Ar(e,t)),r)}function vi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?oi(e,r?0:o,r?o+1:i):oi(e,r?o+1:0,r?i:o)}function gi(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Lt(t,(function(e,t){return t.func.apply(t.thisArg,jt([e],t.args))}),n)}function _i(e,t,n){var r=e.length;if(r<2)return r?hi(e[0]):[];for(var i=-1,o=ae(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=dr(o[i]||a,e[s],t,n));return hi(yr(o,1),t,n)}function mi(e,t,n){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var u=i<a?t[i]:r;n(s,e[i],u)}return s}function yi(e){return Ja(e)?e:[]}function wi(e){return"function"==typeof e?e:au}function bi(e,t){return Ka(e)?e:Eo(e,t)?[e]:Uo(bs(e))}var ki=Xr;function Ei(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:oi(e,t,n)}var Si=ft||function(e){return ht.clearTimeout(e)};function Ai(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ti(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,a=fs(e),s=t!==r,u=null===t,c=t==t,l=fs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&e<t||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ri(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,u=t.length,c=wn(o-a,0),l=ae(u+c),f=!r;++s<u;)l[s]=t[s];for(;++i<a;)(f||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[s++]=e[i++];return l}function Oi(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,u=-1,c=t.length,l=wn(o-s,0),f=ae(l+c),h=!r;++i<l;)f[i]=e[i];for(var d=i;++u<c;)f[d+u]=t[u];for(;++a<s;)(h||i<o)&&(f[d+n[a]]=e[i++]);return f}function Ii(e,t){var n=-1,r=e.length;for(t||(t=ae(r));++n<r;)t[n]=e[n];return t}function Ni(e,t,n,i){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=i?i(n[u],e[u],u,n,e):r;c===r&&(c=e[u]),o?sr(n,u,c):rr(n,u,c)}return n}function ji(e,t){return function(n,r){var i=Ka(n)?At:or,o=t?t():{};return i(n,e,lo(r,2),o)}}function Li(e){return Xr((function(t,n){var i=-1,o=n.length,a=o>1?n[o-1]:r,s=o>2?n[2]:r;for(a=e.length>3&&"function"==typeof a?(o--,a):r,s&&ko(n[0],n[1],s)&&(a=o<3?r:a,o=1),t=Te(t);++i<o;){var u=n[i];u&&e(t,u,i,a)}return t}))}function Pi(e,t){return function(n,r){if(null==n)return n;if(!Ga(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Te(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Bi(e){return function(t,n,r){for(var i=-1,o=Te(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Mi(e){return function(t){var n=an(t=bs(t))?dn(t):r,i=n?n[0]:t.charAt(0),o=n?Ei(n,1).join(""):t.slice(1);return i[e]()+o}}function zi(e){return function(t){return Lt(eu(Hs(t).replace(Ve,"")),e,"")}}function Ui(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Zn(e.prototype),r=e.apply(n,t);return rs(r)?r:n}}function Di(e){return function(t,n,i){var o=Te(t);if(!Ga(t)){var a=lo(n,3);t=Ls(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,i);return s>-1?o[a?t[s]:s]:r}}function Fi(e){return io((function(t){var n=t.length,o=n,a=$n.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Oe(i);if(a&&!u&&"wrapper"==uo(s))var u=new $n([],!0)}for(o=u?o:n;++o<n;){var c=uo(s=t[o]),l="wrapper"==c?so(s):r;u=l&&So(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[uo(l[0])].apply(u,l[3]):1==s.length&&So(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ka(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function qi(e,t,n,i,o,a,s,u,c,f){var h=t&l,d=1&t,p=2&t,v=24&t,g=512&t,_=p?r:Ui(e);return function r(){for(var l=arguments.length,m=ae(l),y=l;y--;)m[y]=arguments[y];if(v)var w=co(r),b=tn(m,w);if(i&&(m=Ri(m,i,o,v)),a&&(m=Oi(m,a,s,v)),l-=b,v&&l<f){var k=cn(m,w);return Gi(e,t,qi,r.placeholder,n,m,k,u,c,f-l)}var E=d?n:this,S=p?E[e]:e;return l=m.length,u?m=Io(m,u):g&&l>1&&m.reverse(),h&&c<l&&(m.length=c),this&&this!==ht&&this instanceof r&&(S=_||Ui(S)),S.apply(E,m)}}function Zi(e,t){return function(n,r){return function(e,t,n,r){return kr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Wi(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=fi(n),i=fi(i)):(n=li(n),i=li(i)),o=e(n,i)}return o}}function $i(e){return io((function(t){return t=Nt(t,Jt(lo())),Xr((function(n){var r=this;return e(t,(function(e){return St(e,r,n)}))}))}))}function Hi(e,t){var n=(t=t===r?" ":fi(t)).length;if(n<2)return n?Vr(t,e):t;var i=Vr(t,gt(e/hn(t)));return an(t)?Ei(dn(i),0,e).join(""):i.slice(0,e)}function Ki(e){return function(t,n,i){return i&&"number"!=typeof i&&ko(t,n,i)&&(n=i=r),t=gs(t),n===r?(n=t,t=0):n=gs(n),function(e,t,n,r){for(var i=-1,o=wn(gt((t-e)/(n||1)),0),a=ae(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,i=i===r?t<n?1:-1:gs(i),e)}}function Yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Gi(e,t,n,i,o,a,s,l,f,h){var d=8&t;t|=d?u:c,4&(t&=~(d?c:u))||(t&=-4);var p=[e,t,o,d?a:r,d?s:r,d?r:a,d?r:s,l,f,h],v=n.apply(r,p);return So(e)&&jo(v,p),v.placeholder=i,Bo(v,e,t)}function Ji(e){var t=Ce[e];return function(e,n){if(e=ys(e),(n=null==n?0:bn(_s(n),292))&&_n(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vi=Rn&&1/ln(new Rn([,-0]))[1]==h?function(e){return new Rn(e)}:fu;function Xi(e){return function(t){var n=_o(t);return n==S?sn(t):n==R?fn(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qi(e,t,n,o,h,d,p,v){var g=2&t;if(!g&&"function"!=typeof e)throw new Oe(i);var _=o?o.length:0;if(_||(t&=-97,o=h=r),p=p===r?p:wn(_s(p),0),v=v===r?v:_s(v),_-=h?h.length:0,t&c){var m=o,y=h;o=h=r}var w=g?r:so(e),b=[e,t,n,o,h,m,y,d,p,v];if(w&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ri(c,u,t[4]):u,e[4]=c?cn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Oi(c,u,t[6]):u,e[6]=c?cn(e[5],a):t[6]);(u=t[7])&&(e[7]=u);r&l&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(b,w),e=b[0],t=b[1],n=b[2],o=b[3],h=b[4],!(v=b[9]=b[9]===r?g?0:e.length:wn(b[9]-_,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||t==s?function(e,t,n){var i=Ui(e);return function o(){for(var a=arguments.length,s=ae(a),u=a,c=co(o);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:cn(s,c);return(a-=l.length)<n?Gi(e,t,qi,o.placeholder,r,s,l,r,r,n-a):St(this&&this!==ht&&this instanceof o?i:e,this,s)}}(e,t,v):t!=u&&33!=t||h.length?qi.apply(r,b):function(e,t,n,r){var i=1&t,o=Ui(e);return function t(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=ae(c+s),f=this&&this!==ht&&this instanceof t?o:e;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return St(f,i?n:this,l)}}(e,t,n,o);else var k=function(e,t,n){var r=1&t,i=Ui(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Bo((w?ni:jo)(k,b),e,t)}function eo(e,t,n,i){return e===r||Za(e,je[n])&&!Be.call(i,n)?t:e}function to(e,t,n,i,o,a){return rs(e)&&rs(t)&&(a.set(t,e),Wr(e,t,r,to,a),a.delete(t)),e}function no(e){return ss(e)?r:e}function ro(e,t,n,i,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var h=-1,d=!0,p=2&n?new Jn:r;for(a.set(e,t),a.set(t,e);++h<u;){var v=e[h],g=t[h];if(i)var _=s?i(g,v,h,t,e,a):i(v,g,h,e,t,a);if(_!==r){if(_)continue;d=!1;break}if(p){if(!Bt(t,(function(e,t){if(!Xt(p,t)&&(v===e||o(v,e,n,i,a)))return p.push(t)}))){d=!1;break}}else if(v!==g&&!o(v,g,n,i,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function io(e){return Po(Ro(e,r,Yo),e+"")}function oo(e){return Cr(e,Ls,vo)}function ao(e){return Cr(e,Ps,go)}var so=Nn?function(e){return Nn.get(e)}:fu;function uo(e){for(var t=e.name+"",n=jn[t],r=Be.call(jn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function co(e){return(Be.call(qn,"placeholder")?qn:e).placeholder}function lo(){var e=qn.iteratee||su;return e=e===su?Mr:e,arguments.length?e(arguments[0],arguments[1]):e}function fo(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ho(e){for(var t=Ls(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,To(i)]}return t}function po(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Br(n)?n:r}var vo=Mt?function(e){return null==e?[]:(e=Te(e),Rt(Mt(e),(function(t){return Ge.call(e,t)})))}:mu,go=Mt?function(e){for(var t=[];e;)jt(t,vo(e)),e=Ke(e);return t}:mu,_o=Tr;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Do(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ns(i)&&bo(a,i)&&(Ka(e)||Ha(e))}function yo(e){return"function"!=typeof e.constructor||Co(e)?{}:Zn(Ke(e))}function wo(e){return Ka(e)||Ha(e)||!!(Qe&&e&&e[Qe])}function bo(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function ko(e,t,n){if(!rs(n))return!1;var r=typeof t;return!!("number"==r?Ga(n)&&bo(t,n.length):"string"==r&&t in n)&&Za(n[t],e)}function Eo(e,t){if(Ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!fs(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Te(t))}function So(e){var t=uo(e),n=qn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=so(n);return!!r&&e===r[0]}(Cn&&_o(new Cn(new ArrayBuffer(1)))!=L||Tn&&_o(new Tn)!=S||xn&&_o(xn.resolve())!=T||Rn&&_o(new Rn)!=R||On&&_o(new On)!=N)&&(_o=function(e){var t=Tr(e),n=t==C?e.constructor:r,i=n?Fo(n):"";if(i)switch(i){case Ln:return L;case Pn:return S;case Bn:return T;case Mn:return R;case zn:return N}return t});var Ao=Le?es:yu;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||je)}function To(e){return e==e&&!rs(e)}function xo(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==r||e in Te(n)))}}function Ro(e,t,n){return t=wn(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=wn(r.length-t,0),a=ae(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=ae(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),St(e,this,s)}}function Oo(e,t){return t.length<2?e:Ar(e,oi(t,0,-1))}function Io(e,t){for(var n=e.length,i=bn(t.length,n),o=Ii(e);i--;){var a=t[i];e[i]=bo(a,n)?o[a]:r}return e}function No(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var jo=Mo(ni),Lo=pt||function(e,t){return ht.setTimeout(e,t)},Po=Mo(ri);function Bo(e,t,n){var r=t+"";return Po(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ct(g,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(ce):[]}(r),n)))}function Mo(e){var t=0,n=0;return function(){var i=kn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function zo(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var a=Jr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Uo=function(e){var t=Ma(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function Do(e){if("string"==typeof e||fs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Pe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qo(e){if(e instanceof Hn)return e.clone();var t=new $n(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Zo=Xr((function(e,t){return Ja(e)?dr(e,yr(t,1,Ja,!0)):[]})),Wo=Xr((function(e,t){var n=Qo(t);return Ja(n)&&(n=r),Ja(e)?dr(e,yr(t,1,Ja,!0),lo(n,2)):[]})),$o=Xr((function(e,t){var n=Qo(t);return Ja(n)&&(n=r),Ja(e)?dr(e,yr(t,1,Ja,!0),r,n):[]}));function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:_s(n);return i<0&&(i=wn(r+i,0)),Ut(e,lo(t,3),i)}function Ko(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=_s(n),o=n<0?wn(i+o,0):bn(o,i-1)),Ut(e,lo(t,3),o,!0)}function Yo(e){return(null==e?0:e.length)?yr(e,1):[]}function Go(e){return e&&e.length?e[0]:r}var Jo=Xr((function(e){var t=Nt(e,yi);return t.length&&t[0]===e[0]?Ir(t):[]})),Vo=Xr((function(e){var t=Qo(e),n=Nt(e,yi);return t===Qo(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Ir(n,lo(t,2)):[]})),Xo=Xr((function(e){var t=Qo(e),n=Nt(e,yi);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Ir(n,r,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:r}var ea=Xr(ta);function ta(e,t){return e&&e.length&&t&&t.length?Yr(e,t):e}var na=io((function(e,t){var n=null==e?0:e.length,r=ur(e,t);return Gr(e,Nt(t,(function(e){return bo(e,n)?+e:e})).sort(xi)),r}));function ra(e){return null==e?e:An.call(e)}var ia=Xr((function(e){return hi(yr(e,1,Ja,!0))})),oa=Xr((function(e){var t=Qo(e);return Ja(t)&&(t=r),hi(yr(e,1,Ja,!0),lo(t,2))})),aa=Xr((function(e){var t=Qo(e);return t="function"==typeof t?t:r,hi(yr(e,1,Ja,!0),r,t)}));function sa(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ja(e))return t=wn(e.length,t),!0})),Yt(t,(function(t){return Nt(e,Wt(t))}))}function ua(e,t){if(!e||!e.length)return[];var n=sa(e);return null==t?n:Nt(n,(function(e){return St(t,r,e)}))}var ca=Xr((function(e,t){return Ja(e)?dr(e,t):[]})),la=Xr((function(e){return _i(Rt(e,Ja))})),fa=Xr((function(e){var t=Qo(e);return Ja(t)&&(t=r),_i(Rt(e,Ja),lo(t,2))})),ha=Xr((function(e){var t=Qo(e);return t="function"==typeof t?t:r,_i(Rt(e,Ja),r,t)})),da=Xr(sa);var pa=Xr((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ua(e,n)}));function va(e){var t=qn(e);return t.__chain__=!0,t}function ga(e,t){return t(e)}var _a=io((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return ur(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Hn&&bo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:ga,args:[o],thisArg:r}),new $n(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)}));var ma=ji((function(e,t,n){Be.call(e,n)?++e[n]:sr(e,n,1)}));var ya=Di(Ho),wa=Di(Ko);function ba(e,t){return(Ka(e)?Ct:pr)(e,lo(t,3))}function ka(e,t){return(Ka(e)?Tt:vr)(e,lo(t,3))}var Ea=ji((function(e,t,n){Be.call(e,n)?e[n].push(t):sr(e,n,[t])}));var Sa=Xr((function(e,t,n){var r=-1,i="function"==typeof t,o=Ga(e)?ae(e.length):[];return pr(e,(function(e){o[++r]=i?St(t,e,n):Nr(e,t,n)})),o})),Aa=ji((function(e,t,n){sr(e,n,t)}));function Ca(e,t){return(Ka(e)?Nt:Fr)(e,lo(t,3))}var Ta=ji((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var xa=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ko(e,t[0],t[1])?t=[]:n>2&&ko(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,yr(t,1),[])})),Ra=dt||function(){return ht.Date.now()};function Oa(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Qi(e,l,r,r,r,r,t)}function Ia(e,t){var n;if("function"!=typeof t)throw new Oe(i);return e=_s(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Na=Xr((function(e,t,n){var r=1;if(n.length){var i=cn(n,co(Na));r|=u}return Qi(e,r,t,n,i)})),ja=Xr((function(e,t,n){var r=3;if(n.length){var i=cn(n,co(ja));r|=u}return Qi(t,r,e,n,i)}));function La(e,t,n){var o,a,s,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Oe(i);function v(t){var n=o,i=a;return o=a=r,f=t,u=e.apply(i,n)}function g(e){return f=e,c=Lo(m,t),h?v(e):u}function _(e){var n=e-l;return l===r||n>=t||n<0||d&&e-f>=s}function m(){var e=Ra();if(_(e))return y(e);c=Lo(m,function(e){var n=t-(e-l);return d?bn(n,s-(e-f)):n}(e))}function y(e){return c=r,p&&o?v(e):(o=a=r,u)}function w(){var e=Ra(),n=_(e);if(o=arguments,a=this,l=e,n){if(c===r)return g(l);if(d)return Si(c),c=Lo(m,t),v(l)}return c===r&&(c=Lo(m,t)),u}return t=ys(t)||0,rs(n)&&(h=!!n.leading,s=(d="maxWait"in n)?wn(ys(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),w.cancel=function(){c!==r&&Si(c),f=0,o=l=a=c=r},w.flush=function(){return c===r?u:y(Ra())},w}var Pa=Xr((function(e,t){return hr(e,1,t)})),Ba=Xr((function(e,t,n){return hr(e,ys(t)||0,n)}));function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ma.Cache||Gn),n}function za(e){if("function"!=typeof e)throw new Oe(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=Gn;var Ua=ki((function(e,t){var n=(t=1==t.length&&Ka(t[0])?Nt(t[0],Jt(lo())):Nt(yr(t,1),Jt(lo()))).length;return Xr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return St(e,this,r)}))})),Da=Xr((function(e,t){var n=cn(t,co(Da));return Qi(e,u,r,t,n)})),Fa=Xr((function(e,t){var n=cn(t,co(Fa));return Qi(e,c,r,t,n)})),qa=io((function(e,t){return Qi(e,f,r,r,r,t)}));function Za(e,t){return e===t||e!=e&&t!=t}var Wa=Yi(xr),$a=Yi((function(e,t){return e>=t})),Ha=jr(function(){return arguments}())?jr:function(e){return is(e)&&Be.call(e,"callee")&&!Ge.call(e,"callee")},Ka=ae.isArray,Ya=mt?Jt(mt):function(e){return is(e)&&Tr(e)==j};function Ga(e){return null!=e&&ns(e.length)&&!es(e)}function Ja(e){return is(e)&&Ga(e)}var Va=$t||yu,Xa=yt?Jt(yt):function(e){return is(e)&&Tr(e)==w};function Qa(e){if(!is(e))return!1;var t=Tr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ss(e)}function es(e){if(!rs(e))return!1;var t=Tr(e);return t==k||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ts(e){return"number"==typeof e&&e==_s(e)}function ns(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function rs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function is(e){return null!=e&&"object"==typeof e}var os=wt?Jt(wt):function(e){return is(e)&&_o(e)==S};function as(e){return"number"==typeof e||is(e)&&Tr(e)==A}function ss(e){if(!is(e)||Tr(e)!=C)return!1;var t=Ke(e);if(null===t)return!0;var n=Be.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==De}var us=bt?Jt(bt):function(e){return is(e)&&Tr(e)==x};var cs=kt?Jt(kt):function(e){return is(e)&&_o(e)==R};function ls(e){return"string"==typeof e||!Ka(e)&&is(e)&&Tr(e)==O}function fs(e){return"symbol"==typeof e||is(e)&&Tr(e)==I}var hs=Et?Jt(Et):function(e){return is(e)&&ns(e.length)&&!!ot[Tr(e)]};var ds=Yi(Dr),ps=Yi((function(e,t){return e<=t}));function vs(e){if(!e)return[];if(Ga(e))return ls(e)?dn(e):Ii(e);if(tt&&e[tt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[tt]());var t=_o(e);return(t==S?sn:t==R?ln:Zs)(e)}function gs(e){return e?(e=ys(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function _s(e){var t=gs(e),n=t%1;return t==t?n?t-n:t:0}function ms(e){return e?cr(_s(e),0,v):0}function ys(e){if("number"==typeof e)return e;if(fs(e))return p;if(rs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=ge.test(e);return n||me.test(e)?ct(e.slice(2),n?2:8):ve.test(e)?p:+e}function ws(e){return Ni(e,Ps(e))}function bs(e){return null==e?"":fi(e)}var ks=Li((function(e,t){if(Co(t)||Ga(t))Ni(t,Ls(t),e);else for(var n in t)Be.call(t,n)&&rr(e,n,t[n])})),Es=Li((function(e,t){Ni(t,Ps(t),e)})),Ss=Li((function(e,t,n,r){Ni(t,Ps(t),e,r)})),As=Li((function(e,t,n,r){Ni(t,Ls(t),e,r)})),Cs=io(ur);var Ts=Xr((function(e,t){e=Te(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&ko(t[0],t[1],o)&&(i=1);++n<i;)for(var a=t[n],s=Ps(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===r||Za(f,je[l])&&!Be.call(e,l))&&(e[l]=a[l])}return e})),xs=Xr((function(e){return e.push(r,to),St(Ms,r,e)}));function Rs(e,t,n){var i=null==e?r:Ar(e,t);return i===r?n:i}function Os(e,t){return null!=e&&mo(e,t,Or)}var Is=Zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),e[t]=n}),ru(au)),Ns=Zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),Be.call(e,t)?e[t].push(n):e[t]=[n]}),lo),js=Xr(Nr);function Ls(e){return Ga(e)?Xn(e):zr(e)}function Ps(e){return Ga(e)?Xn(e,!0):Ur(e)}var Bs=Li((function(e,t,n){Wr(e,t,n)})),Ms=Li((function(e,t,n,r){Wr(e,t,n,r)})),zs=io((function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ni(e,ao(e),n),r&&(n=lr(n,7,no));for(var i=t.length;i--;)di(n,t[i]);return n}));var Us=io((function(e,t){return null==e?{}:function(e,t){return Kr(e,t,(function(t,n){return Os(e,n)}))}(e,t)}));function Ds(e,t){if(null==e)return{};var n=Nt(ao(e),(function(e){return[e]}));return t=lo(t),Kr(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Xi(Ls),qs=Xi(Ps);function Zs(e){return null==e?[]:Vt(e,Ls(e))}var Ws=zi((function(e,t,n){return t=t.toLowerCase(),e+(n?$s(t):t)}));function $s(e){return Qs(bs(e).toLowerCase())}function Hs(e){return(e=bs(e))&&e.replace(we,nn).replace(Xe,"")}var Ks=zi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ys=zi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Gs=Mi("toLowerCase");var Js=zi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Vs=zi((function(e,t,n){return e+(n?" ":"")+Qs(t)}));var Xs=zi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Mi("toUpperCase");function eu(e,t,n){return e=bs(e),(t=n?r:t)===r?function(e){return nt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var tu=Xr((function(e,t){try{return St(e,r,t)}catch(e){return Qa(e)?e:new Se(e)}})),nu=io((function(e,t){return Ct(t,(function(t){t=Do(t),sr(e,t,Na(e[t],e))})),e}));function ru(e){return function(){return e}}var iu=Fi(),ou=Fi(!0);function au(e){return e}function su(e){return Mr("function"==typeof e?e:lr(e,1))}var uu=Xr((function(e,t){return function(n){return Nr(n,e,t)}})),cu=Xr((function(e,t){return function(n){return Nr(e,n,t)}}));function lu(e,t,n){var r=Ls(t),i=Sr(t,r);null!=n||rs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Sr(t,Ls(t)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=es(e);return Ct(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Ii(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,jt([this.value()],arguments))})})),e}function fu(){}var hu=$i(Nt),du=$i(xt),pu=$i(Bt);function vu(e){return Eo(e)?Wt(Do(e)):function(e){return function(t){return Ar(t,e)}}(e)}var gu=Ki(),_u=Ki(!0);function mu(){return[]}function yu(){return!1}var wu=Wi((function(e,t){return e+t}),0),bu=Ji("ceil"),ku=Wi((function(e,t){return e/t}),1),Eu=Ji("floor");var Su,Au=Wi((function(e,t){return e*t}),1),Cu=Ji("round"),Tu=Wi((function(e,t){return e-t}),0);return qn.after=function(e,t){if("function"!=typeof t)throw new Oe(i);return e=_s(e),function(){if(--e<1)return t.apply(this,arguments)}},qn.ary=Oa,qn.assign=ks,qn.assignIn=Es,qn.assignInWith=Ss,qn.assignWith=As,qn.at=Cs,qn.before=Ia,qn.bind=Na,qn.bindAll=nu,qn.bindKey=ja,qn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},qn.chain=va,qn.chunk=function(e,t,n){t=(n?ko(e,t,n):t===r)?1:wn(_s(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=ae(gt(i/t));o<i;)s[a++]=oi(e,o,o+=t);return s},qn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},qn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ae(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return jt(Ka(n)?Ii(n):[n],yr(t,1))},qn.cond=function(e){var t=null==e?0:e.length,n=lo();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Oe(i);return[n(e[0]),e[1]]})):[],Xr((function(n){for(var r=-1;++r<t;){var i=e[r];if(St(i[0],this,n))return St(i[1],this,n)}}))},qn.conforms=function(e){return function(e){var t=Ls(e);return function(n){return fr(n,e,t)}}(lr(e,1))},qn.constant=ru,qn.countBy=ma,qn.create=function(e,t){var n=Zn(e);return null==t?n:ar(n,t)},qn.curry=function e(t,n,i){var o=Qi(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},qn.curryRight=function e(t,n,i){var o=Qi(t,s,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},qn.debounce=La,qn.defaults=Ts,qn.defaultsDeep=xs,qn.defer=Pa,qn.delay=Ba,qn.difference=Zo,qn.differenceBy=Wo,qn.differenceWith=$o,qn.drop=function(e,t,n){var i=null==e?0:e.length;return i?oi(e,(t=n||t===r?1:_s(t))<0?0:t,i):[]},qn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?oi(e,0,(t=i-(t=n||t===r?1:_s(t)))<0?0:t):[]},qn.dropRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0,!0):[]},qn.dropWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0):[]},qn.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&ko(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=_s(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:_s(i))<0&&(i+=o),i=n>i?0:ms(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},qn.filter=function(e,t){return(Ka(e)?Rt:mr)(e,lo(t,3))},qn.flatMap=function(e,t){return yr(Ca(e,t),1)},qn.flatMapDeep=function(e,t){return yr(Ca(e,t),h)},qn.flatMapDepth=function(e,t,n){return n=n===r?1:_s(n),yr(Ca(e,t),n)},qn.flatten=Yo,qn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,h):[]},qn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===r?1:_s(t)):[]},qn.flip=function(e){return Qi(e,512)},qn.flow=iu,qn.flowRight=ou,qn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},qn.functions=function(e){return null==e?[]:Sr(e,Ls(e))},qn.functionsIn=function(e){return null==e?[]:Sr(e,Ps(e))},qn.groupBy=Ea,qn.initial=function(e){return(null==e?0:e.length)?oi(e,0,-1):[]},qn.intersection=Jo,qn.intersectionBy=Vo,qn.intersectionWith=Xo,qn.invert=Is,qn.invertBy=Ns,qn.invokeMap=Sa,qn.iteratee=su,qn.keyBy=Aa,qn.keys=Ls,qn.keysIn=Ps,qn.map=Ca,qn.mapKeys=function(e,t){var n={};return t=lo(t,3),kr(e,(function(e,r,i){sr(n,t(e,r,i),e)})),n},qn.mapValues=function(e,t){var n={};return t=lo(t,3),kr(e,(function(e,r,i){sr(n,r,t(e,r,i))})),n},qn.matches=function(e){return qr(lr(e,1))},qn.matchesProperty=function(e,t){return Zr(e,lr(t,1))},qn.memoize=Ma,qn.merge=Bs,qn.mergeWith=Ms,qn.method=uu,qn.methodOf=cu,qn.mixin=lu,qn.negate=za,qn.nthArg=function(e){return e=_s(e),Xr((function(t){return $r(t,e)}))},qn.omit=zs,qn.omitBy=function(e,t){return Ds(e,za(lo(t)))},qn.once=function(e){return Ia(2,e)},qn.orderBy=function(e,t,n,i){return null==e?[]:(Ka(t)||(t=null==t?[]:[t]),Ka(n=i?r:n)||(n=null==n?[]:[n]),Hr(e,t,n))},qn.over=hu,qn.overArgs=Ua,qn.overEvery=du,qn.overSome=pu,qn.partial=Da,qn.partialRight=Fa,qn.partition=Ta,qn.pick=Us,qn.pickBy=Ds,qn.property=vu,qn.propertyOf=function(e){return function(t){return null==e?r:Ar(e,t)}},qn.pull=ea,qn.pullAll=ta,qn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,lo(n,2)):e},qn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,r,n):e},qn.pullAt=na,qn.range=gu,qn.rangeRight=_u,qn.rearg=qa,qn.reject=function(e,t){return(Ka(e)?Rt:mr)(e,za(lo(t,3)))},qn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=lo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Gr(e,i),n},qn.rest=function(e,t){if("function"!=typeof e)throw new Oe(i);return Xr(e,t=t===r?t:_s(t))},qn.reverse=ra,qn.sampleSize=function(e,t,n){return t=(n?ko(e,t,n):t===r)?1:_s(t),(Ka(e)?er:ei)(e,t)},qn.set=function(e,t,n){return null==e?e:ti(e,t,n)},qn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:ti(e,t,n,i)},qn.shuffle=function(e){return(Ka(e)?tr:ii)(e)},qn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ko(e,t,n)?(t=0,n=i):(t=null==t?0:_s(t),n=n===r?i:_s(n)),oi(e,t,n)):[]},qn.sortBy=xa,qn.sortedUniq=function(e){return e&&e.length?ci(e):[]},qn.sortedUniqBy=function(e,t){return e&&e.length?ci(e,lo(t,2)):[]},qn.split=function(e,t,n){return n&&"number"!=typeof n&&ko(e,t,n)&&(t=n=r),(n=n===r?v:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!us(t))&&!(t=fi(t))&&an(e)?Ei(dn(e),0,n):e.split(t,n):[]},qn.spread=function(e,t){if("function"!=typeof e)throw new Oe(i);return t=null==t?0:wn(_s(t),0),Xr((function(n){var r=n[t],i=Ei(n,0,t);return r&&jt(i,r),St(e,this,i)}))},qn.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},qn.take=function(e,t,n){return e&&e.length?oi(e,0,(t=n||t===r?1:_s(t))<0?0:t):[]},qn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?oi(e,(t=i-(t=n||t===r?1:_s(t)))<0?0:t,i):[]},qn.takeRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!1,!0):[]},qn.takeWhile=function(e,t){return e&&e.length?vi(e,lo(t,3)):[]},qn.tap=function(e,t){return t(e),e},qn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Oe(i);return rs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),La(e,t,{leading:r,maxWait:t,trailing:o})},qn.thru=ga,qn.toArray=vs,qn.toPairs=Fs,qn.toPairsIn=qs,qn.toPath=function(e){return Ka(e)?Nt(e,Do):fs(e)?[e]:Ii(Uo(bs(e)))},qn.toPlainObject=ws,qn.transform=function(e,t,n){var r=Ka(e),i=r||Va(e)||hs(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:rs(e)&&es(o)?Zn(Ke(e)):{}}return(i?Ct:kr)(e,(function(e,r,i){return t(n,e,r,i)})),n},qn.unary=function(e){return Oa(e,1)},qn.union=ia,qn.unionBy=oa,qn.unionWith=aa,qn.uniq=function(e){return e&&e.length?hi(e):[]},qn.uniqBy=function(e,t){return e&&e.length?hi(e,lo(t,2)):[]},qn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?hi(e,r,t):[]},qn.unset=function(e,t){return null==e||di(e,t)},qn.unzip=sa,qn.unzipWith=ua,qn.update=function(e,t,n){return null==e?e:pi(e,t,wi(n))},qn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:pi(e,t,wi(n),i)},qn.values=Zs,qn.valuesIn=function(e){return null==e?[]:Vt(e,Ps(e))},qn.without=ca,qn.words=eu,qn.wrap=function(e,t){return Da(wi(t),e)},qn.xor=la,qn.xorBy=fa,qn.xorWith=ha,qn.zip=da,qn.zipObject=function(e,t){return mi(e||[],t||[],rr)},qn.zipObjectDeep=function(e,t){return mi(e||[],t||[],ti)},qn.zipWith=pa,qn.entries=Fs,qn.entriesIn=qs,qn.extend=Es,qn.extendWith=Ss,lu(qn,qn),qn.add=wu,qn.attempt=tu,qn.camelCase=Ws,qn.capitalize=$s,qn.ceil=bu,qn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ys(n))==n?n:0),t!==r&&(t=(t=ys(t))==t?t:0),cr(ys(e),t,n)},qn.clone=function(e){return lr(e,4)},qn.cloneDeep=function(e){return lr(e,5)},qn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:r)},qn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:r)},qn.conformsTo=function(e,t){return null==t||fr(e,t,Ls(t))},qn.deburr=Hs,qn.defaultTo=function(e,t){return null==e||e!=e?t:e},qn.divide=ku,qn.endsWith=function(e,t,n){e=bs(e),t=fi(t);var i=e.length,o=n=n===r?i:cr(_s(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},qn.eq=Za,qn.escape=function(e){return(e=bs(e))&&J.test(e)?e.replace(Y,rn):e},qn.escapeRegExp=function(e){return(e=bs(e))&&ie.test(e)?e.replace(re,"\\$&"):e},qn.every=function(e,t,n){var i=Ka(e)?xt:gr;return n&&ko(e,t,n)&&(t=r),i(e,lo(t,3))},qn.find=ya,qn.findIndex=Ho,qn.findKey=function(e,t){return zt(e,lo(t,3),kr)},qn.findLast=wa,qn.findLastIndex=Ko,qn.findLastKey=function(e,t){return zt(e,lo(t,3),Er)},qn.floor=Eu,qn.forEach=ba,qn.forEachRight=ka,qn.forIn=function(e,t){return null==e?e:wr(e,lo(t,3),Ps)},qn.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Ps)},qn.forOwn=function(e,t){return e&&kr(e,lo(t,3))},qn.forOwnRight=function(e,t){return e&&Er(e,lo(t,3))},qn.get=Rs,qn.gt=Wa,qn.gte=$a,qn.has=function(e,t){return null!=e&&mo(e,t,Rr)},qn.hasIn=Os,qn.head=Go,qn.identity=au,qn.includes=function(e,t,n,r){e=Ga(e)?e:Zs(e),n=n&&!r?_s(n):0;var i=e.length;return n<0&&(n=wn(i+n,0)),ls(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Dt(e,t,n)>-1},qn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:_s(n);return i<0&&(i=wn(r+i,0)),Dt(e,t,i)},qn.inRange=function(e,t,n){return t=gs(t),n===r?(n=t,t=0):n=gs(n),function(e,t,n){return e>=bn(t,n)&&e<wn(t,n)}(e=ys(e),t,n)},qn.invoke=js,qn.isArguments=Ha,qn.isArray=Ka,qn.isArrayBuffer=Ya,qn.isArrayLike=Ga,qn.isArrayLikeObject=Ja,qn.isBoolean=function(e){return!0===e||!1===e||is(e)&&Tr(e)==y},qn.isBuffer=Va,qn.isDate=Xa,qn.isElement=function(e){return is(e)&&1===e.nodeType&&!ss(e)},qn.isEmpty=function(e){if(null==e)return!0;if(Ga(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Va(e)||hs(e)||Ha(e)))return!e.length;var t=_o(e);if(t==S||t==R)return!e.size;if(Co(e))return!zr(e).length;for(var n in e)if(Be.call(e,n))return!1;return!0},qn.isEqual=function(e,t){return Lr(e,t)},qn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Lr(e,t,r,n):!!i},qn.isError=Qa,qn.isFinite=function(e){return"number"==typeof e&&_n(e)},qn.isFunction=es,qn.isInteger=ts,qn.isLength=ns,qn.isMap=os,qn.isMatch=function(e,t){return e===t||Pr(e,t,ho(t))},qn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Pr(e,t,ho(t),n)},qn.isNaN=function(e){return as(e)&&e!=+e},qn.isNative=function(e){if(Ao(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Br(e)},qn.isNil=function(e){return null==e},qn.isNull=function(e){return null===e},qn.isNumber=as,qn.isObject=rs,qn.isObjectLike=is,qn.isPlainObject=ss,qn.isRegExp=us,qn.isSafeInteger=function(e){return ts(e)&&e>=-9007199254740991&&e<=d},qn.isSet=cs,qn.isString=ls,qn.isSymbol=fs,qn.isTypedArray=hs,qn.isUndefined=function(e){return e===r},qn.isWeakMap=function(e){return is(e)&&_o(e)==N},qn.isWeakSet=function(e){return is(e)&&"[object WeakSet]"==Tr(e)},qn.join=function(e,t){return null==e?"":mn.call(e,t)},qn.kebabCase=Ks,qn.last=Qo,qn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=_s(n))<0?wn(i+o,0):bn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ut(e,qt,o,!0)},qn.lowerCase=Ys,qn.lowerFirst=Gs,qn.lt=ds,qn.lte=ps,qn.max=function(e){return e&&e.length?_r(e,au,xr):r},qn.maxBy=function(e,t){return e&&e.length?_r(e,lo(t,2),xr):r},qn.mean=function(e){return Zt(e,au)},qn.meanBy=function(e,t){return Zt(e,lo(t,2))},qn.min=function(e){return e&&e.length?_r(e,au,Dr):r},qn.minBy=function(e,t){return e&&e.length?_r(e,lo(t,2),Dr):r},qn.stubArray=mu,qn.stubFalse=yu,qn.stubObject=function(){return{}},qn.stubString=function(){return""},qn.stubTrue=function(){return!0},qn.multiply=Au,qn.nth=function(e,t){return e&&e.length?$r(e,_s(t)):r},qn.noConflict=function(){return ht._===this&&(ht._=Fe),this},qn.noop=fu,qn.now=Ra,qn.pad=function(e,t,n){e=bs(e);var r=(t=_s(t))?hn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(_t(i),n)+e+Hi(gt(i),n)},qn.padEnd=function(e,t,n){e=bs(e);var r=(t=_s(t))?hn(e):0;return t&&r<t?e+Hi(t-r,n):e},qn.padStart=function(e,t,n){e=bs(e);var r=(t=_s(t))?hn(e):0;return t&&r<t?Hi(t-r,n)+e:e},qn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),En(bs(e).replace(oe,""),t||0)},qn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ko(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=gs(e),t===r?(t=e,e=0):t=gs(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=Sn();return bn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Jr(e,t)},qn.reduce=function(e,t,n){var r=Ka(e)?Lt:Ht,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},qn.reduceRight=function(e,t,n){var r=Ka(e)?Pt:Ht,i=arguments.length<3;return r(e,lo(t,4),n,i,vr)},qn.repeat=function(e,t,n){return t=(n?ko(e,t,n):t===r)?1:_s(t),Vr(bs(e),t)},qn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},qn.result=function(e,t,n){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=r);++i<o;){var a=null==e?r:e[Do(t[i])];a===r&&(i=o,a=n),e=es(a)?a.call(e):a}return e},qn.round=Cu,qn.runInContext=e,qn.sample=function(e){return(Ka(e)?Qn:Qr)(e)},qn.size=function(e){if(null==e)return 0;if(Ga(e))return ls(e)?hn(e):e.length;var t=_o(e);return t==S||t==R?e.size:zr(e).length},qn.snakeCase=Js,qn.some=function(e,t,n){var i=Ka(e)?Bt:ai;return n&&ko(e,t,n)&&(t=r),i(e,lo(t,3))},qn.sortedIndex=function(e,t){return si(e,t)},qn.sortedIndexBy=function(e,t,n){return ui(e,t,lo(n,2))},qn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=si(e,t);if(r<n&&Za(e[r],t))return r}return-1},qn.sortedLastIndex=function(e,t){return si(e,t,!0)},qn.sortedLastIndexBy=function(e,t,n){return ui(e,t,lo(n,2),!0)},qn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=si(e,t,!0)-1;if(Za(e[n],t))return n}return-1},qn.startCase=Vs,qn.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:cr(_s(n),0,e.length),t=fi(t),e.slice(n,n+t.length)==t},qn.subtract=Tu,qn.sum=function(e){return e&&e.length?Kt(e,au):0},qn.sumBy=function(e,t){return e&&e.length?Kt(e,lo(t,2)):0},qn.template=function(e,t,n){var i=qn.templateSettings;n&&ko(e,t,n)&&(t=r),e=bs(e),t=Ss({},t,i,eo);var o,a,s=Ss({},t.imports,i.imports,eo),u=Ls(s),c=Vt(s,u),l=0,f=t.interpolate||be,h="__p += '",d=xe((t.escape||be).source+"|"+f.source+"|"+(f===Q?de:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(Be.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";e.replace(d,(function(t,n,r,i,s,u){return r||(r=i),h+=e.slice(l,u).replace(ke,on),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),h+="';\n";var v=Be.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new Se("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(W,""):h).replace($,"$1").replace(H,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=tu((function(){return Ae(u,p+"return "+h).apply(r,c)}));if(g.source=h,Qa(g))throw g;return g},qn.times=function(e,t){if((e=_s(e))<1||e>d)return[];var n=v,r=bn(e,v);t=lo(t),e-=v;for(var i=Yt(r,t);++n<e;)t(n);return i},qn.toFinite=gs,qn.toInteger=_s,qn.toLength=ms,qn.toLower=function(e){return bs(e).toLowerCase()},qn.toNumber=ys,qn.toSafeInteger=function(e){return e?cr(_s(e),-9007199254740991,d):0===e?e:0},qn.toString=bs,qn.toUpper=function(e){return bs(e).toUpperCase()},qn.trim=function(e,t,n){if((e=bs(e))&&(n||t===r))return Gt(e);if(!e||!(t=fi(t)))return e;var i=dn(e),o=dn(t);return Ei(i,Qt(i,o),en(i,o)+1).join("")},qn.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===r))return e.slice(0,pn(e)+1);if(!e||!(t=fi(t)))return e;var i=dn(e);return Ei(i,0,en(i,dn(t))+1).join("")},qn.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===r))return e.replace(oe,"");if(!e||!(t=fi(t)))return e;var i=dn(e);return Ei(i,Qt(i,dn(t))).join("")},qn.truncate=function(e,t){var n=30,i="...";if(rs(t)){var o="separator"in t?t.separator:o;n="length"in t?_s(t.length):n,i="omission"in t?fi(t.omission):i}var a=(e=bs(e)).length;if(an(e)){var s=dn(e);a=s.length}if(n>=a)return e;var u=n-hn(i);if(u<1)return i;var c=s?Ei(s,0,u).join(""):e.slice(0,u);if(o===r)return c+i;if(s&&(u+=c.length-u),us(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=xe(o.source,bs(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===r?u:h)}}else if(e.indexOf(fi(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},qn.unescape=function(e){return(e=bs(e))&&G.test(e)?e.replace(K,vn):e},qn.uniqueId=function(e){var t=++Me;return bs(e)+t},qn.upperCase=Xs,qn.upperFirst=Qs,qn.each=ba,qn.eachRight=ka,qn.first=Go,lu(qn,(Su={},kr(qn,(function(e,t){Be.call(qn.prototype,t)||(Su[t]=e)})),Su),{chain:!1}),qn.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){qn[e].placeholder=qn})),Ct(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===r?1:wn(_s(n),0);var i=this.__filtered__&&!t?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(n,i.__takeCount__):i.__views__.push({size:bn(n,v),type:e+(i.__dir__<0?"Right":"")}),i},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ct(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(au)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Nr(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(za(lo(e)))},Hn.prototype.slice=function(e,t){e=_s(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=_s(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(v)},kr(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=qn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(qn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof Hn,c=s[0],l=u||Ka(t),f=function(e){var t=o.apply(qn,jt([e],s));return i&&h?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=u&&!d;if(!a&&l){t=v?t:new Hn(this);var g=e.apply(t,s);return g.__actions__.push({func:ga,args:[f],thisArg:r}),new $n(g,h)}return p&&v?e.apply(this,s):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);qn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ka(i)?i:[],e)}return this[n]((function(n){return t.apply(Ka(n)?n:[],e)}))}})),kr(Hn.prototype,(function(e,t){var n=qn[t];if(n){var r=n.name+"";Be.call(jn,r)||(jn[r]=[]),jn[r].push({name:t,func:n})}})),jn[qi(r,2).name]=[{name:"wrapper",func:r}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ka(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=wn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,h=0,d=bn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return gi(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var v=-1,g=e[c+=t];++v<f;){var _=l[v],m=_.iteratee,y=_.type,w=m(g);if(2==y)g=w;else if(!w){if(1==y)continue e;break e}}p[h++]=g}return p},qn.prototype.at=_a,qn.prototype.chain=function(){return va(this)},qn.prototype.commit=function(){return new $n(this.value(),this.__chain__)},qn.prototype.next=function(){this.__values__===r&&(this.__values__=vs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},qn.prototype.plant=function(e){for(var t,n=this;n instanceof Wn;){var i=qo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},qn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:ga,args:[ra],thisArg:r}),new $n(t,this.__chain__)}return this.thru(ra)},qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},qn.prototype.first=qn.prototype.head,tt&&(qn.prototype[tt]=function(){return this}),qn}();pt?((pt.exports=gn)._=gn,dt._=gn):ht._=gn}).call(t)})),o="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}var u=a,c=s;function l(e){if(u===setTimeout)return setTimeout(e,0);if((u===a||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}"function"==typeof o.setTimeout&&(u=setTimeout),"function"==typeof o.clearTimeout&&(c=clearTimeout);var f,h=[],d=!1,p=-1;function v(){d&&f&&(d=!1,f.length?h=f.concat(h):p=-1,h.length&&g())}function g(){if(!d){var e=l(v);d=!0;for(var t=h.length;t;){for(f=h,h=[];++p<t;)f&&f[p].run();p=-1,t=h.length}f=null,d=!1,function(e){if(c===clearTimeout)return clearTimeout(e);if((c===s||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}(e)}}function _(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new m(e,t)),1!==h.length||d||l(g)}function m(e,t){this.fun=e,this.array=t}m.prototype.run=function(){this.fun.apply(null,this.array)};function y(){}var w=y,b=y,k=y,E=y,S=y,A=y,C=y;var T=o.performance||{},x=T.now||T.mozNow||T.msNow||T.oNow||T.webkitNow||function(){return(new Date).getTime()};var R=new Date;var O={nextTick:_,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:w,addListener:b,once:k,off:E,removeListener:S,removeAllListeners:A,emit:C,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*x.call(T),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-R)/1e3}},I=1e3,N=60*I,j=60*N,L=24*j,P=7*L,B=365.25*L,M=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*B;case"weeks":case"week":case"w":return n*P;case"days":case"day":case"d":return n*L;case"hours":case"hour":case"hrs":case"hr":case"h":return n*j;case"minutes":case"minute":case"mins":case"min":case"m":return n*N;case"seconds":case"second":case"secs":case"sec":case"s":return n*I;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=L)return z(e,t,L,"day");if(t>=j)return z(e,t,j,"hour");if(t>=N)return z(e,t,N,"minute");if(t>=I)return z(e,t,I,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=L)return Math.round(e/L)+"d";if(t>=j)return Math.round(e/j)+"h";if(t>=N)return Math.round(e/N)+"m";if(t>=I)return Math.round(e/I)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function z(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}var U=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=M,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},D=n((function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==O&&"env"in O&&(e=O.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=U(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}));function F(){return!1}function q(){throw new Error("tty.ReadStream is not implemented")}function Z(){throw new Error("tty.ReadStream is not implemented")}D.formatArgs,D.save,D.load,D.useColors,D.storage,D.destroy,D.colors,D.log;var W={isatty:F,ReadStream:q,WriteStream:Z},$=Object.freeze({__proto__:null,isatty:F,ReadStream:q,WriteStream:Z,default:W}),H=[],K=[],Y="undefined"!=typeof Uint8Array?Uint8Array:Array,G=!1;function J(){G=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)H[t]=e[t],K[e.charCodeAt(t)]=t;K["-".charCodeAt(0)]=62,K["_".charCodeAt(0)]=63}function V(e,t,n){for(var r,i,o=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(H[(i=r)>>18&63]+H[i>>12&63]+H[i>>6&63]+H[63&i]);return o.join("")}function X(e){var t;G||J();for(var n=e.length,r=n%3,i="",o=[],a=16383,s=0,u=n-r;s<u;s+=a)o.push(V(e,s,s+a>u?u:s+a));return 1===r?(t=e[n-1],i+=H[t>>2],i+=H[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=H[t>>10],i+=H[t>>4&63],i+=H[t<<2&63],i+="="),o.push(i),o.join("")}function Q(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)}function ee(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*v}var te={}.toString,ne=Array.isArray||function(e){return"[object Array]"==te.call(e)};function re(){return oe.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ie(e,t){if(re()<t)throw new RangeError("Invalid typed array length");return oe.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=oe.prototype:(null===e&&(e=new oe(t)),e.length=t),e}function oe(e,t,n){if(!(oe.TYPED_ARRAY_SUPPORT||this instanceof oe))return new oe(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return ue(this,e)}return ae(this,e,t,n)}function ae(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);oe.TYPED_ARRAY_SUPPORT?(e=t).__proto__=oe.prototype:e=ce(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!oe.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|he(t,n),i=(e=ie(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(fe(t)){var n=0|le(t.length);return 0===(e=ie(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?ie(e,0):ce(e,t);if("Buffer"===t.type&&ne(t.data))return ce(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function se(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function ue(e,t){if(se(t),e=ie(e,t<0?0:0|le(t)),!oe.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function ce(e,t){var n=t.length<0?0:0|le(t.length);e=ie(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function le(e){if(e>=re())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+re().toString(16)+" bytes");return 0|e}function fe(e){return!(null==e||!e._isBuffer)}function he(e,t){if(fe(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Ue(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return De(e).length;default:if(r)return Ue(e).length;t=(""+t).toLowerCase(),r=!0}}function de(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return xe(this,t,n);case"utf8":case"utf-8":return Se(this,t,n);case"ascii":return Ce(this,t,n);case"latin1":case"binary":return Te(this,t,n);case"base64":return Ee(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Re(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function pe(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function ve(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=oe.from(t,r)),fe(t))return 0===t.length?-1:ge(e,t,n,r,i);if("number"==typeof t)return t&=255,oe.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):ge(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function ge(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function _e(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function me(e,t,n,r){return Fe(Ue(t,e.length-n),e,n,r)}function ye(e,t,n,r){return Fe(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function we(e,t,n,r){return ye(e,t,n,r)}function be(e,t,n,r){return Fe(De(t),e,n,r)}function ke(e,t,n,r){return Fe(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function Ee(e,t,n){return 0===t&&n===e.length?X(e):X(e.slice(t,n))}function Se(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=Ae)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ae));return n}(r)}oe.TYPED_ARRAY_SUPPORT=void 0===o.TYPED_ARRAY_SUPPORT||o.TYPED_ARRAY_SUPPORT,oe.poolSize=8192,oe._augment=function(e){return e.__proto__=oe.prototype,e},oe.from=function(e,t,n){return ae(null,e,t,n)},oe.TYPED_ARRAY_SUPPORT&&(oe.prototype.__proto__=Uint8Array.prototype,oe.__proto__=Uint8Array),oe.alloc=function(e,t,n){return function(e,t,n,r){return se(t),t<=0?ie(e,t):void 0!==n?"string"==typeof r?ie(e,t).fill(n,r):ie(e,t).fill(n):ie(e,t)}(null,e,t,n)},oe.allocUnsafe=function(e){return ue(null,e)},oe.allocUnsafeSlow=function(e){return ue(null,e)},oe.isBuffer=qe,oe.compare=function(e,t){if(!fe(e)||!fe(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},oe.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},oe.concat=function(e,t){if(!ne(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return oe.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=oe.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!fe(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},oe.byteLength=he,oe.prototype._isBuffer=!0,oe.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)pe(this,t,t+1);return this},oe.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)pe(this,t,t+3),pe(this,t+1,t+2);return this},oe.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)pe(this,t,t+7),pe(this,t+1,t+6),pe(this,t+2,t+5),pe(this,t+3,t+4);return this},oe.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Se(this,0,e):de.apply(this,arguments)},oe.prototype.equals=function(e){if(!fe(e))throw new TypeError("Argument must be a Buffer");return this===e||0===oe.compare(this,e)},oe.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},oe.prototype.compare=function(e,t,n,r,i){if(!fe(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),l=0;l<s;++l)if(u[l]!==c[l]){o=u[l],a=c[l];break}return o<a?-1:a<o?1:0},oe.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},oe.prototype.indexOf=function(e,t,n){return ve(this,e,t,n,!0)},oe.prototype.lastIndexOf=function(e,t,n){return ve(this,e,t,n,!1)},oe.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _e(this,e,t,n);case"utf8":case"utf-8":return me(this,e,t,n);case"ascii":return ye(this,e,t,n);case"latin1":case"binary":return we(this,e,t,n);case"base64":return be(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ke(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},oe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ae=4096;function Ce(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function Te(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function xe(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=ze(e[o]);return i}function Re(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function Oe(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Ie(e,t,n,r,i,o){if(!fe(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function Ne(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function je(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function Le(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Pe(e,t,n,r,i){return i||Le(e,0,n,4),ee(e,t,n,r,23,4),n+4}function Be(e,t,n,r,i){return i||Le(e,0,n,8),ee(e,t,n,r,52,8),n+8}oe.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),oe.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=oe.prototype;else{var i=t-e;n=new oe(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},oe.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Oe(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},oe.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Oe(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},oe.prototype.readUInt8=function(e,t){return t||Oe(e,1,this.length),this[e]},oe.prototype.readUInt16LE=function(e,t){return t||Oe(e,2,this.length),this[e]|this[e+1]<<8},oe.prototype.readUInt16BE=function(e,t){return t||Oe(e,2,this.length),this[e]<<8|this[e+1]},oe.prototype.readUInt32LE=function(e,t){return t||Oe(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},oe.prototype.readUInt32BE=function(e,t){return t||Oe(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},oe.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Oe(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},oe.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Oe(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},oe.prototype.readInt8=function(e,t){return t||Oe(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},oe.prototype.readInt16LE=function(e,t){t||Oe(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},oe.prototype.readInt16BE=function(e,t){t||Oe(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},oe.prototype.readInt32LE=function(e,t){return t||Oe(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},oe.prototype.readInt32BE=function(e,t){return t||Oe(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},oe.prototype.readFloatLE=function(e,t){return t||Oe(e,4,this.length),Q(this,e,!0,23,4)},oe.prototype.readFloatBE=function(e,t){return t||Oe(e,4,this.length),Q(this,e,!1,23,4)},oe.prototype.readDoubleLE=function(e,t){return t||Oe(e,8,this.length),Q(this,e,!0,52,8)},oe.prototype.readDoubleBE=function(e,t){return t||Oe(e,8,this.length),Q(this,e,!1,52,8)},oe.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Ie(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},oe.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Ie(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},oe.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,1,255,0),oe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},oe.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,2,65535,0),oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ne(this,e,t,!0),t+2},oe.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,2,65535,0),oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ne(this,e,t,!1),t+2},oe.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,4,4294967295,0),oe.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):je(this,e,t,!0),t+4},oe.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,4,4294967295,0),oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):je(this,e,t,!1),t+4},oe.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Ie(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},oe.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Ie(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},oe.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,1,127,-128),oe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},oe.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,2,32767,-32768),oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ne(this,e,t,!0),t+2},oe.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,2,32767,-32768),oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ne(this,e,t,!1),t+2},oe.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,4,2147483647,-2147483648),oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):je(this,e,t,!0),t+4},oe.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):je(this,e,t,!1),t+4},oe.prototype.writeFloatLE=function(e,t,n){return Pe(this,e,t,!0,n)},oe.prototype.writeFloatBE=function(e,t,n){return Pe(this,e,t,!1,n)},oe.prototype.writeDoubleLE=function(e,t,n){return Be(this,e,t,!0,n)},oe.prototype.writeDoubleBE=function(e,t,n){return Be(this,e,t,!1,n)},oe.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!oe.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},oe.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!oe.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=fe(e)?e:Ue(new oe(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var Me=/[^+\/0-9A-Za-z-_]/g;function ze(e){return e<16?"0"+e.toString(16):e.toString(16)}function Ue(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function De(e){return function(e){var t,n,r,i,o,a;G||J();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new Y(3*s/4-o),r=o>0?s-4:s;var u=0;for(t=0,n=0;t<r;t+=4,n+=3)i=K[e.charCodeAt(t)]<<18|K[e.charCodeAt(t+1)]<<12|K[e.charCodeAt(t+2)]<<6|K[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=K[e.charCodeAt(t)]<<2|K[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=K[e.charCodeAt(t)]<<10|K[e.charCodeAt(t+1)]<<4|K[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Me,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Fe(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function qe(e){return null!=e&&(!!e._isBuffer||Ze(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Ze(e.slice(0,0))}(e))}function Ze(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var We="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},$e=/%[sdj%]/g;function He(e){if(!ut(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(Ve(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace($e,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),a=r[n];n<i;a=r[++n])ot(a)||!ht(a)?o+=" "+a:o+=" "+Ve(a);return o}function Ke(e,t){if(lt(o.process))return function(){return Ke(e,t).apply(this,arguments)};if(!0===O.noDeprecation)return e;var n=!1;return function(){if(!n){if(O.throwDeprecation)throw new Error(t);O.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var Ye,Ge={};function Je(e){if(lt(Ye)&&(Ye=O.env.NODE_DEBUG||""),e=e.toUpperCase(),!Ge[e])if(new RegExp("\\b"+e+"\\b","i").test(Ye)){Ge[e]=function(){var t=He.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else Ge[e]=function(){};return Ge[e]}function Ve(e,t){var n={seen:[],stylize:Qe};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),it(t)?n.showHidden=t:t&&Et(n,t),lt(n.showHidden)&&(n.showHidden=!1),lt(n.depth)&&(n.depth=2),lt(n.colors)&&(n.colors=!1),lt(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=Xe),et(n,e,n.depth)}function Xe(e,t){var n=Ve.styles[t];return n?"["+Ve.colors[n][0]+"m"+e+"["+Ve.colors[n][1]+"m":e}function Qe(e,t){return e}function et(e,t,n){if(e.customInspect&&t&&vt(t.inspect)&&t.inspect!==Ve&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return ut(r)||(r=et(e,r,n)),r}var i=function(e,t){if(lt(t))return e.stylize("undefined","undefined");if(ut(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(st(t))return e.stylize(""+t,"number");if(it(t))return e.stylize(""+t,"boolean");if(ot(t))return e.stylize("null","null")}(e,t);if(i)return i;var o=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),pt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return tt(t);if(0===o.length){if(vt(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(ft(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(dt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(pt(t))return tt(t)}var u,c="",l=!1,f=["{","}"];(rt(t)&&(l=!0,f=["[","]"]),vt(t))&&(c=" [Function"+(t.name?": "+t.name:"")+"]");return ft(t)&&(c=" "+RegExp.prototype.toString.call(t)),dt(t)&&(c=" "+Date.prototype.toUTCString.call(t)),pt(t)&&(c=" "+tt(t)),0!==o.length||l&&0!=t.length?n<0?ft(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=l?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)St(t,String(a))?o.push(nt(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(nt(e,t,n,r,i,!0))})),o}(e,t,n,a,o):o.map((function(r){return nt(e,t,n,a,r,l)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,c,f)):f[0]+c+f[1]}function tt(e){return"["+Error.prototype.toString.call(e)+"]"}function nt(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),St(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=ot(n)?et(e,u.value,null):et(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),lt(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function rt(e){return Array.isArray(e)}function it(e){return"boolean"==typeof e}function ot(e){return null===e}function at(e){return null==e}function st(e){return"number"==typeof e}function ut(e){return"string"==typeof e}function ct(e){return"symbol"==typeof e}function lt(e){return void 0===e}function ft(e){return ht(e)&&"[object RegExp]"===mt(e)}function ht(e){return"object"==typeof e&&null!==e}function dt(e){return ht(e)&&"[object Date]"===mt(e)}function pt(e){return ht(e)&&("[object Error]"===mt(e)||e instanceof Error)}function vt(e){return"function"==typeof e}function gt(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function _t(e){return oe.isBuffer(e)}function mt(e){return Object.prototype.toString.call(e)}function yt(e){return e<10?"0"+e.toString(10):e.toString(10)}Ve.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ve.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var wt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bt(){var e=new Date,t=[yt(e.getHours()),yt(e.getMinutes()),yt(e.getSeconds())].join(":");return[e.getDate(),wt[e.getMonth()],t].join(" ")}function kt(){console.log("%s - %s",bt(),He.apply(null,arguments))}function Et(e,t){if(!t||!ht(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function St(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var At,Ct={inherits:We,_extend:Et,log:kt,isBuffer:_t,isPrimitive:gt,isFunction:vt,isError:pt,isDate:dt,isObject:ht,isRegExp:ft,isUndefined:lt,isSymbol:ct,isString:ut,isNumber:st,isNullOrUndefined:at,isNull:ot,isBoolean:it,isArray:rt,inspect:Ve,deprecate:Ke,format:He,debuglog:Je},Tt=Object.freeze({__proto__:null,format:He,deprecate:Ke,debuglog:Je,inspect:Ve,isArray:rt,isBoolean:it,isNull:ot,isNullOrUndefined:at,isNumber:st,isString:ut,isSymbol:ct,isUndefined:lt,isRegExp:ft,isObject:ht,isDate:dt,isError:pt,isFunction:vt,isPrimitive:gt,isBuffer:_t,log:kt,inherits:We,_extend:Et,default:Ct});function xt(){if(void 0===At){var e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);if(t[0]=1,t[1]=2,258===n[0])At="BE";else{if(513!==n[0])throw new Error("unable to figure out endianess");At="LE"}}return At}function Rt(){return void 0!==o.location?o.location.hostname:""}function Ot(){return[]}function It(){return 0}function Nt(){return Number.MAX_VALUE}function jt(){return Number.MAX_VALUE}function Lt(){return[]}function Pt(){return"Browser"}function Bt(){return void 0!==o.navigator?o.navigator.appVersion:""}function Mt(){}function zt(){}function Ut(){return"/tmp"}var Dt=Ut,Ft={EOL:"\n",tmpdir:Dt,tmpDir:Ut,networkInterfaces:Mt,getNetworkInterfaces:zt,release:Bt,type:Pt,cpus:Lt,totalmem:jt,freemem:Nt,uptime:It,loadavg:Ot,hostname:Rt,endianness:xt},qt=(e,t=O.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)},Zt=r(Object.freeze({__proto__:null,endianness:xt,hostname:Rt,loadavg:Ot,uptime:It,freemem:Nt,totalmem:jt,cpus:Lt,type:Pt,release:Bt,networkInterfaces:Mt,getNetworkInterfaces:zt,arch:function(){return"javascript"},platform:function(){return"browser"},tmpDir:Ut,tmpdir:Dt,EOL:"\n",default:Ft})),Wt=r($);const{env:$t}=O;let Ht;function Kt(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Yt(e,t){if(0===Ht)return 0;if(qt("color=16m")||qt("color=full")||qt("color=truecolor"))return 3;if(qt("color=256"))return 2;if(e&&!t&&void 0===Ht)return 0;const n=Ht||0;if("dumb"===$t.TERM)return n;if("win32"===O.platform){const e=Zt.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in $t)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in $t))||"codeship"===$t.CI_NAME?1:n;if("TEAMCITY_VERSION"in $t)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test($t.TEAMCITY_VERSION)?1:0;if("truecolor"===$t.COLORTERM)return 3;if("TERM_PROGRAM"in $t){const e=parseInt(($t.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch($t.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test($t.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test($t.TERM)||"COLORTERM"in $t?1:n}qt("no-color")||qt("no-colors")||qt("color=false")||qt("color=never")?Ht=0:(qt("color")||qt("colors")||qt("color=true")||qt("color=always"))&&(Ht=1),"FORCE_COLOR"in $t&&(Ht="true"===$t.FORCE_COLOR?1:"false"===$t.FORCE_COLOR?0:0===$t.FORCE_COLOR.length?1:Math.min(parseInt($t.FORCE_COLOR,10),3));var Gt={supportsColor:function(e){return Kt(Yt(e,e&&e.isTTY))},stdout:Kt(Yt(!0,Wt.isatty(1))),stderr:Kt(Yt(!0,Wt.isatty(2)))},Jt=r(Tt),Vt=n((function(e,t){t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return O.stderr.write(Jt.format(...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} [0m`;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?O.env.DEBUG=e:delete O.env.DEBUG},t.load=function(){return O.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):Wt.isatty(O.stderr.fd)},t.destroy=Jt.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=Gt;e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(O.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=O.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=U(t);const{formatters:n}=e.exports;n.o=function(e){return this.inspectOpts.colors=this.useColors,Jt.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,Jt.inspect(e,this.inspectOpts)}}));Vt.init,Vt.log,Vt.formatArgs,Vt.save,Vt.load,Vt.useColors,Vt.destroy,Vt.colors,Vt.inspectOpts;var Xt,Qt,en,tn,nn,rn,on,an,sn,un,cn=n((function(e){void 0===O||"renderer"===O.type||!0===O.browser||O.__nwjs?e.exports=D:e.exports=Vt}));e.NetworkType=void 0,(Xt=e.NetworkType||(e.NetworkType={})).none="none",Xt.wifi="wifi",Xt.cellular="cellular",Xt.unknown="unknown",e.PlatformType=void 0,(Qt=e.PlatformType||(e.PlatformType={})).wp="wp",Qt.android="android",Qt.iOS="iOS",Qt.unknown="unknown",e.ProfileType=void 0,(en=e.ProfileType||(e.ProfileType={}))[en.user=1]="user",en[en.oa=0]="oa",en[en.aliasOA=2]="aliasOA",e.ChatType=void 0,(tn=e.ChatType||(e.ChatType={}))[tn.user=1]="user",tn[tn.oa=0]="oa",e.PostFeedType=void 0,(nn=e.PostFeedType||(e.PostFeedType={}))[nn.image=1]="image",nn[nn.link=4]="link",nn[nn.profile=5]="profile",e.ShareSheetType=void 0,(rn=e.ShareSheetType||(e.ShareSheetType={}))[rn.image=1]="image",rn[rn.gif=11]="gif",rn[rn.video=12]="video",rn[rn.link=4]="link",rn[rn.oa=5]="oa",e.OrientationType=void 0,(on=e.OrientationType||(e.OrientationType={}))[on.auto=1]="auto",on[on.portrait=2]="portrait",on[on.landscape=3]="landscape",e.VibrateType=void 0,(an=e.VibrateType||(e.VibrateType={}))[an.oneShot=0]="oneShot",e.NativeCode=void 0,(sn=e.NativeCode||(e.NativeCode={}))[sn.token_invalid=-2]="token_invalid",sn[sn.not_permission=-1]="not_permission",sn[sn.client_not_support=-5]="client_not_support",sn[sn.decode_failed=-4]="decode_failed",e.Events=void 0,(un=e.Events||(e.Events={})).AppPaused="h5.event.paused",un.AppResumed="h5.event.resumed",un.NetworkChanged="h5.event.connection.changed",un.OnDataCallback="h5.event.webview.result";const ln=e=>{const t=document.cookie;if(t){const i=t.split("; ");if(i&&i.length>0)for(var n=e.length+1,r=i.length-1;r>=0;r--){let t=i[r];if(t&&0===t.indexOf(e)&&(t=t.substring(n,t.length),t))return t=t.replace(/["']/g,""),t}}return null},fn=e=>ln(`${window.location.host}_`+e),hn=e=>ln((()=>{const e=window.location.host;if(e){if(e.indexOf("zalo.me")>=0)return"zalo.me_";if(e.indexOf("baomoi.com")>=0)return"baomoi.com_";if(e.indexOf("mp3.zing.vn")>=0)return"mp3.zing.vn_";if(e.indexOf("zaloapp.com")>=0)return"zaloapp.com_"}return""})()+e),dn="action.open.profile",pn="action.open.inapp",vn="action.open.chat",gn="action.open.postfeed",_n="action.follow.oa",mn="action.unfollow.oa",yn="action.open.sharesheet",wn="action.request.permission.camera",bn="action.change.title.header",kn="action.webview.networktype",En="action.create.options.menu",Sn="action.create.shortcut",An="action.change.actionbar.leftbutton.type",Cn="action.window.close",Tn="action.prompt.authentication",xn="action.prompt.authentication.check_state",Rn="action.get.location",On="action.query.location.hide",In="action.show.toast",Nn="action.hide.keyboard",jn="action.open.phone",Ln="action.open.qr",Pn="action.open.sms",Bn="action.view.myqr",Mn="action.keep.screen",zn="action.change.autorotate",Un="action.scan.ibeacon",Dn="action.save.image.gallery",Fn="action.open.mp",qn="action.change.actionbar",Zn="action.interactive.vibration",Wn="action.zbrowser.mpds",$n="action.webview.set.result",Hn="action.mp.get.number",Kn=["action.get.downloaded.sticker","action.report.abuse",_n,mn,yn,En,An,Cn,"action.zbrowser.jsbridge",Rn,On,In,Bn,Mn,"action.zalorun.getTrackingStatus","action.zalorun.setTrackingStatus","action.zalorun.getDayStep","action.zalorun.forceSubmitData","action.zalorun.setWeight","action.download.cate"],Yn=-1400,Gn=-1401,Jn=-1403,Vn={READ_MORE:"Read more at: https://miniapp.zalo.me/docs/api",LOGIN_REQUIRED:"Please login before to call this api. Read more at: https://miniapp.zalo.me/docs/api/login",LOGIN_FAILED:"Login failed.",NOT_PERMISSION:"You don't have permission to call this api",CLIENT_NOT_SUPPORT:"This API is not supported in this Zalo version",DECODE_FAILED:"Can not decode your data. Read more at: https://miniapp.zalo.me/docs/api/error"},Xn="apps/get-info",Qn={android:12100571,iOS:400,wp:0,unknown:0},er=new RegExp("[\\u0300-\\u036f]","g"),tr=new RegExp("[đ|Đ]","g"),nr=new RegExp("\\s","g"),rr=cn("zmp:utils:common"),ir=e=>{try{new URL(e)}catch(e){return!1}return!0},or=()=>navigator.userAgent||navigator.vendor||window.opera,ar=()=>{const e=or().toLowerCase();return{isWP:/iemobile/.test(e),isAndroid:/android/i.test(e)&&!/iemobile/.test(e),isIOS:/iphone|ios|ipad|ipod/.test(e)&&!/iemobile/.test(e),isMobile:/android|iphone|ios|ipad|ipod|iemobile/.test(e),isZalo:/zalo/.test(e)}},sr=e=>{const t=document.getElementsByTagName("meta");for(let n=0;n<t.length;n++)if(t[n].getAttribute("name")===e||t[n].getAttribute("property")===e)return t[n].getAttribute("content");return""},ur=()=>{const e=or().toLowerCase().split("zalo")[1];if(e){return e.replace(" ","").split("/")[1]||""}return""},cr=()=>{let t=ar();return t.isWP?e.PlatformType.wp:t.isAndroid?e.PlatformType.android:t.isIOS?e.PlatformType.iOS:e.PlatformType.unknown},lr=(e,t)=>{const n=t.toLowerCase();return!(("array"!==n&&"array<number>"!==n&&"array<string>"!==n||!("array"===n&&Array.isArray(e)||"array<number>"===n&&(e=>Array.isArray(e)&&!e.some((e=>"number"!=typeof e)))(e)||"array<string>"===n&&(e=>Array.isArray(e)&&!e.some((e=>"string"!=typeof e)))(e)))&&(Array.isArray(e)||typeof e!==t))},fr=e=>null==e||e.hasOwnProperty("length")&&0===e.length||e.constructor===Object&&0===Object.keys(e).length,hr=e=>(e=>{let t=fn(e);return t||(t=hn(e),t)?t:ln(e)})(e),dr=e=>{if(i.isObject(JSON)&&JSON.parse&&i.isString(e)){const t=e.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");return JSON.parse(t,((e,t)=>t))}return i.isObject(e)?e:new Function("return "+e)()},pr=e=>{if(i.isObject(JSON)&&JSON.stringify)return JSON.stringify(e);if(void 0===e)return"undefined";if(null===e)return"null";try{if("string"==typeof e||null!==e.constructor.toString().match(/string/i))return'"'+e.replace(/"/g,'\\"')+'"'}catch(e){console.log(e)}var t;if(null!==Object.prototype.toString.call(e).match(/array/i)){t=new Array;for(var n=e.length,r=0;r<n;r++)t.push(pr(e[r]));return"["+t.join(",")+"]"}if("object"==typeof e){for(var o in t=new Array,e)t.push('"'+o+'":'+pr(e[o]));return"{"+t.join(",")+"}"}return e.toString()},vr=()=>{try{const e=Number(ur()),t=cr();return e>=Qn[t]}catch(e){return!0}},gr=e=>JSON.stringify(e).replace(/"/g,'\\"').replace(/'/g,"'"),_r=e=>{try{if(e){rr(e);const t=e.replace(/\\/g,"").replace(/'/g,"'");return rr("formattedValue",t,JSON.parse(t),typeof JSON.parse(t)),JSON.parse(t)}return null}catch(t){return console.log(t),e}};
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zmp={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}function r(e){return e&&e.default||e}var i=n((function(e,n){(function(){var r,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,u=32,c=64,l=128,f=256,h=1/0,d=9007199254740991,p=NaN,v=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",u],["partialRight",c],["rearg",f]],_="[object Arguments]",m="[object Array]",y="[object Boolean]",w="[object Date]",b="[object Error]",k="[object Function]",E="[object GeneratorFunction]",S="[object Map]",A="[object Number]",C="[object Object]",T="[object Promise]",x="[object RegExp]",R="[object Set]",O="[object String]",I="[object Symbol]",N="[object WeakMap]",j="[object ArrayBuffer]",L="[object DataView]",P="[object Float32Array]",B="[object Float64Array]",M="[object Int8Array]",z="[object Int16Array]",U="[object Int32Array]",D="[object Uint8Array]",F="[object Uint8ClampedArray]",q="[object Uint16Array]",Z="[object Uint32Array]",W=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,G=RegExp(K.source),J=RegExp(Y.source),V=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(re.source),oe=/^\s+/,ae=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,_e=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",xe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="['’]",Oe="[\\ud800-\\udfff]",Ie="["+xe+"]",Ne="["+Ee+"]",je="\\d+",Le="[\\u2700-\\u27bf]",Pe="["+Ae+"]",Be="[^\\ud800-\\udfff"+xe+je+Se+Ae+Ce+"]",Me="\\ud83c[\\udffb-\\udfff]",ze="[^\\ud800-\\udfff]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Ce+"]",qe="(?:"+Pe+"|"+Be+")",Ze="(?:"+Fe+"|"+Be+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Ne+"|"+Me+")"+"?",Ke="[\\ufe0e\\ufe0f]?",Ye=Ke+He+("(?:\\u200d(?:"+[ze,Ue,De].join("|")+")"+Ke+He+")*"),Ge="(?:"+[Le,Ue,De].join("|")+")"+Ye,Je="(?:"+[ze+Ne+"?",Ne,Ue,De,Oe].join("|")+")",Ve=RegExp(Re,"g"),Xe=RegExp(Ne,"g"),Qe=RegExp(Me+"(?="+Me+")|"+Je+Ye,"g"),et=RegExp([Fe+"?"+Pe+"+"+We+"(?="+[Ie,Fe,"$"].join("|")+")",Ze+"+"+$e+"(?="+[Ie,Fe+qe,"$"].join("|")+")",Fe+"?"+qe+"+"+We,Fe+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je,Ge].join("|"),"g"),tt=RegExp("[\\u200d\\ud800-\\udfff"+Ee+Te+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],it=-1,ot={};ot[P]=ot[B]=ot[M]=ot[z]=ot[U]=ot[D]=ot[F]=ot[q]=ot[Z]=!0,ot[_]=ot[m]=ot[j]=ot[y]=ot[L]=ot[w]=ot[b]=ot[k]=ot[S]=ot[A]=ot[C]=ot[x]=ot[R]=ot[O]=ot[N]=!1;var at={};at[_]=at[m]=at[j]=at[L]=at[y]=at[w]=at[P]=at[B]=at[M]=at[z]=at[U]=at[S]=at[A]=at[C]=at[x]=at[R]=at[O]=at[I]=at[D]=at[F]=at[q]=at[Z]=!0,at[b]=at[k]=at[N]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,ct=parseInt,lt="object"==typeof t&&t&&t.Object===Object&&t,ft="object"==typeof self&&self&&self.Object===Object&&self,ht=lt||ft||Function("return this")(),dt=n&&!n.nodeType&&n,pt=dt&&e&&!e.nodeType&&e,vt=pt&&pt.exports===dt,gt=vt&<.process,_t=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}(),mt=_t&&_t.isArrayBuffer,yt=_t&&_t.isDate,wt=_t&&_t.isMap,bt=_t&&_t.isRegExp,kt=_t&&_t.isSet,Et=_t&&_t.isTypedArray;function St(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function At(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function xt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Ot(e,t){return!!(null==e?0:e.length)&&Dt(e,t,0)>-1}function It(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function jt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Lt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Pt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Mt=Wt("length");function zt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ut(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Dt(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ut(e,qt,n)}function Ft(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function qt(e){return e!=e}function Zt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:p}function Wt(e){return function(t){return null==t?r:t[e]}}function $t(e){return function(t){return null==e?r:e[t]}}function Ht(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Kt(e,t){for(var n,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==r&&(n=n===r?a:n+a)}return n}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,pn(e)+1).replace(oe,""):e}function Jt(e){return function(t){return e(t)}}function Vt(e,t){return Nt(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&Dt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Dt(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var nn=$t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=$t({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(e){return"\\"+st[e]}function an(e){return tt.test(e)}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function cn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function hn(e){return an(e)?function(e){var t=Qe.lastIndex=0;for(;Qe.test(e);)++t;return t}(e):Mt(e)}function dn(e){return an(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var vn=$t({"&":"&","<":"<",">":">",""":'"',"'":"'"});var gn=function e(t){var n,ae=(t=null==t?ht:gn.defaults(ht.Object(),t,gn.pick(ht,rt))).Array,Ee=t.Date,Se=t.Error,Ae=t.Function,Ce=t.Math,Te=t.Object,xe=t.RegExp,Re=t.String,Oe=t.TypeError,Ie=ae.prototype,Ne=Ae.prototype,je=Te.prototype,Le=t["__core-js_shared__"],Pe=Ne.toString,Be=je.hasOwnProperty,Me=0,ze=(n=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ue=je.toString,De=Pe.call(Te),Fe=ht._,qe=xe("^"+Pe.call(Be).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ze=vt?t.Buffer:r,We=t.Symbol,$e=t.Uint8Array,He=Ze?Ze.allocUnsafe:r,Ke=un(Te.getPrototypeOf,Te),Ye=Te.create,Ge=je.propertyIsEnumerable,Je=Ie.splice,Qe=We?We.isConcatSpreadable:r,tt=We?We.iterator:r,st=We?We.toStringTag:r,lt=function(){try{var e=po(Te,"defineProperty");return e({},"",{}),e}catch(e){}}(),ft=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,dt=Ee&&Ee.now!==ht.Date.now&&Ee.now,pt=t.setTimeout!==ht.setTimeout&&t.setTimeout,gt=Ce.ceil,_t=Ce.floor,Mt=Te.getOwnPropertySymbols,$t=Ze?Ze.isBuffer:r,_n=t.isFinite,mn=Ie.join,yn=un(Te.keys,Te),wn=Ce.max,bn=Ce.min,kn=Ee.now,En=t.parseInt,Sn=Ce.random,An=Ie.reverse,Cn=po(t,"DataView"),Tn=po(t,"Map"),xn=po(t,"Promise"),Rn=po(t,"Set"),On=po(t,"WeakMap"),In=po(Te,"create"),Nn=On&&new On,jn={},Ln=Fo(Cn),Pn=Fo(Tn),Bn=Fo(xn),Mn=Fo(Rn),zn=Fo(On),Un=We?We.prototype:r,Dn=Un?Un.valueOf:r,Fn=Un?Un.toString:r;function qn(e){if(is(e)&&!Ka(e)&&!(e instanceof Hn)){if(e instanceof $n)return e;if(Be.call(e,"__wrapped__"))return qo(e)}return new $n(e)}var Zn=function(){function e(){}return function(t){if(!rs(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function Wn(){}function $n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Vn(e){var t=this.__data__=new Yn(e);this.size=t.size}function Xn(e,t){var n=Ka(e),r=!n&&Ha(e),i=!n&&!r&&Va(e),o=!n&&!r&&!i&&hs(e),a=n||r||i||o,s=a?Yt(e.length,Re):[],u=s.length;for(var c in e)!t&&!Be.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Qn(e){var t=e.length;return t?e[Jr(0,t-1)]:r}function er(e,t){return zo(Ii(e),cr(t,0,e.length))}function tr(e){return zo(Ii(e))}function nr(e,t,n){(n!==r&&!Za(e[t],n)||n===r&&!(t in e))&&sr(e,t,n)}function rr(e,t,n){var i=e[t];Be.call(e,t)&&Za(i,n)&&(n!==r||t in e)||sr(e,t,n)}function ir(e,t){for(var n=e.length;n--;)if(Za(e[n][0],t))return n;return-1}function or(e,t,n,r){return pr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ar(e,t){return e&&Ni(t,Ls(t),e)}function sr(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ur(e,t){for(var n=-1,i=t.length,o=ae(i),a=null==e;++n<i;)o[n]=a?r:Rs(e,t[n]);return o}function cr(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function lr(e,t,n,i,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,i,o,a):n(e)),s!==r)return s;if(!rs(e))return e;var f=Ka(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Be.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Ii(e,s)}else{var h=_o(e),d=h==k||h==E;if(Va(e))return Ai(e,u);if(h==C||h==_||d&&!o){if(s=c||d?{}:yo(e),!u)return c?function(e,t){return Ni(e,go(e),t)}(e,function(e,t){return e&&Ni(t,Ps(t),e)}(s,e)):function(e,t){return Ni(e,vo(e),t)}(e,ar(s,e))}else{if(!at[h])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case j:return Ci(e);case y:case w:return new r(+e);case L:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case B:case M:case z:case U:case D:case F:case q:case Z:return Ti(e,n);case S:return new r;case A:case O:return new r(e);case x:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case I:return i=e,Dn?Te(Dn.call(i)):{}}var i}(e,h,u)}}a||(a=new Vn);var p=a.get(e);if(p)return p;a.set(e,s),cs(e)?e.forEach((function(r){s.add(lr(r,t,n,r,e,a))})):os(e)&&e.forEach((function(r,i){s.set(i,lr(r,t,n,i,e,a))}));var v=f?r:(l?c?ao:oo:c?Ps:Ls)(e);return Ct(v||e,(function(r,i){v&&(r=e[i=r]),rr(s,i,lr(r,t,n,i,e,a))})),s}function fr(e,t,n){var i=n.length;if(null==e)return!i;for(e=Te(e);i--;){var o=n[i],a=t[o],s=e[o];if(s===r&&!(o in e)||!a(s))return!1}return!0}function hr(e,t,n){if("function"!=typeof e)throw new Oe(i);return Lo((function(){e.apply(r,n)}),t)}function dr(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Nt(t,Jt(n))),r?(o=It,a=!1):t.length>=200&&(o=Xt,a=!1,t=new Jn(t));e:for(;++i<s;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var h=c;h--;)if(t[h]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}qn.templateSettings={escape:V,evaluate:X,interpolate:Q,variable:"",imports:{_:qn}},qn.prototype=Wn.prototype,qn.prototype.constructor=qn,$n.prototype=Zn(Wn.prototype),$n.prototype.constructor=$n,Hn.prototype=Zn(Wn.prototype),Hn.prototype.constructor=Hn,Kn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Kn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Kn.prototype.get=function(e){var t=this.__data__;if(In){var n=t[e];return n===o?r:n}return Be.call(t,e)?t[e]:r},Kn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==r:Be.call(t,e)},Kn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===r?o:t,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0)&&(n==t.length-1?t.pop():Je.call(t,n,1),--this.size,!0)},Yn.prototype.get=function(e){var t=this.__data__,n=ir(t,e);return n<0?r:t[n][1]},Yn.prototype.has=function(e){return ir(this.__data__,e)>-1},Yn.prototype.set=function(e,t){var n=this.__data__,r=ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(Tn||Yn),string:new Kn}},Gn.prototype.delete=function(e){var t=fo(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return fo(this,e).get(e)},Gn.prototype.has=function(e){return fo(this,e).has(e)},Gn.prototype.set=function(e,t){var n=fo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(e){return this.__data__.set(e,o),this},Jn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Vn.prototype.get=function(e){return this.__data__.get(e)},Vn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!Tn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var pr=Pi(kr),vr=Pi(Er,!0);function gr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function _r(e,t,n){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(u===r?s==s&&!fs(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return pr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=wo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?yr(s,t-1,n,r,i):jt(i,s):r||(i[i.length]=s)}return i}var wr=Bi(),br=Bi(!0);function kr(e,t){return e&&wr(e,t,Ls)}function Er(e,t){return e&&br(e,t,Ls)}function Sr(e,t){return Rt(t,(function(t){return es(e[t])}))}function Ar(e,t){for(var n=0,i=(t=bi(t,e)).length;null!=e&&n<i;)e=e[Do(t[n++])];return n&&n==i?e:r}function Cr(e,t,n){var r=t(e);return Ka(e)?r:jt(r,n(e))}function Tr(e){return null==e?e===r?"[object Undefined]":"[object Null]":st&&st in Te(e)?function(e){var t=Be.call(e,st),n=e[st];try{e[st]=r;var i=!0}catch(e){}var o=Ue.call(e);i&&(t?e[st]=n:delete e[st]);return o}(e):function(e){return Ue.call(e)}(e)}function xr(e,t){return e>t}function Rr(e,t){return null!=e&&Be.call(e,t)}function Or(e,t){return null!=e&&t in Te(e)}function Ir(e,t,n){for(var i=n?It:Ot,o=e[0].length,a=e.length,s=a,u=ae(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=Nt(f,Jt(t))),c=bn(f.length,c),u[s]=!n&&(t||o>=120&&f.length>=120)?new Jn(s&&f):r}f=e[0];var h=-1,d=u[0];e:for(;++h<o&&l.length<c;){var p=f[h],v=t?t(p):p;if(p=n||0!==p?p:0,!(d?Xt(d,v):i(l,v,n))){for(s=a;--s;){var g=u[s];if(!(g?Xt(g,v):i(e[s],v,n)))continue e}d&&d.push(v),l.push(p)}}return l}function Nr(e,t,n){var i=null==(e=Oo(e,t=bi(t,e)))?e:e[Do(Qo(t))];return null==i?r:St(i,e,n)}function jr(e){return is(e)&&Tr(e)==_}function Lr(e,t,n,i,o){return e===t||(null==e||null==t||!is(e)&&!is(t)?e!=e&&t!=t:function(e,t,n,i,o,a){var s=Ka(e),u=Ka(t),c=s?m:_o(e),l=u?m:_o(t),f=(c=c==_?C:c)==C,h=(l=l==_?C:l)==C,d=c==l;if(d&&Va(e)){if(!Va(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Vn),s||hs(e)?ro(e,t,n,i,o,a):function(e,t,n,r,i,o,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case y:case w:case A:return Za(+e,+t);case b:return e.name==t.name&&e.message==t.message;case x:case O:return e==t+"";case S:var s=sn;case R:var u=1&r;if(s||(s=ln),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ro(s(e),s(t),r,i,o,a);return a.delete(e),l;case I:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,c,n,i,o,a);if(!(1&n)){var p=f&&Be.call(e,"__wrapped__"),v=h&&Be.call(t,"__wrapped__");if(p||v){var g=p?e.value():e,k=v?t.value():t;return a||(a=new Vn),o(g,k,n,i,a)}}if(!d)return!1;return a||(a=new Vn),function(e,t,n,i,o,a){var s=1&n,u=oo(e),c=u.length,l=oo(t).length;if(c!=l&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:Be.call(t,h)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var v=!0;a.set(e,t),a.set(t,e);var g=s;for(;++f<c;){var _=e[h=u[f]],m=t[h];if(i)var y=s?i(m,_,h,t,e,a):i(_,m,h,e,t,a);if(!(y===r?_===m||o(_,m,n,i,a):y)){v=!1;break}g||(g="constructor"==h)}if(v&&!g){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,n,i,o,a)}(e,t,n,i,Lr,o))}function Pr(e,t,n,i){var o=n.length,a=o,s=!i;if(null==e)return!a;for(e=Te(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===r&&!(c in e))return!1}else{var h=new Vn;if(i)var d=i(l,f,c,e,t,h);if(!(d===r?Lr(f,l,3,i,h):d))return!1}}return!0}function Br(e){return!(!rs(e)||(t=e,ze&&ze in t))&&(es(e)?qe:_e).test(Fo(e));var t}function Mr(e){return"function"==typeof e?e:null==e?au:"object"==typeof e?Ka(e)?Zr(e[0],e[1]):qr(e):vu(e)}function zr(e){if(!Co(e))return yn(e);var t=[];for(var n in Te(e))Be.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ur(e){if(!rs(e))return function(e){var t=[];if(null!=e)for(var n in Te(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var r in e)("constructor"!=r||!t&&Be.call(e,r))&&n.push(r);return n}function Dr(e,t){return e<t}function Fr(e,t){var n=-1,r=Ga(e)?ae(e.length):[];return pr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function qr(e){var t=ho(e);return 1==t.length&&t[0][2]?xo(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Zr(e,t){return Eo(e)&&To(t)?xo(Do(e),t):function(n){var i=Rs(n,e);return i===r&&i===t?Os(n,e):Lr(t,i,3)}}function Wr(e,t,n,i,o){e!==t&&wr(t,(function(a,s){if(o||(o=new Vn),rs(a))!function(e,t,n,i,o,a,s){var u=No(e,n),c=No(t,n),l=s.get(c);if(l)return void nr(e,n,l);var f=a?a(u,c,n+"",e,t,s):r,h=f===r;if(h){var d=Ka(c),p=!d&&Va(c),v=!d&&!p&&hs(c);f=c,d||p||v?Ka(u)?f=u:Ja(u)?f=Ii(u):p?(h=!1,f=Ai(c,!0)):v?(h=!1,f=Ti(c,!0)):f=[]:ss(c)||Ha(c)?(f=u,Ha(u)?f=ws(u):rs(u)&&!es(u)||(f=yo(c))):h=!1}h&&(s.set(c,f),o(f,c,i,a,s),s.delete(c));nr(e,n,f)}(e,t,s,n,Wr,i,o);else{var u=i?i(No(e,s),a,s+"",e,t,o):r;u===r&&(u=a),nr(e,s,u)}}),Ps)}function $r(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:r}function Hr(e,t,n){t=t.length?Nt(t,(function(e){return Ka(e)?function(t){return Ar(t,1===e.length?e[0]:e)}:e})):[au];var r=-1;return t=Nt(t,Jt(lo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Fr(e,(function(e,n,i){return{criteria:Nt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=xi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Kr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Ar(e,a);n(s,a)&&ti(o,bi(a,e),s)}return o}function Yr(e,t,n,r){var i=r?Ft:Dt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Nt(e,Jt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Je.call(s,u,1),Je.call(e,u,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Je.call(e,i,1):di(e,i)}}return e}function Jr(e,t){return e+_t(Sn()*(t-e+1))}function Vr(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=_t(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Po(Ro(e,t,au),e+"")}function Qr(e){return Qn(Zs(e))}function ei(e,t){var n=Zs(e);return zo(n,cr(t,0,n.length))}function ti(e,t,n,i){if(!rs(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Do(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=i?i(f,c,u):r)===r&&(l=rs(f)?f:bo(t[o+1])?[]:{})}rr(u,c,l),u=u[c]}return e}var ni=Nn?function(e,t){return Nn.set(e,t),e}:au,ri=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:ru(t),writable:!0})}:au;function ii(e){return zo(Zs(e))}function oi(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=ae(i);++r<i;)o[r]=e[r+t];return o}function ai(e,t){var n;return pr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function si(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!fs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ui(e,t,au,n)}function ui(e,t,n,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=fs(t),l=t===r;o<a;){var f=_t((o+a)/2),h=n(e[f]),d=h!==r,p=null===h,v=h==h,g=fs(h);if(s)var _=i||v;else _=l?v&&(i||d):u?v&&d&&(i||!p):c?v&&d&&!p&&(i||!g):!p&&!g&&(i?h<=t:h<t);_?o=f+1:a=f}return bn(a,4294967294)}function ci(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Za(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function li(e){return"number"==typeof e?e:fs(e)?p:+e}function fi(e){if("string"==typeof e)return e;if(Ka(e))return Nt(e,fi)+"";if(fs(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function hi(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=It;else if(o>=200){var c=t?null:Vi(e);if(c)return ln(c);a=!1,i=Xt,u=new Jn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function di(e,t){return null==(e=Oo(e,t=bi(t,e)))||delete e[Do(Qo(t))]}function pi(e,t,n,r){return ti(e,t,n(Ar(e,t)),r)}function vi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?oi(e,r?0:o,r?o+1:i):oi(e,r?o+1:0,r?i:o)}function gi(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Lt(t,(function(e,t){return t.func.apply(t.thisArg,jt([e],t.args))}),n)}function _i(e,t,n){var r=e.length;if(r<2)return r?hi(e[0]):[];for(var i=-1,o=ae(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=dr(o[i]||a,e[s],t,n));return hi(yr(o,1),t,n)}function mi(e,t,n){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var u=i<a?t[i]:r;n(s,e[i],u)}return s}function yi(e){return Ja(e)?e:[]}function wi(e){return"function"==typeof e?e:au}function bi(e,t){return Ka(e)?e:Eo(e,t)?[e]:Uo(bs(e))}var ki=Xr;function Ei(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:oi(e,t,n)}var Si=ft||function(e){return ht.clearTimeout(e)};function Ai(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ti(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,a=fs(e),s=t!==r,u=null===t,c=t==t,l=fs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&e<t||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ri(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,u=t.length,c=wn(o-a,0),l=ae(u+c),f=!r;++s<u;)l[s]=t[s];for(;++i<a;)(f||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[s++]=e[i++];return l}function Oi(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,u=-1,c=t.length,l=wn(o-s,0),f=ae(l+c),h=!r;++i<l;)f[i]=e[i];for(var d=i;++u<c;)f[d+u]=t[u];for(;++a<s;)(h||i<o)&&(f[d+n[a]]=e[i++]);return f}function Ii(e,t){var n=-1,r=e.length;for(t||(t=ae(r));++n<r;)t[n]=e[n];return t}function Ni(e,t,n,i){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=i?i(n[u],e[u],u,n,e):r;c===r&&(c=e[u]),o?sr(n,u,c):rr(n,u,c)}return n}function ji(e,t){return function(n,r){var i=Ka(n)?At:or,o=t?t():{};return i(n,e,lo(r,2),o)}}function Li(e){return Xr((function(t,n){var i=-1,o=n.length,a=o>1?n[o-1]:r,s=o>2?n[2]:r;for(a=e.length>3&&"function"==typeof a?(o--,a):r,s&&ko(n[0],n[1],s)&&(a=o<3?r:a,o=1),t=Te(t);++i<o;){var u=n[i];u&&e(t,u,i,a)}return t}))}function Pi(e,t){return function(n,r){if(null==n)return n;if(!Ga(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Te(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Bi(e){return function(t,n,r){for(var i=-1,o=Te(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Mi(e){return function(t){var n=an(t=bs(t))?dn(t):r,i=n?n[0]:t.charAt(0),o=n?Ei(n,1).join(""):t.slice(1);return i[e]()+o}}function zi(e){return function(t){return Lt(eu(Hs(t).replace(Ve,"")),e,"")}}function Ui(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Zn(e.prototype),r=e.apply(n,t);return rs(r)?r:n}}function Di(e){return function(t,n,i){var o=Te(t);if(!Ga(t)){var a=lo(n,3);t=Ls(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,i);return s>-1?o[a?t[s]:s]:r}}function Fi(e){return io((function(t){var n=t.length,o=n,a=$n.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Oe(i);if(a&&!u&&"wrapper"==uo(s))var u=new $n([],!0)}for(o=u?o:n;++o<n;){var c=uo(s=t[o]),l="wrapper"==c?so(s):r;u=l&&So(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[uo(l[0])].apply(u,l[3]):1==s.length&&So(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ka(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function qi(e,t,n,i,o,a,s,u,c,f){var h=t&l,d=1&t,p=2&t,v=24&t,g=512&t,_=p?r:Ui(e);return function r(){for(var l=arguments.length,m=ae(l),y=l;y--;)m[y]=arguments[y];if(v)var w=co(r),b=tn(m,w);if(i&&(m=Ri(m,i,o,v)),a&&(m=Oi(m,a,s,v)),l-=b,v&&l<f){var k=cn(m,w);return Gi(e,t,qi,r.placeholder,n,m,k,u,c,f-l)}var E=d?n:this,S=p?E[e]:e;return l=m.length,u?m=Io(m,u):g&&l>1&&m.reverse(),h&&c<l&&(m.length=c),this&&this!==ht&&this instanceof r&&(S=_||Ui(S)),S.apply(E,m)}}function Zi(e,t){return function(n,r){return function(e,t,n,r){return kr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Wi(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=fi(n),i=fi(i)):(n=li(n),i=li(i)),o=e(n,i)}return o}}function $i(e){return io((function(t){return t=Nt(t,Jt(lo())),Xr((function(n){var r=this;return e(t,(function(e){return St(e,r,n)}))}))}))}function Hi(e,t){var n=(t=t===r?" ":fi(t)).length;if(n<2)return n?Vr(t,e):t;var i=Vr(t,gt(e/hn(t)));return an(t)?Ei(dn(i),0,e).join(""):i.slice(0,e)}function Ki(e){return function(t,n,i){return i&&"number"!=typeof i&&ko(t,n,i)&&(n=i=r),t=gs(t),n===r?(n=t,t=0):n=gs(n),function(e,t,n,r){for(var i=-1,o=wn(gt((t-e)/(n||1)),0),a=ae(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,i=i===r?t<n?1:-1:gs(i),e)}}function Yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Gi(e,t,n,i,o,a,s,l,f,h){var d=8&t;t|=d?u:c,4&(t&=~(d?c:u))||(t&=-4);var p=[e,t,o,d?a:r,d?s:r,d?r:a,d?r:s,l,f,h],v=n.apply(r,p);return So(e)&&jo(v,p),v.placeholder=i,Bo(v,e,t)}function Ji(e){var t=Ce[e];return function(e,n){if(e=ys(e),(n=null==n?0:bn(_s(n),292))&&_n(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vi=Rn&&1/ln(new Rn([,-0]))[1]==h?function(e){return new Rn(e)}:fu;function Xi(e){return function(t){var n=_o(t);return n==S?sn(t):n==R?fn(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qi(e,t,n,o,h,d,p,v){var g=2&t;if(!g&&"function"!=typeof e)throw new Oe(i);var _=o?o.length:0;if(_||(t&=-97,o=h=r),p=p===r?p:wn(_s(p),0),v=v===r?v:_s(v),_-=h?h.length:0,t&c){var m=o,y=h;o=h=r}var w=g?r:so(e),b=[e,t,n,o,h,m,y,d,p,v];if(w&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ri(c,u,t[4]):u,e[4]=c?cn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Oi(c,u,t[6]):u,e[6]=c?cn(e[5],a):t[6]);(u=t[7])&&(e[7]=u);r&l&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(b,w),e=b[0],t=b[1],n=b[2],o=b[3],h=b[4],!(v=b[9]=b[9]===r?g?0:e.length:wn(b[9]-_,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||t==s?function(e,t,n){var i=Ui(e);return function o(){for(var a=arguments.length,s=ae(a),u=a,c=co(o);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:cn(s,c);return(a-=l.length)<n?Gi(e,t,qi,o.placeholder,r,s,l,r,r,n-a):St(this&&this!==ht&&this instanceof o?i:e,this,s)}}(e,t,v):t!=u&&33!=t||h.length?qi.apply(r,b):function(e,t,n,r){var i=1&t,o=Ui(e);return function t(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=ae(c+s),f=this&&this!==ht&&this instanceof t?o:e;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return St(f,i?n:this,l)}}(e,t,n,o);else var k=function(e,t,n){var r=1&t,i=Ui(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Bo((w?ni:jo)(k,b),e,t)}function eo(e,t,n,i){return e===r||Za(e,je[n])&&!Be.call(i,n)?t:e}function to(e,t,n,i,o,a){return rs(e)&&rs(t)&&(a.set(t,e),Wr(e,t,r,to,a),a.delete(t)),e}function no(e){return ss(e)?r:e}function ro(e,t,n,i,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var h=-1,d=!0,p=2&n?new Jn:r;for(a.set(e,t),a.set(t,e);++h<u;){var v=e[h],g=t[h];if(i)var _=s?i(g,v,h,t,e,a):i(v,g,h,e,t,a);if(_!==r){if(_)continue;d=!1;break}if(p){if(!Bt(t,(function(e,t){if(!Xt(p,t)&&(v===e||o(v,e,n,i,a)))return p.push(t)}))){d=!1;break}}else if(v!==g&&!o(v,g,n,i,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function io(e){return Po(Ro(e,r,Yo),e+"")}function oo(e){return Cr(e,Ls,vo)}function ao(e){return Cr(e,Ps,go)}var so=Nn?function(e){return Nn.get(e)}:fu;function uo(e){for(var t=e.name+"",n=jn[t],r=Be.call(jn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function co(e){return(Be.call(qn,"placeholder")?qn:e).placeholder}function lo(){var e=qn.iteratee||su;return e=e===su?Mr:e,arguments.length?e(arguments[0],arguments[1]):e}function fo(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ho(e){for(var t=Ls(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,To(i)]}return t}function po(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Br(n)?n:r}var vo=Mt?function(e){return null==e?[]:(e=Te(e),Rt(Mt(e),(function(t){return Ge.call(e,t)})))}:mu,go=Mt?function(e){for(var t=[];e;)jt(t,vo(e)),e=Ke(e);return t}:mu,_o=Tr;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Do(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ns(i)&&bo(a,i)&&(Ka(e)||Ha(e))}function yo(e){return"function"!=typeof e.constructor||Co(e)?{}:Zn(Ke(e))}function wo(e){return Ka(e)||Ha(e)||!!(Qe&&e&&e[Qe])}function bo(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function ko(e,t,n){if(!rs(n))return!1;var r=typeof t;return!!("number"==r?Ga(n)&&bo(t,n.length):"string"==r&&t in n)&&Za(n[t],e)}function Eo(e,t){if(Ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!fs(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Te(t))}function So(e){var t=uo(e),n=qn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=so(n);return!!r&&e===r[0]}(Cn&&_o(new Cn(new ArrayBuffer(1)))!=L||Tn&&_o(new Tn)!=S||xn&&_o(xn.resolve())!=T||Rn&&_o(new Rn)!=R||On&&_o(new On)!=N)&&(_o=function(e){var t=Tr(e),n=t==C?e.constructor:r,i=n?Fo(n):"";if(i)switch(i){case Ln:return L;case Pn:return S;case Bn:return T;case Mn:return R;case zn:return N}return t});var Ao=Le?es:yu;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||je)}function To(e){return e==e&&!rs(e)}function xo(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==r||e in Te(n)))}}function Ro(e,t,n){return t=wn(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=wn(r.length-t,0),a=ae(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=ae(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),St(e,this,s)}}function Oo(e,t){return t.length<2?e:Ar(e,oi(t,0,-1))}function Io(e,t){for(var n=e.length,i=bn(t.length,n),o=Ii(e);i--;){var a=t[i];e[i]=bo(a,n)?o[a]:r}return e}function No(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var jo=Mo(ni),Lo=pt||function(e,t){return ht.setTimeout(e,t)},Po=Mo(ri);function Bo(e,t,n){var r=t+"";return Po(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ct(g,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(ce):[]}(r),n)))}function Mo(e){var t=0,n=0;return function(){var i=kn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function zo(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var a=Jr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Uo=function(e){var t=Ma(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function Do(e){if("string"==typeof e||fs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Pe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qo(e){if(e instanceof Hn)return e.clone();var t=new $n(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Zo=Xr((function(e,t){return Ja(e)?dr(e,yr(t,1,Ja,!0)):[]})),Wo=Xr((function(e,t){var n=Qo(t);return Ja(n)&&(n=r),Ja(e)?dr(e,yr(t,1,Ja,!0),lo(n,2)):[]})),$o=Xr((function(e,t){var n=Qo(t);return Ja(n)&&(n=r),Ja(e)?dr(e,yr(t,1,Ja,!0),r,n):[]}));function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:_s(n);return i<0&&(i=wn(r+i,0)),Ut(e,lo(t,3),i)}function Ko(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=_s(n),o=n<0?wn(i+o,0):bn(o,i-1)),Ut(e,lo(t,3),o,!0)}function Yo(e){return(null==e?0:e.length)?yr(e,1):[]}function Go(e){return e&&e.length?e[0]:r}var Jo=Xr((function(e){var t=Nt(e,yi);return t.length&&t[0]===e[0]?Ir(t):[]})),Vo=Xr((function(e){var t=Qo(e),n=Nt(e,yi);return t===Qo(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Ir(n,lo(t,2)):[]})),Xo=Xr((function(e){var t=Qo(e),n=Nt(e,yi);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Ir(n,r,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:r}var ea=Xr(ta);function ta(e,t){return e&&e.length&&t&&t.length?Yr(e,t):e}var na=io((function(e,t){var n=null==e?0:e.length,r=ur(e,t);return Gr(e,Nt(t,(function(e){return bo(e,n)?+e:e})).sort(xi)),r}));function ra(e){return null==e?e:An.call(e)}var ia=Xr((function(e){return hi(yr(e,1,Ja,!0))})),oa=Xr((function(e){var t=Qo(e);return Ja(t)&&(t=r),hi(yr(e,1,Ja,!0),lo(t,2))})),aa=Xr((function(e){var t=Qo(e);return t="function"==typeof t?t:r,hi(yr(e,1,Ja,!0),r,t)}));function sa(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ja(e))return t=wn(e.length,t),!0})),Yt(t,(function(t){return Nt(e,Wt(t))}))}function ua(e,t){if(!e||!e.length)return[];var n=sa(e);return null==t?n:Nt(n,(function(e){return St(t,r,e)}))}var ca=Xr((function(e,t){return Ja(e)?dr(e,t):[]})),la=Xr((function(e){return _i(Rt(e,Ja))})),fa=Xr((function(e){var t=Qo(e);return Ja(t)&&(t=r),_i(Rt(e,Ja),lo(t,2))})),ha=Xr((function(e){var t=Qo(e);return t="function"==typeof t?t:r,_i(Rt(e,Ja),r,t)})),da=Xr(sa);var pa=Xr((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ua(e,n)}));function va(e){var t=qn(e);return t.__chain__=!0,t}function ga(e,t){return t(e)}var _a=io((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return ur(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Hn&&bo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:ga,args:[o],thisArg:r}),new $n(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)}));var ma=ji((function(e,t,n){Be.call(e,n)?++e[n]:sr(e,n,1)}));var ya=Di(Ho),wa=Di(Ko);function ba(e,t){return(Ka(e)?Ct:pr)(e,lo(t,3))}function ka(e,t){return(Ka(e)?Tt:vr)(e,lo(t,3))}var Ea=ji((function(e,t,n){Be.call(e,n)?e[n].push(t):sr(e,n,[t])}));var Sa=Xr((function(e,t,n){var r=-1,i="function"==typeof t,o=Ga(e)?ae(e.length):[];return pr(e,(function(e){o[++r]=i?St(t,e,n):Nr(e,t,n)})),o})),Aa=ji((function(e,t,n){sr(e,n,t)}));function Ca(e,t){return(Ka(e)?Nt:Fr)(e,lo(t,3))}var Ta=ji((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var xa=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ko(e,t[0],t[1])?t=[]:n>2&&ko(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,yr(t,1),[])})),Ra=dt||function(){return ht.Date.now()};function Oa(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Qi(e,l,r,r,r,r,t)}function Ia(e,t){var n;if("function"!=typeof t)throw new Oe(i);return e=_s(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Na=Xr((function(e,t,n){var r=1;if(n.length){var i=cn(n,co(Na));r|=u}return Qi(e,r,t,n,i)})),ja=Xr((function(e,t,n){var r=3;if(n.length){var i=cn(n,co(ja));r|=u}return Qi(t,r,e,n,i)}));function La(e,t,n){var o,a,s,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Oe(i);function v(t){var n=o,i=a;return o=a=r,f=t,u=e.apply(i,n)}function g(e){return f=e,c=Lo(m,t),h?v(e):u}function _(e){var n=e-l;return l===r||n>=t||n<0||d&&e-f>=s}function m(){var e=Ra();if(_(e))return y(e);c=Lo(m,function(e){var n=t-(e-l);return d?bn(n,s-(e-f)):n}(e))}function y(e){return c=r,p&&o?v(e):(o=a=r,u)}function w(){var e=Ra(),n=_(e);if(o=arguments,a=this,l=e,n){if(c===r)return g(l);if(d)return Si(c),c=Lo(m,t),v(l)}return c===r&&(c=Lo(m,t)),u}return t=ys(t)||0,rs(n)&&(h=!!n.leading,s=(d="maxWait"in n)?wn(ys(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),w.cancel=function(){c!==r&&Si(c),f=0,o=l=a=c=r},w.flush=function(){return c===r?u:y(Ra())},w}var Pa=Xr((function(e,t){return hr(e,1,t)})),Ba=Xr((function(e,t,n){return hr(e,ys(t)||0,n)}));function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ma.Cache||Gn),n}function za(e){if("function"!=typeof e)throw new Oe(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=Gn;var Ua=ki((function(e,t){var n=(t=1==t.length&&Ka(t[0])?Nt(t[0],Jt(lo())):Nt(yr(t,1),Jt(lo()))).length;return Xr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return St(e,this,r)}))})),Da=Xr((function(e,t){var n=cn(t,co(Da));return Qi(e,u,r,t,n)})),Fa=Xr((function(e,t){var n=cn(t,co(Fa));return Qi(e,c,r,t,n)})),qa=io((function(e,t){return Qi(e,f,r,r,r,t)}));function Za(e,t){return e===t||e!=e&&t!=t}var Wa=Yi(xr),$a=Yi((function(e,t){return e>=t})),Ha=jr(function(){return arguments}())?jr:function(e){return is(e)&&Be.call(e,"callee")&&!Ge.call(e,"callee")},Ka=ae.isArray,Ya=mt?Jt(mt):function(e){return is(e)&&Tr(e)==j};function Ga(e){return null!=e&&ns(e.length)&&!es(e)}function Ja(e){return is(e)&&Ga(e)}var Va=$t||yu,Xa=yt?Jt(yt):function(e){return is(e)&&Tr(e)==w};function Qa(e){if(!is(e))return!1;var t=Tr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ss(e)}function es(e){if(!rs(e))return!1;var t=Tr(e);return t==k||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ts(e){return"number"==typeof e&&e==_s(e)}function ns(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function rs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function is(e){return null!=e&&"object"==typeof e}var os=wt?Jt(wt):function(e){return is(e)&&_o(e)==S};function as(e){return"number"==typeof e||is(e)&&Tr(e)==A}function ss(e){if(!is(e)||Tr(e)!=C)return!1;var t=Ke(e);if(null===t)return!0;var n=Be.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==De}var us=bt?Jt(bt):function(e){return is(e)&&Tr(e)==x};var cs=kt?Jt(kt):function(e){return is(e)&&_o(e)==R};function ls(e){return"string"==typeof e||!Ka(e)&&is(e)&&Tr(e)==O}function fs(e){return"symbol"==typeof e||is(e)&&Tr(e)==I}var hs=Et?Jt(Et):function(e){return is(e)&&ns(e.length)&&!!ot[Tr(e)]};var ds=Yi(Dr),ps=Yi((function(e,t){return e<=t}));function vs(e){if(!e)return[];if(Ga(e))return ls(e)?dn(e):Ii(e);if(tt&&e[tt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[tt]());var t=_o(e);return(t==S?sn:t==R?ln:Zs)(e)}function gs(e){return e?(e=ys(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function _s(e){var t=gs(e),n=t%1;return t==t?n?t-n:t:0}function ms(e){return e?cr(_s(e),0,v):0}function ys(e){if("number"==typeof e)return e;if(fs(e))return p;if(rs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=ge.test(e);return n||me.test(e)?ct(e.slice(2),n?2:8):ve.test(e)?p:+e}function ws(e){return Ni(e,Ps(e))}function bs(e){return null==e?"":fi(e)}var ks=Li((function(e,t){if(Co(t)||Ga(t))Ni(t,Ls(t),e);else for(var n in t)Be.call(t,n)&&rr(e,n,t[n])})),Es=Li((function(e,t){Ni(t,Ps(t),e)})),Ss=Li((function(e,t,n,r){Ni(t,Ps(t),e,r)})),As=Li((function(e,t,n,r){Ni(t,Ls(t),e,r)})),Cs=io(ur);var Ts=Xr((function(e,t){e=Te(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&ko(t[0],t[1],o)&&(i=1);++n<i;)for(var a=t[n],s=Ps(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===r||Za(f,je[l])&&!Be.call(e,l))&&(e[l]=a[l])}return e})),xs=Xr((function(e){return e.push(r,to),St(Ms,r,e)}));function Rs(e,t,n){var i=null==e?r:Ar(e,t);return i===r?n:i}function Os(e,t){return null!=e&&mo(e,t,Or)}var Is=Zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),e[t]=n}),ru(au)),Ns=Zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),Be.call(e,t)?e[t].push(n):e[t]=[n]}),lo),js=Xr(Nr);function Ls(e){return Ga(e)?Xn(e):zr(e)}function Ps(e){return Ga(e)?Xn(e,!0):Ur(e)}var Bs=Li((function(e,t,n){Wr(e,t,n)})),Ms=Li((function(e,t,n,r){Wr(e,t,n,r)})),zs=io((function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ni(e,ao(e),n),r&&(n=lr(n,7,no));for(var i=t.length;i--;)di(n,t[i]);return n}));var Us=io((function(e,t){return null==e?{}:function(e,t){return Kr(e,t,(function(t,n){return Os(e,n)}))}(e,t)}));function Ds(e,t){if(null==e)return{};var n=Nt(ao(e),(function(e){return[e]}));return t=lo(t),Kr(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Xi(Ls),qs=Xi(Ps);function Zs(e){return null==e?[]:Vt(e,Ls(e))}var Ws=zi((function(e,t,n){return t=t.toLowerCase(),e+(n?$s(t):t)}));function $s(e){return Qs(bs(e).toLowerCase())}function Hs(e){return(e=bs(e))&&e.replace(we,nn).replace(Xe,"")}var Ks=zi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ys=zi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Gs=Mi("toLowerCase");var Js=zi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Vs=zi((function(e,t,n){return e+(n?" ":"")+Qs(t)}));var Xs=zi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Mi("toUpperCase");function eu(e,t,n){return e=bs(e),(t=n?r:t)===r?function(e){return nt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var tu=Xr((function(e,t){try{return St(e,r,t)}catch(e){return Qa(e)?e:new Se(e)}})),nu=io((function(e,t){return Ct(t,(function(t){t=Do(t),sr(e,t,Na(e[t],e))})),e}));function ru(e){return function(){return e}}var iu=Fi(),ou=Fi(!0);function au(e){return e}function su(e){return Mr("function"==typeof e?e:lr(e,1))}var uu=Xr((function(e,t){return function(n){return Nr(n,e,t)}})),cu=Xr((function(e,t){return function(n){return Nr(e,n,t)}}));function lu(e,t,n){var r=Ls(t),i=Sr(t,r);null!=n||rs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Sr(t,Ls(t)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=es(e);return Ct(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Ii(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,jt([this.value()],arguments))})})),e}function fu(){}var hu=$i(Nt),du=$i(xt),pu=$i(Bt);function vu(e){return Eo(e)?Wt(Do(e)):function(e){return function(t){return Ar(t,e)}}(e)}var gu=Ki(),_u=Ki(!0);function mu(){return[]}function yu(){return!1}var wu=Wi((function(e,t){return e+t}),0),bu=Ji("ceil"),ku=Wi((function(e,t){return e/t}),1),Eu=Ji("floor");var Su,Au=Wi((function(e,t){return e*t}),1),Cu=Ji("round"),Tu=Wi((function(e,t){return e-t}),0);return qn.after=function(e,t){if("function"!=typeof t)throw new Oe(i);return e=_s(e),function(){if(--e<1)return t.apply(this,arguments)}},qn.ary=Oa,qn.assign=ks,qn.assignIn=Es,qn.assignInWith=Ss,qn.assignWith=As,qn.at=Cs,qn.before=Ia,qn.bind=Na,qn.bindAll=nu,qn.bindKey=ja,qn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},qn.chain=va,qn.chunk=function(e,t,n){t=(n?ko(e,t,n):t===r)?1:wn(_s(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=ae(gt(i/t));o<i;)s[a++]=oi(e,o,o+=t);return s},qn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},qn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ae(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return jt(Ka(n)?Ii(n):[n],yr(t,1))},qn.cond=function(e){var t=null==e?0:e.length,n=lo();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Oe(i);return[n(e[0]),e[1]]})):[],Xr((function(n){for(var r=-1;++r<t;){var i=e[r];if(St(i[0],this,n))return St(i[1],this,n)}}))},qn.conforms=function(e){return function(e){var t=Ls(e);return function(n){return fr(n,e,t)}}(lr(e,1))},qn.constant=ru,qn.countBy=ma,qn.create=function(e,t){var n=Zn(e);return null==t?n:ar(n,t)},qn.curry=function e(t,n,i){var o=Qi(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},qn.curryRight=function e(t,n,i){var o=Qi(t,s,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},qn.debounce=La,qn.defaults=Ts,qn.defaultsDeep=xs,qn.defer=Pa,qn.delay=Ba,qn.difference=Zo,qn.differenceBy=Wo,qn.differenceWith=$o,qn.drop=function(e,t,n){var i=null==e?0:e.length;return i?oi(e,(t=n||t===r?1:_s(t))<0?0:t,i):[]},qn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?oi(e,0,(t=i-(t=n||t===r?1:_s(t)))<0?0:t):[]},qn.dropRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0,!0):[]},qn.dropWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0):[]},qn.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&ko(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=_s(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:_s(i))<0&&(i+=o),i=n>i?0:ms(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},qn.filter=function(e,t){return(Ka(e)?Rt:mr)(e,lo(t,3))},qn.flatMap=function(e,t){return yr(Ca(e,t),1)},qn.flatMapDeep=function(e,t){return yr(Ca(e,t),h)},qn.flatMapDepth=function(e,t,n){return n=n===r?1:_s(n),yr(Ca(e,t),n)},qn.flatten=Yo,qn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,h):[]},qn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===r?1:_s(t)):[]},qn.flip=function(e){return Qi(e,512)},qn.flow=iu,qn.flowRight=ou,qn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},qn.functions=function(e){return null==e?[]:Sr(e,Ls(e))},qn.functionsIn=function(e){return null==e?[]:Sr(e,Ps(e))},qn.groupBy=Ea,qn.initial=function(e){return(null==e?0:e.length)?oi(e,0,-1):[]},qn.intersection=Jo,qn.intersectionBy=Vo,qn.intersectionWith=Xo,qn.invert=Is,qn.invertBy=Ns,qn.invokeMap=Sa,qn.iteratee=su,qn.keyBy=Aa,qn.keys=Ls,qn.keysIn=Ps,qn.map=Ca,qn.mapKeys=function(e,t){var n={};return t=lo(t,3),kr(e,(function(e,r,i){sr(n,t(e,r,i),e)})),n},qn.mapValues=function(e,t){var n={};return t=lo(t,3),kr(e,(function(e,r,i){sr(n,r,t(e,r,i))})),n},qn.matches=function(e){return qr(lr(e,1))},qn.matchesProperty=function(e,t){return Zr(e,lr(t,1))},qn.memoize=Ma,qn.merge=Bs,qn.mergeWith=Ms,qn.method=uu,qn.methodOf=cu,qn.mixin=lu,qn.negate=za,qn.nthArg=function(e){return e=_s(e),Xr((function(t){return $r(t,e)}))},qn.omit=zs,qn.omitBy=function(e,t){return Ds(e,za(lo(t)))},qn.once=function(e){return Ia(2,e)},qn.orderBy=function(e,t,n,i){return null==e?[]:(Ka(t)||(t=null==t?[]:[t]),Ka(n=i?r:n)||(n=null==n?[]:[n]),Hr(e,t,n))},qn.over=hu,qn.overArgs=Ua,qn.overEvery=du,qn.overSome=pu,qn.partial=Da,qn.partialRight=Fa,qn.partition=Ta,qn.pick=Us,qn.pickBy=Ds,qn.property=vu,qn.propertyOf=function(e){return function(t){return null==e?r:Ar(e,t)}},qn.pull=ea,qn.pullAll=ta,qn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,lo(n,2)):e},qn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,r,n):e},qn.pullAt=na,qn.range=gu,qn.rangeRight=_u,qn.rearg=qa,qn.reject=function(e,t){return(Ka(e)?Rt:mr)(e,za(lo(t,3)))},qn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=lo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Gr(e,i),n},qn.rest=function(e,t){if("function"!=typeof e)throw new Oe(i);return Xr(e,t=t===r?t:_s(t))},qn.reverse=ra,qn.sampleSize=function(e,t,n){return t=(n?ko(e,t,n):t===r)?1:_s(t),(Ka(e)?er:ei)(e,t)},qn.set=function(e,t,n){return null==e?e:ti(e,t,n)},qn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:ti(e,t,n,i)},qn.shuffle=function(e){return(Ka(e)?tr:ii)(e)},qn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ko(e,t,n)?(t=0,n=i):(t=null==t?0:_s(t),n=n===r?i:_s(n)),oi(e,t,n)):[]},qn.sortBy=xa,qn.sortedUniq=function(e){return e&&e.length?ci(e):[]},qn.sortedUniqBy=function(e,t){return e&&e.length?ci(e,lo(t,2)):[]},qn.split=function(e,t,n){return n&&"number"!=typeof n&&ko(e,t,n)&&(t=n=r),(n=n===r?v:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!us(t))&&!(t=fi(t))&&an(e)?Ei(dn(e),0,n):e.split(t,n):[]},qn.spread=function(e,t){if("function"!=typeof e)throw new Oe(i);return t=null==t?0:wn(_s(t),0),Xr((function(n){var r=n[t],i=Ei(n,0,t);return r&&jt(i,r),St(e,this,i)}))},qn.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},qn.take=function(e,t,n){return e&&e.length?oi(e,0,(t=n||t===r?1:_s(t))<0?0:t):[]},qn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?oi(e,(t=i-(t=n||t===r?1:_s(t)))<0?0:t,i):[]},qn.takeRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!1,!0):[]},qn.takeWhile=function(e,t){return e&&e.length?vi(e,lo(t,3)):[]},qn.tap=function(e,t){return t(e),e},qn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Oe(i);return rs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),La(e,t,{leading:r,maxWait:t,trailing:o})},qn.thru=ga,qn.toArray=vs,qn.toPairs=Fs,qn.toPairsIn=qs,qn.toPath=function(e){return Ka(e)?Nt(e,Do):fs(e)?[e]:Ii(Uo(bs(e)))},qn.toPlainObject=ws,qn.transform=function(e,t,n){var r=Ka(e),i=r||Va(e)||hs(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:rs(e)&&es(o)?Zn(Ke(e)):{}}return(i?Ct:kr)(e,(function(e,r,i){return t(n,e,r,i)})),n},qn.unary=function(e){return Oa(e,1)},qn.union=ia,qn.unionBy=oa,qn.unionWith=aa,qn.uniq=function(e){return e&&e.length?hi(e):[]},qn.uniqBy=function(e,t){return e&&e.length?hi(e,lo(t,2)):[]},qn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?hi(e,r,t):[]},qn.unset=function(e,t){return null==e||di(e,t)},qn.unzip=sa,qn.unzipWith=ua,qn.update=function(e,t,n){return null==e?e:pi(e,t,wi(n))},qn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:pi(e,t,wi(n),i)},qn.values=Zs,qn.valuesIn=function(e){return null==e?[]:Vt(e,Ps(e))},qn.without=ca,qn.words=eu,qn.wrap=function(e,t){return Da(wi(t),e)},qn.xor=la,qn.xorBy=fa,qn.xorWith=ha,qn.zip=da,qn.zipObject=function(e,t){return mi(e||[],t||[],rr)},qn.zipObjectDeep=function(e,t){return mi(e||[],t||[],ti)},qn.zipWith=pa,qn.entries=Fs,qn.entriesIn=qs,qn.extend=Es,qn.extendWith=Ss,lu(qn,qn),qn.add=wu,qn.attempt=tu,qn.camelCase=Ws,qn.capitalize=$s,qn.ceil=bu,qn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ys(n))==n?n:0),t!==r&&(t=(t=ys(t))==t?t:0),cr(ys(e),t,n)},qn.clone=function(e){return lr(e,4)},qn.cloneDeep=function(e){return lr(e,5)},qn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:r)},qn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:r)},qn.conformsTo=function(e,t){return null==t||fr(e,t,Ls(t))},qn.deburr=Hs,qn.defaultTo=function(e,t){return null==e||e!=e?t:e},qn.divide=ku,qn.endsWith=function(e,t,n){e=bs(e),t=fi(t);var i=e.length,o=n=n===r?i:cr(_s(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},qn.eq=Za,qn.escape=function(e){return(e=bs(e))&&J.test(e)?e.replace(Y,rn):e},qn.escapeRegExp=function(e){return(e=bs(e))&&ie.test(e)?e.replace(re,"\\$&"):e},qn.every=function(e,t,n){var i=Ka(e)?xt:gr;return n&&ko(e,t,n)&&(t=r),i(e,lo(t,3))},qn.find=ya,qn.findIndex=Ho,qn.findKey=function(e,t){return zt(e,lo(t,3),kr)},qn.findLast=wa,qn.findLastIndex=Ko,qn.findLastKey=function(e,t){return zt(e,lo(t,3),Er)},qn.floor=Eu,qn.forEach=ba,qn.forEachRight=ka,qn.forIn=function(e,t){return null==e?e:wr(e,lo(t,3),Ps)},qn.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Ps)},qn.forOwn=function(e,t){return e&&kr(e,lo(t,3))},qn.forOwnRight=function(e,t){return e&&Er(e,lo(t,3))},qn.get=Rs,qn.gt=Wa,qn.gte=$a,qn.has=function(e,t){return null!=e&&mo(e,t,Rr)},qn.hasIn=Os,qn.head=Go,qn.identity=au,qn.includes=function(e,t,n,r){e=Ga(e)?e:Zs(e),n=n&&!r?_s(n):0;var i=e.length;return n<0&&(n=wn(i+n,0)),ls(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Dt(e,t,n)>-1},qn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:_s(n);return i<0&&(i=wn(r+i,0)),Dt(e,t,i)},qn.inRange=function(e,t,n){return t=gs(t),n===r?(n=t,t=0):n=gs(n),function(e,t,n){return e>=bn(t,n)&&e<wn(t,n)}(e=ys(e),t,n)},qn.invoke=js,qn.isArguments=Ha,qn.isArray=Ka,qn.isArrayBuffer=Ya,qn.isArrayLike=Ga,qn.isArrayLikeObject=Ja,qn.isBoolean=function(e){return!0===e||!1===e||is(e)&&Tr(e)==y},qn.isBuffer=Va,qn.isDate=Xa,qn.isElement=function(e){return is(e)&&1===e.nodeType&&!ss(e)},qn.isEmpty=function(e){if(null==e)return!0;if(Ga(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Va(e)||hs(e)||Ha(e)))return!e.length;var t=_o(e);if(t==S||t==R)return!e.size;if(Co(e))return!zr(e).length;for(var n in e)if(Be.call(e,n))return!1;return!0},qn.isEqual=function(e,t){return Lr(e,t)},qn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Lr(e,t,r,n):!!i},qn.isError=Qa,qn.isFinite=function(e){return"number"==typeof e&&_n(e)},qn.isFunction=es,qn.isInteger=ts,qn.isLength=ns,qn.isMap=os,qn.isMatch=function(e,t){return e===t||Pr(e,t,ho(t))},qn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Pr(e,t,ho(t),n)},qn.isNaN=function(e){return as(e)&&e!=+e},qn.isNative=function(e){if(Ao(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Br(e)},qn.isNil=function(e){return null==e},qn.isNull=function(e){return null===e},qn.isNumber=as,qn.isObject=rs,qn.isObjectLike=is,qn.isPlainObject=ss,qn.isRegExp=us,qn.isSafeInteger=function(e){return ts(e)&&e>=-9007199254740991&&e<=d},qn.isSet=cs,qn.isString=ls,qn.isSymbol=fs,qn.isTypedArray=hs,qn.isUndefined=function(e){return e===r},qn.isWeakMap=function(e){return is(e)&&_o(e)==N},qn.isWeakSet=function(e){return is(e)&&"[object WeakSet]"==Tr(e)},qn.join=function(e,t){return null==e?"":mn.call(e,t)},qn.kebabCase=Ks,qn.last=Qo,qn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=_s(n))<0?wn(i+o,0):bn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ut(e,qt,o,!0)},qn.lowerCase=Ys,qn.lowerFirst=Gs,qn.lt=ds,qn.lte=ps,qn.max=function(e){return e&&e.length?_r(e,au,xr):r},qn.maxBy=function(e,t){return e&&e.length?_r(e,lo(t,2),xr):r},qn.mean=function(e){return Zt(e,au)},qn.meanBy=function(e,t){return Zt(e,lo(t,2))},qn.min=function(e){return e&&e.length?_r(e,au,Dr):r},qn.minBy=function(e,t){return e&&e.length?_r(e,lo(t,2),Dr):r},qn.stubArray=mu,qn.stubFalse=yu,qn.stubObject=function(){return{}},qn.stubString=function(){return""},qn.stubTrue=function(){return!0},qn.multiply=Au,qn.nth=function(e,t){return e&&e.length?$r(e,_s(t)):r},qn.noConflict=function(){return ht._===this&&(ht._=Fe),this},qn.noop=fu,qn.now=Ra,qn.pad=function(e,t,n){e=bs(e);var r=(t=_s(t))?hn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(_t(i),n)+e+Hi(gt(i),n)},qn.padEnd=function(e,t,n){e=bs(e);var r=(t=_s(t))?hn(e):0;return t&&r<t?e+Hi(t-r,n):e},qn.padStart=function(e,t,n){e=bs(e);var r=(t=_s(t))?hn(e):0;return t&&r<t?Hi(t-r,n)+e:e},qn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),En(bs(e).replace(oe,""),t||0)},qn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ko(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=gs(e),t===r?(t=e,e=0):t=gs(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=Sn();return bn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Jr(e,t)},qn.reduce=function(e,t,n){var r=Ka(e)?Lt:Ht,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},qn.reduceRight=function(e,t,n){var r=Ka(e)?Pt:Ht,i=arguments.length<3;return r(e,lo(t,4),n,i,vr)},qn.repeat=function(e,t,n){return t=(n?ko(e,t,n):t===r)?1:_s(t),Vr(bs(e),t)},qn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},qn.result=function(e,t,n){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=r);++i<o;){var a=null==e?r:e[Do(t[i])];a===r&&(i=o,a=n),e=es(a)?a.call(e):a}return e},qn.round=Cu,qn.runInContext=e,qn.sample=function(e){return(Ka(e)?Qn:Qr)(e)},qn.size=function(e){if(null==e)return 0;if(Ga(e))return ls(e)?hn(e):e.length;var t=_o(e);return t==S||t==R?e.size:zr(e).length},qn.snakeCase=Js,qn.some=function(e,t,n){var i=Ka(e)?Bt:ai;return n&&ko(e,t,n)&&(t=r),i(e,lo(t,3))},qn.sortedIndex=function(e,t){return si(e,t)},qn.sortedIndexBy=function(e,t,n){return ui(e,t,lo(n,2))},qn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=si(e,t);if(r<n&&Za(e[r],t))return r}return-1},qn.sortedLastIndex=function(e,t){return si(e,t,!0)},qn.sortedLastIndexBy=function(e,t,n){return ui(e,t,lo(n,2),!0)},qn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=si(e,t,!0)-1;if(Za(e[n],t))return n}return-1},qn.startCase=Vs,qn.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:cr(_s(n),0,e.length),t=fi(t),e.slice(n,n+t.length)==t},qn.subtract=Tu,qn.sum=function(e){return e&&e.length?Kt(e,au):0},qn.sumBy=function(e,t){return e&&e.length?Kt(e,lo(t,2)):0},qn.template=function(e,t,n){var i=qn.templateSettings;n&&ko(e,t,n)&&(t=r),e=bs(e),t=Ss({},t,i,eo);var o,a,s=Ss({},t.imports,i.imports,eo),u=Ls(s),c=Vt(s,u),l=0,f=t.interpolate||be,h="__p += '",d=xe((t.escape||be).source+"|"+f.source+"|"+(f===Q?de:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(Be.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";e.replace(d,(function(t,n,r,i,s,u){return r||(r=i),h+=e.slice(l,u).replace(ke,on),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),h+="';\n";var v=Be.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new Se("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(W,""):h).replace($,"$1").replace(H,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=tu((function(){return Ae(u,p+"return "+h).apply(r,c)}));if(g.source=h,Qa(g))throw g;return g},qn.times=function(e,t){if((e=_s(e))<1||e>d)return[];var n=v,r=bn(e,v);t=lo(t),e-=v;for(var i=Yt(r,t);++n<e;)t(n);return i},qn.toFinite=gs,qn.toInteger=_s,qn.toLength=ms,qn.toLower=function(e){return bs(e).toLowerCase()},qn.toNumber=ys,qn.toSafeInteger=function(e){return e?cr(_s(e),-9007199254740991,d):0===e?e:0},qn.toString=bs,qn.toUpper=function(e){return bs(e).toUpperCase()},qn.trim=function(e,t,n){if((e=bs(e))&&(n||t===r))return Gt(e);if(!e||!(t=fi(t)))return e;var i=dn(e),o=dn(t);return Ei(i,Qt(i,o),en(i,o)+1).join("")},qn.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===r))return e.slice(0,pn(e)+1);if(!e||!(t=fi(t)))return e;var i=dn(e);return Ei(i,0,en(i,dn(t))+1).join("")},qn.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===r))return e.replace(oe,"");if(!e||!(t=fi(t)))return e;var i=dn(e);return Ei(i,Qt(i,dn(t))).join("")},qn.truncate=function(e,t){var n=30,i="...";if(rs(t)){var o="separator"in t?t.separator:o;n="length"in t?_s(t.length):n,i="omission"in t?fi(t.omission):i}var a=(e=bs(e)).length;if(an(e)){var s=dn(e);a=s.length}if(n>=a)return e;var u=n-hn(i);if(u<1)return i;var c=s?Ei(s,0,u).join(""):e.slice(0,u);if(o===r)return c+i;if(s&&(u+=c.length-u),us(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=xe(o.source,bs(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===r?u:h)}}else if(e.indexOf(fi(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},qn.unescape=function(e){return(e=bs(e))&&G.test(e)?e.replace(K,vn):e},qn.uniqueId=function(e){var t=++Me;return bs(e)+t},qn.upperCase=Xs,qn.upperFirst=Qs,qn.each=ba,qn.eachRight=ka,qn.first=Go,lu(qn,(Su={},kr(qn,(function(e,t){Be.call(qn.prototype,t)||(Su[t]=e)})),Su),{chain:!1}),qn.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){qn[e].placeholder=qn})),Ct(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===r?1:wn(_s(n),0);var i=this.__filtered__&&!t?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(n,i.__takeCount__):i.__views__.push({size:bn(n,v),type:e+(i.__dir__<0?"Right":"")}),i},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ct(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(au)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Nr(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(za(lo(e)))},Hn.prototype.slice=function(e,t){e=_s(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=_s(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(v)},kr(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=qn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(qn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof Hn,c=s[0],l=u||Ka(t),f=function(e){var t=o.apply(qn,jt([e],s));return i&&h?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=u&&!d;if(!a&&l){t=v?t:new Hn(this);var g=e.apply(t,s);return g.__actions__.push({func:ga,args:[f],thisArg:r}),new $n(g,h)}return p&&v?e.apply(this,s):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);qn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ka(i)?i:[],e)}return this[n]((function(n){return t.apply(Ka(n)?n:[],e)}))}})),kr(Hn.prototype,(function(e,t){var n=qn[t];if(n){var r=n.name+"";Be.call(jn,r)||(jn[r]=[]),jn[r].push({name:t,func:n})}})),jn[qi(r,2).name]=[{name:"wrapper",func:r}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ka(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=wn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,h=0,d=bn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return gi(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var v=-1,g=e[c+=t];++v<f;){var _=l[v],m=_.iteratee,y=_.type,w=m(g);if(2==y)g=w;else if(!w){if(1==y)continue e;break e}}p[h++]=g}return p},qn.prototype.at=_a,qn.prototype.chain=function(){return va(this)},qn.prototype.commit=function(){return new $n(this.value(),this.__chain__)},qn.prototype.next=function(){this.__values__===r&&(this.__values__=vs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},qn.prototype.plant=function(e){for(var t,n=this;n instanceof Wn;){var i=qo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},qn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:ga,args:[ra],thisArg:r}),new $n(t,this.__chain__)}return this.thru(ra)},qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},qn.prototype.first=qn.prototype.head,tt&&(qn.prototype[tt]=function(){return this}),qn}();pt?((pt.exports=gn)._=gn,dt._=gn):ht._=gn}).call(t)})),o="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}var u=a,c=s;function l(e){if(u===setTimeout)return setTimeout(e,0);if((u===a||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}"function"==typeof o.setTimeout&&(u=setTimeout),"function"==typeof o.clearTimeout&&(c=clearTimeout);var f,h=[],d=!1,p=-1;function v(){d&&f&&(d=!1,f.length?h=f.concat(h):p=-1,h.length&&g())}function g(){if(!d){var e=l(v);d=!0;for(var t=h.length;t;){for(f=h,h=[];++p<t;)f&&f[p].run();p=-1,t=h.length}f=null,d=!1,function(e){if(c===clearTimeout)return clearTimeout(e);if((c===s||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}(e)}}function _(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new m(e,t)),1!==h.length||d||l(g)}function m(e,t){this.fun=e,this.array=t}m.prototype.run=function(){this.fun.apply(null,this.array)};function y(){}var w=y,b=y,k=y,E=y,S=y,A=y,C=y;var T=o.performance||{},x=T.now||T.mozNow||T.msNow||T.oNow||T.webkitNow||function(){return(new Date).getTime()};var R=new Date;var O={nextTick:_,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:w,addListener:b,once:k,off:E,removeListener:S,removeAllListeners:A,emit:C,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*x.call(T),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-R)/1e3}},I=1e3,N=60*I,j=60*N,L=24*j,P=7*L,B=365.25*L,M=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*B;case"weeks":case"week":case"w":return n*P;case"days":case"day":case"d":return n*L;case"hours":case"hour":case"hrs":case"hr":case"h":return n*j;case"minutes":case"minute":case"mins":case"min":case"m":return n*N;case"seconds":case"second":case"secs":case"sec":case"s":return n*I;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=L)return z(e,t,L,"day");if(t>=j)return z(e,t,j,"hour");if(t>=N)return z(e,t,N,"minute");if(t>=I)return z(e,t,I,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=L)return Math.round(e/L)+"d";if(t>=j)return Math.round(e/j)+"h";if(t>=N)return Math.round(e/N)+"m";if(t>=I)return Math.round(e/I)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function z(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}var U=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=M,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},D=n((function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==O&&"env"in O&&(e=O.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=U(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}));function F(){return!1}function q(){throw new Error("tty.ReadStream is not implemented")}function Z(){throw new Error("tty.ReadStream is not implemented")}D.formatArgs,D.save,D.load,D.useColors,D.storage,D.destroy,D.colors,D.log;var W={isatty:F,ReadStream:q,WriteStream:Z},$=Object.freeze({__proto__:null,isatty:F,ReadStream:q,WriteStream:Z,default:W}),H=[],K=[],Y="undefined"!=typeof Uint8Array?Uint8Array:Array,G=!1;function J(){G=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)H[t]=e[t],K[e.charCodeAt(t)]=t;K["-".charCodeAt(0)]=62,K["_".charCodeAt(0)]=63}function V(e,t,n){for(var r,i,o=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(H[(i=r)>>18&63]+H[i>>12&63]+H[i>>6&63]+H[63&i]);return o.join("")}function X(e){var t;G||J();for(var n=e.length,r=n%3,i="",o=[],a=16383,s=0,u=n-r;s<u;s+=a)o.push(V(e,s,s+a>u?u:s+a));return 1===r?(t=e[n-1],i+=H[t>>2],i+=H[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=H[t>>10],i+=H[t>>4&63],i+=H[t<<2&63],i+="="),o.push(i),o.join("")}function Q(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)}function ee(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*v}var te={}.toString,ne=Array.isArray||function(e){return"[object Array]"==te.call(e)};function re(){return oe.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ie(e,t){if(re()<t)throw new RangeError("Invalid typed array length");return oe.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=oe.prototype:(null===e&&(e=new oe(t)),e.length=t),e}function oe(e,t,n){if(!(oe.TYPED_ARRAY_SUPPORT||this instanceof oe))return new oe(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return ue(this,e)}return ae(this,e,t,n)}function ae(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);oe.TYPED_ARRAY_SUPPORT?(e=t).__proto__=oe.prototype:e=ce(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!oe.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|he(t,n),i=(e=ie(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(fe(t)){var n=0|le(t.length);return 0===(e=ie(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?ie(e,0):ce(e,t);if("Buffer"===t.type&&ne(t.data))return ce(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function se(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function ue(e,t){if(se(t),e=ie(e,t<0?0:0|le(t)),!oe.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function ce(e,t){var n=t.length<0?0:0|le(t.length);e=ie(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function le(e){if(e>=re())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+re().toString(16)+" bytes");return 0|e}function fe(e){return!(null==e||!e._isBuffer)}function he(e,t){if(fe(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Ue(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return De(e).length;default:if(r)return Ue(e).length;t=(""+t).toLowerCase(),r=!0}}function de(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return xe(this,t,n);case"utf8":case"utf-8":return Se(this,t,n);case"ascii":return Ce(this,t,n);case"latin1":case"binary":return Te(this,t,n);case"base64":return Ee(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Re(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function pe(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function ve(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=oe.from(t,r)),fe(t))return 0===t.length?-1:ge(e,t,n,r,i);if("number"==typeof t)return t&=255,oe.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):ge(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function ge(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function _e(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function me(e,t,n,r){return Fe(Ue(t,e.length-n),e,n,r)}function ye(e,t,n,r){return Fe(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function we(e,t,n,r){return ye(e,t,n,r)}function be(e,t,n,r){return Fe(De(t),e,n,r)}function ke(e,t,n,r){return Fe(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function Ee(e,t,n){return 0===t&&n===e.length?X(e):X(e.slice(t,n))}function Se(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=Ae)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ae));return n}(r)}oe.TYPED_ARRAY_SUPPORT=void 0===o.TYPED_ARRAY_SUPPORT||o.TYPED_ARRAY_SUPPORT,oe.poolSize=8192,oe._augment=function(e){return e.__proto__=oe.prototype,e},oe.from=function(e,t,n){return ae(null,e,t,n)},oe.TYPED_ARRAY_SUPPORT&&(oe.prototype.__proto__=Uint8Array.prototype,oe.__proto__=Uint8Array),oe.alloc=function(e,t,n){return function(e,t,n,r){return se(t),t<=0?ie(e,t):void 0!==n?"string"==typeof r?ie(e,t).fill(n,r):ie(e,t).fill(n):ie(e,t)}(null,e,t,n)},oe.allocUnsafe=function(e){return ue(null,e)},oe.allocUnsafeSlow=function(e){return ue(null,e)},oe.isBuffer=qe,oe.compare=function(e,t){if(!fe(e)||!fe(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},oe.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},oe.concat=function(e,t){if(!ne(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return oe.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=oe.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!fe(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},oe.byteLength=he,oe.prototype._isBuffer=!0,oe.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)pe(this,t,t+1);return this},oe.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)pe(this,t,t+3),pe(this,t+1,t+2);return this},oe.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)pe(this,t,t+7),pe(this,t+1,t+6),pe(this,t+2,t+5),pe(this,t+3,t+4);return this},oe.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Se(this,0,e):de.apply(this,arguments)},oe.prototype.equals=function(e){if(!fe(e))throw new TypeError("Argument must be a Buffer");return this===e||0===oe.compare(this,e)},oe.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},oe.prototype.compare=function(e,t,n,r,i){if(!fe(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),l=0;l<s;++l)if(u[l]!==c[l]){o=u[l],a=c[l];break}return o<a?-1:a<o?1:0},oe.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},oe.prototype.indexOf=function(e,t,n){return ve(this,e,t,n,!0)},oe.prototype.lastIndexOf=function(e,t,n){return ve(this,e,t,n,!1)},oe.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _e(this,e,t,n);case"utf8":case"utf-8":return me(this,e,t,n);case"ascii":return ye(this,e,t,n);case"latin1":case"binary":return we(this,e,t,n);case"base64":return be(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ke(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},oe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ae=4096;function Ce(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function Te(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function xe(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=ze(e[o]);return i}function Re(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function Oe(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Ie(e,t,n,r,i,o){if(!fe(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function Ne(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function je(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function Le(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Pe(e,t,n,r,i){return i||Le(e,0,n,4),ee(e,t,n,r,23,4),n+4}function Be(e,t,n,r,i){return i||Le(e,0,n,8),ee(e,t,n,r,52,8),n+8}oe.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),oe.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=oe.prototype;else{var i=t-e;n=new oe(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},oe.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Oe(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},oe.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Oe(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},oe.prototype.readUInt8=function(e,t){return t||Oe(e,1,this.length),this[e]},oe.prototype.readUInt16LE=function(e,t){return t||Oe(e,2,this.length),this[e]|this[e+1]<<8},oe.prototype.readUInt16BE=function(e,t){return t||Oe(e,2,this.length),this[e]<<8|this[e+1]},oe.prototype.readUInt32LE=function(e,t){return t||Oe(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},oe.prototype.readUInt32BE=function(e,t){return t||Oe(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},oe.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Oe(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},oe.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Oe(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},oe.prototype.readInt8=function(e,t){return t||Oe(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},oe.prototype.readInt16LE=function(e,t){t||Oe(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},oe.prototype.readInt16BE=function(e,t){t||Oe(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},oe.prototype.readInt32LE=function(e,t){return t||Oe(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},oe.prototype.readInt32BE=function(e,t){return t||Oe(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},oe.prototype.readFloatLE=function(e,t){return t||Oe(e,4,this.length),Q(this,e,!0,23,4)},oe.prototype.readFloatBE=function(e,t){return t||Oe(e,4,this.length),Q(this,e,!1,23,4)},oe.prototype.readDoubleLE=function(e,t){return t||Oe(e,8,this.length),Q(this,e,!0,52,8)},oe.prototype.readDoubleBE=function(e,t){return t||Oe(e,8,this.length),Q(this,e,!1,52,8)},oe.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Ie(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},oe.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Ie(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},oe.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,1,255,0),oe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},oe.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,2,65535,0),oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ne(this,e,t,!0),t+2},oe.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,2,65535,0),oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ne(this,e,t,!1),t+2},oe.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,4,4294967295,0),oe.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):je(this,e,t,!0),t+4},oe.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,4,4294967295,0),oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):je(this,e,t,!1),t+4},oe.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Ie(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},oe.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Ie(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},oe.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,1,127,-128),oe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},oe.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,2,32767,-32768),oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ne(this,e,t,!0),t+2},oe.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,2,32767,-32768),oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ne(this,e,t,!1),t+2},oe.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,4,2147483647,-2147483648),oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):je(this,e,t,!0),t+4},oe.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Ie(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):je(this,e,t,!1),t+4},oe.prototype.writeFloatLE=function(e,t,n){return Pe(this,e,t,!0,n)},oe.prototype.writeFloatBE=function(e,t,n){return Pe(this,e,t,!1,n)},oe.prototype.writeDoubleLE=function(e,t,n){return Be(this,e,t,!0,n)},oe.prototype.writeDoubleBE=function(e,t,n){return Be(this,e,t,!1,n)},oe.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!oe.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},oe.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!oe.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=fe(e)?e:Ue(new oe(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var Me=/[^+\/0-9A-Za-z-_]/g;function ze(e){return e<16?"0"+e.toString(16):e.toString(16)}function Ue(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function De(e){return function(e){var t,n,r,i,o,a;G||J();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new Y(3*s/4-o),r=o>0?s-4:s;var u=0;for(t=0,n=0;t<r;t+=4,n+=3)i=K[e.charCodeAt(t)]<<18|K[e.charCodeAt(t+1)]<<12|K[e.charCodeAt(t+2)]<<6|K[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=K[e.charCodeAt(t)]<<2|K[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=K[e.charCodeAt(t)]<<10|K[e.charCodeAt(t+1)]<<4|K[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Me,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Fe(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function qe(e){return null!=e&&(!!e._isBuffer||Ze(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Ze(e.slice(0,0))}(e))}function Ze(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var We="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},$e=/%[sdj%]/g;function He(e){if(!ut(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(Ve(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace($e,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),a=r[n];n<i;a=r[++n])ot(a)||!ht(a)?o+=" "+a:o+=" "+Ve(a);return o}function Ke(e,t){if(lt(o.process))return function(){return Ke(e,t).apply(this,arguments)};if(!0===O.noDeprecation)return e;var n=!1;return function(){if(!n){if(O.throwDeprecation)throw new Error(t);O.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var Ye,Ge={};function Je(e){if(lt(Ye)&&(Ye=O.env.NODE_DEBUG||""),e=e.toUpperCase(),!Ge[e])if(new RegExp("\\b"+e+"\\b","i").test(Ye)){Ge[e]=function(){var t=He.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else Ge[e]=function(){};return Ge[e]}function Ve(e,t){var n={seen:[],stylize:Qe};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),it(t)?n.showHidden=t:t&&Et(n,t),lt(n.showHidden)&&(n.showHidden=!1),lt(n.depth)&&(n.depth=2),lt(n.colors)&&(n.colors=!1),lt(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=Xe),et(n,e,n.depth)}function Xe(e,t){var n=Ve.styles[t];return n?"["+Ve.colors[n][0]+"m"+e+"["+Ve.colors[n][1]+"m":e}function Qe(e,t){return e}function et(e,t,n){if(e.customInspect&&t&&vt(t.inspect)&&t.inspect!==Ve&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return ut(r)||(r=et(e,r,n)),r}var i=function(e,t){if(lt(t))return e.stylize("undefined","undefined");if(ut(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(st(t))return e.stylize(""+t,"number");if(it(t))return e.stylize(""+t,"boolean");if(ot(t))return e.stylize("null","null")}(e,t);if(i)return i;var o=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),pt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return tt(t);if(0===o.length){if(vt(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(ft(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(dt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(pt(t))return tt(t)}var u,c="",l=!1,f=["{","}"];(rt(t)&&(l=!0,f=["[","]"]),vt(t))&&(c=" [Function"+(t.name?": "+t.name:"")+"]");return ft(t)&&(c=" "+RegExp.prototype.toString.call(t)),dt(t)&&(c=" "+Date.prototype.toUTCString.call(t)),pt(t)&&(c=" "+tt(t)),0!==o.length||l&&0!=t.length?n<0?ft(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=l?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)St(t,String(a))?o.push(nt(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(nt(e,t,n,r,i,!0))})),o}(e,t,n,a,o):o.map((function(r){return nt(e,t,n,a,r,l)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,c,f)):f[0]+c+f[1]}function tt(e){return"["+Error.prototype.toString.call(e)+"]"}function nt(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),St(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=ot(n)?et(e,u.value,null):et(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),lt(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function rt(e){return Array.isArray(e)}function it(e){return"boolean"==typeof e}function ot(e){return null===e}function at(e){return null==e}function st(e){return"number"==typeof e}function ut(e){return"string"==typeof e}function ct(e){return"symbol"==typeof e}function lt(e){return void 0===e}function ft(e){return ht(e)&&"[object RegExp]"===mt(e)}function ht(e){return"object"==typeof e&&null!==e}function dt(e){return ht(e)&&"[object Date]"===mt(e)}function pt(e){return ht(e)&&("[object Error]"===mt(e)||e instanceof Error)}function vt(e){return"function"==typeof e}function gt(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function _t(e){return oe.isBuffer(e)}function mt(e){return Object.prototype.toString.call(e)}function yt(e){return e<10?"0"+e.toString(10):e.toString(10)}Ve.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ve.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var wt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bt(){var e=new Date,t=[yt(e.getHours()),yt(e.getMinutes()),yt(e.getSeconds())].join(":");return[e.getDate(),wt[e.getMonth()],t].join(" ")}function kt(){console.log("%s - %s",bt(),He.apply(null,arguments))}function Et(e,t){if(!t||!ht(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function St(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var At,Ct={inherits:We,_extend:Et,log:kt,isBuffer:_t,isPrimitive:gt,isFunction:vt,isError:pt,isDate:dt,isObject:ht,isRegExp:ft,isUndefined:lt,isSymbol:ct,isString:ut,isNumber:st,isNullOrUndefined:at,isNull:ot,isBoolean:it,isArray:rt,inspect:Ve,deprecate:Ke,format:He,debuglog:Je},Tt=Object.freeze({__proto__:null,format:He,deprecate:Ke,debuglog:Je,inspect:Ve,isArray:rt,isBoolean:it,isNull:ot,isNullOrUndefined:at,isNumber:st,isString:ut,isSymbol:ct,isUndefined:lt,isRegExp:ft,isObject:ht,isDate:dt,isError:pt,isFunction:vt,isPrimitive:gt,isBuffer:_t,log:kt,inherits:We,_extend:Et,default:Ct});function xt(){if(void 0===At){var e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);if(t[0]=1,t[1]=2,258===n[0])At="BE";else{if(513!==n[0])throw new Error("unable to figure out endianess");At="LE"}}return At}function Rt(){return void 0!==o.location?o.location.hostname:""}function Ot(){return[]}function It(){return 0}function Nt(){return Number.MAX_VALUE}function jt(){return Number.MAX_VALUE}function Lt(){return[]}function Pt(){return"Browser"}function Bt(){return void 0!==o.navigator?o.navigator.appVersion:""}function Mt(){}function zt(){}function Ut(){return"/tmp"}var Dt=Ut,Ft={EOL:"\n",tmpdir:Dt,tmpDir:Ut,networkInterfaces:Mt,getNetworkInterfaces:zt,release:Bt,type:Pt,cpus:Lt,totalmem:jt,freemem:Nt,uptime:It,loadavg:Ot,hostname:Rt,endianness:xt},qt=(e,t=O.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)},Zt=r(Object.freeze({__proto__:null,endianness:xt,hostname:Rt,loadavg:Ot,uptime:It,freemem:Nt,totalmem:jt,cpus:Lt,type:Pt,release:Bt,networkInterfaces:Mt,getNetworkInterfaces:zt,arch:function(){return"javascript"},platform:function(){return"browser"},tmpDir:Ut,tmpdir:Dt,EOL:"\n",default:Ft})),Wt=r($);const{env:$t}=O;let Ht;function Kt(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Yt(e,t){if(0===Ht)return 0;if(qt("color=16m")||qt("color=full")||qt("color=truecolor"))return 3;if(qt("color=256"))return 2;if(e&&!t&&void 0===Ht)return 0;const n=Ht||0;if("dumb"===$t.TERM)return n;if("win32"===O.platform){const e=Zt.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in $t)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in $t))||"codeship"===$t.CI_NAME?1:n;if("TEAMCITY_VERSION"in $t)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test($t.TEAMCITY_VERSION)?1:0;if("truecolor"===$t.COLORTERM)return 3;if("TERM_PROGRAM"in $t){const e=parseInt(($t.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch($t.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test($t.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test($t.TERM)||"COLORTERM"in $t?1:n}qt("no-color")||qt("no-colors")||qt("color=false")||qt("color=never")?Ht=0:(qt("color")||qt("colors")||qt("color=true")||qt("color=always"))&&(Ht=1),"FORCE_COLOR"in $t&&(Ht="true"===$t.FORCE_COLOR?1:"false"===$t.FORCE_COLOR?0:0===$t.FORCE_COLOR.length?1:Math.min(parseInt($t.FORCE_COLOR,10),3));var Gt={supportsColor:function(e){return Kt(Yt(e,e&&e.isTTY))},stdout:Kt(Yt(!0,Wt.isatty(1))),stderr:Kt(Yt(!0,Wt.isatty(2)))},Jt=r(Tt),Vt=n((function(e,t){t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return O.stderr.write(Jt.format(...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} [0m`;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?O.env.DEBUG=e:delete O.env.DEBUG},t.load=function(){return O.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):Wt.isatty(O.stderr.fd)},t.destroy=Jt.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=Gt;e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(O.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=O.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=U(t);const{formatters:n}=e.exports;n.o=function(e){return this.inspectOpts.colors=this.useColors,Jt.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,Jt.inspect(e,this.inspectOpts)}}));Vt.init,Vt.log,Vt.formatArgs,Vt.save,Vt.load,Vt.useColors,Vt.destroy,Vt.colors,Vt.inspectOpts;var Xt,Qt,en,tn,nn,rn,on,an,sn,un,cn=n((function(e){void 0===O||"renderer"===O.type||!0===O.browser||O.__nwjs?e.exports=D:e.exports=Vt}));e.NetworkType=void 0,(Xt=e.NetworkType||(e.NetworkType={})).none="none",Xt.wifi="wifi",Xt.cellular="cellular",Xt.unknown="unknown",e.PlatformType=void 0,(Qt=e.PlatformType||(e.PlatformType={})).wp="wp",Qt.android="android",Qt.iOS="iOS",Qt.unknown="unknown",e.ProfileType=void 0,(en=e.ProfileType||(e.ProfileType={}))[en.user=1]="user",en[en.oa=0]="oa",en[en.aliasOA=2]="aliasOA",e.ChatType=void 0,(tn=e.ChatType||(e.ChatType={}))[tn.user=1]="user",tn[tn.oa=0]="oa",e.PostFeedType=void 0,(nn=e.PostFeedType||(e.PostFeedType={}))[nn.image=1]="image",nn[nn.link=4]="link",nn[nn.profile=5]="profile",e.ShareSheetType=void 0,(rn=e.ShareSheetType||(e.ShareSheetType={}))[rn.image=1]="image",rn[rn.gif=11]="gif",rn[rn.video=12]="video",rn[rn.link=4]="link",rn[rn.oa=5]="oa",e.OrientationType=void 0,(on=e.OrientationType||(e.OrientationType={}))[on.auto=1]="auto",on[on.portrait=2]="portrait",on[on.landscape=3]="landscape",e.VibrateType=void 0,(an=e.VibrateType||(e.VibrateType={}))[an.oneShot=0]="oneShot",e.NativeCode=void 0,(sn=e.NativeCode||(e.NativeCode={}))[sn.token_invalid=-2]="token_invalid",sn[sn.not_permission=-1]="not_permission",sn[sn.client_not_support=-5]="client_not_support",sn[sn.decode_failed=-4]="decode_failed",e.Events=void 0,(un=e.Events||(e.Events={})).AppPaused="h5.event.paused",un.AppResumed="h5.event.resumed",un.NetworkChanged="h5.event.connection.changed",un.OnDataCallback="h5.event.webview.result";const ln=e=>{const t=document.cookie;if(t){const i=t.split("; ");if(i&&i.length>0)for(var n=e.length+1,r=i.length-1;r>=0;r--){let t=i[r];if(t&&0===t.indexOf(e)&&(t=t.substring(n,t.length),t))return t=t.replace(/["']/g,""),t}}return null},fn=e=>ln(`${window.location.host}_`+e),hn=e=>ln((()=>{const e=window.location.host;if(e){if(e.indexOf("zalo.me")>=0)return"zalo.me_";if(e.indexOf("baomoi.com")>=0)return"baomoi.com_";if(e.indexOf("mp3.zing.vn")>=0)return"mp3.zing.vn_";if(e.indexOf("zaloapp.com")>=0)return"zaloapp.com_"}return""})()+e),dn="action.open.profile",pn="action.open.inapp",vn="action.open.chat",gn="action.open.postfeed",_n="action.follow.oa",mn="action.unfollow.oa",yn="action.open.sharesheet",wn="action.request.permission.camera",bn="action.change.title.header",kn="action.webview.networktype",En="action.create.options.menu",Sn="action.create.shortcut",An="action.change.actionbar.leftbutton.type",Cn="action.window.close",Tn="action.prompt.authentication",xn="action.prompt.authentication.check_state",Rn="action.get.location",On="action.query.location.hide",In="action.show.toast",Nn="action.hide.keyboard",jn="action.open.phone",Ln="action.open.qr",Pn="action.open.sms",Bn="action.view.myqr",Mn="action.keep.screen",zn="action.change.autorotate",Un="action.scan.ibeacon",Dn="action.save.image.gallery",Fn="action.open.mp",qn="action.change.actionbar",Zn="action.interactive.vibration",Wn="action.zbrowser.mpds",$n="action.webview.set.result",Hn="action.mp.get.number",Kn=["action.get.downloaded.sticker","action.report.abuse",_n,mn,yn,En,An,Cn,"action.zbrowser.jsbridge",Rn,On,In,Bn,Mn,"action.zalorun.getTrackingStatus","action.zalorun.setTrackingStatus","action.zalorun.getDayStep","action.zalorun.forceSubmitData","action.zalorun.setWeight","action.download.cate"],Yn=-1400,Gn=-1401,Jn=-1403,Vn={READ_MORE:"Read more at: https://miniapp.zalo.me/docs/api",LOGIN_REQUIRED:"Please login before to call this api. Read more at: https://miniapp.zalo.me/docs/api/login",LOGIN_FAILED:"Login failed.",NOT_PERMISSION:"You don't have permission to call this api",CLIENT_NOT_SUPPORT:"This API is not supported in this Zalo version",DECODE_FAILED:"Can not decode your data. Read more at: https://miniapp.zalo.me/docs/api/error"},Xn="apps/get-info",Qn={android:12100571,iOS:400,wp:0,unknown:0},er=new RegExp("[\\u0300-\\u036f]","g"),tr=new RegExp("[đ|Đ]","g"),nr=new RegExp("\\s","g"),rr=cn("zmp:utils:common"),ir=e=>{try{new URL(e)}catch(e){return!1}return!0},or=()=>navigator.userAgent||navigator.vendor||window.opera,ar=()=>{const e=or().toLowerCase();return{isWP:/iemobile/.test(e),isAndroid:/android/i.test(e)&&!/iemobile/.test(e),isIOS:/iphone|ios|ipad|ipod/.test(e)&&!/iemobile/.test(e),isMobile:/android|iphone|ios|ipad|ipod|iemobile/.test(e),isZalo:/zalo/.test(e)}},sr=e=>{const t=document.getElementsByTagName("meta");for(let n=0;n<t.length;n++)if(t[n].getAttribute("name")===e||t[n].getAttribute("property")===e)return t[n].getAttribute("content");return""},ur=()=>{const e=or().toLowerCase().split("zalo")[1];if(e){return e.replace(" ","").split("/")[1]||""}return""},cr=()=>{let t=ar();return t.isWP?e.PlatformType.wp:t.isAndroid?e.PlatformType.android:t.isIOS?e.PlatformType.iOS:e.PlatformType.unknown},lr=(e,t)=>{const n=t.toLowerCase();return!(("array"!==n&&"array<number>"!==n&&"array<string>"!==n||!("array"===n&&Array.isArray(e)||"array<number>"===n&&(e=>Array.isArray(e)&&!e.some((e=>"number"!=typeof e)))(e)||"array<string>"===n&&(e=>Array.isArray(e)&&!e.some((e=>"string"!=typeof e)))(e)))&&(Array.isArray(e)||typeof e!==t))},fr=e=>null==e||e.hasOwnProperty("length")&&0===e.length||e.constructor===Object&&0===Object.keys(e).length,hr=e=>(e=>{let t=fn(e);return t||(t=hn(e),t)?t:ln(e)})(e),dr=e=>{if(i.isObject(JSON)&&JSON.parse&&i.isString(e)){const t=e.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");return JSON.parse(t,((e,t)=>t))}return i.isObject(e)?e:new Function("return "+e)()},pr=e=>{if(i.isObject(JSON)&&JSON.stringify)return JSON.stringify(e);if(void 0===e)return"undefined";if(null===e)return"null";try{if("string"==typeof e||null!==e.constructor.toString().match(/string/i))return'"'+e.replace(/"/g,'\\"')+'"'}catch(e){console.log(e)}var t;if(null!==Object.prototype.toString.call(e).match(/array/i)){t=new Array;for(var n=e.length,r=0;r<n;r++)t.push(pr(e[r]));return"["+t.join(",")+"]"}if("object"==typeof e){for(var o in t=new Array,e)t.push('"'+o+'":'+pr(e[o]));return"{"+t.join(",")+"}"}return e.toString()},vr=()=>{try{const e=Number(ur()),t=cr();return e>=Qn[t]}catch(e){return!0}},gr=e=>JSON.stringify(e).replace(/"/g,'\\"').replace(/'/g,"'"),_r=e=>{try{if(e){rr(e);const t=e.replace(/\\/g,"").replace(/'/g,"'");return rr("formattedValue",t,JSON.parse(t),typeof JSON.parse(t)),JSON.parse(t)}return null}catch(t){return rr(t),e}};
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
***************************************************************************** */
|
|
16
16
|
function mr(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function yr(e,t){return function(n,r){t(n,r,e)}}function wr(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function br(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function kr(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}var Er=n((function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,a),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}));class Sr extends Er{constructor(){super(),this.debug=cn("zmp:event-emitter")}static getInstance(){return Sr.instance||(Sr.instance=new Sr),Sr.instance}h5ConfirmHandleEvent(e,t,n){ZaloJavaScriptInterface.jsH5EventCallback(e,t,n||"")}on(e,t,n){this.debug(`register ${e}: ${n}`);return super.on(e,((r,i)=>{this.h5ConfirmHandleEvent(r,e,n),t(i)}),n)}once(e,t,n){this.debug(`register once ${e}: ${n}`);return super.once(e,((r,i)=>{this.h5ConfirmHandleEvent(r,e,n),t(i)}),n)}}var Ar=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},Cr=Object.prototype.toString;function Tr(e){return"[object Array]"===Cr.call(e)}function xr(e){return void 0===e}function Rr(e){return null!==e&&"object"==typeof e}function Or(e){if("[object Object]"!==Cr.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function Ir(e){return"[object Function]"===Cr.call(e)}function Nr(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),Tr(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var jr={isArray:Tr,isArrayBuffer:function(e){return"[object ArrayBuffer]"===Cr.call(e)},isBuffer:function(e){return null!==e&&!xr(e)&&null!==e.constructor&&!xr(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:Rr,isPlainObject:Or,isUndefined:xr,isDate:function(e){return"[object Date]"===Cr.call(e)},isFile:function(e){return"[object File]"===Cr.call(e)},isBlob:function(e){return"[object Blob]"===Cr.call(e)},isFunction:Ir,isStream:function(e){return Rr(e)&&Ir(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:Nr,merge:function e(){var t={};function n(n,r){Or(t[r])&&Or(n)?t[r]=e(t[r],n):Or(n)?t[r]=e({},n):Tr(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)Nr(arguments[r],n);return t},extend:function(e,t,n){return Nr(t,(function(t,r){e[r]=n&&"function"==typeof t?Ar(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}};function Lr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Pr=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(jr.isURLSearchParams(t))r=t.toString();else{var i=[];jr.forEach(t,(function(e,t){null!=e&&(jr.isArray(e)?t+="[]":e=[e],jr.forEach(e,(function(e){jr.isDate(e)?e=e.toISOString():jr.isObject(e)&&(e=JSON.stringify(e)),i.push(Lr(t)+"="+Lr(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e};function Br(){this.handlers=[]}Br.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},Br.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Br.prototype.forEach=function(e){jr.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var Mr,zr,Ur=Br,Dr=function(e,t,n){return jr.forEach(n,(function(n){e=n(e,t)})),e},Fr=function(e){return!(!e||!e.__CANCEL__)},qr=function(e,t){jr.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},Zr=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e},Wr=function(e,t,n,r,i){var o=new Error(e);return Zr(o,t,n,r,i)},$r=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(Wr("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)},Hr=jr.isStandardBrowserEnv()?{write:function(e,t,n,r,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),jr.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),jr.isString(r)&&a.push("path="+r),jr.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Kr=function(e,t){return e&&!function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},Yr=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Gr=jr.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=jr.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},Jr=function(e){return new Promise((function(t,n){var r=e.data,i=e.headers;jr.isFormData(r)&&delete i["Content-Type"];var o=new XMLHttpRequest;if(e.auth){var a=e.auth.username||"",s=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(a+":"+s)}var u=Kr(e.baseURL,e.url);if(o.open(e.method.toUpperCase(),Pr(u,e.params,e.paramsSerializer),!0),o.timeout=e.timeout,o.onreadystatechange=function(){if(o&&4===o.readyState&&(0!==o.status||o.responseURL&&0===o.responseURL.indexOf("file:"))){var r,i,a,s,u,c="getAllResponseHeaders"in o?(r=o.getAllResponseHeaders(),u={},r?(jr.forEach(r.split("\n"),(function(e){if(s=e.indexOf(":"),i=jr.trim(e.substr(0,s)).toLowerCase(),a=jr.trim(e.substr(s+1)),i){if(u[i]&&Yr.indexOf(i)>=0)return;u[i]="set-cookie"===i?(u[i]?u[i]:[]).concat([a]):u[i]?u[i]+", "+a:a}})),u):u):null,l={data:e.responseType&&"text"!==e.responseType?o.response:o.responseText,status:o.status,statusText:o.statusText,headers:c,config:e,request:o};$r(t,n,l),o=null}},o.onabort=function(){o&&(n(Wr("Request aborted",e,"ECONNABORTED",o)),o=null)},o.onerror=function(){n(Wr("Network Error",e,null,o)),o=null},o.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(Wr(t,e,"ECONNABORTED",o)),o=null},jr.isStandardBrowserEnv()){var c=(e.withCredentials||Gr(u))&&e.xsrfCookieName?Hr.read(e.xsrfCookieName):void 0;c&&(i[e.xsrfHeaderName]=c)}if("setRequestHeader"in o&&jr.forEach(i,(function(e,t){void 0===r&&"content-type"===t.toLowerCase()?delete i[t]:o.setRequestHeader(t,e)})),jr.isUndefined(e.withCredentials)||(o.withCredentials=!!e.withCredentials),e.responseType)try{o.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&o.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){o&&(o.abort(),n(e),o=null)})),r||(r=null),o.send(r)}))},Vr=ai(o.fetch)&&ai(o.ReadableStream);function Xr(e){zr||(zr=new o.XMLHttpRequest).open("GET",o.location.host?"/":"https://example.com");try{return zr.responseType=e,zr.responseType===e}catch(e){return!1}}var Qr=void 0!==o.ArrayBuffer,ei=Qr&&ai(o.ArrayBuffer.prototype.slice),ti=Qr&&Xr("arraybuffer"),ni=!Vr&&ei&&Xr("ms-stream"),ri=!Vr&&Qr&&Xr("moz-chunked-arraybuffer"),ii=ai(zr.overrideMimeType),oi=ai(o.VBArray);function ai(e){return"function"==typeof e}function si(){}function ui(){ui.init.call(this)}function ci(e){return void 0===e._maxListeners?ui.defaultMaxListeners:e._maxListeners}function li(e,t,n){if(t)e.call(n);else for(var r=e.length,i=mi(e,r),o=0;o<r;++o)i[o].call(n)}function fi(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=mi(e,i),a=0;a<i;++a)o[a].call(n,r)}function hi(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=mi(e,o),s=0;s<o;++s)a[s].call(n,r,i)}function di(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,s=mi(e,a),u=0;u<a;++u)s[u].call(n,r,i,o)}function pi(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=mi(e,i),a=0;a<i;++a)o[a].apply(n,r)}function vi(e,t,n,r){var i,o,a,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]):(o=e._events=new si,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),!a.warned&&(i=ci(e))&&i>0&&a.length>i){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,"function"==typeof console.warn?console.warn(s):console.log(s)}}else a=o[t]=n,++e._eventsCount;return e}function gi(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function _i(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function mi(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}function yi(){this.head=null,this.tail=null,this.length=0}zr=null,si.prototype=Object.create(null),ui.EventEmitter=ui,ui.usingDomains=!1,ui.prototype.domain=void 0,ui.prototype._events=void 0,ui.prototype._maxListeners=void 0,ui.defaultMaxListeners=10,ui.init=function(){this.domain=null,ui.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new si,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ui.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},ui.prototype.getMaxListeners=function(){return ci(this)},ui.prototype.emit=function(e){var t,n,r,i,o,a,s,u="error"===e;if(a=this._events)u=u&&null==a.error;else if(!u)return!1;if(s=this.domain,u){if(t=arguments[1],!s){if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=a[e]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:li(n,l,this);break;case 2:fi(n,l,this,arguments[1]);break;case 3:hi(n,l,this,arguments[1],arguments[2]);break;case 4:di(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];pi(n,l,this,i)}return!0},ui.prototype.addListener=function(e,t){return vi(this,e,t,!1)},ui.prototype.on=ui.prototype.addListener,ui.prototype.prependListener=function(e,t){return vi(this,e,t,!0)},ui.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,gi(this,e,t)),this},ui.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,gi(this,e,t)),this},ui.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new si:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new si,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,a||t)}return this},ui.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new si,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new si:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),o=0;o<i.length;++o)"removeListener"!==(r=i[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new si,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},ui.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[]},ui.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):_i.call(e,t)},ui.prototype.listenerCount=_i,ui.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]},yi.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},yi.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},yi.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},yi.prototype.clear=function(){this.head=this.tail=null,this.length=0},yi.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},yi.prototype.concat=function(e){if(0===this.length)return oe.alloc(0);if(1===this.length)return this.head.data;for(var t=oe.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var wi=oe.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function bi(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!wi(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Ei;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Si;break;default:return void(this.write=ki)}this.charBuffer=new oe(6),this.charReceived=0,this.charLength=0}function ki(e){return e.toString(this.encoding)}function Ei(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Si(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}bi.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var i;r=(t+=e.toString(this.encoding,0,r)).length-1;if((i=t.charCodeAt(r))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t},bi.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},bi.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t},Ti.ReadableState=Ci;var Ai=Je("stream");function Ci(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof to&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new yi,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new bi(e.encoding),this.encoding=e.encoding)}function Ti(e){if(!(this instanceof Ti))return new Ti(e);this._readableState=new Ci(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),ui.call(this)}function xi(e,t,n,r,i){var o=function(e,t){var n=null;oe.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,Ii(e)}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&Ii(e))),function(e,t){t.readingMore||(t.readingMore=!0,_(ji,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}We(Ti,ui),Ti.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=oe.from(e,t),t=""),xi(this,n,e,t,!1)},Ti.prototype.unshift=function(e){return xi(this,this._readableState,e,"",!0)},Ti.prototype.isPaused=function(){return!1===this._readableState.flowing},Ti.prototype.setEncoding=function(e){return this._readableState.decoder=new bi(e),this._readableState.encoding=e,this};var Ri=8388608;function Oi(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=Ri?e=Ri:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Ii(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Ai("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?_(Ni,e):Ni(e))}function Ni(e){Ai("emit readable"),e.emit("readable"),Bi(e)}function ji(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Ai("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function Li(e){Ai("readable nexttick read 0"),e.read(0)}function Pi(e,t){t.reading||(Ai("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Bi(e),t.flowing&&!t.reading&&e.read(0)}function Bi(e){var t=e._readableState;for(Ai("flow",t.flowing);t.flowing&&null!==e.read(););}function Mi(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=oe.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function zi(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,_(Ui,t,e))}function Ui(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Di(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Fi(){}function qi(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function Zi(e,t){Object.defineProperty(this,"buffer",{get:Ke((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof to&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?_(i,r):i(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,i);else{var o=Yi(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||Ki(e,n),r?_(Hi,e,n,o,i):Hi(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Vi(this)}function Wi(e){if(!(this instanceof Wi||this instanceof to))return new Wi(e);this._writableState=new Zi(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),ui.call(this)}function $i(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function Hi(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Ji(e,t)}function Ki(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0;n;)i[a]=n,n=n.next,a+=1;$i(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Vi(t)}else{for(;n;){var s=n.chunk,u=n.encoding,c=n.callback;if($i(e,t,!1,t.objectMode?1:s.length,s,u,c),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function Yi(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Gi(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Ji(e,t){var n=Yi(t);return n&&(0===t.pendingcb?(Gi(e,t),t.finished=!0,e.emit("finish")):Gi(e,t)),n}function Vi(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}Ti.prototype.read=function(e){Ai("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Ai("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?zi(this):Ii(this),null;if(0===(e=Oi(e,t))&&t.ended)return 0===t.length&&zi(this),null;var r,i=t.needReadable;return Ai("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&Ai("length less than watermark",i=!0),t.ended||t.reading?Ai("reading or ended",i=!1):i&&(Ai("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Oi(n,t))),null===(r=e>0?Mi(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&zi(this)),null!==r&&this.emit("data",r),r},Ti.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Ti.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,Ai("pipe count=%d opts=%j",r.pipesCount,t);var i=!t||!1!==t.end?a:c;function o(e){Ai("onunpipe"),e===n&&c()}function a(){Ai("onend"),e.end()}r.endEmitted?_(i):n.once("end",i),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;Ai("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Bi(e))}}(n);e.on("drain",s);var u=!1;function c(){Ai("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",h),e.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",c),n.removeListener("data",f),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function f(t){Ai("ondata"),l=!1,!1!==e.write(t)||l||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==Di(r.pipes,e))&&!u&&(Ai("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function h(t){Ai("onerror",t),v(),e.removeListener("error",h),0===function(e,t){return e.listeners(t).length}(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),v()}function p(){Ai("onfinish"),e.removeListener("close",d),v()}function v(){Ai("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",n),r.flowing||(Ai("pipe resume"),n.resume()),e},Ti.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=Di(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},Ti.prototype.on=function(e,t){var n=ui.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&Ii(this):_(Li,this))}return n},Ti.prototype.addListener=Ti.prototype.on,Ti.prototype.resume=function(){var e=this._readableState;return e.flowing||(Ai("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,_(Pi,e,t))}(this,e)),this},Ti.prototype.pause=function(){return Ai("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(Ai("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Ti.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(Ai("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){(Ai("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i)||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){Ai("wrapped _read",t),n&&(n=!1,e.resume())},r},Ti._fromList=Mi,Wi.WritableState=Zi,We(Wi,ui),Zi.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},Wi.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Wi.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),oe.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=Fi),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),_(t,n)}(this,n):function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):oe.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),_(r,o),i=!1),i}(this,r,e,n)&&(r.pendingcb++,i=function(e,t,n,r,i){n=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=oe.from(t,n));return t}(t,n,r),oe.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var a=t.length<t.highWaterMark;a||(t.needDrain=!0);if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new qi(n,r,i),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else $i(e,t,!1,o,n,r,i);return a}(this,r,e,t,n)),i},Wi.prototype.cork=function(){this._writableState.corked++},Wi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Ki(this,e))},Wi.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Wi.prototype._write=function(e,t,n){n(new Error("not implemented"))},Wi.prototype._writev=null,Wi.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,Ji(e,t),n&&(t.finished?_(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},We(to,Ti);for(var Xi=Object.keys(Wi.prototype),Qi=0;Qi<Xi.length;Qi++){var eo=Xi[Qi];to.prototype[eo]||(to.prototype[eo]=Wi.prototype[eo])}function to(e){if(!(this instanceof to))return new to(e);Ti.call(this,e),Wi.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",no)}function no(){this.allowHalfOpen||this._writableState.ended||_(ro,this)}function ro(e){e.end()}function io(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n);i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function oo(e){if(!(this instanceof oo))return new oo(e);to.call(this,e),this._transformState=new io(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){ao(t,e)})):ao(t)}))}function ao(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function so(e){if(!(this instanceof so))return new so(e);oo.call(this,e)}function uo(){ui.call(this)}We(oo,to),oo.prototype.push=function(e,t){return this._transformState.needTransform=!1,to.prototype.push.call(this,e,t)},oo.prototype._transform=function(e,t,n){throw new Error("Not implemented")},oo.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},oo.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},We(so,oo),so.prototype._transform=function(e,t,n){n(null,e)},We(uo,ui),uo.Readable=Ti,uo.Writable=Wi,uo.Duplex=to,uo.Transform=oo,uo.PassThrough=so,uo.Stream=uo,uo.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===ui.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",a),n.removeListener("close",s),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",u),e.on("error",u),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e};var co=3,lo=4;function fo(e,t,n){var r,i=this;if(Ti.call(i),i._mode=n,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",(function(){O.nextTick((function(){i.emit("close")}))})),"fetch"===n){i._fetchResponse=t,i.url=t.url,i.statusCode=t.status,i.statusMessage=t.statusText;for(var o,a,s=t.headers[Symbol.iterator]();o=(a=s.next()).value,!a.done;)i.headers[o[0].toLowerCase()]=o[1],i.rawHeaders.push(o[0],o[1]);var u=t.body.getReader();(r=function(){u.read().then((function(e){i._destroyed||(e.done?i.push(null):(i.push(new oe(e.value)),r()))}))})()}else{if(i._xhr=e,i._pos=0,i.url=e.responseURL,i.statusCode=e.status,i.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===i.headers[n]&&(i.headers[n]=[]),i.headers[n].push(t[2])):void 0!==i.headers[n]?i.headers[n]+=", "+t[2]:i.headers[n]=t[2],i.rawHeaders.push(t[1],t[2])}})),i._charset="x-user-defined",!ii){var c=i.rawHeaders["mime-type"];if(c){var l=c.match(/;\s*charset=([^;])(;|$)/);l&&(i._charset=l[1].toLowerCase())}i._charset||(i._charset="utf-8")}}}function ho(e){var t,n=this;Wi.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new oe(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!ii;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return Vr&&t?"fetch":ri?"moz-chunked-arraybuffer":ni?"ms-stream":ti&&e?"arraybuffer":oi&&e?"text:vbarray":"text"}(t,r),n.on("finish",(function(){n._onFinish()}))}We(fo,Ti),fo.prototype._read=function(){},fo.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text:vbarray":if(t.readyState!==lo)break;try{n=new o.VBArray(t.responseBody).toArray()}catch(e){}if(null!==n){e.push(new oe(n));break}case"text":try{n=t.responseText}catch(t){e._mode="text:vbarray";break}if(n.length>e._pos){var r=n.substr(e._pos);if("x-user-defined"===e._charset){for(var i=new oe(r.length),a=0;a<r.length;a++)i[a]=255&r.charCodeAt(a);e.push(i)}else e.push(r,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==lo||!t.response)break;n=t.response,e.push(new oe(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==co||!n)break;e.push(new oe(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==co)break;var s=new o.MSStreamReader;s.onprogress=function(){s.result.byteLength>e._pos&&(e.push(new oe(new Uint8Array(s.result.slice(e._pos)))),e._pos=s.result.byteLength)},s.onload=function(){e.push(null)},s.readAsArrayBuffer(n)}e._xhr.readyState===lo&&"ms-stream"!==e._mode&&e.push(null)},We(ho,Wi);var po=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];ho.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===po.indexOf(n)&&(this._headers[n]={name:e,value:t})},ho.prototype.getHeader=function(e){return this._headers[e.toLowerCase()].value},ho.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},ho.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t,n=e._opts,r=e._headers;if("POST"!==n.method&&"PUT"!==n.method&&"PATCH"!==n.method||(t=function(){if(void 0!==Mr)return Mr;try{new o.Blob([new ArrayBuffer(1)]),Mr=!0}catch(e){Mr=!1}return Mr}()?new o.Blob(e._body.map((function(e){return function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(qe(e)){for(var t=new Uint8Array(e.length),n=e.length,r=0;r<n;r++)t[r]=e[r];return t.buffer}throw new Error("Argument must be a Buffer")}(e)})),{type:(r["content-type"]||{}).value||""}):oe.concat(e._body).toString()),"fetch"===e._mode){var i=Object.keys(r).map((function(e){return[r[e].name,r[e].value]}));o.fetch(e._opts.url,{method:e._opts.method,headers:i,body:t,mode:"cors",credentials:n.withCredentials?"include":"same-origin"}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){e.emit("error",t)}))}else{var a=e._xhr=new o.XMLHttpRequest;try{a.open(e._opts.method,e._opts.url,!0)}catch(t){return void O.nextTick((function(){e.emit("error",t)}))}"responseType"in a&&(a.responseType=e._mode.split(":")[0]),"withCredentials"in a&&(a.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(r).forEach((function(e){a.setRequestHeader(r[e].name,r[e].value)})),e._response=null,a.onreadystatechange=function(){switch(a.readyState){case co:case lo:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(a.onprogress=function(){e._onXHRProgress()}),a.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{a.send(t)}catch(t){return void O.nextTick((function(){e.emit("error",t)}))}}}},ho.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},ho.prototype._connect=function(){var e=this;e._destroyed||(e._response=new fo(e._xhr,e._fetchResponse,e._mode),e.emit("response",e._response))},ho.prototype._write=function(e,t,n){this._body.push(e),n()},ho.prototype.abort=ho.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},ho.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),Wi.prototype.end.call(this,e,t,n)},ho.prototype.flushHeaders=function(){},ho.prototype.setTimeout=function(){},ho.prototype.setNoDelay=function(){},ho.prototype.setSocketKeepAlive=function(){};
|
|
17
17
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
18
|
-
var vo=2147483647,go=/[^\x20-\x7E]/,_o=/[\x2E\u3002\uFF0E\uFF61]/g,mo={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},yo=Math.floor,wo=String.fromCharCode;function bo(e){throw new RangeError(mo[e])}function ko(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function Eo(e,t,n){var r=0;for(e=n?yo(e/700):e>>1,e+=yo(e/t);e>455;r+=36)e=yo(e/35);return yo(r+36*e/(e+38))}function So(e){return function(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]);var i=function(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}((e=e.replace(_o,".")).split("."),t).join(".");return r+i}(e,(function(e){return go.test(e)?"xn--"+function(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,p,v,g=[];for(h=(e=function(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}(e)).length,t=128,n=0,o=72,a=0;a<h;++a)(f=e[a])<128&&g.push(wo(f));for(r=i=g.length,i&&g.push("-");r<h;){for(s=vo,a=0;a<h;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>yo((vo-n)/(d=r+1))&&bo("overflow"),n+=(s-t)*d,t=s,a=0;a<h;++a)if((f=e[a])<t&&++n>vo&&bo("overflow"),f==t){for(u=n,c=36;!(u<(l=c<=o?1:c>=o+26?26:c-o));c+=36)v=u-l,p=36-l,g.push(wo(ko(l+v%p,0))),u=yo(v/p);g.push(wo(ko(u,0))),o=Eo(n,d,r==i),n=0,++r}++n,++t}return g.join("")}(e):e}))}function Ao(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Co=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function To(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function xo(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var Ro=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t};function Oo(e,t,n,r){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var u=0;u<s;++u){var c,l,f,h,d=e[u].replace(o,"%20"),p=d.indexOf(n);p>=0?(c=d.substr(0,p),l=d.substr(p+1)):(c=d,l=""),f=decodeURIComponent(c),h=decodeURIComponent(l),Ao(i,f)?Co(i[f])?i[f].push(h):i[f]=[i[f],h]:i[f]=h}return i}var Io={parse:$o,resolve:Go,resolveObject:Jo,format:Ko,Url:No};function No(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var jo=/^([a-z0-9.+-]+:)/i,Lo=/:[0-9]*$/,Po=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Bo=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Mo=["'"].concat(Bo),zo=["%","/","?",";","#"].concat(Mo),Uo=["/","?","#"],Do=/^[+a-z0-9A-Z_-]{0,63}$/,Fo=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,qo={javascript:!0,"javascript:":!0},Zo={javascript:!0,"javascript:":!0},Wo={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function $o(e,t,n){if(e&&ht(e)&&e instanceof No)return e;var r=new No;return r.parse(e,t,n),r}function Ho(e,t,n,r){if(!ut(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),o=-1!==i&&i<t.indexOf("#")?"?":"#",a=t.split(o);a[0]=a[0].replace(/\\/g,"/");var s=t=a.join(o);if(s=s.trim(),!r&&1===t.split("#").length){var u=Po.exec(s);if(u)return e.path=s,e.href=s,e.pathname=u[1],u[2]?(e.search=u[2],e.query=n?Oo(e.search.substr(1)):e.search.substr(1)):n&&(e.search="",e.query={}),e}var c,l,f,h,d=jo.exec(s);if(d){var p=(d=d[0]).toLowerCase();e.protocol=p,s=s.substr(d.length)}if(r||d||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===s.substr(0,2);!v||d&&Zo[d]||(s=s.substr(2),e.slashes=!0)}if(!Zo[d]&&(v||d&&!Wo[d])){var g,_,m=-1;for(c=0;c<Uo.length;c++)-1!==(l=s.indexOf(Uo[c]))&&(-1===m||l<m)&&(m=l);for(-1!==(_=-1===m?s.lastIndexOf("@"):s.lastIndexOf("@",m))&&(g=s.slice(0,_),s=s.slice(_+1),e.auth=decodeURIComponent(g)),m=-1,c=0;c<zo.length;c++)-1!==(l=s.indexOf(zo[c]))&&(-1===m||l<m)&&(m=l);-1===m&&(m=s.length),e.host=s.slice(0,m),s=s.slice(m),Vo(e),e.hostname=e.hostname||"";var y="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!y){var w=e.hostname.split(/\./);for(c=0,f=w.length;c<f;c++){var b=w[c];if(b&&!b.match(Do)){for(var k="",E=0,S=b.length;E<S;E++)b.charCodeAt(E)>127?k+="x":k+=b[E];if(!k.match(Do)){var A=w.slice(0,c),C=w.slice(c+1),T=b.match(Fo);T&&(A.push(T[1]),C.unshift(T[2])),C.length&&(s="/"+C.join(".")+s),e.hostname=A.join(".");break}}}}e.hostname.length>255?e.hostname="":e.hostname=e.hostname.toLowerCase(),y||(e.hostname=So(e.hostname)),h=e.port?":"+e.port:"";var x=e.hostname||"";e.host=x+h,e.href+=e.host,y&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!qo[p])for(c=0,f=Mo.length;c<f;c++){var R=Mo[c];if(-1!==s.indexOf(R)){var O=encodeURIComponent(R);O===R&&(O=escape(R)),s=s.split(R).join(O)}}var I=s.indexOf("#");-1!==I&&(e.hash=s.substr(I),s=s.slice(0,I));var N=s.indexOf("?");if(-1!==N?(e.search=s.substr(N),e.query=s.substr(N+1),n&&(e.query=Oo(e.query)),s=s.slice(0,N)):n&&(e.search="",e.query={}),s&&(e.pathname=s),Wo[p]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){h=e.pathname||"";var j=e.search||"";e.path=h+j}return e.href=Yo(e),e}function Ko(e){return ut(e)&&(e=Ho({},e)),Yo(e)}function Yo(e){var t=e.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var n=e.protocol||"",r=e.pathname||"",i=e.hash||"",o=!1,a="";e.host?o=t+e.host:e.hostname&&(o=t+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(o+=":"+e.port)),e.query&&ht(e.query)&&Object.keys(e.query).length&&(a=function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?xo(Ro(e),(function(r){var i=encodeURIComponent(To(r))+n;return Co(e[r])?xo(e[r],(function(e){return i+encodeURIComponent(To(e))})).join(t):i+encodeURIComponent(To(e[r]))})).join(t):r?encodeURIComponent(To(r))+n+encodeURIComponent(To(e)):""}(e.query));var s=e.search||a&&"?"+a||"";return n&&":"!==n.substr(-1)&&(n+=":"),e.slashes||(!n||Wo[n])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),n+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+i}function Go(e,t){return $o(e,!1,!0).resolve(t)}function Jo(e,t){return e?$o(e,!1,!0).resolveObject(t):t}function Vo(e){var t=e.host,n=Lo.exec(t);n&&(":"!==(n=n[0])&&(e.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(e.hostname=t)}No.prototype.parse=function(e,t,n){return Ho(this,e,t,n)},No.prototype.format=function(){return Yo(this)},No.prototype.resolve=function(e){return this.resolveObject($o(e,!1,!0)).format()},No.prototype.resolveObject=function(e){if(ut(e)){var t=new No;t.parse(e,!1,!0),e=t}for(var n,r=new No,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(r[c]=e[c])}return Wo[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!Wo[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var h=l[f];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||Zo[e.protocol])r.pathname=e.pathname;else{for(n=(e.pathname||"").split("/");n.length&&!(e.host=n.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),r.pathname=n.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",p=r.search||"";r.path=d+p}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v,g=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),m=_||g||r.host&&e.pathname,y=m,w=r.pathname&&r.pathname.split("/")||[],b=r.protocol&&!Wo[r.protocol];if(n=e.pathname&&e.pathname.split("/")||[],b&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===n[0]?n[0]=e.host:n.unshift(e.host)),e.host=null),m=m&&(""===n[0]||""===w[0])),_)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=n;else if(n.length)w||(w=[]),w.pop(),w=w.concat(n),r.search=e.search,r.query=e.query;else if(!at(e.search))return b&&(r.hostname=r.host=w.shift(),(v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=v.shift(),r.host=r.hostname=v.shift())),r.search=e.search,r.query=e.query,ot(r.pathname)&&ot(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=w.slice(-1)[0],E=(r.host||e.host||w.length>1)&&("."===k||".."===k)||""===k,S=0,A=w.length;A>=0;A--)"."===(k=w[A])?w.splice(A,1):".."===k?(w.splice(A,1),S++):S&&(w.splice(A,1),S--);if(!m&&!y)for(;S--;S)w.unshift("..");!m||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),E&&"/"!==w.join("/").substr(-1)&&w.push("");var C=""===w[0]||w[0]&&"/"===w[0].charAt(0);return b&&(r.hostname=r.host=C?"":w.length?w.shift():"",(v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=v.shift(),r.host=r.hostname=v.shift())),(m=m||r.host&&w.length)&&!C&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),ot(r.pathname)&&ot(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},No.prototype.parseHost=function(){return Vo(this)};var Xo=Object.freeze({__proto__:null,parse:$o,resolve:Go,resolveObject:Jo,format:Ko,default:Io,Url:No});function Qo(e,t){"string"==typeof e&&(e=$o(e));var n=-1===o.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||n,i=e.hostname||e.host,a=e.port,s=e.path||"/";i&&-1!==i.indexOf(":")&&(i="["+i+"]"),e.url=(i?r+"//"+i:"")+(a?":"+a:"")+s,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new ho(e);return t&&u.on("response",t),u}function ea(e,t){var n=Qo(e,t);return n.end(),n}function ta(){}ta.defaultMaxSockets=4;var na=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],ra={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},ia={request:Qo,get:ea,Agent:ta,METHODS:na,STATUS_CODES:ra},oa=Object.freeze({__proto__:null,request:Qo,get:ea,Agent:ta,METHODS:na,STATUS_CODES:ra,default:ia});function aa(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}var sa,ua=Object.prototype.hasOwnProperty,ca=Object.keys||function(e){var t=[];for(var n in e)ua.call(e,n)&&t.push(n);return t},la=Array.prototype.slice;function fa(){return void 0!==sa?sa:sa="foo"===function(){}.name}function ha(e){return Object.prototype.toString.call(e)}function da(e){return!qe(e)&&("function"==typeof o.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function pa(e,t){e||wa(e,!0,t,"==",ba)}var va=/\s*function\s+([^\(\s]*)\s*/;function ga(e){if(vt(e)){if(fa())return e.name;var t=e.toString().match(va);return t&&t[1]}}function _a(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return ma(ya(e.actual),128)+" "+e.operator+" "+ma(ya(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||wa;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=ga(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}}function ma(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function ya(e){if(fa()||!vt(e))return Ve(e);var t=ga(e);return"[Function"+(t?": "+t:"")+"]"}function wa(e,t,n,r,i){throw new _a({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function ba(e,t){e||wa(e,!0,t,"==",ba)}function ka(e,t,n){e!=t&&wa(e,t,n,"==",ka)}function Ea(e,t,n){e==t&&wa(e,t,n,"!=",Ea)}function Sa(e,t,n){Ca(e,t,!1)||wa(e,t,n,"deepEqual",Sa)}function Aa(e,t,n){Ca(e,t,!0)||wa(e,t,n,"deepStrictEqual",Aa)}function Ca(e,t,n,r){if(e===t)return!0;if(qe(e)&&qe(t))return 0===aa(e,t);if(dt(e)&&dt(t))return e.getTime()===t.getTime();if(ft(e)&&ft(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(da(e)&&da(t)&&ha(e)===ha(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===aa(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(qe(e)!==qe(t))return!1;var i=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==i&&i===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(gt(e)||gt(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=Ta(e),o=Ta(t);if(i&&!o||!i&&o)return!1;if(i)return Ca(e=la.call(e),t=la.call(t),n);var a,s,u=ca(e),c=ca(t);if(u.length!==c.length)return!1;for(u.sort(),c.sort(),s=u.length-1;s>=0;s--)if(u[s]!==c[s])return!1;for(s=u.length-1;s>=0;s--)if(!Ca(e[a=u[s]],t[a],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function Ta(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function xa(e,t,n){Ca(e,t,!1)&&wa(e,t,n,"notDeepEqual",xa)}function Ra(e,t,n){Ca(e,t,!0)&&wa(e,t,n,"notDeepStrictEqual",Ra)}function Oa(e,t,n){e!==t&&wa(e,t,n,"===",Oa)}function Ia(e,t,n){e===t&&wa(e,t,n,"!==",Ia)}function Na(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function ja(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&wa(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!e&&i&&!n;if((!e&&pt(i)&&o&&Na(i,n)||a)&&wa(i,n,"Got unwanted exception"+r),e&&i&&n&&!Na(i,n)||!e&&i)throw i}function La(e,t,n){ja(!0,e,t,n)}function Pa(e,t,n){ja(!1,e,t,n)}function Ba(e){if(e)throw e}pa.AssertionError=_a,We(_a,Error),pa.fail=wa,pa.ok=ba,pa.equal=ka,pa.notEqual=Ea,pa.deepEqual=Sa,pa.deepStrictEqual=Aa,pa.notDeepEqual=xa,pa.notDeepStrictEqual=Ra,pa.strictEqual=Oa,pa.notStrictEqual=Ia,pa.throws=La,pa.doesNotThrow=Pa,pa.ifError=Ba;var Ma,za=Object.freeze({__proto__:null,default:pa,AssertionError:_a,fail:wa,ok:ba,assert:ba,equal:ka,notEqual:Ea,deepEqual:Sa,deepStrictEqual:Aa,notDeepEqual:xa,notDeepStrictEqual:Ra,strictEqual:Oa,notStrictEqual:Ia,throws:La,doesNotThrow:Pa,ifError:Ba}),Ua=function(){if(!Ma)try{Ma=cn("follow-redirects")}catch(e){Ma=function(){}}Ma.apply(null,arguments)},Da=r(Xo),Fa=r(oa),qa=r(za),Za=Da.URL,Wa=uo.Writable,$a=["abort","aborted","connect","error","socket","timeout"],Ha=Object.create(null);$a.forEach((function(e){Ha[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var Ka=ns("ERR_FR_REDIRECTION_FAILURE",""),Ya=ns("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Ga=ns("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ja=ns("ERR_STREAM_WRITE_AFTER_END","write after end");function Va(e,t){Wa.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){n._processResponse(e)},this._performRequest()}function Xa(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var i=r+":",o=n[i]=e[r],a=t[r]=Object.create(o);Object.defineProperties(a,{request:{value:function(e,r,o){if("string"==typeof e){var a=e;try{e=es(new Za(a))}catch(t){e=Da.parse(a)}}else Za&&e instanceof Za?e=es(e):(o=r,r=e,e={protocol:i});return"function"==typeof r&&(o=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,qa.equal(r.protocol,i,"protocol mismatch"),Ua("options",r),new Va(r,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=a.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function Qa(){}function es(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function ts(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return n}function ns(e,t){function n(e){Error.captureStackTrace(this,this.constructor),this.message=e||t}return n.prototype=new Error,n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n.prototype.code=e,n}function rs(e){for(var t=0;t<$a.length;t++)e.removeListener($a[t],Ha[$a[t]]);e.on("error",Qa),e.abort()}Va.prototype=Object.create(Wa.prototype),Va.prototype.abort=function(){rs(this._currentRequest),this.emit("abort")},Va.prototype.write=function(e,t,n){if(this._ending)throw new Ja;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new Ga),this.abort()):n&&n()},Va.prototype.end=function(e,t,n){if("function"==typeof e?(n=e,e=t=null):"function"==typeof t&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},Va.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},Va.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},Va.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){clearTimeout(this._timeout),t&&n.removeListener("timeout",t),this.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.once("response",o),this.once("error",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){Va.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(Va.prototype,e,{get:function(){return this._currentRequest[e]}})})),Va.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},Va.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var n=e.substr(0,e.length-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=Da.format(this._options),r._redirectable=this;for(var i=0;i<$a.length;i++)r.on($a[i],Ha[$a[i]]);if(this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;!function e(t){if(r===a._currentRequest)if(t)a.emit("error",t);else if(o<s.length){var n=s[o++];r.finished||r.write(n.data,n.encoding,e)}else a._ended&&r.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},Va.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n=e.headers.location;if(n&&!1!==this._options.followRedirects&&t>=300&&t<400){if(rs(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Ya);((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],ts(/^content-/i,this._options.headers));var r=ts(/^host$/i,this._options.headers)||Da.parse(this._currentUrl).hostname,i=Da.resolve(this._currentUrl,n);Ua("redirecting to",i),this._isRedirect=!0;var o=Da.parse(i);if(Object.assign(this._options,o),o.hostname!==r&&ts(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var a={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,a)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){var s=new Ka("Redirected request failed: "+e.message);s.cause=e,this.emit("error",s)}}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]};var is=Xa({http:Fa,https:Fa}),os=Xa;is.wrap=os;var as={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function ss(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function us(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]}var cs=Uint8Array,ls=Uint16Array,fs=Int32Array;function hs(e){for(var t=e.length;--t>=0;)e[t]=0}var ds=256,ps=286,vs=30,gs=15,_s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ms=[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],ys=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ws=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],bs=new Array(576);hs(bs);var ks=new Array(60);hs(ks);var Es=new Array(512);hs(Es);var Ss=new Array(256);hs(Ss);var As=new Array(29);hs(As);var Cs,Ts,xs,Rs=new Array(vs);function Os(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function Is(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Ns(e){return e<256?Es[e]:Es[256+(e>>>7)]}function js(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Ls(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,js(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Ps(e,t,n){Ls(e,n[2*t],n[2*t+1])}function Bs(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function Ms(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=gs;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=Bs(o[s]++,s))}}function zs(e){var t;for(t=0;t<ps;t++)e.dyn_ltree[2*t]=0;for(t=0;t<vs;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Us(e){e.bi_valid>8?js(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Ds(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function Fs(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&Ds(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Ds(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function qs(e,t,n){var r,i,o,a,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===r?Ps(e,i,t):(Ps(e,(o=Ss[i])+ds+1,t),0!==(a=_s[o])&&Ls(e,i-=As[o],a),Ps(e,o=Ns(--r),n),0!==(a=ms[o])&&Ls(e,r-=Rs[o],a))}while(s<e.last_lit);Ps(e,256,t)}function Zs(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;n>=1;n--)Fs(e,o,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Fs(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,Fs(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,v=0;for(o=0;o<=gs;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=u[2*u[2*(r=e.heap[n])+1]+1]+1)>p&&(o=p,v++),u[2*r+1]=o,r>c||(e.bl_count[o]++,a=0,r>=d&&(a=h[r-d]),s=u[2*r],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(l[2*r+1]+a)));if(0!==v){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,v-=2}while(v>0);for(o=p;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(e,t),Ms(o,c,e.bl_count)}function Ws(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4))}function $s(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<c)do{Ps(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(Ps(e,i,e.bl_tree),s--),Ps(e,16,e.bl_tree),Ls(e,s-3,2)):s<=10?(Ps(e,17,e.bl_tree),Ls(e,s-3,3)):(Ps(e,18,e.bl_tree),Ls(e,s-11,7));s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4)}}hs(Rs);var Hs=!1;function Ks(e){Hs||(!function(){var e,t,n,r,i,o=new Array(16);for(n=0,r=0;r<28;r++)for(As[r]=n,e=0;e<1<<_s[r];e++)Ss[n++]=r;for(Ss[n-1]=r,i=0,r=0;r<16;r++)for(Rs[r]=i,e=0;e<1<<ms[r];e++)Es[i++]=r;for(i>>=7;r<vs;r++)for(Rs[r]=i<<7,e=0;e<1<<ms[r]-7;e++)Es[256+i++]=r;for(t=0;t<=gs;t++)o[t]=0;for(e=0;e<=143;)bs[2*e+1]=8,e++,o[8]++;for(;e<=255;)bs[2*e+1]=9,e++,o[9]++;for(;e<=279;)bs[2*e+1]=7,e++,o[7]++;for(;e<=287;)bs[2*e+1]=8,e++,o[8]++;for(Ms(bs,287,o),e=0;e<vs;e++)ks[2*e+1]=5,ks[2*e]=Bs(e,5);Cs=new Os(bs,_s,257,ps,gs),Ts=new Os(ks,ms,0,vs,gs),xs=new Os(new Array(0),ys,0,19,7)}(),Hs=!0),e.l_desc=new Is(e.dyn_ltree,Cs),e.d_desc=new Is(e.dyn_dtree,Ts),e.bl_desc=new Is(e.bl_tree,xs),e.bi_buf=0,e.bi_valid=0,zs(e)}function Ys(e,t,n,r){Ls(e,0+(r?1:0),3),function(e,t,n,r){Us(e),r&&(js(e,n),js(e,~n)),us(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}function Gs(e){Ls(e,2,3),Ps(e,256,bs),function(e){16===e.bi_valid?(js(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}function Js(e,t,n,r){var i,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<ds;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),Zs(e,e.l_desc),Zs(e,e.d_desc),a=function(e){var t;for(Ws(e,e.dyn_ltree,e.l_desc.max_code),Ws(e,e.dyn_dtree,e.d_desc.max_code),Zs(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*ws[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?Ys(e,t,n,r):4===e.strategy||o===i?(Ls(e,2+(r?1:0),3),qs(e,bs,ks)):(Ls(e,4+(r?1:0),3),function(e,t,n,r){var i;for(Ls(e,t-257,5),Ls(e,n-1,5),Ls(e,r-4,4),i=0;i<r;i++)Ls(e,e.bl_tree[2*ws[i]+1],3);$s(e,e.dyn_ltree,t-1),$s(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),qs(e,e.dyn_ltree,e.dyn_dtree)),zs(e),r&&Us(e)}function Vs(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Ss[n]+ds+1)]++,e.dyn_dtree[2*Ns(t)]++),e.last_lit===e.lit_bufsize-1}function Xs(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}var Qs=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function eu(e,t,n,r){var i=Qs,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}var tu,nu=-2,ru=258,iu=262,ou=103,au=113,su=666;function uu(e,t){return e.msg=as[t],t}function cu(e){return(e<<1)-(e>4?9:0)}function lu(e){for(var t=e.length;--t>=0;)e[t]=0}function fu(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(us(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function hu(e,t){Js(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,fu(e.strm)}function du(e,t){e.pending_buf[e.pending++]=t}function pu(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function vu(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-iu?e.strstart-(e.w_size-iu):0,c=e.window,l=e.w_mask,f=e.prev,h=e.strstart+ru,d=c[o+a-1],p=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===p&&c[n+a-1]===d&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<h);if(r=ru-(h-o),o=h-ru,r>a){if(e.match_start=t,a=r,r>=s)break;d=c[o+a-1],p=c[o+a]}}}while((t=f[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function gu(e){var t,n,r,i,o,a,s,u,c,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-iu)){us(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=f?r-f:0}while(--n);t=n=f;do{r=e.prev[--t],e.prev[t]=r>=f?r-f:0}while(--n);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,s=e.window,u=e.strstart+e.lookahead,c=i,l=void 0,(l=a.avail_in)>c&&(l=c),n=0===l?0:(a.avail_in-=l,us(s,a.input,a.next_in,l,u),1===a.state.wrap?a.adler=Xs(a.adler,s,l,u):2===a.state.wrap&&(a.adler=eu(a.adler,s,l,u)),a.next_in+=l,a.total_in+=l,l),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+3-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<iu&&0!==e.strm.avail_in)}function _u(e,t){for(var n,r;;){if(e.lookahead<iu){if(gu(e),e.lookahead<iu&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-iu&&(e.match_length=vu(e,n)),e.match_length>=3)if(r=Vs(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=Vs(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(hu(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(hu(e,!1),0===e.strm.avail_out)?1:2}function mu(e,t){for(var n,r,i;;){if(e.lookahead<iu){if(gu(e),e.lookahead<iu&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-iu&&(e.match_length=vu(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=Vs(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(hu(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=Vs(e,0,e.window[e.strstart-1]))&&hu(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Vs(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(hu(e,!1),0===e.strm.avail_out)?1:2}function yu(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function wu(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ls(1146),this.dyn_dtree=new ls(122),this.bl_tree=new ls(78),lu(this.dyn_ltree),lu(this.dyn_dtree),lu(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ls(16),this.heap=new ls(573),lu(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ls(573),lu(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 bu(e){var t=function(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:au,e.adler=2===t.wrap?0:1,t.last_flush=0,Ks(t),0):uu(e,nu)}(e);return 0===t&&function(e){e.window_size=2*e.w_size,lu(e.head),e.max_lazy_match=tu[e.level].max_lazy,e.good_match=tu[e.level].good_length,e.nice_match=tu[e.level].nice_length,e.max_chain_length=tu[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function ku(e,t){var n,r,i,o;if(!e||!e.state||t>5||t<0)return e?uu(e,nu):nu;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||r.status===su&&4!==t)return uu(e,0===e.avail_out?-5:nu);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,du(r,31),du(r,139),du(r,8),r.gzhead?(du(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),du(r,255&r.gzhead.time),du(r,r.gzhead.time>>8&255),du(r,r.gzhead.time>>16&255),du(r,r.gzhead.time>>24&255),du(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),du(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(du(r,255&r.gzhead.extra.length),du(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=eu(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(du(r,0),du(r,0),du(r,0),du(r,0),du(r,0),du(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),du(r,3),r.status=au);else{var a=8+(r.w_bits-8<<4)<<8;a|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(a|=32),a+=31-a%31,r.status=au,pu(r,a),0!==r.strstart&&(pu(r,e.adler>>>16),pu(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),fu(e),i=r.pending,r.pending!==r.pending_buf_size));)du(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),fu(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,du(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),fu(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,du(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.status=ou)}else r.status=ou;if(r.status===ou&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&fu(e),r.pending+2<=r.pending_buf_size&&(du(r,255&e.adler),du(r,e.adler>>8&255),e.adler=0,r.status=au)):r.status=au),0!==r.pending){if(fu(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&cu(t)<=cu(n)&&4!==t)return uu(e,-5);if(r.status===su&&0!==e.avail_in)return uu(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&r.status!==su){var s=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(gu(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=Vs(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(hu(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(hu(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=ru){if(gu(e),e.lookahead<=ru&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+ru;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=ru-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=Vs(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Vs(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(hu(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(hu(e,!1),0===e.strm.avail_out)?1:2}(r,t):tu[r.level].func(r,t);if(3!==s&&4!==s||(r.status=su),1===s||3===s)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===s&&(1===t?Gs(r):5!==t&&(Ys(r,0,0,!1),3===t&&(lu(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),fu(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(du(r,255&e.adler),du(r,e.adler>>8&255),du(r,e.adler>>16&255),du(r,e.adler>>24&255),du(r,255&e.total_in),du(r,e.total_in>>8&255),du(r,e.total_in>>16&255),du(r,e.total_in>>24&255)):(pu(r,e.adler>>>16),pu(r,65535&e.adler)),fu(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)}tu=[new yu(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(gu(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,hu(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-iu&&(hu(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(hu(e,!1),e.strm.avail_out),1)})),new yu(4,4,8,4,_u),new yu(4,5,16,8,_u),new yu(4,6,32,32,_u),new yu(4,4,16,16,mu),new yu(8,16,32,32,mu),new yu(8,16,128,128,mu),new yu(8,32,128,256,mu),new yu(32,128,258,1024,mu),new yu(32,258,258,4096,mu)];function Eu(e,t){var n,r,i,o,a,s,u,c,l,f,h,d,p,v,g,_,m,y,w,b,k,E,S,A,C;n=e.state,r=e.next_in,A=e.input,i=r+(e.avail_in-5),o=e.next_out,C=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=n.dmax,c=n.wsize,l=n.whave,f=n.wnext,h=n.window,d=n.hold,p=n.bits,v=n.lencode,g=n.distcode,_=(1<<n.lenbits)-1,m=(1<<n.distbits)-1;e:do{p<15&&(d+=A[r++]<<p,p+=8,d+=A[r++]<<p,p+=8),y=v[d&_];t:for(;;){if(d>>>=w=y>>>24,p-=w,0===(w=y>>>16&255))C[o++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=v[(65535&y)+(d&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&y,(w&=15)&&(p<w&&(d+=A[r++]<<p,p+=8),b+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=A[r++]<<p,p+=8,d+=A[r++]<<p,p+=8),y=g[d&m];n:for(;;){if(d>>>=w=y>>>24,p-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(d&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&y,p<(w&=15)&&(d+=A[r++]<<p,(p+=8)<w&&(d+=A[r++]<<p,p+=8)),(k+=d&(1<<w)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>l&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,S=h,0===f){if(E+=c-w,w<b){b-=w;do{C[o++]=h[E++]}while(--w);E=o-k,S=C}}else if(f<w){if(E+=c+f-w,(w-=f)<b){b-=w;do{C[o++]=h[E++]}while(--w);if(E=0,f<b){b-=w=f;do{C[o++]=h[E++]}while(--w);E=o-k,S=C}}}else if(E+=f-w,w<b){b-=w;do{C[o++]=h[E++]}while(--w);E=o-k,S=C}for(;b>2;)C[o++]=S[E++],C[o++]=S[E++],C[o++]=S[E++],b-=3;b&&(C[o++]=S[E++],b>1&&(C[o++]=S[E++]))}else{E=o-k;do{C[o++]=C[E++],C[o++]=C[E++],C[o++]=C[E++],b-=3}while(b>2);b&&(C[o++]=C[E++],b>1&&(C[o++]=C[E++]))}break}}break}}while(r<i&&o<s);r-=b=p>>3,d&=(1<<(p-=b<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=d,n.bits=p}var Su=15,Au=[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],Cu=[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],Tu=[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],xu=[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];function Ru(e,t,n,r,i,o,a,s){var u,c,l,f,h,d,p,v,g,_=s.bits,m=0,y=0,w=0,b=0,k=0,E=0,S=0,A=0,C=0,T=0,x=null,R=0,O=new ls(16),I=new ls(16),N=null,j=0;for(m=0;m<=Su;m++)O[m]=0;for(y=0;y<r;y++)O[t[n+y]]++;for(k=_,b=Su;b>=1&&0===O[b];b--);if(k>b&&(k=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(w=1;w<b&&0===O[w];w++);for(k<w&&(k=w),A=1,m=1;m<=Su;m++)if(A<<=1,(A-=O[m])<0)return-1;if(A>0&&(0===e||1!==b))return-1;for(I[1]=0,m=1;m<Su;m++)I[m+1]=I[m]+O[m];for(y=0;y<r;y++)0!==t[n+y]&&(a[I[t[n+y]]++]=y);if(0===e?(x=N=a,d=19):1===e?(x=Au,R-=257,N=Cu,j-=257,d=256):(x=Tu,N=xu,d=-1),T=0,y=0,m=w,h=o,E=k,S=0,l=-1,f=(C=1<<k)-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){p=m-S,a[y]<d?(v=0,g=a[y]):a[y]>d?(v=N[j+a[y]],g=x[R+a[y]]):(v=96,g=0),u=1<<m-S,w=c=1<<E;do{i[h+(T>>S)+(c-=u)]=p<<24|v<<16|g|0}while(0!==c);for(u=1<<m-1;T&u;)u>>=1;if(0!==u?(T&=u-1,T+=u):T=0,y++,0==--O[m]){if(m===b)break;m=t[n+a[y]]}if(m>k&&(T&f)!==l){for(0===S&&(S=k),h+=w,A=1<<(E=m-S);E+S<b&&!((A-=O[E+S])<=0);)E++,A<<=1;if(C+=1<<E,1===e&&C>852||2===e&&C>592)return 1;i[l=T&f]=k<<24|E<<16|h-o|0}}return 0!==T&&(i[h+T]=m-S<<24|64<<16|0),s.bits=k,0}var Ou=-2,Iu=12,Nu=30;function ju(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function Lu(){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 ls(320),this.work=new ls(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Pu(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,function(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new fs(852),t.distcode=t.distdyn=new fs(592),t.sane=1,t.back=-1,0):Ou}(e)):Ou}function Bu(e,t){var n,r;return e?(r=new Lu,e.state=r,r.window=null,0!==(n=function(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ou:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Pu(e))):Ou}(e,t))&&(e.state=null),n):Ou}var Mu,zu,Uu=!0;function Du(e){if(Uu){var t;for(Mu=new fs(512),zu=new fs(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Ru(1,e.lens,0,288,Mu,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ru(2,e.lens,0,32,zu,0,e.work,{bits:5}),Uu=!1}e.lencode=Mu,e.lenbits=9,e.distcode=zu,e.distbits=5}function Fu(e,t){var n,r,i,o,a,s,u,c,l,f,h,d,p,v,g,_,m,y,w,b,k,E,S,A,C=0,T=new cs(4),x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Ou;(n=e.state).mode===Iu&&(n.mode=13),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,c=n.hold,l=n.bits,f=s,h=u,E=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(2&n.wrap&&35615===c){n.check=0,T[0]=255&c,T[1]=c>>>8&255,n.check=eu(n.check,T,2,0),c=0,l=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=Nu;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=Nu;break}if(l-=4,k=8+(15&(c>>>=4)),0===n.wbits)n.wbits=k;else if(k>n.wbits){e.msg="invalid window size",n.mode=Nu;break}n.dmax=1<<k,e.adler=n.check=1,n.mode=512&c?10:Iu,c=0,l=0;break;case 2:for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(n.flags=c,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=Nu;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Nu;break}n.head&&(n.head.text=c>>8&1),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,n.check=eu(n.check,T,2,0)),c=0,l=0,n.mode=3;case 3:for(;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.head&&(n.head.time=c),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,n.check=eu(n.check,T,4,0)),c=0,l=0,n.mode=4;case 4:for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.head&&(n.head.xflags=255&c,n.head.os=c>>8),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,n.check=eu(n.check,T,2,0)),c=0,l=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.length=c,n.head&&(n.head.extra_len=c),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,n.check=eu(n.check,T,2,0)),c=0,l=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((d=n.length)>s&&(d=s),d&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),us(n.head.extra,r,o,d,k)),512&n.flags&&(n.check=eu(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;d=0;do{k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k))}while(k&&d<s);if(512&n.flags&&(n.check=eu(n.check,r,d,o)),s-=d,o+=d,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;d=0;do{k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.comment+=String.fromCharCode(k))}while(k&&d<s);if(512&n.flags&&(n.check=eu(n.check,r,d,o)),s-=d,o+=d,k)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(c!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Nu;break}c=0,l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Iu;break;case 10:for(;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}e.adler=n.check=ju(c),c=0,l=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,2;e.adler=n.check=1,n.mode=Iu;case Iu:if(5===t||6===t)break e;case 13:if(n.last){c>>>=7&l,l-=7&l,n.mode=27;break}for(;l<3;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}switch(n.last=1&c,l-=1,3&(c>>>=1)){case 0:n.mode=14;break;case 1:if(Du(n),n.mode=20,6===t){c>>>=2,l-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=Nu}c>>>=2,l-=2;break;case 14:for(c>>>=7&l,l-=7&l;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Nu;break}if(n.length=65535&c,c=0,l=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(d=n.length){if(d>s&&(d=s),d>u&&(d=u),0===d)break e;us(i,r,o,d,a),s-=d,o+=d,u-=d,a+=d,n.length-=d;break}n.mode=Iu;break;case 17:for(;l<14;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(n.nlen=257+(31&c),c>>>=5,l-=5,n.ndist=1+(31&c),c>>>=5,l-=5,n.ncode=4+(15&c),c>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Nu;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;l<3;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.lens[x[n.have++]]=7&c,c>>>=3,l-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,S={bits:n.lenbits},E=Ru(0,n.lens,0,19,n.lencode,0,n.work,S),n.lenbits=S.bits,E){e.msg="invalid code lengths set",n.mode=Nu;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;_=(C=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&C,!((g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(m<16)c>>>=g,l-=g,n.lens[n.have++]=m;else{if(16===m){for(A=g+2;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(c>>>=g,l-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=Nu;break}k=n.lens[n.have-1],d=3+(3&c),c>>>=2,l-=2}else if(17===m){for(A=g+3;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}l-=g,k=0,d=3+(7&(c>>>=g)),c>>>=3,l-=3}else{for(A=g+7;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}l-=g,k=0,d=11+(127&(c>>>=g)),c>>>=7,l-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Nu;break}for(;d--;)n.lens[n.have++]=k}}if(n.mode===Nu)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Nu;break}if(n.lenbits=9,S={bits:n.lenbits},E=Ru(1,n.lens,0,n.nlen,n.lencode,0,n.work,S),n.lenbits=S.bits,E){e.msg="invalid literal/lengths set",n.mode=Nu;break}if(n.distbits=6,n.distcode=n.distdyn,S={bits:n.distbits},E=Ru(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S),n.distbits=S.bits,E){e.msg="invalid distances set",n.mode=Nu;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(s>=6&&u>=258){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,Eu(e,h),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,c=n.hold,l=n.bits,n.mode===Iu&&(n.back=-1);break}for(n.back=0;_=(C=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&C,!((g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(_&&0==(240&_)){for(y=g,w=_,b=m;_=(C=n.lencode[b+((c&(1<<y+w)-1)>>y)])>>>16&255,m=65535&C,!(y+(g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}c>>>=y,l-=y,n.back+=y}if(c>>>=g,l-=g,n.back+=g,n.length=m,0===_){n.mode=26;break}if(32&_){n.back=-1,n.mode=Iu;break}if(64&_){e.msg="invalid literal/length code",n.mode=Nu;break}n.extra=15&_,n.mode=22;case 22:if(n.extra){for(A=n.extra;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;_=(C=n.distcode[c&(1<<n.distbits)-1])>>>16&255,m=65535&C,!((g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(0==(240&_)){for(y=g,w=_,b=m;_=(C=n.distcode[b+((c&(1<<y+w)-1)>>y)])>>>16&255,m=65535&C,!(y+(g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}c>>>=y,l-=y,n.back+=y}if(c>>>=g,l-=g,n.back+=g,64&_){e.msg="invalid distance code",n.mode=Nu;break}n.offset=m,n.extra=15&_,n.mode=24;case 24:if(n.extra){for(A=n.extra;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Nu;break}n.mode=25;case 25:if(0===u)break e;if(d=h-u,n.offset>d){if((d=n.offset-d)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Nu;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),v=n.window}else v=i,p=a-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do{i[a++]=v[p++]}while(--d);0===n.length&&(n.mode=21);break;case 26:if(0===u)break e;i[a++]=n.length,u--,n.mode=21;break;case 27:if(n.wrap){for(;l<32;){if(0===s)break e;s--,c|=r[o++]<<l,l+=8}if(h-=u,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?eu(n.check,i,h,a-h):Xs(n.check,i,h,a-h)),h=u,(n.flags?c:ju(c))!==n.check){e.msg="incorrect data check",n.mode=Nu;break}c=0,l=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(c!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Nu;break}c=0,l=0}n.mode=29;case 29:E=1;break e;case Nu:E=-3;break e;case 31:return-4;case 32:default:return Ou}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,(n.wsize||h!==e.avail_out&&n.mode<Nu&&(n.mode<27||4!==t))&&function(e,t,n,r){var i,o=e.state;null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new cs(o.wsize)),r>=o.wsize?(us(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),us(o.window,t,n-r,i,o.wnext),(r-=i)?(us(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i)))}(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?eu(n.check,i,h,e.next_out-h):Xs(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Iu?128:0)+(20===n.mode||15===n.mode?256:0),(0===f&&0===h||4===t)&&0===E&&(E=-5),E}var qu;function Zu(e){if(e<1||e>7)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function Wu(e,t){for(var n=0;n<e.length;n++)this[t+n]=e[n]}Zu.prototype.init=function(e,t,n,r,i){var o;switch(this.windowBits=e,this.level=t,this.memLevel=n,this.strategy=r,3!==this.mode&&4!==this.mode||(this.windowBits+=16),7===this.mode&&(this.windowBits+=32),5!==this.mode&&6!==this.mode||(this.windowBits=-this.windowBits),this.strm=new ss,this.mode){case 1:case 3:case 5:o=function(e,t,n,r,i,o){if(!e)return nu;var a=1;if(-1===t&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return uu(e,nu);8===r&&(r=9);var s=new wu;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new cs(2*s.w_size),s.head=new ls(s.hash_size),s.prev=new ls(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new cs(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=o,s.method=n,bu(e)}(this.strm,this.level,8,this.windowBits,this.memLevel,this.strategy);break;case 2:case 4:case 6:case 7:o=Bu(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}0===o?(this.write_in_progress=!1,this.init_done=!0):this._error(o)},Zu.prototype.params=function(){throw new Error("deflateParams Not supported")},Zu.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(0===this.mode)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},Zu.prototype.write=function(e,t,n,r,i,o,a){this._writeCheck(),this.write_in_progress=!0;var s=this;return O.nextTick((function(){s.write_in_progress=!1;var u=s._write(e,t,n,r,i,o,a);s.callback(u[0],u[1]),s.pending_close&&s.close()})),this},Zu.prototype.writeSync=function(e,t,n,r,i,o,a){return this._writeCheck(),this._write(e,t,n,r,i,o,a)},Zu.prototype._write=function(e,t,n,r,i,o,a){if(this.write_in_progress=!0,0!==e&&1!==e&&2!==e&&3!==e&&4!==e&&5!==e)throw new Error("Invalid flush value");null==t&&(t=new oe(0),r=0,n=0),i._set?i.set=i._set:i.set=Wu;var s,u=this.strm;switch(u.avail_in=r,u.input=t,u.next_in=n,u.avail_out=a,u.output=i,u.next_out=o,this.mode){case 1:case 3:case 5:s=ku(u,e);break;case 7:case 2:case 4:case 6:s=Fu(u,e);break;default:throw new Error("Unknown mode "+this.mode)}return 1!==s&&0!==s&&this._error(s),this.write_in_progress=!1,[u.avail_in,u.avail_out]},Zu.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,1===this.mode||3===this.mode||5===this.mode?function(e){var t;e&&e.state&&(42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==ou&&t!==au&&t!==su?uu(e,nu):(e.state=null,t===au&&uu(e,-3)))}(this.strm):function(e){if(!e||!e.state)return Ou;var t=e.state;t.window&&(t.window=null),e.state=null}(this.strm),this.mode=0)},Zu.prototype.reset=function(){switch(this.mode){case 1:case 5:qu=bu(this.strm);break;case 2:case 6:qu=Pu(this.strm)}0!==qu&&this._error(qu)},Zu.prototype._error=function(e){this.onerror(as[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()};var $u=Object.freeze({__proto__:null,NONE:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,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,Zlib:Zu});var Hu={};Object.keys($u).forEach((function(e){Hu[e]=$u[e]})),Hu.Z_MIN_WINDOWBITS=8,Hu.Z_MAX_WINDOWBITS=15,Hu.Z_DEFAULT_WINDOWBITS=15,Hu.Z_MIN_CHUNK=64,Hu.Z_MAX_CHUNK=1/0,Hu.Z_DEFAULT_CHUNK=16384,Hu.Z_MIN_MEMLEVEL=1,Hu.Z_MAX_MEMLEVEL=9,Hu.Z_DEFAULT_MEMLEVEL=8,Hu.Z_MIN_LEVEL=-1,Hu.Z_MAX_LEVEL=9,Hu.Z_DEFAULT_LEVEL=Hu.Z_DEFAULT_COMPRESSION;var Ku={Z_OK:Hu.Z_OK,Z_STREAM_END:Hu.Z_STREAM_END,Z_NEED_DICT:Hu.Z_NEED_DICT,Z_ERRNO:Hu.Z_ERRNO,Z_STREAM_ERROR:Hu.Z_STREAM_ERROR,Z_DATA_ERROR:Hu.Z_DATA_ERROR,Z_MEM_ERROR:Hu.Z_MEM_ERROR,Z_BUF_ERROR:Hu.Z_BUF_ERROR,Z_VERSION_ERROR:Hu.Z_VERSION_ERROR};function Yu(e){return new _c(e)}function Gu(e){return new mc(e)}function Ju(e){return new bc(e)}function Vu(e){return new kc(e)}function Xu(e){return new yc(e)}function Qu(e){return new wc(e)}function ec(e){return new Ec(e)}function tc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new _c(t),e,n)}function nc(e,t){return gc(new _c(t),e)}function rc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new yc(t),e,n)}function ic(e,t){return gc(new yc(t),e)}function oc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new bc(t),e,n)}function ac(e,t){return gc(new bc(t),e)}function sc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new Ec(t),e,n)}function uc(e,t){return gc(new Ec(t),e)}function cc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new mc(t),e,n)}function lc(e,t){return gc(new mc(t),e)}function fc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new wc(t),e,n)}function hc(e,t){return gc(new wc(t),e)}function dc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new kc(t),e,n)}function pc(e,t){return gc(new kc(t),e)}function vc(e,t,n){var r=[],i=0;function o(){for(var t;null!==(t=e.read());)r.push(t),i+=t.length;e.once("readable",o)}function a(){var t=oe.concat(r,i);r=[],n(null,t),e.close()}e.on("error",(function(t){e.removeListener("end",a),e.removeListener("readable",o),n(t)})),e.on("end",a),e.end(t),o()}function gc(e,t){if("string"==typeof t&&(t=new oe(t)),!oe.isBuffer(t))throw new TypeError("Not a string or buffer");var n=Hu.Z_FINISH;return e._processChunk(t,n)}function _c(e){if(!(this instanceof _c))return new _c(e);Sc.call(this,e,Hu.DEFLATE)}function mc(e){if(!(this instanceof mc))return new mc(e);Sc.call(this,e,Hu.INFLATE)}function yc(e){if(!(this instanceof yc))return new yc(e);Sc.call(this,e,Hu.GZIP)}function wc(e){if(!(this instanceof wc))return new wc(e);Sc.call(this,e,Hu.GUNZIP)}function bc(e){if(!(this instanceof bc))return new bc(e);Sc.call(this,e,Hu.DEFLATERAW)}function kc(e){if(!(this instanceof kc))return new kc(e);Sc.call(this,e,Hu.INFLATERAW)}function Ec(e){if(!(this instanceof Ec))return new Ec(e);Sc.call(this,e,Hu.UNZIP)}function Sc(e,t){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||Hu.Z_DEFAULT_CHUNK,oo.call(this,e),e.flush&&e.flush!==Hu.Z_NO_FLUSH&&e.flush!==Hu.Z_PARTIAL_FLUSH&&e.flush!==Hu.Z_SYNC_FLUSH&&e.flush!==Hu.Z_FULL_FLUSH&&e.flush!==Hu.Z_FINISH&&e.flush!==Hu.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||Hu.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<Hu.Z_MIN_CHUNK||e.chunkSize>Hu.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<Hu.Z_MIN_WINDOWBITS||e.windowBits>Hu.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<Hu.Z_MIN_LEVEL||e.level>Hu.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<Hu.Z_MIN_MEMLEVEL||e.memLevel>Hu.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=Hu.Z_FILTERED&&e.strategy!=Hu.Z_HUFFMAN_ONLY&&e.strategy!=Hu.Z_RLE&&e.strategy!=Hu.Z_FIXED&&e.strategy!=Hu.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!oe.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new Hu.Zlib(t);var n=this;this._hadError=!1,this._binding.onerror=function(e,t){n._binding=null,n._hadError=!0;var r=new Error(e);r.errno=t,r.code=Hu.codes[t],n.emit("error",r)};var r=Hu.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(r=e.level);var i=Hu.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(i=e.strategy),this._binding.init(e.windowBits||Hu.Z_DEFAULT_WINDOWBITS,r,e.memLevel||Hu.Z_DEFAULT_MEMLEVEL,i,e.dictionary),this._buffer=new oe(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=i,this.once("end",this.close)}Object.keys(Ku).forEach((function(e){Ku[Ku[e]]=e})),We(Sc,oo),Sc.prototype.params=function(e,t,n){if(e<Hu.Z_MIN_LEVEL||e>Hu.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=Hu.Z_FILTERED&&t!=Hu.Z_HUFFMAN_ONLY&&t!=Hu.Z_RLE&&t!=Hu.Z_FIXED&&t!=Hu.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var r=this;this.flush(Hu.Z_SYNC_FLUSH,(function(){r._binding.params(e,t),r._hadError||(r._level=e,r._strategy=t,n&&n())}))}else O.nextTick(n)},Sc.prototype.reset=function(){return this._binding.reset()},Sc.prototype._flush=function(e){this._transform(new oe(0),"",e)},Sc.prototype.flush=function(e,t){var n=this._writableState;if(("function"==typeof e||void 0===e&&!t)&&(t=e,e=Hu.Z_FULL_FLUSH),n.ended)t&&O.nextTick(t);else if(n.ending)t&&this.once("end",t);else if(n.needDrain){var r=this;this.once("drain",(function(){r.flush(t)}))}else this._flushFlag=e,this.write(new oe(0),"",t)},Sc.prototype.close=function(e){if(e&&O.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var t=this;O.nextTick((function(){t.emit("close")}))}},Sc.prototype._transform=function(e,t,n){var r,i=this._writableState,o=(i.ending||i.ended)&&(!e||i.length===e.length);if(null===!e&&!oe.isBuffer(e))return n(new Error("invalid input"));o?r=Hu.Z_FINISH:(r=this._flushFlag,e.length>=i.length&&(this._flushFlag=this._opts.flush||Hu.Z_NO_FLUSH)),this._processChunk(e,r,n)},Sc.prototype._processChunk=function(e,t,n){var r=e&&e.length,i=this._chunkSize-this._offset,o=0,a=this,s="function"==typeof n;if(!s){var u,c=[],l=0;this.on("error",(function(e){u=e}));do{var f=this._binding.writeSync(t,e,o,r,this._buffer,this._offset,i)}while(!this._hadError&&p(f[0],f[1]));if(this._hadError)throw u;var h=oe.concat(c,l);return this.close(),h}var d=this._binding.write(t,e,o,r,this._buffer,this._offset,i);function p(u,f){if(!a._hadError){var h=i-f;if(function(e,t){if(!e)throw new Error(t)}(h>=0,"have should not go down"),h>0){var d=a._buffer.slice(a._offset,a._offset+h);a._offset+=h,s?a.push(d):(c.push(d),l+=d.length)}if((0===f||a._offset>=a._chunkSize)&&(i=a._chunkSize,a._offset=0,a._buffer=new oe(a._chunkSize)),0===f){if(o+=r-u,r=u,!s)return!0;var v=a._binding.write(t,e,o,r,a._buffer,a._offset,a._chunkSize);return v.callback=p,void(v.buffer=e)}if(!s)return!1;n()}}d.buffer=e,d.callback=p},We(_c,Sc),We(mc,Sc),We(yc,Sc),We(wc,Sc),We(bc,Sc),We(kc,Sc),We(Ec,Sc);var Ac={codes:Ku,createDeflate:Yu,createInflate:Gu,createDeflateRaw:Ju,createInflateRaw:Vu,createGzip:Xu,createGunzip:Qu,createUnzip:ec,deflate:tc,deflateSync:nc,gzip:rc,gzipSync:ic,deflateRaw:oc,deflateRawSync:ac,unzip:sc,unzipSync:uc,inflate:cc,inflateSync:lc,gunzip:fc,gunzipSync:hc,inflateRaw:dc,inflateRawSync:pc,Deflate:_c,Inflate:mc,Gzip:yc,Gunzip:wc,DeflateRaw:bc,InflateRaw:kc,Unzip:Ec,Zlib:Sc},Cc=Object.freeze({__proto__:null,codes:Ku,createDeflate:Yu,createInflate:Gu,createDeflateRaw:Ju,createInflateRaw:Vu,createGzip:Xu,createGunzip:Qu,createUnzip:ec,deflate:tc,deflateSync:nc,gzip:rc,gzipSync:ic,deflateRaw:oc,deflateRawSync:ac,unzip:sc,unzipSync:uc,inflate:cc,inflateSync:lc,gunzip:fc,gunzipSync:hc,inflateRaw:dc,inflateRawSync:pc,Deflate:_c,Inflate:mc,Gzip:yc,Gunzip:wc,DeflateRaw:bc,InflateRaw:kc,Unzip:Ec,Zlib:Sc,default:Ac}),Tc="axios@0.21.1",xc="axios@0.21.1",Rc="sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",Oc="/zmp-sdk/axios",Ic={},Nc={type:"version",registry:!0,raw:"axios@0.21.1",name:"axios",escapedName:"axios",rawSpec:"0.21.1",saveSpec:null,fetchSpec:"0.21.1"},jc=["/zmp-sdk"],Lc="https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",Pc="22563481962f4d6bde9a76d516ef0e5d3c09b2b8",Bc="axios@0.21.1",Mc="/Users/nguyentuankiet/Work/Zalo/Projects/ZaloMiniProgram/TestNewFunction",zc={name:"Matt Zabriskie"},Uc={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},Dc={url:"https://github.com/axios/axios/issues"},Fc=[{path:"./dist/axios.min.js",threshold:"5kB"}],qc={"follow-redirects":"^1.10.0"},Zc="Promise based HTTP client for the browser and node.js",Wc={bundlesize:"^0.17.0",coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^5.2.0",sinon:"^4.5.0",typescript:"^2.8.1","url-search-params":"^0.10.0",webpack:"^1.13.1","webpack-dev-server":"^1.14.1"},$c="https://github.com/axios/axios",Hc="dist/axios.min.js",Kc=["xhr","http","ajax","promise","node"],Yc="index.js",Gc="axios",Jc={type:"git",url:"git+https://github.com/axios/axios.git"},Vc={build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test && bundlesize",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},Xc="./index.d.ts",Qc="dist/axios.min.js",el="0.21.1",tl={_from:Tc,_id:xc,_inBundle:false,_integrity:Rc,_location:Oc,_phantomChildren:Ic,_requested:Nc,_requiredBy:jc,_resolved:Lc,_shasum:Pc,_spec:Bc,_where:Mc,author:zc,browser:Uc,bugs:Dc,bundleDependencies:false,bundlesize:Fc,dependencies:qc,deprecated:false,description:Zc,devDependencies:Wc,homepage:$c,jsdelivr:Hc,keywords:Kc,license:"MIT",main:Yc,name:Gc,repository:Jc,scripts:Vc,typings:Xc,unpkg:Qc,version:el},nl=Object.freeze({__proto__:null,_from:Tc,_id:xc,_inBundle:false,_integrity:Rc,_location:Oc,_phantomChildren:Ic,_requested:Nc,_requiredBy:jc,_resolved:Lc,_shasum:Pc,_spec:Bc,_where:Mc,author:zc,browser:Uc,bugs:Dc,bundleDependencies:false,bundlesize:Fc,dependencies:qc,deprecated:false,description:Zc,devDependencies:Wc,homepage:$c,jsdelivr:Hc,keywords:Kc,license:"MIT",main:Yc,name:Gc,repository:Jc,scripts:Vc,typings:Xc,unpkg:Qc,version:el,default:tl}),rl=r(Cc),il=r(nl),ol=is.http,al=is.https,sl=/https:?/;function ul(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=oe.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,ul(e,t,e.href)}}var cl=function(e){return new Promise((function(t,n){var r=function(e){t(e)},i=function(e){n(e)},o=e.data,a=e.headers;if(a["User-Agent"]||a["user-agent"]||(a["User-Agent"]="axios/"+il.version),o&&!jr.isStream(o)){if(oe.isBuffer(o));else if(jr.isArrayBuffer(o))o=oe.from(new Uint8Array(o));else{if(!jr.isString(o))return i(Wr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));o=oe.from(o,"utf-8")}a["Content-Length"]=o.length}var s=void 0;e.auth&&(s=(e.auth.username||"")+":"+(e.auth.password||""));var u=Kr(e.baseURL,e.url),c=Da.parse(u),l=c.protocol||"http:";if(!s&&c.auth){var f=c.auth.split(":");s=(f[0]||"")+":"+(f[1]||"")}s&&delete a.Authorization;var h=sl.test(l),d=h?e.httpsAgent:e.httpAgent,p={path:Pr(c.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:a,agent:d,agents:{http:e.httpAgent,https:e.httpsAgent},auth:s};e.socketPath?p.socketPath=e.socketPath:(p.hostname=c.hostname,p.port=c.port);var v,g=e.proxy;if(!g&&!1!==g){var _=l.slice(0,-1)+"_proxy",m=O.env[_]||O.env[_.toUpperCase()];if(m){var y=Da.parse(m),w=O.env.no_proxy||O.env.NO_PROXY,b=!0;if(w)b=!w.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&c.hostname.substr(c.hostname.length-e.length)===e||c.hostname===e))}));if(b&&(g={host:y.hostname,port:y.port,protocol:y.protocol},y.auth)){var k=y.auth.split(":");g.auth={username:k[0],password:k[1]}}}}g&&(p.headers.host=c.hostname+(c.port?":"+c.port:""),ul(p,g,l+"//"+c.hostname+(c.port?":"+c.port:"")+p.path));var E=h&&(!g||sl.test(g.protocol));e.transport?v=e.transport:0===e.maxRedirects?v=Fa:(e.maxRedirects&&(p.maxRedirects=e.maxRedirects),v=E?al:ol),e.maxBodyLength>-1&&(p.maxBodyLength=e.maxBodyLength);var S=v.request(p,(function(t){if(!S.aborted){var n=t,o=t.req||S;if(204!==t.statusCode&&"HEAD"!==o.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":n=n.pipe(rl.createUnzip()),delete t.headers["content-encoding"]}var a={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:o};if("stream"===e.responseType)a.data=n,$r(r,i,a);else{var s=[];n.on("data",(function(t){s.push(t),e.maxContentLength>-1&&oe.concat(s).length>e.maxContentLength&&(n.destroy(),i(Wr("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,o)))})),n.on("error",(function(t){S.aborted||i(Zr(t,e,null,o))})),n.on("end",(function(){var t=oe.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=jr.stripBOM(t))),a.data=t,$r(r,i,a)}))}}}));S.on("error",(function(t){S.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||i(Zr(t,e,null,S))})),e.timeout&&S.setTimeout(e.timeout,(function(){S.abort(),i(Wr("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",S))})),e.cancelToken&&e.cancelToken.promise.then((function(e){S.aborted||(S.abort(),i(e))})),jr.isStream(o)?o.on("error",(function(t){i(Zr(t,e,null,S))})).pipe(S):S.end(o)}))},ll={"Content-Type":"application/x-www-form-urlencoded"};function fl(e,t){!jr.isUndefined(e)&&jr.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var hl,dl={adapter:("undefined"!=typeof XMLHttpRequest?hl=Jr:void 0!==O&&"[object process]"===Object.prototype.toString.call(O)&&(hl=cl),hl),transformRequest:[function(e,t){return qr(t,"Accept"),qr(t,"Content-Type"),jr.isFormData(e)||jr.isArrayBuffer(e)||jr.isBuffer(e)||jr.isStream(e)||jr.isFile(e)||jr.isBlob(e)?e:jr.isArrayBufferView(e)?e.buffer:jr.isURLSearchParams(e)?(fl(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):jr.isObject(e)?(fl(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};dl.headers={common:{Accept:"application/json, text/plain, */*"}},jr.forEach(["delete","get","head"],(function(e){dl.headers[e]={}})),jr.forEach(["post","put","patch"],(function(e){dl.headers[e]=jr.merge(ll)}));var pl=dl;function vl(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var gl=function(e){return vl(e),e.headers=e.headers||{},e.data=Dr(e.data,e.headers,e.transformRequest),e.headers=jr.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),jr.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||pl.adapter)(e).then((function(t){return vl(e),t.data=Dr(t.data,t.headers,e.transformResponse),t}),(function(t){return Fr(t)||(vl(e),t&&t.response&&(t.response.data=Dr(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},_l=function(e,t){t=t||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return jr.isPlainObject(e)&&jr.isPlainObject(t)?jr.merge(e,t):jr.isPlainObject(t)?jr.merge({},t):jr.isArray(t)?t.slice():t}function u(r){jr.isUndefined(t[r])?jr.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}jr.forEach(r,(function(e){jr.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),jr.forEach(i,u),jr.forEach(o,(function(r){jr.isUndefined(t[r])?jr.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),jr.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var c=r.concat(i).concat(o).concat(a),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===c.indexOf(e)}));return jr.forEach(l,u),n};function ml(e){this.defaults=e,this.interceptors={request:new Ur,response:new Ur}}ml.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=_l(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[gl,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},ml.prototype.getUri=function(e){return e=_l(this.defaults,e),Pr(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},jr.forEach(["delete","get","head","options"],(function(e){ml.prototype[e]=function(t,n){return this.request(_l(n||{},{method:e,url:t,data:(n||{}).data}))}})),jr.forEach(["post","put","patch"],(function(e){ml.prototype[e]=function(t,n,r){return this.request(_l(r||{},{method:e,url:t,data:n}))}}));var yl=ml;function wl(e){this.message=e}wl.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},wl.prototype.__CANCEL__=!0;var bl=wl;function kl(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new bl(e),t(n.reason))}))}kl.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},kl.source=function(){var e;return{token:new kl((function(t){e=t})),cancel:e}};var El=kl;function Sl(e){var t=new yl(e),n=Ar(yl.prototype.request,t);return jr.extend(n,yl.prototype,t),jr.extend(n,t),n}var Al=Sl(pl);Al.Axios=yl,Al.create=function(e){return Sl(_l(Al.defaults,e))},Al.Cancel=bl,Al.CancelToken=El,Al.isCancel=Fr,Al.all=function(e){return Promise.all(e)},Al.spread=function(e){return function(t){return e.apply(null,t)}},Al.isAxiosError=function(e){return"object"==typeof e&&!0===e.isAxiosError};var Cl=Al,Tl=Al;Cl.default=Tl;var xl=Cl,Rl=(()=>{const e=ar();return{MINI_APP_LINK:"https://zalo.me/app/link/zapps",MINI_APP_INTERNAL_LINK:"https://h5.zdn.vn/zapps",COOKIE_NAME:{ZOAUTH:"h5.zdn.vn_zoauth",ZACC_SESSiON:"h5.zdn.vn_zacc_session",JS_TOKEN:"h5.zdn.vn_zlink3rd"},APIS:{GET_USER_INFO:"https://graph.zalo.me/v2.0/me"},STORAGE_DATA_LIMIT:102400,STORAGE_LIMIT:5242880,NETWORK_TYPE:{NONE:e.isAndroid?-2:0,WIFI:e.isAndroid?0:1,"2G":(e.isAndroid,2),"3G":e.isAndroid?15:2,"4G":e.isAndroid?13:2}}})();const Ol={encode:function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(void 0===r)return;if(null===r)return void t.push(n);t.push(encodeURIComponent(n)+"="+encodeURIComponent(r))}return t.join("&")},decode:function(e,t){var n={};if(""===e)return n;for(var r=e.split("&"),i=0;i<r.length;i++){var o=r[i].split("=",2),a=decodeURIComponent(o[0]);if(t&&Object.prototype.hasOwnProperty.call(n,a))throw new URIError("Duplicate key: "+a);n[a]=2===o.length?decodeURIComponent(o[1]):null}return n},appendToUrl:function(e,t){return e+(-1!==e.indexOf("?")?"&":"?")+("string"==typeof t?t:Ol.encode(t))},getParameterByName:function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getParamsAsObject:function(e){var t={};return e?(e.split("&").map((function(e){var n=e.split("=");n&&2==n.length&&(t[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))})),t):t},toQueryString:function(e){if(!e)return"";if("object"!=(void 0===e?"undefined":typeof e))return e;var t=Object.keys(e),n=[];return t.map((function(t){var r=e[t],i=[t,r="object"==(void 0===r?"undefined":typeof r)?JSON.stringify(r):encodeURIComponent(r)].join("=");n.push(i)})),n.join("&")}};var Il={},Nl=function(e,t,n){var r=t||"default";return function(){var t=r in Il?Il[r](e,n):e;return t.apply(this,arguments)}};Nl.setWrapper=function(e){var t=arguments.length<=1||void 0===arguments[1]?"default":arguments[1];Il[t]=e};var jl={error:{code:1,error_subcode:1357046,message:"Received Invalid JSON reply.",type:"http"}};function Ll(e){try{return null===e?jl:JSON.parse(e)}catch(e){return jl}}var Pl={execute:function(e,t,n,r){n.suppress_http_code=1;var i=Ol.encode(n);"post"!=t&&(e=Ol.appendToUrl(e,i),i="");var o=function(e,t){if(!self.XMLHttpRequest)return null;var n=new XMLHttpRequest,r=function(){};if(!("withCredentials"in n))return null;n.open(e,t,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded");var i={send:function(e){n.send(e)}},o=Nl((function(){o=r,"onload"in i&&i.onload(n)}),"entry","XMLHttpRequest:load"),a=Nl((function(){a=r,"onerror"in i&&i.onerror(n)}),"entry","XMLHttpRequest:error");return n.onload=function(){o()},n.onerror=function(){a()},n.onreadystatechange=function(){4==n.readyState&&(200==n.status?o():a())},i}(t,e);return!!o&&(o.onload=function(e){r(Ll(e.responseText))},o.onerror=function(e){e.responseText?r(Ll(e.responseText)):r({error:{code:1,error_subcode:1357045,message:"unknown error (empty response)",status:e.status,type:"http"}})},o.send(i),!0)}};class Bl extends Er{constructor(){super(),this.debug=cn("zmp:ZaloJSBridge"),this.events=Sr.getInstance(),this._accessTk=hr("zacc_session")||"DEFAULT_ACCESS_TOKEN",this._jsAccessTk=hr("zlink3rd")||"DEFAULT_JS_TOKEN",this.results=[],this._userAgent=or(),this._device=ar(),this._jsCallFuncCallbacks={},this.events.on(e.Events.AppPaused,(()=>{if(this.results.length>0){let e=this.results;this.results=[];try{this.sendLogData(e)}catch(e){}}})),this.sendLogTimer?clearInterval(this.sendLogTimer):this.sendLogTimer=setInterval((()=>{if(this.results.length>0){let e=this.results;this.results=[];try{this.sendLogData(e)}catch(e){}}}),5e3)}static getInstance(){return Bl.instance||(Bl.instance=new Bl),Bl.instance}set accessTk(e){this._accessTk=e}set jsAccessTk(e){this._jsAccessTk=e}sendLogData(e){try{Pl.execute("https://h5.zalo.me/log/async","post",{appId:window.APP_ID,data:JSON.stringify(e)},(e=>{}))}catch(e){}}onJSCall(e,t){try{const n=dr(t);if(this._jsCallFuncCallbacks[e]){const t=this._jsCallFuncCallbacks[e].callback,r=this._jsCallFuncCallbacks[e].timeout;if(t){try{t.call(this,n)}catch(e){console.error("Call callback error",e)}r&&clearTimeout(r),this._jsCallFuncCallbacks[e]=null,delete this._jsCallFuncCallbacks[e]}}this.results.push({action:n.action,error:n.error_code})}catch(e){console.log("onJSCall","error",e)}}onMultiJSCall(e,t){try{const n=dr(t);if(this._jsCallFuncCallbacks[e]){const t=this._jsCallFuncCallbacks[e].callback,r=this._jsCallFuncCallbacks[e].timeout;if(t){try{t.call(this,n)}catch(e){console.error("Call callback error",e)}r&&clearTimeout(r)}}this.results.push({action:n.action,error:n.error_code})}catch(e){console.log("onMultiJSCall","error",e)}}nativeEventHandler(e,t,n){this.debug(`eventId: ${e}, eventName: ${t}, eventData: ${n}`);const r=_r(n);this.debug(r),this.events.emit(t,e,r)}defaultCallback(e){null!=e&&(e=dr(e))}jsCall(e,t,n,r=!1,o=3,a=!0){try{const s=((e="")=>`${e.normalize("NFD").replace(er,"").replace(tr,"d").replace(nr,"").toLowerCase()}_${Math.random().toString(36).substr(2,4)}`)(e);if(!this._device.isMobile||i.isEmpty(e))return this.onJSCall(s,{error_code:-13,error_message:"params invalid!",data:{device:this._device.isMobile,jsToken:this._jsAccessTk,access_token:this._accessTk},action:e}),!1;null==t&&(t={}),n||(n=this.defaultCallback);const u={error_code:-14,error_message:"Request Timeout!",data:{},action:e};this._jsCallFuncCallbacks[s]={timeout:a&&Kn.includes(e)&&setTimeout((()=>{this.onJSCall(s,u)}),8e3),callback:n};try{return t=pr(t),r?this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,window.onMultiJSCall(s)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,`window.onMultiJSCall('${s}')`):this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,window.onJSCall(s)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,`window.onJSCall('${s}')`)}catch(i){if(!(o-- >0)){const n={error_code:-5,error_message:"Not ready!",data:{userAgent:this._userAgent,options:t,jsToken:this._jsAccessTk,access_token:this._accessTk},action:e,js_error:i};return this.onJSCall(s,n),!1}setTimeout((()=>{this.jsCall(e,t,n,r,o)}),500)}}catch(e){console.log("jsCall","error",e)}return!1}}class Ml{constructor(e,t,n){this.code=e,this.message=t,this.api=n}toString(){return`api: ${this.api}; code: ${this.code}; message: ${this.message}`}}class zl extends Ml{constructor(e,t){super(e,t),this.message=`${t}. ${Vn.READ_MORE}`,this.handler()}handler(){switch(this.code){case e.NativeCode.token_invalid:this.code=Gn,this.message=Vn.LOGIN_REQUIRED;break;case e.NativeCode.not_permission:this.code=Jn,this.message=Vn.NOT_PERMISSION;break;case e.NativeCode.client_not_support:this.message=Vn.CLIENT_NOT_SUPPORT;break;case e.NativeCode.decode_failed:this.message=Vn.DECODE_FAILED}}}const Ul={handler:null,setHandler(e){this.handler=e}};Ul.setHandler(((e,t)=>t instanceof Ml?(t.api=e,t):new Ml(-2001,i.isNull(t.message)?"Unknown Error":t.message,e)));const Dl=(e,t,n)=>{const r=n.value;return n.value=function(...e){return wr(this,void 0,void 0,(function*(){const{success:n,fail:o}=Array.isArray(e)&&e.length>0&&e[0];return new Promise(((a,s)=>wr(this,void 0,void 0,(function*(){try{const t=yield r.apply(this,e);!i.isNull(n)&&i.isFunction(n)?n.call(null,t,this):a(t)}catch(e){if((null==e?void 0:e.code)===Gn||(null==e?void 0:e.code)===Jn){let t=!1;this instanceof Gf&&(t=this.getLoginStatus()),t||(e=new Ml(Gn,Vn.LOGIN_REQUIRED))}const{handler:n}=Ul,r=n.call(null,t,e,this);window.zmpSentry&&window.zmpSentry.throwError(r.toString()),!i.isNull(o)&&i.isFunction(o)?o.call(null,r,this):console.error("Error:",r)}}))))}))},n},Fl=(e,t,n)=>{const r=n.value;return n.value=function(...e){try{return r.apply(this,e)}catch(e){if((null==e?void 0:e.code)===Gn||(null==e?void 0:e.code)===Jn){let t=!1;this instanceof Gf&&(t=this.getLoginStatus()),t||(e=new Ml(Gn,Vn.LOGIN_REQUIRED))}const{handler:n}=Ul;!i.isNull(n)&&i.isFunction(n)?n.call(null,t,e,this):console.warn(e.message)}},n};var ql;class Zl{constructor(){ql.set(this,void 0),kr(this,ql,Bl.getInstance())}setZAccSession(e){br(this,ql).accessTk=e}setJSToken(e){br(this,ql).jsAccessTk=e}callNative(e,t,n){return new Promise(((r,i)=>{br(this,ql).jsCall(e,t,(o=>wr(this,void 0,void 0,(function*(){try{const a=new zl(o.error_code,`${o.action}: ${o.error_message}`);if(o.action===e)if(null==n?void 0:n.callback){const e=yield n.callback(o,a);r(e)}else if(o&&o.error_code>=0)r(o.data||{});else if(o&&o.error_code<0){try{window.zmpSentry&&window.zmpSentry.captureMessage(`${e}: call native fail`,{extra:{data:t,rs:o}})}catch(e){}i(a)}}catch(e){i(e)}}))),null==n?void 0:n.isMultiCallback,null==n?void 0:n.nRetry,null==n?void 0:n.haveTimeout)}))}}ql=new WeakMap;const Wl={loginFailed:()=>new Ml(Gn,Vn.LOGIN_FAILED),loginRequired:()=>new Ml(Yn,Vn.LOGIN_REQUIRED),missingParam:e=>new Ml(Yn,`Missing required argument: ${e}`),wrongTypeParam:(e,t,n)=>new Ml(Yn,`Wrong type of parameter '${e}'. Expected ${t}, but got ${n}`)};var $l,Hl,Kl,Yl,Gl,Jl="2.14.3";class Vl{static getVersion(){return Jl}static getSystemInfo(){return{version:sr("version-id")||"",apiVersion:Jl,zaloVersion:ur(),platform:cr(),language:navigator.language}}static getAppInfo(){return wr(this,void 0,void 0,(function*(){let e={};const t=this.getAppId(),n=this.getSystemInfo(),r=Ol.appendToUrl(`https://h5.zalo.me/${Xn}`,{appId:t,versionStatus:0,currentVersion:n.version}),i=yield fetch(r,{credentials:"include"});if(i.ok){const t=yield i.json();if(t.err<0||!t.data)throw new Error(t);e={name:t.data.name,version:t.data.version,description:t.data.description,appUrl:t.data.appUrl,qrCodeUrl:t.data.qrCodeUrl}}return e}))}}class Xl{static setNavigationBarTitle(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(bn,{title:e.title},{haveTimeout:!1})}))}static setNavigationBarColor(e){return wr(this,void 0,void 0,(function*(){if(i.isString(e.color)&&e.color.length>0){const t={};i.isEmpty(e.color)||(t.backgroundColor=e.color),i.isEmpty(e.textColor)||(t.textColor=e.textColor),yield this.callNative(qn,{actionbarType:5,dataConfig:t,homeConfig:{enable:this.isShowHomeButton?1:0,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}},{haveTimeout:!1}),this.isShowNavBar=!0}else{const t={};i.isEmpty(e.statusBarColor)||(t.backgroundColor=e.statusBarColor),i.isEmpty(e.textColor)||(t.textColor=e.textColor),yield this.callNative(qn,{actionbarType:6,dataConfig:t},{haveTimeout:!1}),this.isShowNavBar=!1}}))}static setNavigationBarLeftButton(e){return wr(this,void 0,void 0,(function*(){let t={};switch(e.type){case"none":this.isShowHomeButton=!1,t={buttonType:3,dataConfig:{confirmToExit:1},homeConfig:{enable:0,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"back":this.isShowHomeButton=!1,t={buttonType:0,dataConfig:{confirmToExit:1},homeConfig:{enable:0,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"home":this.isShowHomeButton=!0,t={buttonType:3,dataConfig:{confirmToExit:1},homeConfig:{enable:1,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"both":this.isShowHomeButton=!0,t={buttonType:0,dataConfig:{confirmToExit:1},homeConfig:{enable:1,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}}}yield this.callNative(An,Object.assign({},t),{haveTimeout:!1})}))}static setNavigationBarRightButton(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(En,{supportToolBar:e.supportToolBar,reset:e.reset,menuListItems:e.menuListItems,zapp:this.getAppId()})}))}}class Ql{static setBackgroundColor(e){return wr(this,void 0,void 0,(function*(){i.isString(e.backgroundColor)&&e.backgroundColor.length>0&&(yield this.callNative(qn,{actionbarType:this.isShowNavBar?5:6,dataConfig:{backgroundColor:e.backgroundColor,textColor:e.textColor}}))}))}}class ef{constructor(e,t,n,r){this.title=r,this.severity=t;const i=new Date;if(this.time=i.toLocaleTimeString(),this.content=e,n>0){const e=(new Error).stack;this.stack=e?e.replace("Error\n",""):""}}toString(){return(this.content.stack?[this.title,this.severity.toUpperCase(),this.time,this.content,this.content.stack.replace("Error:","")]:[this.title,this.severity.toUpperCase(),this.time,JSON.stringify(this.content),this.stack]).join(" ")}}$l=new WeakMap,Hl=new WeakMap,Kl=new WeakMap,Yl=new WeakMap,Gl=new WeakMap;const tf=new class{constructor(){$l.set(this,3),Hl.set(this,["none","error","warn","info"]),Kl.set(this,"[zmp] > "),Yl.set(this,{error:0,warn:0,info:0,firstError:null,lastError:null}),Gl.set(this,((e,t,n)=>{br(this,Yl)[br(this,Hl)[e]]++;const r=br(this,Hl)[e];if(kr(this,Kl,br(this,Kl)+("string"!=typeof t?new ef(t,r,e,n).toString():t)),!(e>br(this,$l)))switch(e){case 1:console.error(br(this,Kl));break;case 2:console.warn(br(this,Kl));break;case 3:console.info(br(this,Kl));break;default:throw new Error("internal")}}))}setLogLevel(e){kr(this,$l,e)}info(e){br(this,Gl).call(this,3,e)}warn(e,t){br(this,Gl).call(this,2,e,t)}error(e,t){br(this,Gl).call(this,1,e,t)}getMetrics(){return br(this,Yl)}};class nf{static setDeviceOrientation(t){return wr(this,void 0,void 0,(function*(){yield this.callNative(zn,{autoRotate:e.OrientationType[t.rotate]})}))}static getNetworkType(t){return wr(this,void 0,void 0,(function*(){return yield this.callNative(kn,{url:window.location.href,featureId:""}).then((t=>{let n;switch(t.network){case Rl.NETWORK_TYPE.NONE:n=e.NetworkType.none;break;case Rl.NETWORK_TYPE.WIFI:n=e.NetworkType.wifi;break;case Rl.NETWORK_TYPE["2G"]:case Rl.NETWORK_TYPE["3G"]:case Rl.NETWORK_TYPE["4G"]:n=e.NetworkType.cellular;break;default:n=e.NetworkType.unknown}return{networkType:n}}))}))}static onNetworkStatusChange(t){return wr(this,void 0,void 0,(function*(){yield this.events.on(e.Events.NetworkChanged,(e=>{const n=e&&e.state;this.getNetworkType().then((e=>{const r={isConnected:"CONNECTED"===n,networkType:e&&e.networkType};t(r)})).catch((e=>{tf.error(e,"onNetworkStatusChange")}))}))}))}static startBeaconDiscovery(e){var t,n,r,o,a;return wr(this,void 0,void 0,(function*(){const s={subaction:0,scanning_type:i.isNumber(null==e?void 0:e.scanningType)?e.scanningType:0,data:{scan_from_source:i.isString(null==e?void 0:e.scanFromSource)?e.scanFromSource:"",expire:i.isNumber(null==e?void 0:e.expire)?e.expire:3e3,monitor_interval:i.isNumber(null==e?void 0:e.monitorInterval)?e.monitorInterval:60,domain:i.isString(null==e?void 0:e.domain)?e.domain:"",scan_config:{scan_time:i.isNumber(null===(t=null==e?void 0:e.scanConfig)||void 0===t?void 0:t.scanTime)?e.scanConfig.scanTime:15e3,time_between_scan:i.isNumber(null===(n=null==e?void 0:e.scanConfig)||void 0===n?void 0:n.timeBetweenScan)?e.scanConfig.timeBetweenScan:1e4,beacon_timeout:i.isNumber(null===(r=null==e?void 0:e.scanConfig)||void 0===r?void 0:r.beaconTimeout)?e.scanConfig.beaconTimeout:3e4,delayCheckConnectedTimeout:i.isNumber(null===(o=null==e?void 0:e.scanConfig)||void 0===o?void 0:o.delayCheckConnectedTimeout)?e.scanConfig.delayCheckConnectedTimeout:5e3,beaconConnectedTimeout:i.isNumber(null===(a=null==e?void 0:e.scanConfig)||void 0===a?void 0:a.beaconConnectedTimeout)?e.scanConfig.beaconConnectedTimeout:6e5},items:Array.isArray(null==e?void 0:e.items)?null==e?void 0:e.items:[]}};return yield this.callNative(Un,Object.assign({},s)),!0}))}static stopBeaconDiscovery(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Un,Object.assign({},{subaction:2})),!0}))}static getBeacons(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Un,Object.assign({},{subaction:1}),{isMultiCallback:!0}).then((e=>{const t={beacons:[]};return Array.isArray(e)&&e.forEach((e=>{const n={uuid:e.uuid,major:e.major,minor:e.minor,distance:e.distance,rssi:e.rssi};t.beacons.push(n)})),t}))}))}static stopBluetoothDevicesDiscovery(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static startBluetoothDevicesDiscovery(e){return wr(this,void 0,void 0,(function*(){return this.callNative("",Object.assign({},e))}))}static openBluetoothAdapter(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static onBluetoothDeviceFound(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static onBluetoothAdapterStateChange(){return wr(this,void 0,void 0,(function*(){return Promise.resolve()}))}static getConnectedBluetoothDevices(e){return wr(this,void 0,void 0,(function*(){const t={services:e.services||[]};return this.callNative("",t)}))}static getBluetoothDevices(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static getBluetoothAdapterState(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static closeBluetoothAdapter(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static scanQRCode(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Ln,{skipOpenLink:!0})}))}static showToast(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(In,{toast:e.message})}))}static hideKeyboard(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Nn,{})}))}static openPhone(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(jn,{phoneNum:e.phoneNumber,phoneCode:e.phoneNumber})}))}static openSMS(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Pn,{content:e.content,phoneCode:e.phoneNumber})}))}static keepScreen(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Mn,{data:{keep_screen_on:e.keepScreenOn?1:0}})}))}static openBioAuthentication(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Tn,{secret_data:e.secretData,app_id:this.getZAppId(),ui:{title:e.ui.title,sub_title:e.ui.subTitle,negative_text:e.ui.negativeButtonText},require_fingerprint:e.requireFingerprint?1:0}).then((e=>{var t,n,r,i;return{code:null==e?void 0:e.error_code,message:null==e?void 0:e.error_message,data:{domain:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.domain,code:null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.error_code,message:null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.error_message,payToken:null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.pay_token}}}))}))}static checkStateBioAuthentication(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(xn,{}).then((e=>({bioState:null==e?void 0:e.bio_state})))}))}static vibrate(t){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Zn,{type:e.VibrateType[t.type],vibrate_time:t.milliseconds})}))}}var rf,of,af,sf,uf,cf,lf,ff,hf,df,pf,vf,gf,_f,mf,yf,wf,bf,kf,Ef,Sf,Af,Cf,Tf,xf;class Rf{constructor(e){rf.set(this,localStorage),of.set(this,void 0),af.set(this,void 0),ar(),kr(this,af,{keys:new Set,currentSize:0,limitSize:Rl.STORAGE_LIMIT}),kr(this,of,e),this.findAllCurrentDataByApp(e)}findAllCurrentDataByApp(e){try{let t;for(t in br(this,rf)){if(e){if(t.split("_")[0]!==e)continue}br(this,af).keys.add(t)}}catch(e){tf.error(e,"LocalResourceStorage > findAllCurrentDataByApp")}}get(e){let t=new Map;return e.forEach((e=>{t.set(e,this.getSync(e))})),Promise.resolve(t)}getSync(e){return br(this,of)&&(e=`${br(this,of)}_${e}`),br(this,af).keys.has(e)?br(this,rf).getItem(e):null}set(e){return wr(this,void 0,void 0,(function*(){return Object.entries(e).forEach((([e,t])=>{this.setSync(e,t.replace(/\\"/g,'"'))})),Promise.resolve({errorKeys:[]})}))}setSync(e,t){br(this,of)&&(e=`${br(this,of)}_${e}`),br(this,rf).setItem(e,t),br(this,af).keys.add(e)}getInfo(){return wr(this,void 0,void 0,(function*(){return Promise.resolve(this.getInfoSync())}))}getInfoSync(){const e=((e,t)=>{let n,r,i=0;for(r in e){const o=r.split("_")[0];e.hasOwnProperty(r)&&(t&&o!==t||(n=2*(e[r].length+r.length),i+=n))}return i})(br(this,rf),br(this,of));return{currentSize:i.isNumber(e)?Number((e/1024).toFixed(2)):0,limitSize:Number((Rl.STORAGE_LIMIT/1024).toFixed(2))}}remove(e){return wr(this,void 0,void 0,(function*(){return e.forEach((e=>{this.removeSync(e)})),Promise.resolve({errorKeys:[]})}))}removeSync(e){br(this,of)&&(e=`${br(this,of)}_${e}`),br(this,af).keys.has(e)&&(br(this,rf).removeItem(e),br(this,af).keys.delete(e))}clear(){return wr(this,void 0,void 0,(function*(){return Promise.resolve(this.clearSync())}))}clearSync(){br(this,af).keys.forEach((e=>{br(this,of)&&e.indexOf(br(this,of))<0||(br(this,rf).removeItem(e),br(this,af).keys.delete(e))}))}}rf=new WeakMap,of=new WeakMap,af=new WeakMap;class Of extends Zl{constructor(e){super(),sf.set(this,void 0),uf.set(this,void 0),kr(this,uf,{keys:new Set,currentSize:0,limitSize:Rl.STORAGE_LIMIT}),kr(this,sf,e)}get(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Wn,{mpds_action:"mpds.get",mpds_data:{keys:e},appId:br(this,sf)},{isMultiCallback:!1}).then((e=>{let t=new Map;return e&&e.mpds_data&&e.mpds_data.map&&(t=new Map(Object.entries(e.mpds_data.map))),t}))}))}set(e){return wr(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(Wn,{mpds_action:"mpds.set",mpds_data:{map:e},appId:br(this,sf)},{isMultiCallback:!1}).then((e=>{let t=[];return e&&e.mpds_data&&e.mpds_data.error_keys&&(t=e.mpds_data.error_keys),t}))}}))}getInfo(){return wr(this,void 0,void 0,(function*(){const e=yield this.callNative(Wn,{mpds_action:"mpds.get.size",mpds_data:{},appId:br(this,sf)},{isMultiCallback:!1}).then((e=>{let t=0;return e&&e.mpds_data&&e.mpds_data.size&&(t=e.mpds_data.size),t}));return{currentSize:i.isNumber(e)?Number(e/1024):0,limitSize:Number(Rl.STORAGE_LIMIT/1024)}}))}remove(e){return wr(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(Wn,{mpds_action:"mpds.remove.key",mpds_data:{keys:e},appId:br(this,sf)},{isMultiCallback:!1}).then((e=>{let t=[];return e&&e.mpds_data&&e.mpds_data.error_keys&&(t=e.mpds_data.error_keys),t}))}}))}clear(){return wr(this,void 0,void 0,(function*(){yield this.callNative(Wn,{mpds_action:"mpds.clear.appData",mpds_data:{},appId:br(this,sf)})}))}}sf=new WeakMap,uf=new WeakMap;class If{getDataFromStorage(e){return wr(this,void 0,void 0,(function*(){const t=this.getInstance(),n=yield t.get(e),r={};return n.forEach(((e,t)=>{r[t]=_r(e)})),r}))}putDataToStorage(e){return wr(this,void 0,void 0,(function*(){const t=this.getInstance(),n={};return Object.entries(e).forEach((([e,t])=>{i.isUndefined(t)||i.isNull(t)||(n[e]=gr(t))})),yield t.set(n)}))}removeDataFromStorage(e){return wr(this,void 0,void 0,(function*(){const t=this.getInstance();return yield t.remove(e)}))}clearStorage(){return wr(this,void 0,void 0,(function*(){const e=this.getInstance();yield e.clear()}))}getStorageInfo(){return wr(this,void 0,void 0,(function*(){const e=this.getInstance();return yield e.getInfo()}))}}class Nf extends If{constructor(e){super(),cf.set(this,void 0),kr(this,cf,e)}getInstance(){return new Rf(br(this,cf))}}cf=new WeakMap;class jf extends If{constructor(e){super(),lf.set(this,void 0),kr(this,lf,e)}getInstance(){return new Of(br(this,lf))}}lf=new WeakMap;class Lf{static setStorage(e){return wr(this,void 0,void 0,(function*(){let t=new Nf(this.getAppId());return vr()&&(t=new jf(this.getAppId())),yield t.putDataToStorage(e.data)}))}static getStorage(e){return wr(this,void 0,void 0,(function*(){let t=new Nf(this.getAppId());vr()&&(t=new jf(this.getAppId()));return yield t.getDataFromStorage(e.keys)}))}static getStorageInfo(e){return wr(this,void 0,void 0,(function*(){let e=new Nf(this.getAppId());return vr()&&(e=new jf(this.getAppId())),yield e.getStorageInfo()}))}static removeStorage(e){return wr(this,void 0,void 0,(function*(){let t=new Nf(this.getAppId());return vr()&&(t=new jf(this.getAppId())),yield t.removeDataFromStorage(e.keys)}))}static clearStorage(e={}){return wr(this,void 0,void 0,(function*(){let e=new Nf(this.getAppId());vr()&&(e=new jf(this.getAppId())),yield e.clearStorage()}))}}class Pf{static getUserInfo(e){return wr(this,void 0,void 0,(function*(){const t=yield this.getAccessToken();let n="id,name,picture";(null==e?void 0:e.avatarType)&&(n=`${n}.type(${null==e?void 0:e.avatarType})`);return{userInfo:yield xl.get(Rl.APIS.GET_USER_INFO,{params:{fields:n,access_token:t}}).then((e=>{const t=e.data,n={id:t.id,name:t.name,birthday:"",gender:"",avatar:t.picture&&t.picture.data&&t.picture.data.url};return console.warn("'birthday' and 'gender' are deprecated"),n}))}}))}static getPhoneNumber(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Hn,{},{isMultiCallback:!0,callback:(e,t)=>{if(0===e.error_code){const t={number:e.data};return Promise.resolve(t)}return Promise.reject(t)}})}))}}class Bf{static closeApp(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Cn,{})}))}static openMiniApp(e){return wr(this,void 0,void 0,(function*(){const t=null==e?void 0:e.appId,n=(null==e?void 0:e.params)||{},r=Object.entries(n).map((function([e,t]){return[e,t].join("=")})).join("&");yield this.callNative(Fn,{mpUrl:`${Rl.MINI_APP_INTERNAL_LINK}/${t}/${r.length>0?"?"+r:""}`,mpInfo:{appId:t}})}))}static openWebview(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(pn,{url:e.url})}))}}class Mf{static getLocation(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Rn,{silent_request:!1,permission_description:"Cho phép Zalo truy cập vào vị trí của thiết bị này?"},{isMultiCallback:!0,haveTimeout:!1,callback:(e,t)=>{if(0===e.error_code){const t=e.data,n={latitude:t.latitude,longitude:t.longitude,timestamp:t.timestamp,provider:t.provider};return Promise.resolve(n)}return Promise.reject(t)}})}))}static sendLocation(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(On,{title:e.title,touserid:e.toUserId,zapp:this.getZAppId()})}))}}class zf{static requestCameraPermission(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(wn,{},{callback:(e,t)=>-2===e.error_code||e.error_code>=0?Promise.resolve({userAllow:-2!==e.error_code,message:e.error_message}):Promise.reject(t)})}))}static saveImageToPhotosAlbum(e){return wr(this,void 0,void 0,(function*(){let t={};return t=i.isEmpty(e.imageBase64Data)?Object.assign(Object.assign({},t),{imageUrl:e.imageUrl}):Object.assign(Object.assign({},t),{imageBase64Data:e.imageBase64Data}),yield this.callNative(Dn,Object.assign({},t))}))}}class Uf{static viewOAQr(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Bn,{dpn:e.displayName,uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openProfile(t){return wr(this,void 0,void 0,(function*(){return yield this.callNative(dn,{uId:t.id,type:e.ProfileType[t.type],zapp:this.getZAppId(),sourceId:t.sourceId,sourceIndex:t.sourceIndex})}))}static openChat(t){return wr(this,void 0,void 0,(function*(){return yield this.callNative(vn,{uId:t.id,type:e.ChatType[t.type],zapp:this.getZAppId(),sourceId:t.sourceId,sourceIndex:t.sourceIndex})}))}static openPostFeed(t){return wr(this,void 0,void 0,(function*(){let n={};switch(t.type){case"image":n={photoUrl:t.data.imageUrl};break;case"link":n={link:t.data.link,title:t.data.title,thumb:t.data.thumb,description:t.data.description};break;case"profile":n={avt:t.data.avatar,uid:t.data.id,dpn:t.data.displayName}}return yield this.callNative(gn,Object.assign(Object.assign({type:e.PostFeedType[t.type]},n),{zapp:this.getZAppId()})).then((e=>({status:e.status,shareType:e.share_type,numberOfUser:e.uid_to_size})))}))}static followOA(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(_n,{uid:e.id,showDialogConfirm:!0,zapp:this.getZAppId()},{haveTimeout:!1})}))}static unfollowOA(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(mn,{uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openShareSheet(t){return wr(this,void 0,void 0,(function*(){let n={};switch(t.type){case"image":n={photoUrl:t.data.imageUrl};break;case"gif":n={photoUrl:t.data.imageUrl,gifUrl:t.data.gifUrl,width:t.data.width,height:t.data.height};break;case"video":n={videoThumb:t.data.videoThumb,videoUrl:t.data.videoUrl,width:t.data.width,height:t.data.height};break;case"link":n={link:t.data.link,chatOnly:t.data.chatOnly?1:0};break;case"oa":n={uid:t.data.id}}return yield this.callNative(yn,Object.assign(Object.assign({type:e.ShareSheetType[t.type]},n),{zapp:this.getZAppId()}),{haveTimeout:!1}).then((e=>({status:e.status,shareType:e.share_type,numberOfUser:e.uid_to_size})))}))}static createShortcut(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Sn,{url:`${Rl.MINI_APP_LINK}/${this.getAppId()}/`,title:document.title,iconUrl:`https:${sr("og:image:url")}`})}))}}class Df{static getRouteParams(){let e={};const t=window.location.href;try{let n=new URL(t).searchParams.toString();n&&(e=Ol.getParamsAsObject(n))}catch(e){throw new Error("Url không hợp lệ")}return e}static sendDataToPreviousMiniApp(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative($n,{result:gr(e.data)})}))}static onCallbackData(t){return wr(this,void 0,void 0,(function*(){yield this.events.on(e.Events.OnDataCallback,(e=>{t({data:e})}))}))}}class Ff extends Zl{constructor(){super(),ff.set(this,window.zAppID),hf.set(this,window.APP_ID),df.set(this,window.APP_CONFIG||{}),pf.set(this,void 0),vf.set(this,void 0),gf.set(this,{timer:{getToken:0}}),_f.set(this,!1),this.events=Sr.getInstance(),mf.set(this,(()=>{const e=br(this,df).app||null;if(e){const t=e.title,n=e.headerColor,r=e.textColor,o=e.statusBarColor,a=e.leftButton;if(i.isString(t)&&this.setNavigationBarTitle({title:t}),i.isString(n)){const e={color:n};!i.isString(r)||"black"!==r&&"white"!==r||(e.textColor=r),i.isString(o)&&(e.statusBarColor=o),this.setNavigationBarColor(e)}i.isString(a)&&this.setNavigationBarLeftButton({type:a})}})),yf.set(this,(()=>{try{br(this,mf).call(this)}catch(e){console.error(e)}})),wf.set(this,(()=>new Promise(((e,t)=>{this.callNative("action.jump.login",{}).then((t=>{const n=t&&t.cookiesOAuthLogins||[],r=n.find((e=>e.name===Rl.COOKIE_NAME.JS_TOKEN));r&&(this.setJSToken(r.value),window.ZJSBridge.setJSToken&&window.ZJSBridge.setJSToken(r.value)),e(n)})).catch((e=>{t(e)}))})))),bf.set(this,Xl.setNavigationBarRightButton),this.getVersion=Vl.getVersion,this.getSystemInfo=Vl.getSystemInfo,this.setNavigationBarTitle=Xl.setNavigationBarTitle,this.setNavigationBarColor=Xl.setNavigationBarColor,this.setNavigationBarLeftButton=Xl.setNavigationBarLeftButton,this.setBackgroundColor=Ql.setBackgroundColor,this.setDeviceOrientation=nf.setDeviceOrientation,this.setStorage=Lf.setStorage,this.getStorage=Lf.getStorage,this.getStorageInfo=Lf.getStorageInfo,this.removeStorage=Lf.removeStorage,this.clearStorage=Lf.clearStorage,this.getUserInfo=Pf.getUserInfo,this.getNetworkType=nf.getNetworkType,this.onNetworkStatusChange=nf.onNetworkStatusChange,this.startBeaconDiscovery=nf.startBeaconDiscovery,this.stopBeaconDiscovery=nf.stopBeaconDiscovery,this.getBeacons=nf.getBeacons,this.closeApp=Bf.closeApp,this.getLocation=Mf.getLocation,this.stopBluetoothDevicesDiscovery=nf.stopBluetoothDevicesDiscovery,this.startBluetoothDevicesDiscovery=nf.stopBluetoothDevicesDiscovery,this.openBluetoothAdapter=nf.openBluetoothAdapter,this.onBluetoothDeviceFound=nf.onBluetoothDeviceFound,this.onBluetoothAdapterStateChange=nf.onBluetoothAdapterStateChange,this.getConnectedBluetoothDevices=nf.getConnectedBluetoothDevices,this.getBluetoothDevices=nf.getBluetoothDevices,this.getBluetoothAdapterState=nf.getBluetoothAdapterState,this.closeBluetoothAdapter=nf.closeBluetoothAdapter,this.scanQRCode=nf.scanQRCode,this.openProfile=Uf.openProfile,this.openChat=Uf.openChat,this.openPostFeed=Uf.openPostFeed,this.followOA=Uf.followOA,this.unFollowOA=Uf.unfollowOA,this.openShareSheet=Uf.openShareSheet,this.requestCameraPermission=zf.requestCameraPermission,this.createShortcut=Uf.createShortcut,this.openBioAuthentication=nf.openBioAuthentication,this.checkStateBioAuthentication=nf.checkStateBioAuthentication,this.sendLocation=Mf.sendLocation,this.showToast=nf.showToast,this.hideKeyboard=nf.hideKeyboard,this.openPhone=nf.openPhone,this.openSMS=nf.openSMS,this.viewOAQr=Uf.viewOAQr,this.keepScreen=nf.keepScreen,this.saveImageToPhotosAlbum=zf.saveImageToPhotosAlbum,this.openMiniApp=Bf.openMiniApp,this.vibrate=nf.vibrate,this.openWebview=Bf.openWebview,this.getRouteParams=Df.getRouteParams,this.getAppInfo=Vl.getAppInfo,this.sendDataToPreviousMiniApp=Df.sendDataToPreviousMiniApp,this.onCallbackData=Df.onCallbackData,this.getPhoneNumber=Pf.getPhoneNumber,kr(this,pf,null),kr(this,vf,null),this.isShowNavBar=!0,this.isShowHomeButton=!0}static getInstance(){return Ff.instance||(Ff.instance=new Ff),Ff.instance}getLoginStatus(){return br(this,_f)}getAppId(){return br(this,hf)}getZAppId(){return br(this,ff)}login(e){return wr(this,void 0,void 0,(function*(){const e=(yield br(this,wf).call(this)).find((e=>e.name===Rl.COOKIE_NAME.ZOAUTH));if(!i.isUndefined(e)&&!i.isNull(e)&&i.isString(e.value)){kr(this,pf,e.value);const t=()=>wr(this,void 0,void 0,(function*(){return(i.isUndefined(br(this,pf))||i.isNull(br(this,pf)))&&clearInterval(br(this,gf).timer.getToken),yield xl.get("https://oauth.zaloapp.com/v3/access_token",{params:{app_id:br(this,ff),redirect_uri:`https://h5.zdn.vn/zapps/${br(this,hf)}/`,code:br(this,pf),isSDK:!0}}).then((e=>{let n=e.data;if(n.access_token){kr(this,vf,n.access_token);const e=1e3*parseInt(n.expires_in);return br(this,gf).timer.getToken||(br(this,gf).timer.getToken=window.setInterval(t,e)),kr(this,_f,!0),this.setZAccSession(br(this,vf)||""),window.ZJSBridge.setZAccSession&&window.ZJSBridge.setZAccSession(br(this,vf)||""),br(this,vf)}return kr(this,_f,!1),null}))}));return clearInterval(br(this,gf).timer.getToken),yield t(),"Login Success!"}throw Wl.loginFailed()}))}getAccessToken(e){return wr(this,void 0,void 0,(function*(){if(br(this,vf))return br(this,vf);throw Wl.loginRequired()}))}}ff=new WeakMap,hf=new WeakMap,df=new WeakMap,pf=new WeakMap,vf=new WeakMap,gf=new WeakMap,_f=new WeakMap,mf=new WeakMap,yf=new WeakMap,wf=new WeakMap,bf=new WeakMap;class qf{constructor(){kf.set(this,window.zAppID),Ef.set(this,window.APP_CONFIG||{}),Sf.set(this,"DEFAULT ZOAUTH"),Af.set(this,"DEFAULT ACCESS TOKEN"),Cf.set(this,{timer:{getToken:0}}),Tf.set(this,!1),this.getLoginStatus=()=>br(this,Tf),this.getAppId=()=>br(this,kf),this.login=()=>(kr(this,Tf,!0),Promise.resolve(br(this,Sf))),this.getAccessToken=()=>Promise.resolve(br(this,Af)),this.getVersion=Vl.getVersion,this.getSystemInfo=Vl.getSystemInfo,this.setNavigationBarTitle=()=>Promise.resolve(),this.setNavigationBarColor=()=>Promise.resolve(),this.setBackgroundColor=()=>Promise.resolve(),this.setNavigationBarLeftButton=()=>Promise.resolve(),this.setDeviceOrientation=()=>Promise.resolve(),this.setStorage=e=>wr(this,void 0,void 0,(function*(){const t=new Nf(this.getAppId());return yield t.putDataToStorage(e.data),{errorKeys:[]}})),this.getStorage=e=>wr(this,void 0,void 0,(function*(){const t=new Nf(this.getAppId());return yield t.getDataFromStorage(e.keys)})),this.getStorageInfo=e=>wr(this,void 0,void 0,(function*(){const e=new Nf(this.getAppId());return yield e.getStorageInfo()})),this.removeStorage=e=>wr(this,void 0,void 0,(function*(){const t=new Nf(this.getAppId());return yield t.removeDataFromStorage(e.keys)})),this.clearStorage=e=>wr(this,void 0,void 0,(function*(){const e=new Nf(this.getAppId());return yield e.clearStorage()})),this.getUserInfo=()=>(console.warn("birthday and gender are deprecated"),Promise.resolve({userInfo:{id:"3368637342326461234",name:"User Name",avatar:"https://h5.zdn.vn/static/images/avatar.png"}})),this.getNetworkType=()=>{let t;switch((navigator.connection||navigator.mozConnection||navigator.webkitConnection).effectiveType){case"none":t=e.NetworkType.none;break;case"4g":t=e.NetworkType.wifi;break;case"3g":case"2g":t=e.NetworkType.cellular;break;default:t=e.NetworkType.unknown}const n={networkType:t};return Promise.resolve(n)},this.onNetworkStatusChange=t=>{const n=navigator.connection||navigator.mozConnection||navigator.webkitConnection,r=n.effectiveType;return n.addEventListener("change",(function(){let n;switch(r){case"none":n=e.NetworkType.none;break;case"4g":n=e.NetworkType.wifi;break;case"3g":case"2g":n=e.NetworkType.cellular;break;default:n=e.NetworkType.unknown}t({isConnected:!0,networkType:n})})),Promise.resolve()},this.startBeaconDiscovery=e=>Promise.resolve(!0),this.stopBeaconDiscovery=e=>Promise.resolve(!0),this.getBeacons=e=>Promise.resolve({beacons:[]}),this.closeApp=()=>Promise.resolve(),this.getLocation=()=>Promise.resolve({longitude:"105.788026",latitude:"21.0258773",timestamp:(new Date).getTime().toString(),provider:"fused"}),this.onBackButtonClick=()=>Promise.resolve(),this.stopBluetoothDevicesDiscovery=()=>Promise.resolve(),this.startBluetoothDevicesDiscovery=()=>Promise.resolve(),this.openBluetoothAdapter=()=>Promise.resolve(),this.onBluetoothDeviceFound=()=>Promise.resolve(),this.onBluetoothAdapterStateChange=()=>Promise.resolve(),this.getConnectedBluetoothDevices=()=>Promise.resolve(),this.getBluetoothDevices=()=>Promise.resolve(),this.getBluetoothAdapterState=()=>Promise.resolve(),this.closeBluetoothAdapter=()=>Promise.resolve(),this.scanQRCode=()=>Promise.resolve({content:"132"}),this.openProfile=()=>Promise.resolve(),this.openChat=()=>Promise.resolve(),this.openPostFeed=()=>Promise.resolve({status:1,shareType:0,numberOfUser:0}),this.followOA=()=>Promise.resolve(),this.unFollowOA=()=>Promise.resolve(),this.openShareSheet=()=>Promise.resolve({status:2,shareType:0,numberOfUser:0}),this.requestCameraPermission=()=>Promise.resolve({userAllow:!0,message:"Success"}),this.createShortcut=()=>Promise.resolve(),this.openBioAuthentication=()=>Promise.resolve({code:0,message:"OK",data:{domain:"",code:0,message:"",payToken:""}}),this.checkStateBioAuthentication=()=>Promise.resolve({bioState:""}),this.sendLocation=()=>Promise.resolve(),this.showToast=()=>Promise.resolve(),this.hideKeyboard=()=>Promise.resolve(),this.openPhone=()=>Promise.resolve(),this.openSMS=()=>Promise.resolve(),this.viewOAQr=()=>Promise.resolve(),this.keepScreen=()=>Promise.resolve(),this.saveImageToPhotosAlbum=()=>Promise.resolve(),this.openMiniApp=e=>Promise.resolve(),this.vibrate=()=>Promise.resolve(),this.openWebview=e=>(location.replace(e.url),Promise.resolve()),this.getRouteParams=Df.getRouteParams,this.getAppInfo=()=>Promise.resolve({description:"",name:"",version:"",appUrl:"",qrCodeUrl:""}),this.sendDataToPreviousMiniApp=e=>Promise.resolve(),this.onCallbackData=e=>(e({data:""}),Promise.resolve()),this.getPhoneNumber=()=>(console.warn("This api only works on zalo app"),Promise.resolve({number:""}))}on(e,t,n){throw new Error("Method not implemented.")}once(e,t,n){throw new Error("Method not implemented.")}off(e,t,n,r){throw new Error("Method not implemented.")}removeAllListeners(e){throw new Error("Method not implemented.")}}kf=new WeakMap,Ef=new WeakMap,Sf=new WeakMap,Af=new WeakMap,Cf=new WeakMap,Tf=new WeakMap,function(e){!function(n){var r="object"==typeof t?t:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=o(e);function o(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===r.Reflect?r.Reflect=e:i=o(r.Reflect,i),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,s=!o&&!a,u={create:o?function(){return ie(Object.create(null))}:a?function(){return ie({__proto__:null})}:function(){return ie({})},has:s?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:s?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},c=Object.getPrototypeOf(Function),l="object"==typeof O&&O.env&&"true"===O.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?te():Map,h=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?ne():Set,d=new(l||"function"!=typeof WeakMap?re():WeakMap);function p(e,t,n,r){if(B(n)){if(!$(e))throw new TypeError;if(!K(t))throw new TypeError;return S(e,t)}if(!$(e))throw new TypeError;if(!U(t))throw new TypeError;if(!U(r)&&!B(r)&&!M(r))throw new TypeError;return M(r)&&(r=void 0),A(e,t,n=W(n),r)}function v(e,t){function n(n,r){if(!U(n))throw new TypeError;if(!B(r)&&!Y(r))throw new TypeError;N(e,t,n,r)}return n}function g(e,t,n,r){if(!U(n))throw new TypeError;return B(r)||(r=W(r)),N(e,t,n,r)}function _(e,t,n){if(!U(t))throw new TypeError;return B(n)||(n=W(n)),T(e,t,n)}function m(e,t,n){if(!U(t))throw new TypeError;return B(n)||(n=W(n)),x(e,t,n)}function y(e,t,n){if(!U(t))throw new TypeError;return B(n)||(n=W(n)),R(e,t,n)}function w(e,t,n){if(!U(t))throw new TypeError;return B(n)||(n=W(n)),I(e,t,n)}function b(e,t){if(!U(e))throw new TypeError;return B(t)||(t=W(t)),j(e,t)}function k(e,t){if(!U(e))throw new TypeError;return B(t)||(t=W(t)),L(e,t)}function E(e,t,n){if(!U(t))throw new TypeError;B(n)||(n=W(n));var r=C(t,n,!1);if(B(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=d.get(t);return i.delete(n),i.size>0||d.delete(t),!0}function S(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!B(r)&&!M(r)){if(!K(r))throw new TypeError;t=r}}return t}function A(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!B(o)&&!M(o)){if(!U(o))throw new TypeError;r=o}}return r}function C(e,t,n){var r=d.get(e);if(B(r)){if(!n)return;r=new f,d.set(e,r)}var i=r.get(t);if(B(i)){if(!n)return;i=new f,r.set(t,i)}return i}function T(e,t,n){if(x(e,t,n))return!0;var r=ee(t);return!M(r)&&T(e,r,n)}function x(e,t,n){var r=C(t,n,!1);return!B(r)&&q(r.has(e))}function R(e,t,n){if(x(e,t,n))return I(e,t,n);var r=ee(t);return M(r)?void 0:R(e,r,n)}function I(e,t,n){var r=C(t,n,!1);if(!B(r))return r.get(e)}function N(e,t,n,r){C(n,r,!0).set(e,t)}function j(e,t){var n=L(e,t),r=ee(e);if(null===r)return n;var i=j(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new h,a=[],s=0,u=n;s<u.length;s++){var c=u[s];o.has(c)||(o.add(c),a.push(c))}for(var l=0,f=i;l<f.length;l++){c=f[l];o.has(c)||(o.add(c),a.push(c))}return a}function L(e,t){var n=[],r=C(e,t,!1);if(B(r))return n;for(var i=J(r.keys()),o=0;;){var a=X(i);if(!a)return n.length=o,n;var s=V(a);try{n[o]=s}catch(e){try{Q(i)}finally{throw e}}o++}}function P(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function B(e){return void 0===e}function M(e){return null===e}function z(e){return"symbol"==typeof e}function U(e){return"object"==typeof e?null!==e:"function"==typeof e}function D(e,t){switch(P(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n=3===t?"string":5===t?"number":"default",i=G(e,r);if(void 0!==i){var o=i.call(e,n);if(U(o))throw new TypeError;return o}return F(e,"default"===n?"number":n)}function F(e,t){if("string"===t){var n=e.toString;if(H(n))if(!U(i=n.call(e)))return i;if(H(r=e.valueOf))if(!U(i=r.call(e)))return i}else{var r;if(H(r=e.valueOf))if(!U(i=r.call(e)))return i;var i,o=e.toString;if(H(o))if(!U(i=o.call(e)))return i}throw new TypeError}function q(e){return!!e}function Z(e){return""+e}function W(e){var t=D(e,3);return z(t)?t:Z(t)}function $(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function H(e){return"function"==typeof e}function K(e){return"function"==typeof e}function Y(e){switch(P(e)){case 3:case 4:return!0;default:return!1}}function G(e,t){var n=e[t];if(null!=n){if(!H(n))throw new TypeError;return n}}function J(e){var t=G(e,i);if(!H(t))throw new TypeError;var n=t.call(e);if(!U(n))throw new TypeError;return n}function V(e){return e.value}function X(e){var t=e.next();return!t.done&&t}function Q(e){var t=e.return;t&&t.call(e)}function ee(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===c)return t;if(t!==c)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i||i===e?t:i}function te(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,o)},t.prototype.entries=function(){return new n(this._keys,this._values,a)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function o(e,t){return t}function a(e,t){return[e,t]}}function ne(){return function(){function e(){this._map=new f}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}()}function re(){var e=16,n=u.create(),r=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do{e="@@WeakMap@@"+c()}while(u.has(n,e));return n[e]=!0,e}function o(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:u.create()})}return e[r]}function a(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function s(e){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):a(new Uint8Array(e),e):a(new Array(e),e)}function c(){var t=s(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var n="",r=0;r<e;++r){var i=t[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function ie(e){return e.__=void 0,delete e.__,e}e("decorate",p),e("metadata",v),e("defineMetadata",g),e("hasMetadata",_),e("hasOwnMetadata",m),e("getMetadata",y),e("getOwnMetadata",w),e("getMetadataKeys",b),e("getOwnMetadataKeys",k),e("deleteMetadata",E)}(i)}()}(xf||(xf={}));const Zf=Symbol("required"),Wf=Symbol("checkType"),$f=(...e)=>(t,n,r)=>{let i=Reflect.getOwnMetadata(Zf,t,n)||[];i.push({parameterIndex:r,fields:e}),Reflect.defineMetadata(Zf,i,t,n)},Hf=(e,t,n)=>(r,i,o)=>{let a=Reflect.getOwnMetadata(Wf,r,i)||[];a.push({parameterIndex:o,type:e,properties:t,key:n}),Reflect.defineMetadata(Wf,a,r,i)};const Kf=(e,t,n)=>{const r=n.value,o=r.toString().match(/\(.*?\)/)[0].replace(/[()]/gi,"").replace(/\s/gi,"").split(",");return n.value=function(){const n=Reflect.getOwnMetadata(Zf,e,t),a=Reflect.getOwnMetadata(Wf,e,t);return a&&a.forEach((e=>{const{parameterIndex:t,type:n,properties:r,key:a}=e;let s=arguments[t],u=o[t];if(!i.isEmpty(a)){const e=null==a?void 0:a.split(".");Array.isArray(e)&&e.length>0&&e.forEach((e=>{s=s[e],u=`${u}.${e}`}))}const c=typeof s;if(!i.isUndefined(s)){if(!lr(s,n))throw Wl.wrongTypeParam(u,n,Array.isArray(s)?"array":null===s?"null":c);"object"===n&&Object.entries(r).forEach((([e,t])=>{const n=s[e];if(!i.isUndefined(n)){if(Array.isArray(t)&&!t.includes(n))throw Wl.wrongTypeParam(`${u}.${e}`,`${t}`.replace(/,/g,"|"),`'${n}'`);if(!Array.isArray(t)&&!lr(n,t))throw Wl.wrongTypeParam(`${u}.${e}`,t,Array.isArray(n)?"array":null===n?"null":typeof n)}}))}})),n&&n.forEach((e=>{const{parameterIndex:t,fields:n}=e,r=arguments[t],a=o[t],s=typeof r;if(!Array.isArray(r)&&"object"===s&&n.some((e=>i.isUndefined(r[e]))))throw Wl.missingParam(`${n} in ${a}`);if("object"!==s&&(t>=arguments.length||i.isUndefined(r)))throw Wl.missingParam(a)})),r.apply(this,arguments)},n};var Yf;class Gf{constructor(){this.events=Sr.getInstance(),Yf.set(this,void 0),kr(this,Yf,this.getInstance()),this.events.addListener=(t,n,r)=>{const i=t;return this.events.addListener(e.Events[i],n,r)}}login(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).login(e)}))}getLoginStatus(){return br(this,Yf).getLoginStatus()}getAccessToken(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getAccessToken(e)}))}getVersion(){return br(this,Yf).getVersion()}getSystemInfo(){return br(this,Yf).getSystemInfo()}setNavigationBarTitle(e){return wr(this,void 0,void 0,(function*(){return br(this,Yf).setNavigationBarTitle(e)}))}setNavigationBarColor(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setNavigationBarColor(e)}))}setBackgroundColor(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setBackgroundColor(e)}))}setNavigationBarLeftButton(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setNavigationBarLeftButton(e)}))}setDeviceOrientation(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setDeviceOrientation(e)}))}setStorage(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setStorage(e)}))}getStorage(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getStorage(e)}))}getStorageInfo(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getStorageInfo(e)}))}removeStorage(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).removeStorage(e)}))}clearStorage(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).clearStorage(e)}))}getUserInfo(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getUserInfo(e)}))}getNetworkType(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getNetworkType(e)}))}onNetworkStatusChange(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).onNetworkStatusChange(e)}))}startBeaconDiscovery(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).startBeaconDiscovery(e)}))}stopBeaconDiscovery(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).stopBeaconDiscovery(e)}))}getBeacons(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getBeacons(e)}))}closeApp(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).closeApp(e)}))}getLocation(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getLocation(e)}))}stopBluetoothDevicesDiscovery(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).stopBluetoothDevicesDiscovery()}))}startBluetoothDevicesDiscovery(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).startBluetoothDevicesDiscovery(e)}))}openBluetoothAdapter(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).openBluetoothAdapter()}))}onBluetoothDeviceFound(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).onBluetoothDeviceFound()}))}onBluetoothAdapterStateChange(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).onBluetoothAdapterStateChange()}))}getConnectedBluetoothDevices(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getConnectedBluetoothDevices(e)}))}getBluetoothDevices(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getBluetoothDevices()}))}getBluetoothAdapterState(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getBluetoothAdapterState()}))}closeBluetoothAdapter(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).closeBluetoothAdapter()}))}scanQRCode(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).scanQRCode(e)}))}openProfile(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).openProfile(e)}))}openChat(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).openChat(e)}))}openPostFeed(e){return wr(this,void 0,void 0,(function*(){const t=e.type;if("image"===t&&fr(e.data.imageUrl))throw Wl.wrongTypeParam("object.data.imageUrl","valid url","invalid");if("link"===t&&(fr(e.data.link)||!ir(e.data.link)))throw Wl.wrongTypeParam("object.data.link","valid url","invalid");if("profile"===t){if(fr(e.data.id))throw Wl.wrongTypeParam("object.data.id","valid id","empty");if(fr(e.data.avatar)||!ir(e.data.avatar))throw Wl.wrongTypeParam("object.data.avatar","valid url","invalid");if(fr(e.data.displayName))throw Wl.wrongTypeParam("object.data.displayName","valid displayName","empty")}return yield br(this,Yf).openPostFeed(e)}))}followOA(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).followOA(e)}))}unfollowOA(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).unFollowOA(e)}))}openShareSheet(e){return wr(this,void 0,void 0,(function*(){const t=e.type;if("image"===t&&fr(e.data.imageUrl))throw Wl.wrongTypeParam("object.data.imageUrl","valid url","invalid");if("gif"===t&&(fr(e.data.gifUrl)||!ir(e.data.gifUrl)))throw Wl.wrongTypeParam("object.data.gifUrl","valid url","invalid");if("video"===t){if(fr(e.data.videoThumb)||!ir(e.data.videoThumb))throw Wl.wrongTypeParam("object.data.videoThumb","valid url","invalid");if(fr(e.data.videoUrl)||!ir(e.data.videoUrl))throw Wl.wrongTypeParam("object.data.videoUrl","valid url","invalid")}else{if("link"===t&&(fr(e.data.link)||!ir(e.data.link)))throw Wl.wrongTypeParam("object.data.link","valid url","invalid");if("oa"===t&&fr(e.data.id))throw Wl.wrongTypeParam("object.data.id","valid id","empty")}return yield br(this,Yf).openShareSheet(e)}))}requestCameraPermission(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).requestCameraPermission(e)}))}createShortcut(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).createShortcut(e)}))}openBioAuthentication(e){var t;return wr(this,void 0,void 0,(function*(){return i.isUndefined(e.requireFingerprint)&&(e.requireFingerprint=!0),fr(null===(t=e.ui)||void 0===t?void 0:t.title)&&(e.ui=Object.assign(Object.assign({},e.ui),{title:"Xác thực"})),fr(e.ui.subTitle)&&(e.ui=Object.assign(Object.assign({},e.ui),{subTitle:"Sử dụng sinh trắc học của bạn để xác thực"})),fr(e.ui.negativeButtonText)&&(e.ui=Object.assign(Object.assign({},e.ui),{negativeButtonText:"Đóng"})),yield br(this,Yf).openBioAuthentication(e)}))}checkStateBioAuthentication(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).checkStateBioAuthentication(e)}))}sendLocation(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).sendLocation(e)}))}showToast(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).showToast(e)}))}hideKeyboard(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).hideKeyboard(e)}))}openPhone(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).openPhone(e)}))}openSMS(e){return wr(this,void 0,void 0,(function*(){if(!/^\+?\d+$/.test(e.phoneNumber))throw Wl.wrongTypeParam("object.phoneNumber","valid phone","invalid");yield br(this,Yf).openSMS(e)}))}viewOAQr(e){return wr(this,void 0,void 0,(function*(){(i.isUndefined(e.displayName)||i.isNull(e.displayName))&&(e.displayName=""),yield br(this,Yf).viewOAQr(e)}))}keepScreen(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).keepScreen(e)}))}saveImageToPhotosAlbum(e){return wr(this,void 0,void 0,(function*(){if(fr(e.imageBase64Data)&&fr(e.imageUrl))throw Wl.wrongTypeParam("object.imageBase64Data | object.imageUrl","valid data","invalid");if(!fr(e.imageUrl)&&!ir(e.imageUrl))throw Wl.wrongTypeParam("object.imageUrl","valid url","invalid");return yield br(this,Yf).saveImageToPhotosAlbum(e)}))}openMiniApp(e){return wr(this,void 0,void 0,(function*(){if(!i.isEmpty(e.params)){const t=e.params||{};Object.keys(t).forEach((e=>{"object"==typeof t[e]&&(t[e]=JSON.stringify(t[e])),t[e]=""+encodeURIComponent(t[e])})),e.params=t}yield br(this,Yf).openMiniApp(e)}))}vibrate(e){return wr(this,void 0,void 0,(function*(){fr(e.type)&&(e.type="oneShot"),fr(e.milliseconds)&&(e.milliseconds=500),yield br(this,Yf).vibrate(e)}))}openWebview(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).openWebview(e)}))}getRouteParams(){return br(this,Yf).getRouteParams()}getAppInfo(e){return br(this,Yf).getAppInfo()}sendDataToPreviousMiniApp(e){return br(this,Yf).sendDataToPreviousMiniApp(e)}onCallbackData(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).onCallbackData(e)}))}getPhoneNumber(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getPhoneNumber()}))}}Yf=new WeakMap,mr([Dl],Gf.prototype,"login",null),mr([Fl],Gf.prototype,"getLoginStatus",null),mr([Dl],Gf.prototype,"getAccessToken",null),mr([Fl],Gf.prototype,"getVersion",null),mr([Fl],Gf.prototype,"getSystemInfo",null),mr([Dl,Kf,yr(0,Hf("object",{title:"string"})),yr(0,$f("title"))],Gf.prototype,"setNavigationBarTitle",null),mr([Dl,Kf,yr(0,Hf("object",{color:"string",textColor:["white","black"],statusBarColor:"string"})),yr(0,$f("color"))],Gf.prototype,"setNavigationBarColor",null),mr([Dl,Kf,yr(0,Hf("object",{backgroundColor:"string",textColor:["white","black"]})),yr(0,$f("backgroundColor"))],Gf.prototype,"setBackgroundColor",null),mr([Dl,Kf,yr(0,Hf("object",{type:["none","back","home","both"]})),yr(0,$f("type"))],Gf.prototype,"setNavigationBarLeftButton",null),mr([Dl,Kf,yr(0,Hf("object",{rotate:["auto","portrait","landscape"]})),yr(0,$f("rotate"))],Gf.prototype,"setDeviceOrientation",null),mr([Dl,Kf,yr(0,Hf("object",{data:"object"})),yr(0,$f("data"))],Gf.prototype,"setStorage",null),mr([Dl,Kf,yr(0,Hf("object",{keys:"array<string>"})),yr(0,$f("keys"))],Gf.prototype,"getStorage",null),mr([Dl],Gf.prototype,"getStorageInfo",null),mr([Dl,Kf,yr(0,Hf("object",{keys:"array<string>"})),yr(0,$f("keys"))],Gf.prototype,"removeStorage",null),mr([Dl],Gf.prototype,"clearStorage",null),mr([Dl,Kf,yr(0,Hf("object",{avatarType:["small","normal","large"]}))],Gf.prototype,"getUserInfo",null),mr([Dl],Gf.prototype,"getNetworkType",null),mr([Dl],Gf.prototype,"onNetworkStatusChange",null),mr([Dl],Gf.prototype,"startBeaconDiscovery",null),mr([Dl],Gf.prototype,"stopBeaconDiscovery",null),mr([Dl],Gf.prototype,"getBeacons",null),mr([Dl],Gf.prototype,"closeApp",null),mr([Dl],Gf.prototype,"getLocation",null),mr([Dl],Gf.prototype,"stopBluetoothDevicesDiscovery",null),mr([Dl],Gf.prototype,"startBluetoothDevicesDiscovery",null),mr([Dl],Gf.prototype,"openBluetoothAdapter",null),mr([Dl],Gf.prototype,"onBluetoothDeviceFound",null),mr([Dl],Gf.prototype,"onBluetoothAdapterStateChange",null),mr([Dl],Gf.prototype,"getConnectedBluetoothDevices",null),mr([Dl],Gf.prototype,"getBluetoothDevices",null),mr([Dl],Gf.prototype,"getBluetoothAdapterState",null),mr([Dl],Gf.prototype,"closeBluetoothAdapter",null),mr([Dl],Gf.prototype,"scanQRCode",null),mr([Dl,Kf,yr(0,Hf("object",{type:["user","oa","aliasOA"],id:"string"})),yr(0,$f("type","id"))],Gf.prototype,"openProfile",null),mr([Dl,Kf,yr(0,Hf("object",{type:["user","oa"],id:"string"})),yr(0,$f("type","id"))],Gf.prototype,"openChat",null),mr([Dl,Kf,yr(0,Hf("object",{type:["image","link","profile"],data:"object"})),yr(0,Hf("object",{imageUrl:"string",link:"string",title:"string",thumb:"string",description:"string",avatar:"string",id:"string",displayName:"string"},"data")),yr(0,$f("type","data"))],Gf.prototype,"openPostFeed",null),mr([Dl,Kf,yr(0,Hf("object",{id:"string",showDialogConfirm:"boolean"})),yr(0,$f("id"))],Gf.prototype,"followOA",null),mr([Dl,Kf,yr(0,Hf("object",{id:"string"})),yr(0,$f("id"))],Gf.prototype,"unfollowOA",null),mr([Dl,Kf,yr(0,Hf("object",{type:["image","gif","video","link","oa"],data:"object"})),yr(0,Hf("object",{imageUrl:"string",gifUrl:"string",width:"number",height:"number",videoThumb:"string",videoUrl:"string",link:"string",chatOnly:"boolean",id:"string"},"data")),yr(0,$f("type","data"))],Gf.prototype,"openShareSheet",null),mr([Dl],Gf.prototype,"requestCameraPermission",null),mr([Dl],Gf.prototype,"createShortcut",null),mr([Dl,Kf,yr(0,$f("secretData")),yr(0,Hf("object",{secretData:"string",ui:"object",requireFingerprint:"boolean"})),yr(0,Hf("object",{title:"string",subTitle:"string",negativeButtonText:"string"},"ui"))],Gf.prototype,"openBioAuthentication",null),mr([Dl],Gf.prototype,"checkStateBioAuthentication",null),mr([Dl,Kf,yr(0,$f("toUserId"))],Gf.prototype,"sendLocation",null),mr([Dl,Kf,yr(0,$f("message"))],Gf.prototype,"showToast",null),mr([Dl],Gf.prototype,"hideKeyboard",null),mr([Dl,Kf,yr(0,$f("phoneNumber")),yr(0,Hf("object",{phoneNumber:"string"}))],Gf.prototype,"openPhone",null),mr([Dl,Kf,yr(0,$f("content","phoneNumber")),yr(0,Hf("object",{content:"string",phoneNumber:"string"}))],Gf.prototype,"openSMS",null),mr([Dl,Kf,yr(0,$f("id")),yr(0,Hf("object",{id:"string",displayName:"string"}))],Gf.prototype,"viewOAQr",null),mr([Dl],Gf.prototype,"keepScreen",null),mr([Dl,Kf,yr(0,Hf("object",{imageBase64Data:"string",imageUrl:"string",type:"string"}))],Gf.prototype,"saveImageToPhotosAlbum",null),mr([Dl,Kf,yr(0,$f("appId")),yr(0,Hf("object",{appId:"string",params:"object"}))],Gf.prototype,"openMiniApp",null),mr([Dl,Kf,yr(0,Hf("object",{type:["oneShot"],milliseconds:"number"}))],Gf.prototype,"vibrate",null),mr([Dl,Kf,yr(0,$f("url")),yr(0,Hf("object",{url:"string"}))],Gf.prototype,"openWebview",null),mr([Fl],Gf.prototype,"getRouteParams",null),mr([Dl],Gf.prototype,"getAppInfo",null),mr([Dl],Gf.prototype,"sendDataToPreviousMiniApp",null),mr([Dl],Gf.prototype,"onCallbackData",null),mr([Dl],Gf.prototype,"getPhoneNumber",null);class Jf extends Gf{getInstance(){return Ff.getInstance()}}class Vf extends Gf{getInstance(){return new qf}}const Xf=ar();e.default=void 0,window.onJSCall=e=>function(t){Bl.getInstance().onJSCall(e,t)},window.onMultiJSCall=e=>function(t){Bl.getInstance().onMultiJSCall(e,t)},window.zaloJSV2={zalo_h5_event_handler:function(e,t,n){Bl.getInstance().nativeEventHandler(e,t,n)}},Xf.isZalo?e.default=new Jf:e.default=new Vf,window.ZaloMiniAppSDK=e.default,e.SDKCreator=Gf,e.default=e.default,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
18
|
+
var vo=2147483647,go=/[^\x20-\x7E]/,_o=/[\x2E\u3002\uFF0E\uFF61]/g,mo={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},yo=Math.floor,wo=String.fromCharCode;function bo(e){throw new RangeError(mo[e])}function ko(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function Eo(e,t,n){var r=0;for(e=n?yo(e/700):e>>1,e+=yo(e/t);e>455;r+=36)e=yo(e/35);return yo(r+36*e/(e+38))}function So(e){return function(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]);var i=function(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}((e=e.replace(_o,".")).split("."),t).join(".");return r+i}(e,(function(e){return go.test(e)?"xn--"+function(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,p,v,g=[];for(h=(e=function(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}(e)).length,t=128,n=0,o=72,a=0;a<h;++a)(f=e[a])<128&&g.push(wo(f));for(r=i=g.length,i&&g.push("-");r<h;){for(s=vo,a=0;a<h;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>yo((vo-n)/(d=r+1))&&bo("overflow"),n+=(s-t)*d,t=s,a=0;a<h;++a)if((f=e[a])<t&&++n>vo&&bo("overflow"),f==t){for(u=n,c=36;!(u<(l=c<=o?1:c>=o+26?26:c-o));c+=36)v=u-l,p=36-l,g.push(wo(ko(l+v%p,0))),u=yo(v/p);g.push(wo(ko(u,0))),o=Eo(n,d,r==i),n=0,++r}++n,++t}return g.join("")}(e):e}))}function Ao(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Co=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function To(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function xo(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var Ro=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t};function Oo(e,t,n,r){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var u=0;u<s;++u){var c,l,f,h,d=e[u].replace(o,"%20"),p=d.indexOf(n);p>=0?(c=d.substr(0,p),l=d.substr(p+1)):(c=d,l=""),f=decodeURIComponent(c),h=decodeURIComponent(l),Ao(i,f)?Co(i[f])?i[f].push(h):i[f]=[i[f],h]:i[f]=h}return i}var Io={parse:$o,resolve:Go,resolveObject:Jo,format:Ko,Url:No};function No(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var jo=/^([a-z0-9.+-]+:)/i,Lo=/:[0-9]*$/,Po=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Bo=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Mo=["'"].concat(Bo),zo=["%","/","?",";","#"].concat(Mo),Uo=["/","?","#"],Do=/^[+a-z0-9A-Z_-]{0,63}$/,Fo=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,qo={javascript:!0,"javascript:":!0},Zo={javascript:!0,"javascript:":!0},Wo={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function $o(e,t,n){if(e&&ht(e)&&e instanceof No)return e;var r=new No;return r.parse(e,t,n),r}function Ho(e,t,n,r){if(!ut(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),o=-1!==i&&i<t.indexOf("#")?"?":"#",a=t.split(o);a[0]=a[0].replace(/\\/g,"/");var s=t=a.join(o);if(s=s.trim(),!r&&1===t.split("#").length){var u=Po.exec(s);if(u)return e.path=s,e.href=s,e.pathname=u[1],u[2]?(e.search=u[2],e.query=n?Oo(e.search.substr(1)):e.search.substr(1)):n&&(e.search="",e.query={}),e}var c,l,f,h,d=jo.exec(s);if(d){var p=(d=d[0]).toLowerCase();e.protocol=p,s=s.substr(d.length)}if(r||d||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===s.substr(0,2);!v||d&&Zo[d]||(s=s.substr(2),e.slashes=!0)}if(!Zo[d]&&(v||d&&!Wo[d])){var g,_,m=-1;for(c=0;c<Uo.length;c++)-1!==(l=s.indexOf(Uo[c]))&&(-1===m||l<m)&&(m=l);for(-1!==(_=-1===m?s.lastIndexOf("@"):s.lastIndexOf("@",m))&&(g=s.slice(0,_),s=s.slice(_+1),e.auth=decodeURIComponent(g)),m=-1,c=0;c<zo.length;c++)-1!==(l=s.indexOf(zo[c]))&&(-1===m||l<m)&&(m=l);-1===m&&(m=s.length),e.host=s.slice(0,m),s=s.slice(m),Vo(e),e.hostname=e.hostname||"";var y="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!y){var w=e.hostname.split(/\./);for(c=0,f=w.length;c<f;c++){var b=w[c];if(b&&!b.match(Do)){for(var k="",E=0,S=b.length;E<S;E++)b.charCodeAt(E)>127?k+="x":k+=b[E];if(!k.match(Do)){var A=w.slice(0,c),C=w.slice(c+1),T=b.match(Fo);T&&(A.push(T[1]),C.unshift(T[2])),C.length&&(s="/"+C.join(".")+s),e.hostname=A.join(".");break}}}}e.hostname.length>255?e.hostname="":e.hostname=e.hostname.toLowerCase(),y||(e.hostname=So(e.hostname)),h=e.port?":"+e.port:"";var x=e.hostname||"";e.host=x+h,e.href+=e.host,y&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!qo[p])for(c=0,f=Mo.length;c<f;c++){var R=Mo[c];if(-1!==s.indexOf(R)){var O=encodeURIComponent(R);O===R&&(O=escape(R)),s=s.split(R).join(O)}}var I=s.indexOf("#");-1!==I&&(e.hash=s.substr(I),s=s.slice(0,I));var N=s.indexOf("?");if(-1!==N?(e.search=s.substr(N),e.query=s.substr(N+1),n&&(e.query=Oo(e.query)),s=s.slice(0,N)):n&&(e.search="",e.query={}),s&&(e.pathname=s),Wo[p]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){h=e.pathname||"";var j=e.search||"";e.path=h+j}return e.href=Yo(e),e}function Ko(e){return ut(e)&&(e=Ho({},e)),Yo(e)}function Yo(e){var t=e.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var n=e.protocol||"",r=e.pathname||"",i=e.hash||"",o=!1,a="";e.host?o=t+e.host:e.hostname&&(o=t+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(o+=":"+e.port)),e.query&&ht(e.query)&&Object.keys(e.query).length&&(a=function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?xo(Ro(e),(function(r){var i=encodeURIComponent(To(r))+n;return Co(e[r])?xo(e[r],(function(e){return i+encodeURIComponent(To(e))})).join(t):i+encodeURIComponent(To(e[r]))})).join(t):r?encodeURIComponent(To(r))+n+encodeURIComponent(To(e)):""}(e.query));var s=e.search||a&&"?"+a||"";return n&&":"!==n.substr(-1)&&(n+=":"),e.slashes||(!n||Wo[n])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),n+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+i}function Go(e,t){return $o(e,!1,!0).resolve(t)}function Jo(e,t){return e?$o(e,!1,!0).resolveObject(t):t}function Vo(e){var t=e.host,n=Lo.exec(t);n&&(":"!==(n=n[0])&&(e.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(e.hostname=t)}No.prototype.parse=function(e,t,n){return Ho(this,e,t,n)},No.prototype.format=function(){return Yo(this)},No.prototype.resolve=function(e){return this.resolveObject($o(e,!1,!0)).format()},No.prototype.resolveObject=function(e){if(ut(e)){var t=new No;t.parse(e,!1,!0),e=t}for(var n,r=new No,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(r[c]=e[c])}return Wo[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!Wo[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var h=l[f];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||Zo[e.protocol])r.pathname=e.pathname;else{for(n=(e.pathname||"").split("/");n.length&&!(e.host=n.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),r.pathname=n.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",p=r.search||"";r.path=d+p}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v,g=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),m=_||g||r.host&&e.pathname,y=m,w=r.pathname&&r.pathname.split("/")||[],b=r.protocol&&!Wo[r.protocol];if(n=e.pathname&&e.pathname.split("/")||[],b&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===n[0]?n[0]=e.host:n.unshift(e.host)),e.host=null),m=m&&(""===n[0]||""===w[0])),_)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=n;else if(n.length)w||(w=[]),w.pop(),w=w.concat(n),r.search=e.search,r.query=e.query;else if(!at(e.search))return b&&(r.hostname=r.host=w.shift(),(v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=v.shift(),r.host=r.hostname=v.shift())),r.search=e.search,r.query=e.query,ot(r.pathname)&&ot(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=w.slice(-1)[0],E=(r.host||e.host||w.length>1)&&("."===k||".."===k)||""===k,S=0,A=w.length;A>=0;A--)"."===(k=w[A])?w.splice(A,1):".."===k?(w.splice(A,1),S++):S&&(w.splice(A,1),S--);if(!m&&!y)for(;S--;S)w.unshift("..");!m||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),E&&"/"!==w.join("/").substr(-1)&&w.push("");var C=""===w[0]||w[0]&&"/"===w[0].charAt(0);return b&&(r.hostname=r.host=C?"":w.length?w.shift():"",(v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=v.shift(),r.host=r.hostname=v.shift())),(m=m||r.host&&w.length)&&!C&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),ot(r.pathname)&&ot(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},No.prototype.parseHost=function(){return Vo(this)};var Xo=Object.freeze({__proto__:null,parse:$o,resolve:Go,resolveObject:Jo,format:Ko,default:Io,Url:No});function Qo(e,t){"string"==typeof e&&(e=$o(e));var n=-1===o.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||n,i=e.hostname||e.host,a=e.port,s=e.path||"/";i&&-1!==i.indexOf(":")&&(i="["+i+"]"),e.url=(i?r+"//"+i:"")+(a?":"+a:"")+s,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new ho(e);return t&&u.on("response",t),u}function ea(e,t){var n=Qo(e,t);return n.end(),n}function ta(){}ta.defaultMaxSockets=4;var na=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],ra={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},ia={request:Qo,get:ea,Agent:ta,METHODS:na,STATUS_CODES:ra},oa=Object.freeze({__proto__:null,request:Qo,get:ea,Agent:ta,METHODS:na,STATUS_CODES:ra,default:ia});function aa(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}var sa,ua=Object.prototype.hasOwnProperty,ca=Object.keys||function(e){var t=[];for(var n in e)ua.call(e,n)&&t.push(n);return t},la=Array.prototype.slice;function fa(){return void 0!==sa?sa:sa="foo"===function(){}.name}function ha(e){return Object.prototype.toString.call(e)}function da(e){return!qe(e)&&("function"==typeof o.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function pa(e,t){e||wa(e,!0,t,"==",ba)}var va=/\s*function\s+([^\(\s]*)\s*/;function ga(e){if(vt(e)){if(fa())return e.name;var t=e.toString().match(va);return t&&t[1]}}function _a(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return ma(ya(e.actual),128)+" "+e.operator+" "+ma(ya(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||wa;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=ga(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}}function ma(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function ya(e){if(fa()||!vt(e))return Ve(e);var t=ga(e);return"[Function"+(t?": "+t:"")+"]"}function wa(e,t,n,r,i){throw new _a({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function ba(e,t){e||wa(e,!0,t,"==",ba)}function ka(e,t,n){e!=t&&wa(e,t,n,"==",ka)}function Ea(e,t,n){e==t&&wa(e,t,n,"!=",Ea)}function Sa(e,t,n){Ca(e,t,!1)||wa(e,t,n,"deepEqual",Sa)}function Aa(e,t,n){Ca(e,t,!0)||wa(e,t,n,"deepStrictEqual",Aa)}function Ca(e,t,n,r){if(e===t)return!0;if(qe(e)&&qe(t))return 0===aa(e,t);if(dt(e)&&dt(t))return e.getTime()===t.getTime();if(ft(e)&&ft(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(da(e)&&da(t)&&ha(e)===ha(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===aa(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(qe(e)!==qe(t))return!1;var i=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==i&&i===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(gt(e)||gt(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=Ta(e),o=Ta(t);if(i&&!o||!i&&o)return!1;if(i)return Ca(e=la.call(e),t=la.call(t),n);var a,s,u=ca(e),c=ca(t);if(u.length!==c.length)return!1;for(u.sort(),c.sort(),s=u.length-1;s>=0;s--)if(u[s]!==c[s])return!1;for(s=u.length-1;s>=0;s--)if(!Ca(e[a=u[s]],t[a],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function Ta(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function xa(e,t,n){Ca(e,t,!1)&&wa(e,t,n,"notDeepEqual",xa)}function Ra(e,t,n){Ca(e,t,!0)&&wa(e,t,n,"notDeepStrictEqual",Ra)}function Oa(e,t,n){e!==t&&wa(e,t,n,"===",Oa)}function Ia(e,t,n){e===t&&wa(e,t,n,"!==",Ia)}function Na(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function ja(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&wa(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!e&&i&&!n;if((!e&&pt(i)&&o&&Na(i,n)||a)&&wa(i,n,"Got unwanted exception"+r),e&&i&&n&&!Na(i,n)||!e&&i)throw i}function La(e,t,n){ja(!0,e,t,n)}function Pa(e,t,n){ja(!1,e,t,n)}function Ba(e){if(e)throw e}pa.AssertionError=_a,We(_a,Error),pa.fail=wa,pa.ok=ba,pa.equal=ka,pa.notEqual=Ea,pa.deepEqual=Sa,pa.deepStrictEqual=Aa,pa.notDeepEqual=xa,pa.notDeepStrictEqual=Ra,pa.strictEqual=Oa,pa.notStrictEqual=Ia,pa.throws=La,pa.doesNotThrow=Pa,pa.ifError=Ba;var Ma,za=Object.freeze({__proto__:null,default:pa,AssertionError:_a,fail:wa,ok:ba,assert:ba,equal:ka,notEqual:Ea,deepEqual:Sa,deepStrictEqual:Aa,notDeepEqual:xa,notDeepStrictEqual:Ra,strictEqual:Oa,notStrictEqual:Ia,throws:La,doesNotThrow:Pa,ifError:Ba}),Ua=function(){if(!Ma)try{Ma=cn("follow-redirects")}catch(e){Ma=function(){}}Ma.apply(null,arguments)},Da=r(Xo),Fa=r(oa),qa=r(za),Za=Da.URL,Wa=uo.Writable,$a=["abort","aborted","connect","error","socket","timeout"],Ha=Object.create(null);$a.forEach((function(e){Ha[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var Ka=ns("ERR_FR_REDIRECTION_FAILURE",""),Ya=ns("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Ga=ns("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ja=ns("ERR_STREAM_WRITE_AFTER_END","write after end");function Va(e,t){Wa.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){n._processResponse(e)},this._performRequest()}function Xa(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var i=r+":",o=n[i]=e[r],a=t[r]=Object.create(o);Object.defineProperties(a,{request:{value:function(e,r,o){if("string"==typeof e){var a=e;try{e=es(new Za(a))}catch(t){e=Da.parse(a)}}else Za&&e instanceof Za?e=es(e):(o=r,r=e,e={protocol:i});return"function"==typeof r&&(o=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,qa.equal(r.protocol,i,"protocol mismatch"),Ua("options",r),new Va(r,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=a.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function Qa(){}function es(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function ts(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return n}function ns(e,t){function n(e){Error.captureStackTrace(this,this.constructor),this.message=e||t}return n.prototype=new Error,n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n.prototype.code=e,n}function rs(e){for(var t=0;t<$a.length;t++)e.removeListener($a[t],Ha[$a[t]]);e.on("error",Qa),e.abort()}Va.prototype=Object.create(Wa.prototype),Va.prototype.abort=function(){rs(this._currentRequest),this.emit("abort")},Va.prototype.write=function(e,t,n){if(this._ending)throw new Ja;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new Ga),this.abort()):n&&n()},Va.prototype.end=function(e,t,n){if("function"==typeof e?(n=e,e=t=null):"function"==typeof t&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},Va.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},Va.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},Va.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){clearTimeout(this._timeout),t&&n.removeListener("timeout",t),this.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.once("response",o),this.once("error",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){Va.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(Va.prototype,e,{get:function(){return this._currentRequest[e]}})})),Va.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},Va.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var n=e.substr(0,e.length-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=Da.format(this._options),r._redirectable=this;for(var i=0;i<$a.length;i++)r.on($a[i],Ha[$a[i]]);if(this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;!function e(t){if(r===a._currentRequest)if(t)a.emit("error",t);else if(o<s.length){var n=s[o++];r.finished||r.write(n.data,n.encoding,e)}else a._ended&&r.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},Va.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n=e.headers.location;if(n&&!1!==this._options.followRedirects&&t>=300&&t<400){if(rs(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Ya);((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],ts(/^content-/i,this._options.headers));var r=ts(/^host$/i,this._options.headers)||Da.parse(this._currentUrl).hostname,i=Da.resolve(this._currentUrl,n);Ua("redirecting to",i),this._isRedirect=!0;var o=Da.parse(i);if(Object.assign(this._options,o),o.hostname!==r&&ts(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var a={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,a)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){var s=new Ka("Redirected request failed: "+e.message);s.cause=e,this.emit("error",s)}}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]};var is=Xa({http:Fa,https:Fa}),os=Xa;is.wrap=os;var as={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function ss(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function us(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]}var cs=Uint8Array,ls=Uint16Array,fs=Int32Array;function hs(e){for(var t=e.length;--t>=0;)e[t]=0}var ds=256,ps=286,vs=30,gs=15,_s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ms=[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],ys=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ws=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],bs=new Array(576);hs(bs);var ks=new Array(60);hs(ks);var Es=new Array(512);hs(Es);var Ss=new Array(256);hs(Ss);var As=new Array(29);hs(As);var Cs,Ts,xs,Rs=new Array(vs);function Os(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function Is(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Ns(e){return e<256?Es[e]:Es[256+(e>>>7)]}function js(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Ls(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,js(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Ps(e,t,n){Ls(e,n[2*t],n[2*t+1])}function Bs(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function Ms(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=gs;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=Bs(o[s]++,s))}}function zs(e){var t;for(t=0;t<ps;t++)e.dyn_ltree[2*t]=0;for(t=0;t<vs;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Us(e){e.bi_valid>8?js(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Ds(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function Fs(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&Ds(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Ds(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function qs(e,t,n){var r,i,o,a,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===r?Ps(e,i,t):(Ps(e,(o=Ss[i])+ds+1,t),0!==(a=_s[o])&&Ls(e,i-=As[o],a),Ps(e,o=Ns(--r),n),0!==(a=ms[o])&&Ls(e,r-=Rs[o],a))}while(s<e.last_lit);Ps(e,256,t)}function Zs(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;n>=1;n--)Fs(e,o,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Fs(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,Fs(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,v=0;for(o=0;o<=gs;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=u[2*u[2*(r=e.heap[n])+1]+1]+1)>p&&(o=p,v++),u[2*r+1]=o,r>c||(e.bl_count[o]++,a=0,r>=d&&(a=h[r-d]),s=u[2*r],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(l[2*r+1]+a)));if(0!==v){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,v-=2}while(v>0);for(o=p;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(e,t),Ms(o,c,e.bl_count)}function Ws(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4))}function $s(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<c)do{Ps(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(Ps(e,i,e.bl_tree),s--),Ps(e,16,e.bl_tree),Ls(e,s-3,2)):s<=10?(Ps(e,17,e.bl_tree),Ls(e,s-3,3)):(Ps(e,18,e.bl_tree),Ls(e,s-11,7));s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4)}}hs(Rs);var Hs=!1;function Ks(e){Hs||(!function(){var e,t,n,r,i,o=new Array(16);for(n=0,r=0;r<28;r++)for(As[r]=n,e=0;e<1<<_s[r];e++)Ss[n++]=r;for(Ss[n-1]=r,i=0,r=0;r<16;r++)for(Rs[r]=i,e=0;e<1<<ms[r];e++)Es[i++]=r;for(i>>=7;r<vs;r++)for(Rs[r]=i<<7,e=0;e<1<<ms[r]-7;e++)Es[256+i++]=r;for(t=0;t<=gs;t++)o[t]=0;for(e=0;e<=143;)bs[2*e+1]=8,e++,o[8]++;for(;e<=255;)bs[2*e+1]=9,e++,o[9]++;for(;e<=279;)bs[2*e+1]=7,e++,o[7]++;for(;e<=287;)bs[2*e+1]=8,e++,o[8]++;for(Ms(bs,287,o),e=0;e<vs;e++)ks[2*e+1]=5,ks[2*e]=Bs(e,5);Cs=new Os(bs,_s,257,ps,gs),Ts=new Os(ks,ms,0,vs,gs),xs=new Os(new Array(0),ys,0,19,7)}(),Hs=!0),e.l_desc=new Is(e.dyn_ltree,Cs),e.d_desc=new Is(e.dyn_dtree,Ts),e.bl_desc=new Is(e.bl_tree,xs),e.bi_buf=0,e.bi_valid=0,zs(e)}function Ys(e,t,n,r){Ls(e,0+(r?1:0),3),function(e,t,n,r){Us(e),r&&(js(e,n),js(e,~n)),us(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}function Gs(e){Ls(e,2,3),Ps(e,256,bs),function(e){16===e.bi_valid?(js(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}function Js(e,t,n,r){var i,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<ds;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),Zs(e,e.l_desc),Zs(e,e.d_desc),a=function(e){var t;for(Ws(e,e.dyn_ltree,e.l_desc.max_code),Ws(e,e.dyn_dtree,e.d_desc.max_code),Zs(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*ws[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?Ys(e,t,n,r):4===e.strategy||o===i?(Ls(e,2+(r?1:0),3),qs(e,bs,ks)):(Ls(e,4+(r?1:0),3),function(e,t,n,r){var i;for(Ls(e,t-257,5),Ls(e,n-1,5),Ls(e,r-4,4),i=0;i<r;i++)Ls(e,e.bl_tree[2*ws[i]+1],3);$s(e,e.dyn_ltree,t-1),$s(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),qs(e,e.dyn_ltree,e.dyn_dtree)),zs(e),r&&Us(e)}function Vs(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Ss[n]+ds+1)]++,e.dyn_dtree[2*Ns(t)]++),e.last_lit===e.lit_bufsize-1}function Xs(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}var Qs=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function eu(e,t,n,r){var i=Qs,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}var tu,nu=-2,ru=258,iu=262,ou=103,au=113,su=666;function uu(e,t){return e.msg=as[t],t}function cu(e){return(e<<1)-(e>4?9:0)}function lu(e){for(var t=e.length;--t>=0;)e[t]=0}function fu(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(us(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function hu(e,t){Js(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,fu(e.strm)}function du(e,t){e.pending_buf[e.pending++]=t}function pu(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function vu(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-iu?e.strstart-(e.w_size-iu):0,c=e.window,l=e.w_mask,f=e.prev,h=e.strstart+ru,d=c[o+a-1],p=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===p&&c[n+a-1]===d&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<h);if(r=ru-(h-o),o=h-ru,r>a){if(e.match_start=t,a=r,r>=s)break;d=c[o+a-1],p=c[o+a]}}}while((t=f[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function gu(e){var t,n,r,i,o,a,s,u,c,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-iu)){us(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=f?r-f:0}while(--n);t=n=f;do{r=e.prev[--t],e.prev[t]=r>=f?r-f:0}while(--n);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,s=e.window,u=e.strstart+e.lookahead,c=i,l=void 0,(l=a.avail_in)>c&&(l=c),n=0===l?0:(a.avail_in-=l,us(s,a.input,a.next_in,l,u),1===a.state.wrap?a.adler=Xs(a.adler,s,l,u):2===a.state.wrap&&(a.adler=eu(a.adler,s,l,u)),a.next_in+=l,a.total_in+=l,l),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+3-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<iu&&0!==e.strm.avail_in)}function _u(e,t){for(var n,r;;){if(e.lookahead<iu){if(gu(e),e.lookahead<iu&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-iu&&(e.match_length=vu(e,n)),e.match_length>=3)if(r=Vs(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=Vs(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(hu(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(hu(e,!1),0===e.strm.avail_out)?1:2}function mu(e,t){for(var n,r,i;;){if(e.lookahead<iu){if(gu(e),e.lookahead<iu&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-iu&&(e.match_length=vu(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=Vs(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(hu(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=Vs(e,0,e.window[e.strstart-1]))&&hu(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Vs(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(hu(e,!1),0===e.strm.avail_out)?1:2}function yu(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function wu(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ls(1146),this.dyn_dtree=new ls(122),this.bl_tree=new ls(78),lu(this.dyn_ltree),lu(this.dyn_dtree),lu(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ls(16),this.heap=new ls(573),lu(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ls(573),lu(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 bu(e){var t=function(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:au,e.adler=2===t.wrap?0:1,t.last_flush=0,Ks(t),0):uu(e,nu)}(e);return 0===t&&function(e){e.window_size=2*e.w_size,lu(e.head),e.max_lazy_match=tu[e.level].max_lazy,e.good_match=tu[e.level].good_length,e.nice_match=tu[e.level].nice_length,e.max_chain_length=tu[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function ku(e,t){var n,r,i,o;if(!e||!e.state||t>5||t<0)return e?uu(e,nu):nu;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||r.status===su&&4!==t)return uu(e,0===e.avail_out?-5:nu);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,du(r,31),du(r,139),du(r,8),r.gzhead?(du(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),du(r,255&r.gzhead.time),du(r,r.gzhead.time>>8&255),du(r,r.gzhead.time>>16&255),du(r,r.gzhead.time>>24&255),du(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),du(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(du(r,255&r.gzhead.extra.length),du(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=eu(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(du(r,0),du(r,0),du(r,0),du(r,0),du(r,0),du(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),du(r,3),r.status=au);else{var a=8+(r.w_bits-8<<4)<<8;a|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(a|=32),a+=31-a%31,r.status=au,pu(r,a),0!==r.strstart&&(pu(r,e.adler>>>16),pu(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),fu(e),i=r.pending,r.pending!==r.pending_buf_size));)du(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),fu(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,du(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),fu(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,du(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(e.adler=eu(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.status=ou)}else r.status=ou;if(r.status===ou&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&fu(e),r.pending+2<=r.pending_buf_size&&(du(r,255&e.adler),du(r,e.adler>>8&255),e.adler=0,r.status=au)):r.status=au),0!==r.pending){if(fu(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&cu(t)<=cu(n)&&4!==t)return uu(e,-5);if(r.status===su&&0!==e.avail_in)return uu(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&r.status!==su){var s=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(gu(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=Vs(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(hu(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(hu(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=ru){if(gu(e),e.lookahead<=ru&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+ru;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=ru-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=Vs(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Vs(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(hu(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(hu(e,!1),0===e.strm.avail_out)?1:2}(r,t):tu[r.level].func(r,t);if(3!==s&&4!==s||(r.status=su),1===s||3===s)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===s&&(1===t?Gs(r):5!==t&&(Ys(r,0,0,!1),3===t&&(lu(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),fu(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(du(r,255&e.adler),du(r,e.adler>>8&255),du(r,e.adler>>16&255),du(r,e.adler>>24&255),du(r,255&e.total_in),du(r,e.total_in>>8&255),du(r,e.total_in>>16&255),du(r,e.total_in>>24&255)):(pu(r,e.adler>>>16),pu(r,65535&e.adler)),fu(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)}tu=[new yu(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(gu(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,hu(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-iu&&(hu(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(hu(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(hu(e,!1),e.strm.avail_out),1)})),new yu(4,4,8,4,_u),new yu(4,5,16,8,_u),new yu(4,6,32,32,_u),new yu(4,4,16,16,mu),new yu(8,16,32,32,mu),new yu(8,16,128,128,mu),new yu(8,32,128,256,mu),new yu(32,128,258,1024,mu),new yu(32,258,258,4096,mu)];function Eu(e,t){var n,r,i,o,a,s,u,c,l,f,h,d,p,v,g,_,m,y,w,b,k,E,S,A,C;n=e.state,r=e.next_in,A=e.input,i=r+(e.avail_in-5),o=e.next_out,C=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=n.dmax,c=n.wsize,l=n.whave,f=n.wnext,h=n.window,d=n.hold,p=n.bits,v=n.lencode,g=n.distcode,_=(1<<n.lenbits)-1,m=(1<<n.distbits)-1;e:do{p<15&&(d+=A[r++]<<p,p+=8,d+=A[r++]<<p,p+=8),y=v[d&_];t:for(;;){if(d>>>=w=y>>>24,p-=w,0===(w=y>>>16&255))C[o++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=v[(65535&y)+(d&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&y,(w&=15)&&(p<w&&(d+=A[r++]<<p,p+=8),b+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=A[r++]<<p,p+=8,d+=A[r++]<<p,p+=8),y=g[d&m];n:for(;;){if(d>>>=w=y>>>24,p-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(d&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&y,p<(w&=15)&&(d+=A[r++]<<p,(p+=8)<w&&(d+=A[r++]<<p,p+=8)),(k+=d&(1<<w)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>l&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,S=h,0===f){if(E+=c-w,w<b){b-=w;do{C[o++]=h[E++]}while(--w);E=o-k,S=C}}else if(f<w){if(E+=c+f-w,(w-=f)<b){b-=w;do{C[o++]=h[E++]}while(--w);if(E=0,f<b){b-=w=f;do{C[o++]=h[E++]}while(--w);E=o-k,S=C}}}else if(E+=f-w,w<b){b-=w;do{C[o++]=h[E++]}while(--w);E=o-k,S=C}for(;b>2;)C[o++]=S[E++],C[o++]=S[E++],C[o++]=S[E++],b-=3;b&&(C[o++]=S[E++],b>1&&(C[o++]=S[E++]))}else{E=o-k;do{C[o++]=C[E++],C[o++]=C[E++],C[o++]=C[E++],b-=3}while(b>2);b&&(C[o++]=C[E++],b>1&&(C[o++]=C[E++]))}break}}break}}while(r<i&&o<s);r-=b=p>>3,d&=(1<<(p-=b<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=d,n.bits=p}var Su=15,Au=[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],Cu=[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],Tu=[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],xu=[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];function Ru(e,t,n,r,i,o,a,s){var u,c,l,f,h,d,p,v,g,_=s.bits,m=0,y=0,w=0,b=0,k=0,E=0,S=0,A=0,C=0,T=0,x=null,R=0,O=new ls(16),I=new ls(16),N=null,j=0;for(m=0;m<=Su;m++)O[m]=0;for(y=0;y<r;y++)O[t[n+y]]++;for(k=_,b=Su;b>=1&&0===O[b];b--);if(k>b&&(k=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(w=1;w<b&&0===O[w];w++);for(k<w&&(k=w),A=1,m=1;m<=Su;m++)if(A<<=1,(A-=O[m])<0)return-1;if(A>0&&(0===e||1!==b))return-1;for(I[1]=0,m=1;m<Su;m++)I[m+1]=I[m]+O[m];for(y=0;y<r;y++)0!==t[n+y]&&(a[I[t[n+y]]++]=y);if(0===e?(x=N=a,d=19):1===e?(x=Au,R-=257,N=Cu,j-=257,d=256):(x=Tu,N=xu,d=-1),T=0,y=0,m=w,h=o,E=k,S=0,l=-1,f=(C=1<<k)-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){p=m-S,a[y]<d?(v=0,g=a[y]):a[y]>d?(v=N[j+a[y]],g=x[R+a[y]]):(v=96,g=0),u=1<<m-S,w=c=1<<E;do{i[h+(T>>S)+(c-=u)]=p<<24|v<<16|g|0}while(0!==c);for(u=1<<m-1;T&u;)u>>=1;if(0!==u?(T&=u-1,T+=u):T=0,y++,0==--O[m]){if(m===b)break;m=t[n+a[y]]}if(m>k&&(T&f)!==l){for(0===S&&(S=k),h+=w,A=1<<(E=m-S);E+S<b&&!((A-=O[E+S])<=0);)E++,A<<=1;if(C+=1<<E,1===e&&C>852||2===e&&C>592)return 1;i[l=T&f]=k<<24|E<<16|h-o|0}}return 0!==T&&(i[h+T]=m-S<<24|64<<16|0),s.bits=k,0}var Ou=-2,Iu=12,Nu=30;function ju(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function Lu(){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 ls(320),this.work=new ls(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Pu(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,function(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new fs(852),t.distcode=t.distdyn=new fs(592),t.sane=1,t.back=-1,0):Ou}(e)):Ou}function Bu(e,t){var n,r;return e?(r=new Lu,e.state=r,r.window=null,0!==(n=function(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ou:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Pu(e))):Ou}(e,t))&&(e.state=null),n):Ou}var Mu,zu,Uu=!0;function Du(e){if(Uu){var t;for(Mu=new fs(512),zu=new fs(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Ru(1,e.lens,0,288,Mu,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ru(2,e.lens,0,32,zu,0,e.work,{bits:5}),Uu=!1}e.lencode=Mu,e.lenbits=9,e.distcode=zu,e.distbits=5}function Fu(e,t){var n,r,i,o,a,s,u,c,l,f,h,d,p,v,g,_,m,y,w,b,k,E,S,A,C=0,T=new cs(4),x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Ou;(n=e.state).mode===Iu&&(n.mode=13),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,c=n.hold,l=n.bits,f=s,h=u,E=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(2&n.wrap&&35615===c){n.check=0,T[0]=255&c,T[1]=c>>>8&255,n.check=eu(n.check,T,2,0),c=0,l=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=Nu;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=Nu;break}if(l-=4,k=8+(15&(c>>>=4)),0===n.wbits)n.wbits=k;else if(k>n.wbits){e.msg="invalid window size",n.mode=Nu;break}n.dmax=1<<k,e.adler=n.check=1,n.mode=512&c?10:Iu,c=0,l=0;break;case 2:for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(n.flags=c,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=Nu;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Nu;break}n.head&&(n.head.text=c>>8&1),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,n.check=eu(n.check,T,2,0)),c=0,l=0,n.mode=3;case 3:for(;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.head&&(n.head.time=c),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,n.check=eu(n.check,T,4,0)),c=0,l=0,n.mode=4;case 4:for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.head&&(n.head.xflags=255&c,n.head.os=c>>8),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,n.check=eu(n.check,T,2,0)),c=0,l=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.length=c,n.head&&(n.head.extra_len=c),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,n.check=eu(n.check,T,2,0)),c=0,l=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((d=n.length)>s&&(d=s),d&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),us(n.head.extra,r,o,d,k)),512&n.flags&&(n.check=eu(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;d=0;do{k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k))}while(k&&d<s);if(512&n.flags&&(n.check=eu(n.check,r,d,o)),s-=d,o+=d,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;d=0;do{k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.comment+=String.fromCharCode(k))}while(k&&d<s);if(512&n.flags&&(n.check=eu(n.check,r,d,o)),s-=d,o+=d,k)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(c!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Nu;break}c=0,l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Iu;break;case 10:for(;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}e.adler=n.check=ju(c),c=0,l=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,2;e.adler=n.check=1,n.mode=Iu;case Iu:if(5===t||6===t)break e;case 13:if(n.last){c>>>=7&l,l-=7&l,n.mode=27;break}for(;l<3;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}switch(n.last=1&c,l-=1,3&(c>>>=1)){case 0:n.mode=14;break;case 1:if(Du(n),n.mode=20,6===t){c>>>=2,l-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=Nu}c>>>=2,l-=2;break;case 14:for(c>>>=7&l,l-=7&l;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Nu;break}if(n.length=65535&c,c=0,l=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(d=n.length){if(d>s&&(d=s),d>u&&(d=u),0===d)break e;us(i,r,o,d,a),s-=d,o+=d,u-=d,a+=d,n.length-=d;break}n.mode=Iu;break;case 17:for(;l<14;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(n.nlen=257+(31&c),c>>>=5,l-=5,n.ndist=1+(31&c),c>>>=5,l-=5,n.ncode=4+(15&c),c>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Nu;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;l<3;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.lens[x[n.have++]]=7&c,c>>>=3,l-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,S={bits:n.lenbits},E=Ru(0,n.lens,0,19,n.lencode,0,n.work,S),n.lenbits=S.bits,E){e.msg="invalid code lengths set",n.mode=Nu;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;_=(C=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&C,!((g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(m<16)c>>>=g,l-=g,n.lens[n.have++]=m;else{if(16===m){for(A=g+2;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(c>>>=g,l-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=Nu;break}k=n.lens[n.have-1],d=3+(3&c),c>>>=2,l-=2}else if(17===m){for(A=g+3;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}l-=g,k=0,d=3+(7&(c>>>=g)),c>>>=3,l-=3}else{for(A=g+7;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}l-=g,k=0,d=11+(127&(c>>>=g)),c>>>=7,l-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Nu;break}for(;d--;)n.lens[n.have++]=k}}if(n.mode===Nu)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Nu;break}if(n.lenbits=9,S={bits:n.lenbits},E=Ru(1,n.lens,0,n.nlen,n.lencode,0,n.work,S),n.lenbits=S.bits,E){e.msg="invalid literal/lengths set",n.mode=Nu;break}if(n.distbits=6,n.distcode=n.distdyn,S={bits:n.distbits},E=Ru(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S),n.distbits=S.bits,E){e.msg="invalid distances set",n.mode=Nu;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(s>=6&&u>=258){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,Eu(e,h),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,c=n.hold,l=n.bits,n.mode===Iu&&(n.back=-1);break}for(n.back=0;_=(C=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&C,!((g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(_&&0==(240&_)){for(y=g,w=_,b=m;_=(C=n.lencode[b+((c&(1<<y+w)-1)>>y)])>>>16&255,m=65535&C,!(y+(g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}c>>>=y,l-=y,n.back+=y}if(c>>>=g,l-=g,n.back+=g,n.length=m,0===_){n.mode=26;break}if(32&_){n.back=-1,n.mode=Iu;break}if(64&_){e.msg="invalid literal/length code",n.mode=Nu;break}n.extra=15&_,n.mode=22;case 22:if(n.extra){for(A=n.extra;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;_=(C=n.distcode[c&(1<<n.distbits)-1])>>>16&255,m=65535&C,!((g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(0==(240&_)){for(y=g,w=_,b=m;_=(C=n.distcode[b+((c&(1<<y+w)-1)>>y)])>>>16&255,m=65535&C,!(y+(g=C>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}c>>>=y,l-=y,n.back+=y}if(c>>>=g,l-=g,n.back+=g,64&_){e.msg="invalid distance code",n.mode=Nu;break}n.offset=m,n.extra=15&_,n.mode=24;case 24:if(n.extra){for(A=n.extra;l<A;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Nu;break}n.mode=25;case 25:if(0===u)break e;if(d=h-u,n.offset>d){if((d=n.offset-d)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Nu;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),v=n.window}else v=i,p=a-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do{i[a++]=v[p++]}while(--d);0===n.length&&(n.mode=21);break;case 26:if(0===u)break e;i[a++]=n.length,u--,n.mode=21;break;case 27:if(n.wrap){for(;l<32;){if(0===s)break e;s--,c|=r[o++]<<l,l+=8}if(h-=u,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?eu(n.check,i,h,a-h):Xs(n.check,i,h,a-h)),h=u,(n.flags?c:ju(c))!==n.check){e.msg="incorrect data check",n.mode=Nu;break}c=0,l=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(c!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Nu;break}c=0,l=0}n.mode=29;case 29:E=1;break e;case Nu:E=-3;break e;case 31:return-4;case 32:default:return Ou}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,(n.wsize||h!==e.avail_out&&n.mode<Nu&&(n.mode<27||4!==t))&&function(e,t,n,r){var i,o=e.state;null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new cs(o.wsize)),r>=o.wsize?(us(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),us(o.window,t,n-r,i,o.wnext),(r-=i)?(us(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i)))}(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?eu(n.check,i,h,e.next_out-h):Xs(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Iu?128:0)+(20===n.mode||15===n.mode?256:0),(0===f&&0===h||4===t)&&0===E&&(E=-5),E}var qu;function Zu(e){if(e<1||e>7)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function Wu(e,t){for(var n=0;n<e.length;n++)this[t+n]=e[n]}Zu.prototype.init=function(e,t,n,r,i){var o;switch(this.windowBits=e,this.level=t,this.memLevel=n,this.strategy=r,3!==this.mode&&4!==this.mode||(this.windowBits+=16),7===this.mode&&(this.windowBits+=32),5!==this.mode&&6!==this.mode||(this.windowBits=-this.windowBits),this.strm=new ss,this.mode){case 1:case 3:case 5:o=function(e,t,n,r,i,o){if(!e)return nu;var a=1;if(-1===t&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return uu(e,nu);8===r&&(r=9);var s=new wu;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new cs(2*s.w_size),s.head=new ls(s.hash_size),s.prev=new ls(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new cs(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=o,s.method=n,bu(e)}(this.strm,this.level,8,this.windowBits,this.memLevel,this.strategy);break;case 2:case 4:case 6:case 7:o=Bu(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}0===o?(this.write_in_progress=!1,this.init_done=!0):this._error(o)},Zu.prototype.params=function(){throw new Error("deflateParams Not supported")},Zu.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(0===this.mode)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},Zu.prototype.write=function(e,t,n,r,i,o,a){this._writeCheck(),this.write_in_progress=!0;var s=this;return O.nextTick((function(){s.write_in_progress=!1;var u=s._write(e,t,n,r,i,o,a);s.callback(u[0],u[1]),s.pending_close&&s.close()})),this},Zu.prototype.writeSync=function(e,t,n,r,i,o,a){return this._writeCheck(),this._write(e,t,n,r,i,o,a)},Zu.prototype._write=function(e,t,n,r,i,o,a){if(this.write_in_progress=!0,0!==e&&1!==e&&2!==e&&3!==e&&4!==e&&5!==e)throw new Error("Invalid flush value");null==t&&(t=new oe(0),r=0,n=0),i._set?i.set=i._set:i.set=Wu;var s,u=this.strm;switch(u.avail_in=r,u.input=t,u.next_in=n,u.avail_out=a,u.output=i,u.next_out=o,this.mode){case 1:case 3:case 5:s=ku(u,e);break;case 7:case 2:case 4:case 6:s=Fu(u,e);break;default:throw new Error("Unknown mode "+this.mode)}return 1!==s&&0!==s&&this._error(s),this.write_in_progress=!1,[u.avail_in,u.avail_out]},Zu.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,1===this.mode||3===this.mode||5===this.mode?function(e){var t;e&&e.state&&(42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==ou&&t!==au&&t!==su?uu(e,nu):(e.state=null,t===au&&uu(e,-3)))}(this.strm):function(e){if(!e||!e.state)return Ou;var t=e.state;t.window&&(t.window=null),e.state=null}(this.strm),this.mode=0)},Zu.prototype.reset=function(){switch(this.mode){case 1:case 5:qu=bu(this.strm);break;case 2:case 6:qu=Pu(this.strm)}0!==qu&&this._error(qu)},Zu.prototype._error=function(e){this.onerror(as[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()};var $u=Object.freeze({__proto__:null,NONE:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,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,Zlib:Zu});var Hu={};Object.keys($u).forEach((function(e){Hu[e]=$u[e]})),Hu.Z_MIN_WINDOWBITS=8,Hu.Z_MAX_WINDOWBITS=15,Hu.Z_DEFAULT_WINDOWBITS=15,Hu.Z_MIN_CHUNK=64,Hu.Z_MAX_CHUNK=1/0,Hu.Z_DEFAULT_CHUNK=16384,Hu.Z_MIN_MEMLEVEL=1,Hu.Z_MAX_MEMLEVEL=9,Hu.Z_DEFAULT_MEMLEVEL=8,Hu.Z_MIN_LEVEL=-1,Hu.Z_MAX_LEVEL=9,Hu.Z_DEFAULT_LEVEL=Hu.Z_DEFAULT_COMPRESSION;var Ku={Z_OK:Hu.Z_OK,Z_STREAM_END:Hu.Z_STREAM_END,Z_NEED_DICT:Hu.Z_NEED_DICT,Z_ERRNO:Hu.Z_ERRNO,Z_STREAM_ERROR:Hu.Z_STREAM_ERROR,Z_DATA_ERROR:Hu.Z_DATA_ERROR,Z_MEM_ERROR:Hu.Z_MEM_ERROR,Z_BUF_ERROR:Hu.Z_BUF_ERROR,Z_VERSION_ERROR:Hu.Z_VERSION_ERROR};function Yu(e){return new _c(e)}function Gu(e){return new mc(e)}function Ju(e){return new bc(e)}function Vu(e){return new kc(e)}function Xu(e){return new yc(e)}function Qu(e){return new wc(e)}function ec(e){return new Ec(e)}function tc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new _c(t),e,n)}function nc(e,t){return gc(new _c(t),e)}function rc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new yc(t),e,n)}function ic(e,t){return gc(new yc(t),e)}function oc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new bc(t),e,n)}function ac(e,t){return gc(new bc(t),e)}function sc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new Ec(t),e,n)}function uc(e,t){return gc(new Ec(t),e)}function cc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new mc(t),e,n)}function lc(e,t){return gc(new mc(t),e)}function fc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new wc(t),e,n)}function hc(e,t){return gc(new wc(t),e)}function dc(e,t,n){return"function"==typeof t&&(n=t,t={}),vc(new kc(t),e,n)}function pc(e,t){return gc(new kc(t),e)}function vc(e,t,n){var r=[],i=0;function o(){for(var t;null!==(t=e.read());)r.push(t),i+=t.length;e.once("readable",o)}function a(){var t=oe.concat(r,i);r=[],n(null,t),e.close()}e.on("error",(function(t){e.removeListener("end",a),e.removeListener("readable",o),n(t)})),e.on("end",a),e.end(t),o()}function gc(e,t){if("string"==typeof t&&(t=new oe(t)),!oe.isBuffer(t))throw new TypeError("Not a string or buffer");var n=Hu.Z_FINISH;return e._processChunk(t,n)}function _c(e){if(!(this instanceof _c))return new _c(e);Sc.call(this,e,Hu.DEFLATE)}function mc(e){if(!(this instanceof mc))return new mc(e);Sc.call(this,e,Hu.INFLATE)}function yc(e){if(!(this instanceof yc))return new yc(e);Sc.call(this,e,Hu.GZIP)}function wc(e){if(!(this instanceof wc))return new wc(e);Sc.call(this,e,Hu.GUNZIP)}function bc(e){if(!(this instanceof bc))return new bc(e);Sc.call(this,e,Hu.DEFLATERAW)}function kc(e){if(!(this instanceof kc))return new kc(e);Sc.call(this,e,Hu.INFLATERAW)}function Ec(e){if(!(this instanceof Ec))return new Ec(e);Sc.call(this,e,Hu.UNZIP)}function Sc(e,t){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||Hu.Z_DEFAULT_CHUNK,oo.call(this,e),e.flush&&e.flush!==Hu.Z_NO_FLUSH&&e.flush!==Hu.Z_PARTIAL_FLUSH&&e.flush!==Hu.Z_SYNC_FLUSH&&e.flush!==Hu.Z_FULL_FLUSH&&e.flush!==Hu.Z_FINISH&&e.flush!==Hu.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||Hu.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<Hu.Z_MIN_CHUNK||e.chunkSize>Hu.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<Hu.Z_MIN_WINDOWBITS||e.windowBits>Hu.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<Hu.Z_MIN_LEVEL||e.level>Hu.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<Hu.Z_MIN_MEMLEVEL||e.memLevel>Hu.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=Hu.Z_FILTERED&&e.strategy!=Hu.Z_HUFFMAN_ONLY&&e.strategy!=Hu.Z_RLE&&e.strategy!=Hu.Z_FIXED&&e.strategy!=Hu.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!oe.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new Hu.Zlib(t);var n=this;this._hadError=!1,this._binding.onerror=function(e,t){n._binding=null,n._hadError=!0;var r=new Error(e);r.errno=t,r.code=Hu.codes[t],n.emit("error",r)};var r=Hu.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(r=e.level);var i=Hu.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(i=e.strategy),this._binding.init(e.windowBits||Hu.Z_DEFAULT_WINDOWBITS,r,e.memLevel||Hu.Z_DEFAULT_MEMLEVEL,i,e.dictionary),this._buffer=new oe(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=i,this.once("end",this.close)}Object.keys(Ku).forEach((function(e){Ku[Ku[e]]=e})),We(Sc,oo),Sc.prototype.params=function(e,t,n){if(e<Hu.Z_MIN_LEVEL||e>Hu.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=Hu.Z_FILTERED&&t!=Hu.Z_HUFFMAN_ONLY&&t!=Hu.Z_RLE&&t!=Hu.Z_FIXED&&t!=Hu.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var r=this;this.flush(Hu.Z_SYNC_FLUSH,(function(){r._binding.params(e,t),r._hadError||(r._level=e,r._strategy=t,n&&n())}))}else O.nextTick(n)},Sc.prototype.reset=function(){return this._binding.reset()},Sc.prototype._flush=function(e){this._transform(new oe(0),"",e)},Sc.prototype.flush=function(e,t){var n=this._writableState;if(("function"==typeof e||void 0===e&&!t)&&(t=e,e=Hu.Z_FULL_FLUSH),n.ended)t&&O.nextTick(t);else if(n.ending)t&&this.once("end",t);else if(n.needDrain){var r=this;this.once("drain",(function(){r.flush(t)}))}else this._flushFlag=e,this.write(new oe(0),"",t)},Sc.prototype.close=function(e){if(e&&O.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var t=this;O.nextTick((function(){t.emit("close")}))}},Sc.prototype._transform=function(e,t,n){var r,i=this._writableState,o=(i.ending||i.ended)&&(!e||i.length===e.length);if(null===!e&&!oe.isBuffer(e))return n(new Error("invalid input"));o?r=Hu.Z_FINISH:(r=this._flushFlag,e.length>=i.length&&(this._flushFlag=this._opts.flush||Hu.Z_NO_FLUSH)),this._processChunk(e,r,n)},Sc.prototype._processChunk=function(e,t,n){var r=e&&e.length,i=this._chunkSize-this._offset,o=0,a=this,s="function"==typeof n;if(!s){var u,c=[],l=0;this.on("error",(function(e){u=e}));do{var f=this._binding.writeSync(t,e,o,r,this._buffer,this._offset,i)}while(!this._hadError&&p(f[0],f[1]));if(this._hadError)throw u;var h=oe.concat(c,l);return this.close(),h}var d=this._binding.write(t,e,o,r,this._buffer,this._offset,i);function p(u,f){if(!a._hadError){var h=i-f;if(function(e,t){if(!e)throw new Error(t)}(h>=0,"have should not go down"),h>0){var d=a._buffer.slice(a._offset,a._offset+h);a._offset+=h,s?a.push(d):(c.push(d),l+=d.length)}if((0===f||a._offset>=a._chunkSize)&&(i=a._chunkSize,a._offset=0,a._buffer=new oe(a._chunkSize)),0===f){if(o+=r-u,r=u,!s)return!0;var v=a._binding.write(t,e,o,r,a._buffer,a._offset,a._chunkSize);return v.callback=p,void(v.buffer=e)}if(!s)return!1;n()}}d.buffer=e,d.callback=p},We(_c,Sc),We(mc,Sc),We(yc,Sc),We(wc,Sc),We(bc,Sc),We(kc,Sc),We(Ec,Sc);var Ac={codes:Ku,createDeflate:Yu,createInflate:Gu,createDeflateRaw:Ju,createInflateRaw:Vu,createGzip:Xu,createGunzip:Qu,createUnzip:ec,deflate:tc,deflateSync:nc,gzip:rc,gzipSync:ic,deflateRaw:oc,deflateRawSync:ac,unzip:sc,unzipSync:uc,inflate:cc,inflateSync:lc,gunzip:fc,gunzipSync:hc,inflateRaw:dc,inflateRawSync:pc,Deflate:_c,Inflate:mc,Gzip:yc,Gunzip:wc,DeflateRaw:bc,InflateRaw:kc,Unzip:Ec,Zlib:Sc},Cc=Object.freeze({__proto__:null,codes:Ku,createDeflate:Yu,createInflate:Gu,createDeflateRaw:Ju,createInflateRaw:Vu,createGzip:Xu,createGunzip:Qu,createUnzip:ec,deflate:tc,deflateSync:nc,gzip:rc,gzipSync:ic,deflateRaw:oc,deflateRawSync:ac,unzip:sc,unzipSync:uc,inflate:cc,inflateSync:lc,gunzip:fc,gunzipSync:hc,inflateRaw:dc,inflateRawSync:pc,Deflate:_c,Inflate:mc,Gzip:yc,Gunzip:wc,DeflateRaw:bc,InflateRaw:kc,Unzip:Ec,Zlib:Sc,default:Ac}),Tc=[["axios@0.21.1","/Users/nguyentuankiet/Work/Zalo/Projects/ZaloMiniProgram/TestNewFunction"]],xc="axios@0.21.1",Rc="axios@0.21.1",Oc="sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",Ic="/zmp-sdk/axios",Nc={},jc={type:"version",registry:!0,raw:"axios@0.21.1",name:"axios",escapedName:"axios",rawSpec:"0.21.1",saveSpec:null,fetchSpec:"0.21.1"},Lc=["/zmp-sdk"],Pc="https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",Bc="0.21.1",Mc="/Users/nguyentuankiet/Work/Zalo/Projects/ZaloMiniProgram/TestNewFunction",zc={name:"Matt Zabriskie"},Uc={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},Dc={url:"https://github.com/axios/axios/issues"},Fc=[{path:"./dist/axios.min.js",threshold:"5kB"}],qc={"follow-redirects":"^1.10.0"},Zc="Promise based HTTP client for the browser and node.js",Wc={bundlesize:"^0.17.0",coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^5.2.0",sinon:"^4.5.0",typescript:"^2.8.1","url-search-params":"^0.10.0",webpack:"^1.13.1","webpack-dev-server":"^1.14.1"},$c="https://github.com/axios/axios",Hc="dist/axios.min.js",Kc=["xhr","http","ajax","promise","node"],Yc="index.js",Gc="axios",Jc={type:"git",url:"git+https://github.com/axios/axios.git"},Vc={build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test && bundlesize",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},Xc="./index.d.ts",Qc="dist/axios.min.js",el="0.21.1",tl={_args:Tc,_from:xc,_id:Rc,_inBundle:false,_integrity:Oc,_location:Ic,_phantomChildren:Nc,_requested:jc,_requiredBy:Lc,_resolved:Pc,_spec:Bc,_where:Mc,author:zc,browser:Uc,bugs:Dc,bundlesize:Fc,dependencies:qc,description:Zc,devDependencies:Wc,homepage:$c,jsdelivr:Hc,keywords:Kc,license:"MIT",main:Yc,name:Gc,repository:Jc,scripts:Vc,typings:Xc,unpkg:Qc,version:el},nl=Object.freeze({__proto__:null,_args:Tc,_from:xc,_id:Rc,_inBundle:false,_integrity:Oc,_location:Ic,_phantomChildren:Nc,_requested:jc,_requiredBy:Lc,_resolved:Pc,_spec:Bc,_where:Mc,author:zc,browser:Uc,bugs:Dc,bundlesize:Fc,dependencies:qc,description:Zc,devDependencies:Wc,homepage:$c,jsdelivr:Hc,keywords:Kc,license:"MIT",main:Yc,name:Gc,repository:Jc,scripts:Vc,typings:Xc,unpkg:Qc,version:el,default:tl}),rl=r(Cc),il=r(nl),ol=is.http,al=is.https,sl=/https:?/;function ul(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=oe.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,ul(e,t,e.href)}}var cl=function(e){return new Promise((function(t,n){var r=function(e){t(e)},i=function(e){n(e)},o=e.data,a=e.headers;if(a["User-Agent"]||a["user-agent"]||(a["User-Agent"]="axios/"+il.version),o&&!jr.isStream(o)){if(oe.isBuffer(o));else if(jr.isArrayBuffer(o))o=oe.from(new Uint8Array(o));else{if(!jr.isString(o))return i(Wr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));o=oe.from(o,"utf-8")}a["Content-Length"]=o.length}var s=void 0;e.auth&&(s=(e.auth.username||"")+":"+(e.auth.password||""));var u=Kr(e.baseURL,e.url),c=Da.parse(u),l=c.protocol||"http:";if(!s&&c.auth){var f=c.auth.split(":");s=(f[0]||"")+":"+(f[1]||"")}s&&delete a.Authorization;var h=sl.test(l),d=h?e.httpsAgent:e.httpAgent,p={path:Pr(c.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:a,agent:d,agents:{http:e.httpAgent,https:e.httpsAgent},auth:s};e.socketPath?p.socketPath=e.socketPath:(p.hostname=c.hostname,p.port=c.port);var v,g=e.proxy;if(!g&&!1!==g){var _=l.slice(0,-1)+"_proxy",m=O.env[_]||O.env[_.toUpperCase()];if(m){var y=Da.parse(m),w=O.env.no_proxy||O.env.NO_PROXY,b=!0;if(w)b=!w.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&c.hostname.substr(c.hostname.length-e.length)===e||c.hostname===e))}));if(b&&(g={host:y.hostname,port:y.port,protocol:y.protocol},y.auth)){var k=y.auth.split(":");g.auth={username:k[0],password:k[1]}}}}g&&(p.headers.host=c.hostname+(c.port?":"+c.port:""),ul(p,g,l+"//"+c.hostname+(c.port?":"+c.port:"")+p.path));var E=h&&(!g||sl.test(g.protocol));e.transport?v=e.transport:0===e.maxRedirects?v=Fa:(e.maxRedirects&&(p.maxRedirects=e.maxRedirects),v=E?al:ol),e.maxBodyLength>-1&&(p.maxBodyLength=e.maxBodyLength);var S=v.request(p,(function(t){if(!S.aborted){var n=t,o=t.req||S;if(204!==t.statusCode&&"HEAD"!==o.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":n=n.pipe(rl.createUnzip()),delete t.headers["content-encoding"]}var a={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:o};if("stream"===e.responseType)a.data=n,$r(r,i,a);else{var s=[];n.on("data",(function(t){s.push(t),e.maxContentLength>-1&&oe.concat(s).length>e.maxContentLength&&(n.destroy(),i(Wr("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,o)))})),n.on("error",(function(t){S.aborted||i(Zr(t,e,null,o))})),n.on("end",(function(){var t=oe.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=jr.stripBOM(t))),a.data=t,$r(r,i,a)}))}}}));S.on("error",(function(t){S.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||i(Zr(t,e,null,S))})),e.timeout&&S.setTimeout(e.timeout,(function(){S.abort(),i(Wr("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",S))})),e.cancelToken&&e.cancelToken.promise.then((function(e){S.aborted||(S.abort(),i(e))})),jr.isStream(o)?o.on("error",(function(t){i(Zr(t,e,null,S))})).pipe(S):S.end(o)}))},ll={"Content-Type":"application/x-www-form-urlencoded"};function fl(e,t){!jr.isUndefined(e)&&jr.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var hl,dl={adapter:("undefined"!=typeof XMLHttpRequest?hl=Jr:void 0!==O&&"[object process]"===Object.prototype.toString.call(O)&&(hl=cl),hl),transformRequest:[function(e,t){return qr(t,"Accept"),qr(t,"Content-Type"),jr.isFormData(e)||jr.isArrayBuffer(e)||jr.isBuffer(e)||jr.isStream(e)||jr.isFile(e)||jr.isBlob(e)?e:jr.isArrayBufferView(e)?e.buffer:jr.isURLSearchParams(e)?(fl(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):jr.isObject(e)?(fl(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};dl.headers={common:{Accept:"application/json, text/plain, */*"}},jr.forEach(["delete","get","head"],(function(e){dl.headers[e]={}})),jr.forEach(["post","put","patch"],(function(e){dl.headers[e]=jr.merge(ll)}));var pl=dl;function vl(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var gl=function(e){return vl(e),e.headers=e.headers||{},e.data=Dr(e.data,e.headers,e.transformRequest),e.headers=jr.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),jr.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||pl.adapter)(e).then((function(t){return vl(e),t.data=Dr(t.data,t.headers,e.transformResponse),t}),(function(t){return Fr(t)||(vl(e),t&&t.response&&(t.response.data=Dr(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},_l=function(e,t){t=t||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return jr.isPlainObject(e)&&jr.isPlainObject(t)?jr.merge(e,t):jr.isPlainObject(t)?jr.merge({},t):jr.isArray(t)?t.slice():t}function u(r){jr.isUndefined(t[r])?jr.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}jr.forEach(r,(function(e){jr.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),jr.forEach(i,u),jr.forEach(o,(function(r){jr.isUndefined(t[r])?jr.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),jr.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var c=r.concat(i).concat(o).concat(a),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===c.indexOf(e)}));return jr.forEach(l,u),n};function ml(e){this.defaults=e,this.interceptors={request:new Ur,response:new Ur}}ml.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=_l(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[gl,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},ml.prototype.getUri=function(e){return e=_l(this.defaults,e),Pr(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},jr.forEach(["delete","get","head","options"],(function(e){ml.prototype[e]=function(t,n){return this.request(_l(n||{},{method:e,url:t,data:(n||{}).data}))}})),jr.forEach(["post","put","patch"],(function(e){ml.prototype[e]=function(t,n,r){return this.request(_l(r||{},{method:e,url:t,data:n}))}}));var yl=ml;function wl(e){this.message=e}wl.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},wl.prototype.__CANCEL__=!0;var bl=wl;function kl(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new bl(e),t(n.reason))}))}kl.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},kl.source=function(){var e;return{token:new kl((function(t){e=t})),cancel:e}};var El=kl;function Sl(e){var t=new yl(e),n=Ar(yl.prototype.request,t);return jr.extend(n,yl.prototype,t),jr.extend(n,t),n}var Al=Sl(pl);Al.Axios=yl,Al.create=function(e){return Sl(_l(Al.defaults,e))},Al.Cancel=bl,Al.CancelToken=El,Al.isCancel=Fr,Al.all=function(e){return Promise.all(e)},Al.spread=function(e){return function(t){return e.apply(null,t)}},Al.isAxiosError=function(e){return"object"==typeof e&&!0===e.isAxiosError};var Cl=Al,Tl=Al;Cl.default=Tl;var xl=Cl,Rl=(()=>{const e=ar();return{MINI_APP_LINK:"https://zalo.me/app/link/zapps",MINI_APP_INTERNAL_LINK:"https://h5.zdn.vn/zapps",COOKIE_NAME:{ZOAUTH:"h5.zdn.vn_zoauth",ZACC_SESSiON:"h5.zdn.vn_zacc_session",JS_TOKEN:"h5.zdn.vn_zlink3rd"},APIS:{GET_USER_INFO:"https://graph.zalo.me/v2.0/me"},STORAGE_DATA_LIMIT:102400,STORAGE_LIMIT:5242880,NETWORK_TYPE:{NONE:e.isAndroid?-2:0,WIFI:e.isAndroid?0:1,"2G":(e.isAndroid,2),"3G":e.isAndroid?15:2,"4G":e.isAndroid?13:2}}})();const Ol={encode:function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(void 0===r)return;if(null===r)return void t.push(n);t.push(encodeURIComponent(n)+"="+encodeURIComponent(r))}return t.join("&")},decode:function(e,t){var n={};if(""===e)return n;for(var r=e.split("&"),i=0;i<r.length;i++){var o=r[i].split("=",2),a=decodeURIComponent(o[0]);if(t&&Object.prototype.hasOwnProperty.call(n,a))throw new URIError("Duplicate key: "+a);n[a]=2===o.length?decodeURIComponent(o[1]):null}return n},appendToUrl:function(e,t){return e+(-1!==e.indexOf("?")?"&":"?")+("string"==typeof t?t:Ol.encode(t))},getParameterByName:function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getParamsAsObject:function(e){var t={};return e?(e.split("&").map((function(e){var n=e.split("=");n&&2==n.length&&(t[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))})),t):t},toQueryString:function(e){if(!e)return"";if("object"!=(void 0===e?"undefined":typeof e))return e;var t=Object.keys(e),n=[];return t.map((function(t){var r=e[t],i=[t,r="object"==(void 0===r?"undefined":typeof r)?JSON.stringify(r):encodeURIComponent(r)].join("=");n.push(i)})),n.join("&")}};var Il={},Nl=function(e,t,n){var r=t||"default";return function(){var t=r in Il?Il[r](e,n):e;return t.apply(this,arguments)}};Nl.setWrapper=function(e){var t=arguments.length<=1||void 0===arguments[1]?"default":arguments[1];Il[t]=e};var jl={error:{code:1,error_subcode:1357046,message:"Received Invalid JSON reply.",type:"http"}};function Ll(e){try{return null===e?jl:JSON.parse(e)}catch(e){return jl}}var Pl={execute:function(e,t,n,r){n.suppress_http_code=1;var i=Ol.encode(n);"post"!=t&&(e=Ol.appendToUrl(e,i),i="");var o=function(e,t){if(!self.XMLHttpRequest)return null;var n=new XMLHttpRequest,r=function(){};if(!("withCredentials"in n))return null;n.open(e,t,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded");var i={send:function(e){n.send(e)}},o=Nl((function(){o=r,"onload"in i&&i.onload(n)}),"entry","XMLHttpRequest:load"),a=Nl((function(){a=r,"onerror"in i&&i.onerror(n)}),"entry","XMLHttpRequest:error");return n.onload=function(){o()},n.onerror=function(){a()},n.onreadystatechange=function(){4==n.readyState&&(200==n.status?o():a())},i}(t,e);return!!o&&(o.onload=function(e){r(Ll(e.responseText))},o.onerror=function(e){e.responseText?r(Ll(e.responseText)):r({error:{code:1,error_subcode:1357045,message:"unknown error (empty response)",status:e.status,type:"http"}})},o.send(i),!0)}};class Bl extends Er{constructor(){super(),this.debug=cn("zmp:ZaloJSBridge"),this.events=Sr.getInstance(),this._accessTk=hr("zacc_session")||"DEFAULT_ACCESS_TOKEN",this._jsAccessTk=hr("zlink3rd")||"DEFAULT_JS_TOKEN",this.results=[],this._userAgent=or(),this._device=ar(),this._jsCallFuncCallbacks={},this.events.on(e.Events.AppPaused,(()=>{if(this.results.length>0){let e=this.results;this.results=[];try{this.sendLogData(e)}catch(e){}}})),this.sendLogTimer?clearInterval(this.sendLogTimer):this.sendLogTimer=setInterval((()=>{if(this.results.length>0){let e=this.results;this.results=[];try{this.sendLogData(e)}catch(e){}}}),5e3)}static getInstance(){return Bl.instance||(Bl.instance=new Bl),Bl.instance}set accessTk(e){this._accessTk=e}set jsAccessTk(e){this._jsAccessTk=e}sendLogData(e){try{Pl.execute("https://h5.zalo.me/log/async","post",{appId:window.APP_ID,data:JSON.stringify(e)},(e=>{}))}catch(e){}}onJSCall(e,t){try{const n=dr(t);if(this._jsCallFuncCallbacks[e]){const t=this._jsCallFuncCallbacks[e].callback,r=this._jsCallFuncCallbacks[e].timeout;if(t){try{t.call(this,n)}catch(e){console.error("Call callback error",e)}r&&clearTimeout(r),this._jsCallFuncCallbacks[e]=null,delete this._jsCallFuncCallbacks[e]}}this.results.push({action:n.action,error:n.error_code})}catch(e){console.log("onJSCall","error",e)}}onMultiJSCall(e,t){try{const n=dr(t);if(this._jsCallFuncCallbacks[e]){const t=this._jsCallFuncCallbacks[e].callback,r=this._jsCallFuncCallbacks[e].timeout;if(t){try{t.call(this,n)}catch(e){console.error("Call callback error",e)}r&&clearTimeout(r)}}this.results.push({action:n.action,error:n.error_code})}catch(e){console.log("onMultiJSCall","error",e)}}nativeEventHandler(e,t,n){this.debug(`eventId: ${e}, eventName: ${t}, eventData: ${n}`);const r=_r(n);this.debug(r),this.events.emit(t,e,r)}defaultCallback(e){null!=e&&(e=dr(e))}jsCall(e,t,n,r=!1,o=3,a=!0){try{const s=((e="")=>`${e.normalize("NFD").replace(er,"").replace(tr,"d").replace(nr,"").toLowerCase()}_${Math.random().toString(36).substr(2,4)}`)(e);if(!this._device.isMobile||i.isEmpty(e))return this.onJSCall(s,{error_code:-13,error_message:"params invalid!",data:{device:this._device.isMobile,jsToken:this._jsAccessTk,access_token:this._accessTk},action:e}),!1;null==t&&(t={}),n||(n=this.defaultCallback);const u={error_code:-14,error_message:"Request Timeout!",data:{},action:e};this._jsCallFuncCallbacks[s]={timeout:a&&Kn.includes(e)&&setTimeout((()=>{this.onJSCall(s,u)}),8e3),callback:n};try{return t=pr(t),r?this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,window.onMultiJSCall(s)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,`window.onMultiJSCall('${s}')`):this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,window.onJSCall(s)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,`window.onJSCall('${s}')`)}catch(i){if(!(o-- >0)){const n={error_code:-5,error_message:"Not ready!",data:{userAgent:this._userAgent,options:t,jsToken:this._jsAccessTk,access_token:this._accessTk},action:e,js_error:i};return this.onJSCall(s,n),!1}setTimeout((()=>{this.jsCall(e,t,n,r,o)}),500)}}catch(e){console.log("jsCall","error",e)}return!1}}class Ml{constructor(e,t,n){this.code=e,this.message=t,this.api=n}toString(){return`api: ${this.api}; code: ${this.code}; message: ${this.message}`}}class zl extends Ml{constructor(e,t){super(e,t),this.message=`${t}. ${Vn.READ_MORE}`,this.handler()}handler(){switch(this.code){case e.NativeCode.token_invalid:this.code=Gn,this.message=Vn.LOGIN_REQUIRED;break;case e.NativeCode.not_permission:this.code=Jn,this.message=Vn.NOT_PERMISSION;break;case e.NativeCode.client_not_support:this.message=Vn.CLIENT_NOT_SUPPORT;break;case e.NativeCode.decode_failed:this.message=Vn.DECODE_FAILED}}}const Ul={handler:null,setHandler(e){this.handler=e}};Ul.setHandler(((e,t)=>t instanceof Ml?(t.api=e,t):new Ml(-2001,i.isNull(t.message)?"Unknown Error":t.message,e)));const Dl=(e,t,n)=>{const r=n.value;return n.value=function(...e){return wr(this,void 0,void 0,(function*(){const{success:n,fail:o}=Array.isArray(e)&&e.length>0&&e[0];return new Promise(((a,s)=>wr(this,void 0,void 0,(function*(){try{const t=yield r.apply(this,e);!i.isNull(n)&&i.isFunction(n)?n.call(null,t,this):a(t)}catch(e){if((null==e?void 0:e.code)===Gn||(null==e?void 0:e.code)===Jn){let t=!1;this instanceof Gf&&(t=this.getLoginStatus()),t||(e=new Ml(Gn,Vn.LOGIN_REQUIRED))}const{handler:n}=Ul,r=n.call(null,t,e,this);window.zmpSentry&&window.zmpSentry.throwError(r.toString()),!i.isNull(o)&&i.isFunction(o)?o.call(null,r,this):console.error("Error:",r)}}))))}))},n},Fl=(e,t,n)=>{const r=n.value;return n.value=function(...e){try{return r.apply(this,e)}catch(e){if((null==e?void 0:e.code)===Gn||(null==e?void 0:e.code)===Jn){let t=!1;this instanceof Gf&&(t=this.getLoginStatus()),t||(e=new Ml(Gn,Vn.LOGIN_REQUIRED))}const{handler:n}=Ul;!i.isNull(n)&&i.isFunction(n)?n.call(null,t,e,this):console.warn(e.message)}},n};var ql;class Zl{constructor(){ql.set(this,void 0),kr(this,ql,Bl.getInstance())}setZAccSession(e){br(this,ql).accessTk=e}setJSToken(e){br(this,ql).jsAccessTk=e}callNative(e,t,n){return new Promise(((r,i)=>{br(this,ql).jsCall(e,t,(o=>wr(this,void 0,void 0,(function*(){try{const a=new zl(o.error_code,`${o.action}: ${o.error_message}`);if(o.action===e)if(null==n?void 0:n.callback){const e=yield n.callback(o,a);r(e)}else if(o&&o.error_code>=0)r(o.data||{});else if(o&&o.error_code<0){try{window.zmpSentry&&window.zmpSentry.captureMessage(`${e}: call native fail`,{extra:{data:t,rs:o}})}catch(e){}i(a)}}catch(e){i(e)}}))),null==n?void 0:n.isMultiCallback,null==n?void 0:n.nRetry,null==n?void 0:n.haveTimeout)}))}}ql=new WeakMap;const Wl={loginFailed:()=>new Ml(Gn,Vn.LOGIN_FAILED),loginRequired:()=>new Ml(Yn,Vn.LOGIN_REQUIRED),missingParam:e=>new Ml(Yn,`Missing required argument: ${e}`),wrongTypeParam:(e,t,n)=>new Ml(Yn,`Wrong type of parameter '${e}'. Expected ${t}, but got ${n}`)};var $l,Hl,Kl,Yl,Gl,Jl="v2.14.4";class Vl{static getVersion(){return Jl}static getSystemInfo(){return{version:sr("version-id")||"",apiVersion:Jl,zaloVersion:ur(),platform:cr(),language:navigator.language}}static getAppInfo(){return wr(this,void 0,void 0,(function*(){let e={};const t=this.getAppId(),n=this.getSystemInfo(),r=Ol.appendToUrl(`https://h5.zalo.me/${Xn}`,{appId:t,versionStatus:0,currentVersion:n.version}),i=yield fetch(r,{credentials:"include"});if(i.ok){const t=yield i.json();if(t.err<0||!t.data)throw new Error(t);e={name:t.data.name,version:t.data.version,description:t.data.description,appUrl:t.data.appUrl,qrCodeUrl:t.data.qrCodeUrl}}return e}))}}class Xl{static setNavigationBarTitle(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(bn,{title:e.title},{haveTimeout:!1})}))}static setNavigationBarColor(e){return wr(this,void 0,void 0,(function*(){if(i.isString(e.color)&&e.color.length>0){const t={};i.isEmpty(e.color)||(t.backgroundColor=e.color),i.isEmpty(e.textColor)||(t.textColor=e.textColor),yield this.callNative(qn,{actionbarType:5,dataConfig:t,homeConfig:{enable:this.isShowHomeButton?1:0,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}},{haveTimeout:!1}),this.isShowNavBar=!0}else{const t={};i.isEmpty(e.statusBarColor)||(t.backgroundColor=e.statusBarColor),i.isEmpty(e.textColor)||(t.textColor=e.textColor),yield this.callNative(qn,{actionbarType:6,dataConfig:t},{haveTimeout:!1}),this.isShowNavBar=!1}}))}static setNavigationBarLeftButton(e){return wr(this,void 0,void 0,(function*(){let t={};switch(e.type){case"none":this.isShowHomeButton=!1,t={buttonType:3,dataConfig:{confirmToExit:1},homeConfig:{enable:0,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"back":this.isShowHomeButton=!1,t={buttonType:0,dataConfig:{confirmToExit:1},homeConfig:{enable:0,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"home":this.isShowHomeButton=!0,t={buttonType:3,dataConfig:{confirmToExit:1},homeConfig:{enable:1,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"both":this.isShowHomeButton=!0,t={buttonType:0,dataConfig:{confirmToExit:1},homeConfig:{enable:1,url:`${Rl.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}}}yield this.callNative(An,Object.assign({},t),{haveTimeout:!1})}))}static setNavigationBarRightButton(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(En,{supportToolBar:e.supportToolBar,reset:e.reset,menuListItems:e.menuListItems,zapp:this.getAppId()})}))}}class Ql{static setBackgroundColor(e){return wr(this,void 0,void 0,(function*(){i.isString(e.backgroundColor)&&e.backgroundColor.length>0&&(yield this.callNative(qn,{actionbarType:this.isShowNavBar?5:6,dataConfig:{backgroundColor:e.backgroundColor,textColor:e.textColor}}))}))}}class ef{constructor(e,t,n,r){this.title=r,this.severity=t;const i=new Date;if(this.time=i.toLocaleTimeString(),this.content=e,n>0){const e=(new Error).stack;this.stack=e?e.replace("Error\n",""):""}}toString(){return(this.content.stack?[this.title,this.severity.toUpperCase(),this.time,this.content,this.content.stack.replace("Error:","")]:[this.title,this.severity.toUpperCase(),this.time,JSON.stringify(this.content),this.stack]).join(" ")}}$l=new WeakMap,Hl=new WeakMap,Kl=new WeakMap,Yl=new WeakMap,Gl=new WeakMap;const tf=new class{constructor(){$l.set(this,3),Hl.set(this,["none","error","warn","info"]),Kl.set(this,"[zmp] > "),Yl.set(this,{error:0,warn:0,info:0,firstError:null,lastError:null}),Gl.set(this,((e,t,n)=>{br(this,Yl)[br(this,Hl)[e]]++;const r=br(this,Hl)[e];if(kr(this,Kl,br(this,Kl)+("string"!=typeof t?new ef(t,r,e,n).toString():t)),!(e>br(this,$l)))switch(e){case 1:console.error(br(this,Kl));break;case 2:console.warn(br(this,Kl));break;case 3:console.info(br(this,Kl));break;default:throw new Error("internal")}}))}setLogLevel(e){kr(this,$l,e)}info(e){br(this,Gl).call(this,3,e)}warn(e,t){br(this,Gl).call(this,2,e,t)}error(e,t){br(this,Gl).call(this,1,e,t)}getMetrics(){return br(this,Yl)}};class nf{static setDeviceOrientation(t){return wr(this,void 0,void 0,(function*(){yield this.callNative(zn,{autoRotate:e.OrientationType[t.rotate]})}))}static getNetworkType(t){return wr(this,void 0,void 0,(function*(){return yield this.callNative(kn,{url:window.location.href,featureId:""}).then((t=>{let n;switch(t.network){case Rl.NETWORK_TYPE.NONE:n=e.NetworkType.none;break;case Rl.NETWORK_TYPE.WIFI:n=e.NetworkType.wifi;break;case Rl.NETWORK_TYPE["2G"]:case Rl.NETWORK_TYPE["3G"]:case Rl.NETWORK_TYPE["4G"]:n=e.NetworkType.cellular;break;default:n=e.NetworkType.unknown}return{networkType:n}}))}))}static onNetworkStatusChange(t){return wr(this,void 0,void 0,(function*(){yield this.events.on(e.Events.NetworkChanged,(e=>{const n=e&&e.state;this.getNetworkType().then((e=>{const r={isConnected:"CONNECTED"===n,networkType:e&&e.networkType};t(r)})).catch((e=>{tf.error(e,"onNetworkStatusChange")}))}))}))}static startBeaconDiscovery(e){var t,n,r,o,a;return wr(this,void 0,void 0,(function*(){const s={subaction:0,scanning_type:i.isNumber(null==e?void 0:e.scanningType)?e.scanningType:0,data:{scan_from_source:i.isString(null==e?void 0:e.scanFromSource)?e.scanFromSource:"",expire:i.isNumber(null==e?void 0:e.expire)?e.expire:3e3,monitor_interval:i.isNumber(null==e?void 0:e.monitorInterval)?e.monitorInterval:60,domain:i.isString(null==e?void 0:e.domain)?e.domain:"",scan_config:{scan_time:i.isNumber(null===(t=null==e?void 0:e.scanConfig)||void 0===t?void 0:t.scanTime)?e.scanConfig.scanTime:15e3,time_between_scan:i.isNumber(null===(n=null==e?void 0:e.scanConfig)||void 0===n?void 0:n.timeBetweenScan)?e.scanConfig.timeBetweenScan:1e4,beacon_timeout:i.isNumber(null===(r=null==e?void 0:e.scanConfig)||void 0===r?void 0:r.beaconTimeout)?e.scanConfig.beaconTimeout:3e4,delayCheckConnectedTimeout:i.isNumber(null===(o=null==e?void 0:e.scanConfig)||void 0===o?void 0:o.delayCheckConnectedTimeout)?e.scanConfig.delayCheckConnectedTimeout:5e3,beaconConnectedTimeout:i.isNumber(null===(a=null==e?void 0:e.scanConfig)||void 0===a?void 0:a.beaconConnectedTimeout)?e.scanConfig.beaconConnectedTimeout:6e5},items:Array.isArray(null==e?void 0:e.items)?null==e?void 0:e.items:[]}};return yield this.callNative(Un,Object.assign({},s)),!0}))}static stopBeaconDiscovery(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Un,Object.assign({},{subaction:2})),!0}))}static getBeacons(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Un,Object.assign({},{subaction:1}),{isMultiCallback:!0}).then((e=>{const t={beacons:[]};return Array.isArray(e)&&e.forEach((e=>{const n={uuid:e.uuid,major:e.major,minor:e.minor,distance:e.distance,rssi:e.rssi};t.beacons.push(n)})),t}))}))}static stopBluetoothDevicesDiscovery(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static startBluetoothDevicesDiscovery(e){return wr(this,void 0,void 0,(function*(){return this.callNative("",Object.assign({},e))}))}static openBluetoothAdapter(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static onBluetoothDeviceFound(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static onBluetoothAdapterStateChange(){return wr(this,void 0,void 0,(function*(){return Promise.resolve()}))}static getConnectedBluetoothDevices(e){return wr(this,void 0,void 0,(function*(){const t={services:e.services||[]};return this.callNative("",t)}))}static getBluetoothDevices(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static getBluetoothAdapterState(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static closeBluetoothAdapter(){return wr(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static scanQRCode(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Ln,{skipOpenLink:!0})}))}static showToast(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(In,{toast:e.message})}))}static hideKeyboard(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Nn,{})}))}static openPhone(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(jn,{phoneNum:e.phoneNumber,phoneCode:e.phoneNumber})}))}static openSMS(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Pn,{content:e.content,phoneCode:e.phoneNumber})}))}static keepScreen(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Mn,{data:{keep_screen_on:e.keepScreenOn?1:0}})}))}static openBioAuthentication(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Tn,{secret_data:e.secretData,app_id:this.getZAppId(),ui:{title:e.ui.title,sub_title:e.ui.subTitle,negative_text:e.ui.negativeButtonText},require_fingerprint:e.requireFingerprint?1:0}).then((e=>{var t,n,r,i;return{code:null==e?void 0:e.error_code,message:null==e?void 0:e.error_message,data:{domain:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.domain,code:null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.error_code,message:null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.error_message,payToken:null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.pay_token}}}))}))}static checkStateBioAuthentication(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(xn,{}).then((e=>({bioState:null==e?void 0:e.bio_state})))}))}static vibrate(t){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Zn,{type:e.VibrateType[t.type],vibrate_time:t.milliseconds})}))}}var rf,of,af,sf,uf,cf,lf,ff,hf,df,pf,vf,gf,_f,mf,yf,wf,bf,kf,Ef,Sf,Af,Cf,Tf,xf;class Rf{constructor(e){rf.set(this,localStorage),of.set(this,void 0),af.set(this,void 0),ar(),kr(this,af,{keys:new Set,currentSize:0,limitSize:Rl.STORAGE_LIMIT}),kr(this,of,e),this.findAllCurrentDataByApp(e)}findAllCurrentDataByApp(e){try{let t;for(t in br(this,rf)){if(e){if(t.split("_")[0]!==e)continue}br(this,af).keys.add(t)}}catch(e){tf.error(e,"LocalResourceStorage > findAllCurrentDataByApp")}}get(e){let t=new Map;return e.forEach((e=>{t.set(e,this.getSync(e))})),Promise.resolve(t)}getSync(e){return br(this,of)&&(e=`${br(this,of)}_${e}`),br(this,af).keys.has(e)?br(this,rf).getItem(e):null}set(e){return wr(this,void 0,void 0,(function*(){return Object.entries(e).forEach((([e,t])=>{this.setSync(e,t.replace(/\\"/g,'"'))})),Promise.resolve({errorKeys:[]})}))}setSync(e,t){br(this,of)&&(e=`${br(this,of)}_${e}`),br(this,rf).setItem(e,t),br(this,af).keys.add(e)}getInfo(){return wr(this,void 0,void 0,(function*(){return Promise.resolve(this.getInfoSync())}))}getInfoSync(){const e=((e,t)=>{let n,r,i=0;for(r in e){const o=r.split("_")[0];e.hasOwnProperty(r)&&(t&&o!==t||(n=2*(e[r].length+r.length),i+=n))}return i})(br(this,rf),br(this,of));return{currentSize:i.isNumber(e)?Number((e/1024).toFixed(2)):0,limitSize:Number((Rl.STORAGE_LIMIT/1024).toFixed(2))}}remove(e){return wr(this,void 0,void 0,(function*(){return e.forEach((e=>{this.removeSync(e)})),Promise.resolve({errorKeys:[]})}))}removeSync(e){br(this,of)&&(e=`${br(this,of)}_${e}`),br(this,af).keys.has(e)&&(br(this,rf).removeItem(e),br(this,af).keys.delete(e))}clear(){return wr(this,void 0,void 0,(function*(){return Promise.resolve(this.clearSync())}))}clearSync(){br(this,af).keys.forEach((e=>{br(this,of)&&e.indexOf(br(this,of))<0||(br(this,rf).removeItem(e),br(this,af).keys.delete(e))}))}}rf=new WeakMap,of=new WeakMap,af=new WeakMap;class Of extends Zl{constructor(e){super(),sf.set(this,void 0),uf.set(this,void 0),kr(this,uf,{keys:new Set,currentSize:0,limitSize:Rl.STORAGE_LIMIT}),kr(this,sf,e)}get(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Wn,{mpds_action:"mpds.get",mpds_data:{keys:e},appId:br(this,sf)},{isMultiCallback:!1}).then((e=>{let t=new Map;return e&&e.mpds_data&&e.mpds_data.map&&(t=new Map(Object.entries(e.mpds_data.map))),t}))}))}set(e){return wr(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(Wn,{mpds_action:"mpds.set",mpds_data:{map:e},appId:br(this,sf)},{isMultiCallback:!1}).then((e=>{let t=[];return e&&e.mpds_data&&e.mpds_data.error_keys&&(t=e.mpds_data.error_keys),t}))}}))}getInfo(){return wr(this,void 0,void 0,(function*(){const e=yield this.callNative(Wn,{mpds_action:"mpds.get.size",mpds_data:{},appId:br(this,sf)},{isMultiCallback:!1}).then((e=>{let t=0;return e&&e.mpds_data&&e.mpds_data.size&&(t=e.mpds_data.size),t}));return{currentSize:i.isNumber(e)?Number(e/1024):0,limitSize:Number(Rl.STORAGE_LIMIT/1024)}}))}remove(e){return wr(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(Wn,{mpds_action:"mpds.remove.key",mpds_data:{keys:e},appId:br(this,sf)},{isMultiCallback:!1}).then((e=>{let t=[];return e&&e.mpds_data&&e.mpds_data.error_keys&&(t=e.mpds_data.error_keys),t}))}}))}clear(){return wr(this,void 0,void 0,(function*(){yield this.callNative(Wn,{mpds_action:"mpds.clear.appData",mpds_data:{},appId:br(this,sf)})}))}}sf=new WeakMap,uf=new WeakMap;class If{getDataFromStorage(e){return wr(this,void 0,void 0,(function*(){const t=this.getInstance(),n=yield t.get(e),r={};return n.forEach(((e,t)=>{r[t]=_r(e)})),r}))}putDataToStorage(e){return wr(this,void 0,void 0,(function*(){const t=this.getInstance(),n={};return Object.entries(e).forEach((([e,t])=>{i.isUndefined(t)||i.isNull(t)||(n[e]=gr(t))})),yield t.set(n)}))}removeDataFromStorage(e){return wr(this,void 0,void 0,(function*(){const t=this.getInstance();return yield t.remove(e)}))}clearStorage(){return wr(this,void 0,void 0,(function*(){const e=this.getInstance();yield e.clear()}))}getStorageInfo(){return wr(this,void 0,void 0,(function*(){const e=this.getInstance();return yield e.getInfo()}))}}class Nf extends If{constructor(e){super(),cf.set(this,void 0),kr(this,cf,e)}getInstance(){return new Rf(br(this,cf))}}cf=new WeakMap;class jf extends If{constructor(e){super(),lf.set(this,void 0),kr(this,lf,e)}getInstance(){return new Of(br(this,lf))}}lf=new WeakMap;class Lf{static setStorage(e){return wr(this,void 0,void 0,(function*(){let t=new Nf(this.getAppId());return vr()&&(t=new jf(this.getAppId())),yield t.putDataToStorage(e.data)}))}static getStorage(e){return wr(this,void 0,void 0,(function*(){let t=new Nf(this.getAppId());vr()&&(t=new jf(this.getAppId()));return yield t.getDataFromStorage(e.keys)}))}static getStorageInfo(e){return wr(this,void 0,void 0,(function*(){let e=new Nf(this.getAppId());return vr()&&(e=new jf(this.getAppId())),yield e.getStorageInfo()}))}static removeStorage(e){return wr(this,void 0,void 0,(function*(){let t=new Nf(this.getAppId());return vr()&&(t=new jf(this.getAppId())),yield t.removeDataFromStorage(e.keys)}))}static clearStorage(e={}){return wr(this,void 0,void 0,(function*(){let e=new Nf(this.getAppId());vr()&&(e=new jf(this.getAppId())),yield e.clearStorage()}))}}class Pf{static getUserInfo(e){return wr(this,void 0,void 0,(function*(){const t=yield this.getAccessToken();let n="id,name,picture";(null==e?void 0:e.avatarType)&&(n=`${n}.type(${null==e?void 0:e.avatarType})`);return{userInfo:yield xl.get(Rl.APIS.GET_USER_INFO,{params:{fields:n,access_token:t}}).then((e=>{const t=e.data,n={id:t.id,name:t.name,birthday:"",gender:"",avatar:t.picture&&t.picture.data&&t.picture.data.url};return console.warn("'birthday' and 'gender' are deprecated"),n}))}}))}static getPhoneNumber(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Hn,{},{isMultiCallback:!0,callback:(e,t)=>{if(0===e.error_code){const t={number:e.data};return Promise.resolve(t)}return Promise.reject(t)}})}))}}class Bf{static closeApp(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Cn,{})}))}static openMiniApp(e){return wr(this,void 0,void 0,(function*(){const t=null==e?void 0:e.appId,n=(null==e?void 0:e.params)||{},r=Object.entries(n).map((function([e,t]){return[e,t].join("=")})).join("&");yield this.callNative(Fn,{mpUrl:`${Rl.MINI_APP_INTERNAL_LINK}/${t}/${r.length>0?"?"+r:""}`,mpInfo:{appId:t}})}))}static openWebview(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(pn,{url:e.url})}))}}class Mf{static getLocation(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(Rn,{silent_request:!1,permission_description:"Cho phép Zalo truy cập vào vị trí của thiết bị này?"},{isMultiCallback:!0,haveTimeout:!1,callback:(e,t)=>{if(0===e.error_code){const t=e.data,n={latitude:t.latitude,longitude:t.longitude,timestamp:t.timestamp,provider:t.provider};return Promise.resolve(n)}return Promise.reject(t)}})}))}static sendLocation(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(On,{title:e.title,touserid:e.toUserId,zapp:this.getZAppId()})}))}}class zf{static requestCameraPermission(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative(wn,{},{callback:(e,t)=>-2===e.error_code||e.error_code>=0?Promise.resolve({userAllow:-2!==e.error_code,message:e.error_message}):Promise.reject(t)})}))}static saveImageToPhotosAlbum(e){return wr(this,void 0,void 0,(function*(){let t={};return t=i.isEmpty(e.imageBase64Data)?Object.assign(Object.assign({},t),{imageUrl:e.imageUrl}):Object.assign(Object.assign({},t),{imageBase64Data:e.imageBase64Data}),yield this.callNative(Dn,Object.assign({},t))}))}}class Uf{static viewOAQr(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Bn,{dpn:e.displayName,uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openProfile(t){return wr(this,void 0,void 0,(function*(){return yield this.callNative(dn,{uId:t.id,type:e.ProfileType[t.type],zapp:this.getZAppId(),sourceId:t.sourceId,sourceIndex:t.sourceIndex})}))}static openChat(t){return wr(this,void 0,void 0,(function*(){return yield this.callNative(vn,{uId:t.id,type:e.ChatType[t.type],zapp:this.getZAppId(),sourceId:t.sourceId,sourceIndex:t.sourceIndex})}))}static openPostFeed(t){return wr(this,void 0,void 0,(function*(){let n={};switch(t.type){case"image":n={photoUrl:t.data.imageUrl};break;case"link":n={link:t.data.link,title:t.data.title,thumb:t.data.thumb,description:t.data.description};break;case"profile":n={avt:t.data.avatar,uid:t.data.id,dpn:t.data.displayName}}return yield this.callNative(gn,Object.assign(Object.assign({type:e.PostFeedType[t.type]},n),{zapp:this.getZAppId()})).then((e=>({status:e.status,shareType:e.share_type,numberOfUser:e.uid_to_size})))}))}static followOA(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(_n,{uid:e.id,showDialogConfirm:!0,zapp:this.getZAppId()},{haveTimeout:!1})}))}static unfollowOA(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(mn,{uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openShareSheet(t){return wr(this,void 0,void 0,(function*(){let n={};switch(t.type){case"image":n={photoUrl:t.data.imageUrl};break;case"gif":n={photoUrl:t.data.imageUrl,gifUrl:t.data.gifUrl,width:t.data.width,height:t.data.height};break;case"video":n={videoThumb:t.data.videoThumb,videoUrl:t.data.videoUrl,width:t.data.width,height:t.data.height};break;case"link":n={link:t.data.link,chatOnly:t.data.chatOnly?1:0};break;case"oa":n={uid:t.data.id}}return yield this.callNative(yn,Object.assign(Object.assign({type:e.ShareSheetType[t.type]},n),{zapp:this.getZAppId()}),{haveTimeout:!1}).then((e=>({status:e.status,shareType:e.share_type,numberOfUser:e.uid_to_size})))}))}static createShortcut(e){return wr(this,void 0,void 0,(function*(){yield this.callNative(Sn,{url:`${Rl.MINI_APP_LINK}/${this.getAppId()}/`,title:document.title,iconUrl:`https:${sr("og:image:url")}`})}))}}class Df{static getRouteParams(){let e={};const t=window.location.href;try{let n=new URL(t).searchParams.toString();n&&(e=Ol.getParamsAsObject(n))}catch(e){throw new Error("Url không hợp lệ")}return e}static sendDataToPreviousMiniApp(e){return wr(this,void 0,void 0,(function*(){return yield this.callNative($n,{result:gr(e.data)})}))}static onCallbackData(t){return wr(this,void 0,void 0,(function*(){yield this.events.on(e.Events.OnDataCallback,(e=>{t({data:e})}))}))}}class Ff extends Zl{constructor(){super(),ff.set(this,window.zAppID),hf.set(this,window.APP_ID),df.set(this,window.APP_CONFIG||{}),pf.set(this,void 0),vf.set(this,void 0),gf.set(this,{timer:{getToken:0}}),_f.set(this,!1),this.events=Sr.getInstance(),mf.set(this,(()=>{const e=br(this,df).app||null;if(e){const t=e.title,n=e.headerColor,r=e.textColor,o=e.statusBarColor,a=e.leftButton;if(i.isString(t)&&this.setNavigationBarTitle({title:t}),i.isString(n)){const e={color:n};!i.isString(r)||"black"!==r&&"white"!==r||(e.textColor=r),i.isString(o)&&(e.statusBarColor=o),this.setNavigationBarColor(e)}i.isString(a)&&this.setNavigationBarLeftButton({type:a})}})),yf.set(this,(()=>{try{br(this,mf).call(this)}catch(e){console.error(e)}})),wf.set(this,(()=>new Promise(((e,t)=>{this.callNative("action.jump.login",{}).then((t=>{const n=t&&t.cookiesOAuthLogins||[],r=n.find((e=>e.name===Rl.COOKIE_NAME.JS_TOKEN));r&&(this.setJSToken(r.value),window.ZJSBridge.setJSToken&&window.ZJSBridge.setJSToken(r.value)),e(n)})).catch((e=>{t(e)}))})))),bf.set(this,Xl.setNavigationBarRightButton),this.getVersion=Vl.getVersion,this.getSystemInfo=Vl.getSystemInfo,this.setNavigationBarTitle=Xl.setNavigationBarTitle,this.setNavigationBarColor=Xl.setNavigationBarColor,this.setNavigationBarLeftButton=Xl.setNavigationBarLeftButton,this.setBackgroundColor=Ql.setBackgroundColor,this.setDeviceOrientation=nf.setDeviceOrientation,this.setStorage=Lf.setStorage,this.getStorage=Lf.getStorage,this.getStorageInfo=Lf.getStorageInfo,this.removeStorage=Lf.removeStorage,this.clearStorage=Lf.clearStorage,this.getUserInfo=Pf.getUserInfo,this.getNetworkType=nf.getNetworkType,this.onNetworkStatusChange=nf.onNetworkStatusChange,this.startBeaconDiscovery=nf.startBeaconDiscovery,this.stopBeaconDiscovery=nf.stopBeaconDiscovery,this.getBeacons=nf.getBeacons,this.closeApp=Bf.closeApp,this.getLocation=Mf.getLocation,this.stopBluetoothDevicesDiscovery=nf.stopBluetoothDevicesDiscovery,this.startBluetoothDevicesDiscovery=nf.stopBluetoothDevicesDiscovery,this.openBluetoothAdapter=nf.openBluetoothAdapter,this.onBluetoothDeviceFound=nf.onBluetoothDeviceFound,this.onBluetoothAdapterStateChange=nf.onBluetoothAdapterStateChange,this.getConnectedBluetoothDevices=nf.getConnectedBluetoothDevices,this.getBluetoothDevices=nf.getBluetoothDevices,this.getBluetoothAdapterState=nf.getBluetoothAdapterState,this.closeBluetoothAdapter=nf.closeBluetoothAdapter,this.scanQRCode=nf.scanQRCode,this.openProfile=Uf.openProfile,this.openChat=Uf.openChat,this.openPostFeed=Uf.openPostFeed,this.followOA=Uf.followOA,this.unFollowOA=Uf.unfollowOA,this.openShareSheet=Uf.openShareSheet,this.requestCameraPermission=zf.requestCameraPermission,this.createShortcut=Uf.createShortcut,this.openBioAuthentication=nf.openBioAuthentication,this.checkStateBioAuthentication=nf.checkStateBioAuthentication,this.sendLocation=Mf.sendLocation,this.showToast=nf.showToast,this.hideKeyboard=nf.hideKeyboard,this.openPhone=nf.openPhone,this.openSMS=nf.openSMS,this.viewOAQr=Uf.viewOAQr,this.keepScreen=nf.keepScreen,this.saveImageToPhotosAlbum=zf.saveImageToPhotosAlbum,this.openMiniApp=Bf.openMiniApp,this.vibrate=nf.vibrate,this.openWebview=Bf.openWebview,this.getRouteParams=Df.getRouteParams,this.getAppInfo=Vl.getAppInfo,this.sendDataToPreviousMiniApp=Df.sendDataToPreviousMiniApp,this.onCallbackData=Df.onCallbackData,this.getPhoneNumber=Pf.getPhoneNumber,kr(this,pf,null),kr(this,vf,null),this.isShowNavBar=!0,this.isShowHomeButton=!0}static getInstance(){return Ff.instance||(Ff.instance=new Ff),Ff.instance}getLoginStatus(){return br(this,_f)}getAppId(){return br(this,hf)}getZAppId(){return br(this,ff)}login(e){return wr(this,void 0,void 0,(function*(){const e=(yield br(this,wf).call(this)).find((e=>e.name===Rl.COOKIE_NAME.ZOAUTH));if(!i.isUndefined(e)&&!i.isNull(e)&&i.isString(e.value)){kr(this,pf,e.value);const t=()=>wr(this,void 0,void 0,(function*(){return(i.isUndefined(br(this,pf))||i.isNull(br(this,pf)))&&clearInterval(br(this,gf).timer.getToken),yield xl.get("https://oauth.zaloapp.com/v3/access_token",{params:{app_id:br(this,ff),redirect_uri:`https://h5.zdn.vn/zapps/${br(this,hf)}/`,code:br(this,pf),isSDK:!0}}).then((e=>{let n=e.data;if(n.access_token){kr(this,vf,n.access_token);const e=1e3*parseInt(n.expires_in);return br(this,gf).timer.getToken||(br(this,gf).timer.getToken=window.setInterval(t,e)),kr(this,_f,!0),this.setZAccSession(br(this,vf)||""),window.ZJSBridge.setZAccSession&&window.ZJSBridge.setZAccSession(br(this,vf)||""),br(this,vf)}return kr(this,_f,!1),null}))}));return clearInterval(br(this,gf).timer.getToken),yield t(),"Login Success!"}throw Wl.loginFailed()}))}getAccessToken(e){return wr(this,void 0,void 0,(function*(){if(br(this,vf))return br(this,vf);throw Wl.loginRequired()}))}}ff=new WeakMap,hf=new WeakMap,df=new WeakMap,pf=new WeakMap,vf=new WeakMap,gf=new WeakMap,_f=new WeakMap,mf=new WeakMap,yf=new WeakMap,wf=new WeakMap,bf=new WeakMap;class qf{constructor(){kf.set(this,window.zAppID),Ef.set(this,window.APP_CONFIG||{}),Sf.set(this,"DEFAULT ZOAUTH"),Af.set(this,"DEFAULT ACCESS TOKEN"),Cf.set(this,{timer:{getToken:0}}),Tf.set(this,!1),this.getLoginStatus=()=>br(this,Tf),this.getAppId=()=>br(this,kf),this.login=()=>(kr(this,Tf,!0),Promise.resolve(br(this,Sf))),this.getAccessToken=()=>Promise.resolve(br(this,Af)),this.getVersion=Vl.getVersion,this.getSystemInfo=Vl.getSystemInfo,this.setNavigationBarTitle=()=>Promise.resolve(),this.setNavigationBarColor=()=>Promise.resolve(),this.setBackgroundColor=()=>Promise.resolve(),this.setNavigationBarLeftButton=()=>Promise.resolve(),this.setDeviceOrientation=()=>Promise.resolve(),this.setStorage=e=>wr(this,void 0,void 0,(function*(){const t=new Nf(this.getAppId());return yield t.putDataToStorage(e.data),{errorKeys:[]}})),this.getStorage=e=>wr(this,void 0,void 0,(function*(){const t=new Nf(this.getAppId());return yield t.getDataFromStorage(e.keys)})),this.getStorageInfo=e=>wr(this,void 0,void 0,(function*(){const e=new Nf(this.getAppId());return yield e.getStorageInfo()})),this.removeStorage=e=>wr(this,void 0,void 0,(function*(){const t=new Nf(this.getAppId());return yield t.removeDataFromStorage(e.keys)})),this.clearStorage=e=>wr(this,void 0,void 0,(function*(){const e=new Nf(this.getAppId());return yield e.clearStorage()})),this.getUserInfo=()=>(console.warn("birthday and gender are deprecated"),Promise.resolve({userInfo:{id:"3368637342326461234",name:"User Name",avatar:"https://h5.zdn.vn/static/images/avatar.png"}})),this.getNetworkType=()=>{let t;switch((navigator.connection||navigator.mozConnection||navigator.webkitConnection).effectiveType){case"none":t=e.NetworkType.none;break;case"4g":t=e.NetworkType.wifi;break;case"3g":case"2g":t=e.NetworkType.cellular;break;default:t=e.NetworkType.unknown}const n={networkType:t};return Promise.resolve(n)},this.onNetworkStatusChange=t=>{const n=navigator.connection||navigator.mozConnection||navigator.webkitConnection,r=n.effectiveType;return n.addEventListener("change",(function(){let n;switch(r){case"none":n=e.NetworkType.none;break;case"4g":n=e.NetworkType.wifi;break;case"3g":case"2g":n=e.NetworkType.cellular;break;default:n=e.NetworkType.unknown}t({isConnected:!0,networkType:n})})),Promise.resolve()},this.startBeaconDiscovery=e=>Promise.resolve(!0),this.stopBeaconDiscovery=e=>Promise.resolve(!0),this.getBeacons=e=>Promise.resolve({beacons:[]}),this.closeApp=()=>Promise.resolve(),this.getLocation=()=>Promise.resolve({longitude:"105.788026",latitude:"21.0258773",timestamp:(new Date).getTime().toString(),provider:"fused"}),this.onBackButtonClick=()=>Promise.resolve(),this.stopBluetoothDevicesDiscovery=()=>Promise.resolve(),this.startBluetoothDevicesDiscovery=()=>Promise.resolve(),this.openBluetoothAdapter=()=>Promise.resolve(),this.onBluetoothDeviceFound=()=>Promise.resolve(),this.onBluetoothAdapterStateChange=()=>Promise.resolve(),this.getConnectedBluetoothDevices=()=>Promise.resolve(),this.getBluetoothDevices=()=>Promise.resolve(),this.getBluetoothAdapterState=()=>Promise.resolve(),this.closeBluetoothAdapter=()=>Promise.resolve(),this.scanQRCode=()=>Promise.resolve({content:"132"}),this.openProfile=()=>Promise.resolve(),this.openChat=()=>Promise.resolve(),this.openPostFeed=()=>Promise.resolve({status:1,shareType:0,numberOfUser:0}),this.followOA=()=>Promise.resolve(),this.unFollowOA=()=>Promise.resolve(),this.openShareSheet=()=>Promise.resolve({status:2,shareType:0,numberOfUser:0}),this.requestCameraPermission=()=>Promise.resolve({userAllow:!0,message:"Success"}),this.createShortcut=()=>Promise.resolve(),this.openBioAuthentication=()=>Promise.resolve({code:0,message:"OK",data:{domain:"",code:0,message:"",payToken:""}}),this.checkStateBioAuthentication=()=>Promise.resolve({bioState:""}),this.sendLocation=()=>Promise.resolve(),this.showToast=()=>Promise.resolve(),this.hideKeyboard=()=>Promise.resolve(),this.openPhone=()=>Promise.resolve(),this.openSMS=()=>Promise.resolve(),this.viewOAQr=()=>Promise.resolve(),this.keepScreen=()=>Promise.resolve(),this.saveImageToPhotosAlbum=()=>Promise.resolve(),this.openMiniApp=e=>Promise.resolve(),this.vibrate=()=>Promise.resolve(),this.openWebview=e=>(location.replace(e.url),Promise.resolve()),this.getRouteParams=Df.getRouteParams,this.getAppInfo=()=>Promise.resolve({description:"",name:"",version:"",appUrl:"",qrCodeUrl:""}),this.sendDataToPreviousMiniApp=e=>Promise.resolve(),this.onCallbackData=e=>(e({data:""}),Promise.resolve()),this.getPhoneNumber=()=>(console.warn("This api only works on zalo app"),Promise.resolve({number:""}))}on(e,t,n){throw new Error("Method not implemented.")}once(e,t,n){throw new Error("Method not implemented.")}off(e,t,n,r){throw new Error("Method not implemented.")}removeAllListeners(e){throw new Error("Method not implemented.")}}kf=new WeakMap,Ef=new WeakMap,Sf=new WeakMap,Af=new WeakMap,Cf=new WeakMap,Tf=new WeakMap,function(e){!function(n){var r="object"==typeof t?t:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=o(e);function o(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===r.Reflect?r.Reflect=e:i=o(r.Reflect,i),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,s=!o&&!a,u={create:o?function(){return ie(Object.create(null))}:a?function(){return ie({__proto__:null})}:function(){return ie({})},has:s?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:s?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},c=Object.getPrototypeOf(Function),l="object"==typeof O&&O.env&&"true"===O.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?te():Map,h=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?ne():Set,d=new(l||"function"!=typeof WeakMap?re():WeakMap);function p(e,t,n,r){if(B(n)){if(!$(e))throw new TypeError;if(!K(t))throw new TypeError;return S(e,t)}if(!$(e))throw new TypeError;if(!U(t))throw new TypeError;if(!U(r)&&!B(r)&&!M(r))throw new TypeError;return M(r)&&(r=void 0),A(e,t,n=W(n),r)}function v(e,t){function n(n,r){if(!U(n))throw new TypeError;if(!B(r)&&!Y(r))throw new TypeError;N(e,t,n,r)}return n}function g(e,t,n,r){if(!U(n))throw new TypeError;return B(r)||(r=W(r)),N(e,t,n,r)}function _(e,t,n){if(!U(t))throw new TypeError;return B(n)||(n=W(n)),T(e,t,n)}function m(e,t,n){if(!U(t))throw new TypeError;return B(n)||(n=W(n)),x(e,t,n)}function y(e,t,n){if(!U(t))throw new TypeError;return B(n)||(n=W(n)),R(e,t,n)}function w(e,t,n){if(!U(t))throw new TypeError;return B(n)||(n=W(n)),I(e,t,n)}function b(e,t){if(!U(e))throw new TypeError;return B(t)||(t=W(t)),j(e,t)}function k(e,t){if(!U(e))throw new TypeError;return B(t)||(t=W(t)),L(e,t)}function E(e,t,n){if(!U(t))throw new TypeError;B(n)||(n=W(n));var r=C(t,n,!1);if(B(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=d.get(t);return i.delete(n),i.size>0||d.delete(t),!0}function S(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!B(r)&&!M(r)){if(!K(r))throw new TypeError;t=r}}return t}function A(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!B(o)&&!M(o)){if(!U(o))throw new TypeError;r=o}}return r}function C(e,t,n){var r=d.get(e);if(B(r)){if(!n)return;r=new f,d.set(e,r)}var i=r.get(t);if(B(i)){if(!n)return;i=new f,r.set(t,i)}return i}function T(e,t,n){if(x(e,t,n))return!0;var r=ee(t);return!M(r)&&T(e,r,n)}function x(e,t,n){var r=C(t,n,!1);return!B(r)&&q(r.has(e))}function R(e,t,n){if(x(e,t,n))return I(e,t,n);var r=ee(t);return M(r)?void 0:R(e,r,n)}function I(e,t,n){var r=C(t,n,!1);if(!B(r))return r.get(e)}function N(e,t,n,r){C(n,r,!0).set(e,t)}function j(e,t){var n=L(e,t),r=ee(e);if(null===r)return n;var i=j(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new h,a=[],s=0,u=n;s<u.length;s++){var c=u[s];o.has(c)||(o.add(c),a.push(c))}for(var l=0,f=i;l<f.length;l++){c=f[l];o.has(c)||(o.add(c),a.push(c))}return a}function L(e,t){var n=[],r=C(e,t,!1);if(B(r))return n;for(var i=J(r.keys()),o=0;;){var a=X(i);if(!a)return n.length=o,n;var s=V(a);try{n[o]=s}catch(e){try{Q(i)}finally{throw e}}o++}}function P(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function B(e){return void 0===e}function M(e){return null===e}function z(e){return"symbol"==typeof e}function U(e){return"object"==typeof e?null!==e:"function"==typeof e}function D(e,t){switch(P(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n=3===t?"string":5===t?"number":"default",i=G(e,r);if(void 0!==i){var o=i.call(e,n);if(U(o))throw new TypeError;return o}return F(e,"default"===n?"number":n)}function F(e,t){if("string"===t){var n=e.toString;if(H(n))if(!U(i=n.call(e)))return i;if(H(r=e.valueOf))if(!U(i=r.call(e)))return i}else{var r;if(H(r=e.valueOf))if(!U(i=r.call(e)))return i;var i,o=e.toString;if(H(o))if(!U(i=o.call(e)))return i}throw new TypeError}function q(e){return!!e}function Z(e){return""+e}function W(e){var t=D(e,3);return z(t)?t:Z(t)}function $(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function H(e){return"function"==typeof e}function K(e){return"function"==typeof e}function Y(e){switch(P(e)){case 3:case 4:return!0;default:return!1}}function G(e,t){var n=e[t];if(null!=n){if(!H(n))throw new TypeError;return n}}function J(e){var t=G(e,i);if(!H(t))throw new TypeError;var n=t.call(e);if(!U(n))throw new TypeError;return n}function V(e){return e.value}function X(e){var t=e.next();return!t.done&&t}function Q(e){var t=e.return;t&&t.call(e)}function ee(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===c)return t;if(t!==c)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i||i===e?t:i}function te(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,o)},t.prototype.entries=function(){return new n(this._keys,this._values,a)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function o(e,t){return t}function a(e,t){return[e,t]}}function ne(){return function(){function e(){this._map=new f}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}()}function re(){var e=16,n=u.create(),r=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do{e="@@WeakMap@@"+c()}while(u.has(n,e));return n[e]=!0,e}function o(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:u.create()})}return e[r]}function a(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function s(e){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):a(new Uint8Array(e),e):a(new Array(e),e)}function c(){var t=s(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var n="",r=0;r<e;++r){var i=t[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function ie(e){return e.__=void 0,delete e.__,e}e("decorate",p),e("metadata",v),e("defineMetadata",g),e("hasMetadata",_),e("hasOwnMetadata",m),e("getMetadata",y),e("getOwnMetadata",w),e("getMetadataKeys",b),e("getOwnMetadataKeys",k),e("deleteMetadata",E)}(i)}()}(xf||(xf={}));const Zf=Symbol("required"),Wf=Symbol("checkType"),$f=(...e)=>(t,n,r)=>{let i=Reflect.getOwnMetadata(Zf,t,n)||[];i.push({parameterIndex:r,fields:e}),Reflect.defineMetadata(Zf,i,t,n)},Hf=(e,t,n)=>(r,i,o)=>{let a=Reflect.getOwnMetadata(Wf,r,i)||[];a.push({parameterIndex:o,type:e,properties:t,key:n}),Reflect.defineMetadata(Wf,a,r,i)};const Kf=(e,t,n)=>{const r=n.value,o=r.toString().match(/\(.*?\)/)[0].replace(/[()]/gi,"").replace(/\s/gi,"").split(",");return n.value=function(){const n=Reflect.getOwnMetadata(Zf,e,t),a=Reflect.getOwnMetadata(Wf,e,t);return a&&a.forEach((e=>{const{parameterIndex:t,type:n,properties:r,key:a}=e;let s=arguments[t],u=o[t];if(!i.isEmpty(a)){const e=null==a?void 0:a.split(".");Array.isArray(e)&&e.length>0&&e.forEach((e=>{s=s[e],u=`${u}.${e}`}))}const c=typeof s;if(!i.isUndefined(s)){if(!lr(s,n))throw Wl.wrongTypeParam(u,n,Array.isArray(s)?"array":null===s?"null":c);"object"===n&&Object.entries(r).forEach((([e,t])=>{const n=s[e];if(!i.isUndefined(n)){if(Array.isArray(t)&&!t.includes(n))throw Wl.wrongTypeParam(`${u}.${e}`,`${t}`.replace(/,/g,"|"),`'${n}'`);if(!Array.isArray(t)&&!lr(n,t))throw Wl.wrongTypeParam(`${u}.${e}`,t,Array.isArray(n)?"array":null===n?"null":typeof n)}}))}})),n&&n.forEach((e=>{const{parameterIndex:t,fields:n}=e,r=arguments[t],a=o[t],s=typeof r;if(!Array.isArray(r)&&"object"===s&&n.some((e=>i.isUndefined(r[e]))))throw Wl.missingParam(`${n} in ${a}`);if("object"!==s&&(t>=arguments.length||i.isUndefined(r)))throw Wl.missingParam(a)})),r.apply(this,arguments)},n};var Yf;class Gf{constructor(){this.events=Sr.getInstance(),Yf.set(this,void 0),kr(this,Yf,this.getInstance()),this.events.addListener=(t,n,r)=>{const i=t;return this.events.addListener(e.Events[i],n,r)}}login(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).login(e)}))}getLoginStatus(){return br(this,Yf).getLoginStatus()}getAccessToken(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getAccessToken(e)}))}getVersion(){return br(this,Yf).getVersion()}getSystemInfo(){return br(this,Yf).getSystemInfo()}setNavigationBarTitle(e){return wr(this,void 0,void 0,(function*(){return br(this,Yf).setNavigationBarTitle(e)}))}setNavigationBarColor(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setNavigationBarColor(e)}))}setBackgroundColor(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setBackgroundColor(e)}))}setNavigationBarLeftButton(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setNavigationBarLeftButton(e)}))}setDeviceOrientation(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setDeviceOrientation(e)}))}setStorage(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).setStorage(e)}))}getStorage(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getStorage(e)}))}getStorageInfo(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getStorageInfo(e)}))}removeStorage(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).removeStorage(e)}))}clearStorage(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).clearStorage(e)}))}getUserInfo(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getUserInfo(e)}))}getNetworkType(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getNetworkType(e)}))}onNetworkStatusChange(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).onNetworkStatusChange(e)}))}startBeaconDiscovery(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).startBeaconDiscovery(e)}))}stopBeaconDiscovery(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).stopBeaconDiscovery(e)}))}getBeacons(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getBeacons(e)}))}closeApp(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).closeApp(e)}))}getLocation(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getLocation(e)}))}stopBluetoothDevicesDiscovery(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).stopBluetoothDevicesDiscovery()}))}startBluetoothDevicesDiscovery(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).startBluetoothDevicesDiscovery(e)}))}openBluetoothAdapter(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).openBluetoothAdapter()}))}onBluetoothDeviceFound(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).onBluetoothDeviceFound()}))}onBluetoothAdapterStateChange(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).onBluetoothAdapterStateChange()}))}getConnectedBluetoothDevices(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getConnectedBluetoothDevices(e)}))}getBluetoothDevices(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getBluetoothDevices()}))}getBluetoothAdapterState(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getBluetoothAdapterState()}))}closeBluetoothAdapter(){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).closeBluetoothAdapter()}))}scanQRCode(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).scanQRCode(e)}))}openProfile(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).openProfile(e)}))}openChat(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).openChat(e)}))}openPostFeed(e){return wr(this,void 0,void 0,(function*(){const t=e.type;if("image"===t&&fr(e.data.imageUrl))throw Wl.wrongTypeParam("object.data.imageUrl","valid url","invalid");if("link"===t&&(fr(e.data.link)||!ir(e.data.link)))throw Wl.wrongTypeParam("object.data.link","valid url","invalid");if("profile"===t){if(fr(e.data.id))throw Wl.wrongTypeParam("object.data.id","valid id","empty");if(fr(e.data.avatar)||!ir(e.data.avatar))throw Wl.wrongTypeParam("object.data.avatar","valid url","invalid");if(fr(e.data.displayName))throw Wl.wrongTypeParam("object.data.displayName","valid displayName","empty")}return yield br(this,Yf).openPostFeed(e)}))}followOA(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).followOA(e)}))}unfollowOA(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).unFollowOA(e)}))}openShareSheet(e){return wr(this,void 0,void 0,(function*(){const t=e.type;if("image"===t&&fr(e.data.imageUrl))throw Wl.wrongTypeParam("object.data.imageUrl","valid url","invalid");if("gif"===t&&(fr(e.data.gifUrl)||!ir(e.data.gifUrl)))throw Wl.wrongTypeParam("object.data.gifUrl","valid url","invalid");if("video"===t){if(fr(e.data.videoThumb)||!ir(e.data.videoThumb))throw Wl.wrongTypeParam("object.data.videoThumb","valid url","invalid");if(fr(e.data.videoUrl)||!ir(e.data.videoUrl))throw Wl.wrongTypeParam("object.data.videoUrl","valid url","invalid")}else{if("link"===t&&(fr(e.data.link)||!ir(e.data.link)))throw Wl.wrongTypeParam("object.data.link","valid url","invalid");if("oa"===t&&fr(e.data.id))throw Wl.wrongTypeParam("object.data.id","valid id","empty")}return yield br(this,Yf).openShareSheet(e)}))}requestCameraPermission(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).requestCameraPermission(e)}))}createShortcut(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).createShortcut(e)}))}openBioAuthentication(e){var t;return wr(this,void 0,void 0,(function*(){return i.isUndefined(e.requireFingerprint)&&(e.requireFingerprint=!0),fr(null===(t=e.ui)||void 0===t?void 0:t.title)&&(e.ui=Object.assign(Object.assign({},e.ui),{title:"Xác thực"})),fr(e.ui.subTitle)&&(e.ui=Object.assign(Object.assign({},e.ui),{subTitle:"Sử dụng sinh trắc học của bạn để xác thực"})),fr(e.ui.negativeButtonText)&&(e.ui=Object.assign(Object.assign({},e.ui),{negativeButtonText:"Đóng"})),yield br(this,Yf).openBioAuthentication(e)}))}checkStateBioAuthentication(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).checkStateBioAuthentication(e)}))}sendLocation(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).sendLocation(e)}))}showToast(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).showToast(e)}))}hideKeyboard(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).hideKeyboard(e)}))}openPhone(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).openPhone(e)}))}openSMS(e){return wr(this,void 0,void 0,(function*(){if(!/^\+?\d+$/.test(e.phoneNumber))throw Wl.wrongTypeParam("object.phoneNumber","valid phone","invalid");yield br(this,Yf).openSMS(e)}))}viewOAQr(e){return wr(this,void 0,void 0,(function*(){(i.isUndefined(e.displayName)||i.isNull(e.displayName))&&(e.displayName=""),yield br(this,Yf).viewOAQr(e)}))}keepScreen(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).keepScreen(e)}))}saveImageToPhotosAlbum(e){return wr(this,void 0,void 0,(function*(){if(fr(e.imageBase64Data)&&fr(e.imageUrl))throw Wl.wrongTypeParam("object.imageBase64Data | object.imageUrl","valid data","invalid");if(!fr(e.imageUrl)&&!ir(e.imageUrl))throw Wl.wrongTypeParam("object.imageUrl","valid url","invalid");return yield br(this,Yf).saveImageToPhotosAlbum(e)}))}openMiniApp(e){return wr(this,void 0,void 0,(function*(){if(!i.isEmpty(e.params)){const t=e.params||{};Object.keys(t).forEach((e=>{"object"==typeof t[e]&&(t[e]=JSON.stringify(t[e])),t[e]=""+encodeURIComponent(t[e])})),e.params=t}yield br(this,Yf).openMiniApp(e)}))}vibrate(e){return wr(this,void 0,void 0,(function*(){fr(e.type)&&(e.type="oneShot"),fr(e.milliseconds)&&(e.milliseconds=500),yield br(this,Yf).vibrate(e)}))}openWebview(e){return wr(this,void 0,void 0,(function*(){yield br(this,Yf).openWebview(e)}))}getRouteParams(){return br(this,Yf).getRouteParams()}getAppInfo(e){return br(this,Yf).getAppInfo()}sendDataToPreviousMiniApp(e){return br(this,Yf).sendDataToPreviousMiniApp(e)}onCallbackData(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).onCallbackData(e)}))}getPhoneNumber(e){return wr(this,void 0,void 0,(function*(){return yield br(this,Yf).getPhoneNumber()}))}}Yf=new WeakMap,mr([Dl],Gf.prototype,"login",null),mr([Fl],Gf.prototype,"getLoginStatus",null),mr([Dl],Gf.prototype,"getAccessToken",null),mr([Fl],Gf.prototype,"getVersion",null),mr([Fl],Gf.prototype,"getSystemInfo",null),mr([Dl,Kf,yr(0,Hf("object",{title:"string"})),yr(0,$f("title"))],Gf.prototype,"setNavigationBarTitle",null),mr([Dl,Kf,yr(0,Hf("object",{color:"string",textColor:["white","black"],statusBarColor:"string"})),yr(0,$f("color"))],Gf.prototype,"setNavigationBarColor",null),mr([Dl,Kf,yr(0,Hf("object",{backgroundColor:"string",textColor:["white","black"]})),yr(0,$f("backgroundColor"))],Gf.prototype,"setBackgroundColor",null),mr([Dl,Kf,yr(0,Hf("object",{type:["none","back","home","both"]})),yr(0,$f("type"))],Gf.prototype,"setNavigationBarLeftButton",null),mr([Dl,Kf,yr(0,Hf("object",{rotate:["auto","portrait","landscape"]})),yr(0,$f("rotate"))],Gf.prototype,"setDeviceOrientation",null),mr([Dl,Kf,yr(0,Hf("object",{data:"object"})),yr(0,$f("data"))],Gf.prototype,"setStorage",null),mr([Dl,Kf,yr(0,Hf("object",{keys:"array<string>"})),yr(0,$f("keys"))],Gf.prototype,"getStorage",null),mr([Dl],Gf.prototype,"getStorageInfo",null),mr([Dl,Kf,yr(0,Hf("object",{keys:"array<string>"})),yr(0,$f("keys"))],Gf.prototype,"removeStorage",null),mr([Dl],Gf.prototype,"clearStorage",null),mr([Dl,Kf,yr(0,Hf("object",{avatarType:["small","normal","large"]}))],Gf.prototype,"getUserInfo",null),mr([Dl],Gf.prototype,"getNetworkType",null),mr([Dl],Gf.prototype,"onNetworkStatusChange",null),mr([Dl],Gf.prototype,"startBeaconDiscovery",null),mr([Dl],Gf.prototype,"stopBeaconDiscovery",null),mr([Dl],Gf.prototype,"getBeacons",null),mr([Dl],Gf.prototype,"closeApp",null),mr([Dl],Gf.prototype,"getLocation",null),mr([Dl],Gf.prototype,"stopBluetoothDevicesDiscovery",null),mr([Dl],Gf.prototype,"startBluetoothDevicesDiscovery",null),mr([Dl],Gf.prototype,"openBluetoothAdapter",null),mr([Dl],Gf.prototype,"onBluetoothDeviceFound",null),mr([Dl],Gf.prototype,"onBluetoothAdapterStateChange",null),mr([Dl],Gf.prototype,"getConnectedBluetoothDevices",null),mr([Dl],Gf.prototype,"getBluetoothDevices",null),mr([Dl],Gf.prototype,"getBluetoothAdapterState",null),mr([Dl],Gf.prototype,"closeBluetoothAdapter",null),mr([Dl],Gf.prototype,"scanQRCode",null),mr([Dl,Kf,yr(0,Hf("object",{type:["user","oa","aliasOA"],id:"string"})),yr(0,$f("type","id"))],Gf.prototype,"openProfile",null),mr([Dl,Kf,yr(0,Hf("object",{type:["user","oa"],id:"string"})),yr(0,$f("type","id"))],Gf.prototype,"openChat",null),mr([Dl,Kf,yr(0,Hf("object",{type:["image","link","profile"],data:"object"})),yr(0,Hf("object",{imageUrl:"string",link:"string",title:"string",thumb:"string",description:"string",avatar:"string",id:"string",displayName:"string"},"data")),yr(0,$f("type","data"))],Gf.prototype,"openPostFeed",null),mr([Dl,Kf,yr(0,Hf("object",{id:"string",showDialogConfirm:"boolean"})),yr(0,$f("id"))],Gf.prototype,"followOA",null),mr([Dl,Kf,yr(0,Hf("object",{id:"string"})),yr(0,$f("id"))],Gf.prototype,"unfollowOA",null),mr([Dl,Kf,yr(0,Hf("object",{type:["image","gif","video","link","oa"],data:"object"})),yr(0,Hf("object",{imageUrl:"string",gifUrl:"string",width:"number",height:"number",videoThumb:"string",videoUrl:"string",link:"string",chatOnly:"boolean",id:"string"},"data")),yr(0,$f("type","data"))],Gf.prototype,"openShareSheet",null),mr([Dl],Gf.prototype,"requestCameraPermission",null),mr([Dl],Gf.prototype,"createShortcut",null),mr([Dl,Kf,yr(0,$f("secretData")),yr(0,Hf("object",{secretData:"string",ui:"object",requireFingerprint:"boolean"})),yr(0,Hf("object",{title:"string",subTitle:"string",negativeButtonText:"string"},"ui"))],Gf.prototype,"openBioAuthentication",null),mr([Dl],Gf.prototype,"checkStateBioAuthentication",null),mr([Dl,Kf,yr(0,$f("toUserId"))],Gf.prototype,"sendLocation",null),mr([Dl,Kf,yr(0,$f("message"))],Gf.prototype,"showToast",null),mr([Dl],Gf.prototype,"hideKeyboard",null),mr([Dl,Kf,yr(0,$f("phoneNumber")),yr(0,Hf("object",{phoneNumber:"string"}))],Gf.prototype,"openPhone",null),mr([Dl,Kf,yr(0,$f("content","phoneNumber")),yr(0,Hf("object",{content:"string",phoneNumber:"string"}))],Gf.prototype,"openSMS",null),mr([Dl,Kf,yr(0,$f("id")),yr(0,Hf("object",{id:"string",displayName:"string"}))],Gf.prototype,"viewOAQr",null),mr([Dl],Gf.prototype,"keepScreen",null),mr([Dl,Kf,yr(0,Hf("object",{imageBase64Data:"string",imageUrl:"string",type:"string"}))],Gf.prototype,"saveImageToPhotosAlbum",null),mr([Dl,Kf,yr(0,$f("appId")),yr(0,Hf("object",{appId:"string",params:"object"}))],Gf.prototype,"openMiniApp",null),mr([Dl,Kf,yr(0,Hf("object",{type:["oneShot"],milliseconds:"number"}))],Gf.prototype,"vibrate",null),mr([Dl,Kf,yr(0,$f("url")),yr(0,Hf("object",{url:"string"}))],Gf.prototype,"openWebview",null),mr([Fl],Gf.prototype,"getRouteParams",null),mr([Dl],Gf.prototype,"getAppInfo",null),mr([Dl],Gf.prototype,"sendDataToPreviousMiniApp",null),mr([Dl],Gf.prototype,"onCallbackData",null),mr([Dl],Gf.prototype,"getPhoneNumber",null);class Jf extends Gf{getInstance(){return Ff.getInstance()}}class Vf extends Gf{getInstance(){return new qf}}const Xf=ar();e.default=void 0,window.onJSCall=e=>function(t){Bl.getInstance().onJSCall(e,t)},window.onMultiJSCall=e=>function(t){Bl.getInstance().onMultiJSCall(e,t)},window.zaloJSV2={zalo_h5_event_handler:function(e,t,n){Bl.getInstance().nativeEventHandler(e,t,n)}},Xf.isZalo?e.default=new Jf:e.default=new Vf,window.ZaloMiniAppSDK=e.default,e.SDKCreator=Gf,e.default=e.default,Object.defineProperty(e,"__esModule",{value:!0})}));
|