easemob-websdk 4.9.2 → 4.10.0
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/CHANGELOG.md +24 -10
- package/Easemob-chat.d.ts +3 -0
- package/Easemob-chat.js +1 -1
- package/contact/contact.js +1 -1
- package/group/group.js +1 -1
- package/localCache/localCache.js +1 -1
- package/miniCore/miniCore.js +1 -1
- package/miniProgram/Easemob-chat.js +1 -1
- package/package.json +1 -1
- package/presence/presence.js +1 -1
- package/silent/silent.js +1 -1
- package/thread/thread.js +1 -1
- package/translation/translation.js +1 -1
- package/uniApp/Easemob-chat.js +1 -1
package/miniCore/miniCore.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.websdk=t():e.websdk=t()}(self,(function(){return function(){var __webpack_modules__={4537:function(e){"use strict";e.exports=function(e,t){for(var n=new Array(arguments.length-1),r=0,o=2,i=!0;o<arguments.length;)n[r++]=arguments[o++];return new Promise((function(o,s){n[r]=function(e){if(i)if(i=!1,e)s(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];o.apply(null,t)}};try{e.apply(t||null,n)}catch(e){i&&(i=!1,s(e))}}))}},7419:function(e,t){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),o=new Array(123),i=0;i<64;)o[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;n.encode=function(e,t,n){for(var o,i=null,s=[],a=0,u=0;t<n;){var c=e[t++];switch(u){case 0:s[a++]=r[c>>2],o=(3&c)<<4,u=1;break;case 1:s[a++]=r[o|c>>4],o=(15&c)<<2,u=2;break;case 2:s[a++]=r[o|c>>6],s[a++]=r[63&c],u=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=r[o],s[a++]=61,1===u&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";n.decode=function(e,t,n){for(var r,i=n,a=0,u=0;u<e.length;){var c=e.charCodeAt(u++);if(61===c&&a>1)break;if(void 0===(c=o[c]))throw Error(s);switch(a){case 0:r=c,a=1;break;case 1:t[n++]=r<<2|(48&c)>>4,r=c,a=2;break;case 2:t[n++]=(15&r)<<4|(60&c)>>2,r=c,a=3;break;case 3:t[n++]=(3&r)<<6|c,a=0}}if(1===a)throw Error(s);return n-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},5124:function(e){"use strict";function t(e,n){"string"==typeof e&&(n=e,e=void 0);var r=[];function o(e){if("string"!=typeof e){var n=i();if(t.verbose&&console.log("codegen: "+n),n="return "+n,e){for(var s=Object.keys(e),a=new Array(s.length+1),u=new Array(s.length),c=0;c<s.length;)a[c]=s[c],u[c]=e[s[c++]];return a[c]=n,Function.apply(null,a).apply(null,u)}return Function(n)()}for(var l=new Array(arguments.length-1),d=0;d<l.length;)l[d]=arguments[++d];if(d=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var n=l[d++];switch(t){case"d":case"f":return String(Number(n));case"i":return String(Math.floor(n));case"j":return JSON.stringify(n);case"s":return String(n)}return"%"})),d!==l.length)throw Error("parameter count mismatch");return r.push(e),o}function i(t){return"function "+(t||n||"")+"("+(e&&e.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return o.toString=i,o}e.exports=t,t.verbose=!1},9211:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},9054:function(e,t,n){"use strict";e.exports=i;var r=n(4537),o=n(7199)("fs");function i(e,t,n){return"function"==typeof t?(n=t,t={}):t||(t={}),n?!t.xhr&&o&&o.readFile?o.readFile(e,(function(r,o){return r&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,n):r?n(r):n(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,n):r(i,this,e,t)}i.xhr=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(0!==r.status&&200!==r.status)return n(Error("status "+r.status));if(t.binary){var e=r.response;if(!e){e=[];for(var o=0;o<r.responseText.length;++o)e.push(255&r.responseText.charCodeAt(o))}return n(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return n(null,r.responseText)}},t.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",e),r.send()}},945:function(e){"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function a(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?o:i,e.writeFloatBE=r?i:o,e.readFloatLE=r?s:a,e.readFloatBE=r?a:s}():function(){function t(e,t,n,r){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,n,r)}}function s(e,t,n){var r=e(t,n),o=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:o*(1/0):0===i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=s.bind(null,o),e.readFloatBE=s.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(e,r,o){t[0]=e,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function a(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?o:i,e.writeDoubleBE=r?i:o,e.readDoubleLE=r?s:a,e.readDoubleBE=r?a:s}():function(){function t(e,t,n,r,o,i){var s=r<0?1:0;if(s&&(r=-r),0===r)e(0,o,i+t),e(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))e(0,o,i+t),e(2146959360,o,i+n);else if(r>17976931348623157e292)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+n);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+n);else{var u=Math.floor(Math.log(r)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=r*Math.pow(2,-u))>>>0,o,i+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,o,i+n)}}}function s(e,t,n,r,o){var i=e(r,o+t),s=e(r,o+n),a=2*(s>>31)+1,u=s>>>20&2047,c=4294967296*(1048575&s)+i;return 2047===u?c?NaN:a*(1/0):0===u?5e-324*a*c:a*Math.pow(2,u-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=s.bind(null,o,0,4),e.readDoubleBE=s.bind(null,i,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},7199:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},8626:function(e,t){"use strict";var n=t,r=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=n.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=r(e),o="";n&&(o=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):n?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return o+t.join("/")};n.resolve=function(e,t,n){return n||(t=o(t)),r(t)?t:(n||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},6662:function(e){"use strict";e.exports=function(e,t,n){var r=n||8192,o=r>>>1,i=null,s=r;return function(n){if(n<1||n>o)return e(n);s+n>r&&(i=e(r),s=0);var a=t.call(i,s,s+=n);return 7&s&&(s=1+(7|s)),a}}},4997:function(e,t){"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},n.read=function(e,t,n){if(n-t<1)return"";for(var r,o=null,i=[],s=0;t<n;)(r=e[t++])<128?i[s++]=r:r>191&&r<224?i[s++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[s++]=55296+(r>>10),i[s++]=56320+(1023&r)):i[s++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))},n.write=function(e,t,n){for(var r,o,i=n,s=0;s<e.length;++s)(r=e.charCodeAt(s))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=e.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&o),++s,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-i}},4188:function(e,t,n){var r,o,i;!function(s){"use strict";if(null!=t&&"number"!=typeof t.nodeType)e.exports=s();else if(null!=n.amdO)o=[],void 0===(i="function"==typeof(r=s)?r.apply(t,o):r)||(e.exports=i);else{var a=s(),u="undefined"!=typeof self?self:$.global;"function"!=typeof u.btoa&&(u.btoa=a.btoa),"function"!=typeof u.atob&&(u.atob=a.atob)}}((function(){"use strict";var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function t(e){this.message=e}return t.prototype=new Error,t.prototype.name="InvalidCharacterError",{btoa:function(n){for(var r,o,i=String(n),s=0,a=e,u="";i.charAt(0|s)||(a="=",s%1);u+=a.charAt(63&r>>8-s%1*8)){if((o=i.charCodeAt(s+=3/4))>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|o}return u},atob:function(n){var r=String(n).replace(/[=]+$/,"");if(r.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,s=0,a=0,u="";i=r.charAt(a++);~i&&(o=s%4?64*o+i:i,s++%4)?u+=String.fromCharCode(255&o>>(-2*s&6)):0)i=e.indexOf(i);return u}}}))},4363:function(e,t,n){"use strict";n.d(t,{U:function(){return a},w:function(){return u}}),n(9601),n(2772),n(1249);var r=n(7360),o=n(8161),i=n(4024),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},a={chat:"singleChat",chatroom:"chatRoom",groupchat:"groupChat",singleChat:"singleChat",chatRoom:"chatRoom",groupChat:"groupChat"};function u(e,t){var n,u,c,l=t||{},d=l.formatCustomExts,p=void 0===d||d,f=l.formatChatType,h=void 0!==f&&f,_=e.id,E=e.payload,v=e.timestamp,g=e.to,m=E.bodies&&E.bodies.length>0?E.bodies[0]:{},y={},O={},T=E.type?E.type:g.indexOf("@conference.easemob.com")>-1?"groupChat":"singleChat";T="chat"===T?"singleChat":T,h&&E.type&&(T=a[E.type]);var R="";switch(m.type){case"txt":if(Object.prototype.hasOwnProperty.call(m,"subType")&&"sub_combine"===m.subType)R=o.t.call(this,{remotePath:null==m?void 0:m.url,secret:null==m?void 0:m.secret}),y={id:_,type:"combine",chatType:T,to:E.to,from:E.from,ext:E.ext,time:v,title:m.title||"",summary:m.summary||"",url:R||"",secret:m.secret||"",file_length:m.file_length||0,filename:m.filename||"",compatibleText:m.msg,combineLevel:m.combineLevel||0};else{var I=null===(n=null==E?void 0:E.meta)||void 0===n?void 0:n.edit_msg;if(y={id:_,type:"txt",chatType:T,msg:m.msg||"",to:E.to||"",from:E.from,time:v,ext:E.ext},I){var S=I.edit_time,C=I.operator,N=I.count;y.modifiedInfo={operationTime:S,operatorId:C,operationCount:N}}}break;case"img":R=this.useOwnUploadFun?null==m?void 0:m.url:o.t.call(this,{remotePath:null==m?void 0:m.url,secret:null==m?void 0:m.secret}),y={id:_,type:"img",chatType:T,to:E.to,from:E.from,time:v,ext:E.ext,width:(null===(u=m.size)||void 0===u?void 0:u.width)||0,height:(null===(c=m.size)||void 0===c?void 0:c.height)||0,thumb:this.useOwnUploadFun?"":"".concat(R,"&thumbnail=true"),thumb_secret:m.secret,secret:m.secret||"",url:R||"",file_length:m.file_length||0,file:{}};break;case"video":R=this.useOwnUploadFun?null==m?void 0:m.url:o.t.call(this,{remotePath:null==m?void 0:m.url,secret:null==m?void 0:m.secret}),y={id:_,type:"video",chatType:T,from:E.from,to:E.to,thumb:i.P6.formatAttachUrl.call(this,m.thumb),thumb_secret:m.thumb_secret||"",url:R||"",secret:m.secret||"",filename:m.filename,length:m.length||0,file:{},file_length:m.file_length||0,filetype:E.ext.file_type||"",ext:E.ext,time:v};break;case"loc":y={id:_,type:"loc",chatType:T,from:E.from,to:E.to,buildingName:m.buildingName||"",addr:m.addr,lat:m.lat,lng:m.lng,ext:E.ext,time:v};break;case"audio":R=this.useOwnUploadFun?null==m?void 0:m.url:o.t.call(this,{remotePath:null==m?void 0:m.url,secret:null==m?void 0:m.secret}),y={id:_,type:"audio",chatType:T,from:E.from,to:E.to,secret:m.secret||"",ext:E.ext,time:v,url:R||"",file:{},filename:m.filename,length:m.length||0,file_length:m.file_length||0,filetype:E.ext.file_type||""};break;case"file":R=this.useOwnUploadFun?null==m?void 0:m.url:o.t.call(this,{remotePath:null==m?void 0:m.url,secret:null==m?void 0:m.secret}),y={id:_,type:"file",chatType:T,from:E.from,to:E.to,ext:E.ext,time:v,url:R||"",secret:m.secret||"",file:{},filename:m.filename||"",file_length:m.file_length||0,filetype:E.ext.file_type||""};break;case"cmd":y={id:_,type:"cmd",chatType:T,from:E.from,to:E.to,ext:E.ext,time:v,action:m.action||""};break;case"custom":var b=m.customExts||{};p&&m.customExts&&(b={},m.customExts.map((function(e){b=s(s({},b),e)}))),y={id:_,type:"custom",chatType:T,from:E.from,to:E.to,ext:E.ext,time:v,customEvent:m.customEvent||"",customExts:b};break;case"combine":R=o.t.call(this,{remotePath:null==m?void 0:m.url,secret:null==m?void 0:m.secret}),y={id:_,type:"combine",chatType:T,msg:m.msg||"",to:E.to||"",from:E.from,time:v,ext:E.ext,title:m.title||"",summary:m.summary||"",url:R||"",compatibleText:m.text,combineLevel:m.combineLevel||0,secret:m.secret||"",filename:m.filename||"",file_length:m.file_length||0};break;default:r.kg.error("unexpected message: ".concat(e))}if(E.msgConfig&&(O.msgConfig=E.msgConfig),null==E?void 0:E.meta){var A=E.meta;A.thread&&(O.chatThread={messageId:A.thread.msg_parent_id,parentId:A.thread.muc_parent_id,chatThreadName:A.thread.thread_name}),A.reaction&&(O.reactions=A.reaction),A.translations&&(O.translations=A.translations)}return s(s({},y),O)}},6801:function(e,t,n){"use strict";n.d(t,{r:function(){return c}}),n(1539),n(8674),n(2222),n(4812);var r=n(3246),o=n(5531),i=n(7252),s=n(4024),a=n(7360),u=n(1595);function c(e){if("string"!=typeof e.deviceId||""===e.deviceId)throw Error('Invalid parameter: "deviceId"');if(!r.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var n=this.context,c=n.orgName,l=n.appName,d=n.accessToken,p={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(l,"/users/").concat(this.user),type:"PUT",data:JSON.stringify({device_id:e.deviceId,device_token:e.deviceToken,notifier_name:e.notifierName}),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};a.kg.debug("Call uploadPushTokenToServer",e);var f=s.hj.bind(this,p,u.fI.UPLOAD_PUSH_TOKEN);return s.P6.retryPromise(f).then((function(e){var t=e.entities[0]||{};return{type:e.type,data:t}}))}},3246:function(e,t,n){"use strict";n.d(t,{H7:function(){return l},XZ:function(){return u},_W:function(){return c}}),n(7941),n(9554),n(1539),n(4747),n(6699),n(2023);var r=n(5531),o=n(7252),i=n(7360);function s(){var e=this.context.appName,t=this.context.orgName;return!(!e||!t)||(this.onError&&this.onError({type:r.E.WEBIM_CONNCTION_AUTH_ERROR,message:"appName or orgName is illegal"}),!1)}function a(){var e,t=this.context.accessToken;if(!t){var n=o.Z.create({type:r.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"});return i.kg.debug("token not assign error",t),this.onError&&this.onError(n),null===(e=this.eventHandler)||void 0===e||e.dispatch("onError",n),!1}return!0}function u(){return a.call(this)&&s.call(this)}function c(e){var t=e.data,n=e.type;return{data:{status:Object.keys(t.errorKeys).length>0?"fail":"success",errorKeys:t.errorKeys,successKeys:t.successKeys},type:n}}function l(e){var t=e.data,n=void 0;return Object.keys(t.errorKeys).length>0&&Object.keys(t.errorKeys).forEach((function(e){var i=t.errorKeys[e];n=i.includes("is not part of you")?o.Z.create({type:r.E.NO_PERMISSION,message:i}):i.includes("size of metadata for this single chatroom exceeds the user defined limit")||i.includes("total size of chatroom metadata for this app exceeds the user defined limit")||i.includes("is exceeding maximum limit")?o.Z.create({type:r.E.MAX_LIMIT,message:i}):i.includes("is not Legal")?o.Z.create({type:r.E.REQUEST_PARAMETER_ERROR,message:i}):i.includes("Failed to update userMetadata. Concurrent updates not allowed")?o.Z.create({type:r.E.OPERATION_NOT_ALLOWED,message:i}):o.Z.create({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:i})})),n}},2071:function(e,t,n){"use strict";n.d(t,{$x:function(){return a},F3:function(){return u},TJ:function(){return o},Tp:function(){return d},Wc:function(){return r},el:function(){return i},iB:function(){return c},iO:function(){return s},yK:function(){return l}}),n(6992),n(1532),n(1539),n(8783),n(3948);var r=7,o=new Map,i="im",s=new Map,a="32f24ab2ddb74f508aa9286c356cec84",u=1e3,c={INIT:9674,API:9675},l="direct",d=-1},1595:function(e,t,n){"use strict";var r,o,i,s,a,u;n.d(t,{C8:function(){return r},aC:function(){return u},c:function(){return i},dd:function(){return a},fI:function(){return o},td:function(){return s}}),function(e){e[e.UNKNOWOPERATION=-1]="UNKNOWOPERATION",e[e.REST_GET_SESSION_LIST=1]="REST_GET_SESSION_LIST",e[e.REST_DEL_SESSION=2]="REST_DEL_SESSION",e[e.REST_GET_HISTORY_MESSAGE=3]="REST_GET_HISTORY_MESSAGE",e[e.REST_PIN_CONVERSATION=4]="REST_PIN_CONVERSATION",e[e.REST_MARK_CONVERSATION=5]="REST_MARK_CONVERSATION",e[e.REST_UPLOAD_FILE_IN_PARTS=6]="REST_UPLOAD_FILE_IN_PARTS",e[e.REST_DELETE_MESSAGES_CONVERSATIONS=7]="REST_DELETE_MESSAGES_CONVERSATIONS",e[e.REST_PIN_MESSAGE=8]="REST_PIN_MESSAGE",e[e.REST_FETCH_PINMESSAGES=9]="REST_FETCH_PINMESSAGES",e[e.REST_OPERATE=100]="REST_OPERATE",e[e.MSYNC_SENDMESSAGE=101]="MSYNC_SENDMESSAGE",e[e.MSYNC_RECALLMESSAGE=102]="MSYNC_RECALLMESSAGE",e[e.MSYNC_MODIFYMESSAGE=103]="MSYNC_MODIFYMESSAGE",e[e.MSYNC_OPERATE=200]="MSYNC_OPERATE",e[e.ROSTER_ADD=201]="ROSTER_ADD",e[e.ROSTER_REMOVE=202]="ROSTER_REMOVE",e[e.ROSTER_ACCEPT=203]="ROSTER_ACCEPT",e[e.ROSTER_DECLINE=204]="ROSTER_DECLINE",e[e.ROSTER_BAN=205]="ROSTER_BAN",e[e.ROSTER_ALLOW=206]="ROSTER_ALLOW",e[e.ROSTER_BLACKLIST=207]="ROSTER_BLACKLIST",e[e.ROSTER_CONTACTS=208]="ROSTER_CONTACTS",e[e.ROSTER_GET_ALL_CONTACTS_REMARKS=209]="ROSTER_GET_ALL_CONTACTS_REMARKS",e[e.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE=210]="ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE",e[e.ROSTER_SET_CONTACT_REMARK=211]="ROSTER_SET_CONTACT_REMARK",e[e.ROSTER_OPERATE=300]="ROSTER_OPERATE",e[e.USER_LOGIN=301]="USER_LOGIN",e[e.USER_CREATE=302]="USER_CREATE",e[e.USER_UPDATE_USERINFO=303]="USER_UPDATE_USERINFO",e[e.USER_FETCH_USERINFO=304]="USER_FETCH_USERINFO",e[e.USER_UPDATE_NICK=305]="USER_UPDATE_NICK",e[e.USER_UPLOAD_PUSH_TOKEN=306]="USER_UPLOAD_PUSH_TOKEN",e[e.USER_LOGGEDIN_OTHER_PLATFORM=307]="USER_LOGGEDIN_OTHER_PLATFORM",e[e.USER_OPERATE=400]="USER_OPERATE",e[e.GROUP_CREATEGROUP=401]="GROUP_CREATEGROUP",e[e.GROUP_BLOCK_MESSAGE=402]="GROUP_BLOCK_MESSAGE",e[e.GROUP_FETCH_PUBLICGROUPS_WITHCURSOR=403]="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e[e.GROUP_FETCH_USERS_GROUP=404]="GROUP_FETCH_USERS_GROUP",e[e.GROUP_CHANGE_OWNER=405]="GROUP_CHANGE_OWNER",e[e.GROUP_FETCH_SPECIFICATION=406]="GROUP_FETCH_SPECIFICATION",e[e.GROUP_CHANGE_GROUPATTRIBUTE=407]="GROUP_CHANGE_GROUPATTRIBUTE",e[e.GROUP_FETCH_MEMEBERS=408]="GROUP_FETCH_MEMEBERS",e[e.GROUP_GET_ADMIN=409]="GROUP_GET_ADMIN",e[e.GROUP_SET_ADMIN=410]="GROUP_SET_ADMIN",e[e.GROUP_REMOVE_ADMIN=411]="GROUP_REMOVE_ADMIN",e[e.GROUP_DESTOTYGROUP=412]="GROUP_DESTOTYGROUP",e[e.GROUP_LEAVEGROUP=413]="GROUP_LEAVEGROUP",e[e.GROUP_INVITE_TO_GROUP=414]="GROUP_INVITE_TO_GROUP",e[e.GROUP_JOIN_PUBLICGROUP=415]="GROUP_JOIN_PUBLICGROUP",e[e.GROUP_ACCEPT_JOINPUBLICGROUPAPPL=416]="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e[e.GROUP_DECLINE_JOINPUBLICGROUPAPPL=417]="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e[e.GROUP_ACCEPT_INVITATION=418]="GROUP_ACCEPT_INVITATION",e[e.GROUP_DECLINE_INVITATION=419]="GROUP_DECLINE_INVITATION",e[e.GROUP_REMOVE_MEMBER=420]="GROUP_REMOVE_MEMBER",e[e.GROUP_REMOVE_MEMBERS=421]="GROUP_REMOVE_MEMBERS",e[e.GROUP_MUTE_MEMBERS=422]="GROUP_MUTE_MEMBERS",e[e.GROUP_UNMUTE_MEMBERS=423]="GROUP_UNMUTE_MEMBERS",e[e.GROUP_FETCH_MUTES=424]="GROUP_FETCH_MUTES",e[e.GROUP_BLOCK_MEMBER=425]="GROUP_BLOCK_MEMBER",e[e.GROUP_BLOCK_MEMBERS=426]="GROUP_BLOCK_MEMBERS",e[e.GROUP_UNBLOCK_MEMBER=427]="GROUP_UNBLOCK_MEMBER",e[e.GROUP_UNBLOCK_MEMBERS=428]="GROUP_UNBLOCK_MEMBERS",e[e.GROUP_GET_BLOCK_LIST=429]="GROUP_GET_BLOCK_LIST",e[e.GROUP_MUTE_ALLMEMBERS=430]="GROUP_MUTE_ALLMEMBERS",e[e.GROUP_UNMUTE_ALLMEMBERS=431]="GROUP_UNMUTE_ALLMEMBERS",e[e.GROUP_ADD_WHITELIST=432]="GROUP_ADD_WHITELIST",e[e.GROUP_REMOVE_WHITELIST=433]="GROUP_REMOVE_WHITELIST",e[e.GROUP_FETCH_WHITELIST=434]="GROUP_FETCH_WHITELIST",e[e.GROUP_IS_IN_WHITELIST=435]="GROUP_IS_IN_WHITELIST",e[e.GROUP_GET_READ_USERS=436]="GROUP_GET_READ_USERS",e[e.GROUP_FETCH_ANNOUNCEMENT=437]="GROUP_FETCH_ANNOUNCEMENT",e[e.GROUP_UPDATE_ANNOUNCEMENT=438]="GROUP_UPDATE_ANNOUNCEMENT",e[e.GROUP_UPLOAD_SHAREDFILE=439]="GROUP_UPLOAD_SHAREDFILE",e[e.GROUP_DELETE_SHAREDFILE=440]="GROUP_DELETE_SHAREDFILE",e[e.GROUP_FETCH_SHAREDFILE=441]="GROUP_FETCH_SHAREDFILE",e[e.GROUP_DOWNLOAD_SHAREDFILE=442]="GROUP_DOWNLOAD_SHAREDFILE",e[e.GROUP_MEMBER_SET_META_DATA=443]="GROUP_MEMBER_SET_META_DATA",e[e.GROUP_MEMBER_FETCH_META_DATA=444]="GROUP_MEMBER_FETCH_META_DATA",e[e.GROUP_OPERATE=500]="GROUP_OPERATE",e[e.CHATROOM_FETCH_CHATROOMSWITHPAGE=501]="CHATROOM_FETCH_CHATROOMSWITHPAGE",e[e.CHATROOM_CREATECHATROOM=502]="CHATROOM_CREATECHATROOM",e[e.CHATROOM_DESTORYCHATROOM=503]="CHATROOM_DESTORYCHATROOM",e[e.CHATROOM_FETCH_SPECIFICATION=504]="CHATROOM_FETCH_SPECIFICATION",e[e.CHATROOM_CHANGE_ATTRIBUTE=505]="CHATROOM_CHANGE_ATTRIBUTE",e[e.CHATROOM_REMOVE_MEMBER=506]="CHATROOM_REMOVE_MEMBER",e[e.CHATROOM_REMOVE_MEMBERS=507]="CHATROOM_REMOVE_MEMBERS",e[e.CHATROOM_ADD_MEMBERS=508]="CHATROOM_ADD_MEMBERS",e[e.CHATROOM_JOINCAHTROOM=509]="CHATROOM_JOINCAHTROOM",e[e.CHATROOM_LEAVECAHTROOM=510]="CHATROOM_LEAVECAHTROOM",e[e.CHATROOM_FETCH_MEMBERS=511]="CHATROOM_FETCH_MEMBERS",e[e.CHATROOM_GET_ADMIN=512]="CHATROOM_GET_ADMIN",e[e.CHATROOM_SET_ADMIN=513]="CHATROOM_SET_ADMIN",e[e.CHATROOM_REMOVE_ADMIN=514]="CHATROOM_REMOVE_ADMIN",e[e.CHATROOM_MUTE_USER=515]="CHATROOM_MUTE_USER",e[e.CHATROOM_UNMUTE_USER=516]="CHATROOM_UNMUTE_USER",e[e.CHATROOM_FETCH_MUTES=517]="CHATROOM_FETCH_MUTES",e[e.CHATROOM_BLOCK_USER=518]="CHATROOM_BLOCK_USER",e[e.CHATROOM_BLOCK_USERS=519]="CHATROOM_BLOCK_USERS",e[e.CHATROOM_UNBLOCK_USER=520]="CHATROOM_UNBLOCK_USER",e[e.CHATROOM_UNBLOCK_USERS=521]="CHATROOM_UNBLOCK_USERS",e[e.CHATROOM_FETCH_BANS=522]="CHATROOM_FETCH_BANS",e[e.CHATROOM_MUTE_ALLMEMEBERS=523]="CHATROOM_MUTE_ALLMEMEBERS",e[e.CHATROOM_UNMUTE_ALLMEMEBERS=524]="CHATROOM_UNMUTE_ALLMEMEBERS",e[e.CHATROOM_ADD_WHITELIST=525]="CHATROOM_ADD_WHITELIST",e[e.CHATROOM_REMOVE_WHITELIST=526]="CHATROOM_REMOVE_WHITELIST",e[e.CHATROOM_FETCH_WHITELIST=527]="CHATROOM_FETCH_WHITELIST",e[e.CHATROOM_FETCH_MEMBERIN_WHITELIST=528]="CHATROOM_FETCH_MEMBERIN_WHITELIST",e[e.CHATROOM_FETCH_ANNOUNCEMENT=529]="CHATROOM_FETCH_ANNOUNCEMENT",e[e.CHATROOM_UPDATE_ANNOUNCEMENT=530]="CHATROOM_UPDATE_ANNOUNCEMENT",e[e.CHATROOM_REMOVE_SHARE_FILE=531]="CHATROOM_REMOVE_SHARE_FILE",e[e.CHATROOM_GET_SHARE_FILE_LIST=532]="CHATROOM_GET_SHARE_FILE_LIST",e[e.CHATROOM_UPLOAD_FILE=533]="CHATROOM_UPLOAD_FILE",e[e.CHATROOM_SET_META_DATA=534]="CHATROOM_SET_META_DATA",e[e.CHATROOM_DELETE_META_DATA=535]="CHATROOM_DELETE_META_DATA",e[e.CHATROOM_FETCH_META_DATA=536]="CHATROOM_FETCH_META_DATA",e[e.CHATROOM_FETCH_USER_JOINED_CHATROOM=537]="CHATROOM_FETCH_USER_JOINED_CHATROOM",e[e.CHATROOM_OPERATE=600]="CHATROOM_OPERATE"}(r||(r={})),function(e){e.SDK_INTERNAL="SDK_INTERNAL",e.LOGIN="USER_LOGIN",e.REGISTER="USER_CREATE",e.GET_CHATROOM_LIST="CHATROOM_FETCH_CHATROOMSWITHPAGE",e.CREATE_CHATROOM="CHATROOM_CREATECHATROOM",e.DESTROY_CHATROOM="CHATROOM_DESTORYCHATROOM",e.GET_CHATROOM_DETAIL="CHATROOM_FETCH_SPECIFICATION",e.MODIFY_CHATROOM="CHATROOM_CHANGE_ATTRIBUTE",e.REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBER",e.MULTI_REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBERS",e.ADD_USERS_TO_CHATROOM="CHATROOM_ADD_MEMBERS",e.JOIN_CHATROOM="CHATROOM_JOINCAHTROOM",e.QUIT_CHATROOM="CHATROOM_LEAVECAHTROOM",e.LIST_CHATROOM_MEMBERS="CHATROOM_FETCH_MEMBERS",e.GET_CHATROOM_ADMIN="CHATROOM_GET_ADMIN",e.SET_CHATROOM_ADMIN="CHATROOM_SET_ADMIN",e.REMOVE_CHATROOM_ADMIN="CHATROOM_REMOVE_ADMIN",e.MUTE_CHATROOM_MEMBER="CHATROOM_MUTE_USER",e.REMOVE_MUTE_CHATROOM_MEMBER="CHATROOM_UNMUTE_USER",e.GET_MUTE_CHATROOM_MEMBERS="CHATROOM_FETCH_MUTES",e.SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USER",e.MULTI_SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USERS",e.REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USER",e.MULTI_REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USERS",e.GET_CHATROOM_BLOCK_MEMBERS="CHATROOM_FETCH_BANS",e.DISABLED_CHATROOM_SEND_MSG="CHATROOM_MUTE_ALLMEMEBERS",e.ENABLE_CHATROOM_SEND_MSG="CHATROOM_UNMUTE_ALLMEMEBERS",e.ADD_CHATROOM_WHITE_USERS="CHATROOM_ADD_WHITELIST",e.REMOVE_CHATROOM_WHITE_USERS="CHATROOM_REMOVE_WHITELIST",e.GET_CHATROOM_WHITE_USERS="CHATROOM_FETCH_WHITELIST",e.CHECK_CHATROOM_WHITE_USER="CHATROOM_FETCH_MEMBERIN_WHITELIST",e.GET_CHATROOM_ANN="CHATROOM_FETCH_ANNOUNCEMENT",e.UPDATE_CHATROOM_ANN="CHATROOM_UPDATE_ANNOUNCEMENT",e.DELETE_CHATROOM_FILE="CHATROOM_REMOVE_SHARE_FILE",e.GET_CHATROOM_FILES="CHATROOM_GET_SHARE_FILE_LIST",e.UPLOAD_CHATROOM_FILE="CHATROOM_UPLOAD_FILE",e.SET_CHATROOM_ATTR="CHATROOM_SET_META_DATA",e.DELETE_CHATROOM_ATTR="CHATROOM_DELETE_META_DATA",e.GET_CHATROOM_ATTR="CHATROOM_FETCH_META_DATA",e.GET_USER_JOINED_CHATROOM="CHATROOM_FETCH_USER_JOINED_CHATROOM",e.CREATE_GROUP="GROUP_CREATEGROUP",e.BLOCK_GROUP="GROUP_BLOCK_MESSAGE",e.LIST_GROUP="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e.GET_USER_GROUP="GROUP_FETCH_USERS_GROUP",e.CHANGE_OWNER="GROUP_CHANGE_OWNER",e.GET_GROUP_INFO="GROUP_FETCH_SPECIFICATION",e.MODIFY_GROUP="GROUP_CHANGE_GROUPATTRIBUTE",e.LIST_GROUP_MEMBER="GROUP_FETCH_MEMEBERS",e.GET_GROUP_ADMIN="GROUP_GET_ADMIN",e.SET_GROUP_ADMIN="GROUP_SET_ADMIN",e.REMOVE_GROUP_ADMIN="GROUP_REMOVE_ADMIN",e.DISSOLVE_GROUP="GROUP_DESTOTYGROUP",e.QUIT_GROUP="GROUP_LEAVEGROUP",e.INVITE_TO_GROUP="GROUP_INVITE_TO_GROUP",e.JOIN_GROUP="GROUP_JOIN_PUBLICGROUP",e.AGREE_JOIN_GROUP="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e.REJECT_JOIN_GROUP="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e.AGREE_INVITE_GROUP="GROUP_ACCEPT_INVITATION",e.REJECT_INVITE_GROUP="GROUP_DECLINE_INVITATION",e.REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBER",e.MULTI_REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBERS",e.MUTE_GROUP_MEMBER="GROUP_MUTE_MEMBERS",e.UNMUTE_GROUP_MEMBER="GROUP_UNMUTE_MEMBERS",e.GET_GROUP_MUTE_LIST="GROUP_FETCH_MUTES",e.BLOCK_GROUP_MEMBER="GROUP_BLOCK_MEMBER",e.BLOCK_GROUP_MEMBERS="GROUP_BLOCK_MEMBERS",e.UNBLOCK_GROUP_MEMBER="GROUP_UNBLOCK_MEMBER",e.UNBLOCK_GROUP_MEMBERS="GROUP_UNBLOCK_MEMBERS",e.GET_GROUP_BLACK_LIST="GROUP_GET_BLOCK_LIST",e.DISABLED_SEND_GROUP_MSG="GROUP_MUTE_ALLMEMBERS",e.ENABLE_SEND_GROUP_MSG="GROUP_UNMUTE_ALLMEMBERS",e.ADD_USERS_TO_GROUP_WHITE="GROUP_ADD_WHITELIST",e.REMOVE_GROUP_WHITE_MEMBER="GROUP_REMOVE_WHITELIST",e.GET_GROUP_WHITE_LIST="GROUP_FETCH_WHITELIST",e.IS_IN_GROUP_WHITE_LIST="GROUP_IS_IN_WHITELIST",e.GET_GROUP_MSG_READ_USER="GROUP_GET_READ_USERS",e.GET_GROUP_ANN="GROUP_FETCH_ANNOUNCEMENT",e.UPDATE_GROUP_ANN="GROUP_UPDATE_ANNOUNCEMENT",e.UPLOAD_GROUP_FILE="GROUP_UPLOAD_SHAREDFILE",e.DELETE_GROUP_FILE="GROUP_DELETE_SHAREDFILE",e.GET_GROUP_FILE_LIST="GROUP_FETCH_SHAREDFILE",e.DOWN_GROUP_FILE="GROUP_DOWNLOAD_SHAREDFILE",e.SET_GROUP_MEMBER_ATTRS="GROUP_MEMBER_SET_META_DATA",e.GET_GROUP_MEMBER_ATTR="GROUP_MEMBER_FETCH_META_DATA",e.GET_SESSION_LIST="REST_GET_SESSION_LIST",e.DELETE_SESSION="REST_DEL_SESSION",e.GET_HISTORY_MSG="REST_GET_HISTORY_MESSAGE",e.PIN_CONVERSATION="REST_PIN_CONVERSATION",e.REST_UPLOAD_FILE_IN_PARTS="REST_UPLOAD_FILE_IN_PARTS",e.REST_DELETE_MESSAGES_CONVERSATIONS="REST_DELETE_MESSAGES_CONVERSATIONS",e.MARK_CONVERSATION="REST_MARK_CONVERSATION",e.REST_FETCH_PINMESSAGES="REST_FETCH_PINMESSAGES",e.REST_PIN_MESSAGE="REST_PIN_MESSAGE",e.UPDATE_USER_INFO="USER_UPDATE_USERINFO",e.GET_USER_INFO="USER_FETCH_USERINFO",e.UPDATE_USER_NICK="USER_UPDATE_NICK",e.UPLOAD_PUSH_TOKEN="USER_UPLOAD_PUSH_TOKEN",e.USER_LOGGEDIN_OTHER_PLATFORM="USER_LOGGEDIN_OTHER_PLATFORM",e.GET_BLACK_LIST="ROSTER_BLACKLIST",e.GET_CONTACTS="ROSTER_CONTACTS",e.ROSTER_GET_ALL_CONTACTS_REMARKS="ROSTER_GET_ALL_CONTACTS_REMARKS",e.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE="ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE",e.ROSTER_SET_CONTACT_REMARK="ROSTER_SET_CONTACT_REMARK",e.ROSTER_ADD="ROSTER_ADD",e.ROSTER_REMOVE="ROSTER_REMOVE",e.ROSTER_ACCEPT="ROSTER_ACCEPT",e.ROSTER_DECLINE="ROSTER_DECLINE",e.ROSTER_BAN="ROSTER_BAN",e.ROSTER_ALLOW="ROSTER_ALLOW",e.SEND_MSG="MSYNC_SENDMESSAGE",e.UPLOAD_MSG_ATTACH="UPLOAD_MSG_ATTACH",e.SEND_RECALL_MSG="MSYNC_RECALLMESSAGE",e.MODIFY_MESSAGE="MSYNC_MODIFYMESSAGE"}(o||(o={})),function(e){e.GET_DNS="REST_DNSLIST",e.LOGIN_BY_AGORA_TOKEN="LOGIN_BY_AGORA_TOKEN",e.LOGIN_BY_PWD="LOGIN_BY_PWD",e.RESISTER="REGISTER",e.REST_INIT_UPLOAD_TASK_IN_PARTS="REST_INIT_UPLOAD_TASK_IN_PARTS",e.REST_UPLOAD_PART="REST_UPLOAD_PART",e.REST_COMPLETE_UPLOAD_PART="REST_COMPLETE_UPLOAD_PART",e.REST_ABORT_UPLOAD_PART="REST_ABORT_UPLOAD_PART"}(i||(i={})),function(e){e[e["5G"]=7]="5G",e[e["4G"]=7]="4G",e[e["3G"]=7]="3G",e[e["2G"]=7]="2G",e[e["SLOW-2G"]=7]="SLOW-2G",e[e.WIFI=2]="WIFI",e[e.LAN=1]="LAN",e[e.DISCONNECTED=0]="DISCONNECTED",e[e.NONE=0]="NONE",e[e.UNKNOWN=-1]="UNKNOWN",e[e["WEBIM UNABLE TO GET"]=-2]="WEBIM UNABLE TO GET"}(s||(s={})),function(e){e[e.success=200]="success",e[e.failed=500]="failed",e[e.disconnect=-1]="disconnect",e[e.notFound=404]="notFound",e[e.reachLimit=429]="reachLimit"}(a||(a={})),function(e){e[e.web=0]="web",e[e.native=1]="native"}(u||(u={}))},6424:function(e,t,n){"use strict";n.d(t,{gA:function(){return x},ZP:function(){return Se}}),n(9601),n(1539),n(8674),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948),n(7042),n(2222),n(3710),n(7941),n(9714),n(3843),n(8309),n(2772),n(5212),n(7327),n(5827),n(9826),n(4553),n(561),n(9653),n(1038),n(2564),n(9575),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(6699),n(2023),n(3161),n(4048),n(9753),n(9554),n(4747),n(285),n(1637),n(8145),n(1249),n(4812);var r=n(4188),o=n.n(r),i=n(3720),s=n.n(i),a=n(5531),u=n(8161),c=n(7360),l=["public","members_only","allow_user_invites","invite_need_confirm"],d={name:"name",title:"name",description:"description",public:"public",members_only:"approval",allow_user_invites:"allowInvites",max_users:"maxUsers",invite_need_confirm:"inviteNeedConfirm",custom:"ext",last_modified:"lastModified"};function p(e,t){var n,r,o,i,s,a,u=this,c=this.context,p=c.userId,f=c.jid,h=t.from.name===p&&f.clientResource!==t.from.clientResource;return t.isThread?(o={id:t.mucId.name,name:t.mucName,operation:"",parentId:t.mucParentId.name,operator:t.from.name,userName:t.to.length?t.to[0].name:""},i={chatThreadId:t.mucId.name,chatThreadName:t.mucName,operation:"",parentId:t.mucParentId.name}):(r={type:"",owner:t.from.name,gid:t.mucId.name,from:t.from.name,fromJid:t.from,to:t.to.length?t.to[0].name:"",toJid:t.to,chatroom:t.isChatroom,status:t.status},s={operation:"",id:t.mucId.name,from:t.from.name},t.isChatroom&&(null===(n=null==t?void 0:t.eventInfo)||void 0===n?void 0:n.ext)&&(a=JSON.parse(t.eventInfo.ext))),({45:function(){var e,n,r;s.operation="memberAttributesUpdate";var o=JSON.parse(null===(e=null==t?void 0:t.eventInfo)||void 0===e?void 0:e.ext)||{};s.attributes=o.properties||{},s.userId=o.username||"",h?null===(n=u.eventHandler)||void 0===n||n.dispatch("onMultiDeviceEvent",s):null===(r=u.eventHandler)||void 0===r||r.dispatch("onGroupEvent",s)},44:function(){var e;s.operation="removeChatRoomAttributes",s.attributes=a.result.successKeys,a.result.successKeys.length>0&&(null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",s))},43:function(){var e;s.operation="updateChatRoomAttributes";var t={};a.result.successKeys.forEach((function(e){t[e]=a.properties[e]})),s.attributes=t,a.result.successKeys.length>0&&(null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",s))},42:function(){},41:function(){},40:function(){},39:function(){},38:function(){var e;i.operation="chatThreadNameUpdate",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},37:function(){var e;o.operation="userRemove",null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatThreadChange",o)},36:function(){var e;i.operation="chatThreadLeave",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},35:function(){var e;i.operation="chatThreadJoin",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},34:function(){var e;i.operation="chatThreadDestroy",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},33:function(){var e;i.operation="chatThreadCreate",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},32:function(){var e,n,o,i;r.type=t.isChatroom?"rmChatRoomMute":"rmGroupMute",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="unmuteAllMembers",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},31:function(){var e,n,o,i;r.type=t.isChatroom?"muteChatRoom":"muteGroup",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="muteAllMembers",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},30:function(){var e,n,o,i;r.type=t.isChatroom?"rmUserFromChatRoomWhiteList":"rmUserFromGroupWhiteList",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="removeAllowlistMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},29:function(){var e,n,o,i;r.type=t.isChatroom?"addUserToChatRoomWhiteList":"addUserToGroupWhiteList",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="addUserToAllowlist",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},28:function(){var e,n,o,i;r.type="deleteFile",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="deleteFile",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},27:function(){var e,n,o,i;r.type="uploadFile",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="uploadFile",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},26:function(){var e,n,o,i;r.type="deleteAnnouncement",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="deleteAnnouncement",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},25:function(){var e,n,o,i;r.type="updateAnnouncement",r.announcement=t.reason,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="updateAnnouncement",s.announcement=t.reason,t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},24:function(){var e,n,o,i;r.type="removeMute",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="unmuteMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},23:function(){var e,n,o,i;r.type="addMute",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="muteMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},22:function(){var e,n,o,i;r.type="removeAdmin",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="removeAdmin",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},21:function(){var e,n,o,i;r.type="addAdmin",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="setAdmin",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},20:function(){var e,n,o,i;r.type="changeOwner",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="changeOwner",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},19:function(){var e,n,o,i;r.type="direct_joined",r.groupName=t.mucName,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="directJoined",s.name=t.mucName,t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},18:function(){var e,n,o,i;r.type=t.isChatroom?"leaveChatRoom":"leaveGroup",u.onPresence&&u.onPresence(r);var a=t.mucMemberCount;a&&(s.memberCount=a),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="memberAbsence",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},17:function(){var e,n,o,i;t.isChatroom&&t.ext&&(s.ext=t.ext,r.ext=t.ext),r.type=t.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",u.onPresence&&u.onPresence(r);var a=t.mucMemberCount;t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="memberPresence",a&&(s.memberCount=a),t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},16:function(){var e,n;r.type="unblock",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},15:function(){var e,n;r.type="block",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},14:function(){var e,n,o,i,a,c=t.isChatroom;if(!c){var p=JSON.parse((null===(e=null==t?void 0:t.eventInfo)||void 0===e?void 0:e.ext)||"{}",(function(e,t){return"last_modified"===e?Number(t):l.includes(e)?"true"===t||!0===t:t}));s.detail=r.detail={},Object.keys(p).forEach((function(e){var t=d[e];if(t){var n=p[e];s.detail&&(s.detail[t]=n),r.detail&&(r.detail[t]=n)}}))}r.type="update",u.onPresence&&u.onPresence(r),c?null===(n=u.eventHandler)||void 0===n||n.dispatch("onChatroomChange",r):null===(o=u.eventHandler)||void 0===o||o.dispatch("onGroupChange",r),s.operation="updateInfo",c?null===(i=u.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",s):null===(a=u.eventHandler)||void 0===a||a.dispatch("onGroupEvent",s)},13:function(){var e,n,o,i;r.type="allow",r.reason=t.reason,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),t.reason&&(s.reason=t.reason),s.operation="unblockMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},12:function(){var e,n;r.type="ban",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},11:function(){var e,n;r.type="getBlackList",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},10:function(){var e,n,o,i;r.type="removedFromGroup",r.kicked=r.to,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="removeMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},9:function(){var e,n,o,i;r.type="invite_decline",r.kicked=r.to,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="rejectInvite",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},8:function(){var e,n,o,i;r.type="invite_accept",r.kicked=r.to,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="acceptInvite",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},7:function(){var e,n,o,i;r.type="invite",r.kicked=r.to,r.groupName=t.mucName,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="inviteToJoin",s.name=t.mucName,t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},6:function(){var e,n,o,i;r.type="joinPublicGroupDeclined",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="joinPublicGroupDeclined",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):(s.userId=t.to.length?t.to[0].name:"",null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s))},5:function(){var e,n,o,i;r.type="joinPublicGroupSuccess",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="acceptRequest",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},4:function(){var e,n,o,i;r.type="joinGroupNotifications",r.reason=t.reason,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),t.reason&&(s.reason=t.reason),s.operation="requestToJoin",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},3:function(){var e,n;r.type="leave",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},2:function(){var e,n;r.type="join",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},1:function(){var e,n,o,i;r.type="deleteGroupChat",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="destroy",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},0:function(){var e,n;s.operation="create",t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",s):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupEvent",s)}}[e]||function(){console.error("No match operation ".concat(e))})()}var f=function(e){var t=this.root.lookup("easemob.pb.MUCBody").decode(e.payload),n=t.operation;c.kg.debug("onMucMessage",t),p.call(this,n,t)},h={handleRosterMsg:function(e){var t,n,r,o,i,s,a=this.root.lookup("easemob.pb.RosterBody").decode(e.payload),u={type:"",to:a.to[0].name,from:a.from.name,status:a.reason};switch(a.operation){case 2:u.type="subscribe",this.onContactInvited&&this.onContactInvited(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onContactInvited",u);break;case 3:u.type="unsubscribed",this.onContactDeleted&&this.onContactDeleted(u),null===(n=this.eventHandler)||void 0===n||n.dispatch("onContactDeleted",u);break;case 4:u.type="subscribed",this.onContactAdded&&this.onContactAdded(u),null===(r=this.eventHandler)||void 0===r||r.dispatch("onContactAdded",u);break;case 5:u.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(u),null===(o=this.eventHandler)||void 0===o||o.dispatch("onContactRefuse",u);break;case 6:case 7:break;case 8:u.type="subscribed",this.onContactAgreed&&this.onContactAgreed(u),null===(i=this.eventHandler)||void 0===i||i.dispatch("onContactAgreed",u);break;case 9:u.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(u),null===(s=this.eventHandler)||void 0===s||s.dispatch("onContactRefuse",u);break;default:c.kg.error("handleRosterMsg:",a)}this.onPresence&&u.type&&this.onPresence(u)}},_=n(7252),E=function(e){var t,n,r,o,i,s,u=this.root.lookup("easemob.pb.StatisticsBody").decode(e.payload),l=u.operation,d=u.reason;switch(l){case 0:this.onStatisticMessage&&this.onStatisticMessage(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onStatisticMessage",u);break;case 1:s=_.Z.create({type:a.E.WEBIM_CONNCTION_USER_REMOVED,message:"user has been removed"}),this.disconnectedReason=s,this.logOut=!0,this.onError&&this.onError(s),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",s);break;case 2:s=_.Z.create({type:a.E.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,message:"the user is already logged on another device"}),d&&(s.data={loginInfoCustomExt:u.reason}),this.disconnectedReason=s,this.logOut=!0,this.onError&&this.onError(s),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",s);break;case 3:s=_.Z.create({type:a.E.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,message:"the user was kicked by changing password"}),this.disconnectedReason=s,this.logOut=!0,this.onError&&this.onError(s),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",s);break;case 4:s=_.Z.create({type:a.E.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,message:"the user was kicked by other device"}),this.disconnectedReason=s,this.logOut=!0,this.onError&&this.onError(s),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",s);break;default:c.kg.error("handleStatisticsMsg:",u)}},v=(n(9720),n(4024)),g=n(4363),m=n(9937);function y(e){var t,n=[],r=[],o=e.data;o&&o.values&&o.values.forEach((function(e){Object.entries(e.status).forEach((function(e){r.push({device:e[0],status:Number(e[1])})})),n.push({userId:e.uid,lastTime:Number(e.last_time),expire:Number(e.expiry),ext:e.ext,statusDetails:r})})),this.onPresenceStatusChange&&this.onPresenceStatusChange(n),null===(t=this.eventHandler)||void 0===t||t.dispatch("onPresenceStatusChange",n)}function O(e){var t=this;e.data.forEach((function(e){var n,r={from:e.from,to:e.to,chatType:"chat"===e.channel_type?"singleChat":"groupChat",messageId:e.messageId,reactions:e.reactions,ts:e.ts};null===(n=t.eventHandler)||void 0===n||n.dispatch("onReactionChange",r)}))}function T(e){var t,n,r,o;if(e.data){var i=e.data,s={id:i.id||"",name:i.name||"",parentId:i.muc_parent_id||"",messageId:i.msg_parent_id||"",timestamp:i.timestamp||0,operator:i.from||"",operation:""};switch(i.operation){case"create":s.operation="create",s.createTimestamp=s.timestamp,s.messageCount=0,null===(t=this.eventHandler)||void 0===t||t.dispatch("onChatThreadChange",s);break;case"update_msg":s.operation="update",s.messageCount=i.message_count,i.last_message&&"{}"!==JSON.stringify(i.last_message)?s.lastMessage=g.w.call(this,i.last_message):"{}"===JSON.stringify(i.last_message)&&(s.lastMessage={}),null===(n=this.eventHandler)||void 0===n||n.dispatch("onChatThreadChange",s);break;case"update":s.operation="update",s.messageCount=i.message_count,null===(r=this.eventHandler)||void 0===r||r.dispatch("onChatThreadChange",s);break;case"delete":s.operation="destroy",null===(o=this.eventHandler)||void 0===o||o.dispatch("onChatThreadChange",s)}}}function R(e){var t,n=e.data;if(n.resource!==this.clientResource){var r={operation:"deleteRoaming",conversationId:n.to,chatType:"chat"===n.chatType?"singleChat":"groupChat",resource:n.resource};null===(t=this.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",r)}}function I(e){var t,n,r=e.data,o="";if(this.clientResource!==r.res){switch(r.op){case"del":o="deleteConversation";break;case"top":o="pinnedConversation";break;case"not_top":o="unpinnedConversation";break;case"mark":o="markConversation";break;case"mark_delete":o="unMarkConversation";break;case"pin":o="pin";break;case"pin_delete":o="unpin";break;default:return void c.kg.error("unexpected conversation op:",r.op)}if("pin"!==o&&"unpin"!==o){var i={operation:o,conversationId:r.id,conversationType:"chat"===r.type?"singleChat":"groupChat",timestamp:r.ts};"markConversation"!==i.operation&&"unMarkConversation"!==i.operation||r.ext&&(i.conversationMark=m.Z[r.ext]),null===(n=this.eventHandler)||void 0===n||n.dispatch("onMultiDeviceEvent",i)}else{var s=r.ext,a=r.from,u=r.id,l=r.type,d=r.ts,p={messageId:s||"",conversationId:a===this.user?u:a,conversationType:g.U[l],operation:o,operatorId:a,time:d};null===(t=this.eventHandler)||void 0===t||t.dispatch("onMessagePinEvent",p)}}}function S(e){var t,n=this;null===(t=e.values)||void 0===t||t.forEach((function(e){var t,r,o,i,s;if(e.operator_resource!==n.clientResource)if("ignoreInterval"in e.data){var a={operation:"setSilentModeForUser",resource:e.operator_resource,data:e.data};null===(t=n.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",a)}else"group"in e?(a={operation:0===Object.keys(null!==(r=e.data)&&void 0!==r?r:{}).length?"removeSilentModeForConversation":"setSilentModeForConversation",resource:e.operator_resource,conversationId:e.group,type:"groupChat",data:e.data},null===(o=n.eventHandler)||void 0===o||o.dispatch("onMultiDeviceEvent",a)):(a={operation:0===Object.keys(null!==(i=e.data)&&void 0!==i?i:{}).length?"removeSilentModeForConversation":"setSilentModeForConversation",resource:e.operator_resource,conversationId:e.user,type:"singleChat",data:e.data},null===(s=n.eventHandler)||void 0===s||s.dispatch("onMultiDeviceEvent",a))}))}var C=function(e){var t=v.P6.parseNotify(e.payload);switch(t.type){case"presence":y.call(this,t);break;case"reaction":O.call(this,t);break;case"thread":T.call(this,t);break;case"roaming_delete":R.call(this,t);break;case"conv":I.call(this,t);break;case"user_notification_mute":S.call(this,t);break;default:c.kg.error("unexpected notify type: ".concat(t.type))}},N=n(7288),b=n(9743),A=2,M=n(4998),w=n(6801),L=n(2071),U=n(1595);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}var x,k,D,H=function(){return H=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},H.apply(this,arguments)},B=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},G=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},F=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};!function(e){e[e.NORMAL=0]="NORMAL",e[e.SINGLECHAT=1]="SINGLECHAT",e[e.GROUPCHAT=2]="GROUPCHAT",e[e.CHATROOM=3]="CHATROOM",e[e.READ_ACK=4]="READ_ACK",e[e.DELIVER_ACK=5]="DELIVER_ACK",e[e.RECALL=6]="RECALL",e[e.CHANNEL_ACK=7]="CHANNEL_ACK",e[e.EDIT=8]="EDIT"}(x||(x={})),function(e){e[e.APNs=0]="APNs",e[e.FCM=1]="FCM",e[e.HMSPUSH=2]="HMSPUSH",e[e.MIPUSH=3]="MIPUSH",e[e.MEIZUPUSH=4]="MEIZUPUSH",e[e.VIVOPUSH=5]="VIVOPUSH",e[e.OPPOPUSH=6]="OPPOPUSH",e[e.HONORPUSH=7]="HONORPUSH"}(k||(k={})),function(e){e[e.OK=0]="OK",e[e.FAIL=1]="FAIL",e[e.UNAUTHORIZED=2]="UNAUTHORIZED",e[e.MISSING_PARAMETER=3]="MISSING_PARAMETER",e[e.WRONG_PARAMETER=4]="WRONG_PARAMETER",e[e.REDIRECT=5]="REDIRECT",e[e.TOKEN_EXPIRED=6]="TOKEN_EXPIRED",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.NO_ROUTE=8]="NO_ROUTE",e[e.UNKNOWN_COMMAND=9]="UNKNOWN_COMMAND",e[e.PB_PARSER_ERROR=10]="PB_PARSER_ERROR",e[e.BIND_ANOTHER_DEVICE=11]="BIND_ANOTHER_DEVICE",e[e.IM_FORBIDDEN=12]="IM_FORBIDDEN",e[e.TOO_MANY_DEVICES=13]="TOO_MANY_DEVICES",e[e.PLATFORM_LIMIT=14]="PLATFORM_LIMIT",e[e.USER_MUTED=15]="USER_MUTED",e[e.ENCRYPT_DISABLE=16]="ENCRYPT_DISABLE",e[e.ENCRYPT_ENABLE=17]="ENCRYPT_ENABLE",e[e.DECRYPT_FAILURE=18]="DECRYPT_FAILURE",e[e.PERMISSION_DENIED_EXTERNAL=19]="PERMISSION_DENIED_EXTERNAL"}(D||(D={}));var j=["txt","img","video","audio","file","loc","custom","cmd","combine"],W=v.P6.getEnvInfo();function q(){var e="webim",t="",n="",r=[],o=(new Date).valueOf(),i=v.P6.getDevicePlatform(W);if(this.isFixedDeviceId){var s=v.P6.getLocalDeviceInfo();if(s){var a=JSON.parse(s);e=a.deviceId,t=a.deviceName,n=a.deviceUuid}else"webim"===this.deviceId?(n="".concat(i,"_").concat(o.toString()),e="".concat(this.deviceId,"_").concat(n),t=this.deviceId):e=t=n="webim_".concat(i,"_").concat(this.deviceId),v.P6.setLocalDeviceInfo(JSON.stringify({deviceId:e,deviceName:t,deviceUuid:n}))}else"webim"===this.deviceId?(n="random_".concat(i,"_").concat(o.toString()),e="".concat(this.deviceId,"_").concat(n),t=this.deviceId):e=t=n="webim_".concat(i,"_").concat(this.deviceId);this.context.jid&&(this.context.jid.clientResource=e);var u=this.root.lookup("easemob.pb.Provision"),l=u.decode(r);l.compressType=this.compressType,l.encryptType=this.encryptType,l.osType=this.osType,l.version=this.version,l.deviceName=t,l.resource=e,l.deviceUuid=n,l.authToken='{"token":"$t$'+this.token+'"}',l.sessionId=Date.now().toString()+":",this.loginInfoCustomExt&&(l.reason=this.loginInfoCustomExt),c.kg.debug("provision info",{version:this.version,resource:e,isFixedDeviceId:this.isFixedDeviceId,loginInfoCustomExt:!!this.loginInfoCustomExt,token:!!this.token}),l.actionVersion="v5.0",l=u.encode(l).finish();var d=this.root.lookup("easemob.pb.MSync"),p=d.decode(r);return p.version=this.version,p.guid=this.context.jid,p.auth="$t$"+this.token,p.command=3,p.deviceId=t,p.serviceId=this.dataReport.getServiceId(),p.encryptType=this.encryptType,p.payload=l,d.encode(p).finish()}function K(e,t){var n=this,r=v.P6.getEnvInfo();if("web"===r.platform||"zfb"===r.platform||"dd"===r.platform){for(var i="",s=0;s<e.length;s++)i+=String.fromCharCode(e[s]);return i=o().btoa(i),"web"===r.platform?i:{data:i,isBuffer:!1,complete:function(){},fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||(c.kg.debug("send message fail and reconnect"),n.reconnecting||n.reconnect()),t&&n._msgHash&&n._msgHash[t]&&n._msgHash[t].fail({id:t})}}}var a=e;return{data:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||n.reconnecting||n.reconnect(),t&&n._msgHash&&n._msgHash[t]&&n._msgHash[t].fail({id:t})}}}function V(e,t){var n;return B(this,void 0,void 0,(function(){var r,o,i,a,l,d;return G(this,(function(p){switch(p.label){case 0:for(c.kg.debug("distributeMeta, metas length: ",e.length),r=[],o=function(n){var o=e[n],a=new(s())(o.id.low,o.id.high,o.id.unsigned).toString(),l=o.from.name,d=o.to?o.to.name:"",p=!!o.to&&-1!==o.to.domain.indexOf("conference");if(i._load_msg_cache.some((function(e){return e.msgId===a})))return"continue";switch(i._load_msg_cache.length<=i.max_cache_length||i._load_msg_cache.shift(),i._load_msg_cache.push({msgId:a,from:l,to:d,isGroup:p}),o.ns){case 0:E.call(i,o);break;case 1:r.push(u.Z.call(i,o,t,!1,!0,!0));break;case 2:f.call(i,o);break;case 3:h.handleRosterMsg.call(i,o);break;case 4:i.registerConfrIQHandler&&i.registerConfrIQHandler(o,t,i);break;case 5:C.call(i,o);break;default:c.kg.error("distributeMeta",o)}},i=this,a=0;a<e.length;a++)o(a);return[4,Promise.all(r)];case 1:return l=p.sent(),(d=l.filter((function(e){return e&&"cmd"!==e.type}))).length>0&&(null===(n=this.eventHandler)||void 0===n||n.dispatch("onMessage",d)),[2]}}))}))}function J(e,t){V.call(this,e,t)}function z(e){var t;this._offlineMessagePullState===M.a.SYNC_INIT&&(this._offlineMessagePullState=M.a.SYNC_START,this._offlineMessagePullQueue=e.unread.reduce((function(e,t){return e.find((function(e){return e.name===t.queue.name}))||e.push(t.queue),e}),[]),null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncStart"))}function Y(e){var t;if(this._offlineMessagePullState===M.a.SYNC_START){var n=this._offlineMessagePullQueue.findIndex((function(t){return t.name===e.queue.name}));n>-1&&this._offlineMessagePullQueue.splice(n,1),0===this._offlineMessagePullQueue.length&&(this._offlineMessagePullState=M.a.SYNC_FINISH,null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncFinish"))}}function X(e){var t=this.root.lookup("easemob.pb.CommUnreadDL");t=t.decode(e.payload);var n=new(s())(t.timestamp.low,t.timestamp.high,t.timestamp.unsigned).toString();if(this.expirationTime&&this.compareTokenExpireTime(Number(n),this.expirationTime),0===t.unread.length)se.call(this);else{z.call(this,t),c.kg.debug("pull unread message",t.unread);for(var r=0;r<t.unread.length;r++){var o=de(this._queues,t.unread[r].queue),i=de(this.unSyncQueue,t.unread[r].queue);o||i?c.kg.warn("receive unread message and already in queue"):this.unSyncQueue.push(t.unread[r].queue)}for(r=0;r<this.unSyncQueue.length;r++)this.unSyncQueue[r].hasSync||$.call(this,this.unSyncQueue[r]),this.unSyncQueue[r].hasSync=!0}se.call(this)}function Z(){var e=[],t=this.root.lookup("easemob.pb.StatisticsBody"),n=t.decode(e);n.operation=0,n=t.encode(n).finish();var r=this.root.lookup("easemob.pb.Meta").decode(e);r.id=(new Date).valueOf(),r.ns=0,r.payload=n;var o=this.root.lookup("easemob.pb.CommSyncUL"),i=o.decode(e);i.meta=r,i=o.encode(i).finish();var s=this.root.lookup("easemob.pb.MSync"),a=s.decode(e);return a.version=this.version,a.encryptType=[0],a.command=0,a.payload=i,s.encode(a).finish()}function Q(e){var t=[],n=this.root.lookup("easemob.pb.CommSyncUL"),r=n.decode(t);r.queue=e,r=n.encode(r).finish();var o=this.root.lookup("easemob.pb.MSync"),i=o.decode(t);return i.version=this.version,i.encryptType=this.encryptType,i.command=0,i.payload=r,o.encode(i).finish()}function $(e){c.kg.debug("sendBackqueue");var t=Q.call(this,e);Ie.call(this,t)}function ee(e,t){var n=[],r=this.root.lookup("easemob.pb.CommSyncUL"),o=r.decode(n);o.queue=t,o.key=new(s())(e.low,e.high,e.unsigned).toString(),o=r.encode(o).finish();var i=this.root.lookup("easemob.pb.MSync"),a=i.decode(n);return a.version=this.version,a.encryptType=this.encryptType,a.command=0,a.payload=o,i.encode(a).finish()}function te(){var e=this;this.uniPush&&!1===this.isRegisterPush&&(this.isRegisterPush=!0,this.uniPush.onRegister((function(t){c.kg.debug("push token onRegister",t);var n=e.uniPushConfig||{},r=n.APNsCertificateName,o=void 0===r?"":r,i=n.HMSCertificateName,s=void 0===i?"":i,a=n.HONORCertificateName,u=void 0===a?"":a,l=n.MEIZUCertificateName,d=void 0===l?"":l,p=n.MICertificateName,f=void 0===p?"":p,h=n.OPPOCertificateName,_=void 0===h?"":h,E=n.VIVOCertificateName,v=void 0===E?"":E;switch(t.push_type){case k.APNs:e.pushCertificateName=o;break;case k.HMSPUSH:e.pushCertificateName=s;break;case k.HONORPUSH:e.pushCertificateName=u;break;case k.MEIZUPUSH:e.pushCertificateName=d;break;case k.MIPUSH:e.pushCertificateName=f;break;case k.OPPOPUSH:e.pushCertificateName=_;break;case k.VIVOPUSH:e.pushCertificateName=v;break;default:c.kg.error("unexpected push type",t.push_type)}e.pushCertificateName&&t.push_token&&w.r.call(e,{deviceId:e.clientResource,deviceToken:t.push_token,notifierName:e.pushCertificateName}).then((function(){c.kg.debug("uploadPushToken success")})).catch((function(e){c.kg.debug("uploadPushToken failed",e)}))})))}function ne(){var e;this._offlineMessagePullState=M.a.SYNC_INIT,this._offlineMessagePullQueue=[],this.times=1,this.autoReconnectNumTotal=0,this.onOpened&&this.onOpened(),te.call(this),null===(e=this.eventHandler)||void 0===e||e.dispatch("onConnected"),ie.call(this),ue.call(this),ae.call(this),se.call(this)}function re(e,t){c.kg.debug("sendLastSession",e);var n=ee.call(this,e,t);Ie.call(this,n)}function oe(e){var t,n,r,o,i,s,u,l=this,d=this.root.lookup("easemob.pb.Provision").decode(e.payload);if(this.context.jid&&(this.context.jid.clientResource=d.resource),this.clientResource=d.resource,d.status.errorCode===D.OK){if(this.disconnectedReason=void 0,d.authToken){var p=JSON.parse(d.authToken).expires_in;if(!this.tokenExpiredTimer&&!this.tokenWillExpireTimer){var f=Date.now();this.expirationTime=p;var h=this.expirationTime-f;this.expiresIn=h<0?0:h,this.tokenExpireTimeCountDown(this.expiresIn)}}this.reconnecting=!1,this.logOut=!1,"zfb"!==W.platform&&"dd"!==W.platform||(this.sock.readyState=1),this._localCache?(null===(t=this._localCache)||void 0===t?void 0:t.getInstance())?ne.call(this):this._localCache&&new this._localCache({user:this.user,dbName:"cache_".concat(Math.abs((0,b.un)(this.appKey)),"_").concat(this.user),version:A,onInit:function(){return B(l,void 0,void 0,(function(){return G(this,(function(e){return c.kg.debug("localCache init success"),ne.call(this),[2]}))}))}}):ne.call(this)}else{var E=void 0,v=d.status,g=v.reason,m=v.errorCode;switch(c.kg.debug("provision errorCode: ",m),c.kg.debug("provision reason: ",g),m){case D.FAIL:E="Sorry, user register limit"===g?_.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the number of user registrations limit has been reached"}):"Sorry, user register rate limit"===g?_.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, user register rate limit"}):"Sorry, token expired"===g?_.Z.create({type:a.E.WEBIM_TOKEN_EXPIRED,message:"Sorry, token expired"}):"Sorry, token or password does not match login info"===g?_.Z.create({type:a.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"INVALID_TOKEN"}):"Sorry, user not found"===g?_.Z.create({type:a.E.USER_NOT_FOUND,message:"User not found"}):_.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",E);break;case D.WRONG_PARAMETER:E=_.Z.create({type:a.E.REQUEST_PARAMETER_ERROR,message:"Invalid parameter"}),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",E);break;case D.UNAUTHORIZED:E=_.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",E);break;case D.IM_FORBIDDEN:E=_.Z.create({type:a.E.WEBIM_SERVER_SERVING_DISABLED,message:"Server serving disabled."}),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",E);break;case D.PERMISSION_DENIED:E="Sorry, the app month live count limit"===g?_.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the monthly active user limit for this app has been reached"}):"Sorry, the app day live count limit"===g?_.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the daily active user limit for this app has been reached"}):"Sorry, the app online count limit"===g?_.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the maximum number limit of online users for this app has been reached"}):_.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(s=this.eventHandler)||void 0===s||s.dispatch("onError",E);break;default:E=_.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:g}),null===(u=this.eventHandler)||void 0===u||u.dispatch("onError",E)}this.disconnectedReason=E}}function ie(){var e,t;if((null===(e=this.unMSyncSendMsgMap)||void 0===e?void 0:e.size)>0){for(var n=Array.from(this.unMSyncSendMsgMap.keys()),r=0;r<n.length;r++){var o=this.unMSyncSendMsgMap.get(n[r]);Ie.call(this,o,n[r])}null===(t=this.unMSyncSendMsgMap)||void 0===t||t.clear()}}function se(){var e=Z.call(this);Ie.call(this,e)}function ae(){c.kg.debug("sendUnreadDeal");var e=le.call(this);Ie.call(this,e)}function ue(){var e=this;ce.call(this),this.heartBeatID=setInterval((function(){(Date.now()-e.lastHeartbeat)/1e3>=30&&(c.kg.debug("send heart beat"),ae.call(e),e.lastHeartbeat=Date.now())}),this.heartBeatWait)}function ce(){clearInterval(this.heartBeatID)}function le(){var e=this.root.lookup("easemob.pb.MSync"),t=e.decode([]);return t.version=this.version,t.encryptType=this.encryptType,t.command=1,e.encode(t).finish()}function de(e,t){return e.some((function(e){return e.name===t.name}))}function pe(e){var t=this.root.lookup("easemob.pb.CommNotice"),n=t.decode(e.payload),r=de(this._queues,n.queue);c.kg.debug("receive notice",t,this._queues);var o=de(this.unSyncQueue,n.queue);r||o||this.clientResource===n.queue.clientResource&&n.queue.name===this.context.userId||(this._queues.push(n.queue),1===this._queues.length&&$.call(this,n.queue))}function fe(e){return B(this,void 0,void 0,(function(){var t,n,r,i,s,a,u,c;return G(this,(function(l){if(t=v.P6.getEnvInfo(),n=this.root.lookup("easemob.pb.MSync"),"miniCore"===this.name){try{i=new Uint8Array(e.data),r=n.decode(i)}catch(e){throw new Error("decode message fail.")}return[2,r]}if("web"===t.platform||"zfb"===t.platform||"dd"===t.platform){for(s=o().atob(e.data),a=[],u=0,c=s.length;u<c;++u)a.push(s.charCodeAt(u));return[2,n.decode(a)]}try{r=n.decode(e.data)}catch(e){throw new Error("decode message fail.")}return[2,r]}))}))}function he(e){var t=this;this.lastHeartbeat=Date.now(),e.then((function(e){if(e)switch(e.command){case 0:_e.call(t,e);break;case 1:X.call(t,e);break;case 2:pe.call(t,e);break;case 3:oe.call(t,e);break;default:c.kg.error("unexpected msync command: ".concat(e.command))}else c.kg.error("unexpected msync result: ".concat(e))}))}function _e(e){var t,n,r,o,i,l,d,p,f,h,E,g,m,y,O,T,R,I,S,C,b,A,M,w,P,x,k,D,F,j,W,q,K,V,z,X,Z,Q,ee,te,ne,oe,ie,se,ae;return B(this,void 0,void 0,(function(){var B,ue,ce,le,de,pe,fe,he,_e,Ee,ve,ge,me,ye,Oe,Te,Re,Ie,Se,Ce,Ne,be,Ae,Me,we,Le,Ue,Pe,xe,ke,De,He,Be,Ge,Fe,je,We,qe,Ke,Ve,Je,ze,Ye,Xe=this;return G(this,(function(G){switch(G.label){case 0:if(B=(B=this.root.lookup("easemob.pb.CommSyncDL")).decode(e.payload),ue=new(s())(B.serverId.low,B.serverId.high,B.serverId.unsigned).toString(),ce=new(s())(B.metaId.low,B.metaId.high,B.metaId.unsigned).toString(),!(Number(ce)>0))return[3,23];if(!B.status)return[3,22];if(0!==B.status.errorCode)return[3,21];if(null==(le=this._msgHash[ce])?void 0:le.isHandleChatroom){try{de="join"===(null===(t=this._msgHash[ce])||void 0===t?void 0:t.operation),(null===(n=this._msgHash[ce])||void 0===n?void 0:n.resolve)instanceof Function&&de&&this._msgHash[ce].resolve({type:0,data:{action:"apply",id:this._msgHash[ce].roomId,result:!0,user:this.context.userId}}),(null===(r=this._msgHash[ce])||void 0===r?void 0:r.success)instanceof Function&&de&&this._msgHash[ce].success({type:0,data:{action:"apply",id:this._msgHash[ce].roomId,result:!0,user:this.context.userId}}),(null===(o=this._msgHash[ce])||void 0===o?void 0:o.resolve)instanceof Function&&!de&&this._msgHash[ce].resolve({type:0,data:{result:!0}}),(null===(i=this._msgHash[ce])||void 0===i?void 0:i.success)instanceof Function&&!de&&this._msgHash[ce].success({type:0,data:{result:!0}}),L.iO.has(ce)&&(pe=L.iO.get(ce),Fe=pe.rpt,je=pe.requestName,Fe({isEndApi:!0,data:{isSuccess:1,requestName:je,requestMethod:"WEBSOCKET",requestUrl:this.url,code:U.dd.success}}),L.iO.delete(ce))}catch(e){L.iO.has(ce)&&(fe=L.iO.get(ce),Fe=fe.rpt,je=fe.requestName,Fe({isEndApi:!0,data:{isSuccess:0,requestName:je,requestMethod:"WEBSOCKET",requestUrl:this.url,code:U.dd.failed,codeDesc:"when executing success function error"}}),L.iO.delete(ce)),qe=_.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:e}),this.onError&&this.onError(qe),null===(l=this.eventHandler)||void 0===l||l.dispatch("onError",qe)}delete this._msgHash[ce]}return!le||le.isHandleChatroom?[3,20]:(he=null,_e="",Ee=0,ve=null,this._msgHash[ce].thirdMessage?(this._msgHash[ce].thirdMessage.id=B.serverId,this._msgHash[ce].thirdMessage.timestamp=B.timestamp,[4,u.Z.call(this,this._msgHash[ce].thirdMessage,B.status,!0,!0)]):[3,2]);case 1:ve=G.sent(),G.label=2;case 2:if(0===B.metas.length)return[3,13];G.label=3;case 3:switch(G.trys.push([3,12,,13]),ge=B.metas[0],me=B.status,ge.ns){case 1:return[3,4];case 5:return[3,9]}return[3,10];case 4:return this.useReplacedMessageContents?[4,u.Z.call(this,ge,me,!0,!0)]:[3,8];case 5:return ve=G.sent(),[4,null===(p=null===(d=this._localCache)||void 0===d?void 0:d.getInstance())||void 0===p?void 0:p.getMessageByServerMsgId(ce)];case 6:return(ye=G.sent())?[4,null===(h=null===(f=this._localCache)||void 0===f?void 0:f.getInstance())||void 0===h?void 0:h.putMessageToDB(H(H(H({},ye),ve),{id:ce}))]:[3,8];case 7:G.sent(),G.label=8;case 8:return[3,11];case 9:return(Oe=v.P6.parseNotify(B.metas[0].payload)).edit_msg&&(Te=Oe.edit_msg,Re=Te.count,Ie=Te.operator,Se=Te.edit_time,Ce=Te.sender,Ne=Te.send_time,he={operationTime:Se,operatorId:Ie,operationCount:Re},_e=Ce,Ee=Number(Ne)),[3,11];case 10:return c.kg.error("decode local meta error",ge),[3,11];case 11:return[3,13];case 12:return be=G.sent(),qe=_.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:"decode local meta message error",data:be}),this.onError&&this.onError(qe),null===(E=this.eventHandler)||void 0===E||E.dispatch("onError",qe),[3,13];case 13:L.TJ.has(ce)&&(L.TJ.get(ce).rpt({isEndApi:!0,data:{isSuccess:1,requestMethod:"WEBSOCKET",requestUrl:this.url,code:U.dd.success,msgId:ue}}),L.TJ.delete(ce)),G.label=14;case 14:return G.trys.push([14,18,,19]),Ae={localMsgId:ce,serverMsgId:ue},he&&(this._msgHash[ce].modifiedInfo=he,Me=this._msgHash[ce],we=Me.editMessageId,He=Me.type,Le=Me.chatType,Ue=Me.msg,Pe=Me.to,xe=Me.translations,ke={id:we,type:He,chatType:Le,msg:Ue,modifiedInfo:he,to:Pe,from:_e,time:Number(Ee)},xe&&(ke.translations=xe),Ae.message=ke,null===(y=null===(m=null===(g=this._localCache)||void 0===g?void 0:g.getInstance())||void 0===m?void 0:m.getMessageByServerMsgId(we))||void 0===y||y.then((function(e){var t,n;e&&"txt"===e.type&&(null===(n=null===(t=Xe._localCache)||void 0===t?void 0:t.getInstance())||void 0===n||n.putMessageToDB(H(H({},e),{msg:ke.msg,modifiedInfo:ke.modifiedInfo,translations:ke.translations})))}))),ve&&(Ae.message=ve),[4,null===(T=null===(O=this._localCache)||void 0===O?void 0:O.getInstance())||void 0===T?void 0:T.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.SUCCESS})];case 15:return G.sent(),(null===(R=this._msgHash[ce])||void 0===R?void 0:R.success)instanceof Function?[4,this._msgHash[ce].success(ce,ue)]:[3,17];case 16:G.sent(),G.label=17;case 17:return(null===(I=this._msgHash[ce])||void 0===I?void 0:I.resolve)instanceof Function&&this._msgHash[ce].resolve(Ae),[3,19];case 18:return De=G.sent(),qe=_.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:De}),this.onError&&this.onError(qe),null===(S=this.eventHandler)||void 0===S||S.dispatch("onError",qe),[3,19];case 19:this.onReceivedMessage&&this.onReceivedMessage({id:ce,mid:ue,to:this._msgHash[ce].to,time:0}),null===(C=this.eventHandler)||void 0===C||C.dispatch("onReceivedMessage",{id:ce,mid:ue,to:this._msgHash[ce].to}),delete this._msgHash[ce],G.label=20;case 20:return[3,22];case 21:if(15===B.status.errorCode)(null===(b=this._msgHash[ce])||void 0===b?void 0:b.fail)instanceof Function&&this._msgHash[ce].fail({type:a.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject({type:a.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),null===(M=null===(A=this._localCache)||void 0===A?void 0:A.getInstance())||void 0===M||M.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.FAIL});else if(1===B.status.errorCode){switch(He=void 0,B.status.reason){case"blocked":He=a.E.PERMISSION_DENIED;break;case"group not found":He=a.E.GROUP_NOT_EXIST;break;case"not in group or chatroom":He=a.E.GROUP_NOT_JOINED;break;case"exceed recall time limit":He=a.E.MESSAGE_RECALL_TIME_LIMIT;break;case"message recall disabled":He=a.E.SERVICE_NOT_ENABLED;break;case"not in group or chatroom white list":He=a.E.SERVICE_NOT_ALLOW_MESSAGING;break;case"nonroster":He=a.E.USER_NOT_FRIEND,B.status.reason="not contact";break;case"group is disabled":He=a.E.GROUP_IS_DISABLED,B.status.reason="group is disabled";break;case"limit directed users":He=a.E.MAX_LIMIT;break;case"Sorry, edit limit reached":He=a.E.MAX_LIMIT,B.status.reason="Modify message limit reached";break;case"Sorry, message does not exist":He=a.E.MODIFY_MESSAGE_NOT_EXIST,B.status.reason="The message does not exist.";break;case"Sorry, You do not have permission":He=a.E.PERMISSION_DENIED,B.status.reason="You do not have the modified permission.";break;case"Sorry, format is incorrect":He=a.E.MODIFY_MESSAGE_FORMAT_ERROR,B.status.reason="The modify messaged format error.";break;case"Sorry, edit is not available":He=a.E.SERVICE_NOT_ENABLED,B.status.reason="The message modify function is not activated.";break;case"Sorry, edit fail":He=a.E.MODIFY_MESSAGE_FAILED,B.status.reason="Modify message failed.";break;default:B.status.reason.includes("grpID")&&B.status.reason.includes("does not exist!")?(He=a.E.CHATROOM_NOT_EXIST,B.status.reason="The chat room dose not exist."):B.status.reason.includes("username")&&B.status.reason.includes("doesn't exist!")?He=a.E.USER_NOT_FOUND:"group member list is full!"===B.status.reason?He=a.E.CHATROOM_MEMBERS_FULL:B.status.reason.includes("can not join this group")&&B.status.reason.includes("is in the blacklist")?(He=a.E.PERMISSION_DENIED,B.status.reason="permission denied"):"can not operate this group, reason: group is disabled"===B.status.reason?He=a.E.GROUP_IS_DISABLED:B.status.reason.includes("moderation")?He=a.E.MESSAGE_MODERATION_BLOCKED:B.status.reason.includes("group ID illegal, please check it")?(He=a.E.REQUEST_PARAMETER_ERROR,B.status.reason="Invalid parameter"):He=B.status.reason.includes("has create too many chatrooms")||B.status.reason.includes("has joined too many chatrooms")?a.E.MAX_LIMIT:B.status.reason.includes("auto create failed")?a.E.SERVER_BUSY:a.E.SERVER_UNKNOWN_ERROR}this._msgHash[ce]&&((null===(w=this._msgHash[ce])||void 0===w?void 0:w.isHandleChatroom)?(We=_.Z.create({type:He,message:B.status.reason||"",data:""}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject(We),this._msgHash[ce].error instanceof Function&&this._msgHash[ce].error(We),L.iO.has(ce)&&(Be=U.dd.failed,He===a.E.CHATROOM_NOT_EXIST?Be=U.dd.notFound:He===a.E.CHATROOM_MEMBERS_FULL&&(Be=U.dd.reachLimit),Ge=L.iO.get(ce),Fe=Ge.rpt,je=Ge.requestName,Fe({isEndApi:!0,data:{isSuccess:0,requestName:je,requestMethod:"WEBSOCKET",requestUrl:this.url,code:Be,codeDesc:B.status.reason}}),L.iO.delete(ce))):(We=_.Z.create({type:He,message:B.status.reason||"",data:{id:ce,mid:ue}}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject(We),this._msgHash[ce].fail instanceof Function&&this._msgHash[ce].fail({type:He,reason:B.status.reason?B.status.reason:"",data:{id:ce,mid:ue}}),null===(x=null===(P=this._localCache)||void 0===P?void 0:P.getInstance())||void 0===x||x.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.FAIL})),delete this._msgHash[ce])}else if(7===B.status.errorCode)"sensitive words"===B.status.reason&&this._msgHash[ce]?(We=_.Z.create({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"sensitive words",data:{id:ce,mid:ue}}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject(We),this._msgHash[ce].fail instanceof Function&&this._msgHash[ce].fail({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:ce,mid:ue,reason:"sensitive words"}}),null===(D=null===(k=this._localCache)||void 0===k?void 0:k.getInstance())||void 0===D||D.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.FAIL})):"blocked by mod_antispam"===B.status.reason&&this._msgHash[ce]?(We=_.Z.create({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"blocked by mod_antispam",data:{id:ce,mid:ue}}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject(We),this._msgHash[ce].fail instanceof Function&&this._msgHash[ce].fail({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:ce,mid:ue,reason:"blocked by mod_antispam"}}),null===(j=null===(F=this._localCache)||void 0===F?void 0:F.getInstance())||void 0===j||j.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.FAIL})):"user is mute"===B.status.reason&&this._msgHash[ce]?(We=_.Z.create({type:a.E.USER_MUTED_BY_ADMIN,message:"user is mute",data:{id:ce,mid:ue}}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject(We),this._msgHash[ce].fail instanceof Function&&this._msgHash[ce].fail(We),null===(q=null===(W=this._localCache)||void 0===W?void 0:W.getInstance())||void 0===q||q.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.FAIL})):"traffic limit"===B.status.reason&&this._msgHash[ce]?(We=_.Z.create({type:a.E.MESSAGE_CURRENT_LIMITING,message:"traffic limit",data:{id:ce,mid:ue}}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject(We),this._msgHash[ce].fail instanceof Function&&this._msgHash[ce].fail(We),null===(V=null===(K=this._localCache)||void 0===K?void 0:K.getInstance())||void 0===V||V.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.FAIL})):"Sorry, data is too large"===B.status.reason&&this._msgHash[ce]&&(We=_.Z.create({type:a.E.MESSAGE_SIZE_LIMIT,message:"Sorry, data is too large",data:{id:ce,mid:ue}}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject(We),this._msgHash[ce].fail instanceof Function&&this._msgHash[ce].fail(We),null===(X=null===(z=this._localCache)||void 0===z?void 0:z.getInstance())||void 0===X||X.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.FAIL}));else if(19===B.status.errorCode)this._msgHash[ce]&&(L.TJ.has(ce)&&(L.TJ.get(ce).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,codeDesc:B.status.reason||"",msgId:ue}}),L.TJ.delete(ce)),We=_.Z.create({type:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,message:B.status.reason||"",data:{id:ce,mid:ue}}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject(We),this._msgHash[ce].fail instanceof Function&&this._msgHash[ce].fail({type:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,data:{id:ce,mid:ue,reason:B.status.reason}}),null===(Q=null===(Z=this._localCache)||void 0===Z?void 0:Z.getInstance())||void 0===Q||Q.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.FAIL}));else if(this._msgHash[ce]){L.TJ.has(ce)&&(L.TJ.get(ce).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.WEBIM_LOAD_MSG_ERROR,codeDesc:(null===(ee=B.status)||void 0===ee?void 0:ee.reason)||"",msgId:ue}}),L.TJ.delete(ce));try{We=_.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:(null===(te=B.status)||void 0===te?void 0:te.reason)||"",data:{id:ce,mid:ue,reason:B.status&&B.status.reason}}),this._msgHash[ce].reject instanceof Function&&this._msgHash[ce].reject(We),null===(oe=null===(ne=this._localCache)||void 0===ne?void 0:ne.getInstance())||void 0===oe||oe.updateLocalMessage(ce,{serverMsgId:ue,status:N.r.FAIL}),this._msgHash[ce].fail instanceof Function&&this._msgHash[ce].fail({type:a.E.WEBIM_LOAD_MSG_ERROR,data:{errorCode:B.status&&B.status.errorCode,reason:B.status&&B.status.reason}})}catch(e){qe=_.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing fail function error",data:e}),this.onError&&this.onError(qe),null===(ie=this.eventHandler)||void 0===ie||ie.dispatch("onError",qe)}delete this._msgHash[ce]}else L.TJ.has(ce)&&(L.TJ.get(ce).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,codeDesc:"on message error",msgId:ue}}),L.TJ.delete(ce)),qe=_.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"on message error"}),this.onError&&this.onError(qe),null===(se=this.eventHandler)||void 0===se||se.dispatch("onError",qe);G.label=22;case 22:return[2];case 23:if(B.metas&&0!==B.metas.length)try{J.call(this,B.metas,B.status)}catch(e){qe=_.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e}),c.kg.error("decode message error",e),this.onError&&this.onError(qe),null===(ae=this.eventHandler)||void 0===ae||ae.dispatch("onError",qe)}finally{B.isLast?(c.kg.debug("metas & CommSyncDLMessage.isLast",B.isLast),Ke=-1,this._queues.some((function(e,t){return e.name===B.name&&(Ke=t,!0)}))&&Ke>0&&this._queues.splice(Ke,1),this._queues.length>0&&$.call(this,this._queues[0]),Ve=-1,this.unSyncQueue.some((function(e,t){return e.name===B.queue.name&&(Ve=t,!0)}))&&this.unSyncQueue.splice(Ve,1),Y.call(this,B)):B.nextKey&&(Ye=new(s())(B.nextKey.low,B.nextKey.high,B.nextKey.unsigned).toString(),c.kg.debug("nexKey:",Ye,"this.nextKey:",this.nexKey),Ye!==this.nexKey&&(this.nexKey=Ye,re.call(this,B.nextKey,B.queue)))}else B.isLast?(c.kg.debug("CommSyncDLMessage.isLast",B.isLast),Je=-1,this._queues.some((function(e,t){return e.name===B.queue.name&&(Je=t,!0)}))&&this._queues.splice(Je,1),this._queues.length>0&&$.call(this,this._queues[0]),ze=-1,this.unSyncQueue.some((function(e,t){return e.name===B.queue.name&&(ze=t,!0)}))&&this.unSyncQueue.splice(ze,1),Y.call(this,B)):B.nextKey&&(Ye=new(s())(B.nextKey.low,B.nextKey.high,B.nextKey.unsigned).toString(),c.kg.debug("nexKey:",Ye,"this.nextKey:",this.nexKey),Ye!==this.nexKey&&(this.nexKey=Ye,re.call(this,B.nextKey,B.queue)));return[2]}}))}))}function Ee(e){var t=[],n=this.root.lookup("easemob.pb.KeyValue"),r=[];for(var o in e){var i=n.decode(t);if(i.key=o,void 0!==e[o]){if("object"===P(e[o]))i.type=8,i.stringValue=JSON.stringify(e[o]);else if("string"==typeof e[o])i.type=7,i.stringValue=e[o];else if("boolean"==typeof e[o])i.type=1,i.varintValue=!0===e[o]?1:0;else if(Number.isInteger(e[o]))i.type=2,i.varintValue=e[o];else if("bigint"==typeof e[o]||"symbol"===P(e[o])||"function"==typeof e[o]||Number.isNaN(e[o]))i.type=7,i.stringValue=e[o].toString();else{if("number"!=typeof e[o]||Number.isInteger(e[o]))continue;i.type=6,i.doubleValue=e[o]}r.push(i)}}return r}function ve(e){var t,n,r,o=[];if(this.root){var i,u=this.root.lookup("easemob.pb.MessageBody.Content").decode(o);switch(i=!e.group&&"groupchat"!==(null===(t=null==e?void 0:e.chatType)||void 0===t?void 0:t.toLowerCase())||e.roomType?e.group&&e.roomType||"chatroom"===(null===(n=null==e?void 0:e.chatType)||void 0===n?void 0:n.toLowerCase())?"chatRoom":"singleChat":"groupChat",e.type){case"txt":u.type=0,u.text=e.msg;break;case"img":u.type=1,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.size=e.body.size,u.thumbnailDisplayName=e.body.filename):e.file?(u.displayName=e.file.filename,u.remotePath=e.file.url,u.secretKey=e.file.secret,u.fileLength=e.file.file_length,u.size=e.file.size,u.thumbnailDisplayName=e.file.filename):(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.size=e.size,u.thumbnailDisplayName=e.filename),e.isBuildCombinedMsg&&(u.remotePath=e.url,u.secretKey=e.secret,u.size={height:e.height,width:e.width});break;case"video":u.type=2,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.duration=e.body.length,u.thumbnailDisplayName=e.body.filename,u.thumbnailRemotePath=this.useOwnUploadFun?"":"".concat(e.body.url,"?vframe=true"),u.thumbnailSecretKey=this.useOwnUploadFun?"":e.body.secret):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.duration=e.length,u.thumbnailDisplayName=e.filename,u.thumbnailRemotePath=e.thumb,u.thumbnailSecretKey=e.thumb_secret);break;case"loc":u.type=3,u.latitude=e.lat,u.longitude=e.lng,u.address=e.addr,u.buildingName=e.buildingName,u.latitude=e.lat;break;case"audio":u.type=4,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.duration=e.body.length,u.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.duration=e.length,u.thumbnailDisplayName=e.filename);break;case"file":u.type=5,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.thumbnailDisplayName=e.filename);break;case"cmd":u.type=6,u.action=e.action;break;case"custom":u.type=7,u.customEvent=e.customEvent,u.customExts=Ee.call(this,e.customExts);break;case"combine":u.type=0,u.subType=0,u.text=e.compatibleText,u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.title=e.title,u.summary=e.summary,u.combineLevel=e.combineLevel}var c=[];e.ext&&(c=Ee.call(this,e.ext));var l=this.root.lookup("easemob.pb.MessageBody"),d=l.decode(o),p=e.from||this.context.jid.name;d.from={name:e.isBuildCombinedMsg?p:this.context.jid.name};var f=e.to.indexOf("/"),h=f>-1?e.to.substring(0,f):e.to;if(d.to={name:h},"channel"===e.type)d.type=x.CHANNEL_ACK;else if("recall"===e.type)d.type=x.RECALL,d.ackMessageId=e.ackId;else if("delivery"===e.type)d.type=x.DELIVER_ACK,d.ackMessageId=e.ackId;else if("read"===e.type)d.type=x.READ_ACK,d.ackMessageId=e.ackId,"groupChat"===i&&(d.msgConfig={allowGroupAck:!0},d.ackContent=e.ackContent);else if("chatRoom"===i)d.type=x.CHATROOM;else if("groupChat"===i){if(d.type=x.GROUPCHAT,e.msgConfig){var _=e.msgConfig.allowGroupAck;d.msgConfig={allowGroupAck:!!_}}}else"singleChat"===i&&(d.type=x.SINGLECHAT);e.editMessageId&&(d.type=x.EDIT,d.editMessageId=e.editMessageId),d.contents=[u],d.ext=c;var E=function(e){var t={};return"translations"in e&&(t.translations=e.translations),"isChatThread"in e&&e.isChatThread&&(t.thread={}),Object.keys(t).length>0?JSON.stringify(t):""}(e);E&&(d.meta=E),d=l.encode(d).finish();var v=this.root.lookup("easemob.pb.Meta"),g=v.decode(o);g.id=e.id;var m="easemob.com";if("chatRoom"!==i&&"groupChat"!==i||(m="conference.easemob.com"),g.to={appKey:this.appKey,name:h,domain:m},f>-1&&(g.to.clientResource=e.to.substring(f+1,e.to.length)),"chatRoom"===i&&(g.ext=Ee.call(this,function(e){return{chatroom_msg_tag:"high"===e.priority?0:"low"===e.priority?2:1}}(e))),"recall"===e.type&&e.metaExt&&(g.ext=Ee.call(this,{recallMessageExtensionInfo:e.metaExt})),g.ns=1,g.payload=d,g.routetype=e.deliverOnlineOnly?1:0,"singleChat"!==i&&Array.isArray(e.receiverList)&&(null===(r=e.receiverList)||void 0===r?void 0:r.length)>0&&(g.directedUsers=e.receiverList,g.routetype=2),e.isBuildCombinedMsg)return g.timestamp=s().fromValue(e.time),v.encode(g).finish();var y=this.root.lookup("easemob.pb.CommSyncUL"),O=y.decode(o);O.meta=g,me.call(this,e,g),O=y.encode(O).finish();var T=this.root.lookup("easemob.pb.MSync"),R=T.decode(o);return R.version=this.version,R.encryptType=this.encryptType,R.command=0,R.payload=O,T.encode(R).finish()}e.fail&&e.fail({type:a.E.WEBIM_CONNCTION_CLIENT_OFFLINE,message:"Not logged in"})}function ge(e){var t,n,r=this,o=H({},e);if(e.file)return o.accessToken=this.token,o.appKey=this.appKey,o.apiUrl=this.apiUrl,o.body&&o.body.url?ve.call(this,o):new Promise((function(t,n){var i=o.onFileUploadComplete;o.onFileUploadComplete=function(t){var n,s,a,u,c,l;if(t.entities[0]["file-metadata"]){var d=t.entities[0]["file-metadata"]["content-length"];o.file_length=d,o.filetype=t.entities[0]["file-metadata"]["content-type"],d>204800&&(o.thumbnail=!0)}var p="".concat(r.apiUrl,"/").concat(r.orgName,"/").concat(r.appName,"/chatfiles/").concat(t.entities[0].uuid);o.body={type:o.type||"file",secret:t.entities[0]["share-secret"],filename:o.file.filename||o.filename,url:p,length:o.length||0,filetype:o.filetype||o.file.filetype,file_length:(null===(s=null===(n=o.file)||void 0===n?void 0:n.data)||void 0===s?void 0:s.size)||0,size:{width:o.width||0,height:o.height||0}},o.file.url=t.uri,e.secret=t.entities[0]["share-secret"],t.url=e.url="".concat(p,"?em-redirect=true&share-secret=").concat(t.entities[0]["share-secret"]),e.file_length=o.file_length=(null===(u=null===(a=o.file)||void 0===a?void 0:a.data)||void 0===u?void 0:u.size)||0,"img"===o.type&&(e.thumb="".concat(e.url,"&thumbnail=true"),t.thumb="".concat(t.url,"&thumbnail=true")),"video"===o.type&&(e.thumb="".concat(e.url,"&vframe=true"),e.thumb_secret=t.entities[0]["share-secret"],t.thumb="".concat(t.url,"&vframe=true")),i instanceof Function&&i(t,o.id);var f=ve.call(r,o);L.TJ.size<=L.F3&&L.TJ.set(o.id,{rpt:r.dataReport.geOperateFun({operationName:U.fI.SEND_MSG})}),null===(l=null===(c=r._localCache)||void 0===c?void 0:c.getInstance())||void 0===l||l.storeMessage(e,N.r.INPROGRESS),Ie.call(r,f)},v.P6.uploadFile.call(r,o,U.fI.UPLOAD_MSG_ATTACH)}));if("combine"===e.type){o.accessToken=this.token,o.appKey=this.appKey,o.apiUrl=this.apiUrl;var i=o.onFileUploadComplete,s=o.onFileUploadError;return new Promise((function(t,n){var u,l,d,p;if((null===(u=e.messageList)||void 0===u?void 0:u.length)>300||0===(null===(l=e.messageList)||void 0===l?void 0:l.length))return r._msgHash[o.id].reject({type:a.E.MAX_LIMIT,message:"The number of combined messages exceeded the limit."});var f=F([],e.messageList,!0),h=0;if(f.forEach((function(e){(null==e?void 0:e.combineLevel)>h&&(h=null==e?void 0:e.combineLevel)})),o.combineLevel=h+1,o.combineLevel>10)return r._msgHash[o.id].reject({type:a.E.MAX_LIMIT,message:"The level of the merged message exceeded the limit."});var _=ye.call(r,f),E=function(t,n){var s,a,u,c,l,d,p="".concat(r.apiUrl,"/").concat(r.orgName,"/").concat(r.appName,"/chatfiles/").concat(t.entities[0].uuid),f=null===(s=t.entities[0])||void 0===s?void 0:s["share-secret"],h=p+"?em-redirect=true";f&&(h="".concat(h,"&share-secret=").concat(f)),i instanceof Function&&i({url:h,secret:f}),e.url=h,e.secret=f,o.url=h,o.secret=t.entities[0]["share-secret"],o.filename=(null===(a=o.file)||void 0===a?void 0:a.filename)||(null==n?void 0:n.fileName),o.file_length=(null===(c=null===(u=o.file)||void 0===u?void 0:u.data)||void 0===c?void 0:c.size)||(null==n?void 0:n.fileLength)||0,null===(d=null===(l=r._localCache)||void 0===l?void 0:l.getInstance())||void 0===d||d.storeMessage(e,N.r.INPROGRESS);var _=ve.call(r,o);Ie.call(r,_)},g=v.P6.getEnvInfo();if("web"!==g.platform&&"node"!==g.platform&&"quick_app"!==g.platform&&(null===(p=null===(d=g.global)||void 0===d?void 0:d.canIUse)||void 0===p?void 0:p.call(d,"getFileSystemManager"))){var m=g.global.getFileSystemManager(),y="".concat(r.apiUrl,"/").concat(r.orgName,"/").concat(r.appName,"/chatfiles");m.writeFile({filePath:"".concat(g.global.env.USER_DATA_PATH,"/combine"),data:_.buffer,encoding:"binary",success:function(e){g.global.uploadFile({url:y,filePath:"".concat(g.global.env.USER_DATA_PATH,"/combine"),name:"file",header:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+o.accessToken},success:function(e){if(200===e.statusCode){c.kg.debug("upload success",e);var t=JSON.parse(e.data);E(t,{fileName:"combine",fileLength:_.length})}else c.kg.debug("upload fail"),o.onFileUploadError instanceof Function&&o.onFileUploadError(e),this._msgHash[o.id].reject({type:a.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},fail:function(t){c.kg.debug("upload fail"),o.onFileUploadError instanceof Function&&o.onFileUploadError(e),this._msgHash[o.id].reject({type:a.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:t})}})},fail:function(e){c.kg.debug("write file fail",e),this._msgHash[o.id].reject({type:a.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})}})}else{var O=new File([_],"combine",{type:"application/octet-stream"}),T={url:URL.createObjectURL(O),filename:o.id,data:O};o.file=T,o.onFileUploadComplete=function(e){E(e)},o.onFileUploadError=function(e){s instanceof Function&&s(e),r._msgHash[o.id].reject({type:a.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},v.P6.uploadFile.call(r,o,U.fI.UPLOAD_MSG_ATTACH)}}))}"img"===e.type&&(o.body||(o.body=H(H({},o),{size:{width:o.width||0,height:o.height||0}}))),null===(n=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===n||n.storeMessage(e,N.r.INPROGRESS);var u=ve.call(this,o);Ie.call(this,u)}function me(e,t){e.editMessageId||j.includes(e.type)&&(this._msgHash[e.id].thirdMessage=t)}function ye(e){for(var t=Uint8Array.from("cm",(function(e){return e.charCodeAt(0)})),n=0;n<e.length;n++){for(var r=e[n],o=H(H({},r),{isBuildCombinedMsg:!0}),i=this.mSync.encodeChatMsg.call(this,o),s=i.length,a=new Uint8Array(4),u=0;u<4;u++)a[u]=s>>8*(3-u)&255;c.kg.debug("message length:",a);var l=new Uint8Array(t.length+a.length+i.length);l.set(t),l.set(a,t.length),l.set(i,t.length+a.length),t=l}var d=new Uint8Array(t.length+1),p=0;for(n=2;n<t.length;n++)n%2==1&&(p^=t[n]);return d.set(t),c.kg.debug("checkResult:",p),d[t.length]=p,d}function Oe(e,t,n){var r=[],o=this.root.lookup("easemob.pb.MUCBody"),i=e.roomId,s=e.ext,a=void 0===s?"":s,u=e.leaveOtherRooms,c=void 0!==u&&u,l=o.decode(r);l.mucId={appKey:this.appKey,name:i,domain:"conference.easemob.com"},l.operation="join"===n?2:3,l.from={name:this.context.userId},l.isChatroom=!0,"join"===n&&(l.ext=a,l.leaveOtherRooms=c),l=o.encode(l).finish();var d=this.root.lookup("easemob.pb.Meta").decode(r);d.id=t,d.from={appKey:this.appKey,name:this.context.userId,domain:"easemob.com",client_resource:this.context.jid.clientResource},d.to={domain:"easemob.com"},d.ns=2,d.payload=l;var p=this.root.lookup("easemob.pb.CommSyncUL"),f=p.decode(r);f.meta=d,f=p.encode(f).finish();var h=this.root.lookup("easemob.pb.MSync"),_=h.decode(r);return _.version=this.version,_.encryptType=this.encryptType,_.command=0,_.payload=f,h.encode(_).finish()}function Te(e,t){var n=v.P6.getUniqueId(),r=Oe.call(this,e,n,t),o="join"===t?U.fI.JOIN_CHATROOM:U.fI.QUIT_CHATROOM,i=this.dataReport.geOperateFun({operationName:o});return L.iO.size<=L.F3&&L.iO.set(n,{rpt:i,requestName:o}),Ie.call(this,H(H({},e),{isHandleChatroom:!0,joinMsg:r,id:n,operation:t}),n)}function Re(e){var t=this;return new Promise((function(n,r){var o,i,s,u,l,d;if(c.kg.debug("call send"),t.logOut)return c.kg.debug("send message failed",a.E.WEBIM_CONNECTION_CLOSED),r({type:a.E.WEBIM_CONNECTION_CLOSED,message:"not login"});if(!e.id||"string"!=typeof e.id||""===e.id)return r({type:a.E.MESSAGE_PARAMETER_ERROR,message:'Missing required parameter: "id"'});if(!e.to||"string"!=typeof e.to||""===e.to)return r({type:a.E.MESSAGE_PARAMETER_ERROR,message:'Missing required parameter: "to"'});var p="file"===e.type||"img"===e.type||"audio"===e.type||"video"===e.type,f="delivery"===e.type||"read"===e.type||"channel"===e.type,h="cmd"===e.type,_="recall"===e.type,E=null==e?void 0:e.editMessageId,v=!(f||_||h||E);if(e.id){if(!p&&!f||p&&t.useOwnUploadFun){var g="recall"===e.type?U.fI.SEND_RECALL_MSG:U.fI.SEND_MSG;E&&(g=U.fI.MODIFY_MESSAGE),L.TJ.size<=L.F3&&L.TJ.set(e.id,{rpt:t.dataReport.geOperateFun({operationName:g})})}v&&(null===(i=null===(o=t._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.storeMessage(e,N.r.CREATE)),t._msgHash[e.id]=H(H({},e),{resolve:n,reject:r})}if(p||"combine"===e.type)return ge.call(t,e);if("txt"===e.type&&(null===(s=e.msgConfig)||void 0===s?void 0:s.languages)&&Array.isArray(null===(u=e.msgConfig)||void 0===u?void 0:u.languages)&&e.msgConfig.languages.length>0){var m=t.translateMessage||t.translation.translateMessage;if(!m)throw new Error("there is no method to translate message");m.call(t,{text:e.msg,languages:e.msgConfig.languages}).then((function(n){var r,o,i,s=null===(r=n.data[0])||void 0===r?void 0:r.translations;s=s.map((function(e){return{code:e.to,text:e.text}})),e.translations=s,t._msgHash[e.id].translations=s,null===(i=null===(o=t._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.storeMessage(e,N.r.INPROGRESS);var a=ve.call(t,e);Ie.call(t,a,e.id)})).catch((function(e){r(e)}))}else{v&&(null===(d=null===(l=t._localCache)||void 0===l?void 0:l.getInstance())||void 0===d||d.storeMessage(e,N.r.INPROGRESS));var y=ve.call(t,e);Ie.call(t,y,e.id)}}))}function Ie(e,t){var n,r,o=this;if(e.isHandleChatroom){if(!this.isOpened()){var i={data:"",type:a.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};if(L.iO.has(e.id)){var s=L.iO.get(e.id);(0,s.rpt)({isEndApi:!0,data:{isSuccess:0,requestName:s.requestName,requestMethod:"WEBSOCKET",requestUrl:this.url,code:U.dd.disconnect,codeDesc:"websocket has been disconnected"}}),L.iO.delete(e.id)}return Promise.reject(i)}return new Promise((function(n,r){var i;o._msgHash[e.id]=H(H({},e),{resolve:n,reject:r}),i="miniCore"===o.name?e.joinMsg:K.call(o,e.joinMsg,t),o.sock.send(i)}))}if(!this.isOpened())return null===(n=this.unMSyncSendMsgMap)||void 0===n||n.set(t,e),!this.logOut&&this.autoReconnectNumTotal<this.autoReconnectNumMax&&(c.kg.debug("need to reconnect",this.autoReconnectNumTotal,this.autoReconnectNumMax),this.offLineSendConnecting=!0,this.reconnecting||this.reconnect()),void(this.onError&&this.onError({type:a.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}));r="miniCore"===this.name?e:K.call(this,e,t),this.sock.send(r)}var Se=function(e,t){return e.send=Re,e.sendMsg=Re,c.kg.debug("init Msync by ".concat(e.name)),{generateProvision:q.bind(e),base64transform:K.bind(e),distributeMeta:V.bind(e),decodeMeta:J.bind(e),decodeUnreadDL:X.bind(e),_rebuild:Z.bind(e),_lastsession:ee.bind(e),receiveProvision:oe.bind(e),isInQueue:de.bind(e),decodeNotice:pe.bind(e),decodeMSync:fe.bind(e),distributeMSync:he.bind(e),encodeChatMsg:ve.bind(e),upLoadFile:ge.bind(e),send:Re.bind(e),stopHeartBeat:ce.bind(e),handleChatRoom:Te.bind(e)}}},7252:function(e,t){"use strict";var n=function(){function e(e){this.type=e.type,this.message=e.message,this.data=e.data}return e.create=function(t){return new e(t)},e}();t.Z=n},8161:function(e,t,n){"use strict";n.d(t,{t:function(){return v}}),n(9601),n(1539),n(8674),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948),n(7941),n(3710),n(9714),n(9653),n(6699),n(2023),n(2222),n(8309),n(9554),n(4747),n(2772);var r=n(3720),o=n.n(r),i=n(4363),s=n(4024),a=n(6424),u=n(9743),c=n(7360),l=n(2449),d=n(7288),p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},f=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},h=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},_={0:"TEXT",1:"IMAGE",2:"VIDEO",3:"LOCATION",4:"VOICE",5:"FILE",6:"COMMAND",7:"CUSTOM",8:"COMBINE"};function E(e){for(var t={},n=0;n<e.length;n++)if(8===e[n].type)t[e[n].key]=JSON.parse(e[n].stringValue);else if(7===e[n].type)t[e[n].key]=e[n].stringValue;else if(6===e[n].type)t[e[n].key]=e[n].doubleValue;else if(5===e[n].type)t[e[n].key]=e[n].floatValue;else if(1===e[n].type){var r=e[n].varintValue,i=new(o())(r.low,r.high,r.unsigned).toString();t[e[n].key]=0!==Number(i)}else 2!==e[n].type&&3!==e[n].type&&4!==e[n].type||(r=e[n].varintValue,i=new(o())(r.low,r.high,r.unsigned).toString(),t[e[n].key]=Number(i));return t}function v(e){var t="";return e.remotePath&&(t=s.P6.formatAttachUrl.call(this,e.remotePath),e.remotePath.includes("?em-redirect")||(t="".concat(t,"?em-redirect=true"),e.secretKey&&(t="".concat(t,"&share-secret=").concat(e.secretKey)))),t}function g(e,t){var n,r,o=t.from&&t.from.name;if(o===this.context.userId){var i=null===(n=null==e?void 0:e.from)||void 0===n?void 0:n.clientResource;o===(null===(r=null==t?void 0:t.to)||void 0===r?void 0:r.name)&&i&&i!==this.clientResource&&(o="".concat(o,"/").concat(i))}return o}function m(e,t){var n,r=t.to&&t.to.name;return(null===(n=null==e?void 0:e.to)||void 0===n?void 0:n.clientResource)&&(r="".concat(r,"/").concat(e.to.clientResource)),r}function y(e){var t,n,r,o,u,l,p,g,m,y,O,T,R,I,S,C,N,b,A,M,w,L,U,P,x,k,D;return f(this,void 0,void 0,(function(){var f,H,B,G,F,j,W,q,K,V,J,z,Y,X,Z,Q,$,ee,te,ne,re,oe,ie,se,ae,ue,ce,le,de,pe,fe,he,_e,Ee,ve,ge,me,ye,Oe,Te,Re,Ie,Se,Ce,Ne,be,Ae,Me,we,Le,Ue,Pe;return h(this,(function(h){switch(h.label){case 0:switch(f=e.status,H=e.thirdMessage,B=e.msgBody,G=e.msgId,F=e.type,j=e.from,W=e.to,q=e.time,K=e.onlineState,V=e.chatType,J=e.ignoreCallback,z=e.priority,Y=e.format,X=e.broadcast,Z=void 0!==X&&X,Q=e.isContentReplaced,$=void 0!==Q&&Q,ee={},te={},ne=f.errorCode>0,re=f.errorCode,oe=f.reason,ie={},se=[],ae=[],ue={},ce="",le=0,de=null,pe=null,H.ext&&(ie=E(H.ext)),H.meta&&"string"==typeof H.meta&&((he=JSON.parse(H.meta)).reaction&&(se=he.reaction).forEach((function(e){e.isAddedBySelf=e.state,delete e.state})),he.translations&&(ae=he.translations),he.edit_msg&&(_e=he.edit_msg,Ee=_e.count,ve=_e.operator,ge=_e.edit_time,me=_e.sender,ye=_e.send_time,ue={operationTime:ge,operatorId:ve,operationCount:Ee},ce=me,le=ye),he.thread&&"{}"!==JSON.stringify(he.thread)&&(de={messageId:he.thread.msg_parent_id,parentId:he.thread.muc_parent_id,chatThreadName:he.thread.thread_name}),he.thread_overview&&"{}"!==JSON.stringify(he.thread_overview)&&(pe={id:he.thread_overview.id,parentId:he.thread_overview.muc_parent_id,name:he.thread_overview.name,lastMessage:he.thread_overview.last_message&&"{}"!==JSON.stringify(he.thread_overview.last_message)?i.w.call(this,he.thread_overview.last_message):null,createTimestamp:he.thread_overview.create_timestamp,updateTimestamp:he.thread_overview.update_timestamp,messageCount:he.thread_overview.message_count||0})),B.type){case 0:return[3,1];case 1:return[3,7];case 2:return[3,10];case 3:return[3,13];case 4:return[3,16];case 5:return[3,19];case 6:return[3,22];case 7:return[3,23];case 8:return[3,26]}return[3,27];case 1:return Object.prototype.hasOwnProperty.call(B,"subType")&&0===B.subType?(fe=v.call(this,B),Oe={id:G,type:"combine",chatType:V,to:W,from:j,ext:ie,time:Number(q),onlineState:K,title:B.title||"",summary:B.summary||"",url:fe||"",secret:B.secretKey||"",file_length:B.fileLength||0,filename:B.displayName||"",compatibleText:B.text,combineLevel:B.combineLevel||0},ee.msgConfig&&(Oe.msgConfig=ee.msgConfig),se.length>0&&(Oe.reactions=se),de&&(Oe.chatThread=de),pe&&(Oe.chatThreadOverview=pe),"chatRoom"===V&&(Oe.priority=z,Oe.broadcast=Z),$&&(Oe.isContentReplaced=$),te=Oe,J?[3,3]:[4,null===(n=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===n?void 0:n.storeMessage(Oe,d.r.SUCCESS)]):[3,4];case 2:h.sent(),null===(r=this.eventHandler)||void 0===r||r.dispatch("onCombineMessage",Oe),h.label=3;case 3:return[3,28];case 4:return!(ee={id:G,type:F,contentsType:_[B.type],from:j,to:W,data:B.text,ext:ie,sourceMsg:B.text,time:q,msgConfig:H.msgConfig,onlineState:K}).msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onTextMessage&&this.onTextMessage(ee),Te={id:G,type:"txt",chatType:V,msg:B.text,to:W,from:j,ext:ie,time:Number(q),onlineState:K},ee.msgConfig&&(Te.msgConfig=ee.msgConfig),se.length>0&&(Te.reactions=se),de&&(Te.chatThread=de),pe&&(Te.chatThreadOverview=pe),ae.length>0&&(Te.translations=ae),ue.operationCount>0&&(Te.modifiedInfo=ue,H.type===a.gA.EDIT&&(Te.from=ce,Te.time=le)),"chatRoom"===V&&(Te.priority=z,Te.broadcast=Z),$&&(Te.isContentReplaced=$),te=Te,J?[3,6]:[4,null===(u=null===(o=this._localCache)||void 0===o?void 0:o.getInstance())||void 0===u?void 0:u.storeMessage(Te,d.r.SUCCESS)];case 5:h.sent(),null===(l=this.eventHandler)||void 0===l||l.dispatch("onTextMessage",Te),h.label=6;case 6:return[3,28];case 7:return Re=(null===(p=null==B?void 0:B.size)||void 0===p?void 0:p.width)||0,Ie=(null===(g=null==B?void 0:B.size)||void 0===g?void 0:g.height)||0,fe=this.useOwnUploadFun?B.remotePath:v.call(this,B),!(ee={id:G,type:F,contentsType:_[B.type],from:j,to:W,url:fe,secret:B.secretKey,filename:B.displayName,thumb:this.useOwnUploadFun?"":"".concat(fe,"&thumbnail=true"),thumb_secret:B.secretKey,file_length:B.fileLength||"",width:Re,height:Ie,filetype:B.filetype||"",accessToken:this.token,ext:ie,time:q,msgConfig:H.msgConfig,onlineState:K}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onPictureMessage&&this.onPictureMessage(ee),Se={id:G,type:"img",chatType:V,from:j,to:W,url:fe||"",width:Re,height:Ie,secret:B.secretKey||"",thumb:this.useOwnUploadFun?"":"".concat(fe,"&thumbnail=true"),thumb_secret:B.secretKey,file_length:B.fileLength||0,ext:ie,time:Number(q),onlineState:K},ee.msgConfig&&(Se.msgConfig=ee.msgConfig),se.length>0&&(Se.reactions=se),de&&(Se.chatThread=de),pe&&(Se.chatThreadOverview=pe),"chatRoom"===V&&(Se.priority=z,Se.broadcast=Z),$&&(Se.isContentReplaced=$),te=Se,J?[3,9]:[4,null===(y=null===(m=this._localCache)||void 0===m?void 0:m.getInstance())||void 0===y?void 0:y.storeMessage(Se,d.r.SUCCESS)];case 8:h.sent(),null===(O=this.eventHandler)||void 0===O||O.dispatch("onImageMessage",Se),h.label=9;case 9:return[3,28];case 10:return fe=this.useOwnUploadFun?B.remotePath:v.call(this,B),!(ee={id:G,type:F,contentsType:_[B.type],from:j,to:W,url:fe,secret:B.secretKey,filename:B.displayName,length:B.duration||"",file_length:B.fileLength||"",filetype:B.filetype||"",accessToken:this.token||"",ext:ie,time:q,msgConfig:H.msgConfig,onlineState:K}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onVideoMessage&&this.onVideoMessage(ee),Ce={id:G,type:"video",chatType:V,from:j,to:W,url:fe,secret:B.secretKey,thumb:s.P6.formatAttachUrl.call(this,B.thumbnailRemotePath),thumb_secret:B.thumbnailSecretKey,filename:B.displayName,length:B.duration||0,file:{},file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ie,time:Number(q),onlineState:K},ee.msgConfig&&(Ce.msgConfig=ee.msgConfig),se.length>0&&(Ce.reactions=se),de&&(Ce.chatThread=de),pe&&(Ce.chatThreadOverview=pe),"chatRoom"===V&&(Ce.priority=z,Ce.broadcast=Z),$&&(Ce.isContentReplaced=$),te=Ce,J?[3,12]:[4,null===(R=null===(T=this._localCache)||void 0===T?void 0:T.getInstance())||void 0===R?void 0:R.storeMessage(Ce,d.r.SUCCESS)];case 11:h.sent(),null===(I=this.eventHandler)||void 0===I||I.dispatch("onVideoMessage",Ce),h.label=12;case 12:return[3,28];case 13:return!(ee={id:G,type:F,contentsType:_[B.type],from:j,to:W,addr:B.address,buildingName:B.buildingName,lat:B.latitude,lng:B.longitude,ext:ie,time:q,msgConfig:H.msgConfig,onlineState:K}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onLocationMessage&&this.onLocationMessage(ee),Ne={id:G,type:"loc",chatType:V,from:j,to:W,buildingName:B.buildingName,addr:B.address,lat:B.latitude,lng:B.longitude,ext:ie,time:Number(q),onlineState:K},ee.msgConfig&&(Ne.msgConfig=ee.msgConfig),se.length>0&&(Ne.reactions=se),de&&(Ne.chatThread=de),pe&&(Ne.chatThreadOverview=pe),"chatRoom"===V&&(Ne.priority=z,Ne.broadcast=Z),$&&(Ne.isContentReplaced=$),te=Ne,J?[3,15]:[4,null===(C=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===C?void 0:C.storeMessage(Ne,d.r.SUCCESS)];case 14:h.sent(),null===(N=this.eventHandler)||void 0===N||N.dispatch("onLocationMessage",Ne),h.label=15;case 15:return[3,28];case 16:return fe=this.useOwnUploadFun?B.remotePath:v.call(this,B),!(ee={id:G,type:F,contentsType:_[B.type],from:j,to:W,url:fe,secret:B.secretKey,filename:B.displayName,file_length:B.fileLength||"",accessToken:this.token||"",ext:ie,length:B.duration,time:q,msgConfig:H.msgConfig,onlineState:K}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onAudioMessage&&this.onAudioMessage(ee),be={id:G,type:"audio",chatType:V,from:j,to:W,url:fe,secret:B.secretKey,file:{},filename:B.displayName,length:B.duration||0,file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ie,time:Number(q),onlineState:K},ee.msgConfig&&(be.msgConfig=ee.msgConfig),se.length>0&&(be.reactions=se),de&&(be.chatThread=de),pe&&(be.chatThreadOverview=pe),"chatRoom"===V&&(be.priority=z,be.broadcast=Z),$&&(be.isContentReplaced=$),te=be,J?[3,18]:[4,null===(A=null===(b=this._localCache)||void 0===b?void 0:b.getInstance())||void 0===A?void 0:A.storeMessage(be,d.r.SUCCESS)];case 17:h.sent(),null===(M=this.eventHandler)||void 0===M||M.dispatch("onAudioMessage",be),h.label=18;case 18:return[3,28];case 19:return fe=this.useOwnUploadFun?B.remotePath:v.call(this,B),!(ee={id:G,type:F,contentsType:_[B.type],from:j,to:W,url:fe,secret:B.secretKey,filename:B.displayName,file_length:B.fileLength,accessToken:this.token||"",ext:ie,time:q,msgConfig:H.msgConfig,onlineState:K}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onFileMessage&&this.onFileMessage(ee),Ae={id:G,type:"file",chatType:V,from:j,to:W,url:fe,secret:B.secretKey,file:{},filename:B.displayName,length:B.duration||0,file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ie,time:Number(q),onlineState:K},ee.msgConfig&&(Ae.msgConfig=ee.msgConfig),se.length>0&&(Ae.reactions=se),de&&(Ae.chatThread=de),pe&&(Ae.chatThreadOverview=pe),"chatRoom"===V&&(Ae.priority=z,Ae.broadcast=Z),$&&(Ae.isContentReplaced=$),te=Ae,J?[3,21]:[4,null===(L=null===(w=this._localCache)||void 0===w?void 0:w.getInstance())||void 0===L?void 0:L.storeMessage(Ae,d.r.SUCCESS)];case 20:h.sent(),null===(U=this.eventHandler)||void 0===U||U.dispatch("onFileMessage",Ae),h.label=21;case 21:return[3,28];case 22:return!(ee={id:G,type:F,contentsType:_[B.type],from:j,to:W,action:B.action,ext:ie,time:q,msgConfig:H.msgConfig,onlineState:K}).msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onCmdMessage&&this.onCmdMessage(ee),Me={id:G,type:"cmd",chatType:V,from:j,to:W,action:B.action,ext:ie,time:Number(q),onlineState:K},ee.msgConfig&&(Me.msgConfig=ee.msgConfig),se.length>0&&(Me.reactions=se),de&&(Me.chatThread=de),pe&&(Me.chatThreadOverview=pe),"chatRoom"===V&&(Me.priority=z,Me.broadcast=Z),$&&(Me.isContentReplaced=$),te=Me,J||null===(P=this.eventHandler)||void 0===P||P.dispatch("onCmdMessage",Me),[3,28];case 23:return we={},Le={},H.contents[0].customExts&&(we=E(H.contents[0].customExts)),H.contents[0].params&&(Le=E(H.contents[0].params)),ee={id:G,type:F,contentsType:_[B.type],from:j,to:W,customEvent:B.customEvent,params:Le,customExts:we,ext:ie,time:q,onlineState:K},!J&&this.onCustomMessage&&this.onCustomMessage(ee),Ue={id:G,type:"custom",chatType:V,from:j,to:W,customEvent:B.customEvent,params:Le,customExts:we,ext:ie,time:Number(q),onlineState:K},ee.msgConfig&&(Ue.msgConfig=ee.msgConfig),se.length>0&&(Ue.reactions=se),de&&(Ue.chatThread=de),pe&&(Ue.chatThreadOverview=pe),ue.operationCount>0&&(Ue.modifiedInfo=ue,H.type===a.gA.EDIT&&(Ue.from=ce,Ue.time=le)),"chatRoom"===V&&(Ue.priority=z,Ue.broadcast=Z),$&&(Ue.isContentReplaced=$),te=Ue,J?[3,25]:[4,null===(k=null===(x=this._localCache)||void 0===x?void 0:x.getInstance())||void 0===k?void 0:k.storeMessage(Ue,d.r.SUCCESS)];case 24:h.sent(),null===(D=this.eventHandler)||void 0===D||D.dispatch("onCustomMessage",Ue),h.label=25;case 25:return[3,28];case 26:return fe=v.call(this,B),Pe={id:G,type:"combine",chatType:V,to:W,from:j,ext:ie,time:Number(q),onlineState:K,title:B.title||"",summary:B.summary||"",url:fe||"",secret:B.secretKey||"",file_length:B.fileLength||0,filename:B.displayName||"",compatibleText:B.text,combineLevel:B.combineLevel||0},ee.msgConfig&&(Pe.msgConfig=ee.msgConfig),se.length>0&&(Pe.reactions=se),de&&(Pe.chatThread=de),pe&&(Pe.chatThreadOverview=pe),"chatRoom"===V&&(Pe.priority=z,Pe.broadcast=Z),$&&(Pe.isContentReplaced=$),te=Pe,!J&&this.eventHandler&&this.eventHandler.dispatch("onCombineMessage",Pe),[3,28];case 27:return c.kg.error("Unknow message type, message:",B),[3,28];case 28:return Y?[2,te]:[2,ee]}}))}))}function O(e,t,n){if(this.delivery&&e!==t){var r=this.getUniqueId(),o=new l.Message("delivery",r);o.set({ackId:n,to:e}),c.kg.debug("send delivery ack"),this.send(o.body)}}t.Z=function(e,t,n,r,i){var l,d,_,v,T,R,I,S,C,N,b,A,M,w,L,U,P,x,k,D,H,B,G,F,j,W;return f(this,void 0,void 0,(function(){var f,q,K,V,J,z,Y,X,Z,Q,$,ee,te,ne,re,oe,ie,se,ae,ue,ce,le,de,pe,fe,he,_e,Ee,ve,ge,me,ye,Oe,Te,Re,Ie,Se,Ce,Ne,be;return h(this,(function(h){switch(h.label){case 0:if(f=new(o())(e.timestamp.low,e.timestamp.high,e.timestamp.unsigned).toString(),q=this.root.lookup("easemob.pb.MessageBody"),K=q.decode(e.payload),V=3,J=!1,z=new(o())(e.id.low,e.id.high,e.id.unsigned).toString(),i&&e.from&&e.from.name===this.context.userId&&e.from.clientResource===this.clientResource&&K.type===a.gA.CHATROOM)return[2,c.kg.debug("Discard your own chat room message:",z)];if(e.meta&&e.meta.length){if(Y=s.P6.parseNotify(e.meta),X=Y.is_online,Z=Y.callback_replace,this.useReplacedMessageContents&&Z&&(J=!0),X||0===X)switch(X){case 0:V=0;break;case 1:V=1;break;default:V=2}}else V=3;switch(Q=K.ackMessageId?new(o())(K.ackMessageId.low,K.ackMessageId.high,K.ackMessageId.unsigned).toString():"",$="",ee=g.call(this,e,K),te=m.call(this,e,K),c.kg.debug("meta thirdMessage:",{metaId:z,metaNs:e.ns,type:K.type,from:ee,to:te,contentType:null===(d=null===(l=K.contents)||void 0===l?void 0:l[0])||void 0===d?void 0:d.type,contentLen:null===(_=K.contents)||void 0===_?void 0:_.length}),K.type){case a.gA.SINGLECHAT:return[3,1];case a.gA.GROUPCHAT:return[3,2];case a.gA.CHATROOM:return[3,3];case a.gA.READ_ACK:return[3,4];case a.gA.DELIVER_ACK:return[3,5];case a.gA.RECALL:return[3,6];case a.gA.CHANNEL_ACK:return[3,15];case a.gA.EDIT:return[3,16]}return[3,20];case 1:return $="chat","agoraToken"===this.grantType&&($="singleChat"),this.delivery&&!n&&ee!==this.context.userId&&O.call(this,ee,te,z),[3,21];case 2:return $="groupchat","agoraToken"===this.grantType&&($="groupChat"),[3,21];case 3:return $="chatroom","agoraToken"===this.grantType&&($="chatRoom"),V=1,[3,21];case 4:return $="read_ack",ne=void 0,K.ext[0]&&JSON.parse(K.ext[0].stringValue)?(ne={id:z,type:"read",from:ee,to:te,mid:Q,groupReadCount:K.ext[0]&&JSON.parse(K.ext[0].stringValue),ackContent:K.ackContent,onlineState:V},this.onReadMessage&&this.onReadMessage(ne),null===(v=this.eventHandler)||void 0===v||v.dispatch("onReadMessage",ne),[2]):(ne={id:z,type:"read",from:ee,to:te,mid:Q,onlineState:V},this.onReadMessage&&this.onReadMessage(ne),null===(T=this.eventHandler)||void 0===T||T.dispatch("onReadMessage",ne),[2]);case 5:return $="deliver_ack",this.onDeliveredMessage&&this.onDeliveredMessage({id:z,type:"delivery",from:ee,to:te,mid:Q,onlineState:V}),re={id:z,type:"delivery",from:ee,to:te,mid:Q,onlineState:V},null===(R=this.eventHandler)||void 0===R||R.dispatch("onDeliveredMessage",re),[2];case 6:return $="recall",oe="",e.ext&&(oe=(null===(I=E(e.ext))||void 0===I?void 0:I.recallMessageExtensionInfo)||""),ie={id:z,from:ee||"admin",to:te,mid:Q,ext:oe,onlineState:V},se=te===this.user?ee:te,[4,null===(C=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===C?void 0:C.getMessageByServerMsgId(ie.mid)];case 7:return(ae=h.sent())?[4,null===(b=null===(N=this._localCache)||void 0===N?void 0:N.getInstance())||void 0===b?void 0:b.removeMsgByServerMsgId(ie.mid)]:[3,9];case 8:h.sent(),h.label=9;case 9:return"singleChat"!==(null==ae?void 0:ae.chatType)&&"groupChat"!==(null==ae?void 0:ae.chatType)?[3,14]:(ue=(null==ae?void 0:ae.from)===this.user||""===(null==ae?void 0:ae.from),[4,null===(M=null===(A=this._localCache)||void 0===A?void 0:A.getInstance())||void 0===M?void 0:M.getConversationLastMessage(se,ae.chatType)]);case 10:return ce=h.sent(),[4,null===(L=null===(w=this._localCache)||void 0===w?void 0:w.getInstance())||void 0===L?void 0:L.getConversationBySessionId((0,u.MQ)({conversationId:se,conversationType:ae.chatType}))];case 11:return(le=h.sent())?[4,null===(P=null===(U=this._localCache)||void 0===U?void 0:U.getInstance())||void 0===P?void 0:P.updateLocalConversation((0,u.MQ)({conversationId:se,conversationType:ae.chatType}),{lastMessageId:null==ce?void 0:ce.serverMsgId,unReadCount:(0,u.E7)({conversation:le,isRecallSelfMsg:ue,recalledMsgTime:ae.time})})]:[3,13];case 12:h.sent(),h.label=13;case 13:h.label=14;case 14:return this.onRecallMessage&&this.onRecallMessage(ie),null===(x=this.eventHandler)||void 0===x||x.dispatch("onRecallMessage",ie),[2];case 15:return this.onChannelMessage&&this.onChannelMessage({id:z,type:"channel",chatType:"singleChat",from:ee,to:te,time:Number(f),onlineState:V}),de={id:z,type:"channel",chatType:"singleChat",from:ee,to:te,time:Number(f),onlineState:V},null===(k=this.eventHandler)||void 0===k||k.dispatch("onChannelMessage",de),[2];case 16:return pe={errorCode:0,reason:""},[4,y.call(this,{status:pe,thirdMessage:K,msgBody:K.contents[0],msgId:z,type:$,from:ee,to:te,time:f,onlineState:V,ignoreCallback:!0,format:!0,isContentReplaced:J})];case 17:return fe=h.sent(),he=!!e.to&&-1!==e.to.domain.indexOf("conference"),fe.chatType=he?"groupChat":"singleChat",_e=K.editMessageId&&new(o())(K.editMessageId.low,K.editMessageId.high,K.editMessageId.unsigned).toString(),Ee={},"txt"===fe.type?(ve=fe.type,ge=fe.chatType,me=fe.to,ye=fe.from,Oe=fe.time,Te=fe.modifiedInfo,Ee={id:_e,type:ve,chatType:ge,to:me,from:ye,time:Oe,modifiedInfo:Te,msg:fe.msg},fe.translations&&(Ee.translations=fe.translations)):"custom"===fe.type&&((Ee=fe).id=_e,delete Ee.onlineState),Ee?[4,null===(H=null===(D=this._localCache)||void 0===D?void 0:D.getInstance())||void 0===H?void 0:H.getMessageByServerMsgId(_e)]:[3,19];case 18:"txt"===(null==(Re=h.sent())?void 0:Re.type)&&"txt"===Ee.type?null===(G=null===(B=this._localCache)||void 0===B?void 0:B.getInstance())||void 0===G||G.putMessageToDB(p(p({},Re),{msg:Ee.msg,modifiedInfo:Ee.modifiedInfo,translations:Ee.translations})):"custom"===(null==Re?void 0:Re.type)&&"custom"===Ee.type&&(null===(j=null===(F=this._localCache)||void 0===F?void 0:F.getInstance())||void 0===j||j.putMessageToDB(p(p({},Re),{modifiedInfo:Ee.modifiedInfo,customEvent:Ee.customEvent,customExts:Ee.customExts,ext:Ee.ext}))),h.label=19;case 19:return"txt"!==fe.type&&"custom"!==fe.type||null===(W=this.eventHandler)||void 0===W||W.dispatch("onModifiedMessage",Ee),[2];case 20:return c.kg.error("unexpected message type: ".concat(K.type)),[2];case 21:Ie="normal",Ce=!1,"chat"===$.toLowerCase()||"singleChat"===$?Se="singleChat":"groupchat"===$.toLowerCase()||"groupChat"===$?Se="groupChat":(Se="chatRoom",V=1,e.ext&&(Ne=E(e.ext),Ce=!!(null==Ne?void 0:Ne.is_broadcast),Ie=0===Ne.chatroom_msg_tag?"high":2===Ne.chatroom_msg_tag?"low":"normal")),be=0,h.label=22;case 22:return be<K.contents.length?[4,y.call(this,{status:t,thirdMessage:K,msgBody:K.contents[be],msgId:z,type:$,from:ee,to:te,time:f,onlineState:V,chatType:Se,ignoreCallback:n,priority:Ie,format:r,broadcast:Ce,isContentReplaced:J})]:[3,25];case 23:return[2,h.sent()];case 24:return be++,[3,22];case 25:return[2]}}))}))}},7288:function(e,t,n){"use strict";var r;n.d(t,{r:function(){return r}}),function(e){e[e.CREATE=0]="CREATE",e[e.FAIL=1]="FAIL",e[e.INPROGRESS=2]="INPROGRESS",e[e.SUCCESS=3]="SUCCESS"}(r||(r={}))},9743:function(e,t,n){"use strict";n.d(t,{E7:function(){return o},MQ:function(){return r},un:function(){return i}}),n(2222);var r=function(e){return"".concat(e.conversationType,"-").concat(e.conversationId)},o=function(e){var t=e.isRecallSelfMsg,n=e.conversation,r=e.recalledMsgTime,o=n.unReadCount,i=void 0===o?0:o,s=n.unreadCountClearTimestamp;return t||(void 0===s?0:s)>r?i:i&&i>0?i-1:0},i=function(e){var t,n=0;if(0===e.length)return n;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n}},7360:function(e,t,n){"use strict";function r(){console.log&&(console.log.apply?console.log.apply(console,Array.prototype.slice.call(arguments)):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}n.d(t,{kg:function(){return f}}),n(1539),n(8674),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948),n(7042),n(2222),n(8309),n(9600),n(2564),n(285),n(1637),n(4812),n(3710),n(9554),n(2772),n(4916);var o="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=n(4024);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var a,u=function(){},c={};!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(a||(a={}));var l=function(){function e(e,t,n){this.name=e||"defaultLogger",this.currentLevel=0,this.useCookiePersist=!1,this.storageLogLevelKey="loglevel",this.levels=a,this.consoleLogVisibility=!0,this.logMethods=["trace","debug","info","warn","error"],this.methodFactory=n||this.defaultMethodFactory,this.report=!1;var r=this._getPersistedLevel();null==r&&(r=null===t?"WARN":t),this.logs=[],this.reportLogs=[],this.reportInterval=3e5,this.timer=null,this.config={useCache:!1,maxCache:3145728,color:"",background:""},this.logBytes=0,this.setLevel(r,!1,"")}return e.prototype.reportLog=function(){var e,t,n,r,o,s,a;return r=this,o=void 0,a=function(){var r,o,s,a,u,c,l,d;return function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(p){switch(p.label){case 0:if(0===(null===(e=this.reportLogs)||void 0===e?void 0:e.length))return[2];for(r=2097152,o=this.reportLogs.join("\n")+"\n",s=o.length,a=[];s>r;)a.push(o.substring(0,r)),s-=r,o=o.substring(r);a.push(o),u=0,c=a,p.label=1;case 1:if(!(u<c.length))return[3,8];if(l=c[u],this.reportLogs=[],!(null===(n=null===(t=this.connection)||void 0===t?void 0:t.context)||void 0===n?void 0:n.accessToken))return[2];p.label=2;case 2:return p.trys.push([2,4,,5]),[4,this.reportData(l)];case 3:return"ok"!==(null==(d=p.sent())?void 0:d.status)&&this.reportLogs.unshift(l),[3,5];case 4:return p.sent(),this.reportLogs.unshift(l),[3,5];case 5:return[4,i.P6.delay(3e3)];case 6:p.sent(),p.label=7;case 7:return u++,[3,1];case 8:return[2]}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{u(a.next(e))}catch(e){t(e)}}function i(e){try{u(a.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,i)}u((a=a.apply(r,o||[])).next())}))},e.prototype.reportData=function(e){var t,n=this;if(this.connection){var r=this.connection.context||{},o=r.orgName,s=r.appName,a=r.accessToken,u=r.userId,c={url:"".concat(null===(t=this.connection)||void 0===t?void 0:t.apiUrl,"/").concat(o,"/").concat(s,"/sdk/users/").concat(u,"/client/logs"),type:"POST",data:JSON.stringify({resource:this.connection.clientResource,logContent:e}),dataType:"json",headers:{Authorization:"Bearer "+a,"Content-Type":"application/json"}};return i.hj.call(this.connection,c).then((function(e){return n.log("report log success",e),e})).catch((function(e){n.error("report log error",e)}))}this.error("report log error","connection is null")},e.prototype._regularlyReportLogs=function(){var e,t=this;this.timer&&clearInterval(this.timer),(null!==(e=this.reportInterval)&&void 0!==e?e:0)<6e4&&(this.reportInterval=6e4),this.timer=setInterval((function(){t.reportLog()}),this.reportInterval||3e5)},e.prototype._stopReportLogs=function(){this.reportLog(),clearInterval(this.timer)},e.prototype.setConfig=function(e){this.config=e},e.prototype.getLevel=function(){return this.currentLevel},e.prototype.setLevel=function(e,t,n){if("string"==typeof e&&(e=a[e]),void 0===e&&(e=0),!("number"==typeof e&&e>=0&&e<=this.levels.SILENT))throw Error("log.setLevel() called with invalid level: "+e);if(this.currentLevel=e,!1!==t&&this._persistLevel(e),this.replaceLoggingMethods(e,n||""),"undefined"==typeof console&&e<a.SILENT)throw Error("No console available for logging")},e.prototype.setDefaultLevel=function(e){this._getPersistedLevel()||this.setLevel(e,!1,"")},e.prototype.enableAll=function(e){this.setLevel(this.levels.TRACE,!0,"")},e.prototype.disableAll=function(e){this.setLevel(this.levels.SILENT,!0,"")},e.prototype.getLogs=function(){return this.logs},e.prototype.download=function(){if("undefined"!=typeof window&&"undefined"!=typeof document){var e=this.getLogs().join("\n"),t=new Blob([e],{type:"text/plain;charset=UTF-8"}),n=window.URL.createObjectURL(t),r=document.createElement("a");r.style.display="none",r.href=n,r.setAttribute("download","sdklog"),document.body.appendChild(r),r.click()}},e.prototype.setConsoleLogVisibility=function(e){this.consoleLogVisibility=e},e.prototype._bindMethod=function(e,t,n){var r=this,o=e[t],i=this.getTime();if(n)return this._cacheLog;if("function"==typeof o.bind)return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=r.getTime();r.consoleLogVisibility&&o.call.apply(o,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e,"".concat(s," IM SDK [").concat("log"===t?"debug":t,"]: ")],n,!1)),r.onLog&&r.onLog({time:s,level:"log"===t?"debug":t,logs:n}),r._cacheReportLogs.apply(r,n)};try{return Function.prototype.bind.call(o,e,"".concat(i," IM SDK [").concat("log"===t?"debug":t,"]: "))}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}},e.prototype.getTime=function(){var e=new Date;return e.toTimeString().split(" ")[0]+":"+e.getMilliseconds()},e.prototype._cacheLog=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(new Date).toLocaleString()+": ",r="";e.forEach((function(e){"object"===s(e)?r+=JSON.stringify(e)+" ":r+=e+" "})),this._cacheLogCall(n+r),this._cacheReportLogs.apply(this,e)},e.prototype._cacheLogCall=function(e){var t=e.length,n=this.logBytes+t,r=this.config.maxCache;if(!(t>=r)){if(n<r)this.logBytes+=t;else for(var o=n-r,i=0;i<o;){var s=this.logs.shift();void 0!==s&&(i+=s.length)}this.logs.push(e)}},e.prototype._cacheReportLogs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.report){var n=(new Date).toLocaleString()+": ",r="";e.forEach((function(e){"object"===s(e)?r+=JSON.stringify(e)+" ":r+=e+" "})),this.reportLogs.push(n+r)}},e.prototype._getPersistedLevel=function(){var e;if("undefined"==typeof window)return 5;if("undefined"===(e=window&&window.localStorage&&window.localStorage[this.storageLogLevelKey])){var t=window.document.cookie,n=t.indexOf(encodeURIComponent(this.storageLogLevelKey));-1!==n&&(e=/^([^;]+)/.exec(t.slice(n))[1])}return e||5},e.prototype._persistLevel=function(e){var t=this.logMethods[e]||"SILENT";"undefined"!=typeof window&&(window.localStorage&&(window.localStorage[this.storageLogLevelKey]=t),this.useCookiePersist&&(window.document.cookie=encodeURIComponent(this.storageLogLevelKey)+"="+t+";"))},e.prototype.replaceLoggingMethods=function(e,t){for(var n=this,r=0;r<this.logMethods.length;r++){var o=this.logMethods[r];this[o]=r<e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n.report&&n._cacheReportLogs.apply(n,e)}:this.methodFactory(o,e,t)}this.log=this.debug},e.prototype.defaultMethodFactory=function(e,t,n){return this.realMethod(e)||this.enableLoggingWhenConsoleArrives.apply(this,[e,t,n])},e.prototype.realMethod=function(e){return"debug"===e&&(e="log"),"undefined"!=typeof console&&("trace"===e&&o?r:void 0!==console[e]?this._bindMethod(console,e,this.config.useCache):void 0!==console.log?this._bindMethod(console,"log",this.config.useCache):u)},e.prototype.enableLoggingWhenConsoleArrives=function(e,t,n){return function(){"undefined"!=typeof console&&(this.replaceLoggingMethods.call(this,t,n),this[e].apply(this,arguments))}.bind(this)},e}(),d=new l;d.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");return this};var p="undefined"!=typeof window?window.log:void 0;d.noConflict=function(){return"undefined"!=typeof window&&window.log===d&&(window.log=p),d},d.getLoggers=function(){return c},d.initReport=function(e){var t=e.report,n=e.reportInterval,r=e.connection;d.report=t,d.reportInterval=n,d.connection=r,t&&d._regularlyReportLogs()};var f=d},2449:function(e,t,n){"use strict";n.r(t),n.d(t,{Message:function(){return E}});var r=n(4024),o=function(){function e(e){var t=e.id;this.id=t,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.id,type:"read",to:e.to,from:e.from||"",chatType:e.chatType}},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType,ackId:e.id,type:"read",to:e.to,from:e.from||"",ackContent:e.ackContent,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}(),i=function(){function e(e){this.id=e.id,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.ackId,type:"delivery",to:e.to,from:e.from||""}},e.create=function(e){return{id:r.P6.getUniqueId(),ackId:e.ackId,type:"delivery",to:e.to,from:e.from||"",isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}(),s=(n(3843),n(3710),function(){function e(e){var t=e.type,n=e.id;this.id=n,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"channel",to:e.to,from:e.from||"",time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),type:"channel",chatType:e.chatType||"singleChat",to:e.to,from:e.from||"",time:Date.now(),isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}()),a=(n(9753),function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t,this.value=""}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"txt",to:e.to,msg:e.msg,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),isChatThread:e.isChatThread},this.value=e.msg},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){var t,n;return(null===(t=e.msgConfig)||void 0===t?void 0:t.languages)&&Array.isArray(null===(n=e.msgConfig)||void 0===n?void 0:n.languages),{type:"txt",id:r.P6.getUniqueId(),msg:e.msg,to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}()),u=function(){function e(e){var t=e.type,n=e.id;this.id=n||r.P6.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"cmd",to:e.to,action:e.action,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),type:"cmd",to:e.to,from:e.from||"",chatType:e.chatType||"singleChat",action:e.action,time:Date.now(),ext:e.ext,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),c=function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),l=function(){function e(e){var t=e.type,n=e.id;this.id=n||r.P6.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),d=function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&r.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"img",file:e.file,width:e.width,height:e.height,to:e.to,from:e.from||"",roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType,type:"img",url:e.url,width:e.width,height:e.height,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,file_length:e.file_length,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,thumbnailWidth:e.thumbnailWidth,thumbnailHeight:e.thumbnailHeight}},e}(),p=function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&r.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"audio",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType,type:"audio",filename:e.filename,length:e.length,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,file_length:e.file_length,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),f=function(){function e(e){var t=e.type,n=e.id;this.id=n,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&r.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),apiUrl:e.apiUrl,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),h=function(){function e(e){var t=e.type,n=e.id;this.id=n,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&r.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,file_length:e.file_length,to:e.to,from:e.from||"",ext:e.ext,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),_=function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t,this.value=""}return e.create=function(e){return{type:"combine",id:r.P6.getUniqueId(),to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,compatibleText:e.compatibleText,title:e.title,summary:e.summary,messageList:e.messageList,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete}},e}(),E=function(){function e(t,n){return this.type=t,this.id=n||r.P6.getUniqueId(),e.createOldMsg({type:t,id:this.id})}return e.createOldMsg=function(e){switch(e.type){case"read":return new o({type:"read",id:e.id});case"delivery":return new i({type:"delivery",id:e.id});case"channel":return new s({type:"channel",id:e.id});case"txt":return new a({type:"txt",id:e.id});case"cmd":return new u({type:"cmd",id:e.id});case"custom":return new c({type:"custom",id:e.id});case"loc":return new l({type:"loc",id:e.id});case"img":return new d({type:"img",id:e.id});case"audio":return new p({type:"audio",id:e.id});case"video":return new f({type:"video",id:e.id});case"file":return new h({type:"file",id:e.id})}},e.create=function(e){return"txt"!==(t=e).type||"version"in t?function(e){return"img"===e.type&&!("version"in e)}(e)?d.create(e):function(e){return"cmd"===e.type&&!("version"in e)}(e)?u.create(e):function(e){return"file"===e.type&&!("version"in e)}(e)?h.create(e):function(e){return"audio"===e.type&&!("version"in e)}(e)?p.create(e):function(e){return"video"===e.type&&!("version"in e)}(e)?f.create(e):function(e){return"custom"===e.type&&!("version"in e)}(e)?c.create(e):function(e){return"loc"===e.type&&!("version"in e)}(e)?l.create(e):function(e){return"channel"===e.type&&!("version"in e)}(e)?s.create(e):function(e){return"delivery"===e.type&&!("version"in e)}(e)?i.create(e):function(e){return"read"===e.type&&!("version"in e)}(e)?o.create(e):function(e){return"combine"===e.type&&!("version"in e)}(e)?_.create(e):{}:a.create(e);var t},e.prototype.set=function(e){},e.getFileUrl=r.P6.getFileUrl,e}()},5531:function(e,t,n){"use strict";var r;n.d(t,{E:function(){return r}}),function(e){e[e.REQUEST_SUCCESS=0]="REQUEST_SUCCESS",e[e.REQUEST_TIMEOUT=-1]="REQUEST_TIMEOUT",e[e.REQUEST_UNKNOWN=-2]="REQUEST_UNKNOWN",e[e.REQUEST_PARAMETER_ERROR=-3]="REQUEST_PARAMETER_ERROR",e[e.REQUEST_ABORT=-4]="REQUEST_ABORT",e[e.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR=0]="WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_OPEN_ERROR=1]="WEBIM_CONNCTION_OPEN_ERROR",e[e.WEBIM_CONNCTION_AUTH_ERROR=2]="WEBIM_CONNCTION_AUTH_ERROR",e[e.WEBIM_CONNCTION_OPEN_USERGRID_ERROR=3]="WEBIM_CONNCTION_OPEN_USERGRID_ERROR",e[e.WEBIM_CONNCTION_ATTACH_ERROR=4]="WEBIM_CONNCTION_ATTACH_ERROR",e[e.WEBIM_CONNCTION_ATTACH_USERGRID_ERROR=5]="WEBIM_CONNCTION_ATTACH_USERGRID_ERROR",e[e.WEBIM_CONNCTION_REOPEN_ERROR=6]="WEBIM_CONNCTION_REOPEN_ERROR",e[e.WEBIM_CONNCTION_SERVER_CLOSE_ERROR=7]="WEBIM_CONNCTION_SERVER_CLOSE_ERROR",e[e.WEBIM_CONNCTION_SERVER_ERROR=8]="WEBIM_CONNCTION_SERVER_ERROR",e[e.WEBIM_CONNCTION_IQ_ERROR=9]="WEBIM_CONNCTION_IQ_ERROR",e[e.WEBIM_CONNCTION_PING_ERROR=10]="WEBIM_CONNCTION_PING_ERROR",e[e.WEBIM_CONNCTION_NOTIFYVERSION_ERROR=11]="WEBIM_CONNCTION_NOTIFYVERSION_ERROR",e[e.WEBIM_CONNCTION_GETROSTER_ERROR=12]="WEBIM_CONNCTION_GETROSTER_ERROR",e[e.WEBIM_CONNCTION_CROSSDOMAIN_ERROR=13]="WEBIM_CONNCTION_CROSSDOMAIN_ERROR",e[e.WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES=14]="WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES",e[e.WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR=15]="WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR",e[e.WEBIM_CONNCTION_DISCONNECTED=16]="WEBIM_CONNCTION_DISCONNECTED",e[e.WEBIM_CONNCTION_AJAX_ERROR=17]="WEBIM_CONNCTION_AJAX_ERROR",e[e.WEBIM_CONNCTION_JOINROOM_ERROR=18]="WEBIM_CONNCTION_JOINROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOM_ERROR=19]="WEBIM_CONNCTION_GETROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOMINFO_ERROR=20]="WEBIM_CONNCTION_GETROOMINFO_ERROR",e[e.WEBIM_CONNCTION_GETROOMMEMBER_ERROR=21]="WEBIM_CONNCTION_GETROOMMEMBER_ERROR",e[e.WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR=22]="WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR",e[e.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR=23]="WEBIM_CONNCTION_LOAD_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR=24]="WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_JOINCHATROOM_ERROR=25]="WEBIM_CONNCTION_JOINCHATROOM_ERROR",e[e.WEBIM_CONNCTION_QUITCHATROOM_ERROR=26]="WEBIM_CONNCTION_QUITCHATROOM_ERROR",e[e.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR=27]="WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR=28]="WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR=29]="WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR=30]="WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_CALLBACK_INNER_ERROR=31]="WEBIM_CONNCTION_CALLBACK_INNER_ERROR",e[e.WEBIM_CONNCTION_CLIENT_OFFLINE=32]="WEBIM_CONNCTION_CLIENT_OFFLINE",e[e.WEBIM_CONNCTION_CLIENT_LOGOUT=33]="WEBIM_CONNCTION_CLIENT_LOGOUT",e[e.WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR=34]="WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR",e[e.WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP=35]="WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP=36]="WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_ACCEPT_JOIN_GROUP=37]="WEBIM_CONNECTION_ACCEPT_JOIN_GROUP",e[e.WEBIM_CONNECTION_DECLINE_JOIN_GROUP=38]="WEBIM_CONNECTION_DECLINE_JOIN_GROUP",e[e.WEBIM_CONNECTION_CLOSED=39]="WEBIM_CONNECTION_CLOSED",e[e.WEBIM_CONNECTION_ERROR=40]="WEBIM_CONNECTION_ERROR",e[e.MAX_LIMIT=50]="MAX_LIMIT",e[e.MESSAGE_NOT_FOUND=51]="MESSAGE_NOT_FOUND",e[e.NO_PERMISSION=52]="NO_PERMISSION",e[e.OPERATION_UNSUPPORTED=53]="OPERATION_UNSUPPORTED",e[e.OPERATION_NOT_ALLOWED=54]="OPERATION_NOT_ALLOWED",e[e.WEBIM_TOKEN_EXPIRED=56]="WEBIM_TOKEN_EXPIRED",e[e.WEBIM_SERVER_SERVING_DISABLED=57]="WEBIM_SERVER_SERVING_DISABLED",e[e.WEBIM_UPLOADFILE_BROWSER_ERROR=100]="WEBIM_UPLOADFILE_BROWSER_ERROR",e[e.WEBIM_UPLOADFILE_ERROR=101]="WEBIM_UPLOADFILE_ERROR",e[e.WEBIM_UPLOADFILE_NO_LOGIN=102]="WEBIM_UPLOADFILE_NO_LOGIN",e[e.WEBIM_UPLOADFILE_NO_FILE=103]="WEBIM_UPLOADFILE_NO_FILE",e[e.WEBIM_DOWNLOADFILE_ERROR=200]="WEBIM_DOWNLOADFILE_ERROR",e[e.WEBIM_DOWNLOADFILE_NO_LOGIN=201]="WEBIM_DOWNLOADFILE_NO_LOGIN",e[e.WEBIM_DOWNLOADFILE_BROWSER_ERROR=202]="WEBIM_DOWNLOADFILE_BROWSER_ERROR",e[e.PARSE_FILE_ERROR=203]="PARSE_FILE_ERROR",e[e.USER_NOT_FOUND=204]="USER_NOT_FOUND",e[e.MESSAGE_PARAMETER_ERROR=205]="MESSAGE_PARAMETER_ERROR",e[e.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE=206]="WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE",e[e.WEBIM_CONNCTION_USER_REMOVED=207]="WEBIM_CONNCTION_USER_REMOVED",e[e.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD=216]="WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD",e[e.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE=217]="WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE",e[e.USER_MUTED_BY_ADMIN=219]="USER_MUTED_BY_ADMIN",e[e.USER_NOT_FRIEND=221]="USER_NOT_FRIEND",e[e.WEBIM_MESSAGE_REC_TEXT=300]="WEBIM_MESSAGE_REC_TEXT",e[e.WEBIM_MESSAGE_REC_TEXT_ERROR=301]="WEBIM_MESSAGE_REC_TEXT_ERROR",e[e.WEBIM_MESSAGE_REC_EMOTION=302]="WEBIM_MESSAGE_REC_EMOTION",e[e.WEBIM_MESSAGE_REC_PHOTO=303]="WEBIM_MESSAGE_REC_PHOTO",e[e.SERVER_GET_DNSLIST_FAILED=304]="SERVER_GET_DNSLIST_FAILED",e[e.WEBIM_MESSAGE_REC_AUDIO_FILE=305]="WEBIM_MESSAGE_REC_AUDIO_FILE",e[e.WEBIM_MESSAGE_REC_VEDIO=306]="WEBIM_MESSAGE_REC_VEDIO",e[e.WEBIM_MESSAGE_REC_VEDIO_FILE=307]="WEBIM_MESSAGE_REC_VEDIO_FILE",e[e.WEBIM_MESSAGE_REC_FILE=308]="WEBIM_MESSAGE_REC_FILE",e[e.WEBIM_MESSAGE_SED_TEXT=309]="WEBIM_MESSAGE_SED_TEXT",e[e.WEBIM_MESSAGE_SED_EMOTION=310]="WEBIM_MESSAGE_SED_EMOTION",e[e.WEBIM_MESSAGE_SED_PHOTO=311]="WEBIM_MESSAGE_SED_PHOTO",e[e.WEBIM_MESSAGE_SED_AUDIO=312]="WEBIM_MESSAGE_SED_AUDIO",e[e.WEBIM_MESSAGE_SED_AUDIO_FILE=313]="WEBIM_MESSAGE_SED_AUDIO_FILE",e[e.WEBIM_MESSAGE_SED_VEDIO=314]="WEBIM_MESSAGE_SED_VEDIO",e[e.WEBIM_MESSAGE_SED_VEDIO_FILE=315]="WEBIM_MESSAGE_SED_VEDIO_FILE",e[e.WEBIM_MESSAGE_SED_FILE=316]="WEBIM_MESSAGE_SED_FILE",e[e.WEBIM_MESSAGE_SED_ERROR=317]="WEBIM_MESSAGE_SED_ERROR",e[e.STATUS_INIT=400]="STATUS_INIT",e[e.STATUS_DOLOGIN_USERGRID=401]="STATUS_DOLOGIN_USERGRID",e[e.STATUS_DOLOGIN_IM=402]="STATUS_DOLOGIN_IM",e[e.STATUS_OPENED=403]="STATUS_OPENED",e[e.STATUS_CLOSING=404]="STATUS_CLOSING",e[e.STATUS_CLOSED=405]="STATUS_CLOSED",e[e.STATUS_ERROR=406]="STATUS_ERROR",e[e.SERVER_BUSY=500]="SERVER_BUSY",e[e.MESSAGE_INCLUDE_ILLEGAL_CONTENT=501]="MESSAGE_INCLUDE_ILLEGAL_CONTENT",e[e.MESSAGE_EXTERNAL_LOGIC_BLOCKED=502]="MESSAGE_EXTERNAL_LOGIC_BLOCKED",e[e.SERVER_UNKNOWN_ERROR=503]="SERVER_UNKNOWN_ERROR",e[e.MESSAGE_RECALL_TIME_LIMIT=504]="MESSAGE_RECALL_TIME_LIMIT",e[e.SERVICE_NOT_ENABLED=505]="SERVICE_NOT_ENABLED",e[e.SERVICE_NOT_ALLOW_MESSAGING=506]="SERVICE_NOT_ALLOW_MESSAGING",e[e.SERVICE_NOT_ALLOW_MESSAGING_MUTE=507]="SERVICE_NOT_ALLOW_MESSAGING_MUTE",e[e.MESSAGE_MODERATION_BLOCKED=508]="MESSAGE_MODERATION_BLOCKED",e[e.MESSAGE_CURRENT_LIMITING=509]="MESSAGE_CURRENT_LIMITING",e[e.MESSAGE_WEBSOCKET_DISCONNECTED=510]="MESSAGE_WEBSOCKET_DISCONNECTED",e[e.MESSAGE_SIZE_LIMIT=511]="MESSAGE_SIZE_LIMIT",e[e.GROUP_NOT_EXIST=605]="GROUP_NOT_EXIST",e[e.GROUP_NOT_JOINED=602]="GROUP_NOT_JOINED",e[e.GROUP_MEMBERS_FULL=606]="GROUP_MEMBERS_FULL",e[e.PERMISSION_DENIED=603]="PERMISSION_DENIED",e[e.WEBIM_LOAD_MSG_ERROR=604]="WEBIM_LOAD_MSG_ERROR",e[e.GROUP_ALREADY_JOINED=601]="GROUP_ALREADY_JOINED",e[e.GROUP_MEMBERS_LIMIT=607]="GROUP_MEMBERS_LIMIT",e[e.GROUP_IS_DISABLED=608]="GROUP_IS_DISABLED",e[e.GROUP_MEMBER_ATTRIBUTES_SET_FAILED=609]="GROUP_MEMBER_ATTRIBUTES_SET_FAILED",e[e.REST_PARAMS_STATUS=700]="REST_PARAMS_STATUS",e[e.CHATROOM_NOT_JOINED=702]="CHATROOM_NOT_JOINED",e[e.CHATROOM_MEMBERS_FULL=704]="CHATROOM_MEMBERS_FULL",e[e.CHATROOM_NOT_EXIST=705]="CHATROOM_NOT_EXIST",e[e.LOCAL_DB_OPERATION_FAILED=800]="LOCAL_DB_OPERATION_FAILED",e[e.SDK_RUNTIME_ERROR=999]="SDK_RUNTIME_ERROR",e[e.PRESENCE_PARAM_EXCEED=1100]="PRESENCE_PARAM_EXCEED",e[e.REACTION_ALREADY_ADDED=1101]="REACTION_ALREADY_ADDED",e[e.REACTION_CREATING=1102]="REACTION_CREATING",e[e.REACTION_OPERATION_IS_ILLEGAL=1103]="REACTION_OPERATION_IS_ILLEGAL",e[e.TRANSLATION_NOT_VALID=1200]="TRANSLATION_NOT_VALID",e[e.TRANSLATION_TEXT_TOO_LONG=1201]="TRANSLATION_TEXT_TOO_LONG",e[e.TRANSLATION_FAILED=1204]="TRANSLATION_FAILED",e[e.THREAD_NOT_EXIST=1300]="THREAD_NOT_EXIST",e[e.THREAD_ALREADY_EXIST=1301]="THREAD_ALREADY_EXIST",e[e.MODIFY_MESSAGE_NOT_EXIST=1302]="MODIFY_MESSAGE_NOT_EXIST",e[e.MODIFY_MESSAGE_FORMAT_ERROR=1303]="MODIFY_MESSAGE_FORMAT_ERROR",e[e.MODIFY_MESSAGE_FAILED=1304]="MODIFY_MESSAGE_FAILED",e[e.CONVERSATION_NOT_EXIST=1400]="CONVERSATION_NOT_EXIST"}(r||(r={}))},4998:function(e,t,n){"use strict";var r;n.d(t,{a:function(){return r}}),n(7252),function(e){e[e.SYNC_INIT=0]="SYNC_INIT",e[e.SYNC_START=1]="SYNC_START",e[e.SYNC_FINISH=2]="SYNC_FINISH"}(r||(r={}))},9937:function(e,t,n){"use strict";var r;n.d(t,{Z:function(){return r}}),function(e){e[e.mark_0=0]="mark_0",e[e.mark_1=1]="mark_1",e[e.mark_2=2]="mark_2",e[e.mark_3=3]="mark_3",e[e.mark_4=4]="mark_4",e[e.mark_5=5]="mark_5",e[e.mark_6=6]="mark_6",e[e.mark_7=7]="mark_7",e[e.mark_8=8]="mark_8",e[e.mark_9=9]="mark_9",e[e.mark_10=10]="mark_10",e[e.mark_11=11]="mark_11",e[e.mark_12=12]="mark_12",e[e.mark_13=13]="mark_13",e[e.mark_14=14]="mark_14",e[e.mark_15=15]="mark_15",e[e.mark_16=16]="mark_16",e[e.mark_17=17]="mark_17",e[e.mark_18=18]="mark_18",e[e.mark_19=19]="mark_19"}(r||(r={}))},4024:function(e,t,n){"use strict";n.d(t,{PU:function(){return T},iw:function(){return b},hj:function(){return R},LR:function(){return P},Ki:function(){return C},Og:function(){return M},P4:function(){return A},cT:function(){return U},P6:function(){return D}}),n(9601),n(1539),n(8674),n(3710),n(7941),n(6699),n(7042),n(2772),n(9714),n(9653),n(6992),n(8783),n(3948),n(285),n(1637),n(8309),n(4986),n(2222),n(4916),n(2564);var r=n(5531),o=(n(2023),function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)}),i=function(e,t,n,i){var s,a,u,c,l,d,p,f,h,_,E,v,g,m,y,O,T,R,I,S,C,N,b,A,M=e.response;M&&"string"==typeof M&&(M=JSON.parse(M));var w=e.status,L={elapse:i,httpCode:w,errDesc:null==M?void 0:M.error_description};if(400===w){if(40002===M.error_code)return void t({type:r.E.THREAD_ALREADY_EXIST,message:null==M?void 0:M.error_description,extraInfo:L});if(40009===M.error_code)return void t({type:r.E.OPERATION_UNSUPPORTED,message:null==M?void 0:M.error_description,extraInfo:L});if(60005===M.error_code)return void t({type:r.E.GROUP_MEMBER_ATTRIBUTES_SET_FAILED,message:(null==M?void 0:M.desc)||(null==M?void 0:M.error_description),extraInfo:L});if(60010===M.error_code)return void((null==M?void 0:M.error_description.includes("exceeds chatgroup user metadata single value limit"))?t({type:r.E.MAX_LIMIT,message:(null==M?void 0:M.desc)||M.error_description,extraInfo:L}):t({type:r.E.NO_PERMISSION,message:(null==M?void 0:M.desc)||M.error_description,extraInfo:L}));if(60011===M.error_code)return void t({type:r.E.CHATROOM_NOT_JOINED,message:null==M?void 0:M.desc,extraInfo:L});if(14403===M.error_code)return void t({type:r.E.WEBIM_UPLOADFILE_ERROR,message:null==M?void 0:M.error_description,data:M,extraInfo:L});if(60006===M.error_code||60007===M.error_code||60009===M.error_code||60012===M.error_code)return void t({type:r.E.MAX_LIMIT,message:(null==M?void 0:M.desc)||(null==M?void 0:M.error_description),extraInfo:L});if(91104===M.error_code)return void t({type:r.E.NO_PERMISSION,message:null==M?void 0:M.error_description,extraInfo:L});if(null===(s=M.error_description)||void 0===s?void 0:s.includes("are not members of this group"))return(null===(a=e.responseURL)||void 0===a?void 0:a.includes("chatgroups"))?t({type:r.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):t({type:r.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:L}),void n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==M?void 0:M.error_description,data:e.responseText,extraInfo:L});if("the app not open presence"===(null==M?void 0:M.result))return void t({type:r.E.SERVICE_NOT_ENABLED,message:null==M?void 0:M.result,extraInfo:L});if(null==M?void 0:M.error_description.includes("remark length must less"))return void t({type:r.E.MAX_LIMIT,message:null==M?void 0:M.error_description,extraInfo:L});switch(null==M?void 0:M.error_description){case"the user is already operation this message":t({type:r.E.REACTION_ALREADY_ADDED,message:null==M?void 0:M.error_description,extraInfo:L});break;case"The quantity has exceeded the limit!":t({type:r.E.MAX_LIMIT,message:null==M?void 0:M.error_description,extraInfo:L});break;case"The user not in this group!":t({type:r.E.GROUP_NOT_JOINED,message:null==M?void 0:M.error_description,extraInfo:L});break;case"the user operation is illegal!":t({type:r.E.REACTION_OPERATION_IS_ILLEGAL,message:null==M?void 0:M.error_description,extraInfo:L});break;case"this appKey is not open reaction service!":case"this appKey not open message roaming":t({type:r.E.SERVICE_NOT_ENABLED,message:null==M?void 0:M.error_description,extraInfo:L});break;case"this message is creating reaction, please try again.":t({type:r.E.REACTION_CREATING,message:null==M?void 0:M.error_description,extraInfo:L});break;case"groupId can not be null!":t({type:r.E.GROUP_NOT_EXIST,message:null==M?void 0:M.error_description,extraInfo:L});break;case"The input text is too long.":t({type:r.E.TRANSLATION_TEXT_TOO_LONG,message:null==M?void 0:M.error_description,extraInfo:L});break;case"The target language is not valid.":t({type:r.E.TRANSLATION_NOT_VALID,message:null==M?void 0:M.error_description,extraInfo:L});break;case"report failed, get message by id failed":t({type:r.E.MESSAGE_NOT_FOUND,message:null==M?void 0:M.error_description,extraInfo:L});break;case"ext is too big ":t({type:r.E.PRESENCE_PARAM_EXCEED,message:null==M?void 0:M.error_description,extraInfo:L});break;case"Request body not readable.Please check content type is correct!":case"param mark must be not empty, please check!":case"param mark illegal, please check it!":case"param pin_msg_id illegal, please check it!":t({type:r.E.REQUEST_PARAMETER_ERROR,message:null==M?void 0:M.error_description,extraInfo:L});break;case"updateRemark | they are not friends, please add as a friend first.":t({type:r.E.USER_NOT_FRIEND,message:null==M?void 0:M.error_description,extraInfo:L});break;default:t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==M?void 0:M.error_description,data:e.responseText,extraInfo:L}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==M?void 0:M.error_description,data:e.responseText,extraInfo:L})}}else if(401===w)40001===M.error_code||60001===M.error_code||"Unable to authenticate (OAuth)"===M.error_description?t({type:r.E.NO_PERMISSION,message:null==M?void 0:M.error_description,extraInfo:L}):(n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:L}),t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:L}));else if(403===w)4e4===M.error_code||60004===M.error_code||15002===M.error_code?t({type:r.E.SERVICE_NOT_ENABLED,message:null==M?void 0:M.error_description,extraInfo:L}):40003===M.error_code||40004===M.error_code?t({type:r.E.THREAD_ALREADY_EXIST,message:null==M?void 0:M.error_description,extraInfo:L}):40005===M.error_code||40007===M.error_code||91002===M.error_code?t({type:r.E.MAX_LIMIT,message:null==M?void 0:M.error_description,extraInfo:L}):60002===M.error_code?t({type:r.E.PERMISSION_DENIED,message:null==M?void 0:M.error_description,extraInfo:L}):91101===M.error_code?t({type:r.E.MAX_LIMIT,message:null==M?void 0:M.error_description,extraInfo:L}):91102===M.error_code&&t({type:r.E.REQUEST_PARAMETER_ERROR,message:M.error_description,extraInfo:L}),"group member list is full!"===M.error_description?(null===(u=e.responseURL)||void 0===u?void 0:u.includes("chatgroups"))?t({type:r.E.GROUP_MEMBERS_FULL,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):t({type:r.E.CHATROOM_MEMBERS_FULL,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):(null===(c=M.error_description)||void 0===c?void 0:c.includes(M.error_description.includes("already in group")))?(null===(l=e.responseURL)||void 0===l?void 0:l.includes("chatgroups"))&&t({type:r.E.GROUP_ALREADY_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):(null===(d=M.error_description)||void 0===d?void 0:d.includes("are not members of this group"))?(null===(p=e.responseURL)||void 0===p?void 0:p.includes("chatgroups"))?t({type:r.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):t({type:r.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):(null===(f=M.error_description)||void 0===f?void 0:f.includes("service not open!"))||(null===(h=M.error_description)||void 0===h?void 0:h.includes("message report not open"))||(null===(_=M.error_description)||void 0===_?void 0:_.includes("messageroaming function not open"))?t({type:r.E.SERVICE_NOT_ENABLED,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):(null===(E=M.error_description)||void 0===E?void 0:E.includes("members size is greater than max user size !"))?t({type:r.E.GROUP_MEMBERS_LIMIT,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):(null===(v=M.error_description)||void 0===v?void 0:v.includes("can not operate this group, reason: group is disabled"))?t({type:r.E.GROUP_IS_DISABLED,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):(null===(g=M.error_description)||void 0===g?void 0:g.includes("Invitee's contact max count"))||(null===(m=M.error_description)||void 0===m?void 0:m.includes("Inviter's contact max count"))?t({type:r.E.MAX_LIMIT,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):t({type:r.E.PERMISSION_DENIED,data:e.response||e.responseText,message:"permission denied",extraInfo:o(o({},L),{errDesc:"permission denied"})}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:L});else if(404===w)40011===M.error_code?t({type:r.E.THREAD_NOT_EXIST,message:null==M?void 0:M.error_description,extraInfo:L}):40012===M.error_code?t({type:r.E.NO_PERMISSION,message:null==M?void 0:M.error_description,extraInfo:L}):60003===M.error_code||20004===M.error_code?t({type:r.E.GROUP_NOT_JOINED,message:null==M?void 0:M.error_description,extraInfo:L}):91001===M.error_code&&t({type:r.E.CONVERSATION_NOT_EXIST,message:null==M?void 0:M.error_description,extraInfo:L}),(null===(y=M.error_description)||void 0===y?void 0:y.includes("do not find this group"))||(null===(O=M.error_description)||void 0===O?void 0:O.includes("does not exist"))?(null===(T=e.responseURL)||void 0===T?void 0:T.includes("chatgroups"))?t({type:r.E.GROUP_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:o(o({},L),{errDesc:"The chat room dose not exist."})}):t({type:r.E.CHATROOM_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:o(o({},L),{errDesc:"The chat room dose not exist."})}):(null===(R=M.error_description)||void 0===R?void 0:R.includes("username"))&&(null===(I=M.error_description)||void 0===I?void 0:I.includes("doesn't exist!'"))||(null===(S=M.error_description)||void 0===S?void 0:S.includes("user not found"))||(null===(C=M.error_description)||void 0===C?void 0:C.includes("Service resource not found"))&&"UserNotFoundException"===(null==M?void 0:M.exception)?t({type:r.E.USER_NOT_FOUND,data:e.response||e.responseText,message:M.error_description,extraInfo:L}):M.error_description.includes("user session pin message not exist")?t({type:r.E.MESSAGE_NOT_FOUND,message:M.error_description,extraInfo:L}):t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:L}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:L});else if(406===w)90004===M.error_code&&t({type:r.E.OPERATION_NOT_ALLOWED,message:null==M?void 0:M.error_description,extraInfo:L});else if(429===w||503===w){if(null===(N=M.error_description)||void 0===N?void 0:N.includes("The request has reached the maximum limit"))return void t({type:r.E.MAX_LIMIT,message:e.responseText,extraInfo:L});if(null===(b=M.error_description)||void 0===b?void 0:b.includes("upload client logs reached limit"))return void t({type:r.E.MAX_LIMIT,message:e.responseText});t({type:r.E.SERVER_BUSY,data:e.response||e.responseText,message:"Server is busy.",extraInfo:o(o({},L),{errDesc:"Server is busy."})}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"Server is busy.",extraInfo:o(o({},L),{errDesc:"Server is busy."})})}else if(500===w){if(40006===M.error_code||40008===M.error_code||40010===M.error_code)return void t({type:r.E.SERVER_UNKNOWN_ERROR,message:null==M?void 0:M.error_description,extraInfo:L});if(90005===M.error_code||99999===M.error_code)return void t({type:r.E.REQUEST_UNKNOWN,message:null==M?void 0:M.error_description,extraInfo:L});if(null===(A=M.error_description)||void 0===A?void 0:A.includes("translte failed!"))return void t({type:r.E.TRANSLATION_FAILED,message:e.responseText,extraInfo:L});t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:L}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:L})}else t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:o(o({},L),{errDesc:"ajax error"})}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:o(o({},L),{errDesc:"ajax error"})})},s=n(1595),a=n(2071),u=n(7360),c=5242880,l=5242880,d={size:0},p=(n(2526),n(1817),n(2165),n(5827),n(4553),n(561),function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)});function f(){var e=this.context,t=e.orgName,n=e.appName,r=e.accessToken,o={url:"".concat(this.apiUrl,"/").concat(t,"/").concat(n,"/sdk/chatfiles/part-upload"),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+r}};return u.kg.debug("Call multipartInit"),R.call(this,o,s.fI.SDK_INTERNAL).then((function(e){var t=e.entities[0];return{data:{fileMaxSize:t.file_upper_limit,partMinSize:t.part_lower_limit,uuid:t.uuid},extraInfo:e.extraInfo,type:e.type}}))}function h(e){var t=this;return new Promise((function(n,o){var i,s,a=(new Date).getTime(),c=t.context,l=c.orgName,d=c.appName,f=c.accessToken,h=e.uuid,_=e.partNumber,E=e.part,v=e.onProgress,g="".concat(t.apiUrl,"/").concat(l,"/").concat(d,"/sdk/chatfiles/part-upload/").concat(h),m=new XMLHttpRequest;u.kg.debug("Call multipartUpload"),m.upload&&(null===(s=(i=m.upload).addEventListener)||void 0===s||s.call(i,"progress",(function(e){null==v||v(e)}),!1)),m.addEventListener("abort",(function(){o({type:r.E.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:m,extraInfo:{elapse:(new Date).getTime()-a,httpCode:m.status||-1,errDesc:"Request Abort",url:g}})}),!1),m.addEventListener("error",(function(){o({type:r.E.WEBIM_UPLOADFILE_ERROR,data:m,extraInfo:{elapse:(new Date).getTime()-a,httpCode:m.status||-1,errDesc:"request error",url:g}})}),!1),m.addEventListener("load",(function(){try{var e=JSON.parse(m.responseText);if(200!==m.status)return o({type:r.E.WEBIM_UPLOADFILE_ERROR,data:e,extraInfo:{elapse:(new Date).getTime()-a,httpCode:m.status||-1,errDesc:"part upload failed",url:g}}),!1;try{n(p(p({},e),{extraInfo:{elapse:(new Date).getTime()-a,httpCode:m.status||-1,url:g}}))}catch(e){o({type:r.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:e,extraInfo:{elapse:(new Date).getTime()-a,httpCode:m.status||-1,errDesc:"part upload failed",url:g}})}}catch(e){o({type:r.E.WEBIM_UPLOADFILE_ERROR,data:m.responseText,extraInfo:{elapse:(new Date).getTime()-a,httpCode:m.status||-1,errDesc:"part upload failed",url:g}})}}),!1);var y=new FormData;y.append("part_file",E),y.append("part_number",_),m.open("PUT",g),m.setRequestHeader("restrict-access","true"),m.setRequestHeader("Accept","*/*"),m.setRequestHeader("Authorization","Bearer "+f),m.send(y)}))}function _(e){var t=e.uuid,n=e.thumbnailHeight,r=e.thumbnailWidth,o=this.context,i=o.orgName,a=o.appName,c=o.accessToken,l="".concat(this.apiUrl,"/").concat(i,"/").concat(a,"/sdk/chatfiles/part-upload/").concat(t,"?restrict-access=true");r&&(l+="&thumbnail-width=".concat(r)),n&&(l+="&thumbnail-height=".concat(n));var d={url:l,dataType:"json",type:"POST",headers:{Authorization:"Bearer "+c}};return u.kg.debug("Call multipartComplete"),R.call(this,d,s.fI.SDK_INTERNAL)}function E(e){var t=e.uuid,n=this.context,r=n.orgName,o=n.appName,i=n.accessToken,a={url:"".concat(this.apiUrl,"/").concat(r,"/").concat(o,"/sdk/chatfiles/part-upload/").concat(t),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+i}};return u.kg.debug("Call multipartAbort"),R.call(this,a,s.fI.SDK_INTERNAL)}var v=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},g=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},m=function(){function e(e,t){var n=this;this.handleUploadProgress=function(e,t){var r,o;if(e.total){n.progressArr[t]=e.loaded;var i=n.progressArr.reduce((function(e,t){return e+t}),0);null===(o=(r=n.options).onFileUploadProgress)||void 0===o||o.call(r,{isTrusted:e.isTrusted,type:e.type,loaded:i>n.file.size?n.file.size:i,total:n.file.size,lengthComputable:e.lengthComputable})}},this.uuid="",this.pool=[],this.progressArr=[],this.connection=e,this.options=t,this.partSize=c,this.file=t.file,this.init(),this.rpt=this.connection.dataReport.geOperateFun({operationName:s.fI.REST_UPLOAD_FILE_IN_PARTS})}return e.prototype.init=function(){var e,t,n,o;return v(this,void 0,void 0,(function(){var i,a,l,p,h,_,E,v,m,y,O,T,R,I,S;return g(this,(function(g){switch(g.label){case 0:return g.trys.push([0,4,,6]),[4,f.call(this.connection)];case 1:return i=g.sent(),a=i.data||{},l=a.fileMaxSize,p=void 0===l?0:l,h=a.partMinSize,_=void 0===h?c:h,E=a.uuid,v=void 0===E?"":E,m=i.extraInfo,T=m.elapse,R=m.httpCode,S=m.url,this.partSize=_,this.uuid=v,d.size=_,u.kg.debug("multipartInit success","uuid: ".concat(v),"fileMaxSize: ".concat(p),"partMinSize: ".concat(_)),this.file.size>p?[4,this.multipartAbort()]:[3,3];case 2:return g.sent(),null===(t=(e=this.options).onFileUploadError)||void 0===t||t.call(e,{code:r.E.WEBIM_UPLOADFILE_ERROR,message:"The file size exceeds the maximum limit"}),[2];case 3:return this.rpt({data:{requestUrl:S,requestName:s.c.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:T,requestMethod:"POST",isSuccess:1,code:R}}),this.upload(),[3,6];case 4:return y=g.sent(),O=(null==y?void 0:y.extraInfo)||{},T=O.elapse,R=O.httpCode,I=O.errDesc,S=O.url,this.rpt({data:{requestUrl:S,requestName:s.c.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:T,requestMethod:"POST",isSuccess:0,codeDesc:I,code:R}}),[4,this.multipartAbort()];case 5:return g.sent(),null===(o=null===(n=this.options)||void 0===n?void 0:n.onInitFail)||void 0===o||o.call(n),[3,6];case 6:return[2]}}))}))},e.prototype.upload=function(){var e,t,n;return v(this,void 0,void 0,(function(){var r,o,i,a,u,c,l=this;return g(this,(function(d){switch(d.label){case 0:(new FileReader).readAsArrayBuffer(this.file),r=this.file.size,o=Math.ceil(r/this.partSize),d.label=1;case 1:d.trys.push([1,7,,9]),i=function(t){var n,o,i,u;return g(this,(function(c){switch(c.label){case 0:return n=t*a.partSize,o=Math.min(r,n+a.partSize),i=null===(e=a.file)||void 0===e?void 0:e.slice(n,o),(u=h.call(a.connection,{uuid:a.uuid,partNumber:"".concat(t+1),part:i,onProgress:function(e){l.handleUploadProgress(e,t)}})).then((function(e){var t=(null==e?void 0:e.extraInfo)||{},n=t.elapse,r=t.httpCode,o=t.url;l.rpt({data:{requestUrl:o,requestName:s.c.REST_UPLOAD_PART,requestElapse:n,isSuccess:1,requestMethod:"PUT",code:r}}),l.handleTask(u)})),u.catch((function(e){var t=(null==e?void 0:e.extraInfo)||{},n=t.elapse,r=t.httpCode,o=t.url,i=t.errDesc;l.rpt({data:{requestUrl:o,requestName:s.c.REST_UPLOAD_PART,requestElapse:n,isSuccess:0,requestMethod:"PUT",code:r,codeDesc:i}}),delete e.extraInfo})),a.pool.push(u),4!==a.pool.length?[3,2]:[4,Promise.race(a.pool)];case 1:c.sent(),c.label=2;case 2:return[2]}}))},a=this,u=0,d.label=2;case 2:return u<o?[5,i(u)]:[3,5];case 3:d.sent(),d.label=4;case 4:return u++,[3,2];case 5:return[4,Promise.all(this.pool)];case 6:return d.sent(),this.multipartComplete(),[3,9];case 7:return c=d.sent(),[4,this.multipartAbort()];case 8:return d.sent(),this.rpt({data:{isLastApi:1,isSuccess:0}}),null===(n=(t=this.options).onFileUploadError)||void 0===n||n.call(t,c),[3,9];case 9:return[2]}}))}))},e.prototype.multipartComplete=function(){var e,t,n,r;return v(this,void 0,void 0,(function(){var o,i,a,u,c,l,d,p,f,h,E;return g(this,(function(v){switch(v.label){case 0:return v.trys.push([0,2,,3]),o=this.options.thumbnailInfo||{},i=o.width,a=o.height,[4,_.call(this.connection,{uuid:this.uuid,thumbnailHeight:a,thumbnailWidth:i})];case 1:return u=v.sent(),c=(null==u?void 0:u.extraInfo)||{},p=c.elapse,f=c.httpCode,E=c.url,this.rpt({data:{requestUrl:E,requestName:s.c.REST_COMPLETE_UPLOAD_PART,requestElapse:p,requestMethod:"POST",isSuccess:1,code:f}}),this.rpt({data:{isLastApi:1,isSuccess:1}}),null===(t=(e=this.options).onFileUploadComplete)||void 0===t||t.call(e,u),[3,3];case 2:return l=v.sent(),d=(null==l?void 0:l.extraInfo)||{},p=d.elapse,f=d.httpCode,h=d.errDesc,E=d.url,this.rpt({data:{requestUrl:E,requestName:s.c.REST_COMPLETE_UPLOAD_PART,requestElapse:p,requestMethod:"POST",isSuccess:0,codeDesc:h,code:f}}),this.rpt({data:{isLastApi:1,isSuccess:0}}),null===(r=(n=this.options).onFileUploadError)||void 0===r||r.call(n,l),[3,3];case 3:return[2]}}))}))},e.prototype.multipartAbort=function(){return v(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,u;return g(this,(function(c){switch(c.label){case 0:if(!this.uuid)return[2];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,E.call(this.connection,{uuid:this.uuid})];case 2:return e=c.sent(),t=(null==e?void 0:e.extraInfo)||{},o=t.elapse,i=t.httpCode,u=t.url,this.rpt({data:{requestUrl:u,requestName:s.c.REST_ABORT_UPLOAD_PART,requestElapse:o,requestMethod:"DELETE",isSuccess:1,code:i}}),[3,4];case 3:return n=c.sent(),r=(null==n?void 0:n.extraInfo)||{},o=r.elapse,i=r.httpCode,a=r.errDesc,u=r.url,this.rpt({data:{requestUrl:u,requestName:s.c.REST_ABORT_UPLOAD_PART,requestElapse:o,requestMethod:"DELETE",isSuccess:0,codeDesc:a,code:i}}),[3,4];case 4:return[2]}}))}))},e.prototype.handleTask=function(e){var t=this.pool.findIndex((function(t){return t===e}));this.pool.splice(t,1)},e}(),y=function(e){var t,n,o=this,i=(new Date).getTime(),a=e.apiUrl,u=e.orgName,c=e.appName,l=e.operateName,d=e.accessToken,p=e.uploadUrl||"".concat(a,"/").concat(u,"/").concat(c,"/chatfiles"),f=function(t){var n=(new Date).getTime()-i;o.dataReport&&l&&[s.fI.UPLOAD_MSG_ATTACH,s.fI.UPLOAD_CHATROOM_FILE,s.fI.UPLOAD_GROUP_FILE].includes(l)&&o.dataReport.geOperateFun({operationName:l})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:l,requestElapse:n,requestUrl:p,code:(null==h?void 0:h.status)||0,codeDesc:"upload file error"}}),e.onFileUploadError&&e.onFileUploadError(t)},h=new XMLHttpRequest;h.upload&&(null===(n=(t=h.upload).addEventListener)||void 0===n||n.call(t,"progress",e.onFileUploadProgress||T,!1)),h.addEventListener("abort",e.onFileUploadCanceled||T,!1),h.addEventListener("error",(function(e){f({type:r.E.WEBIM_UPLOADFILE_ERROR,data:h})}),!1),h.addEventListener("load",(function(t){try{var n=JSON.parse(h.responseText);if(400===h.status)return f({type:r.E.WEBIM_UPLOADFILE_ERROR,data:n}),!1;try{!function(t){var n=(new Date).getTime()-i;o.dataReport&&l&&[s.fI.UPLOAD_MSG_ATTACH,s.fI.UPLOAD_CHATROOM_FILE,s.fI.UPLOAD_GROUP_FILE].includes(l)&&o.dataReport.geOperateFun({operationName:l})({isEndApi:!0,data:{isSuccess:(null==t?void 0:t.error)?0:1,requestMethod:"POST",requestName:l,requestElapse:n,requestUrl:p,code:h.status,codeDesc:(null==t?void 0:t.error_description)||""}}),e.onFileUploadComplete&&e.onFileUploadComplete(t)}(n)}catch(t){f({type:r.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:t})}}catch(t){f({type:r.E.WEBIM_UPLOADFILE_ERROR,data:h.responseText})}}),!1),h.open("POST",p),h.setRequestHeader("restrict-access","true"),h.setRequestHeader("Accept","*/*"),h.setRequestHeader("Authorization","Bearer "+d);var _=new FormData;_.append("file",e.file.data),e.thumbnailWidth&&_.append("thumbnail-width",e.thumbnailWidth+""),e.thumbnailHeight&&_.append("thumbnail-height",e.thumbnailHeight+""),h.send(_)},O=function(){return O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},O.apply(this,arguments)},T=function(){};function R(e,t){var n,o=this;return w().platform===b.WEB?new Promise((function(t,o){var s=e.dataType||"text",a=e.success||T,c=e.error||T,l=new XMLHttpRequest;l.ontimeout=function(){o({type:r.E.REQUEST_TIMEOUT,message:"Request Timeout",errorType:"timeout_error",xhr:l})},l.onerror=function(){o({type:r.E.REQUEST_UNKNOWN,message:"Request Unknow Error",errorType:"onerror",xhr:l})},l.onabort=function(){o({type:r.E.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:l})},l.onreadystatechange=function(){if(4===l.readyState){var e=(new Date).getTime()-n,d=l.status||0,p={elapse:e,httpCode:d};if(200===d){D.ajaxUnconventionalErrorTimes=0;try{switch(s){case"text":return a(l.responseText),void t(l.responseText);case"json":var f=JSON.parse(l.responseText);return f.extraInfo=p,a(f),void t(f);case"xml":return l.responseXML&&l.responseXML.documentElement?(a(l.responseXML.documentElement),void t(l.responseXML.documentElement)):(c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}),void o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}));default:c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Invalid dataType"}),o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Invalid dataType"})}return t(l.response||l.responseText),void a(l.response||l.responseText,l)}catch(e){o(e)}return}[400,401,403,404,429,500,503].includes(d)||(u.kg.debug("rest api request fail status:",d),D.ajaxUnconventionalErrorTimes++),i(l,o,c,e)}0===l.readyState&&(c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Request not initialized"}),o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Request not initialized"}))},e.responseType&&l.responseType&&(l.responseType=e.responseType),e.mimeType&&l.overrideMimeType(e.mimeType);var d=e.type||"POST",p=e.data||null,f="";if("get"===d.toLowerCase()&&p){for(var h in p)p.hasOwnProperty(h)&&(f+=h+"="+p[h]+"&");f=f?f.slice(0,-1):f,e.url+=(e.url.indexOf("?")>0?"&":"?")+(f?f+"&":f)+"_v="+(new Date).getTime(),p=null,f=""}n=(new Date).getTime(),l.open(d,e.url);var _=e.headers||{};for(var E in _["Content-Type"]||(_["Content-Type"]="application/json"),_)_.hasOwnProperty(E)&&l.setRequestHeader(E,_[E]);l.send(p)})).then((function(n){return o.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&o.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:O({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},x(n.extraInfo))}),t===s.fI.SDK_INTERNAL&&(n.extraInfo.url=e.url),t!==s.fI.SDK_INTERNAL&&delete n.extraInfo,"Object"===I(n)?O(O({},n),{type:r.E.REQUEST_SUCCESS}):{data:n,type:r.E.REQUEST_SUCCESS}})).catch((function(n){throw o.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&o.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:O({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},x(n.extraInfo))}),t===s.fI.SDK_INTERNAL&&(n.extraInfo.url=e.url),t!==s.fI.SDK_INTERNAL&&delete n.extraInfo,n})):S.call(this,e,t)}function I(e){return Object.prototype.toString.call(e).slice(8,-1)}function S(e,t){var n=this;return new Promise((function(n,r){var o=e.success||T,i=e.error||T,s=e.type||"POST",c=e.data||null,l="",d=(new Date).getTime(),p=D.getEnvInfo();if("get"===s.toLowerCase()&&c){for(var f in c)c.hasOwnProperty(f)&&(l+=f+"="+c[f]+"&");l=l?l.slice(0,-1):l,e.url+=(e.url.indexOf("?")>0?"&":"?")+(l?l+"&":l)+"_v="+(new Date).getTime(),c=null,l=""}var h={url:e.url,data:e.data,method:s,headers:{},success:function(e){var s,a,c,l,p,f={elapse:(new Date).getTime()-d,httpCode:Number((null===(s=e.statusCode)||void 0===s?void 0:s.toString())||(null===(a=e.status)||void 0===a?void 0:a.toString())),errDesc:(null===(c=null==e?void 0:e.data)||void 0===c?void 0:c.error_description)||""};if("200"===(null===(l=e.statusCode)||void 0===l?void 0:l.toString())||"200"===(null===(p=e.status)||void 0===p?void 0:p.toString())){e.data.extraInfo=f;var h=e.data;o(h),n(h)}else e.extraInfo=f,i(h=e),r(h),u.kg.debug(t,"reject reason: ",h)},complete:function(){},fail:function(e){var n={elapse:(new Date).getTime()-d,httpCode:a.Tp,errDesc:"request:fail"};e.extraInfo=n,e.data={error:"request:fail",error_description:"request:fail"},i(e),r(e),u.kg.debug(t,"fail reason:",e)}};if("zfb"===p.platform||"dd"===p.platform?h.headers=e.headers:h.header=e.headers,"dd"===p.platform)return dd.httpRequest(h);p.global.request(h)})).then((function(o){return n.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&n.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:O({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},x(o.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete o.extraInfo,"Object"===I(o)?O(O({},o),{type:r.E.REQUEST_SUCCESS}):{data:o,type:r.E.REQUEST_SUCCESS}})).catch((function(r){throw n.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&n.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:O({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},x(r.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete r.extraInfo,r}))}function C(){this.autoIncrement?this.autoIncrement++:this.autoIncrement=1;var e=new Date,t=new Date(2010,1,1);return(e.getTime()-t.getTime()+this.autoIncrement).toString()}function N(e,t){var n;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(!e)return n;n=t?e.apply(t,r):e.apply(void 0,r),e=null}}var b,A=N((function(e,t){var n=w();if(n.platform!==b.WEB){var r=n.global,o=function(n){n.isConnected?e():t()};r.offNetworkStatusChange&&r.offNetworkStatusChange(o),r.onNetworkStatusChange&&r.onNetworkStatusChange(o)}else"undefined"!=typeof addEventListener&&(window.addEventListener("online",e),window.addEventListener("offline",t))})),M=N((function(e,t){var n,r,o=w();if(o.platform===b.WEB)document&&document.addEventListener("visibilitychange",(function(){document.hidden?null==t||t():null==e||e()}),!1);else{var i=o.global;i.onAppShow&&(null===(n=i.onAppShow)||void 0===n||n.call(i,e)),i.onAppHide&&(null===(r=i.onAppHide)||void 0===r||r.call(i,t))}}));function w(){return"undefined"!=typeof swan&&L(swan)?{platform:b.BAIDU,global:swan}:"undefined"!=typeof tt&&L(tt)?{platform:b.TT,global:tt}:"undefined"!=typeof dd&&L(dd)?{platform:b.DD,global:dd}:"undefined"!=typeof my&&L(my)?{platform:b.ZFB,global:my}:"undefined"!=typeof wx&&L(wx)?{platform:b.WX,global:wx}:"undefined"!=typeof qq&&L(qq)?{platform:b.QQ,global:qq}:"undefined"!=typeof uni&&L(uni)?{platform:b.UNI,global:uni}:"undefined"!=typeof window&&window.WebSocket?{platform:b.WEB,global:window}:{platform:b.NODE,global:n.g||{}}}function L(e){for(var t=["canIUse","getSystemInfo"],n=0,r=t.length;n<r;n++)if(!e[t[n]])return!1;return!0}function U(e,t){var n,o,i,s=this,a=e.accessToken,u=e.appKey,c=null===(o=null===(n=null==e?void 0:e.file)||void 0===n?void 0:n.data)||void 0===o?void 0:o.size,p=[],f="",h="";if(a)if(u&&(p=u.split("#"),f=p[0],h=p[1]),f||h)if(c<=0)e.onFileUploadError&&e.onFileUploadError({type:r.E.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"});else if(e.uploadUrl)y.call(this,O(O({},e),{orgName:f,appName:h,operateName:t}));else{var _=d.size||l;this.uploadPartEnable&&c>1.5*_?new m(this,{file:null===(i=null==e?void 0:e.file)||void 0===i?void 0:i.data,onFileUploadProgress:e.onFileUploadProgress||T,onFileUploadComplete:e.onFileUploadComplete||T,onFileUploadError:e.onFileUploadError||T,onFileUploadCanceled:e.onFileUploadCanceled||T,onInitFail:function(){y.call(s,O(O({},e),{orgName:f,appName:h,operateName:t}))},thumbnailInfo:{width:e.thumbnailWidth,height:e.thumbnailHeight}}):y.call(this,O(O({},e),{orgName:f,appName:h,operateName:t}))}else e.onFileUploadError&&e.onFileUploadError({type:r.E.WEBIM_UPLOADFILE_ERROR,message:"AppKey illegal"});else e.onFileUploadError&&e.onFileUploadError({type:r.E.WEBIM_UPLOADFILE_NO_LOGIN,message:"AccessToken cannot be empty"})}function P(e,t){e.onFileDownloadComplete=e.onFileDownloadComplete||T,e.onFileDownloadError=e.onFileDownloadError||T;var n=(new Date).getTime(),o=new XMLHttpRequest,i=this;o.addEventListener("load",(function(r){var a=(new Date).getTime()-n;i.dataReport&&t&&t===s.fI.DOWN_GROUP_FILE&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:200===o.status?1:0,requestMethod:"POST",requestName:t,requestElapse:a,requestUrl:null==e?void 0:e.url,code:o.status,codeDesc:200===o.status?"":"download file error"}}),e.onFileDownloadComplete&&e.onFileDownloadComplete(o.response)}),!1),o.addEventListener("error",(function(a){var u=(new Date).getTime()-n;i.dataReport&&t&&t===s.fI.DOWN_GROUP_FILE&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:t,requestElapse:u,requestUrl:null==e?void 0:e.url,code:(null==o?void 0:o.status)||0,codeDesc:"download file error"}}),e.onFileDownloadError&&e.onFileDownloadError({type:r.E.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:o})}),!1);var a=e.method||"GET",u=e.responseType||"blob",c=e.mimeType||"text/plain; charset=x-user-defined";o.open(a,e.url),"undefined"!=typeof Blob?o.responseType=u:o.overrideMimeType(c);var l={"X-Requested-With":"XMLHttpRequest",Accept:"application/octet-stream","share-secret":e.secret,Authorization:"Bearer "+this.context.accessToken},d=e.headers||{};for(var p in d)l[p]=d[p];for(var p in l)l[p]&&o.setRequestHeader(p,l[p]);o.send(null)}function x(e){void 0===e&&(e={});var t=e.elapse,n=void 0===t?0:t,r=e.httpCode,o=void 0===r?0:r,i=e.errDesc;return{requestElapse:n,code:o,codeDesc:void 0===i?"":i}}!function(e){e.WEB="web",e.WX="wx",e.QQ="qq",e.ZFB="zfb",e.DD="dd",e.TT="tt",e.BAIDU="baidu",e.QUICK_APP="quick_app",e.UNI="uni",e.NODE="node"}(b||(b={}));var k="localDeviceInfo",D={autoIncrement:0,ajaxUnconventionalErrorTimes:0,ajax:R,getUniqueId:C,getFileUrl:function(e){var t={url:"",filename:"",filetype:"",data:{}},n="string"==typeof e?document.getElementById(e):e;if(window.URL.createObjectURL){if(!n.files)throw Error("this is not HTMLInputElement");var r=n.files;if(r.length>0){var o=r.item(0);t.data=o,t.url=window.URL.createObjectURL(o),t.filename=(null==o?void 0:o.name)||""}}else{if("string"!=typeof e)throw Error("in IE fileInputId must be string");o=document.getElementById(e).value,t.url=o;var i=o.lastIndexOf("/"),s=o.lastIndexOf("\\"),a=Math.max(i,s);t.filename=a<0?o:o.substring(a+1)}var u=t.filename.lastIndexOf(".");return-1!==u&&(t.filetype=t.filename.substring(u+1).toLowerCase()),t},uploadFile:U,flow:function(e){for(var t=e.length,n=t;n--;)if("function"!=typeof e[n])throw new TypeError("Expected a function");return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var o=0,i=t?e[o].apply(this,n):n[0];++o<t;)i=e[o].call(this,i);return i}},listenNetwork:A,listenBrowserVisibility:M,getEnvInfo:w,wxRequest:S,parseDownloadResponse:function(e){if(!window||!window.URL)throw Error("parseDownloadResponse can be used in broswer only");return e&&e.type&&"application/json"===e.type||0>Object.prototype.toString.call(e).indexOf("Blob")?this.url+"?token=":window.URL.createObjectURL(e)},download:P,parseNotify:function(e){for(var t="",n=0;n<e.length;n++)t+="%"+e[n].toString(16);return JSON.parse(decodeURIComponent(t))},getExtraData:x,retryPromise:function(e,t,n){return new Promise((function(r,o){!function t(i){e().then(r).catch((function(e){i>0?setTimeout((function(){t(i-1)}),n||1e3):o(e)}))}(t||3)}))},formatAttachUrl:function(e){return e&&"string"==typeof e?"".concat(this.apiUrl).concat(e.substr(e.indexOf("/",9))):""},Uint8ArrayToString:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},getLocalDeviceInfo:function(){return function(e){var t,n=D.getEnvInfo(),r=n.platform,o="";r!==b.NODE&&r!==b.QUICK_APP||(o="");try{r===b.WEB?o=localStorage.getItem(e)||"":r===b.WX||r===b.QQ||r===b.TT||r===b.BAIDU||r===b.UNI?o=n.global.getStorageSync(e)||"":r!==b.ZFB&&r!==b.DD||(o=(null===(t=n.global.getStorageSync({key:e}))||void 0===t?void 0:t.data)||"")}catch(t){u.kg.debug("get local ".concat(e," failed: "),t)}return u.kg.debug("".concat(e," "),o),o}(k)},setLocalDeviceInfo:function(e){var t,n,r,o;t=k,n=e,(o=(r=D.getEnvInfo()).platform)!==b.NODE&&o!==b.QUICK_APP&&(o===b.WEB?localStorage.setItem(t,n):r.global.setStorage({key:t,data:n,success:function(e){u.kg.debug("set local ".concat(t," success: "),e)},fail:function(e){u.kg.error("set local ".concat(t," failed: "),e)}}))},detectBrowser:function(){if("undefined"==typeof navigator)return"unknown";var e=navigator.userAgent;return/MicroMessenger/i.test(e)?"WeChat":/QQBrowser/i.test(e)?"QQ":!/Chrome/i.test(e)||/Edg/i.test(e)||/OPR/i.test(e)?!/Safari/i.test(e)||/Chrome/i.test(e)||/CriOS/i.test(e)?/Firefox/i.test(e)?"Firefox":/MSIE/i.test(e)||/Trident/i.test(e)?"IE":/Edg/i.test(e)?"Edge":"unknown":"Safari":"Chrome"},getDevicePlatform:function(e){return e.platform===b.WX&&"undefined"!=typeof uni&&L(uni)?b.UNI:e.platform},delay:function(e){return new Promise((function(t){return setTimeout(t,e)}))}}},9662:function(e,t,n){var r=n(614),o=n(6330),i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not a function")}},9483:function(e,t,n){var r=n(4411),o=n(6330),i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not a constructor")}},6077:function(e,t,n){var r=n(614),o=String,i=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},1223:function(e,t,n){var r=n(5112),o=n(30),i=n(3070).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,{configurable:!0,value:o(null)}),e.exports=function(e){a[s][e]=!0}},5787:function(e,t,n){var r=n(7976),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw o("Incorrect invocation")}},9670:function(e,t,n){var r=n(111),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not an object")}},3013:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7556:function(e,t,n){var r=n(7293);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},260:function(e,t,n){"use strict";var r,o,i,s=n(3013),a=n(9781),u=n(7854),c=n(614),l=n(111),d=n(2597),p=n(648),f=n(6330),h=n(8880),_=n(8052),E=n(7045),v=n(7976),g=n(9518),m=n(7674),y=n(5112),O=n(9711),T=n(9909),R=T.enforce,I=T.get,S=u.Int8Array,C=S&&S.prototype,N=u.Uint8ClampedArray,b=N&&N.prototype,A=S&&g(S),M=C&&g(C),w=Object.prototype,L=u.TypeError,U=y("toStringTag"),P=O("TYPED_ARRAY_TAG"),x="TypedArrayConstructor",k=s&&!!m&&"Opera"!==p(u.opera),D=!1,H={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},G=function(e){var t=g(e);if(l(t)){var n=I(t);return n&&d(n,x)?n[x]:G(t)}},F=function(e){if(!l(e))return!1;var t=p(e);return d(H,t)||d(B,t)};for(r in H)(i=(o=u[r])&&o.prototype)?R(i)[x]=o:k=!1;for(r in B)(i=(o=u[r])&&o.prototype)&&(R(i)[x]=o);if((!k||!c(A)||A===Function.prototype)&&(A=function(){throw L("Incorrect invocation")},k))for(r in H)u[r]&&m(u[r],A);if((!k||!M||M===w)&&(M=A.prototype,k))for(r in H)u[r]&&m(u[r].prototype,M);if(k&&g(b)!==M&&m(b,M),a&&!d(M,U))for(r in D=!0,E(M,U,{configurable:!0,get:function(){return l(this)?this[P]:void 0}}),H)u[r]&&h(u[r],P,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:k,TYPED_ARRAY_TAG:D&&P,aTypedArray:function(e){if(F(e))return e;throw L("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!m||v(A,e)))return e;throw L(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(a){if(n)for(var o in H){var i=u[o];if(i&&d(i.prototype,e))try{delete i.prototype[e]}catch(n){try{i.prototype[e]=t}catch(e){}}}M[e]&&!n||_(M,e,n?t:k&&C[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(a){if(m){if(n)for(r in H)if((o=u[r])&&d(o,e))try{delete o[e]}catch(e){}if(A[e]&&!n)return;try{return _(A,e,n?t:k&&A[e]||t)}catch(e){}}for(r in H)!(o=u[r])||o[e]&&!n||_(o,e,t)}},getTypedArrayConstructor:G,isView:function(e){if(!l(e))return!1;var t=p(e);return"DataView"===t||d(H,t)||d(B,t)},isTypedArray:F,TypedArray:A,TypedArrayPrototype:M}},3331:function(e,t,n){"use strict";var r=n(7854),o=n(1702),i=n(9781),s=n(3013),a=n(6530),u=n(8880),c=n(7045),l=n(9190),d=n(7293),p=n(5787),f=n(9303),h=n(7466),_=n(7067),E=n(1179),v=n(9518),g=n(7674),m=n(8006).f,y=n(1285),O=n(1589),T=n(8003),R=n(9909),I=a.PROPER,S=a.CONFIGURABLE,C="ArrayBuffer",N="DataView",b="prototype",A="Wrong index",M=R.getterFor(C),w=R.getterFor(N),L=R.set,U=r[C],P=U,x=P&&P[b],k=r[N],D=k&&k[b],H=Object.prototype,B=r.Array,G=r.RangeError,F=o(y),j=o([].reverse),W=E.pack,q=E.unpack,K=function(e){return[255&e]},V=function(e){return[255&e,e>>8&255]},J=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},z=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Y=function(e){return W(e,23,4)},X=function(e){return W(e,52,8)},Z=function(e,t,n){c(e[b],t,{configurable:!0,get:function(){return n(this)[t]}})},Q=function(e,t,n,r){var o=_(n),i=w(e);if(o+t>i.byteLength)throw G(A);var s=i.bytes,a=o+i.byteOffset,u=O(s,a,a+t);return r?u:j(u)},$=function(e,t,n,r,o,i){var s=_(n),a=w(e);if(s+t>a.byteLength)throw G(A);for(var u=a.bytes,c=s+a.byteOffset,l=r(+o),d=0;d<t;d++)u[c+d]=l[i?d:t-d-1]};if(s){var ee=I&&U.name!==C;if(d((function(){U(1)}))&&d((function(){new U(-1)}))&&!d((function(){return new U,new U(1.5),new U(NaN),1!=U.length||ee&&!S})))ee&&S&&u(U,"name",C);else{(P=function(e){return p(this,x),new U(_(e))})[b]=x;for(var te,ne=m(U),re=0;ne.length>re;)(te=ne[re++])in P||u(P,te,U[te]);x.constructor=P}g&&v(D)!==H&&g(D,H);var oe=new k(new P(2)),ie=o(D.setInt8);oe.setInt8(0,2147483648),oe.setInt8(1,2147483649),!oe.getInt8(0)&&oe.getInt8(1)||l(D,{setInt8:function(e,t){ie(this,e,t<<24>>24)},setUint8:function(e,t){ie(this,e,t<<24>>24)}},{unsafe:!0})}else x=(P=function(e){p(this,x);var t=_(e);L(this,{type:C,bytes:F(B(t),0),byteLength:t}),i||(this.byteLength=t,this.detached=!1)})[b],D=(k=function(e,t,n){p(this,D),p(e,x);var r=M(e),o=r.byteLength,s=f(t);if(s<0||s>o)throw G("Wrong offset");if(s+(n=void 0===n?o-s:h(n))>o)throw G("Wrong length");L(this,{type:N,buffer:e,byteLength:n,byteOffset:s,bytes:r.bytes}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=s)})[b],i&&(Z(P,"byteLength",M),Z(k,"buffer",w),Z(k,"byteLength",w),Z(k,"byteOffset",w)),l(D,{getInt8:function(e){return Q(this,1,e)[0]<<24>>24},getUint8:function(e){return Q(this,1,e)[0]},getInt16:function(e){var t=Q(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Q(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return z(Q(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return z(Q(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return q(Q(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return q(Q(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){$(this,1,e,K,t)},setUint8:function(e,t){$(this,1,e,K,t)},setInt16:function(e,t){$(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){$(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){$(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){$(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){$(this,4,e,Y,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){$(this,8,e,X,t,arguments.length>2?arguments[2]:void 0)}});T(P,C),T(k,N),e.exports={ArrayBuffer:P,DataView:k}},1048:function(e,t,n){"use strict";var r=n(7908),o=n(1400),i=n(6244),s=n(5117),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),u=i(n),c=o(e,u),l=o(t,u),d=arguments.length>2?arguments[2]:void 0,p=a((void 0===d?u:o(d,u))-l,u-c),f=1;for(l<c&&c<l+p&&(f=-1,l+=p-1,c+=p-1);p-- >0;)l in n?n[c]=n[l]:s(n,c),c+=f,l+=f;return n}},1285:function(e,t,n){"use strict";var r=n(7908),o=n(1400),i=n(6244);e.exports=function(e){for(var t=r(this),n=i(t),s=arguments.length,a=o(s>1?arguments[1]:void 0,n),u=s>2?arguments[2]:void 0,c=void 0===u?n:o(u,n);c>a;)t[a++]=e;return t}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,o=n(9341)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},7745:function(e,t,n){var r=n(6244);e.exports=function(e,t){for(var n=0,o=r(t),i=new e(o);o>n;)i[n]=t[n++];return i}},8457:function(e,t,n){"use strict";var r=n(9974),o=n(6916),i=n(7908),s=n(3411),a=n(7659),u=n(4411),c=n(6244),l=n(6135),d=n(4121),p=n(1246),f=Array;e.exports=function(e){var t=i(e),n=u(this),h=arguments.length,_=h>1?arguments[1]:void 0,E=void 0!==_;E&&(_=r(_,h>2?arguments[2]:void 0));var v,g,m,y,O,T,R=p(t),I=0;if(!R||this===f&&a(R))for(v=c(t),g=n?new this(v):f(v);v>I;I++)T=E?_(t[I],I):t[I],l(g,I,T);else for(O=(y=d(t,R)).next,g=n?new this:[];!(m=o(O,y)).done;I++)T=E?s(y,_,[m.value,I],!0):m.value,l(g,I,T);return g.length=I,g}},1318:function(e,t,n){var r=n(5656),o=n(1400),i=n(6244),s=function(e){return function(t,n,s){var a,u=r(t),c=i(u),l=o(s,c);if(e&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},2092:function(e,t,n){var r=n(9974),o=n(1702),i=n(8361),s=n(7908),a=n(6244),u=n(5417),c=o([].push),l=function(e){var t=1==e,n=2==e,o=3==e,l=4==e,d=6==e,p=7==e,f=5==e||d;return function(h,_,E,v){for(var g,m,y=s(h),O=i(y),T=r(_,E),R=a(O),I=0,S=v||u,C=t?S(h,R):n||p?S(h,0):void 0;R>I;I++)if((f||I in O)&&(m=T(g=O[I],I,y),e))if(t)C[I]=m;else if(m)switch(e){case 3:return!0;case 5:return g;case 6:return I;case 2:c(C,g)}else switch(e){case 4:return!1;case 7:c(C,g)}return d?-1:o||l?l:C}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},6583:function(e,t,n){"use strict";var r=n(2104),o=n(5656),i=n(9303),s=n(6244),a=n(9341),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,d=a("lastIndexOf"),p=l||!d;e.exports=p?function(e){if(l)return r(c,this,arguments)||0;var t=o(this),n=s(t),a=n-1;for(arguments.length>1&&(a=u(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:c},1194:function(e,t,n){var r=n(7293),o=n(5112),i=n(7392),s=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,n){"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},3671:function(e,t,n){var r=n(9662),o=n(7908),i=n(8361),s=n(6244),a=TypeError,u=function(e){return function(t,n,u,c){r(n);var l=o(t),d=i(l),p=s(l),f=e?p-1:0,h=e?-1:1;if(u<2)for(;;){if(f in d){c=d[f],f+=h;break}if(f+=h,e?f<0:p<=f)throw a("Reduce of empty array with no initial value")}for(;e?f>=0:p>f;f+=h)f in d&&(c=n(c,d[f],f,l));return c}};e.exports={left:u(!1),right:u(!0)}},3658:function(e,t,n){"use strict";var r=n(9781),o=n(3157),i=TypeError,s=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(o(e)&&!s(e,"length").writable)throw i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},1589:function(e,t,n){var r=n(1400),o=n(6244),i=n(6135),s=Array,a=Math.max;e.exports=function(e,t,n){for(var u=o(e),c=r(t,u),l=r(void 0===n?u:n,u),d=s(a(l-c,0)),p=0;c<l;c++,p++)i(d,p,e[c]);return d.length=p,d}},206:function(e,t,n){var r=n(1702);e.exports=r([].slice)},4362:function(e,t,n){var r=n(1589),o=Math.floor,i=function(e,t){var n=e.length,u=o(n/2);return n<8?s(e,t):a(e,i(r(e,0,u),t),i(r(e,u),t),t)},s=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},a=function(e,t,n,r){for(var o=t.length,i=n.length,s=0,a=0;s<o||a<i;)e[s+a]=s<o&&a<i?r(t[s],n[a])<=0?t[s++]:n[a++]:s<o?t[s++]:n[a++];return e};e.exports=i},7475:function(e,t,n){var r=n(3157),o=n(4411),i=n(111),s=n(5112)("species"),a=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===a||r(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?a:t}},5417:function(e,t,n){var r=n(7475);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},3411:function(e,t,n){var r=n(9670),o=n(9212);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){o(e,"throw",t)}}},7072:function(e,t,n){var r=n(5112)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},4326:function(e,t,n){var r=n(1702),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},648:function(e,t,n){var r=n(1694),o=n(614),i=n(4326),s=n(5112)("toStringTag"),a=Object,u="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=a(e),s))?n:u?i(t):"Object"==(r=i(t))&&o(t.callee)?"Arguments":r}},5631:function(e,t,n){"use strict";var r=n(30),o=n(7045),i=n(9190),s=n(9974),a=n(5787),u=n(8554),c=n(408),l=n(1656),d=n(6178),p=n(6340),f=n(9781),h=n(2423).fastKey,_=n(9909),E=_.set,v=_.getterFor;e.exports={getConstructor:function(e,t,n,l){var d=e((function(e,o){a(e,p),E(e,{type:t,index:r(null),first:void 0,last:void 0,size:0}),f||(e.size=0),u(o)||c(o,e[l],{that:e,AS_ENTRIES:n})})),p=d.prototype,_=v(t),g=function(e,t,n){var r,o,i=_(e),s=m(e,t);return s?s.value=n:(i.last=s={index:o=h(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=s),r&&(r.next=s),f?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},m=function(e,t){var n,r=_(e),o=h(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(p,{clear:function(){for(var e=_(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=this,n=_(t),r=m(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),f?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=_(this),r=s(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!m(this,e)}}),i(p,n?{get:function(e){var t=m(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),f&&o(p,"size",{configurable:!0,get:function(){return _(this).size}}),d},setStrong:function(e,t,n){var r=t+" Iterator",o=v(t),i=v(r);l(e,t,(function(e,t){E(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?d("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,d(void 0,!0))}),n?"entries":"values",!n,!0),p(t)}}},7710:function(e,t,n){"use strict";var r=n(2109),o=n(7854),i=n(1702),s=n(4705),a=n(8052),u=n(2423),c=n(408),l=n(5787),d=n(614),p=n(8554),f=n(111),h=n(7293),_=n(7072),E=n(8003),v=n(9587);e.exports=function(e,t,n){var g=-1!==e.indexOf("Map"),m=-1!==e.indexOf("Weak"),y=g?"set":"add",O=o[e],T=O&&O.prototype,R=O,I={},S=function(e){var t=i(T[e]);a(T,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(m&&!f(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return m&&!f(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!f(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(s(e,!d(O)||!(m||T.forEach&&!h((function(){(new O).entries().next()})))))R=n.getConstructor(t,e,g,y),u.enable();else if(s(e,!0)){var C=new R,N=C[y](m?{}:-0,1)!=C,b=h((function(){C.has(1)})),A=_((function(e){new O(e)})),M=!m&&h((function(){for(var e=new O,t=5;t--;)e[y](t,t);return!e.has(-0)}));A||((R=t((function(e,t){l(e,T);var n=v(new O,e,R);return p(t)||c(t,n[y],{that:n,AS_ENTRIES:g}),n}))).prototype=T,T.constructor=R),(b||M)&&(S("delete"),S("has"),g&&S("get")),(M||N)&&S(y),m&&T.clear&&delete T.clear}return I[e]=R,r({global:!0,constructor:!0,forced:R!=O},I),E(R,e),m||n.setStrong(R,e,g),R}},9920:function(e,t,n){var r=n(2597),o=n(3887),i=n(1236),s=n(3070);e.exports=function(e,t,n){for(var a=o(t),u=s.f,c=i.f,l=0;l<a.length;l++){var d=a[l];r(e,d)||n&&r(n,d)||u(e,d,c(t,d))}}},4964:function(e,t,n){var r=n(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},8544:function(e,t,n){var r=n(7293);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},6178:function(e){e.exports=function(e,t){return{value:e,done:t}}},8880:function(e,t,n){var r=n(9781),o=n(3070),i=n(9114);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},9114:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:function(e,t,n){"use strict";var r=n(4948),o=n(3070),i=n(9114);e.exports=function(e,t,n){var s=r(t);s in e?o.f(e,s,i(0,n)):e[s]=n}},7045:function(e,t,n){var r=n(6339),o=n(3070);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),o.f(e,t,n)}},8052:function(e,t,n){var r=n(614),o=n(3070),i=n(6339),s=n(3072);e.exports=function(e,t,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:t;if(r(n)&&i(n,c,a),a.global)u?e[t]=n:s(t,n);else{try{a.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},9190:function(e,t,n){var r=n(8052);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},3072:function(e,t,n){var r=n(7854),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},5117:function(e,t,n){"use strict";var r=n(6330),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw o("Cannot delete property "+r(t)+" of "+r(e))}},9781:function(e,t,n){var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:function(e){var t="object"==typeof document&&document.all,n=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:n}},317:function(e,t,n){var r=n(7854),o=n(111),i=r.document,s=o(i)&&o(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},7207:function(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},8324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:function(e,t,n){var r=n(317)("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},8886:function(e,t,n){var r=n(8113).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},7871:function(e,t,n){var r=n(3823),o=n(5268);e.exports=!r&&!o&&"object"==typeof window&&"object"==typeof document},9363:function(e){e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},3823:function(e){e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:function(e,t,n){var r=n(8113);e.exports=/MSIE|Trident/.test(r)},1528:function(e,t,n){var r=n(8113);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},6833:function(e,t,n){var r=n(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:function(e,t,n){var r=n(4326);e.exports="undefined"!=typeof process&&"process"==r(process)},1036:function(e,t,n){var r=n(8113);e.exports=/web0s(?!.*chrome)/i.test(r)},8113:function(e){e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:function(e,t,n){var r,o,i=n(7854),s=n(8113),a=i.process,u=i.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},8008:function(e,t,n){var r=n(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),o=n(1236).f,i=n(8880),s=n(8052),a=n(3072),u=n(9920),c=n(4705);e.exports=function(e,t){var n,l,d,p,f,h=e.target,_=e.global,E=e.stat;if(n=_?r:E?r[h]||a(h,{}):(r[h]||{}).prototype)for(l in t){if(p=t[l],d=e.dontCallGetSet?(f=o(n,l))&&f.value:n[l],!c(_?l:h+(E?".":"#")+l,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;u(p,d)}(e.sham||d&&d.sham)&&i(p,"sham",!0),s(n,l,p,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},6677:function(e,t,n){var r=n(7293);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:function(e,t,n){var r=n(4374),o=Function.prototype,i=o.apply,s=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},9974:function(e,t,n){var r=n(1470),o=n(9662),i=n(4374),s=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},4374:function(e,t,n){var r=n(7293);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},7065:function(e,t,n){"use strict";var r=n(1702),o=n(9662),i=n(111),s=n(2597),a=n(206),u=n(4374),c=Function,l=r([].concat),d=r([].join),p={};e.exports=u?c.bind:function(e){var t=o(this),n=t.prototype,r=a(arguments,1),u=function(){var n=l(r,a(arguments));return this instanceof u?function(e,t,n){if(!s(p,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";p[t]=c("C,a","return new C("+d(r,",")+")")}return p[t](e,n)}(t,n.length,n):t.apply(e,n)};return i(n)&&(u.prototype=n),u}},6916:function(e,t,n){var r=n(4374),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6530:function(e,t,n){var r=n(9781),o=n(2597),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function(){}.name,c=a&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},5668:function(e,t,n){var r=n(1702),o=n(9662);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},1470:function(e,t,n){var r=n(4326),o=n(1702);e.exports=function(e){if("Function"===r(e))return o(e)}},1702:function(e,t,n){var r=n(4374),o=Function.prototype,i=o.call,s=r&&o.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},5005:function(e,t,n){var r=n(7854),o=n(614);e.exports=function(e,t){return arguments.length<2?(n=r[e],o(n)?n:void 0):r[e]&&r[e][t];var n}},1246:function(e,t,n){var r=n(648),o=n(8173),i=n(8554),s=n(7497),a=n(5112)("iterator");e.exports=function(e){if(!i(e))return o(e,a)||o(e,"@@iterator")||s[r(e)]}},4121:function(e,t,n){var r=n(6916),o=n(9662),i=n(9670),s=n(6330),a=n(1246),u=TypeError;e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(o(n))return i(r(n,e));throw u(s(e)+" is not iterable")}},8044:function(e,t,n){var r=n(1702),o=n(3157),i=n(614),s=n(4326),a=n(1340),u=r([].push);e.exports=function(e){if(i(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var c=e[r];"string"==typeof c?u(n,c):"number"!=typeof c&&"Number"!=s(c)&&"String"!=s(c)||u(n,a(c))}var l=n.length,d=!0;return function(e,t){if(d)return d=!1,t;if(o(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},8173:function(e,t,n){var r=n(9662),o=n(8554);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||this||Function("return this")()},2597:function(e,t,n){var r=n(1702),o=n(7908),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},3501:function(e){e.exports={}},842:function(e){e.exports=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),o=n(7293),i=n(317);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},1179:function(e){var t=Array,n=Math.abs,r=Math.pow,o=Math.floor,i=Math.log,s=Math.LN2;e.exports={pack:function(e,a,u){var c,l,d,p=t(u),f=8*u-a-1,h=(1<<f)-1,_=h>>1,E=23===a?r(2,-24)-r(2,-77):0,v=e<0||0===e&&1/e<0?1:0,g=0;for((e=n(e))!=e||e===1/0?(l=e!=e?1:0,c=h):(c=o(i(e)/s),e*(d=r(2,-c))<1&&(c--,d*=2),(e+=c+_>=1?E/d:E*r(2,1-_))*d>=2&&(c++,d/=2),c+_>=h?(l=0,c=h):c+_>=1?(l=(e*d-1)*r(2,a),c+=_):(l=e*r(2,_-1)*r(2,a),c=0));a>=8;)p[g++]=255&l,l/=256,a-=8;for(c=c<<a|l,f+=a;f>0;)p[g++]=255&c,c/=256,f-=8;return p[--g]|=128*v,p},unpack:function(e,t){var n,o=e.length,i=8*o-t-1,s=(1<<i)-1,a=s>>1,u=i-7,c=o-1,l=e[c--],d=127&l;for(l>>=7;u>0;)d=256*d+e[c--],u-=8;for(n=d&(1<<-u)-1,d>>=-u,u+=t;u>0;)n=256*n+e[c--],u-=8;if(0===d)d=1-a;else{if(d===s)return n?NaN:l?-1/0:1/0;n+=r(2,t),d-=a}return(l?-1:1)*n*r(2,d-t)}}},8361:function(e,t,n){var r=n(1702),o=n(7293),i=n(4326),s=Object,a=r("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a(e,""):s(e)}:s},9587:function(e,t,n){var r=n(614),o=n(111),i=n(7674);e.exports=function(e,t,n){var s,a;return i&&r(s=t.constructor)&&s!==n&&o(a=s.prototype)&&a!==n.prototype&&i(e,a),e}},2788:function(e,t,n){var r=n(1702),o=n(614),i=n(5465),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},2423:function(e,t,n){var r=n(2109),o=n(1702),i=n(3501),s=n(111),a=n(2597),u=n(3070).f,c=n(8006),l=n(1156),d=n(2050),p=n(9711),f=n(6677),h=!1,_=p("meta"),E=0,v=function(e){u(e,_,{value:{objectID:"O"+E++,weakData:{}}})},g=e.exports={enable:function(){g.enable=function(){},h=!0;var e=c.f,t=o([].splice),n={};n[_]=1,e(n).length&&(c.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===_){t(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,_)){if(!d(e))return"F";if(!t)return"E";v(e)}return e[_].objectID},getWeakData:function(e,t){if(!a(e,_)){if(!d(e))return!0;if(!t)return!1;v(e)}return e[_].weakData},onFreeze:function(e){return f&&h&&d(e)&&!a(e,_)&&v(e),e}};i[_]=!0},9909:function(e,t,n){var r,o,i,s=n(4811),a=n(7854),u=n(111),c=n(8880),l=n(2597),d=n(5465),p=n(6200),f=n(3501),h="Object already initialized",_=a.TypeError,E=a.WeakMap;if(s||d.state){var v=d.state||(d.state=new E);v.get=v.get,v.has=v.has,v.set=v.set,r=function(e,t){if(v.has(e))throw _(h);return t.facade=e,v.set(e,t),t},o=function(e){return v.get(e)||{}},i=function(e){return v.has(e)}}else{var g=p("state");f[g]=!0,r=function(e,t){if(l(e,g))throw _(h);return t.facade=e,c(e,g,t),t},o=function(e){return l(e,g)?e[g]:{}},i=function(e){return l(e,g)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw _("Incompatible receiver, "+e+" required");return n}}}},7659:function(e,t,n){var r=n(5112),o=n(7497),i=r("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[i]===e)}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4067:function(e,t,n){var r=n(648);e.exports=function(e){var t=r(e);return"BigInt64Array"==t||"BigUint64Array"==t}},614:function(e,t,n){var r=n(4154),o=r.all;e.exports=r.IS_HTMLDDA?function(e){return"function"==typeof e||e===o}:function(e){return"function"==typeof e}},4411:function(e,t,n){var r=n(1702),o=n(7293),i=n(614),s=n(648),a=n(5005),u=n(2788),c=function(){},l=[],d=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,f=r(p.exec),h=!p.exec(c),_=function(e){if(!i(e))return!1;try{return d(c,l,e),!0}catch(e){return!1}},E=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!f(p,u(e))}catch(e){return!0}};E.sham=!0,e.exports=!d||o((function(){var e;return _(_.call)||!_(Object)||!_((function(){e=!0}))||e}))?E:_},4705:function(e,t,n){var r=n(7293),o=n(614),i=/#|\.prototype\./,s=function(e,t){var n=u[a(e)];return n==l||n!=c&&(o(t)?r(t):!!t)},a=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},5988:function(e,t,n){var r=n(111),o=Math.floor;e.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&o(e)===e}},8554:function(e){e.exports=function(e){return null==e}},111:function(e,t,n){var r=n(614),o=n(4154),i=o.all;e.exports=o.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:r(e)||e===i}:function(e){return"object"==typeof e?null!==e:r(e)}},1913:function(e){e.exports=!1},7850:function(e,t,n){var r=n(111),o=n(4326),i=n(5112)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},2190:function(e,t,n){var r=n(5005),o=n(614),i=n(7976),s=n(3307),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,a(e))}},408:function(e,t,n){var r=n(9974),o=n(6916),i=n(9670),s=n(6330),a=n(7659),u=n(6244),c=n(7976),l=n(4121),d=n(1246),p=n(9212),f=TypeError,h=function(e,t){this.stopped=e,this.result=t},_=h.prototype;e.exports=function(e,t,n){var E,v,g,m,y,O,T,R=n&&n.that,I=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_RECORD),C=!(!n||!n.IS_ITERATOR),N=!(!n||!n.INTERRUPTED),b=r(t,R),A=function(e){return E&&p(E,"normal",e),new h(!0,e)},M=function(e){return I?(i(e),N?b(e[0],e[1],A):b(e[0],e[1])):N?b(e,A):b(e)};if(S)E=e.iterator;else if(C)E=e;else{if(!(v=d(e)))throw f(s(e)+" is not iterable");if(a(v)){for(g=0,m=u(e);m>g;g++)if((y=M(e[g]))&&c(_,y))return y;return new h(!1)}E=l(e,v)}for(O=S?e.next:E.next;!(T=o(O,E)).done;){try{y=M(T.value)}catch(e){p(E,"throw",e)}if("object"==typeof y&&y&&c(_,y))return y}return new h(!1)}},9212:function(e,t,n){var r=n(6916),o=n(9670),i=n(8173);e.exports=function(e,t,n){var s,a;o(e);try{if(!(s=i(e,"return"))){if("throw"===t)throw n;return n}s=r(s,e)}catch(e){a=!0,s=e}if("throw"===t)throw n;if(a)throw s;return o(s),n}},3061:function(e,t,n){"use strict";var r=n(3383).IteratorPrototype,o=n(30),i=n(9114),s=n(8003),a=n(7497),u=function(){return this};e.exports=function(e,t,n,c){var l=t+" Iterator";return e.prototype=o(r,{next:i(+!c,n)}),s(e,l,!1,!0),a[l]=u,e}},1656:function(e,t,n){"use strict";var r=n(2109),o=n(6916),i=n(1913),s=n(6530),a=n(614),u=n(3061),c=n(9518),l=n(7674),d=n(8003),p=n(8880),f=n(8052),h=n(5112),_=n(7497),E=n(3383),v=s.PROPER,g=s.CONFIGURABLE,m=E.IteratorPrototype,y=E.BUGGY_SAFARI_ITERATORS,O=h("iterator"),T="keys",R="values",I="entries",S=function(){return this};e.exports=function(e,t,n,s,h,E,C){u(n,t,s);var N,b,A,M=function(e){if(e===h&&x)return x;if(!y&&e in U)return U[e];switch(e){case T:case R:case I:return function(){return new n(this,e)}}return function(){return new n(this)}},w=t+" Iterator",L=!1,U=e.prototype,P=U[O]||U["@@iterator"]||h&&U[h],x=!y&&P||M(h),k="Array"==t&&U.entries||P;if(k&&(N=c(k.call(new e)))!==Object.prototype&&N.next&&(i||c(N)===m||(l?l(N,m):a(N[O])||f(N,O,S)),d(N,w,!0,!0),i&&(_[w]=S)),v&&h==R&&P&&P.name!==R&&(!i&&g?p(U,"name",R):(L=!0,x=function(){return o(P,this)})),h)if(b={values:M(R),keys:E?x:M(T),entries:M(I)},C)for(A in b)(y||L||!(A in U))&&f(U,A,b[A]);else r({target:t,proto:!0,forced:y||L},b);return i&&!C||U[O]===x||f(U,O,x,{name:h}),_[t]=x,b}},3383:function(e,t,n){"use strict";var r,o,i,s=n(7293),a=n(614),u=n(111),c=n(30),l=n(9518),d=n(8052),p=n(5112),f=n(1913),h=p("iterator"),_=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):_=!0),!u(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:f&&(r=c(r)),a(r[h])||d(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:_}},7497:function(e){e.exports={}},6244:function(e,t,n){var r=n(7466);e.exports=function(e){return r(e.length)}},6339:function(e,t,n){var r=n(1702),o=n(7293),i=n(614),s=n(2597),a=n(9781),u=n(6530).CONFIGURABLE,c=n(2788),l=n(9909),d=l.enforce,p=l.get,f=String,h=Object.defineProperty,_=r("".slice),E=r("".replace),v=r([].join),g=a&&!o((function(){return 8!==h((function(){}),"length",{value:8}).length})),m=String(String).split("String"),y=e.exports=function(e,t,n){"Symbol("===_(f(t),0,7)&&(t="["+E(f(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!s(e,"name")||u&&e.name!==t)&&(a?h(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&s(n,"arity")&&e.length!==n.arity&&h(e,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=d(e);return s(r,"source")||(r.source=v(m,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return i(this)&&p(this).source||c(this)}),"toString")},4758:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},5948:function(e,t,n){var r,o,i,s,a,u=n(7854),c=n(9974),l=n(1236).f,d=n(261).set,p=n(8572),f=n(6833),h=n(1528),_=n(1036),E=n(5268),v=u.MutationObserver||u.WebKitMutationObserver,g=u.document,m=u.process,y=u.Promise,O=l(u,"queueMicrotask"),T=O&&O.value;if(!T){var R=new p,I=function(){var e,t;for(E&&(e=m.domain)&&e.exit();t=R.get();)try{t()}catch(e){throw R.head&&r(),e}e&&e.enter()};f||E||_||!v||!g?!h&&y&&y.resolve?((s=y.resolve(void 0)).constructor=y,a=c(s.then,s),r=function(){a(I)}):E?r=function(){m.nextTick(I)}:(d=c(d,u),r=function(){d(I)}):(o=!0,i=g.createTextNode(""),new v(I).observe(i,{characterData:!0}),r=function(){i.data=o=!o}),T=function(e){R.head||r(),R.add(e)}}e.exports=T},8523:function(e,t,n){"use strict";var r=n(9662),o=TypeError,i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw o("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},3929:function(e,t,n){var r=n(7850),o=TypeError;e.exports=function(e){if(r(e))throw o("The method doesn't accept regular expressions");return e}},1574:function(e,t,n){"use strict";var r=n(9781),o=n(1702),i=n(6916),s=n(7293),a=n(1956),u=n(5181),c=n(5296),l=n(7908),d=n(8361),p=Object.assign,f=Object.defineProperty,h=o([].concat);e.exports=!p||s((function(){if(r&&1!==p({b:1},p(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=p({},e)[n]||a(p({},t)).join("")!=o}))?function(e,t){for(var n=l(e),o=arguments.length,s=1,p=u.f,f=c.f;o>s;)for(var _,E=d(arguments[s++]),v=p?h(a(E),p(E)):a(E),g=v.length,m=0;g>m;)_=v[m++],r&&!i(f,E,_)||(n[_]=E[_]);return n}:p},30:function(e,t,n){var r,o=n(9670),i=n(6048),s=n(748),a=n(3501),u=n(490),c=n(317),l=n(6200),d="prototype",p="script",f=l("IE_PROTO"),h=function(){},_=function(e){return"<"+p+">"+e+"</"+p+">"},E=function(e){e.write(_("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;v="undefined"!=typeof document?document.domain&&r?E(r):(t=c("iframe"),n="java"+p+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(_("document.F=Object")),e.close(),e.F):E(r);for(var o=s.length;o--;)delete v[d][s[o]];return v()};a[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=o(e),n=new h,h[d]=null,n[f]=e):n=v(),void 0===t?n:i.f(n,t)}},6048:function(e,t,n){var r=n(9781),o=n(3353),i=n(3070),s=n(9670),a=n(5656),u=n(1956);t.f=r&&!o?Object.defineProperties:function(e,t){s(e);for(var n,r=a(t),o=u(t),c=o.length,l=0;c>l;)i.f(e,n=o[l++],r[n]);return e}},3070:function(e,t,n){var r=n(9781),o=n(4664),i=n(3353),s=n(9670),a=n(4948),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",f="writable";t.f=r?i?function(e,t,n){if(s(e),t=a(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&f in n&&!n[f]){var r=l(e,t);r&&r[f]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:d in n?n[d]:r[d],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(s(e),t=a(t),s(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:function(e,t,n){var r=n(9781),o=n(6916),i=n(5296),s=n(9114),a=n(5656),u=n(4948),c=n(2597),l=n(4664),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=a(e),t=u(t),l)try{return d(e,t)}catch(e){}if(c(e,t))return s(!o(i.f,e,t),e[t])}},1156:function(e,t,n){var r=n(4326),o=n(5656),i=n(8006).f,s=n(1589),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"Window"==r(e)?function(e){try{return i(e)}catch(e){return s(a)}}(e):i(o(e))}},8006:function(e,t,n){var r=n(6324),o=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},9518:function(e,t,n){var r=n(2597),o=n(614),i=n(7908),s=n(6200),a=n(8544),u=s("IE_PROTO"),c=Object,l=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=i(e);if(r(t,u))return t[u];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof c?l:null}},2050:function(e,t,n){var r=n(7293),o=n(111),i=n(4326),s=n(7556),a=Object.isExtensible,u=r((function(){a(1)}));e.exports=u||s?function(e){return!!o(e)&&(!s||"ArrayBuffer"!=i(e))&&(!a||a(e))}:a},7976:function(e,t,n){var r=n(1702);e.exports=r({}.isPrototypeOf)},6324:function(e,t,n){var r=n(1702),o=n(2597),i=n(5656),s=n(1318).indexOf,a=n(3501),u=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&u(l,n);for(;t.length>c;)o(r,n=t[c++])&&(~s(l,n)||u(l,n));return l}},1956:function(e,t,n){var r=n(6324),o=n(748);e.exports=Object.keys||function(e){return r(e,o)}},5296:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:function(e,t,n){var r=n(5668),o=n(9670),i=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),i(r),t?e(n,r):n.__proto__=r,n}}():void 0)},4699:function(e,t,n){var r=n(9781),o=n(1702),i=n(1956),s=n(5656),a=o(n(5296).f),u=o([].push),c=function(e){return function(t){for(var n,o=s(t),c=i(o),l=c.length,d=0,p=[];l>d;)n=c[d++],r&&!a(o,n)||u(p,e?[n,o[n]]:o[n]);return p}};e.exports={entries:c(!0),values:c(!1)}},288:function(e,t,n){"use strict";var r=n(1694),o=n(648);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},2140:function(e,t,n){var r=n(6916),o=n(614),i=n(111),s=TypeError;e.exports=function(e,t){var n,a;if("string"===t&&o(n=e.toString)&&!i(a=r(n,e)))return a;if(o(n=e.valueOf)&&!i(a=r(n,e)))return a;if("string"!==t&&o(n=e.toString)&&!i(a=r(n,e)))return a;throw s("Can't convert object to primitive value")}},3887:function(e,t,n){var r=n(5005),o=n(1702),i=n(8006),s=n(5181),a=n(9670),u=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=s.f;return n?u(t,n(e)):t}},857:function(e,t,n){var r=n(7854);e.exports=r},2534:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},3702:function(e,t,n){var r=n(7854),o=n(2492),i=n(614),s=n(4705),a=n(2788),u=n(5112),c=n(7871),l=n(3823),d=n(1913),p=n(7392),f=o&&o.prototype,h=u("species"),_=!1,E=i(r.PromiseRejectionEvent),v=s("Promise",(function(){var e=a(o),t=e!==String(o);if(!t&&66===p)return!0;if(d&&(!f.catch||!f.finally))return!0;if(!p||p<51||!/native code/.test(e)){var n=new o((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[h]=r,!(_=n.then((function(){}))instanceof r))return!0}return!t&&(c||l)&&!E}));e.exports={CONSTRUCTOR:v,REJECTION_EVENT:E,SUBCLASSING:_}},2492:function(e,t,n){var r=n(7854);e.exports=r.Promise},9478:function(e,t,n){var r=n(9670),o=n(111),i=n(8523);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},612:function(e,t,n){var r=n(2492),o=n(7072),i=n(3702).CONSTRUCTOR;e.exports=i||!o((function(e){r.all(e).then(void 0,(function(){}))}))},8572:function(e){var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},2261:function(e,t,n){"use strict";var r,o,i=n(6916),s=n(1702),a=n(1340),u=n(7066),c=n(2999),l=n(2309),d=n(30),p=n(9909).get,f=n(9441),h=n(7168),_=l("native-string-replace",String.prototype.replace),E=RegExp.prototype.exec,v=E,g=s("".charAt),m=s("".indexOf),y=s("".replace),O=s("".slice),T=(o=/b*/g,i(E,r=/a/,"a"),i(E,o,"a"),0!==r.lastIndex||0!==o.lastIndex),R=c.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(T||I||R||f||h)&&(v=function(e){var t,n,r,o,s,c,l,f=this,h=p(f),S=a(e),C=h.raw;if(C)return C.lastIndex=f.lastIndex,t=i(v,C,S),f.lastIndex=C.lastIndex,t;var N=h.groups,b=R&&f.sticky,A=i(u,f),M=f.source,w=0,L=S;if(b&&(A=y(A,"y",""),-1===m(A,"g")&&(A+="g"),L=O(S,f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==g(S,f.lastIndex-1))&&(M="(?: "+M+")",L=" "+L,w++),n=new RegExp("^(?:"+M+")",A)),I&&(n=new RegExp("^"+M+"$(?!\\s)",A)),T&&(r=f.lastIndex),o=i(E,b?n:f,L),b?o?(o.input=O(o.input,w),o[0]=O(o[0],w),o.index=f.lastIndex,f.lastIndex+=o[0].length):f.lastIndex=0:T&&o&&(f.lastIndex=f.global?o.index+o[0].length:r),I&&o&&o.length>1&&i(_,o[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&N)for(o.groups=c=d(null),s=0;s<N.length;s++)c[(l=N[s])[0]]=o[l[1]];return o}),e.exports=v},7066:function(e,t,n){"use strict";var r=n(9670);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},4706:function(e,t,n){var r=n(6916),o=n(2597),i=n(7976),s=n(7066),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||o(e,"flags")||!i(a,e)?t:r(s,e)}},2999:function(e,t,n){var r=n(7293),o=n(7854).RegExp,i=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),s=i||r((function(){return!o("a","y").sticky})),a=i||r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:i}},9441:function(e,t,n){var r=n(7293),o=n(7854).RegExp;e.exports=r((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},7168:function(e,t,n){var r=n(7293),o=n(7854).RegExp;e.exports=r((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4488:function(e,t,n){var r=n(8554),o=TypeError;e.exports=function(e){if(r(e))throw o("Can't call method on "+e);return e}},7152:function(e,t,n){"use strict";var r,o=n(7854),i=n(2104),s=n(614),a=n(9363),u=n(8113),c=n(206),l=n(8053),d=o.Function,p=/MSIE .\./.test(u)||a&&((r=o.Bun.version.split(".")).length<3||0==r[0]&&(r[1]<3||3==r[1]&&0==r[2]));e.exports=function(e,t){var n=t?2:1;return p?function(r,o){var a=l(arguments.length,1)>n,u=s(r)?r:d(r),p=a?c(arguments,n):[],f=a?function(){i(u,this,p)}:u;return t?e(f,o):e(f)}:e}},6340:function(e,t,n){"use strict";var r=n(5005),o=n(7045),i=n(5112),s=n(9781),a=i("species");e.exports=function(e){var t=r(e);s&&t&&!t[a]&&o(t,a,{configurable:!0,get:function(){return this}})}},8003:function(e,t,n){var r=n(3070).f,o=n(2597),i=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!o(e,i)&&r(e,i,{configurable:!0,value:t})}},6200:function(e,t,n){var r=n(2309),o=n(9711),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},5465:function(e,t,n){var r=n(7854),o=n(3072),i="__core-js_shared__",s=r[i]||o(i,{});e.exports=s},2309:function(e,t,n){var r=n(1913),o=n(5465);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:function(e,t,n){var r=n(9670),o=n(9483),i=n(8554),s=n(5112)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||i(n=r(a)[s])?t:o(n)}},8710:function(e,t,n){var r=n(1702),o=n(9303),i=n(1340),s=n(4488),a=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(e){return function(t,n){var r,l,d=i(s(t)),p=o(n),f=d.length;return p<0||p>=f?e?"":void 0:(r=u(d,p))<55296||r>56319||p+1===f||(l=u(d,p+1))<56320||l>57343?e?a(d,p):r:e?c(d,p,p+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},3197:function(e,t,n){var r=n(1702),o=2147483647,i=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",u=RangeError,c=r(s.exec),l=Math.floor,d=String.fromCharCode,p=r("".charCodeAt),f=r([].join),h=r([].push),_=r("".replace),E=r("".split),v=r("".toLowerCase),g=function(e){return e+22+75*(e<26)},m=function(e,t,n){var r=0;for(e=n?l(e/700):e>>1,e+=l(e/t);e>455;)e=l(e/35),r+=36;return l(r+36*e/(e+38))},y=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=p(e,n++);if(o>=55296&&o<=56319&&n<r){var i=p(e,n++);56320==(64512&i)?h(t,((1023&o)<<10)+(1023&i)+65536):(h(t,o),n--)}else h(t,o)}return t}(e);var n,r,i=e.length,s=128,c=0,_=72;for(n=0;n<e.length;n++)(r=e[n])<128&&h(t,d(r));var E=t.length,v=E;for(E&&h(t,"-");v<i;){var y=o;for(n=0;n<e.length;n++)(r=e[n])>=s&&r<y&&(y=r);var O=v+1;if(y-s>l((o-c)/O))throw u(a);for(c+=(y-s)*O,s=y,n=0;n<e.length;n++){if((r=e[n])<s&&++c>o)throw u(a);if(r==s){for(var T=c,R=36;;){var I=R<=_?1:R>=_+26?26:R-_;if(T<I)break;var S=T-I,C=36-I;h(t,d(g(I+S%C))),T=l(S/C),R+=36}h(t,d(g(T))),_=m(c,O,v==E),c=0,v++}}c++,s++}return f(t,"")};e.exports=function(e){var t,n,r=[],o=E(_(v(e),s,"."),".");for(t=0;t<o.length;t++)n=o[t],h(r,c(i,n)?"xn--"+y(n):n);return f(r,".")}},3111:function(e,t,n){var r=n(1702),o=n(4488),i=n(1340),s=n(1361),a=r("".replace),u=RegExp("^["+s+"]+"),c=RegExp("(^|[^"+s+"])["+s+"]+$"),l=function(e){return function(t){var n=i(o(t));return 1&e&&(n=a(n,u,"")),2&e&&(n=a(n,c,"$1")),n}};e.exports={start:l(1),end:l(2),trim:l(3)}},6293:function(e,t,n){var r=n(7392),o=n(7293),i=n(7854).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},6532:function(e,t,n){var r=n(6916),o=n(5005),i=n(5112),s=n(8052);e.exports=function(){var e=o("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,a=i("toPrimitive");t&&!t[a]&&s(t,a,(function(e){return r(n,this)}),{arity:1})}},2015:function(e,t,n){var r=n(6293);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},261:function(e,t,n){var r,o,i,s,a=n(7854),u=n(2104),c=n(9974),l=n(614),d=n(2597),p=n(7293),f=n(490),h=n(206),_=n(317),E=n(8053),v=n(6833),g=n(5268),m=a.setImmediate,y=a.clearImmediate,O=a.process,T=a.Dispatch,R=a.Function,I=a.MessageChannel,S=a.String,C=0,N={},b="onreadystatechange";p((function(){r=a.location}));var A=function(e){if(d(N,e)){var t=N[e];delete N[e],t()}},M=function(e){return function(){A(e)}},w=function(e){A(e.data)},L=function(e){a.postMessage(S(e),r.protocol+"//"+r.host)};m&&y||(m=function(e){E(arguments.length,1);var t=l(e)?e:R(e),n=h(arguments,1);return N[++C]=function(){u(t,void 0,n)},o(C),C},y=function(e){delete N[e]},g?o=function(e){O.nextTick(M(e))}:T&&T.now?o=function(e){T.now(M(e))}:I&&!v?(s=(i=new I).port2,i.port1.onmessage=w,o=c(s.postMessage,s)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!p(L)?(o=L,a.addEventListener("message",w,!1)):o=b in _("script")?function(e){f.appendChild(_("script"))[b]=function(){f.removeChild(this),A(e)}}:function(e){setTimeout(M(e),0)}),e.exports={set:m,clear:y}},863:function(e,t,n){var r=n(1702);e.exports=r(1..valueOf)},1400:function(e,t,n){var r=n(9303),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},4599:function(e,t,n){var r=n(7593),o=TypeError;e.exports=function(e){var t=r(e,"number");if("number"==typeof t)throw o("Can't convert number to bigint");return BigInt(t)}},7067:function(e,t,n){var r=n(9303),o=n(7466),i=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=o(t);if(t!==n)throw i("Wrong length or index");return n}},5656:function(e,t,n){var r=n(8361),o=n(4488);e.exports=function(e){return r(o(e))}},9303:function(e,t,n){var r=n(4758);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},7466:function(e,t,n){var r=n(9303),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},7908:function(e,t,n){var r=n(4488),o=Object;e.exports=function(e){return o(r(e))}},4590:function(e,t,n){var r=n(3002),o=RangeError;e.exports=function(e,t){var n=r(e);if(n%t)throw o("Wrong offset");return n}},3002:function(e,t,n){var r=n(9303),o=RangeError;e.exports=function(e){var t=r(e);if(t<0)throw o("The argument can't be less than 0");return t}},7593:function(e,t,n){var r=n(6916),o=n(111),i=n(2190),s=n(8173),a=n(2140),u=n(5112),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,u=s(e,l);if(u){if(void 0===t&&(t="default"),n=r(u,e,t),!o(n)||i(n))return n;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},4948:function(e,t,n){var r=n(7593),o=n(2190);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},1694:function(e,t,n){var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},1340:function(e,t,n){var r=n(648),o=String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},6330:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},9843:function(e,t,n){"use strict";var r=n(2109),o=n(7854),i=n(6916),s=n(9781),a=n(3832),u=n(260),c=n(3331),l=n(5787),d=n(9114),p=n(8880),f=n(5988),h=n(7466),_=n(7067),E=n(4590),v=n(4948),g=n(2597),m=n(648),y=n(111),O=n(2190),T=n(30),R=n(7976),I=n(7674),S=n(8006).f,C=n(7321),N=n(2092).forEach,b=n(6340),A=n(7045),M=n(3070),w=n(1236),L=n(9909),U=n(9587),P=L.get,x=L.set,k=L.enforce,D=M.f,H=w.f,B=Math.round,G=o.RangeError,F=c.ArrayBuffer,j=F.prototype,W=c.DataView,q=u.NATIVE_ARRAY_BUFFER_VIEWS,K=u.TYPED_ARRAY_TAG,V=u.TypedArray,J=u.TypedArrayPrototype,z=u.aTypedArrayConstructor,Y=u.isTypedArray,X="BYTES_PER_ELEMENT",Z="Wrong length",Q=function(e,t){z(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},$=function(e,t){A(e,t,{configurable:!0,get:function(){return P(this)[t]}})},ee=function(e){var t;return R(j,e)||"ArrayBuffer"==(t=m(e))||"SharedArrayBuffer"==t},te=function(e,t){return Y(e)&&!O(t)&&t in e&&f(+t)&&t>=0},ne=function(e,t){return t=v(t),te(e,t)?d(2,e[t]):H(e,t)},re=function(e,t,n){return t=v(t),!(te(e,t)&&y(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?D(e,t,n):(e[t]=n.value,e)};s?(q||(w.f=ne,M.f=re,$(J,"buffer"),$(J,"byteOffset"),$(J,"byteLength"),$(J,"length")),r({target:"Object",stat:!0,forced:!q},{getOwnPropertyDescriptor:ne,defineProperty:re}),e.exports=function(e,t,n){var s=e.match(/\d+/)[0]/8,u=e+(n?"Clamped":"")+"Array",c="get"+e,d="set"+e,f=o[u],v=f,g=v&&v.prototype,m={},O=function(e,t){D(e,t,{get:function(){return function(e,t){var n=P(e);return n.view[c](t*s+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=P(e);n&&(r=(r=B(r))<0?0:r>255?255:255&r),o.view[d](t*s+o.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};q?a&&(v=t((function(e,t,n,r){return l(e,g),U(y(t)?ee(t)?void 0!==r?new f(t,E(n,s),r):void 0!==n?new f(t,E(n,s)):new f(t):Y(t)?Q(v,t):i(C,v,t):new f(_(t)),e,v)})),I&&I(v,V),N(S(f),(function(e){e in v||p(v,e,f[e])})),v.prototype=g):(v=t((function(e,t,n,r){l(e,g);var o,a,u,c=0,d=0;if(y(t)){if(!ee(t))return Y(t)?Q(v,t):i(C,v,t);o=t,d=E(n,s);var p=t.byteLength;if(void 0===r){if(p%s)throw G(Z);if((a=p-d)<0)throw G(Z)}else if((a=h(r)*s)+d>p)throw G(Z);u=a/s}else u=_(t),o=new F(a=u*s);for(x(e,{buffer:o,byteOffset:d,byteLength:a,length:u,view:new W(o)});c<u;)O(e,c++)})),I&&I(v,V),g=v.prototype=T(J)),g.constructor!==v&&p(g,"constructor",v),k(g).TypedArrayConstructor=v,K&&p(g,K,u);var R=v!=f;m[u]=v,r({global:!0,constructor:!0,forced:R,sham:!q},m),X in v||p(v,X,s),X in g||p(g,X,s),b(u)}):e.exports=function(){}},3832:function(e,t,n){var r=n(7854),o=n(7293),i=n(7072),s=n(260).NATIVE_ARRAY_BUFFER_VIEWS,a=r.ArrayBuffer,u=r.Int8Array;e.exports=!s||!o((function(){u(1)}))||!o((function(){new u(-1)}))||!i((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||o((function(){return 1!==new u(new a(2),1,void 0).length}))},3074:function(e,t,n){var r=n(7745),o=n(6304);e.exports=function(e,t){return r(o(e),t)}},7321:function(e,t,n){var r=n(9974),o=n(6916),i=n(9483),s=n(7908),a=n(6244),u=n(4121),c=n(1246),l=n(7659),d=n(4067),p=n(260).aTypedArrayConstructor,f=n(4599);e.exports=function(e){var t,n,h,_,E,v,g,m,y=i(this),O=s(e),T=arguments.length,R=T>1?arguments[1]:void 0,I=void 0!==R,S=c(O);if(S&&!l(S))for(m=(g=u(O,S)).next,O=[];!(v=o(m,g)).done;)O.push(v.value);for(I&&T>2&&(R=r(R,arguments[2])),n=a(O),h=new(p(y))(n),_=d(h),t=0;n>t;t++)E=I?R(O[t],t):O[t],h[t]=_?f(E):+E;return h}},6304:function(e,t,n){var r=n(260),o=n(6707),i=r.aTypedArrayConstructor,s=r.getTypedArrayConstructor;e.exports=function(e){return i(o(e,s(e)))}},9711:function(e,t,n){var r=n(1702),o=0,i=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++o+i,36)}},5143:function(e,t,n){var r=n(7293),o=n(5112),i=n(9781),s=n(1913),a=o("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),s&&!e.toJSON||!t.size&&(s||!i)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},3307:function(e,t,n){var r=n(6293);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(e,t,n){var r=n(9781),o=n(7293);e.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:function(e){var t=TypeError;e.exports=function(e,n){if(e<n)throw t("Not enough arguments");return e}},4811:function(e,t,n){var r=n(7854),o=n(614),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},6800:function(e,t,n){var r=n(857),o=n(2597),i=n(6061),s=n(3070).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||s(t,e,{value:i.f(e)})}},6061:function(e,t,n){var r=n(5112);t.f=r},5112:function(e,t,n){var r=n(7854),o=n(2309),i=n(2597),s=n(9711),a=n(6293),u=n(3307),c=r.Symbol,l=o("wks"),d=u?c.for||c:c&&c.withoutSetter||s;e.exports=function(e){return i(l,e)||(l[e]=a&&i(c,e)?c[e]:d("Symbol."+e)),l[e]}},1361:function(e){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9575:function(e,t,n){"use strict";var r=n(2109),o=n(1470),i=n(7293),s=n(3331),a=n(9670),u=n(1400),c=n(7466),l=n(6707),d=s.ArrayBuffer,p=s.DataView,f=p.prototype,h=o(d.prototype.slice),_=o(f.getUint8),E=o(f.setUint8);r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new d(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(h&&void 0===t)return h(a(this),e);for(var n=a(this).byteLength,r=u(e,n),o=u(void 0===t?n:t,n),i=new(l(this,d))(c(o-r)),s=new p(this),f=new p(i),v=0;r<o;)E(f,v++,_(s,r++));return i}})},2222:function(e,t,n){"use strict";var r=n(2109),o=n(7293),i=n(3157),s=n(111),a=n(7908),u=n(6244),c=n(7207),l=n(6135),d=n(5417),p=n(1194),f=n(5112),h=n(7392),_=f("isConcatSpreadable"),E=h>=51||!o((function(){var e=[];return e[_]=!1,e.concat()[0]!==e})),v=function(e){if(!s(e))return!1;var t=e[_];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!E||!p("concat")},{concat:function(e){var t,n,r,o,i,s=a(this),p=d(s,0),f=0;for(t=-1,r=arguments.length;t<r;t++)if(v(i=-1===t?s:arguments[t]))for(o=u(i),c(f+o),n=0;n<o;n++,f++)n in i&&l(p,f,i[n]);else c(f+1),l(p,f++,i);return p.length=f,p}})},7327:function(e,t,n){"use strict";var r=n(2109),o=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},4553:function(e,t,n){"use strict";var r=n(2109),o=n(2092).findIndex,i=n(1223),s="findIndex",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(s)},9826:function(e,t,n){"use strict";var r=n(2109),o=n(2092).find,i=n(1223),s="find",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(s)},9554:function(e,t,n){"use strict";var r=n(2109),o=n(8533);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},1038:function(e,t,n){var r=n(2109),o=n(8457);r({target:"Array",stat:!0,forced:!n(7072)((function(e){Array.from(e)}))},{from:o})},6699:function(e,t,n){"use strict";var r=n(2109),o=n(1318).includes,i=n(7293),s=n(1223);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),s("includes")},2772:function(e,t,n){"use strict";var r=n(2109),o=n(1470),i=n(1318).indexOf,s=n(9341),a=o([].indexOf),u=!!a&&1/a([1],1,-0)<0;r({target:"Array",proto:!0,forced:u||!s("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return u?a(this,e,t)||0:i(this,e,t)}})},9753:function(e,t,n){n(2109)({target:"Array",stat:!0},{isArray:n(3157)})},6992:function(e,t,n){"use strict";var r=n(5656),o=n(1223),i=n(7497),s=n(9909),a=n(3070).f,u=n(1656),c=n(6178),l=n(1913),d=n(9781),p="Array Iterator",f=s.set,h=s.getterFor(p);e.exports=u(Array,"Array",(function(e,t){f(this,{type:p,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,c(void 0,!0)):c("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values");var _=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&d&&"values"!==_.name)try{a(_,"name",{value:"values"})}catch(e){}},9600:function(e,t,n){"use strict";var r=n(2109),o=n(1702),i=n(8361),s=n(5656),a=n(9341),u=o([].join);r({target:"Array",proto:!0,forced:i!=Object||!a("join",",")},{join:function(e){return u(s(this),void 0===e?",":e)}})},4986:function(e,t,n){var r=n(2109),o=n(6583);r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},1249:function(e,t,n){"use strict";var r=n(2109),o=n(2092).map;r({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},5827:function(e,t,n){"use strict";var r=n(2109),o=n(3671).left,i=n(9341),s=n(7392);r({target:"Array",proto:!0,forced:!n(5268)&&s>79&&s<83||!i("reduce")},{reduce:function(e){var t=arguments.length;return o(this,e,t,t>1?arguments[1]:void 0)}})},7042:function(e,t,n){"use strict";var r=n(2109),o=n(3157),i=n(4411),s=n(111),a=n(1400),u=n(6244),c=n(5656),l=n(6135),d=n(5112),p=n(1194),f=n(206),h=p("slice"),_=d("species"),E=Array,v=Math.max;r({target:"Array",proto:!0,forced:!h},{slice:function(e,t){var n,r,d,p=c(this),h=u(p),g=a(e,h),m=a(void 0===t?h:t,h);if(o(p)&&(n=p.constructor,(i(n)&&(n===E||o(n.prototype))||s(n)&&null===(n=n[_]))&&(n=void 0),n===E||void 0===n))return f(p,g,m);for(r=new(void 0===n?E:n)(v(m-g,0)),d=0;g<m;g++,d++)g in p&&l(r,d,p[g]);return r.length=d,r}})},5212:function(e,t,n){"use strict";var r=n(2109),o=n(2092).some;r({target:"Array",proto:!0,forced:!n(9341)("some")},{some:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},561:function(e,t,n){"use strict";var r=n(2109),o=n(7908),i=n(1400),s=n(9303),a=n(6244),u=n(3658),c=n(7207),l=n(5417),d=n(6135),p=n(5117),f=n(1194)("splice"),h=Math.max,_=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(e,t){var n,r,f,E,v,g,m=o(this),y=a(m),O=i(e,y),T=arguments.length;for(0===T?n=r=0:1===T?(n=0,r=y-O):(n=T-2,r=_(h(s(t),0),y-O)),c(y+n-r),f=l(m,r),E=0;E<r;E++)(v=O+E)in m&&d(f,E,m[v]);if(f.length=r,n<r){for(E=O;E<y-r;E++)g=E+n,(v=E+r)in m?m[g]=m[v]:p(m,g);for(E=y;E>y-r+n;E--)p(m,E-1)}else if(n>r)for(E=y-r;E>O;E--)g=E+n-1,(v=E+r-1)in m?m[g]=m[v]:p(m,g);for(E=0;E<n;E++)m[E+O]=arguments[E+2];return u(m,y-r+n),f}})},3843:function(e,t,n){var r=n(2109),o=n(1702),i=Date,s=o(i.prototype.getTime);r({target:"Date",stat:!0},{now:function(){return s(new i)}})},3710:function(e,t,n){var r=n(1702),o=n(8052),i=Date.prototype,s="Invalid Date",a="toString",u=r(i[a]),c=r(i.getTime);String(new Date(NaN))!=s&&o(i,a,(function(){var e=c(this);return e==e?u(this):s}))},4812:function(e,t,n){var r=n(2109),o=n(7065);r({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},8309:function(e,t,n){var r=n(9781),o=n(6530).EXISTS,i=n(1702),s=n(7045),a=Function.prototype,u=i(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(c.exec);r&&!o&&s(a,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},8862:function(e,t,n){var r=n(2109),o=n(5005),i=n(2104),s=n(6916),a=n(1702),u=n(7293),c=n(614),l=n(2190),d=n(206),p=n(8044),f=n(6293),h=String,_=o("JSON","stringify"),E=a(/./.exec),v=a("".charAt),g=a("".charCodeAt),m=a("".replace),y=a(1..toString),O=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,I=!f||u((function(){var e=o("Symbol")();return"[null]"!=_([e])||"{}"!=_({a:e})||"{}"!=_(Object(e))})),S=u((function(){return'"\\udf06\\ud834"'!==_("\udf06\ud834")||'"\\udead"'!==_("\udead")})),C=function(e,t){var n=d(arguments),r=p(t);if(c(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(c(r)&&(t=s(r,this,h(e),t)),!l(t))return t},i(_,null,n)},N=function(e,t,n){var r=v(n,t-1),o=v(n,t+1);return E(T,e)&&!E(R,o)||E(R,e)&&!E(T,r)?"\\u"+y(g(e,0),16):e};_&&r({target:"JSON",stat:!0,arity:3,forced:I||S},{stringify:function(e,t,n){var r=d(arguments),o=i(I?C:_,null,r);return S&&"string"==typeof o?m(o,O,N):o}})},9098:function(e,t,n){"use strict";n(7710)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(5631))},1532:function(e,t,n){n(9098)},9653:function(e,t,n){"use strict";var r=n(2109),o=n(1913),i=n(9781),s=n(7854),a=n(857),u=n(1702),c=n(4705),l=n(2597),d=n(9587),p=n(7976),f=n(2190),h=n(7593),_=n(7293),E=n(8006).f,v=n(1236).f,g=n(3070).f,m=n(863),y=n(3111).trim,O="Number",T=s[O],R=a[O],I=T.prototype,S=s.TypeError,C=u("".slice),N=u("".charCodeAt),b=c(O,!T(" 0o1")||!T("0b1")||T("+0x1")),A=function(e){var t,n=arguments.length<1?0:T(function(e){var t=h(e,"number");return"bigint"==typeof t?t:function(e){var t,n,r,o,i,s,a,u,c=h(e,"number");if(f(c))throw S("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=y(c),43===(t=N(c,0))||45===t){if(88===(n=N(c,2))||120===n)return NaN}else if(48===t){switch(N(c,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+c}for(s=(i=C(c,2)).length,a=0;a<s;a++)if((u=N(i,a))<48||u>o)return NaN;return parseInt(i,r)}return+c}(t)}(e));return p(I,t=this)&&_((function(){m(t)}))?d(Object(n),this,A):n};A.prototype=I,b&&!o&&(I.constructor=A),r({global:!0,constructor:!0,wrap:!0,forced:b},{Number:A});var M=function(e,t){for(var n,r=i?E(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;r.length>o;o++)l(t,n=r[o])&&!l(e,n)&&g(e,n,v(t,n))};o&&R&&M(a[O],R),(b||o)&&M(a[O],T)},3161:function(e,t,n){n(2109)({target:"Number",stat:!0},{isInteger:n(5988)})},4048:function(e,t,n){n(2109)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},9601:function(e,t,n){var r=n(2109),o=n(1574);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},9720:function(e,t,n){var r=n(2109),o=n(4699).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},9660:function(e,t,n){var r=n(2109),o=n(6293),i=n(7293),s=n(5181),a=n(7908);r({target:"Object",stat:!0,forced:!o||i((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(a(e)):[]}})},7941:function(e,t,n){var r=n(2109),o=n(7908),i=n(1956);r({target:"Object",stat:!0,forced:n(7293)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},1539:function(e,t,n){var r=n(1694),o=n(8052),i=n(288);r||o(Object.prototype,"toString",i,{unsafe:!0})},821:function(e,t,n){"use strict";var r=n(2109),o=n(6916),i=n(9662),s=n(8523),a=n(2534),u=n(408);r({target:"Promise",stat:!0,forced:n(612)},{all:function(e){var t=this,n=s.f(t),r=n.resolve,c=n.reject,l=a((function(){var n=i(t.resolve),s=[],a=0,l=1;u(e,(function(e){var i=a++,u=!1;l++,o(n,t,e).then((function(e){u||(u=!0,s[i]=e,--l||r(s))}),c)})),--l||r(s)}));return l.error&&c(l.value),n.promise}})},4164:function(e,t,n){"use strict";var r=n(2109),o=n(1913),i=n(3702).CONSTRUCTOR,s=n(2492),a=n(5005),u=n(614),c=n(8052),l=s&&s.prototype;if(r({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&u(s)){var d=a("Promise").prototype.catch;l.catch!==d&&c(l,"catch",d,{unsafe:!0})}},3401:function(e,t,n){"use strict";var r,o,i,s=n(2109),a=n(1913),u=n(5268),c=n(7854),l=n(6916),d=n(8052),p=n(7674),f=n(8003),h=n(6340),_=n(9662),E=n(614),v=n(111),g=n(5787),m=n(6707),y=n(261).set,O=n(5948),T=n(842),R=n(2534),I=n(8572),S=n(9909),C=n(2492),N=n(3702),b=n(8523),A="Promise",M=N.CONSTRUCTOR,w=N.REJECTION_EVENT,L=N.SUBCLASSING,U=S.getterFor(A),P=S.set,x=C&&C.prototype,k=C,D=x,H=c.TypeError,B=c.document,G=c.process,F=b.f,j=F,W=!!(B&&B.createEvent&&c.dispatchEvent),q="unhandledrejection",K=function(e){var t;return!(!v(e)||!E(t=e.then))&&t},V=function(e,t){var n,r,o,i=t.value,s=1==t.state,a=s?e.ok:e.fail,u=e.resolve,c=e.reject,d=e.domain;try{a?(s||(2===t.rejection&&Z(t),t.rejection=1),!0===a?n=i:(d&&d.enter(),n=a(i),d&&(d.exit(),o=!0)),n===e.promise?c(H("Promise-chain cycle")):(r=K(n))?l(r,n,u,c):u(n)):c(i)}catch(e){d&&!o&&d.exit(),c(e)}},J=function(e,t){e.notified||(e.notified=!0,O((function(){for(var n,r=e.reactions;n=r.get();)V(n,e);e.notified=!1,t&&!e.rejection&&Y(e)})))},z=function(e,t,n){var r,o;W?((r=B.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!w&&(o=c["on"+e])?o(r):e===q&&T("Unhandled promise rejection",n)},Y=function(e){l(y,c,(function(){var t,n=e.facade,r=e.value;if(X(e)&&(t=R((function(){u?G.emit("unhandledRejection",r,n):z(q,n,r)})),e.rejection=u||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},Z=function(e){l(y,c,(function(){var t=e.facade;u?G.emit("rejectionHandled",t):z("rejectionhandled",t,e.value)}))},Q=function(e,t,n){return function(r){e(t,r,n)}},$=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,J(e,!0))},ee=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw H("Promise can't be resolved itself");var r=K(t);r?O((function(){var n={done:!1};try{l(r,t,Q(ee,n,e),Q($,n,e))}catch(t){$(n,t,e)}})):(e.value=t,e.state=1,J(e,!1))}catch(t){$({done:!1},t,e)}}};if(M&&(D=(k=function(e){g(this,D),_(e),l(r,this);var t=U(this);try{e(Q(ee,t),Q($,t))}catch(e){$(t,e)}}).prototype,(r=function(e){P(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:0,value:void 0})}).prototype=d(D,"then",(function(e,t){var n=U(this),r=F(m(this,k));return n.parent=!0,r.ok=!E(e)||e,r.fail=E(t)&&t,r.domain=u?G.domain:void 0,0==n.state?n.reactions.add(r):O((function(){V(r,n)})),r.promise})),o=function(){var e=new r,t=U(e);this.promise=e,this.resolve=Q(ee,t),this.reject=Q($,t)},b.f=F=function(e){return e===k||void 0===e?new o(e):j(e)},!a&&E(C)&&x!==Object.prototype)){i=x.then,L||d(x,"then",(function(e,t){var n=this;return new k((function(e,t){l(i,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete x.constructor}catch(e){}p&&p(x,D)}s({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:k}),f(k,A,!1,!0),h(A)},8674:function(e,t,n){n(3401),n(821),n(4164),n(6027),n(683),n(6294)},6027:function(e,t,n){"use strict";var r=n(2109),o=n(6916),i=n(9662),s=n(8523),a=n(2534),u=n(408);r({target:"Promise",stat:!0,forced:n(612)},{race:function(e){var t=this,n=s.f(t),r=n.reject,c=a((function(){var s=i(t.resolve);u(e,(function(e){o(s,t,e).then(n.resolve,r)}))}));return c.error&&r(c.value),n.promise}})},683:function(e,t,n){"use strict";var r=n(2109),o=n(6916),i=n(8523);r({target:"Promise",stat:!0,forced:n(3702).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return o(t.reject,void 0,e),t.promise}})},6294:function(e,t,n){"use strict";var r=n(2109),o=n(5005),i=n(1913),s=n(2492),a=n(3702).CONSTRUCTOR,u=n(9478),c=o("Promise"),l=i&&!a;r({target:"Promise",stat:!0,forced:i||a},{resolve:function(e){return u(l&&this===c?s:this,e)}})},4916:function(e,t,n){"use strict";var r=n(2109),o=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},9714:function(e,t,n){"use strict";var r=n(6530).PROPER,o=n(8052),i=n(9670),s=n(1340),a=n(7293),u=n(4706),c="toString",l=RegExp.prototype[c],d=a((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),p=r&&l.name!=c;(d||p)&&o(RegExp.prototype,c,(function(){var e=i(this);return"/"+s(e.source)+"/"+s(u(e))}),{unsafe:!0})},2023:function(e,t,n){"use strict";var r=n(2109),o=n(1702),i=n(3929),s=n(4488),a=n(1340),u=n(4964),c=o("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~c(a(s(this)),a(i(e)),arguments.length>1?arguments[1]:void 0)}})},8783:function(e,t,n){"use strict";var r=n(8710).charAt,o=n(1340),i=n(9909),s=n(1656),a=n(6178),u="String Iterator",c=i.set,l=i.getterFor(u);s(String,"String",(function(e){c(this,{type:u,string:o(e),index:0})}),(function(){var e,t=l(this),n=t.string,o=t.index;return o>=n.length?a(void 0,!0):(e=r(n,o),t.index+=e.length,a(e,!1))}))},4032:function(e,t,n){"use strict";var r=n(2109),o=n(7854),i=n(6916),s=n(1702),a=n(1913),u=n(9781),c=n(6293),l=n(7293),d=n(2597),p=n(7976),f=n(9670),h=n(5656),_=n(4948),E=n(1340),v=n(9114),g=n(30),m=n(1956),y=n(8006),O=n(1156),T=n(5181),R=n(1236),I=n(3070),S=n(6048),C=n(5296),N=n(8052),b=n(7045),A=n(2309),M=n(6200),w=n(3501),L=n(9711),U=n(5112),P=n(6061),x=n(6800),k=n(6532),D=n(8003),H=n(9909),B=n(2092).forEach,G=M("hidden"),F="Symbol",j="prototype",W=H.set,q=H.getterFor(F),K=Object[j],V=o.Symbol,J=V&&V[j],z=o.TypeError,Y=o.QObject,X=R.f,Z=I.f,Q=O.f,$=C.f,ee=s([].push),te=A("symbols"),ne=A("op-symbols"),re=A("wks"),oe=!Y||!Y[j]||!Y[j].findChild,ie=u&&l((function(){return 7!=g(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=X(K,t);r&&delete K[t],Z(e,t,n),r&&e!==K&&Z(K,t,r)}:Z,se=function(e,t){var n=te[e]=g(J);return W(n,{type:F,tag:e,description:t}),u||(n.description=t),n},ae=function(e,t,n){e===K&&ae(ne,t,n),f(e);var r=_(t);return f(n),d(te,r)?(n.enumerable?(d(e,G)&&e[G][r]&&(e[G][r]=!1),n=g(n,{enumerable:v(0,!1)})):(d(e,G)||Z(e,G,v(1,{})),e[G][r]=!0),ie(e,r,n)):Z(e,r,n)},ue=function(e,t){f(e);var n=h(t),r=m(n).concat(pe(n));return B(r,(function(t){u&&!i(ce,n,t)||ae(e,t,n[t])})),e},ce=function(e){var t=_(e),n=i($,this,t);return!(this===K&&d(te,t)&&!d(ne,t))&&(!(n||!d(this,t)||!d(te,t)||d(this,G)&&this[G][t])||n)},le=function(e,t){var n=h(e),r=_(t);if(n!==K||!d(te,r)||d(ne,r)){var o=X(n,r);return!o||!d(te,r)||d(n,G)&&n[G][r]||(o.enumerable=!0),o}},de=function(e){var t=Q(h(e)),n=[];return B(t,(function(e){d(te,e)||d(w,e)||ee(n,e)})),n},pe=function(e){var t=e===K,n=Q(t?ne:h(e)),r=[];return B(n,(function(e){!d(te,e)||t&&!d(K,e)||ee(r,te[e])})),r};c||(V=function(){if(p(J,this))throw z("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?E(arguments[0]):void 0,t=L(e),n=function(e){this===K&&i(n,ne,e),d(this,G)&&d(this[G],t)&&(this[G][t]=!1),ie(this,t,v(1,e))};return u&&oe&&ie(K,t,{configurable:!0,set:n}),se(t,e)},N(J=V[j],"toString",(function(){return q(this).tag})),N(V,"withoutSetter",(function(e){return se(L(e),e)})),C.f=ce,I.f=ae,S.f=ue,R.f=le,y.f=O.f=de,T.f=pe,P.f=function(e){return se(U(e),e)},u&&(b(J,"description",{configurable:!0,get:function(){return q(this).description}}),a||N(K,"propertyIsEnumerable",ce,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),B(m(re),(function(e){x(e)})),r({target:F,stat:!0,forced:!c},{useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(e,t){return void 0===t?g(e):ue(g(e),t)},defineProperty:ae,defineProperties:ue,getOwnPropertyDescriptor:le}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:de}),k(),D(V,F),w[G]=!0},1817:function(e,t,n){"use strict";var r=n(2109),o=n(9781),i=n(7854),s=n(1702),a=n(2597),u=n(614),c=n(7976),l=n(1340),d=n(7045),p=n(9920),f=i.Symbol,h=f&&f.prototype;if(o&&u(f)&&(!("description"in h)||void 0!==f().description)){var _={},E=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(h,this)?new f(e):void 0===e?f():f(e);return""===e&&(_[t]=!0),t};p(E,f),E.prototype=h,h.constructor=E;var v="Symbol(test)"==String(f("test")),g=s(h.valueOf),m=s(h.toString),y=/^Symbol\((.*)\)[^)]+$/,O=s("".replace),T=s("".slice);d(h,"description",{configurable:!0,get:function(){var e=g(this);if(a(_,e))return"";var t=m(e),n=v?T(t,7,-1):O(t,y,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:E})}},763:function(e,t,n){var r=n(2109),o=n(5005),i=n(2597),s=n(1340),a=n(2309),u=n(2015),c=a("string-to-symbol-registry"),l=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=s(e);if(i(c,t))return c[t];var n=o("Symbol")(t);return c[t]=n,l[n]=t,n}})},2165:function(e,t,n){n(6800)("iterator")},2526:function(e,t,n){n(4032),n(763),n(6620),n(8862),n(9660)},6620:function(e,t,n){var r=n(2109),o=n(2597),i=n(2190),s=n(6330),a=n(2309),u=n(2015),c=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!i(e))throw TypeError(s(e)+" is not a symbol");if(o(c,e))return c[e]}})},2990:function(e,t,n){"use strict";var r=n(1702),o=n(260),i=r(n(1048)),s=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(e,t){return i(s(this),e,t,arguments.length>2?arguments[2]:void 0)}))},8927:function(e,t,n){"use strict";var r=n(260),o=n(2092).every,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3105:function(e,t,n){"use strict";var r=n(260),o=n(1285),i=n(4599),s=n(648),a=n(6916),u=n(1702),c=n(7293),l=r.aTypedArray,d=r.exportTypedArrayMethod,p=u("".slice);d("fill",(function(e){var t=arguments.length;l(this);var n="Big"===p(s(this),0,3)?i(e):+e;return a(o,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},5035:function(e,t,n){"use strict";var r=n(260),o=n(2092).filter,i=n(3074),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(e){var t=o(s(this),e,arguments.length>1?arguments[1]:void 0);return i(this,t)}))},7174:function(e,t,n){"use strict";var r=n(260),o=n(2092).findIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},4345:function(e,t,n){"use strict";var r=n(260),o=n(2092).find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2846:function(e,t,n){"use strict";var r=n(260),o=n(2092).forEach,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},8145:function(e,t,n){"use strict";var r=n(3832);(0,n(260).exportTypedArrayStaticMethod)("from",n(7321),r)},4731:function(e,t,n){"use strict";var r=n(260),o=n(1318).includes,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},7209:function(e,t,n){"use strict";var r=n(260),o=n(1318).indexOf,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},6319:function(e,t,n){"use strict";var r=n(7854),o=n(7293),i=n(1702),s=n(260),a=n(6992),u=n(5112)("iterator"),c=r.Uint8Array,l=i(a.values),d=i(a.keys),p=i(a.entries),f=s.aTypedArray,h=s.exportTypedArrayMethod,_=c&&c.prototype,E=!o((function(){_[u].call([1])})),v=!!_&&_.values&&_[u]===_.values&&"values"===_.values.name,g=function(){return l(f(this))};h("entries",(function(){return p(f(this))}),E),h("keys",(function(){return d(f(this))}),E),h("values",g,E||!v,{name:"values"}),h(u,g,E||!v,{name:"values"})},8867:function(e,t,n){"use strict";var r=n(260),o=n(1702),i=r.aTypedArray,s=r.exportTypedArrayMethod,a=o([].join);s("join",(function(e){return a(i(this),e)}))},7789:function(e,t,n){"use strict";var r=n(260),o=n(2104),i=n(6583),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return o(i,s(this),t>1?[e,arguments[1]]:[e])}))},3739:function(e,t,n){"use strict";var r=n(260),o=n(2092).map,i=n(6304),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("map",(function(e){return o(s(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(i(e))(t)}))}))},4483:function(e,t,n){"use strict";var r=n(260),o=n(3671).right,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},9368:function(e,t,n){"use strict";var r=n(260),o=n(3671).left,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},2056:function(e,t,n){"use strict";var r=n(260),o=r.aTypedArray,i=r.exportTypedArrayMethod,s=Math.floor;i("reverse",(function(){for(var e,t=this,n=o(t).length,r=s(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t}))},3462:function(e,t,n){"use strict";var r=n(7854),o=n(6916),i=n(260),s=n(6244),a=n(4590),u=n(7908),c=n(7293),l=r.RangeError,d=r.Int8Array,p=d&&d.prototype,f=p&&p.set,h=i.aTypedArray,_=i.exportTypedArrayMethod,E=!c((function(){var e=new Uint8ClampedArray(2);return o(f,e,{length:1,0:3},1),3!==e[1]})),v=E&&i.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));_("set",(function(e){h(this);var t=a(arguments.length>1?arguments[1]:void 0,1),n=u(e);if(E)return o(f,this,n,t);var r=this.length,i=s(n),c=0;if(i+t>r)throw l("Wrong length");for(;c<i;)this[t+c]=n[c++]}),!E||v)},678:function(e,t,n){"use strict";var r=n(260),o=n(6304),i=n(7293),s=n(206),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("slice",(function(e,t){for(var n=s(a(this),e,t),r=o(this),i=0,u=n.length,c=new r(u);u>i;)c[i]=n[i++];return c}),i((function(){new Int8Array(1).slice()})))},7462:function(e,t,n){"use strict";var r=n(260),o=n(2092).some,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3824:function(e,t,n){"use strict";var r=n(7854),o=n(1470),i=n(7293),s=n(9662),a=n(4362),u=n(260),c=n(8886),l=n(256),d=n(7392),p=n(8008),f=u.aTypedArray,h=u.exportTypedArrayMethod,_=r.Uint16Array,E=_&&o(_.prototype.sort),v=!(!E||i((function(){E(new _(2),null)}))&&i((function(){E(new _(2),{})}))),g=!!E&&!i((function(){if(d)return d<74;if(c)return c<67;if(l)return!0;if(p)return p<602;var e,t,n=new _(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(E(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));h("sort",(function(e){return void 0!==e&&s(e),g?E(this,e):a(f(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!g||v)},5021:function(e,t,n){"use strict";var r=n(260),o=n(7466),i=n(1400),s=n(6304),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=a(this),r=n.length,u=i(e,r);return new(s(n))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,o((void 0===t?r:i(t,r))-u))}))},2974:function(e,t,n){"use strict";var r=n(7854),o=n(2104),i=n(260),s=n(7293),a=n(206),u=r.Int8Array,c=i.aTypedArray,l=i.exportTypedArrayMethod,d=[].toLocaleString,p=!!u&&s((function(){d.call(new u(1))}));l("toLocaleString",(function(){return o(d,p?a(c(this)):c(this),a(arguments))}),s((function(){return[1,2].toLocaleString()!=new u([1,2]).toLocaleString()}))||!s((function(){u.prototype.toLocaleString.call([1,2])})))},5016:function(e,t,n){"use strict";var r=n(260).exportTypedArrayMethod,o=n(7293),i=n(7854),s=n(1702),a=i.Uint8Array,u=a&&a.prototype||{},c=[].toString,l=s([].join);o((function(){c.call({})}))&&(c=function(){return l(this)});var d=u.toString!=c;r("toString",c,d)},2472:function(e,t,n){n(9843)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},4747:function(e,t,n){var r=n(7854),o=n(8324),i=n(8509),s=n(8533),a=n(8880),u=function(e){if(e&&e.forEach!==s)try{a(e,"forEach",s)}catch(t){e.forEach=s}};for(var c in o)o[c]&&u(r[c]&&r[c].prototype);u(i)},3948:function(e,t,n){var r=n(7854),o=n(8324),i=n(8509),s=n(6992),a=n(8880),u=n(5112),c=u("iterator"),l=u("toStringTag"),d=s.values,p=function(e,t){if(e){if(e[c]!==d)try{a(e,c,d)}catch(t){e[c]=d}if(e[l]||a(e,l,t),o[t])for(var n in s)if(e[n]!==s[n])try{a(e,n,s[n])}catch(t){e[n]=s[n]}}};for(var f in o)p(r[f]&&r[f].prototype,f);p(i,"DOMTokenList")},6815:function(e,t,n){var r=n(2109),o=n(7854),i=n(7152)(o.setInterval,!0);r({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},8417:function(e,t,n){var r=n(2109),o=n(7854),i=n(7152)(o.setTimeout,!0);r({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},2564:function(e,t,n){n(6815),n(8417)},5556:function(e,t,n){"use strict";n(6992);var r=n(2109),o=n(7854),i=n(6916),s=n(1702),a=n(9781),u=n(5143),c=n(8052),l=n(7045),d=n(9190),p=n(8003),f=n(3061),h=n(9909),_=n(5787),E=n(614),v=n(2597),g=n(9974),m=n(648),y=n(9670),O=n(111),T=n(1340),R=n(30),I=n(9114),S=n(4121),C=n(1246),N=n(8053),b=n(5112),A=n(4362),M=b("iterator"),w="URLSearchParams",L=w+"Iterator",U=h.set,P=h.getterFor(w),x=h.getterFor(L),k=Object.getOwnPropertyDescriptor,D=function(e){if(!a)return o[e];var t=k(o,e);return t&&t.value},H=D("fetch"),B=D("Request"),G=D("Headers"),F=B&&B.prototype,j=G&&G.prototype,W=o.RegExp,q=o.TypeError,K=o.decodeURIComponent,V=o.encodeURIComponent,J=s("".charAt),z=s([].join),Y=s([].push),X=s("".replace),Z=s([].shift),Q=s([].splice),$=s("".split),ee=s("".slice),te=/\+/g,ne=Array(4),re=function(e){return ne[e-1]||(ne[e-1]=W("((?:%[\\da-f]{2}){"+e+"})","gi"))},oe=function(e){try{return K(e)}catch(t){return e}},ie=function(e){var t=X(e,te," "),n=4;try{return K(t)}catch(e){for(;n;)t=X(t,re(n--),oe);return t}},se=/[!'()~]|%20/g,ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ue=function(e){return ae[e]},ce=function(e){return X(V(e),se,ue)},le=f((function(e,t){U(this,{type:L,iterator:S(P(e).entries),kind:t})}),"Iterator",(function(){var e=x(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),de=function(e){this.entries=[],this.url=null,void 0!==e&&(O(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===J(e,0)?ee(e,1):e:T(e)))};de.prototype={type:w,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,s,a,u,c=C(e);if(c)for(n=(t=S(e,c)).next;!(r=i(n,t)).done;){if(s=(o=S(y(r.value))).next,(a=i(s,o)).done||(u=i(s,o)).done||!i(s,o).done)throw q("Expected sequence with length 2");Y(this.entries,{key:T(a.value),value:T(u.value)})}else for(var l in e)v(e,l)&&Y(this.entries,{key:l,value:T(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=$(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=$(t,"="),Y(this.entries,{key:ie(Z(n)),value:ie(z(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Y(n,ce(e.key)+"="+ce(e.value));return z(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var pe=function(){_(this,fe);var e=U(this,new de(arguments.length>0?arguments[0]:void 0));a||(this.length=e.entries.length)},fe=pe.prototype;if(d(fe,{append:function(e,t){N(arguments.length,2);var n=P(this);Y(n.entries,{key:T(e),value:T(t)}),a||this.length++,n.updateURL()},delete:function(e){N(arguments.length,1);for(var t=P(this),n=t.entries,r=T(e),o=0;o<n.length;)n[o].key===r?Q(n,o,1):o++;a||(this.length=n.length),t.updateURL()},get:function(e){N(arguments.length,1);for(var t=P(this).entries,n=T(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){N(arguments.length,1);for(var t=P(this).entries,n=T(e),r=[],o=0;o<t.length;o++)t[o].key===n&&Y(r,t[o].value);return r},has:function(e){N(arguments.length,1);for(var t=P(this).entries,n=T(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){N(arguments.length,1);for(var n,r=P(this),o=r.entries,i=!1,s=T(e),u=T(t),c=0;c<o.length;c++)(n=o[c]).key===s&&(i?Q(o,c--,1):(i=!0,n.value=u));i||Y(o,{key:s,value:u}),a||(this.length=o.length),r.updateURL()},sort:function(){var e=P(this);A(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=P(this).entries,r=g(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new le(this,"keys")},values:function(){return new le(this,"values")},entries:function(){return new le(this,"entries")}},{enumerable:!0}),c(fe,M,fe.entries,{name:"entries"}),c(fe,"toString",(function(){return P(this).serialize()}),{enumerable:!0}),a&&l(fe,"size",{get:function(){return P(this).entries.length},configurable:!0,enumerable:!0}),p(pe,w),r({global:!0,constructor:!0,forced:!u},{URLSearchParams:pe}),!u&&E(G)){var he=s(j.has),_e=s(j.set),Ee=function(e){if(O(e)){var t,n=e.body;if(m(n)===w)return t=e.headers?new G(e.headers):new G,he(t,"content-type")||_e(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),R(e,{body:I(0,T(n)),headers:I(0,t)})}return e};if(E(H)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return H(e,arguments.length>1?Ee(arguments[1]):{})}}),E(B)){var ve=function(e){return _(this,F),new B(e,arguments.length>1?Ee(arguments[1]):{})};F.constructor=ve,ve.prototype=F,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ve})}}e.exports={URLSearchParams:pe,getState:P}},1637:function(e,t,n){n(5556)},8789:function(e,t,n){"use strict";n(8783);var r,o=n(2109),i=n(9781),s=n(5143),a=n(7854),u=n(9974),c=n(1702),l=n(8052),d=n(7045),p=n(5787),f=n(2597),h=n(1574),_=n(8457),E=n(1589),v=n(8710).codeAt,g=n(3197),m=n(1340),y=n(8003),O=n(8053),T=n(5556),R=n(9909),I=R.set,S=R.getterFor("URL"),C=T.URLSearchParams,N=T.getState,b=a.URL,A=a.TypeError,M=a.parseInt,w=Math.floor,L=Math.pow,U=c("".charAt),P=c(/./.exec),x=c([].join),k=c(1..toString),D=c([].pop),H=c([].push),B=c("".replace),G=c([].shift),F=c("".split),j=c("".slice),W=c("".toLowerCase),q=c([].unshift),K="Invalid scheme",V="Invalid host",J="Invalid port",z=/[a-z]/i,Y=/[\d+-.a-z]/i,X=/\d/,Z=/^0x/i,Q=/^[0-7]+$/,$=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ne=/[\0\t\n\r #/:<>?@[\\\]^|]/,re=/^[\u0000-\u0020]+/,oe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ie=/[\t\n\r]/g,se=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)q(t,e%256),e=w(e/256);return x(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=k(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ae={},ue=h({},ae,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=h({},ue,{"#":1,"?":1,"{":1,"}":1}),le=h({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),de=function(e,t){var n=v(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},pe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},fe=function(e,t){var n;return 2==e.length&&P(z,U(e,0))&&(":"==(n=U(e,1))||!t&&"|"==n)},he=function(e){var t;return e.length>1&&fe(j(e,0,2))&&(2==e.length||"/"===(t=U(e,2))||"\\"===t||"?"===t||"#"===t)},_e=function(e){return"."===e||"%2e"===W(e)},Ee={},ve={},ge={},me={},ye={},Oe={},Te={},Re={},Ie={},Se={},Ce={},Ne={},be={},Ae={},Me={},we={},Le={},Ue={},Pe={},xe={},ke={},De=function(e,t,n){var r,o,i,s=m(e);if(t){if(o=this.parse(s))throw A(o);this.searchParams=null}else{if(void 0!==n&&(r=new De(n,!0)),o=this.parse(s,null,r))throw A(o);(i=N(new C)).bindURL(this),this.searchParams=i}};De.prototype={type:"URL",parse:function(e,t,n){var o,i,s,a,u,c=this,l=t||Ee,d=0,p="",h=!1,v=!1,g=!1;for(e=m(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=B(e,re,""),e=B(e,oe,"$1")),e=B(e,ie,""),o=_(e);d<=o.length;){switch(i=o[d],l){case Ee:if(!i||!P(z,i)){if(t)return K;l=ge;continue}p+=W(i),l=ve;break;case ve:if(i&&(P(Y,i)||"+"==i||"-"==i||"."==i))p+=W(i);else{if(":"!=i){if(t)return K;p="",l=ge,d=0;continue}if(t&&(c.isSpecial()!=f(pe,p)||"file"==p&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=p,t)return void(c.isSpecial()&&pe[c.scheme]==c.port&&(c.port=null));p="","file"==c.scheme?l=Ae:c.isSpecial()&&n&&n.scheme==c.scheme?l=me:c.isSpecial()?l=Re:"/"==o[d+1]?(l=ye,d++):(c.cannotBeABaseURL=!0,H(c.path,""),l=Pe)}break;case ge:if(!n||n.cannotBeABaseURL&&"#"!=i)return K;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=E(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=ke;break}l="file"==n.scheme?Ae:Oe;continue;case me:if("/"!=i||"/"!=o[d+1]){l=Oe;continue}l=Ie,d++;break;case ye:if("/"==i){l=Se;break}l=Ue;continue;case Oe:if(c.scheme=n.scheme,i==r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=E(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())l=Te;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=E(n.path),c.query="",l=xe;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=E(n.path),c.path.length--,l=Ue;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=E(n.path),c.query=n.query,c.fragment="",l=ke}break;case Te:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,l=Ue;continue}l=Se}else l=Ie;break;case Re:if(l=Ie,"/"!=i||"/"!=U(p,d+1))continue;d++;break;case Ie:if("/"!=i&&"\\"!=i){l=Se;continue}break;case Se:if("@"==i){h&&(p="%40"+p),h=!0,s=_(p);for(var y=0;y<s.length;y++){var O=s[y];if(":"!=O||g){var T=de(O,le);g?c.password+=T:c.username+=T}else g=!0}p=""}else if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==p)return"Invalid authority";d-=_(p).length+1,p="",l=Ce}else p+=i;break;case Ce:case Ne:if(t&&"file"==c.scheme){l=we;continue}if(":"!=i||v){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==p)return V;if(t&&""==p&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(p))return a;if(p="",l=Le,t)return;continue}"["==i?v=!0:"]"==i&&(v=!1),p+=i}else{if(""==p)return V;if(a=c.parseHost(p))return a;if(p="",l=be,t==Ne)return}break;case be:if(!P(X,i)){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=p){var R=M(p,10);if(R>65535)return J;c.port=c.isSpecial()&&R===pe[c.scheme]?null:R,p=""}if(t)return;l=Le;continue}return J}p+=i;break;case Ae:if(c.scheme="file","/"==i||"\\"==i)l=Me;else{if(!n||"file"!=n.scheme){l=Ue;continue}if(i==r)c.host=n.host,c.path=E(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=E(n.path),c.query="",l=xe;else{if("#"!=i){he(x(E(o,d),""))||(c.host=n.host,c.path=E(n.path),c.shortenPath()),l=Ue;continue}c.host=n.host,c.path=E(n.path),c.query=n.query,c.fragment="",l=ke}}break;case Me:if("/"==i||"\\"==i){l=we;break}n&&"file"==n.scheme&&!he(x(E(o,d),""))&&(fe(n.path[0],!0)?H(c.path,n.path[0]):c.host=n.host),l=Ue;continue;case we:if(i==r||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&fe(p))l=Ue;else if(""==p){if(c.host="",t)return;l=Le}else{if(a=c.parseHost(p))return a;if("localhost"==c.host&&(c.host=""),t)return;p="",l=Le}continue}p+=i;break;case Le:if(c.isSpecial()){if(l=Ue,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=r&&(l=Ue,"/"!=i))continue}else c.fragment="",l=ke;else c.query="",l=xe;break;case Ue:if(i==r||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(u=W(u=p))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||H(c.path,"")):_e(p)?"/"==i||"\\"==i&&c.isSpecial()||H(c.path,""):("file"==c.scheme&&!c.path.length&&fe(p)&&(c.host&&(c.host=""),p=U(p,0)+":"),H(c.path,p)),p="","file"==c.scheme&&(i==r||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)G(c.path);"?"==i?(c.query="",l=xe):"#"==i&&(c.fragment="",l=ke)}else p+=de(i,ce);break;case Pe:"?"==i?(c.query="",l=xe):"#"==i?(c.fragment="",l=ke):i!=r&&(c.path[0]+=de(i,ae));break;case xe:t||"#"!=i?i!=r&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":de(i,ae)):(c.fragment="",l=ke);break;case ke:i!=r&&(c.fragment+=de(i,ue))}d++}},parseHost:function(e){var t,n,r;if("["==U(e,0)){if("]"!=U(e,e.length-1))return V;if(t=function(e){var t,n,r,o,i,s,a,u=[0,0,0,0,0,0,0,0],c=0,l=null,d=0,p=function(){return U(e,d)};if(":"==p()){if(":"!=U(e,1))return;d+=2,l=++c}for(;p();){if(8==c)return;if(":"!=p()){for(t=n=0;n<4&&P(ee,p());)t=16*t+M(p(),16),d++,n++;if("."==p()){if(0==n)return;if(d-=n,c>6)return;for(r=0;p();){if(o=null,r>0){if(!("."==p()&&r<4))return;d++}if(!P(X,p()))return;for(;P(X,p());){if(i=M(p(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;d++}u[c]=256*u[c]+o,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==p()){if(d++,!p())return}else if(p())return;u[c++]=t}else{if(null!==l)return;d++,l=++c}}if(null!==l)for(s=c-l,c=7;0!=c&&s>0;)a=u[c],u[c--]=u[l+s-1],u[l+--s]=a;else if(8!=c)return;return u}(j(e,1,-1)),!t)return V;this.host=t}else if(this.isSpecial()){if(e=g(e),P(te,e))return V;if(t=function(e){var t,n,r,o,i,s,a,u=F(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(o=u[r]))return e;if(i=10,o.length>1&&"0"==U(o,0)&&(i=P(Z,o)?16:8,o=j(o,8==i?1:2)),""===o)s=0;else{if(!P(10==i?$:8==i?Q:ee,o))return e;s=M(o,i)}H(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=L(256,5-t))return null}else if(s>255)return null;for(a=D(n),r=0;r<n.length;r++)a+=n[r]*L(256,3-r);return a}(e),null===t)return V;this.host=t}else{if(P(ne,e))return V;for(t="",n=_(e),r=0;r<n.length;r++)t+=de(n[r],ae);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return f(pe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&fe(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,s=e.path,a=e.query,u=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=se(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+x(s,"/"):"",null!==a&&(c+="?"+a),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw A(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new He(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+se(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(m(e)+":",Ee)},getUsername:function(){return this.username},setUsername:function(e){var t=_(m(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=de(t[n],le)}},getPassword:function(){return this.password},setPassword:function(e){var t=_(m(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=de(t[n],le)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?se(e):se(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ce)},getHostname:function(){var e=this.host;return null===e?"":se(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ne)},getPort:function(){var e=this.port;return null===e?"":m(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=m(e))?this.port=null:this.parse(e,be))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+x(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Le))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=m(e))?this.query=null:("?"==U(e,0)&&(e=j(e,1)),this.query="",this.parse(e,xe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=m(e))?("#"==U(e,0)&&(e=j(e,1)),this.fragment="",this.parse(e,ke)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var He=function(e){var t=p(this,Be),n=O(arguments.length,1)>1?arguments[1]:void 0,r=I(t,new De(e,!1,n));i||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Be=He.prototype,Ge=function(e,t){return{get:function(){return S(this)[e]()},set:t&&function(e){return S(this)[t](e)},configurable:!0,enumerable:!0}};if(i&&(d(Be,"href",Ge("serialize","setHref")),d(Be,"origin",Ge("getOrigin")),d(Be,"protocol",Ge("getProtocol","setProtocol")),d(Be,"username",Ge("getUsername","setUsername")),d(Be,"password",Ge("getPassword","setPassword")),d(Be,"host",Ge("getHost","setHost")),d(Be,"hostname",Ge("getHostname","setHostname")),d(Be,"port",Ge("getPort","setPort")),d(Be,"pathname",Ge("getPathname","setPathname")),d(Be,"search",Ge("getSearch","setSearch")),d(Be,"searchParams",Ge("getSearchParams")),d(Be,"hash",Ge("getHash","setHash"))),l(Be,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(Be,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),b){var Fe=b.createObjectURL,je=b.revokeObjectURL;Fe&&l(He,"createObjectURL",u(Fe,b)),je&&l(He,"revokeObjectURL",u(je,b))}y(He,"URL"),o({global:!0,constructor:!0,forced:!s,sham:!i},{URL:He})},285:function(e,t,n){n(8789)},3720:function(e){e.exports=n;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function n(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function r(e){return!0===(e&&e.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=r;var o={},i={};function s(e,t){var n,r,s;return t?(s=0<=(e>>>=0)&&e<256)&&(r=i[e])?r:(n=u(e,(0|e)<0?-1:0,!0),s&&(i[e]=n),n):(s=-128<=(e|=0)&&e<128)&&(r=o[e])?r:(n=u(e,e<0?-1:0,!1),s&&(o[e]=n),n)}function a(e,t){if(isNaN(e))return t?v:E;if(t){if(e<0)return v;if(e>=f)return T}else{if(e<=-h)return R;if(e+1>=h)return O}return e<0?a(-e,t).neg():u(e%p|0,e/p|0,t)}function u(e,t,r){return new n(e,t,r)}n.fromInt=s,n.fromNumber=a,n.fromBits=u;var c=Math.pow;function l(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return E;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return l(e.substring(1),t,n).neg();for(var o=a(c(n,8)),i=E,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),d=parseInt(e.substring(s,s+u),n);if(u<8){var p=a(c(n,u));i=i.mul(p).add(a(d))}else i=(i=i.mul(o)).add(a(d))}return i.unsigned=t,i}function d(e,t){return"number"==typeof e?a(e,t):"string"==typeof e?l(e,t):u(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}n.fromString=l,n.fromValue=d;var p=4294967296,f=p*p,h=f/2,_=s(1<<24),E=s(0);n.ZERO=E;var v=s(0,!0);n.UZERO=v;var g=s(1);n.ONE=g;var m=s(1,!0);n.UONE=m;var y=s(-1);n.NEG_ONE=y;var O=u(-1,2147483647,!1);n.MAX_VALUE=O;var T=u(-1,-1,!0);n.MAX_UNSIGNED_VALUE=T;var R=u(0,-2147483648,!1);n.MIN_VALUE=R;var I=n.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(R)){var t=a(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=a(c(e,6),this.unsigned),i=this,s="";;){var u=i.div(o),l=(i.sub(u.mul(o)).toInt()>>>0).toString(e);if((i=u).isZero())return l+s;for(;l.length<6;)l="0"+l;s=""+l+s}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(R)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return 1==(1&this.low)},I.isEven=function(){return 0==(1&this.low)},I.equals=function(e){return r(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(e){if(r(e)||(e=d(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(R)?R:this.not().add(g)},I.neg=I.negate,I.add=function(e){r(e)||(e=d(e));var t=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=e.high>>>16,a=65535&e.high,c=e.low>>>16,l=0,p=0,f=0,h=0;return f+=(h+=i+(65535&e.low))>>>16,p+=(f+=o+c)>>>16,l+=(p+=n+a)>>>16,l+=t+s,u((f&=65535)<<16|(h&=65535),(l&=65535)<<16|(p&=65535),this.unsigned)},I.subtract=function(e){return r(e)||(e=d(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return E;if(r(e)||(e=d(e)),t)return u(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return E;if(this.eq(R))return e.isOdd()?R:E;if(e.eq(R))return this.isOdd()?R:E;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(_)&&e.lt(_))return a(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,i=this.low>>>16,s=65535&this.low,c=e.high>>>16,l=65535&e.high,p=e.low>>>16,f=65535&e.low,h=0,v=0,g=0,m=0;return g+=(m+=s*f)>>>16,v+=(g+=i*f)>>>16,g&=65535,v+=(g+=s*p)>>>16,h+=(v+=o*f)>>>16,v&=65535,h+=(v+=i*p)>>>16,v&=65535,h+=(v+=s*l)>>>16,h+=n*f+o*p+i*l+s*c,u((g&=65535)<<16|(m&=65535),(h&=65535)<<16|(v&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(r(e)||(e=d(e)),e.isZero())throw Error("division by zero");var n,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?u((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?v:E;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return v;if(e.gt(this.shru(1)))return m;i=v}else{if(this.eq(R))return e.eq(g)||e.eq(y)?R:e.eq(R)?g:(n=this.shr(1).div(e).shl(1)).eq(E)?e.isNegative()?g:y:(o=this.sub(e.mul(n)),i=n.add(o.div(e)));if(e.eq(R))return this.unsigned?v:E;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=E}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),l=s<=48?1:c(2,s-48),p=a(n),f=p.mul(e);f.isNegative()||f.gt(o);)f=(p=a(n-=l,this.unsigned)).mul(e);p.isZero()&&(p=g),i=i.add(p),o=o.sub(f)}return i},I.div=I.divide,I.modulo=function(e){return r(e)||(e=d(e)),t?u((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return u(~this.low,~this.high,this.unsigned)},I.and=function(e){return r(e)||(e=d(e)),u(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return r(e)||(e=d(e)),u(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return r(e)||(e=d(e)),u(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):u(0,this.low<<e-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):u(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(r(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?u(this.low>>>e|t<<32-e,t>>>e,this.unsigned):u(32===e?t:t>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},I.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},3281:function(e,t,n){"use strict";e.exports=n(9050)},2967:function(e){"use strict";e.exports=r;var t,n=/\/|\./;function r(e,t){n.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),r[e]=t}r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),r("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:t}),r("empty",{Empty:{fields:{}}}),r("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),r("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),r("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),r.get=function(e){return r[e]||null}},3996:function(e,t,n){"use strict";var r=t,o=n(7025),i=n(9935);function s(e,t,n,r){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",r);for(var i=t.resolvedType.values,s=Object.keys(i),a=0;a<s.length;++a)t.repeated&&i[s[a]]===t.typeDefault&&e("default:"),e("case%j:",s[a])("case %i:",i[s[a]])("m%s=%j",r,i[s[a]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,n,r);else{var u=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,u)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,u?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function a(e,t,n,r){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,n,r,r):e("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}r.fromObject=function(e){var t=e.fieldsArray,n=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r<t.length;++r){var a=t[r].resolve(),u=i.safeProp(a.name);a.map?(n("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),s(n,a,r,u+"[ks[i]]")("}")("}")):a.repeated?(n("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),s(n,a,r,u+"[i]")("}")("}")):(a.resolvedType instanceof o||n("if(d%s!=null){",u),s(n,a,r,u),a.resolvedType instanceof o||n("}"))}return n("return m")},r.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var n=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],s=[],u=[],c=0;c<t.length;++c)t[c].partOf||(t[c].resolve().repeated?r:t[c].map?s:u).push(t[c]);if(r.length){for(n("if(o.arrays||o.defaults){"),c=0;c<r.length;++c)n("d%s=[]",i.safeProp(r[c].name));n("}")}if(s.length){for(n("if(o.objects||o.defaults){"),c=0;c<s.length;++c)n("d%s={}",i.safeProp(s[c].name));n("}")}if(u.length){for(n("if(o.defaults){"),c=0;c<u.length;++c){var l=u[c],d=i.safeProp(l.name);if(l.resolvedType instanceof o)n("d%s=o.enums===String?%j:%j",d,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",d)("}else")("d%s=o.longs===String?%j:%i",d,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var p="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";n("if(o.bytes===String)d%s=%j",d,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",d,p)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",d,d)("}")}else n("d%s=%j",d,l.typeDefault)}n("}")}var f=!1;for(c=0;c<t.length;++c){l=t[c];var h=e._fieldsArray.indexOf(l);d=i.safeProp(l.name),l.map?(f||(f=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",d,d)("d%s={}",d)("for(var j=0;j<ks2.length;++j){"),a(n,l,h,d+"[ks2[j]]")("}")):l.repeated?(n("if(m%s&&m%s.length){",d,d)("d%s=[]",d)("for(var j=0;j<m%s.length;++j){",d),a(n,l,h,d+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",d,l.name),a(n,l,h,d),l.partOf&&n("if(o.oneofs)")("d%s=%j",i.safeProp(l.partOf.name),l.name)),n("}")}return n("return d")}},5305:function(e,t,n){"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var n=0;n<e.fieldsArray.length;++n){var a=e._fieldsArray[n].resolve(),u=a.resolvedType instanceof r?"int32":a.type,c="m"+i.safeProp(a.name);t("case %i:",a.id),a.map?(t("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[a.keyType]?t("k=%j",o.defaults[a.keyType]):t("k=null"),void 0!==o.defaults[u]?t("value=%j",o.defaults[u]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===o.basic[u]?t("value=types[%i].decode(r,r.uint32())",n):t("value=r.%s()",u),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',c):t("%s[k]=value",c)):a.repeated?(t("if(!(%s&&%s.length))",c,c)("%s=[]",c),void 0!==o.packed[u]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,u)("}else"),void 0===o.basic[u]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,n):t("%s.push(r.%s())",c,u)):void 0===o.basic[u]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,n):t("%s=r.%s()",c,u),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),n=0;n<e._fieldsArray.length;++n){var l=e._fieldsArray[n];l.required&&t("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",s(l))}return t("return m")};var r=n(7025),o=n(7063),i=n(9935);function s(e){return"missing required '"+e.name+"'"}},4928:function(e,t,n){"use strict";e.exports=function(e){for(var t,n=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),u=0;u<a.length;++u){var c=a[u].resolve(),l=e._fieldsArray.indexOf(c),d=c.resolvedType instanceof r?"int32":c.type,p=o.basic[d];t="m"+i.safeProp(c.name),c.map?(n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|o.mapKey[c.keyType],c.keyType),void 0===p?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,d,t),n("}")("}")):c.repeated?(n("if(%s!=null&&%s.length){",t,t),c.packed&&void 0!==o.packed[d]?n("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",d,t)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",t),void 0===p?s(n,c,l,t+"[i]"):n("w.uint32(%i).%s(%s[i])",(c.id<<3|p)>>>0,d,t)),n("}")):(c.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===p?s(n,c,l,t):n("w.uint32(%i).%s(%s)",(c.id<<3|p)>>>0,d,t))}return n("return w")};var r=n(7025),o=n(7063),i=n(9935);function s(e,t,n,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(t.id<<3|2)>>>0)}},7025:function(e,t,n){"use strict";e.exports=s;var r=n(3243);((s.prototype=Object.create(r.prototype)).constructor=s).className="Enum";var o=n(9313),i=n(9935);function s(e,t,n,o,i){if(r.call(this,e,n),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.reserved=void 0,t)for(var s=Object.keys(t),a=0;a<s.length;++a)"number"==typeof t[s[a]]&&(this.valuesById[this.values[s[a]]=t[s[a]]]=s[a])}s.fromJSON=function(e,t){var n=new s(e,t.values,t.options,t.comment,t.comments);return n.reserved=t.reserved,n},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,n){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=n||null,this},s.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},s.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},3548:function(e,t,n){"use strict";e.exports=c;var r=n(3243);((c.prototype=Object.create(r.prototype)).constructor=c).className="Field";var o,i=n(7025),s=n(7063),a=n(9935),u=/^required|optional|repeated$/;function c(e,t,n,o,i,c,l){if(a.isObject(o)?(l=i,c=o,o=i=void 0):a.isObject(i)&&(l=c,c=i,i=void 0),r.call(this,e,c),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(n))throw TypeError("type must be a string");if(void 0!==o&&!u.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=n,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[n],this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}c.fromJSON=function(e,t){return new c(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),c.prototype.setOption=function(e,t,n){return"packed"===e&&(this._packed=null),r.prototype.setOption.call(this,e,t,n)},c.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},c.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},c.d=function(e,t,n,r){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(o,i){a.decorateType(o.constructor).add(new c(i,e,t,n,{default:r}))}},c._configure=function(e){o=e}},8836:function(e,t,n){"use strict";var r=e.exports=n(9482);r.build="light",r.load=function(e,t,n){return"function"==typeof t?(n=t,t=new r.Root):t||(t=new r.Root),t.load(e,n)},r.loadSync=function(e,t){return t||(t=new r.Root),t.loadSync(e)},r.encoder=n(4928),r.decoder=n(5305),r.verifier=n(4497),r.converter=n(3996),r.ReflectionObject=n(3243),r.Namespace=n(9313),r.Root=n(9424),r.Enum=n(7025),r.Type=n(7645),r.Field=n(3548),r.OneOf=n(7598),r.MapField=n(6039),r.Service=n(7513),r.Method=n(4429),r.Message=n(8368),r.wrappers=n(1667),r.types=n(7063),r.util=n(9935),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},9482:function(e,t,n){"use strict";var r=t;function o(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(1173),r.BufferWriter=n(3155),r.Reader=n(1408),r.BufferReader=n(593),r.util=n(9693),r.rpc=n(5994),r.roots=n(5054),r.configure=o,o()},9050:function(e,t,n){"use strict";var r=e.exports=n(8836);r.build="full",r.tokenize=n(626),r.parse=n(2228),r.common=n(2967),r.Root._configure(r.Type,r.parse,r.common)},6039:function(e,t,n){"use strict";e.exports=s;var r=n(3548);((s.prototype=Object.create(r.prototype)).constructor=s).className="MapField";var o=n(7063),i=n(9935);function s(e,t,n,o,s,a){if(r.call(this,e,t,o,void 0,void 0,s,a),!i.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},s.d=function(e,t,n){return"function"==typeof n?n=i.decorateType(n).name:n&&"object"==typeof n&&(n=i.decorateEnum(n).name),function(r,o){i.decorateType(r.constructor).add(new s(o,e,t,n))}}},8368:function(e,t,n){"use strict";e.exports=o;var r=n(9693);function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)this[t[n]]=e[t[n]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},4429:function(e,t,n){"use strict";e.exports=i;var r=n(3243);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var o=n(9935);function i(e,t,n,i,s,a,u,c,l){if(o.isObject(s)?(u=s,s=a=void 0):o.isObject(a)&&(u=a,a=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(n))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");r.call(this,e,u),this.type=t||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=l}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},9313:function(e,t,n){"use strict";e.exports=d;var r=n(3243);((d.prototype=Object.create(r.prototype)).constructor=d).className="Namespace";var o,i,s,a=n(3548),u=n(7598),c=n(9935);function l(e,t){if(e&&e.length){for(var n={},r=0;r<e.length;++r)n[e[r].name]=e[r].toJSON(t);return n}}function d(e,t){r.call(this,e,t),this.nested=void 0,this._nestedArray=null}function p(e){return e._nestedArray=null,e}d.fromJSON=function(e,t){return new d(e,t.options).addJSON(t.nested)},d.arrayToJSON=l,d.isReservedId=function(e,t){if(e)for(var n=0;n<e.length;++n)if("string"!=typeof e[n]&&e[n][0]<=t&&e[n][1]>t)return!0;return!1},d.isReservedName=function(e,t){if(e)for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1},Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),d.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",l(this.nestedArray,e)])},d.prototype.addJSON=function(e){if(e)for(var t,n=Object.keys(e),r=0;r<n.length;++r)t=e[n[r]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?s.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:d.fromJSON)(n[r],t));return this},d.prototype.get=function(e){return this.nested&&this.nested[e]||null},d.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},d.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof o||e instanceof s||e instanceof i||e instanceof d||e instanceof u))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof d&&e instanceof d)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var n=t.nestedArray,r=0;r<n.length;++r)e.add(n[r]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),p(this)},d.prototype.remove=function(e){if(!(e instanceof r))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),p(this)},d.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var n=this;e.length>0;){var r=e.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof d))throw Error("path conflicts with non-namespace objects")}else n.add(n=new d(r))}return t&&n.addJSON(t),n},d.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof d?e[t++].resolveAll():e[t++].resolve();return this.resolve()},d.prototype.lookup=function(e,t,n){if("boolean"==typeof t?(n=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var r=this.get(e[0]);if(r){if(1===e.length){if(!t||t.indexOf(r.constructor)>-1)return r}else if(r instanceof d&&(r=r.lookup(e.slice(1),t,!0)))return r}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof d&&(r=this._nestedArray[o].lookup(e,t,!0)))return r;return null===this.parent||n?null:this.parent.lookup(e,t)},d.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},d.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},d.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},d.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},d._configure=function(e,t,n){o=e,i=t,s=n}},3243:function(e,t,n){"use strict";e.exports=i,i.className="ReflectionObject";var r,o=n(9935);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof r&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof r&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,n){return n&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,n){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(n){var i=r.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var s=i[e];o.setProperty(s,n,t)}else(i={})[e]=o.setProperty({},n,t),r.push(i)}else{var a={};a[e]=t,r.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var n=Object.keys(e),r=0;r<n.length;++r)this.setOption(n[r],e[n[r]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){r=e}},7598:function(e,t,n){"use strict";e.exports=s;var r=n(3243);((s.prototype=Object.create(r.prototype)).constructor=s).className="OneOf";var o=n(3548),i=n(9935);function s(e,t,n,o){if(Array.isArray(t)||(n=t,t=void 0),r.call(this,e,n),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var n=e.get(this.oneof[t]);n&&!n.partOf&&(n.partOf=this,this.fieldsArray.push(n))}a(this)},s.prototype.onRemove=function(e){for(var t,n=0;n<this.fieldsArray.length;++n)(t=this.fieldsArray[n]).parent&&t.parent.remove(t);r.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,n){i.decorateType(t.constructor).add(new s(n,e)),Object.defineProperty(t,n,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},2228:function(e,t,n){"use strict";e.exports=I,I.filename=null,I.defaults={keepCase:!1};var r=n(626),o=n(9424),i=n(7645),s=n(3548),a=n(6039),u=n(7598),c=n(7025),l=n(7513),d=n(4429),p=n(7063),f=n(9935),h=/^[1-9][0-9]*$/,_=/^-?[1-9][0-9]*$/,E=/^0[x][0-9a-fA-F]+$/,v=/^-?0[x][0-9a-fA-F]+$/,g=/^0[0-7]+$/,m=/^-?0[0-7]+$/,y=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,O=/^[a-zA-Z_][a-zA-Z_0-9]*$/,T=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,R=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function I(e,t,n){t instanceof o||(n=t,t=new o),n||(n=I.defaults);var S,C,N,b,A,M=n.preferTrailingComment||!1,w=r(e,n.alternateCommentMode||!1),L=w.next,U=w.push,P=w.peek,x=w.skip,k=w.cmnt,D=!0,H=!1,B=t,G=n.keepCase?function(e){return e}:f.camelCase;function F(e,t,n){var r=I.filename;return n||(I.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+w.line+")")}function j(){var e,t=[];do{if('"'!==(e=L())&&"'"!==e)throw F(e);t.push(L()),x(e),e=P()}while('"'===e||"'"===e);return t.join("")}function W(e){var t=L();switch(t){case"'":case'"':return U(t),j();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var n=1;switch("-"===e.charAt(0)&&(n=-1,e=e.substring(1)),e){case"inf":case"INF":case"Inf":return n*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(h.test(e))return n*parseInt(e,10);if(E.test(e))return n*parseInt(e,16);if(g.test(e))return n*parseInt(e,8);if(y.test(e))return n*parseFloat(e);throw F(e,"number",!0)}(t)}catch(n){if(e&&T.test(t))return t;throw F(t,"value")}}function q(e,t){var n,r;do{!t||'"'!==(n=P())&&"'"!==n?e.push([r=K(L()),x("to",!0)?K(L()):r]):e.push(j())}while(x(",",!0));x(";")}function K(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw F(e,"id");if(_.test(e))return parseInt(e,10);if(v.test(e))return parseInt(e,16);if(m.test(e))return parseInt(e,8);throw F(e,"id")}function V(){if(void 0!==S)throw F("package");if(S=L(),!T.test(S))throw F(S,"name");B=B.define(S),x(";")}function J(){var e,t=P();switch(t){case"weak":e=N||(N=[]),L();break;case"public":L();default:e=C||(C=[])}t=j(),x(";"),e.push(t)}function z(){if(x("="),b=j(),!(H="proto3"===b)&&"proto2"!==b)throw F(b,"syntax");x(";")}function Y(e,t){switch(t){case"option":return Q(e,t),x(";"),!0;case"message":return function(e,t){if(!O.test(t=L()))throw F(t,"type name");var n=new i(t);X(n,(function(e){if(!Y(n,e))switch(e){case"map":!function(e){x("<");var t=L();if(void 0===p.mapKey[t])throw F(t,"type");x(",");var n=L();if(!T.test(n))throw F(n,"type");x(">");var r=L();if(!O.test(r))throw F(r,"name");x("=");var o=new a(G(r),K(L()),t,n);X(o,(function(e){if("option"!==e)throw F(e);Q(o,e),x(";")}),(function(){te(o)})),e.add(o)}(n);break;case"required":case"repeated":Z(n,e);break;case"optional":Z(n,H?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!O.test(t=L()))throw F(t,"name");var n=new u(G(t));X(n,(function(e){"option"===e?(Q(n,e),x(";")):(U(e),Z(n,"optional"))})),e.add(n)}(n,e);break;case"extensions":q(n.extensions||(n.extensions=[]));break;case"reserved":q(n.reserved||(n.reserved=[]),!0);break;default:if(!H||!T.test(e))throw F(e);U(e),Z(n,"optional")}})),e.add(n)}(e,t),!0;case"enum":return function(e,t){if(!O.test(t=L()))throw F(t,"name");var n=new c(t);X(n,(function(e){switch(e){case"option":Q(n,e),x(";");break;case"reserved":q(n.reserved||(n.reserved=[]),!0);break;default:!function(e,t){if(!O.test(t))throw F(t,"name");x("=");var n=K(L(),!0),r={};X(r,(function(e){if("option"!==e)throw F(e);Q(r,e),x(";")}),(function(){te(r)})),e.add(t,n,r.comment)}(n,e)}})),e.add(n)}(e,t),!0;case"service":return function(e,t){if(!O.test(t=L()))throw F(t,"service name");var n=new l(t);X(n,(function(e){if(!Y(n,e)){if("rpc"!==e)throw F(e);!function(e,t){var n=k(),r=t;if(!O.test(t=L()))throw F(t,"name");var o,i,s,a,u=t;if(x("("),x("stream",!0)&&(i=!0),!T.test(t=L()))throw F(t);if(o=t,x(")"),x("returns"),x("("),x("stream",!0)&&(a=!0),!T.test(t=L()))throw F(t);s=t,x(")");var c=new d(u,r,o,s,i,a);c.comment=n,X(c,(function(e){if("option"!==e)throw F(e);Q(c,e),x(";")})),e.add(c)}(n,e)}})),e.add(n)}(e,t),!0;case"extend":return function(e,t){if(!T.test(t=L()))throw F(t,"reference");var n=t;X(null,(function(t){switch(t){case"required":case"repeated":Z(e,t,n);break;case"optional":Z(e,H?"proto3_optional":"optional",n);break;default:if(!H||!T.test(t))throw F(t);U(t),Z(e,"optional",n)}}))}(e,t),!0}return!1}function X(e,t,n){var r=w.line;if(e&&("string"!=typeof e.comment&&(e.comment=k()),e.filename=I.filename),x("{",!0)){for(var o;"}"!==(o=L());)t(o);x(";",!0)}else n&&n(),x(";"),e&&("string"!=typeof e.comment||M)&&(e.comment=k(r)||e.comment)}function Z(e,t,n){var r=L();if("group"!==r){if(!T.test(r))throw F(r,"type");var o=L();if(!O.test(o))throw F(o,"name");o=G(o),x("=");var a=new s(o,K(L()),r,t,n);if(X(a,(function(e){if("option"!==e)throw F(e);Q(a,e),x(";")}),(function(){te(a)})),"proto3_optional"===t){var c=new u("_"+o);a.setOption("proto3_optional",!0),c.add(a),e.add(c)}else e.add(a);H||!a.repeated||void 0===p.packed[r]&&void 0!==p.basic[r]||a.setOption("packed",!1,!0)}else!function(e,t){var n=L();if(!O.test(n))throw F(n,"name");var r=f.lcFirst(n);n===r&&(n=f.ucFirst(n)),x("=");var o=K(L()),a=new i(n);a.group=!0;var u=new s(r,o,n,t);u.filename=I.filename,X(a,(function(e){switch(e){case"option":Q(a,e),x(";");break;case"required":case"repeated":Z(a,e);break;case"optional":Z(a,H?"proto3_optional":"optional");break;default:throw F(e)}})),e.add(a).add(u)}(e,t)}function Q(e,t){var n=x("(",!0);if(!T.test(t=L()))throw F(t,"name");var r,o=t,i=o;n&&(x(")"),i=o="("+o+")",t=P(),R.test(t)&&(r=t.substr(1),o+=t,L())),x("="),function(e,t,n,r){e.setParsedOption&&e.setParsedOption(t,n,r)}(e,i,$(e,o),r)}function $(e,t){if(x("{",!0)){for(var n={};!x("}",!0);){if(!O.test(A=L()))throw F(A,"name");var r,o=A;"{"===P()?r=$(e,t+"."+A):(x(":"),"{"===P()?r=$(e,t+"."+A):(r=W(!0),ee(e,t+"."+A,r)));var i=n[o];i&&(r=[].concat(i).concat(r)),n[o]=r,x(",",!0)}return n}var s=W(!0);return ee(e,t,s),s}function ee(e,t,n){e.setOption&&e.setOption(t,n)}function te(e){if(x("[",!0)){do{Q(e,"option")}while(x(",",!0));x("]")}return e}for(;null!==(A=L());)switch(A){case"package":if(!D)throw F(A);V();break;case"import":if(!D)throw F(A);J();break;case"syntax":if(!D)throw F(A);z();break;case"option":Q(B,A),x(";");break;default:if(Y(B,A)){D=!1;continue}throw F(A)}return I.filename=null,{package:S,imports:C,weakImports:N,syntax:b,root:t}}},1408:function(e,t,n){"use strict";e.exports=u;var r,o=n(9693),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")},d=function(){return o.Buffer?function(e){return(u.create=function(e){return o.Buffer.isBuffer(e)?new r(e):l(e)})(e)}:l};function p(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}u.create=d(),u.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,u.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return c}),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},u.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},u.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},u._configure=function(e){r=e,u.create=d(),r._configure();var t=o.Long?"toLong":"toNumber";o.merge(u.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},593:function(e,t,n){"use strict";e.exports=i;var r=n(1408);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(9693);function i(e){r.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},9424:function(e,t,n){"use strict";e.exports=d;var r=n(9313);((d.prototype=Object.create(r.prototype)).constructor=d).className="Root";var o,i,s,a=n(3548),u=n(7025),c=n(7598),l=n(9935);function d(e){r.call(this,"",e),this.deferred=[],this.files=[]}function p(){}d.fromJSON=function(e,t){return t||(t=new d),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},d.prototype.resolvePath=l.path.resolve,d.prototype.fetch=l.fetch,d.prototype.load=function e(t,n,r){"function"==typeof n&&(r=n,n=void 0);var o=this;if(!r)return l.asPromise(e,o,t,n);var a=r===p;function u(e,t){if(r){var n=r;if(r=null,a)throw e;n(e,t)}}function c(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var n=e.substring(t);if(n in s)return n}return null}function d(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){i.filename=e;var r,s=i(t,o,n),d=0;if(s.imports)for(;d<s.imports.length;++d)(r=c(s.imports[d])||o.resolvePath(e,s.imports[d]))&&f(r);if(s.weakImports)for(d=0;d<s.weakImports.length;++d)(r=c(s.weakImports[d])||o.resolvePath(e,s.weakImports[d]))&&f(r,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){u(e)}a||h||u(null,o)}function f(e,t){if(!(o.files.indexOf(e)>-1))if(o.files.push(e),e in s)a?d(e,s[e]):(++h,setTimeout((function(){--h,d(e,s[e])})));else if(a){var n;try{n=l.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||u(e))}d(e,n)}else++h,o.fetch(e,(function(n,i){--h,r&&(n?t?h||u(null,o):u(n):d(e,i))}))}var h=0;l.isString(t)&&(t=[t]);for(var _,E=0;E<t.length;++E)(_=o.resolvePath("",t[E]))&&f(_);if(a)return o;h||u(null,o)},d.prototype.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,p)},d.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function h(e,t){var n=t.parent.lookup(t.extend);if(n){var r=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.declaringField=t,t.extensionField=r,n.add(r),!0}return!1}d.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||h(0,e)||this.deferred.push(e);else if(e instanceof u)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof c)){if(e instanceof o)for(var t=0;t<this.deferred.length;)h(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var n=0;n<e.nestedArray.length;++n)this._handleAdd(e._nestedArray[n]);f.test(e.name)&&(e.parent[e.name]=e)}},d.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof u)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var n=0;n<e.nestedArray.length;++n)this._handleRemove(e._nestedArray[n]);f.test(e.name)&&delete e.parent[e.name]}},d._configure=function(e,t,n){o=e,i=t,s=n}},5054:function(e){"use strict";e.exports={}},5994:function(e,t,n){"use strict";t.Service=n(7948)},7948:function(e,t,n){"use strict";e.exports=o;var r=n(9693);function o(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(r.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,i,s){if(!i)throw TypeError("request must be specified");var a=this;if(!s)return r.asPromise(e,a,t,n,o,i);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,n){if(e)return a.emit("error",e,t),s(e);if(null!==n){if(!(n instanceof o))try{n=o[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",n,t),s(null,n)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},7513:function(e,t,n){"use strict";e.exports=a;var r=n(9313);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var o=n(4429),i=n(9935),s=n(5994);function a(e,t){r.call(this,e,t),this.methods={},this._methodsArray=null}function u(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var n=new a(e,t.options);if(t.methods)for(var r=Object.keys(t.methods),i=0;i<r.length;++i)n.add(o.fromJSON(r[i],t.methods[r[i]]));return t.nested&&n.addJSON(t.nested),n.comment=t.comment,n},a.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",r.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",n?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||r.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,u(this)):r.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,u(this)}return r.prototype.remove.call(this,e)},a.prototype.create=function(e,t,n){for(var r,o=new s.Service(e,t,n),a=0;a<this.methodsArray.length;++a){var u=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");o[u]=i.codegen(["r","c"],i.isReserved(u)?u+"_":u)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return o}},626:function(e){"use strict";e.exports=d;var t=/[\s{}=;:[\],'"()<>]/g,n=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,r=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,i=/^\s*\*?\/*/,s=/\n/g,a=/\s/,u=/\\(.?)/g,c={0:"\0",r:"\r",n:"\n",t:"\t"};function l(e){return e.replace(u,(function(e,t){switch(t){case"\\":case"":return t;default:return c[t]||""}}))}function d(e,u){e=e.toString();var c=0,d=e.length,p=1,f=null,h=null,_=0,E=!1,v=!1,g=[],m=null;function y(e){return Error("illegal "+e+" (line "+p+")")}function O(t){return e.charAt(t)}function T(t,n,r){f=e.charAt(t++),_=p,E=!1,v=r;var a,c=t-(u?2:3);do{if(--c<0||"\n"===(a=e.charAt(c))){E=!0;break}}while(" "===a||"\t"===a);for(var l=e.substring(t,n).split(s),d=0;d<l.length;++d)l[d]=l[d].replace(u?i:o,"").trim();h=l.join("\n").trim()}function R(t){var n=I(t),r=e.substring(t,n);return/^\s*\/{1,2}/.test(r)}function I(e){for(var t=e;t<d&&"\n"!==O(t);)t++;return t}function S(){if(g.length>0)return g.shift();if(m)return function(){var t="'"===m?r:n;t.lastIndex=c-1;var o=t.exec(e);if(!o)throw y("string");return c=t.lastIndex,C(m),m=null,l(o[1])}();var o,i,s,f,h,_=0===c;do{if(c===d)return null;for(o=!1;a.test(s=O(c));)if("\n"===s&&(_=!0,++p),++c===d)return null;if("/"===O(c)){if(++c===d)throw y("comment");if("/"===O(c))if(u){if(f=c,h=!1,R(c)){h=!0;do{if((c=I(c))===d)break;c++}while(R(c))}else c=Math.min(d,I(c)+1);h&&T(f,c,_),p++,o=!0}else{for(h="/"===O(f=c+1);"\n"!==O(++c);)if(c===d)return null;++c,h&&T(f,c-1,_),++p,o=!0}else{if("*"!==(s=O(c)))return"/";f=c+1,h=u||"*"===O(f);do{if("\n"===s&&++p,++c===d)throw y("comment");i=s,s=O(c)}while("*"!==i||"/"!==s);++c,h&&T(f,c-2,_),o=!0}}}while(o);var E=c;if(t.lastIndex=0,!t.test(O(E++)))for(;E<d&&!t.test(O(E));)++E;var v=e.substring(c,c=E);return'"'!==v&&"'"!==v||(m=v),v}function C(e){g.push(e)}function N(){if(!g.length){var e=S();if(null===e)return null;C(e)}return g[0]}return Object.defineProperty({next:S,peek:N,push:C,skip:function(e,t){var n=N();if(n===e)return S(),!0;if(!t)throw y("token '"+n+"', '"+e+"' expected");return!1},cmnt:function(e){var t=null;return void 0===e?_===p-1&&(u||"*"===f||E)&&(t=v?h:null):(_<e&&N(),_!==e||E||!u&&"/"!==f||(t=v?null:h)),t}},"line",{get:function(){return p}})}d.unescape=l},7645:function(e,t,n){"use strict";e.exports=g;var r=n(9313);((g.prototype=Object.create(r.prototype)).constructor=g).className="Type";var o=n(7025),i=n(7598),s=n(3548),a=n(6039),u=n(7513),c=n(8368),l=n(1408),d=n(1173),p=n(9935),f=n(4928),h=n(5305),_=n(4497),E=n(3996),v=n(1667);function g(e,t){r.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function m(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(g.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var n=this.fields[e[t]],r=n.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=n}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=p.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=p.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=g.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,p.merge(e.prototype,t)),e.$type=e.prototype.$type=this,p.merge(e,c,!0),this._ctor=e;for(var n=0;n<this.fieldsArray.length;++n)this._fieldsArray[n].resolve();var r={};for(n=0;n<this.oneofsArray.length;++n)r[this._oneofsArray[n].resolve().name]={get:p.oneOfGetter(this._oneofsArray[n].oneof),set:p.oneOfSetter(this._oneofsArray[n].oneof)};n&&Object.defineProperties(e.prototype,r)}}}),g.generateConstructor=function(e){for(var t,n=p.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?n("this%s={}",p.safeProp(t.name)):t.repeated&&n("this%s=[]",p.safeProp(t.name));return n("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},g.fromJSON=function(e,t){var n=new g(e,t.options);n.extensions=t.extensions,n.reserved=t.reserved;for(var c=Object.keys(t.fields),l=0;l<c.length;++l)n.add((void 0!==t.fields[c[l]].keyType?a.fromJSON:s.fromJSON)(c[l],t.fields[c[l]]));if(t.oneofs)for(c=Object.keys(t.oneofs),l=0;l<c.length;++l)n.add(i.fromJSON(c[l],t.oneofs[c[l]]));if(t.nested)for(c=Object.keys(t.nested),l=0;l<c.length;++l){var d=t.nested[c[l]];n.add((void 0!==d.id?s.fromJSON:void 0!==d.fields?g.fromJSON:void 0!==d.values?o.fromJSON:void 0!==d.methods?u.fromJSON:r.fromJSON)(c[l],d))}return t.extensions&&t.extensions.length&&(n.extensions=t.extensions),t.reserved&&t.reserved.length&&(n.reserved=t.reserved),t.group&&(n.group=!0),t.comment&&(n.comment=t.comment),n},g.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return p.toObject(["options",t&&t.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,e),"fields",r.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",n?this.comment:void 0])},g.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var n=this.oneofsArray;for(t=0;t<n.length;)n[t++].resolve();return r.prototype.resolveAll.call(this)},g.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},g.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),m(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),m(this)):r.prototype.add.call(this,e)},g.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),m(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),m(this)}return r.prototype.remove.call(this,e)},g.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},g.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},g.prototype.create=function(e){return new this.ctor(e)},g.prototype.setup=function(){for(var e=this.fullName,t=[],n=0;n<this.fieldsArray.length;++n)t.push(this._fieldsArray[n].resolve().resolvedType);this.encode=f(this)({Writer:d,types:t,util:p}),this.decode=h(this)({Reader:l,types:t,util:p}),this.verify=_(this)({types:t,util:p}),this.fromObject=E.fromObject(this)({types:t,util:p}),this.toObject=E.toObject(this)({types:t,util:p});var r=v[e];if(r){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(o),o.toObject=this.toObject,this.toObject=r.toObject.bind(o)}return this},g.prototype.encode=function(e,t){return this.setup().encode(e,t)},g.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},g.prototype.decode=function(e,t){return this.setup().decode(e,t)},g.prototype.decodeDelimited=function(e){return e instanceof l||(e=l.create(e)),this.decode(e,e.uint32())},g.prototype.verify=function(e){return this.setup().verify(e)},g.prototype.fromObject=function(e){return this.setup().fromObject(e)},g.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},g.d=function(e){return function(t){p.decorateType(t,e)}}},7063:function(e,t,n){"use strict";var r=t,o=n(9935),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var n=0,r={};for(t|=0;n<e.length;)r[i[n+t]]=e[n++];return r}r.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),r.long=s([0,0,0,1,1],7),r.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},9935:function(e,t,n){"use strict";var r,o,i=e.exports=n(9693),s=n(5054);i.codegen=n(5124),i.fetch=n(9054),i.path=n(8626),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),n=new Array(t.length),r=0;r<t.length;)n[r]=e[t[r++]];return n}return[]},i.toObject=function(e){for(var t={},n=0;n<e.length;){var r=e[n++],o=e[n++];void 0!==o&&(t[r]=o)}return t};var a=/\\/g,u=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(u,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var c=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;r||(r=n(7645));var o=new r(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var l=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=n(7025));var t=new o("Enum"+l++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,n){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,n,r){var o=n.shift();if("__proto__"===o)return t;if(n.length>0)t[o]=e(t[o]||{},n,r);else{var i=t[o];i&&(r=[].concat(i).concat(r)),t[o]=r}return t}(e,t=t.split("."),n)},Object.defineProperty(i,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(n(9424)))}})},1945:function(e,t,n){"use strict";e.exports=o;var r=n(9693);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new o(n,r)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(r.isString(e)){if(!r.Long)return o.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;o.fromHash=function(e){return e===s?i:new o((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},9693:function(e,t,n){"use strict";var r=t;function o(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;++o)void 0!==e[r[o]]&&n||(e[r[o]]=t[r[o]]);return e}function i(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&o(this,n)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}r.asPromise=n(4537),r.base64=n(7419),r.EventEmitter=n(9211),r.float=n(945),r.inquire=n(7199),r.utf8=n(4997),r.pool=n(6662),r.LongBits=n(1945),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=o,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},4497:function(e,t,n){"use strict";e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n={};e.oneofsArray.length&&t("var p={}");for(var r=0;r<e.fieldsArray.length;++r){var u=e._fieldsArray[r].resolve(),c="m"+o.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",c,u.name),u.map)t("if(!util.isObject(%s))",c)("return%j",i(u,"object"))("var k=Object.keys(%s)",c)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),s(t,u,r,c+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",c)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",c),s(t,u,r,c+"[i]")("}");else{if(u.partOf){var l=o.safeProp(u.partOf.name);1===n[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),n[u.partOf.name]=1,t("p%s=1",l)}s(t,u,r,c)}u.optional&&t("}")}return t("return null")};var r=n(7025),o=n(9935);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,n,o){if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",n,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function a(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",n)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",n)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",n)("return%j",i(t,"boolean key"))}return e}},1667:function(e,t,n){"use strict";var r=t,o=n(8368);r[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),n=this.lookup(t);if(n){var r="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:n.encode(n.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var n="",r="";if(t&&t.json&&e.type_url&&e.value){r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),n=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var s=e.$type.toObject(e,t);return""===n&&(n="type.googleapis.com/"),r=n+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),s["@type"]=r,s}return this.toObject(e,t)}}},1173:function(e,t,n){"use strict";e.exports=d;var r,o=n(9693),i=o.LongBits,s=o.base64,a=o.utf8;function u(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function c(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}var p=function(){return o.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d}};function f(e,t,n){t[n]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function _(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function E(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}d.create=p(),d.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(d.alloc=o.pool(d.alloc,o.Array.prototype.subarray)),d.prototype._push=function(e,t,n){return this.tail=this.tail.next=new u(e,t,n),this.len+=t,this},h.prototype=Object.create(u.prototype),h.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(_,10,i.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=i.from(e);return this._push(_,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(_,t.length(),t)},d.prototype.bool=function(e){return this._push(f,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(E,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=i.from(e);return this._push(E,4,t.lo)._push(E,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var v=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};d.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(o.isString(e)){var n=d.alloc(t=s.length(e));s.decode(e,n,0),e=n}return this.uint32(t)._push(v,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},d.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new u(c,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(c,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},d._configure=function(e){r=e,d.create=p(),r._configure()}},3155:function(e,t,n){"use strict";e.exports=i;var r=n(1173);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(9693);function i(){r.call(this)}function s(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()}},__webpack_module_cache__={},deferred;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},deferred=[],__webpack_require__.O=function(e,t,n,r){if(!t){var o=1/0;for(u=0;u<deferred.length;u++){t=deferred[u][0],n=deferred[u][1],r=deferred[u][2];for(var i=!0,s=0;s<t.length;s++)(!1&r||o>=r)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](t[s])}))?t.splice(s--,1):(i=!1,r<o&&(o=r));if(i){deferred.splice(u--,1);var a=n();void 0!==a&&(e=a)}}return e}r=r||0;for(var u=deferred.length;u>0&&deferred[u-1][2]>r;u--)deferred[u]=deferred[u-1];deferred[u]=[t,n,r]},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={65:0};__webpack_require__.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,o,i=n[0],s=n[1],a=n[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(r in s)__webpack_require__.o(s,r)&&(__webpack_require__.m[r]=s[r]);if(a)var c=a(__webpack_require__)}for(t&&t(n);u<i.length;u++)o=i[u],__webpack_require__.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return __webpack_require__.O(c)},n=self.webpackChunkwebsdk=self.webpackChunkwebsdk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var __webpack_exports__={};return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{MiniCore:function(){return H},default:function(){return G}}),__webpack_require__(9601),__webpack_require__(1539),__webpack_require__(8674),__webpack_require__(2526),__webpack_require__(1817),__webpack_require__(2165),__webpack_require__(6992),__webpack_require__(8783),__webpack_require__(3948),__webpack_require__(8309),__webpack_require__(3843),__webpack_require__(3710),__webpack_require__(1532),__webpack_require__(7941),__webpack_require__(9554),__webpack_require__(4747),__webpack_require__(4812),__webpack_require__(2222),__webpack_require__(9653),__webpack_require__(2564),__webpack_require__(7327),__webpack_require__(9575),__webpack_require__(2472),__webpack_require__(2990),__webpack_require__(8927),__webpack_require__(3105),__webpack_require__(5035),__webpack_require__(4345),__webpack_require__(7174),__webpack_require__(2846),__webpack_require__(4731),__webpack_require__(7209),__webpack_require__(6319),__webpack_require__(8867),__webpack_require__(7789),__webpack_require__(3739),__webpack_require__(9368),__webpack_require__(4483),__webpack_require__(2056),__webpack_require__(3462),__webpack_require__(678),__webpack_require__(7462),__webpack_require__(3824),__webpack_require__(5021),__webpack_require__(2974),__webpack_require__(5016),__webpack_require__(5827);var e=__webpack_require__(3281),t=__webpack_require__.n(e),n=__webpack_require__(3720),r=__webpack_require__.n(n),o=__webpack_require__(2449),i=__webpack_require__(4024),s=__webpack_require__(7360),a=__webpack_require__(6424),u=(__webpack_require__(6699),["onTextMessage","onFileMessage","onAudioMessage","onVideoMessage","onImageMessage","onLocationMessage","onCustomMessage","onCMDMessage"]),c=function(){function e(e,t,n){this.handlerData={},this.handlerData={},e.addEventHandler=this.addEventHandler.bind(this),e.removeEventHandler=this.removeEventHandler.bind(this)}return e.prototype.addEventHandler=function(e,t){this.handlerData[e]=t},e.prototype.removeEventHandler=function(e){delete this.handlerData[e]},e.prototype.dispatch=function(e,t){for(var n in u.includes(e)&&t?s.kg.debug("dispatch event: "+e,{id:t.id,type:t.type,time:t.time,from:t.from,to:t.to,chatType:t.chatType}):"onMessage"===e?s.kg.debug("dispatch event: "+e,null==t?void 0:t.length):s.kg.debug("dispatch event: "+e,t||""),this.handlerData){var r=this.handlerData[n][e];r&&r(t)}},e}(),l=(__webpack_require__(2772),{biz:"",debug:!1,token:""}),d="https://data-reporting.agora.io/report",p="https://data-reporting.sh.agoralab.co/report",f=(__webpack_require__(2023),__webpack_require__(2071)),h=__webpack_require__(1595),_=function(e){var t=Number(h.C8[e]);return t===h.C8.USER_LOGIN?"MANUALLOGIN":t===h.C8.MSYNC_SENDMESSAGE?"SENDMESSAGE":t>h.C8.UNKNOWOPERATION&&t<h.C8.REST_OPERATE?"REST":t>h.C8.REST_OPERATE&&t<h.C8.MSYNC_OPERATE?"MESSAGE":t>h.C8.MSYNC_OPERATE&&t<h.C8.ROSTER_OPERATE?"ROSTER":t>h.C8.ROSTER_OPERATE&&t<h.C8.USER_OPERATE?"USER":t>h.C8.USER_OPERATE&&t<h.C8.GROUP_OPERATE?"GROUP":t>h.C8.GROUP_OPERATE&&t<h.C8.CHATROOM_OPERATE?"CHATROOM":"OPERATION"},E=function(){return(new Date).getTime()},v=function(e){return[i.iw.BAIDU,i.iw.WX,i.iw.DD,i.iw.ZFB,i.iw.TT,i.iw.QUICK_APP,i.iw.UNI].includes(e.platform)},g=function(){return e=1,t=99999,e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e;var e,t},m={},y=(__webpack_require__(561),__webpack_require__(1249),function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}),O=1e3,T=function(){function e(e){this.eventQueue=[],this.stock=O,this.config=e,this.governor()}return e.prototype.add=function(e){this.stock<=0?console.warn("Event Report limit ".concat(O," per minute")):(this.eventQueue.push(e),this.consume(),this.stock-=1)},e.prototype.consume=function(){var e=this;0!==this.eventQueue.length&&(this.timer&&this.eventQueue.length<=10&&clearTimeout(this.timer),this.timer=setTimeout((function(){var t,n=e.eventQueue.splice(0,10),r=n.filter((function(e){return e.appId===n[0].appId})),o=n.filter((function(e){return e.appId!==n[0].appId}));(t=e.eventQueue).unshift.apply(t,o),e.batchSend(r)}),1e3))},e.prototype.governor=function(){var e=this,t=setInterval((function(){e.stock=O}),6e4);"undefined"!=typeof addEventListener&&addEventListener("beforeunload",(function(){clearInterval(t)}))},e.prototype.batchSend=function(e){var t,n;if(void 0===e&&(e=[]),0!==e.length)try{var r=e.map((function(e){e.biz,e.appId;var t=e.eventId,n=y(e,["biz","appId","eventId"]);return{eventId:Number(t),body:n}}));!function(e,t){try{var n=t.biz,r=t.appId,o=t.data,s=t.debug,a=t.onSuccess;if(!n)throw new Error("biz is not defined");m.global||(m=i.P6.getEnvInfo());var u=m;if(v(u)){var c={url:s?p:d,data:o,method:"POST",success:function(){null==a||a()},fail:function(){},complete:function(){}},l={token:e,appid:null!=r?r:"",sendts:"".concat(Math.floor((new Date).getTime()/1e3)),biz:n,debug:"".concat(s)};if("zfb"===u.platform||"dd"===u.platform?c.headers=l:c.header=l,"dd"===u.platform)return u.global.httpRequest(c);u.global.request(c)}else{var f=new XMLHttpRequest;f.onreadystatechange=function(){2===f.readyState&&(null==a||a())},f.open("POST",s?p:d),f.setRequestHeader("Content-Type","application/json"),f.setRequestHeader("token",e),f.setRequestHeader("appid",null!=r?r:""),f.setRequestHeader("sendts","".concat(Math.floor((new Date).getTime()/1e3))),f.setRequestHeader("biz",n),f.setRequestHeader("debug","".concat(s)),f.send(JSON.stringify(o))}}catch(e){console.error(e)}}(this.config.token,{biz:null===(t=e[0])||void 0===t?void 0:t.biz,appId:null===(n=e[0])||void 0===n?void 0:n.appId,data:r,debug:this.config.debug,onSuccess:this.consume.bind(this)})}catch(e){console.error(e)}},e}(),R=function(){return R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},R.apply(this,arguments)},I=new(function(){function e(e){this.inited=!1,this.appId="",this.biz="",this.eventQueue={},this.config=l,e&&this.init(e)}return e.prototype.init=function(e){var t;if(void 0===e&&(e={}),!e.biz||!e.token)throw new Error("Event Report: biz or token is not defined");try{this.appId=null!==(t=e.appId)&&void 0!==t?t:"",this.biz=e.biz,this.config=R(R({},l),e),this.eventQueue=new T(this.config),this.log(e),this.inited=!0}catch(e){console.error(e)}},e.prototype.send=function(e,t,n){var r;if(void 0===t&&(t={}),this.inited){var o=R(R({},t),{eventId:Number(e),biz:this.biz,appId:null!==(r=null==n?void 0:n.appId)&&void 0!==r?r:this.appId});this.eventQueue.add(o),this.log(o)}else console.error("Event Report: init is not called")},e.prototype.log=function(e){try{if(this.config.debug){var t=e.payload,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["payload"]);console.log("%c Event Report: ".concat(this.config.biz," "),"background: #8A97FC; color: #fff"),console.table(n),t&&(console.info("payload:"),console.table(t))}}catch(e){console.error(e)}},e}()),S=function(){return S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},S.apply(this,arguments)},C={requestName:"",subrequestid:"1",requestMethod:"GET",requestUrl:"",requestElapse:0,code:0,codeDesc:"",isLastApi:0,isSuccess:1},N=function(){function e(e){this.platform=i.P6.getEnvInfo(),this.isReportDt=e.isReport||!1,this.isCollectDt=!0,v(this.platform)&&!this.isReportDt&&(this.isCollectDt=!1),this.eventQueue=[],this.accessChannel=f.yK,this.options=function(e,t){t.platform||(t=i.P6.getEnvInfo());var n=e.org,r=e.appkey,o=e.deviceId,s=e.sdkVersion,a=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||"".concat(t.platform,"_mini_program");return{org:n,appkey:r,deviceId:o,sdkServiceId:"sid_".concat(i.P6.getUniqueId(),"_").concat(g()),did:a,sdkVersion:s,os:f.Wc,sdkProduct:h.aC.web}}(e,this.platform),this.sid=this.options.sdkServiceId,this.init(e)}return e.getInstance=function(){return e.instance},e.prototype.getServiceId=function(){return this.sid||"sid_0"},e.prototype.setIsReportDt=function(e){this.isReportDt=e,e&&this.rptEventQueue()},e.prototype.setIsCollectDt=function(e){this.isCollectDt=e,e||(this.eventQueue=[])},e.prototype.rptEventQueue=function(){var e=this;this.eventQueue.length&&this.eventQueue.forEach((function(t,n){I.send(t.eventId,t.dt),n>=e.eventQueue.length-1&&(e.eventQueue=[])}))},e.prototype.init=function(t){e.instance||(e.instance=this,I.init({biz:f.el,token:f.$x,appId:t.appkey,debug:!1}),this.reportInit())},e.prototype.reportInit=function(){if(this.isCollectDt){var e=this.options,t=e.did,n=e.os,r=e.sdkVersion,o=e.deviceId;this.reportData(f.iB.INIT,{did:t,os:n,sdkVersion:r,deviceId:o})}},e.prototype.geOperateFun=function(e){var t=this;if(!this.isCollectDt)return function(){};var n=1,r=0,o="",s=E(),a=e.uid,u=e.operationName;a&&(this.uid=a);var c={uid:this.uid,operationId:"opr_".concat(i.P6.getUniqueId(),"_").concat(g()),requestid:"req_".concat(i.P6.getUniqueId(),"_").concat(g()),operationName:u};return function(e){var a,l,d,p;if(e.data.isSuccess?(r=0,o=""):(0===e.data.code&&(e.data.code=f.Tp),r=null!==(a=e.data.code)&&void 0!==a?a:r,o=null!==(l=e.data.codeDesc)&&void 0!==l?l:o),(null===(d=e.data)||void 0===d?void 0:d.accessChannel)&&(t.accessChannel=null===(p=e.data)||void 0===p?void 0:p.accessChannel),e.isRetry?(n++,e.data.subrequestid="".concat(n)):(c.requestid="req_".concat(i.P6.getUniqueId(),"_").concat(g()),n=1),e.data.isLastApi){var h=E();e.data.requestElapse=h-s,e.data.requestMethod="",e.data.subrequestid="0",e.data.code=200===r?0:r,e.data.codeDesc=o}else e.data.requestName||(e.data.requestName=u);e.data.requestElapse||(e.data.requestElapse=E()-s),t.reportData.call(t,f.iB.API,S(S(S(S({},C),c),e.data),{accessChannel:t.accessChannel,operationType:_(u)})),e.isEndApi&&t.reportData.call(t,f.iB.API,S(S(S({},c),C),{isSuccess:e.data.isSuccess,isLastApi:1,subrequestid:"0",requestMethod:"",code:200===r?0:r,codeDesc:o,requestElapse:e.data.requestElapse,accessChannel:t.accessChannel,operationType:_(u)}))}},e.prototype.reportData=function(e,t){return n=this,r=void 0,s=function(){var n,r,o,s,a,u,c,l;return function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(d){switch(d.label){case 0:return d.trys.push([0,3,,4]),n=E(),r=0,e!==f.iB.API?[3,2]:[4,(p=this.platform,new Promise((function(e){var t;p.platform||(p=i.P6.getEnvInfo());var n="";if(p.platform===i.iw.WEB){var r=navigator.connection;(null==r?void 0:r.type)?(null==r||r.type,n=h.td.WIFI):(null==r?void 0:r.effectiveType)&&(n=h.td[r.effectiveType.toLocaleUpperCase()]),e(n)}else p.platform===i.iw.NODE?(n=h.td.UNKNOWN,e(n)):null===(t=p.global)||void 0===t||t.getNetworkType({success:function(t){n=h.td[t.networkType.toLocaleUpperCase()],e(n)}})})))];case 1:r=d.sent(),d.label=2;case 2:return o=this.options,s=o.appkey,a=o.sdkServiceId,u=o.sdkProduct,c=S({lts:n,net:r,appkey:s,sdkServiceId:a,sdkProduct:u},t),this.isReportDt?I.send(e,c):this.isCollectDt&&this.eventQueue.push({eventId:e,dt:c}),[3,4];case 3:return l=d.sent(),console.warn(l),[3,4];case 4:return[2]}var p}))},new((o=void 0)||(o=Promise))((function(e,t){function i(e){try{u(s.next(e))}catch(e){t(e)}}function a(e){try{u(s.throw(e))}catch(e){t(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(i,a)}u((s=s.apply(n,r||[])).next())}));var n,r,o,s},e}(),b=__webpack_require__(7252),A=__webpack_require__(5531),M=__webpack_require__(4998),w=__webpack_require__(8161),L=__webpack_require__(7288);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}var P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},P.apply(this,arguments)},x=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},k=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};t().util.Long=r(),t().configure();var D=t().Root.fromJSON({nested:{easemob:{nested:{pb:{nested:{MessageBody:{fields:{type:{type:"Type",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},contents:{rule:"repeated",type:"Content",id:4},ext:{rule:"repeated",type:"KeyValue",id:5},ackMessageId:{type:"uint64",id:6},msgConfig:{type:"MessageConfig",id:7},ackContent:{type:"string",id:8},meta:{type:"string",id:9},editMessageId:{type:"uint64",id:11}},nested:{Content:{fields:{type:{type:"Type",id:1},text:{type:"string",id:2},latitude:{type:"double",id:3},longitude:{type:"double",id:4},address:{type:"string",id:5},displayName:{type:"string",id:6},remotePath:{type:"string",id:7},secretKey:{type:"string",id:8},fileLength:{type:"int32",id:9},action:{type:"string",id:10},params:{rule:"repeated",type:"KeyValue",id:11},duration:{type:"int32",id:12},size:{type:"Size",id:13},thumbnailRemotePath:{type:"string",id:14},thumbnailSecretKey:{type:"string",id:15},thumbnailDisplayName:{type:"string",id:16},thumbnailFileLength:{type:"int32",id:17},thumbnailSize:{type:"Size",id:18},customEvent:{type:"string",id:19},customExts:{rule:"repeated",type:"KeyValue",id:20},buildingName:{type:"string",id:21},subType:{type:"SubType",id:22},title:{type:"string",id:23},summary:{type:"string",id:24},combineLevel:{type:"int32",id:25}},nested:{Type:{values:{TEXT:0,IMAGE:1,VIDEO:2,LOCATION:3,VOICE:4,FILE:5,COMMAND:6,CUSTOM:7,COMBINE:8}},Size:{fields:{width:{type:"double",id:1},height:{type:"double",id:2}}},SubType:{values:{COMBINE:0}}}},Type:{values:{NORMAL:0,CHAT:1,GROUPCHAT:2,CHATROOM:3,READ_ACK:4,DELIVER_ACK:5,RECALL:6,CHANNEL_ACK:7,EDIT:8}},MessageConfig:{fields:{allowGroupAck:{type:"bool",id:1}}}}},KeyValue:{oneofs:{value:{oneof:["varintValue","floatValue","doubleValue","stringValue"]}},fields:{key:{type:"string",id:1},type:{type:"ValueType",id:2},varintValue:{type:"int64",id:3},floatValue:{type:"float",id:4},doubleValue:{type:"double",id:5},stringValue:{type:"string",id:6}},nested:{ValueType:{values:{BOOL:1,INT:2,UINT:3,LLINT:4,FLOAT:5,DOUBLE:6,STRING:7,JSON_STRING:8}}}},JID:{fields:{appKey:{type:"string",id:1},name:{type:"string",id:2},domain:{type:"string",id:3},clientResource:{type:"string",id:4}}},ConferenceBody:{fields:{sessionId:{type:"string",id:1},operation:{type:"Operation",id:2},conferenceId:{type:"string",id:3},type:{type:"Type",id:4},content:{type:"string",id:5},network:{type:"string",id:6},version:{type:"string",id:7},identity:{type:"Identity",id:8},duration:{type:"string",id:9},peerName:{type:"string",id:10},endReason:{type:"EndReason",id:11},status:{type:"Status",id:12},isDirect:{type:"bool",id:13},controlType:{type:"StreamControlType",id:14},routeFlag:{type:"int32",id:15},routeKey:{type:"string",id:16}},nested:{Status:{fields:{errorCode:{type:"int32",id:1}}},Operation:{values:{JOIN:0,INITIATE:1,ACCEPT_INITIATE:2,ANSWER:3,TERMINATE:4,REMOVE:5,STREAM_CONTROL:6,MEDIA_REQUEST:7}},Type:{values:{VOICE:0,VIDEO:1}},Identity:{values:{CALLER:0,CALLEE:1}},EndReason:{values:{HANGUP:0,NORESPONSE:1,REJECT:2,BUSY:3,FAIL:4,UNSUPPORTED:5,OFFLINE:6}},StreamControlType:{values:{PAUSE_VOICE:0,RESUME_VOICE:1,PAUSE_VIDEO:2,RESUME_VIDEO:3}}}},MSync:{fields:{version:{type:"Version",id:1,options:{default:"MSYNC_V1"}},guid:{type:"JID",id:2},auth:{type:"string",id:3},compressAlgorimth:{type:"uint32",id:4},crypto:{type:"uint32",id:5},userAgent:{type:"string",id:6},pov:{type:"uint64",id:7},command:{type:"Command",id:8},deviceId:{type:"uint32",id:10},encryptType:{rule:"repeated",type:"EncryptType",id:11,options:{packed:!1}},encryptKey:{type:"string",id:12},payload:{type:"bytes",id:9}},nested:{Version:{values:{MSYNC_V1:0,MSYNC_V2:1}},Command:{values:{SYNC:0,UNREAD:1,NOTICE:2,PROVISION:3}}}},EncryptType:{values:{ENCRYPT_NONE:0,ENCRYPT_AES_128_CBC:1,ENCRYPT_AES_256_CBC:2}},CommSyncUL:{fields:{meta:{type:"Meta",id:1},key:{type:"uint64",id:2},queue:{type:"JID",id:3},isRoam:{type:"bool",id:4},lastFullRoamKey:{type:"uint64",id:5}}},CommSyncDL:{fields:{status:{type:"Status",id:1},metaId:{type:"uint64",id:2},serverId:{type:"uint64",id:3},metas:{rule:"repeated",type:"Meta",id:4},nextKey:{type:"uint64",id:5},queue:{type:"JID",id:6},isLast:{type:"bool",id:7},timestamp:{type:"uint64",id:8},isRoam:{type:"bool",id:9}}},CommNotice:{fields:{queue:{type:"JID",id:1}}},CommUnreadUL:{fields:{}},CommUnreadDL:{fields:{status:{type:"Status",id:1},unread:{rule:"repeated",type:"MetaQueue",id:2},timestamp:{type:"uint64",id:3}}},MetaQueue:{fields:{queue:{type:"JID",id:1},n:{type:"uint32",id:2}}},Meta:{fields:{id:{type:"uint64",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},timestamp:{type:"uint64",id:4},ns:{type:"NameSpace",id:5},payload:{type:"bytes",id:6},routetype:{type:"RouteType",id:7},ext:{rule:"repeated",type:"KeyValue",id:8},meta:{type:"bytes",id:9},directedUsers:{rule:"repeated",type:"string",id:10}},nested:{NameSpace:{values:{STATISTIC:0,CHAT:1,MUC:2,ROSTER:3,CONFERENCE:4,NOTIFY:5,QUERY:6}},RouteType:{values:{ROUTE_ALL:0,ROUTE_ONLINE:1,ROUTE_DIRECT:2}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},reason:{type:"string",id:2},redirectInfo:{rule:"repeated",type:"RedirectInfo",id:3}},nested:{ErrorCode:{values:{OK:0,FAIL:1,UNAUTHORIZED:2,MISSING_PARAMETER:3,WRONG_PARAMETER:4,REDIRECT:5,TOKEN_EXPIRED:6,PERMISSION_DENIED:7,NO_ROUTE:8,UNKNOWN_COMMAND:9,PB_PARSER_ERROR:10,BIND_ANOTHER_DEVICE:11,IM_FORBIDDEN:12,TOO_MANY_DEVICES:13,PLATFORM_LIMIT:14,USER_MUTED:15,ENCRYPT_DISABLE:16,ENCRYPT_ENABLE:17,DECRYPT_FAILURE:18,PERMISSION_DENIED_EXTERNAL:19}}}},RedirectInfo:{fields:{host:{type:"string",id:1},port:{type:"uint32",id:2}}},Provision:{fields:{osType:{type:"OsType",id:1},version:{type:"string",id:2},networkType:{type:"NetworkType",id:3},appSign:{type:"string",id:4},compressType:{rule:"repeated",type:"CompressType",id:5,options:{packed:!1}},encryptType:{rule:"repeated",type:"EncryptType",id:6,options:{packed:!1}},encryptKey:{type:"string",id:7},status:{type:"Status",id:8},deviceUuid:{type:"string",id:9},isManualLogin:{type:"bool",id:10},password:{type:"string",id:11},deviceName:{type:"string",id:12},resource:{type:"string",id:13},auth:{type:"string",id:14},serviceId:{type:"string",id:16},actionVersion:{type:"string",id:17},authToken:{type:"string",id:18},sessionId:{type:"string",id:20},reason:{type:"string",id:21}},nested:{OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}},CompressType:{values:{COMPRESS_NONE:0,COMPRESS_ZLIB:1}}}},MUCBody:{fields:{mucId:{type:"JID",id:1},operation:{type:"Operation",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},setting:{type:"Setting",id:5},reason:{type:"string",id:6},isChatroom:{type:"bool",id:7},status:{type:"Status",id:8},isThread:{type:"bool",id:9},mucParentId:{type:"JID",id:10},mucName:{type:"string",id:11},eventInfo:{type:"EventInfo",id:12},mucMemberCount:{type:"int32",id:13},ext:{type:"string",id:14},leaveOtherRooms:{type:"bool",id:15}},nested:{Operation:{values:{CREATE:0,DESTROY:1,JOIN:2,LEAVE:3,APPLY:4,APPLY_ACCEPT:5,APPLY_DECLINE:6,INVITE:7,INVITE_ACCEPT:8,INVITE_DECLINE:9,KICK:10,GET_BLACKLIST:11,BAN:12,ALLOW:13,UPDATE:14,BLOCK:15,UNBLOCK:16,PRESENCE:17,ABSENCE:18,DIRECT_JOINED:19,ASSIGN_OWNER:20,ADD_ADMIN:21,REMOVE_ADMIN:22,ADD_MUTE:23,REMOVE_MUTE:24,UPDATE_ANNOUNCEMENT:25,DELETE_ANNOUNCEMENT:26,UPLOAD_FILE:27,DELETE_FILE:28,ADD_USER_WHITE_LIST:29,REMOVE_USER_WHITE_LIST:30,BAN_GROUP:31,REMOVE_BAN_GROUP:32,THREAD_CREATE:33,THREAD_DESTROY:34,THREAD_JOIN:35,THREAD_LEAVE:36,THREAD_KICK:37,THREAD_UPDATE:38,THREAD_PRESENCE:39,THREAD_ABSENCE:40,DISABLE_GROUP:41,ABLE_GROUP:42,SET_METADATA:43,DELETE_METADATA:44,GROUP_MEMBER_METADATA_UPDATE:45}},Setting:{fields:{name:{type:"string",id:1},desc:{type:"string",id:2},type:{type:"Type",id:3},maxUsers:{type:"int32",id:4},owner:{type:"string",id:5}},nested:{Type:{values:{PRIVATE_OWNER_INVITE:0,PRIVATE_MEMBER_INVITE:1,PUBLIC_JOIN_APPROVAL:2,PUBLIC_JOIN_OPEN:3,PUBLIC_ANONYMOUS:4}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,PERMISSION_DENIED:1,WRONG_PARAMETER:2,MUC_NOT_EXIST:3,USER_NOT_EXIST:4,UNKNOWN:5}}}},EventInfo:{fields:{eventType:{type:"EventType",id:1,options:{default:"EVENT_NONE"}},ext:{type:"string",id:2}},nested:{EventType:{values:{EVENT_NONE:0,CIRCLE_CHANNEL:1}}}}}},RosterBody:{fields:{operation:{type:"Operation",id:1},status:{type:"Status",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},reason:{type:"string",id:5},rosterVer:{type:"string",id:6},biDirection:{type:"bool",id:7}},nested:{Operation:{values:{GET_ROSTER:0,GET_BLACKLIST:1,ADD:2,REMOVE:3,ACCEPT:4,DECLINE:5,BAN:6,ALLOW:7,REMOTE_ACCEPT:8,REMOTE_DECLINE:9}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,USER_NOT_EXIST:1,USER_ALREADY_FRIEND:2,USER_ALREADY_BLACKLIST:3}}}}}},StatisticsBody:{fields:{operation:{type:"Operation",id:1},os:{type:"OsType",id:2},version:{type:"string",id:3},network:{type:"NetworkType",id:4},imTime:{type:"uint32",id:5},chatTime:{type:"uint32",id:6},location:{type:"string",id:7},reason:{type:"string",id:10}},nested:{Operation:{values:{INFORMATION:0,USER_REMOVED:1,USER_LOGIN_ANOTHER_DEVICE:2,USER_KICKED_BY_CHANGE_PASSWORD:3,USER_KICKED_BY_OTHER_DEVICE:4}},OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}}}}}}}}}}),H=function(){function e(e){var t,n,r,u;if(this.name="miniCore",this.heartBeatWait=3e4,this.Message=o.Message,this.Code=A.E,this.getUniqueId=i.Ki,this._queues=[],this._load_msg_cache=[],this.max_cache_length=100,this.isReport=!1,this.dnsIndex=0,this.autoReconnectNumTotal=0,this.times=1,this._reportLogs=!1,this._reportInterval=3e5,this.unSyncQueue=[],this.lastHeartbeat=Date.now(),this.logger=this.getLogger(),this.url=null!==(t=e.url)&&void 0!==t?t:"",this.apiUrl=null!==(n=e.apiUrl)&&void 0!==n?n:"",this.isHttpDNS=!!e.isHttpDNS,this.uploadPartEnable=!0,this.appKey=e.appKey,this.root=D,this.mr_cache={},this.isHttpDNS=void 0===e.isHttpDNS||e.isHttpDNS,this.https="undefined"!=typeof window&&"https:"===(null===(r=window.location)||void 0===r?void 0:r.protocol),this.delivery=e.delivery||!1,this.restIndex=0,this.hostIndex=0,this.autoReconnectNumMax=e.autoReconnectNumMax||5,this.refreshDNSIntervals=this.autoReconnectNumMax<5?this.autoReconnectNumMax:5,this.useReplacedMessageContents=e.useReplacedMessageContents||!1,this.unMSyncSendMsgMap=new Map,this.socketHost=[],this.reconnecting=!1,this._offlineMessagePullState=M.a.SYNC_INIT,this._offlineMessagePullQueue=[],this.dnsArr=["https://rs.easemob.com","https://rs.chat.agora.io","http://59.110.89.59","http://39.97.193.190","http://39.97.193.187"],this.dnsTotal=this.dnsArr.length,this.version="4.9.2.1",this.deviceId=e.deviceId||"webim",this.isFixedDeviceId=null===(u=e.isFixedDeviceId)||void 0===u||u,this.logOut=!0,this.osType=16,this.useOwnUploadFun=e.useOwnUploadFun||!1,this.compressType=[0],this.encryptType=[0],this._msgHash={},this.disconnectedReason=void 0,this.loginInfoCustomExt=void 0,this.context={jid:{appKey:"",clientResource:"",domain:"easemob.com",name:""},userId:"",appKey:"",status:0,restTokenData:"",appName:"",orgName:"",root:{},accessToken:""},this.mSync=this.usePlugin(a.ZP),this.eventHandler=this.usePlugin(c),"string"!=typeof this.appKey||2!==this.appKey.split("#").length)throw Error("Illegal appKey: ".concat(this.appKey));if(this.devInfos=this.appKey.split("#"),this.orgName=this.devInfos[0],this.appName=this.devInfos[1],this.dataReport=new N({appkey:this.appKey,org:this.orgName,sdkVersion:this.version,deviceId:this.deviceId,isReport:this.isReport}),this.isFixedDeviceId){var l=i.P6.getLocalDeviceInfo();l&&(this.clientResource=JSON.parse(l).deviceId)}s.kg.debug("init SDK: miniCore ".concat(this.version))}return e.prototype.addEventHandler=function(e,t){},e.prototype.removeEventHandler=function(e){},e.prototype.usePlugin=function(e,t){var n=this;if("function"==typeof e){if(!t)return new e(this);this[t]=new e(this)}else"object"===U(e)&&(t?(this[t]={},e.LocalCache&&(this._localCache=e.LocalCache,e=e.LocalCacheApi),Object.keys(e).forEach((function(r){var o,i;n[t][r]=null===(i=null===(o=e[r])||void 0===o?void 0:o.bind)||void 0===i?void 0:i.call(o,n)}))):Object.assign(this,e))},e.prototype.isOpened=function(){return this.sock&&1===this.sock.readyState||!1},e.prototype._validateOpenParams=function(e){if("object"!==U(e)||null===e)return b.Z.create({type:A.E.WEBIM_CONNCTION_OPEN_ERROR,message:"the param is illegal"});if(!e.username||"string"!=typeof e.username){var t=b.Z.create({type:A.E.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR,message:"the username cannot be empty"});return s.kg.debug("open params error",t),t}return!("agoraToken"in e)||e.agoraToken&&"string"==typeof e.agoraToken?!("accessToken"in e)||e.accessToken&&"string"==typeof e.accessToken?"accessToken"in e||"agoraToken"in e||e.password?void 0:(t=b.Z.create({type:A.E.WEBIM_CONNCTION_OPEN_ERROR,message:"the accessToken or password is illegal"}),s.kg.debug("open params error",t),t):(t=b.Z.create({type:A.E.WEBIM_CONNCTION_OPEN_ERROR,message:"the accessToken is illegal"}),s.kg.debug("open params error",t),t):(t=b.Z.create({type:A.E.WEBIM_CONNCTION_OPEN_ERROR,message:"the agoraToken is illegal"}),s.kg.debug("open params error",t),console.warn("agoraToken is deprecated, please use accessToken instead"),t)},e.prototype.open=function(e){var t;return x(this,void 0,void 0,(function(){var n,r,o=this;return k(this,(function(a){if(s.kg.debug("open",e.username),n=this._validateOpenParams(e))return[2,Promise.reject(n)];if("web"===i.P6.getEnvInfo().platform&&(r=i.P6.detectBrowser(),s.kg.debug("browser",r)),s.kg.debug("socket readyState",null===(t=this.sock)||void 0===t?void 0:t.readyState),this.isOpened.call(this))throw b.Z.create({type:A.E.WEBIM_CONNCTION_OPEN_ERROR,message:"You are already logged in"});return[2,new Promise((function(t,n){o._open(P(P({},e),{promise:{resolve:t,reject:n}}))}))]}))}))},e.prototype._open=function(e,t){var n,r,o,a,u,c;return x(this,void 0,void 0,(function(){var l,d,p,f,_,E,v,g,m,y,O,T,R,I,S,C,N;return k(this,(function(M){switch(M.label){case 0:if(l=e.promise,this.setContext(e),d=this.dataReport.geOperateFun({uid:e.username,operationName:h.fI.LOGIN}),!this.isHttpDNS||t)return[3,4];M.label=1;case 1:return M.trys.push([1,3,,4]),this.dnsIndex=0,[4,this.getDNS({rpt:d,isRetry:!!t})];case 2:return M.sent(),[3,4];case 3:return p=M.sent(),[2,null===(r=null===(n=e.promise)||void 0===n?void 0:n.reject)||void 0===r?void 0:r.call(n,p)];case 4:return f=this.apiUrl+"/"+this.orgName+"/"+this.appName+"/token",e.agoraToken?(s.kg.debug("login with agoraToken"),this.grantType="agoraToken",this.token=e.agoraToken,this.context.accessToken=e.agoraToken,this.context.restTokenData=e.agoraToken,this.user=e.username,null===(o=null==l?void 0:l.resolve)||void 0===o||o.call(l,{accessToken:e.agoraToken}),s.kg.initReport({report:this._reportLogs,reportInterval:this._reportInterval,connection:this}),[3,8]):[3,5];case 5:return e.password?(s.kg.debug("login with password"),_={headers:{"Content-type":"application/json"},url:f,dataType:"json",data:JSON.stringify({grant_type:"password",username:e.username,password:e.password,timestamp:+new Date})},[4,B(i.P6.ajax(_,h.fI.SDK_INTERNAL))]):[3,7];case 6:if(E=M.sent(),v=E[0],g=E[1],v)return m=b.Z.create({type:A.E.WEBIM_CONNCTION_OPEN_ERROR,message:v.error_description,data:v}),y=(null==v?void 0:v.extraInfo)||{},S=y.elapse,I=y.httpCode,O=y.errDesc,T={requestName:h.c.LOGIN_BY_PWD,requestElapse:S,requestUrl:f,isSuccess:0,code:I,codeDesc:O},d({isRetry:!1,data:T}),this.isHttpDNS&&this.restIndex+1<this.restTotal?(this.restIndex++,this.setRestUrl(),this._open(e,!0),[2]):(d({data:{isLastApi:1,isSuccess:0}}),this.clear(),delete v.extraInfo,null===(a=null==l?void 0:l.reject)||void 0===a||a.call(l,m),[2]);if(!g)throw new Error("get token fail.");return this.expiresIn=g.expires_in,this.grantType="password",this.token=g.access_token,this.user=e.username,this.context.accessToken=g.access_token,null===(u=null==l?void 0:l.resolve)||void 0===u||u.call(l,{accessToken:g.access_token,duration:g.expires_in}),g.extraInfo&&(R=g.extraInfo,I=R.httpCode,S=R.elapse,C={requestName:h.c.LOGIN_BY_PWD,requestElapse:S,requestUrl:f,isSuccess:1,code:I},d({isRetry:!1,data:C})),s.kg.initReport({report:this._reportLogs,reportInterval:this._reportInterval,connection:this}),[3,8];case 7:if(!e.accessToken)throw new Error("Invalid parameter params: ".concat(e));s.kg.debug("login with accessToken"),this.grantType="accessToken",this.token=e.accessToken,this.context.accessToken=e.accessToken,this.context.restTokenData=e.accessToken,this.user=e.username,null===(c=null==l?void 0:l.resolve)||void 0===c||c.call(l,{accessToken:e.accessToken}),s.kg.initReport({report:this._reportLogs,reportInterval:this._reportInterval,connection:this}),M.label=8;case 8:return(N=new WebSocket(this.url)).binaryType="arraybuffer",this.sock=N,this.initEventHandle(N,d),[2]}}))}))},e.prototype.initEventHandle=function(e,t){var n=this;e.onopen=function(){var r;t({data:{isLastApi:1,isSuccess:1,accessChannel:null===(r=n.socketHost[n.hostIndex])||void 0===r?void 0:r.channel}}),(0,i.P4)(n.online.bind(n),n.offline.bind(n)),(0,i.Og)((function(){s.kg.debug("visibility true")}),(function(){s.kg.debug("visibility false")}));var o=n.mSync.generateProvision();e.send(o)},e.onclose=function(e){var t,r,o,i,a,u,c;s.kg.debug("websocket onclose"),n.logOut?(n.clear(),null===(r=null===(t=null==n?void 0:n._localCache)||void 0===t?void 0:t.getInstance())||void 0===r||r.close(),null===(o=n.eventHandler)||void 0===o||o.dispatch("onDisconnected",n.disconnectedReason),n.resetConnState()):n.autoReconnectNumTotal<n.autoReconnectNumMax?(n.reconnect(),n.autoReconnectNumTotal%n.refreshDNSIntervals==0&&n.isHttpDNS&&(s.kg.debug("refresh dns config when websocket close"),n.getDNS({isRetry:!1}).catch((function(e){s.kg.debug("get dns error",e)})))):(n.disconnectedReason=b.Z.create({type:A.E.WEBIM_CONNCTION_DISCONNECTED,message:"reconnection failed"}),null===(i=n.unMSyncSendMsgMap)||void 0===i||i.clear(),n.rejectMessage(),null===(u=null===(a=null==n?void 0:n._localCache)||void 0===a?void 0:a.getInstance())||void 0===u||u.close(),null===(c=n.eventHandler)||void 0===c||c.dispatch("onDisconnected",n.disconnectedReason),n.resetConnState(),n.reconnecting=!1,s.kg.debug("reconnect fail"))},e.onmessage=function(e){var t=n.mSync,r=t.decodeMSync,o=t.distributeMSync;i.P6.flow([r,o])(e,!1)},e.onerror=function(e){var r,o,i,a,u;s.kg.debug("websocket onerror"),n.logOut||3===n.sock.readyState||(n.autoReconnectNumTotal<n.autoReconnectNumMax?(s.kg.debug("sock.onError reconnect",n.autoReconnectNumTotal,n.autoReconnectNumMax),n.reconnect(),n.autoReconnectNumTotal%n.refreshDNSIntervals==0&&n.isHttpDNS&&(s.kg.debug("refresh dns config when websocket error"),n.getDNS({rpt:t,isRetry:!1}).catch((function(e){s.kg.debug("get dns error",e)})))):(n.disconnectedReason=b.Z.create({type:A.E.WEBIM_CONNCTION_DISCONNECTED,message:"reconnection failed"}),null===(r=n.unMSyncSendMsgMap)||void 0===r||r.clear(),n.rejectMessage(),null===(i=null===(o=null==n?void 0:n._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.close(),null===(a=n.eventHandler)||void 0===a||a.dispatch("onDisconnected",n.disconnectedReason),n.resetConnState(),n.reconnecting=!1,s.kg.debug("reconnect fail"))),t({data:{isLastApi:1,isSuccess:0,accessChannel:null===(u=n.socketHost[n.hostIndex])||void 0===u?void 0:u.channel}})}},e.prototype.close=function(){var e,t,n;s.kg.debug("call close"),s.kg._stopReportLogs(),this.logOut=!0,this.disconnectedReason=void 0,this.reconnecting=!1,this.context.status=A.E.STATUS_CLOSING,this.sock&&this.sock.close(),null===(e=this.unMSyncSendMsgMap)||void 0===e||e.clear(),this.stopHeartBeat(),this.rejectMessage(),this.context.status=A.E.STATUS_CLOSED,this._load_msg_cache=[],this._queues=[],this.unSyncQueue=[],this._msgHash={},this.mr_cache={},this.token="",this.context.accessToken="",this.clearTokenTimeout(),null===(n=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===n||n.close()},e.prototype.registerUser=function(e){return x(this,void 0,void 0,(function(){var t,n,r,o,s,a,u,c,l,d,p,f,_,E;return k(this,(function(v){switch(v.label){case 0:return t=this.dataReport.geOperateFun({uid:e.username,operationName:h.fI.REGISTER}),this.isHttpDNS?(this.dnsIndex=0,[4,this.getDNS({rpt:t,isRetry:!1})]):[3,2];case 1:v.sent(),v.label=2;case 2:return n=this.apiUrl,r=n+"/"+this.orgName+"/"+this.appName+"/users",o=JSON.stringify({username:e.username,password:e.password,nickname:e.nickname||""}),s={headers:{"Content-type":"application/json"},url:r,dataType:"json",data:o},[4,B(i.P6.ajax(s,h.fI.SDK_INTERNAL))];case 3:if(a=v.sent(),u=a[0],c=a[1],l={requestName:h.c.RESISTER,requestUrl:r},u){if(d=u.extraInfo||{},_=d.httpCode,E=d.elapse,p=d.errDesc,t({isRetry:!1,data:P(P({},{requestElapse:E,isSuccess:0,code:_,codeDesc:p}),l)}),!(this.isHttpDNS&&this.restIndex+1<this.restTotal))throw t({data:{isLastApi:1,isSuccess:0}}),delete u.extraInfo,u;return this.restIndex++,this.setRestUrl(),this.registerUser(e),[2,u]}if(!c)throw new Error("register user fail.");return f=c.extraInfo||{},_=f.httpCode,E=f.elapse,t({isEndApi:!0,isRetry:!1,data:P(P({},{requestElapse:E,isSuccess:1,code:_}),l)}),[2,{data:null==c?void 0:c.entities[0],type:0}]}}))}))},e.prototype.renewToken=function(e){var t=this;return this.isOpened()?this.getTokenExpireTimestamp(e).then((function(n){var r=n.expire_timestamp,o=Date.now();return t.expirationTime=r,t.expiresIn=r-o,t.token=e,t.context.accessToken=e,t.clearTokenTimeout(),t.tokenExpireTimeCountDown(t.expiresIn),{status:!0,token:e,expire:n.expire_timestamp}})):Promise.reject({status:!1})},e.prototype.send=function(e){return Promise.resolve(null)},e.prototype.getTokenExpireTimestamp=function(e){if("string"!=typeof e||""===e)throw Error('Invalid parameter: "token"');var t=this.context,n=t.orgName,r=t.appName,o={url:"".concat(this.apiUrl,"/").concat(n,"/").concat(r,"/sdk/users/").concat(this.user,"/token/expires"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"}};return s.kg.debug("Call getTokenExpireTimestamp",e),i.P6.ajax(o,h.fI.SDK_INTERNAL)},e.prototype.clearTokenTimeout=function(){s.kg.debug("clearTokenTimeout"),this.tokenWillExpireTimer&&clearTimeout(this.tokenWillExpireTimer),this.tokenExpiredTimer&&clearTimeout(this.tokenExpiredTimer),this.tokenWillExpireTimer=null,this.tokenExpiredTimer=null},e.prototype.compareTokenExpireTime=function(e,t){var n,r=Number(t)-Number(e);s.kg.debug("compareTokenExpireTime",r),r<=this.expiresIn/2&&r>0?(null===(n=this.eventHandler)||void 0===n||n.dispatch("onTokenWillExpire"),s.kg.info("onTokenWillExpire",r)):r<=0&&(this.closeByTokenExpired(),s.kg.info("closeByTokenExpired",r))},e.prototype.closeByTokenExpired=function(){var e;s.kg.info("closed By TokenExpired"),null===(e=this.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),this.close()},e.prototype.tokenExpireTimeCountDown=function(e){var t=this;e>Math.pow(2,31)-1&&(e=Math.pow(2,31)-1),this.tokenWillExpireTimer=setTimeout((function(){var n;null===(n=t.eventHandler)||void 0===n||n.dispatch("onTokenWillExpire"),s.kg.info("onTokenWillExpire",Math.floor(e/2))}),e/2),this.tokenExpiredTimer=setTimeout((function(){var e;s.kg.info("onTokenExpired",0),null===(e=t.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),t.close()}),e)},e.prototype.stopHeartBeat=function(){clearInterval(this.heartBeatID)},e.prototype.setContext=function(e){this.context.jid={appKey:this.appKey,name:e.username,domain:this.context.jid.domain,clientResource:this.clientResource},this.context.root=this.root,this.context.userId=e.username,this.context.appKey=this.appKey,this.context.appName=this.appName,this.context.orgName=this.orgName},e.prototype.getDNS=function(e){var t;return x(this,void 0,void 0,(function(){var n,r,o,a,u,c,l,d,p,f,_,E,v,g,m,y,O,T,R,I,S,C;return k(this,(function(N){switch(N.label){case 0:return n=e.rpt,r=e.isRetry,o=this.dnsIndex<this.dnsTotal?this.dnsIndex:0,a=this.dnsArr[o]+"/easemob/server.json",u={url:a,dataType:"json",type:"GET",data:{app_key:encodeURIComponent(this.appKey)}},[4,B(i.P6.ajax(u,h.fI.SDK_INTERNAL))];case 1:return c=N.sent(),l=c[0],d=c[1],l?(p=l.extraInfo||{},f=p.elapse,_=p.httpCode,E=p.errDesc,v={requestUrl:a,requestName:h.c.GET_DNS,isSuccess:0,code:_,codeDesc:E,requestElapse:f},n&&n({isRetry:r,data:v}),s.kg.debug("getHttpDNS failed: "+this.dnsIndex),this.dnsIndex++,this.dnsIndex<this.dnsTotal?[4,this.getDNS({rpt:n,isRetry:!0})]:[3,3]):[3,4];case 2:return N.sent(),[2];case 3:throw b.Z.create({type:A.E.SERVER_GET_DNSLIST_FAILED,message:"get DNS failed",data:l});case 4:if(!d||!(null===(t=d.rest)||void 0===t?void 0:t.hosts)||!d["msync-wx"])throw b.Z.create({type:A.E.SERVER_GET_DNSLIST_FAILED,message:"DNS hosts resolution failed",data:d});return g=d.extraInfo||{},m=g.elapse,y=g.httpCode,this._reportLogs="true"===d.enableReportLogs,this._reportInterval=Number(d.reportInterval||3e5),O={requestUrl:a,requestName:h.c.GET_DNS,requestElapse:m,isSuccess:1,code:y},n&&n({isRetry:r,data:O}),T=d.rest.hosts,R=this.https?"https":"http",I=T.filter((function(e){if(e.protocol===R)return e})),this.restHosts=I,S=d["msync-wx"].hosts,C=S.filter((function(e){if(e.protocol===R)return e})),this.socketHost=C,"true"===(null==d?void 0:d.enableDataReport)?(this.dataReport.setIsCollectDt(!0),this.dataReport.setIsReportDt(!0)):(this.dataReport.setIsReportDt(!1),this.dataReport.setIsCollectDt(!1)),"false"===(null==d?void 0:d.uploadinparts_enable)&&(this.uploadPartEnable=!1),this.setRestUrl(),this.setSocketUrl(),[2]}}))}))},e.prototype.setRestUrl=function(){var e,t;if(this.restIndex>this.restHosts.length)return s.kg.debug("restIndex > restTotal"),"";var n="",r=this.restHosts[this.restIndex],o=r.domain,i=r.ip,a=r.port,u=this.https?"https:":"http:";return i&&"undefined"!=typeof window&&"http:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)?n=u+"//"+i+":"+a:(n=u+"//"+o,a&&"80"!==a&&"443"!==a&&(n+=":".concat(a)),"undefined"==typeof window||window.location||(n="https://"+o),"undefined"!=typeof window&&window.location&&"file:"===(null===(t=window.location)||void 0===t?void 0:t.protocol)&&(n="https://"+o)),"undefined"==typeof window&&(n=u+"//"+o),this.apiUrl=n,n},e.prototype.setSocketUrl=function(){var e=this.socketHost[this.hostIndex],t=e.domain,n=e.ip,r=e.port,o="";o=t||n,r&&"80"!==r&&"443"!==r&&(o+=":"+r),o&&(this.url="//"+o+"/websocket");var i=this.https?"wss:":"ws:";this.url=i+this.url},e.prototype.online=function(){var e;s.kg.debug("online"),null===(e=this.eventHandler)||void 0===e||e.dispatch("onOnline"),this.sock&&1!==this.sock.readyState&&(s.kg.debug("sock.readyState:",this.sock.readyState),this.logOut||this.reconnecting||this.reconnect())},e.prototype.offline=function(){var e,t;s.kg.debug("offline"),null===(e=this.sock)||void 0===e||e.close(),null===(t=this.eventHandler)||void 0===t||t.dispatch("onOffline")},e.prototype.getLogger=function(){var e=s.kg.getLogger("defaultLogger");return e.setConfig({useCache:!1,maxCache:3145728,color:"",background:""}),e.enableAll(),e},e.prototype.rejectMessage=function(){var e=this,t=Object.keys(this._msgHash);if(t.length>0){var n=b.Z.create({type:A.E.MESSAGE_WEBSOCKET_DISCONNECTED,message:"websocket disconnected"});t.forEach((function(t){var r,o,i;(null===(r=e.unMSyncSendMsgMap)||void 0===r?void 0:r.has(t))||(e._msgHash[t].reject instanceof Function&&e._msgHash[t].reject(n),null===(i=null===(o=e._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.updateLocalMessage(t,{serverMsgId:t,status:L.r.FAIL}),e._msgHash[t].fail instanceof Function&&e._msgHash[t].fail(n),delete e._msgHash[t])}))}},e.prototype.resetConnState=function(){this.mSync.stopHeartBeat(),this.times=1,this.autoReconnectNumTotal=0,this.hostIndex=0},e.prototype.reconnect=function(){var e,t=this;s.kg.debug("socket reconnect readyState",this.sock.readyState),0!==this.sock.readyState&&1!==this.sock.readyState&&(!1===this.reconnecting&&(this.reconnecting=!0),null===(e=this.eventHandler)||void 0===e||e.dispatch("onReconnecting"),s.kg.info("reconnect times: ",this.times),s.kg.info("reconnect sock.readyState: ",this.sock.readyState),this.rejectMessage(),this.isHttpDNS&&(this.hostIndex<this.socketHost.length-1?this.hostIndex++:this.hostIndex=this.socketHost.length-1),setTimeout((function(){1!==t.sock.readyState&&(s.kg.info("login sock.readyState: ",t.sock.readyState),t.sock.close(),t._open({username:t.context.userId,accessToken:t.context.accessToken},!0),t.times++)}),500*this.times),this.autoReconnectNumTotal++)},e.prototype.clear=function(){this.restTotal=0,this.restIndex=0,this.hostIndex=0,this.hostTotal=0},e.prototype.downloadAndParseCombineMessage=function(e){var t=this,n=e.url,r=e.secret;return new Promise((function(e,o){var a,u,c=i.P6.getEnvInfo(),l="web"!==c.platform&&"node"!==c.platform&&"quick_app"!==c.platform&&(null===(u=null===(a=c.global)||void 0===a?void 0:a.canIUse)||void 0===u?void 0:u.call(a,"getFileSystemManager")),d=function(n){var r=function(e){o({message:"Read file failed",data:e})},a=function(n){return x(t,void 0,void 0,(function(){var t,r,a,u,c,d,p,f,h,_,E,v,g;return k(this,(function(m){switch(m.label){case 0:for(t=l?new Uint8Array(n.data):new Uint8Array(n.target.result),r=0,a=0,u=2,c=t.subarray(r,r+u),d=i.P6.Uint8ArrayToString(c),s.kg.debug("file header:",d),a+=u,p=0,f=2;f<t.length-1;f++)f%2==1&&(p^=t[f]);if(h=t.subarray(t.length-1,t.length),s.kg.debug("checkResult:",p,h[0]===p),h[0]!==p)return[2,o({message:"File verification failed"})];if("cm"!==d)return[3,7];m.label=1;case 1:m.trys.push([1,5,,6]),_=[],E=function(){var e,n,o,i;return k(this,(function(s){switch(s.label){case 0:return r+=u,a+=u=4,e=t.subarray(r,r+u),r+=u,u=e.reduce((function(t,n,r){return t+(n<<8*(e.length-r-1))}),0),a+=u,n=t.subarray(r,r+u),o=(o=v.root.lookup("easemob.pb.Meta")).decode(n),[4,w.Z.call(v,o,0,!0,!0)];case 1:return i=s.sent(),_.push(i),[2]}}))},v=this,m.label=2;case 2:return a<t.length-1?[5,E()]:[3,4];case 3:return m.sent(),[3,2];case 4:return[2,e(_)];case 5:return g=m.sent(),o({message:"Parse file failed",data:g}),[3,6];case 6:return[3,8];case 7:return[2,o({message:"File verification failed"})];case 8:return[2]}}))}))};if(l){var u=c.global.getFileSystemManager(),d=n.tempFilePath;u.readFile({filePath:d,success:a,fail:r})}else if(n instanceof Blob){var p=new FileReader;p.readAsArrayBuffer(n),p.onerror=r,p.onload=a}},p=function(e){o({type:A.E.WEBIM_DOWNLOADFILE_ERROR,message:"Download failed, please try again",data:e})};l?c.global.downloadFile({url:n,success:d,fail:p}):i.P6.download.call(t,{url:n,headers:{Accept:"application/json"},onFileDownloadComplete:d,onFileDownloadError:p,secret:r,accessToken:t.context.accessToken})}))},e.prototype.setLoginInfoCustomExt=function(e){if(s.kg.debug("setLoginInfoCustomExt","params:",e),e){if("string"!=typeof e)throw new Error("ext must be a string");if(e.length>1024)throw new Error("ext length must be less than 1024")}this.loginInfoCustomExt=e},e}(),B=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e,null]}))},G=H}(),__webpack_exports__=__webpack_require__.O(__webpack_exports__),__webpack_exports__}()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.websdk=t():e.websdk=t()}(self,(function(){return function(){var e,t={4537:function(e){"use strict";e.exports=function(e,t){for(var n=new Array(arguments.length-1),r=0,o=2,i=!0;o<arguments.length;)n[r++]=arguments[o++];return new Promise((function(o,s){n[r]=function(e){if(i)if(i=!1,e)s(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];o.apply(null,t)}};try{e.apply(t||null,n)}catch(e){i&&(i=!1,s(e))}}))}},7419:function(e,t){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),o=new Array(123),i=0;i<64;)o[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;n.encode=function(e,t,n){for(var o,i=null,s=[],a=0,u=0;t<n;){var c=e[t++];switch(u){case 0:s[a++]=r[c>>2],o=(3&c)<<4,u=1;break;case 1:s[a++]=r[o|c>>4],o=(15&c)<<2,u=2;break;case 2:s[a++]=r[o|c>>6],s[a++]=r[63&c],u=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=r[o],s[a++]=61,1===u&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";n.decode=function(e,t,n){for(var r,i=n,a=0,u=0;u<e.length;){var c=e.charCodeAt(u++);if(61===c&&a>1)break;if(void 0===(c=o[c]))throw Error(s);switch(a){case 0:r=c,a=1;break;case 1:t[n++]=r<<2|(48&c)>>4,r=c,a=2;break;case 2:t[n++]=(15&r)<<4|(60&c)>>2,r=c,a=3;break;case 3:t[n++]=(3&r)<<6|c,a=0}}if(1===a)throw Error(s);return n-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},5124:function(e){"use strict";function t(e,n){"string"==typeof e&&(n=e,e=void 0);var r=[];function o(e){if("string"!=typeof e){var n=i();if(t.verbose&&console.log("codegen: "+n),n="return "+n,e){for(var s=Object.keys(e),a=new Array(s.length+1),u=new Array(s.length),c=0;c<s.length;)a[c]=s[c],u[c]=e[s[c++]];return a[c]=n,Function.apply(null,a).apply(null,u)}return Function(n)()}for(var l=new Array(arguments.length-1),d=0;d<l.length;)l[d]=arguments[++d];if(d=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var n=l[d++];switch(t){case"d":case"f":return String(Number(n));case"i":return String(Math.floor(n));case"j":return JSON.stringify(n);case"s":return String(n)}return"%"})),d!==l.length)throw Error("parameter count mismatch");return r.push(e),o}function i(t){return"function "+(t||n||"")+"("+(e&&e.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return o.toString=i,o}e.exports=t,t.verbose=!1},9211:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},9054:function(e,t,n){"use strict";e.exports=i;var r=n(4537),o=n(7199)("fs");function i(e,t,n){return"function"==typeof t?(n=t,t={}):t||(t={}),n?!t.xhr&&o&&o.readFile?o.readFile(e,(function(r,o){return r&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,n):r?n(r):n(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,n):r(i,this,e,t)}i.xhr=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(0!==r.status&&200!==r.status)return n(Error("status "+r.status));if(t.binary){var e=r.response;if(!e){e=[];for(var o=0;o<r.responseText.length;++o)e.push(255&r.responseText.charCodeAt(o))}return n(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return n(null,r.responseText)}},t.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",e),r.send()}},945:function(e){"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function a(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?o:i,e.writeFloatBE=r?i:o,e.readFloatLE=r?s:a,e.readFloatBE=r?a:s}():function(){function t(e,t,n,r){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,n,r)}}function s(e,t,n){var r=e(t,n),o=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:o*(1/0):0===i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=s.bind(null,o),e.readFloatBE=s.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(e,r,o){t[0]=e,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function a(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?o:i,e.writeDoubleBE=r?i:o,e.readDoubleLE=r?s:a,e.readDoubleBE=r?a:s}():function(){function t(e,t,n,r,o,i){var s=r<0?1:0;if(s&&(r=-r),0===r)e(0,o,i+t),e(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))e(0,o,i+t),e(2146959360,o,i+n);else if(r>17976931348623157e292)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+n);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+n);else{var u=Math.floor(Math.log(r)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=r*Math.pow(2,-u))>>>0,o,i+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,o,i+n)}}}function s(e,t,n,r,o){var i=e(r,o+t),s=e(r,o+n),a=2*(s>>31)+1,u=s>>>20&2047,c=4294967296*(1048575&s)+i;return 2047===u?c?NaN:a*(1/0):0===u?5e-324*a*c:a*Math.pow(2,u-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=s.bind(null,o,0,4),e.readDoubleBE=s.bind(null,i,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},7199:function(e,t,n){"use strict";e.exports=function(e){try{var t=n(822)(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}},822:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=822,e.exports=t},8626:function(e,t){"use strict";var n=t,r=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=n.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=r(e),o="";n&&(o=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):n?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return o+t.join("/")};n.resolve=function(e,t,n){return n||(t=o(t)),r(t)?t:(n||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},6662:function(e){"use strict";e.exports=function(e,t,n){var r=n||8192,o=r>>>1,i=null,s=r;return function(n){if(n<1||n>o)return e(n);s+n>r&&(i=e(r),s=0);var a=t.call(i,s,s+=n);return 7&s&&(s=1+(7|s)),a}}},4997:function(e,t){"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},n.read=function(e,t,n){if(n-t<1)return"";for(var r,o=null,i=[],s=0;t<n;)(r=e[t++])<128?i[s++]=r:r>191&&r<224?i[s++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[s++]=55296+(r>>10),i[s++]=56320+(1023&r)):i[s++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))},n.write=function(e,t,n){for(var r,o,i=n,s=0;s<e.length;++s)(r=e.charCodeAt(s))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=e.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&o),++s,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-i}},4188:function(e,t,n){var r,o,i;!function(s){"use strict";if(null!=t&&"number"!=typeof t.nodeType)e.exports=s();else if(null!=n.amdO)o=[],void 0===(i="function"==typeof(r=s)?r.apply(t,o):r)||(e.exports=i);else{var a=s(),u="undefined"!=typeof self?self:$.global;"function"!=typeof u.btoa&&(u.btoa=a.btoa),"function"!=typeof u.atob&&(u.atob=a.atob)}}((function(){"use strict";var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function t(e){this.message=e}return t.prototype=new Error,t.prototype.name="InvalidCharacterError",{btoa:function(n){for(var r,o,i=String(n),s=0,a=e,u="";i.charAt(0|s)||(a="=",s%1);u+=a.charAt(63&r>>8-s%1*8)){if((o=i.charCodeAt(s+=3/4))>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|o}return u},atob:function(n){var r=String(n).replace(/[=]+$/,"");if(r.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,s=0,a=0,u="";i=r.charAt(a++);~i&&(o=s%4?64*o+i:i,s++%4)?u+=String.fromCharCode(255&o>>(-2*s&6)):0)i=e.indexOf(i);return u}}}))},4363:function(e,t,n){"use strict";n.d(t,{U:function(){return a},w:function(){return u}}),n(9601),n(2772),n(1249);var r=n(7360),o=n(8161),i=n(4024),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},a={chat:"singleChat",chatroom:"chatRoom",groupchat:"groupChat",singleChat:"singleChat",chatRoom:"chatRoom",groupChat:"groupChat"};function u(e,t){var n,u,c,l=t||{},d=l.formatCustomExts,h=void 0===d||d,f=l.formatChatType,p=void 0!==f&&f,E=e.id,v=e.payload,g=e.timestamp,m=e.to,y=v.bodies&&v.bodies.length>0?v.bodies[0]:{},_={},O={},T=v.type?v.type:m.indexOf("@conference.easemob.com")>-1?"groupChat":"singleChat";T="chat"===T?"singleChat":T,p&&v.type&&(T=a[v.type]);var R="";switch(y.type){case"txt":if(Object.prototype.hasOwnProperty.call(y,"subType")&&"sub_combine"===y.subType)R=o.t.call(this,{remotePath:null==y?void 0:y.url,secret:null==y?void 0:y.secret}),_={id:E,type:"combine",chatType:T,to:v.to,from:v.from,ext:v.ext,time:g,title:y.title||"",summary:y.summary||"",url:R||"",secret:y.secret||"",file_length:y.file_length||0,filename:y.filename||"",compatibleText:y.msg,combineLevel:y.combineLevel||0};else{var I=null===(n=null==v?void 0:v.meta)||void 0===n?void 0:n.edit_msg;if(_={id:E,type:"txt",chatType:T,msg:y.msg||"",to:v.to||"",from:v.from,time:g,ext:v.ext},I){var S=I.edit_time,C=I.operator,N=I.count;_.modifiedInfo={operationTime:S,operatorId:C,operationCount:N}}}break;case"img":R=this.useOwnUploadFun?null==y?void 0:y.url:o.t.call(this,{remotePath:null==y?void 0:y.url,secret:null==y?void 0:y.secret}),_={id:E,type:"img",chatType:T,to:v.to,from:v.from,time:g,ext:v.ext,width:(null===(u=y.size)||void 0===u?void 0:u.width)||0,height:(null===(c=y.size)||void 0===c?void 0:c.height)||0,thumb:this.useOwnUploadFun?"":"".concat(R,"&thumbnail=true"),thumb_secret:y.secret,secret:y.secret||"",url:R||"",file_length:y.file_length||0,file:{}};break;case"video":R=this.useOwnUploadFun?null==y?void 0:y.url:o.t.call(this,{remotePath:null==y?void 0:y.url,secret:null==y?void 0:y.secret}),_={id:E,type:"video",chatType:T,from:v.from,to:v.to,thumb:i.P6.formatAttachUrl.call(this,y.thumb),thumb_secret:y.thumb_secret||"",url:R||"",secret:y.secret||"",filename:y.filename,length:y.length||0,file:{},file_length:y.file_length||0,filetype:v.ext.file_type||"",ext:v.ext,time:g};break;case"loc":_={id:E,type:"loc",chatType:T,from:v.from,to:v.to,buildingName:y.buildingName||"",addr:y.addr,lat:y.lat,lng:y.lng,ext:v.ext,time:g};break;case"audio":R=this.useOwnUploadFun?null==y?void 0:y.url:o.t.call(this,{remotePath:null==y?void 0:y.url,secret:null==y?void 0:y.secret}),_={id:E,type:"audio",chatType:T,from:v.from,to:v.to,secret:y.secret||"",ext:v.ext,time:g,url:R||"",file:{},filename:y.filename,length:y.length||0,file_length:y.file_length||0,filetype:v.ext.file_type||""};break;case"file":R=this.useOwnUploadFun?null==y?void 0:y.url:o.t.call(this,{remotePath:null==y?void 0:y.url,secret:null==y?void 0:y.secret}),_={id:E,type:"file",chatType:T,from:v.from,to:v.to,ext:v.ext,time:g,url:R||"",secret:y.secret||"",file:{},filename:y.filename||"",file_length:y.file_length||0,filetype:v.ext.file_type||""};break;case"cmd":_={id:E,type:"cmd",chatType:T,from:v.from,to:v.to,ext:v.ext,time:g,action:y.action||""};break;case"custom":var A=y.customExts||{};h&&y.customExts&&(A={},y.customExts.map((function(e){A=s(s({},A),e)}))),_={id:E,type:"custom",chatType:T,from:v.from,to:v.to,ext:v.ext,time:g,customEvent:y.customEvent||"",customExts:A};break;case"combine":R=o.t.call(this,{remotePath:null==y?void 0:y.url,secret:null==y?void 0:y.secret}),_={id:E,type:"combine",chatType:T,msg:y.msg||"",to:v.to||"",from:v.from,time:g,ext:v.ext,title:y.title||"",summary:y.summary||"",url:R||"",compatibleText:y.text,combineLevel:y.combineLevel||0,secret:y.secret||"",filename:y.filename||"",file_length:y.file_length||0};break;default:r.kg.error("unexpected message: ".concat(e))}if(v.msgConfig&&(O.msgConfig=v.msgConfig),null==v?void 0:v.meta){var b=v.meta;b.thread&&(O.chatThread={messageId:b.thread.msg_parent_id,parentId:b.thread.muc_parent_id,chatThreadName:b.thread.thread_name}),b.reaction&&(O.reactions=b.reaction),b.translations&&(O.translations=b.translations)}return s(s({},_),O)}},6801:function(e,t,n){"use strict";n.d(t,{r:function(){return c}}),n(1539),n(8674),n(2222),n(4812);var r=n(3246),o=n(5531),i=n(7252),s=n(4024),a=n(7360),u=n(1595);function c(e){if("string"!=typeof e.deviceId||""===e.deviceId)throw Error('Invalid parameter: "deviceId"');if(!r.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var n=this.context,c=n.orgName,l=n.appName,d=n.accessToken,h={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(l,"/users/").concat(this.user),type:"PUT",data:JSON.stringify({device_id:e.deviceId,device_token:e.deviceToken,notifier_name:e.notifierName}),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};a.kg.debug("Call uploadPushTokenToServer",e);var f=s.hj.bind(this,h,u.fI.UPLOAD_PUSH_TOKEN);return s.P6.retryPromise(f).then((function(e){var t=e.entities[0]||{};return{type:e.type,data:t}}))}},3246:function(e,t,n){"use strict";n.d(t,{H7:function(){return l},XZ:function(){return u},_W:function(){return c}}),n(7941),n(9554),n(1539),n(4747),n(6699),n(2023);var r=n(5531),o=n(7252),i=n(7360);function s(){var e=this.context.appName,t=this.context.orgName;return!(!e||!t)||(this.onError&&this.onError({type:r.E.WEBIM_CONNCTION_AUTH_ERROR,message:"appName or orgName is illegal"}),!1)}function a(){var e,t=this.context.accessToken;if(!t){var n=o.Z.create({type:r.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"});return i.kg.debug("token not assign error",t),this.onError&&this.onError(n),null===(e=this.eventHandler)||void 0===e||e.dispatch("onError",n),!1}return!0}function u(){return a.call(this)&&s.call(this)}function c(e){var t=e.data,n=e.type;return{data:{status:Object.keys(t.errorKeys).length>0?"fail":"success",errorKeys:t.errorKeys,successKeys:t.successKeys},type:n}}function l(e){var t=e.data,n=void 0;return Object.keys(t.errorKeys).length>0&&Object.keys(t.errorKeys).forEach((function(e){var i=t.errorKeys[e];n=i.includes("is not part of you")?o.Z.create({type:r.E.NO_PERMISSION,message:i}):i.includes("size of metadata for this single chatroom exceeds the user defined limit")||i.includes("total size of chatroom metadata for this app exceeds the user defined limit")||i.includes("is exceeding maximum limit")?o.Z.create({type:r.E.MAX_LIMIT,message:i}):i.includes("is not Legal")?o.Z.create({type:r.E.REQUEST_PARAMETER_ERROR,message:i}):i.includes("Failed to update userMetadata. Concurrent updates not allowed")?o.Z.create({type:r.E.OPERATION_NOT_ALLOWED,message:i}):o.Z.create({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:i})})),n}},4319:function(e,t,n){"use strict";n.d(t,{Ge:function(){return f},Gf:function(){return i},Nt:function(){return u},XV:function(){return l},al:function(){return d},bh:function(){return p},ke:function(){return h},th:function(){return a},xd:function(){return c},xz:function(){return o},zj:function(){return s}});var r=n(5531),o=15e3,i=15e3,s=3e5,a=1e4,u=1e4,c=8e3,l=3e5,d=3e4,h=5,f=3,p=[r.E.MAX_LIMIT,r.E.WEBIM_TOKEN_EXPIRED,r.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,r.E.USER_NOT_FOUND,r.E.WEBIM_CONNCTION_AUTH_ERROR,r.E.REQUEST_PARAMETER_ERROR,r.E.WEBIM_CONNCTION_AUTH_ERROR,r.E.WEBIM_SERVER_SERVING_DISABLED]},2071:function(e,t,n){"use strict";n.d(t,{$x:function(){return a},F3:function(){return u},TJ:function(){return o},Tp:function(){return d},Wc:function(){return r},el:function(){return i},iB:function(){return c},iO:function(){return s},yK:function(){return l}}),n(6992),n(1532),n(1539),n(8783),n(3948);var r=7,o=new Map,i="im",s=new Map,a="32f24ab2ddb74f508aa9286c356cec84",u=1e3,c={INIT:9674,API:9675},l="direct",d=-1},1595:function(e,t,n){"use strict";var r,o,i,s,a,u;n.d(t,{C8:function(){return r},aC:function(){return u},c:function(){return i},dd:function(){return a},fI:function(){return o},td:function(){return s}}),function(e){e[e.UNKNOWOPERATION=-1]="UNKNOWOPERATION",e[e.REST_GET_SESSION_LIST=1]="REST_GET_SESSION_LIST",e[e.REST_DEL_SESSION=2]="REST_DEL_SESSION",e[e.REST_GET_HISTORY_MESSAGE=3]="REST_GET_HISTORY_MESSAGE",e[e.REST_PIN_CONVERSATION=4]="REST_PIN_CONVERSATION",e[e.REST_MARK_CONVERSATION=5]="REST_MARK_CONVERSATION",e[e.REST_UPLOAD_FILE_IN_PARTS=6]="REST_UPLOAD_FILE_IN_PARTS",e[e.REST_DELETE_MESSAGES_CONVERSATIONS=7]="REST_DELETE_MESSAGES_CONVERSATIONS",e[e.REST_PIN_MESSAGE=8]="REST_PIN_MESSAGE",e[e.REST_FETCH_PINMESSAGES=9]="REST_FETCH_PINMESSAGES",e[e.REST_OPERATE=100]="REST_OPERATE",e[e.MSYNC_SENDMESSAGE=101]="MSYNC_SENDMESSAGE",e[e.MSYNC_RECALLMESSAGE=102]="MSYNC_RECALLMESSAGE",e[e.MSYNC_MODIFYMESSAGE=103]="MSYNC_MODIFYMESSAGE",e[e.MSYNC_OPERATE=200]="MSYNC_OPERATE",e[e.ROSTER_ADD=201]="ROSTER_ADD",e[e.ROSTER_REMOVE=202]="ROSTER_REMOVE",e[e.ROSTER_ACCEPT=203]="ROSTER_ACCEPT",e[e.ROSTER_DECLINE=204]="ROSTER_DECLINE",e[e.ROSTER_BAN=205]="ROSTER_BAN",e[e.ROSTER_ALLOW=206]="ROSTER_ALLOW",e[e.ROSTER_BLACKLIST=207]="ROSTER_BLACKLIST",e[e.ROSTER_CONTACTS=208]="ROSTER_CONTACTS",e[e.ROSTER_GET_ALL_CONTACTS_REMARKS=209]="ROSTER_GET_ALL_CONTACTS_REMARKS",e[e.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE=210]="ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE",e[e.ROSTER_SET_CONTACT_REMARK=211]="ROSTER_SET_CONTACT_REMARK",e[e.ROSTER_OPERATE=300]="ROSTER_OPERATE",e[e.USER_LOGIN=301]="USER_LOGIN",e[e.USER_CREATE=302]="USER_CREATE",e[e.USER_UPDATE_USERINFO=303]="USER_UPDATE_USERINFO",e[e.USER_FETCH_USERINFO=304]="USER_FETCH_USERINFO",e[e.USER_UPDATE_NICK=305]="USER_UPDATE_NICK",e[e.USER_UPLOAD_PUSH_TOKEN=306]="USER_UPLOAD_PUSH_TOKEN",e[e.USER_LOGGEDIN_OTHER_PLATFORM=307]="USER_LOGGEDIN_OTHER_PLATFORM",e[e.USER_OPERATE=400]="USER_OPERATE",e[e.GROUP_CREATEGROUP=401]="GROUP_CREATEGROUP",e[e.GROUP_BLOCK_MESSAGE=402]="GROUP_BLOCK_MESSAGE",e[e.GROUP_FETCH_PUBLICGROUPS_WITHCURSOR=403]="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e[e.GROUP_FETCH_USERS_GROUP=404]="GROUP_FETCH_USERS_GROUP",e[e.GROUP_CHANGE_OWNER=405]="GROUP_CHANGE_OWNER",e[e.GROUP_FETCH_SPECIFICATION=406]="GROUP_FETCH_SPECIFICATION",e[e.GROUP_CHANGE_GROUPATTRIBUTE=407]="GROUP_CHANGE_GROUPATTRIBUTE",e[e.GROUP_FETCH_MEMEBERS=408]="GROUP_FETCH_MEMEBERS",e[e.GROUP_GET_ADMIN=409]="GROUP_GET_ADMIN",e[e.GROUP_SET_ADMIN=410]="GROUP_SET_ADMIN",e[e.GROUP_REMOVE_ADMIN=411]="GROUP_REMOVE_ADMIN",e[e.GROUP_DESTOTYGROUP=412]="GROUP_DESTOTYGROUP",e[e.GROUP_LEAVEGROUP=413]="GROUP_LEAVEGROUP",e[e.GROUP_INVITE_TO_GROUP=414]="GROUP_INVITE_TO_GROUP",e[e.GROUP_JOIN_PUBLICGROUP=415]="GROUP_JOIN_PUBLICGROUP",e[e.GROUP_ACCEPT_JOINPUBLICGROUPAPPL=416]="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e[e.GROUP_DECLINE_JOINPUBLICGROUPAPPL=417]="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e[e.GROUP_ACCEPT_INVITATION=418]="GROUP_ACCEPT_INVITATION",e[e.GROUP_DECLINE_INVITATION=419]="GROUP_DECLINE_INVITATION",e[e.GROUP_REMOVE_MEMBER=420]="GROUP_REMOVE_MEMBER",e[e.GROUP_REMOVE_MEMBERS=421]="GROUP_REMOVE_MEMBERS",e[e.GROUP_MUTE_MEMBERS=422]="GROUP_MUTE_MEMBERS",e[e.GROUP_UNMUTE_MEMBERS=423]="GROUP_UNMUTE_MEMBERS",e[e.GROUP_FETCH_MUTES=424]="GROUP_FETCH_MUTES",e[e.GROUP_BLOCK_MEMBER=425]="GROUP_BLOCK_MEMBER",e[e.GROUP_BLOCK_MEMBERS=426]="GROUP_BLOCK_MEMBERS",e[e.GROUP_UNBLOCK_MEMBER=427]="GROUP_UNBLOCK_MEMBER",e[e.GROUP_UNBLOCK_MEMBERS=428]="GROUP_UNBLOCK_MEMBERS",e[e.GROUP_GET_BLOCK_LIST=429]="GROUP_GET_BLOCK_LIST",e[e.GROUP_MUTE_ALLMEMBERS=430]="GROUP_MUTE_ALLMEMBERS",e[e.GROUP_UNMUTE_ALLMEMBERS=431]="GROUP_UNMUTE_ALLMEMBERS",e[e.GROUP_ADD_WHITELIST=432]="GROUP_ADD_WHITELIST",e[e.GROUP_REMOVE_WHITELIST=433]="GROUP_REMOVE_WHITELIST",e[e.GROUP_FETCH_WHITELIST=434]="GROUP_FETCH_WHITELIST",e[e.GROUP_IS_IN_WHITELIST=435]="GROUP_IS_IN_WHITELIST",e[e.GROUP_GET_READ_USERS=436]="GROUP_GET_READ_USERS",e[e.GROUP_FETCH_ANNOUNCEMENT=437]="GROUP_FETCH_ANNOUNCEMENT",e[e.GROUP_UPDATE_ANNOUNCEMENT=438]="GROUP_UPDATE_ANNOUNCEMENT",e[e.GROUP_UPLOAD_SHAREDFILE=439]="GROUP_UPLOAD_SHAREDFILE",e[e.GROUP_DELETE_SHAREDFILE=440]="GROUP_DELETE_SHAREDFILE",e[e.GROUP_FETCH_SHAREDFILE=441]="GROUP_FETCH_SHAREDFILE",e[e.GROUP_DOWNLOAD_SHAREDFILE=442]="GROUP_DOWNLOAD_SHAREDFILE",e[e.GROUP_MEMBER_SET_META_DATA=443]="GROUP_MEMBER_SET_META_DATA",e[e.GROUP_MEMBER_FETCH_META_DATA=444]="GROUP_MEMBER_FETCH_META_DATA",e[e.GROUP_OPERATE=500]="GROUP_OPERATE",e[e.CHATROOM_FETCH_CHATROOMSWITHPAGE=501]="CHATROOM_FETCH_CHATROOMSWITHPAGE",e[e.CHATROOM_CREATECHATROOM=502]="CHATROOM_CREATECHATROOM",e[e.CHATROOM_DESTORYCHATROOM=503]="CHATROOM_DESTORYCHATROOM",e[e.CHATROOM_FETCH_SPECIFICATION=504]="CHATROOM_FETCH_SPECIFICATION",e[e.CHATROOM_CHANGE_ATTRIBUTE=505]="CHATROOM_CHANGE_ATTRIBUTE",e[e.CHATROOM_REMOVE_MEMBER=506]="CHATROOM_REMOVE_MEMBER",e[e.CHATROOM_REMOVE_MEMBERS=507]="CHATROOM_REMOVE_MEMBERS",e[e.CHATROOM_ADD_MEMBERS=508]="CHATROOM_ADD_MEMBERS",e[e.CHATROOM_JOINCAHTROOM=509]="CHATROOM_JOINCAHTROOM",e[e.CHATROOM_LEAVECAHTROOM=510]="CHATROOM_LEAVECAHTROOM",e[e.CHATROOM_FETCH_MEMBERS=511]="CHATROOM_FETCH_MEMBERS",e[e.CHATROOM_GET_ADMIN=512]="CHATROOM_GET_ADMIN",e[e.CHATROOM_SET_ADMIN=513]="CHATROOM_SET_ADMIN",e[e.CHATROOM_REMOVE_ADMIN=514]="CHATROOM_REMOVE_ADMIN",e[e.CHATROOM_MUTE_USER=515]="CHATROOM_MUTE_USER",e[e.CHATROOM_UNMUTE_USER=516]="CHATROOM_UNMUTE_USER",e[e.CHATROOM_FETCH_MUTES=517]="CHATROOM_FETCH_MUTES",e[e.CHATROOM_BLOCK_USER=518]="CHATROOM_BLOCK_USER",e[e.CHATROOM_BLOCK_USERS=519]="CHATROOM_BLOCK_USERS",e[e.CHATROOM_UNBLOCK_USER=520]="CHATROOM_UNBLOCK_USER",e[e.CHATROOM_UNBLOCK_USERS=521]="CHATROOM_UNBLOCK_USERS",e[e.CHATROOM_FETCH_BANS=522]="CHATROOM_FETCH_BANS",e[e.CHATROOM_MUTE_ALLMEMEBERS=523]="CHATROOM_MUTE_ALLMEMEBERS",e[e.CHATROOM_UNMUTE_ALLMEMEBERS=524]="CHATROOM_UNMUTE_ALLMEMEBERS",e[e.CHATROOM_ADD_WHITELIST=525]="CHATROOM_ADD_WHITELIST",e[e.CHATROOM_REMOVE_WHITELIST=526]="CHATROOM_REMOVE_WHITELIST",e[e.CHATROOM_FETCH_WHITELIST=527]="CHATROOM_FETCH_WHITELIST",e[e.CHATROOM_FETCH_MEMBERIN_WHITELIST=528]="CHATROOM_FETCH_MEMBERIN_WHITELIST",e[e.CHATROOM_FETCH_ANNOUNCEMENT=529]="CHATROOM_FETCH_ANNOUNCEMENT",e[e.CHATROOM_UPDATE_ANNOUNCEMENT=530]="CHATROOM_UPDATE_ANNOUNCEMENT",e[e.CHATROOM_REMOVE_SHARE_FILE=531]="CHATROOM_REMOVE_SHARE_FILE",e[e.CHATROOM_GET_SHARE_FILE_LIST=532]="CHATROOM_GET_SHARE_FILE_LIST",e[e.CHATROOM_UPLOAD_FILE=533]="CHATROOM_UPLOAD_FILE",e[e.CHATROOM_SET_META_DATA=534]="CHATROOM_SET_META_DATA",e[e.CHATROOM_DELETE_META_DATA=535]="CHATROOM_DELETE_META_DATA",e[e.CHATROOM_FETCH_META_DATA=536]="CHATROOM_FETCH_META_DATA",e[e.CHATROOM_FETCH_USER_JOINED_CHATROOM=537]="CHATROOM_FETCH_USER_JOINED_CHATROOM",e[e.CHATROOM_OPERATE=600]="CHATROOM_OPERATE"}(r||(r={})),function(e){e.SDK_INTERNAL="SDK_INTERNAL",e.LOGIN="USER_LOGIN",e.REGISTER="USER_CREATE",e.GET_CHATROOM_LIST="CHATROOM_FETCH_CHATROOMSWITHPAGE",e.CREATE_CHATROOM="CHATROOM_CREATECHATROOM",e.DESTROY_CHATROOM="CHATROOM_DESTORYCHATROOM",e.GET_CHATROOM_DETAIL="CHATROOM_FETCH_SPECIFICATION",e.MODIFY_CHATROOM="CHATROOM_CHANGE_ATTRIBUTE",e.REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBER",e.MULTI_REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBERS",e.ADD_USERS_TO_CHATROOM="CHATROOM_ADD_MEMBERS",e.JOIN_CHATROOM="CHATROOM_JOINCAHTROOM",e.QUIT_CHATROOM="CHATROOM_LEAVECAHTROOM",e.LIST_CHATROOM_MEMBERS="CHATROOM_FETCH_MEMBERS",e.GET_CHATROOM_ADMIN="CHATROOM_GET_ADMIN",e.SET_CHATROOM_ADMIN="CHATROOM_SET_ADMIN",e.REMOVE_CHATROOM_ADMIN="CHATROOM_REMOVE_ADMIN",e.MUTE_CHATROOM_MEMBER="CHATROOM_MUTE_USER",e.REMOVE_MUTE_CHATROOM_MEMBER="CHATROOM_UNMUTE_USER",e.GET_MUTE_CHATROOM_MEMBERS="CHATROOM_FETCH_MUTES",e.SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USER",e.MULTI_SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USERS",e.REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USER",e.MULTI_REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USERS",e.GET_CHATROOM_BLOCK_MEMBERS="CHATROOM_FETCH_BANS",e.DISABLED_CHATROOM_SEND_MSG="CHATROOM_MUTE_ALLMEMEBERS",e.ENABLE_CHATROOM_SEND_MSG="CHATROOM_UNMUTE_ALLMEMEBERS",e.ADD_CHATROOM_WHITE_USERS="CHATROOM_ADD_WHITELIST",e.REMOVE_CHATROOM_WHITE_USERS="CHATROOM_REMOVE_WHITELIST",e.GET_CHATROOM_WHITE_USERS="CHATROOM_FETCH_WHITELIST",e.CHECK_CHATROOM_WHITE_USER="CHATROOM_FETCH_MEMBERIN_WHITELIST",e.GET_CHATROOM_ANN="CHATROOM_FETCH_ANNOUNCEMENT",e.UPDATE_CHATROOM_ANN="CHATROOM_UPDATE_ANNOUNCEMENT",e.DELETE_CHATROOM_FILE="CHATROOM_REMOVE_SHARE_FILE",e.GET_CHATROOM_FILES="CHATROOM_GET_SHARE_FILE_LIST",e.UPLOAD_CHATROOM_FILE="CHATROOM_UPLOAD_FILE",e.SET_CHATROOM_ATTR="CHATROOM_SET_META_DATA",e.DELETE_CHATROOM_ATTR="CHATROOM_DELETE_META_DATA",e.GET_CHATROOM_ATTR="CHATROOM_FETCH_META_DATA",e.GET_USER_JOINED_CHATROOM="CHATROOM_FETCH_USER_JOINED_CHATROOM",e.CREATE_GROUP="GROUP_CREATEGROUP",e.BLOCK_GROUP="GROUP_BLOCK_MESSAGE",e.LIST_GROUP="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e.GET_USER_GROUP="GROUP_FETCH_USERS_GROUP",e.CHANGE_OWNER="GROUP_CHANGE_OWNER",e.GET_GROUP_INFO="GROUP_FETCH_SPECIFICATION",e.MODIFY_GROUP="GROUP_CHANGE_GROUPATTRIBUTE",e.LIST_GROUP_MEMBER="GROUP_FETCH_MEMEBERS",e.GET_GROUP_ADMIN="GROUP_GET_ADMIN",e.SET_GROUP_ADMIN="GROUP_SET_ADMIN",e.REMOVE_GROUP_ADMIN="GROUP_REMOVE_ADMIN",e.DISSOLVE_GROUP="GROUP_DESTOTYGROUP",e.QUIT_GROUP="GROUP_LEAVEGROUP",e.INVITE_TO_GROUP="GROUP_INVITE_TO_GROUP",e.JOIN_GROUP="GROUP_JOIN_PUBLICGROUP",e.AGREE_JOIN_GROUP="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e.REJECT_JOIN_GROUP="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e.AGREE_INVITE_GROUP="GROUP_ACCEPT_INVITATION",e.REJECT_INVITE_GROUP="GROUP_DECLINE_INVITATION",e.REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBER",e.MULTI_REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBERS",e.MUTE_GROUP_MEMBER="GROUP_MUTE_MEMBERS",e.UNMUTE_GROUP_MEMBER="GROUP_UNMUTE_MEMBERS",e.GET_GROUP_MUTE_LIST="GROUP_FETCH_MUTES",e.BLOCK_GROUP_MEMBER="GROUP_BLOCK_MEMBER",e.BLOCK_GROUP_MEMBERS="GROUP_BLOCK_MEMBERS",e.UNBLOCK_GROUP_MEMBER="GROUP_UNBLOCK_MEMBER",e.UNBLOCK_GROUP_MEMBERS="GROUP_UNBLOCK_MEMBERS",e.GET_GROUP_BLACK_LIST="GROUP_GET_BLOCK_LIST",e.DISABLED_SEND_GROUP_MSG="GROUP_MUTE_ALLMEMBERS",e.ENABLE_SEND_GROUP_MSG="GROUP_UNMUTE_ALLMEMBERS",e.ADD_USERS_TO_GROUP_WHITE="GROUP_ADD_WHITELIST",e.REMOVE_GROUP_WHITE_MEMBER="GROUP_REMOVE_WHITELIST",e.GET_GROUP_WHITE_LIST="GROUP_FETCH_WHITELIST",e.IS_IN_GROUP_WHITE_LIST="GROUP_IS_IN_WHITELIST",e.GET_GROUP_MSG_READ_USER="GROUP_GET_READ_USERS",e.GET_GROUP_ANN="GROUP_FETCH_ANNOUNCEMENT",e.UPDATE_GROUP_ANN="GROUP_UPDATE_ANNOUNCEMENT",e.UPLOAD_GROUP_FILE="GROUP_UPLOAD_SHAREDFILE",e.DELETE_GROUP_FILE="GROUP_DELETE_SHAREDFILE",e.GET_GROUP_FILE_LIST="GROUP_FETCH_SHAREDFILE",e.DOWN_GROUP_FILE="GROUP_DOWNLOAD_SHAREDFILE",e.SET_GROUP_MEMBER_ATTRS="GROUP_MEMBER_SET_META_DATA",e.GET_GROUP_MEMBER_ATTR="GROUP_MEMBER_FETCH_META_DATA",e.GET_SESSION_LIST="REST_GET_SESSION_LIST",e.DELETE_SESSION="REST_DEL_SESSION",e.GET_HISTORY_MSG="REST_GET_HISTORY_MESSAGE",e.PIN_CONVERSATION="REST_PIN_CONVERSATION",e.REST_UPLOAD_FILE_IN_PARTS="REST_UPLOAD_FILE_IN_PARTS",e.REST_DELETE_MESSAGES_CONVERSATIONS="REST_DELETE_MESSAGES_CONVERSATIONS",e.MARK_CONVERSATION="REST_MARK_CONVERSATION",e.REST_FETCH_PINMESSAGES="REST_FETCH_PINMESSAGES",e.REST_PIN_MESSAGE="REST_PIN_MESSAGE",e.UPDATE_USER_INFO="USER_UPDATE_USERINFO",e.GET_USER_INFO="USER_FETCH_USERINFO",e.UPDATE_USER_NICK="USER_UPDATE_NICK",e.UPLOAD_PUSH_TOKEN="USER_UPLOAD_PUSH_TOKEN",e.USER_LOGGEDIN_OTHER_PLATFORM="USER_LOGGEDIN_OTHER_PLATFORM",e.GET_BLACK_LIST="ROSTER_BLACKLIST",e.GET_CONTACTS="ROSTER_CONTACTS",e.ROSTER_GET_ALL_CONTACTS_REMARKS="ROSTER_GET_ALL_CONTACTS_REMARKS",e.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE="ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE",e.ROSTER_SET_CONTACT_REMARK="ROSTER_SET_CONTACT_REMARK",e.ROSTER_ADD="ROSTER_ADD",e.ROSTER_REMOVE="ROSTER_REMOVE",e.ROSTER_ACCEPT="ROSTER_ACCEPT",e.ROSTER_DECLINE="ROSTER_DECLINE",e.ROSTER_BAN="ROSTER_BAN",e.ROSTER_ALLOW="ROSTER_ALLOW",e.SEND_MSG="MSYNC_SENDMESSAGE",e.UPLOAD_MSG_ATTACH="UPLOAD_MSG_ATTACH",e.SEND_RECALL_MSG="MSYNC_RECALLMESSAGE",e.MODIFY_MESSAGE="MSYNC_MODIFYMESSAGE"}(o||(o={})),function(e){e.GET_DNS="REST_DNSLIST",e.LOGIN_BY_AGORA_TOKEN="LOGIN_BY_AGORA_TOKEN",e.LOGIN_BY_PWD="LOGIN_BY_PWD",e.RESISTER="REGISTER",e.REST_INIT_UPLOAD_TASK_IN_PARTS="REST_INIT_UPLOAD_TASK_IN_PARTS",e.REST_UPLOAD_PART="REST_UPLOAD_PART",e.REST_COMPLETE_UPLOAD_PART="REST_COMPLETE_UPLOAD_PART",e.REST_ABORT_UPLOAD_PART="REST_ABORT_UPLOAD_PART",e.CONNECT_WEBSOCKET="CONNECT_WEBSOCKET"}(i||(i={})),function(e){e[e["5G"]=7]="5G",e[e["4G"]=7]="4G",e[e["3G"]=7]="3G",e[e["2G"]=7]="2G",e[e["SLOW-2G"]=7]="SLOW-2G",e[e.WIFI=2]="WIFI",e[e.LAN=1]="LAN",e[e.DISCONNECTED=0]="DISCONNECTED",e[e.NONE=0]="NONE",e[e.UNKNOWN=-1]="UNKNOWN",e[e["WEBIM UNABLE TO GET"]=-2]="WEBIM UNABLE TO GET"}(s||(s={})),function(e){e[e.success=200]="success",e[e.failed=500]="failed",e[e.disconnect=-1]="disconnect",e[e.closed=401]="closed",e[e.notFound=404]="notFound",e[e.reachLimit=429]="reachLimit"}(a||(a={})),function(e){e[e.web=0]="web",e[e.native=1]="native"}(u||(u={}))},6424:function(e,t,n){"use strict";n.d(t,{gA:function(){return D},ZP:function(){return Ce}}),n(9601),n(1539),n(8674),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948),n(7042),n(2222),n(3710),n(7941),n(9714),n(3843),n(8309),n(2772),n(5212),n(7327),n(5827),n(9826),n(4553),n(561),n(9653),n(1038),n(2564),n(9575),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(6699),n(2023),n(3161),n(4048),n(9753),n(9554),n(4747),n(285),n(1637),n(8145),n(1249),n(4812);var r=n(4188),o=n.n(r),i=n(3720),s=n.n(i),a=n(5531),u=n(8161),c=n(7360),l=["public","members_only","allow_user_invites","invite_need_confirm"],d={name:"name",title:"name",description:"description",public:"public",members_only:"approval",allow_user_invites:"allowInvites",max_users:"maxUsers",invite_need_confirm:"inviteNeedConfirm",custom:"ext",last_modified:"lastModified"};function h(e,t){var n,r,o,i,s,a,u=this,c=this.context,h=c.userId,f=c.jid,p=t.from.name===h&&f.clientResource!==t.from.clientResource;return t.isThread?(o={id:t.mucId.name,name:t.mucName,operation:"",parentId:t.mucParentId.name,operator:t.from.name,userName:t.to.length?t.to[0].name:""},i={chatThreadId:t.mucId.name,chatThreadName:t.mucName,operation:"",parentId:t.mucParentId.name}):(r={type:"",owner:t.from.name,gid:t.mucId.name,from:t.from.name,fromJid:t.from,to:t.to.length?t.to[0].name:"",toJid:t.to,chatroom:t.isChatroom,status:t.status},s={operation:"",id:t.mucId.name,from:t.from.name},t.isChatroom&&(null===(n=null==t?void 0:t.eventInfo)||void 0===n?void 0:n.ext)&&(a=JSON.parse(t.eventInfo.ext))),({45:function(){var e,n,r;s.operation="memberAttributesUpdate";var o=JSON.parse(null===(e=null==t?void 0:t.eventInfo)||void 0===e?void 0:e.ext)||{};s.attributes=o.properties||{},s.userId=o.username||"",p?null===(n=u.eventHandler)||void 0===n||n.dispatch("onMultiDeviceEvent",s):null===(r=u.eventHandler)||void 0===r||r.dispatch("onGroupEvent",s)},44:function(){var e;s.operation="removeChatRoomAttributes",s.attributes=a.result.successKeys,a.result.successKeys.length>0&&(null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",s))},43:function(){var e;s.operation="updateChatRoomAttributes";var t={};a.result.successKeys.forEach((function(e){t[e]=a.properties[e]})),s.attributes=t,a.result.successKeys.length>0&&(null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",s))},42:function(){},41:function(){},40:function(){},39:function(){},38:function(){var e;i.operation="chatThreadNameUpdate",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},37:function(){var e;o.operation="userRemove",null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatThreadChange",o)},36:function(){var e;i.operation="chatThreadLeave",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},35:function(){var e;i.operation="chatThreadJoin",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},34:function(){var e;i.operation="chatThreadDestroy",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},33:function(){var e;i.operation="chatThreadCreate",null===(e=u.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},32:function(){var e,n,o,i;r.type=t.isChatroom?"rmChatRoomMute":"rmGroupMute",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="unmuteAllMembers",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},31:function(){var e,n,o,i;r.type=t.isChatroom?"muteChatRoom":"muteGroup",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="muteAllMembers",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},30:function(){var e,n,o,i;r.type=t.isChatroom?"rmUserFromChatRoomWhiteList":"rmUserFromGroupWhiteList",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="removeAllowlistMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},29:function(){var e,n,o,i;r.type=t.isChatroom?"addUserToChatRoomWhiteList":"addUserToGroupWhiteList",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="addUserToAllowlist",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},28:function(){var e,n,o,i;r.type="deleteFile",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="deleteFile",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},27:function(){var e,n,o,i;r.type="uploadFile",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="uploadFile",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},26:function(){var e,n,o,i;r.type="deleteAnnouncement",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="deleteAnnouncement",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},25:function(){var e,n,o,i;r.type="updateAnnouncement",r.announcement=t.reason,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="updateAnnouncement",s.announcement=t.reason,t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},24:function(){var e,n,o,i;r.type="removeMute",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="unmuteMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},23:function(){var e,n,o,i;r.type="addMute",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="muteMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},22:function(){var e,n,o,i;r.type="removeAdmin",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="removeAdmin",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},21:function(){var e,n,o,i;r.type="addAdmin",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="setAdmin",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},20:function(){var e,n,o,i;r.type="changeOwner",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="changeOwner",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},19:function(){var e,n,o,i;r.type="direct_joined",r.groupName=t.mucName,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="directJoined",s.name=t.mucName,t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},18:function(){var e,n,o,i;r.type=t.isChatroom?"leaveChatRoom":"leaveGroup",u.onPresence&&u.onPresence(r);var a=t.mucMemberCount;a&&(s.memberCount=a),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="memberAbsence",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},17:function(){var e,n,o,i;t.isChatroom&&t.ext&&(s.ext=t.ext,r.ext=t.ext),r.type=t.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",u.onPresence&&u.onPresence(r);var a=t.mucMemberCount;t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="memberPresence",a&&(s.memberCount=a),t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},16:function(){var e,n;r.type="unblock",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},15:function(){var e,n;r.type="block",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},14:function(){var e,n,o,i,a,c=t.isChatroom;if(!c){var h=JSON.parse((null===(e=null==t?void 0:t.eventInfo)||void 0===e?void 0:e.ext)||"{}",(function(e,t){return"last_modified"===e?Number(t):l.includes(e)?"true"===t||!0===t:t}));s.detail=r.detail={},Object.keys(h).forEach((function(e){var t=d[e];if(t){var n=h[e];s.detail&&(s.detail[t]=n),r.detail&&(r.detail[t]=n)}}))}r.type="update",u.onPresence&&u.onPresence(r),c?null===(n=u.eventHandler)||void 0===n||n.dispatch("onChatroomChange",r):null===(o=u.eventHandler)||void 0===o||o.dispatch("onGroupChange",r),s.operation="updateInfo",c?null===(i=u.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",s):null===(a=u.eventHandler)||void 0===a||a.dispatch("onGroupEvent",s)},13:function(){var e,n,o,i;r.type="allow",r.reason=t.reason,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),t.reason&&(s.reason=t.reason),s.operation="unblockMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},12:function(){var e,n;r.type="ban",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},11:function(){var e,n;r.type="getBlackList",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},10:function(){var e,n,o,i;r.type="removedFromGroup",r.kicked=r.to,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="removeMember",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},9:function(){var e,n,o,i;r.type="invite_decline",r.kicked=r.to,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="rejectInvite",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},8:function(){var e,n,o,i;r.type="invite_accept",r.kicked=r.to,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="acceptInvite",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},7:function(){var e,n,o,i;r.type="invite",r.kicked=r.to,r.groupName=t.mucName,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="inviteToJoin",s.name=t.mucName,t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},6:function(){var e,n,o,i;r.type="joinPublicGroupDeclined",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="joinPublicGroupDeclined",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):(s.userId=t.to.length?t.to[0].name:"",null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s))},5:function(){var e,n,o,i;r.type="joinPublicGroupSuccess",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="acceptRequest",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},4:function(){var e,n,o,i;r.type="joinGroupNotifications",r.reason=t.reason,u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),t.reason&&(s.reason=t.reason),s.operation="requestToJoin",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},3:function(){var e,n;r.type="leave",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},2:function(){var e,n;r.type="join",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r)},1:function(){var e,n,o,i;r.type="deleteGroupChat",u.onPresence&&u.onPresence(r),t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomChange",r):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupChange",r),s.operation="destroy",t.isChatroom?null===(o=u.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",s):null===(i=u.eventHandler)||void 0===i||i.dispatch("onGroupEvent",s)},0:function(){var e,n;s.operation="create",t.isChatroom?null===(e=u.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",s):null===(n=u.eventHandler)||void 0===n||n.dispatch("onGroupEvent",s)}}[e]||function(){console.error("No match operation ".concat(e))})()}var f=function(e){var t=this.root.lookup("easemob.pb.MUCBody").decode(e.payload),n=t.operation;c.kg.debug("onMucMessage",t),h.call(this,n,t)},p={handleRosterMsg:function(e){var t,n,r,o,i,s,a=this.root.lookup("easemob.pb.RosterBody").decode(e.payload),u={type:"",to:a.to[0].name,from:a.from.name,status:a.reason};switch(a.operation){case 2:u.type="subscribe",this.onContactInvited&&this.onContactInvited(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onContactInvited",u);break;case 3:u.type="unsubscribed",this.onContactDeleted&&this.onContactDeleted(u),null===(n=this.eventHandler)||void 0===n||n.dispatch("onContactDeleted",u);break;case 4:u.type="subscribed",this.onContactAdded&&this.onContactAdded(u),null===(r=this.eventHandler)||void 0===r||r.dispatch("onContactAdded",u);break;case 5:u.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(u),null===(o=this.eventHandler)||void 0===o||o.dispatch("onContactRefuse",u);break;case 6:case 7:break;case 8:u.type="subscribed",this.onContactAgreed&&this.onContactAgreed(u),null===(i=this.eventHandler)||void 0===i||i.dispatch("onContactAgreed",u);break;case 9:u.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(u),null===(s=this.eventHandler)||void 0===s||s.dispatch("onContactRefuse",u);break;default:c.kg.error("handleRosterMsg:",a)}this.onPresence&&u.type&&this.onPresence(u)}},E=n(7252),v=function(e){var t,n,r,o,i,s,u=this.root.lookup("easemob.pb.StatisticsBody").decode(e.payload),l=u.operation,d=u.reason;switch(l){case 0:this.onStatisticMessage&&this.onStatisticMessage(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onStatisticMessage",u);break;case 1:s=E.Z.create({type:a.E.WEBIM_CONNCTION_USER_REMOVED,message:"user has been removed"}),this.disconnectedReason=s,this.logOut=!0,this.onError&&this.onError(s),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",s);break;case 2:s=E.Z.create({type:a.E.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,message:"the user is already logged on another device"}),d&&(s.data={loginInfoCustomExt:u.reason}),this.disconnectedReason=s,this.logOut=!0,this.onError&&this.onError(s),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",s);break;case 3:s=E.Z.create({type:a.E.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,message:"the user was kicked by changing password"}),this.disconnectedReason=s,this.logOut=!0,this.onError&&this.onError(s),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",s);break;case 4:s=E.Z.create({type:a.E.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,message:"the user was kicked by other device"}),this.disconnectedReason=s,this.logOut=!0,this.onError&&this.onError(s),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",s);break;default:c.kg.error("handleStatisticsMsg:",u)}},g=(n(9720),n(4024)),m=n(4363),y=n(9937);function _(e){var t,n=[],r=[],o=e.data;o&&o.values&&o.values.forEach((function(e){Object.entries(e.status).forEach((function(e){r.push({device:e[0],status:Number(e[1])})})),n.push({userId:e.uid,lastTime:Number(e.last_time),expire:Number(e.expiry),ext:e.ext,statusDetails:r})})),this.onPresenceStatusChange&&this.onPresenceStatusChange(n),null===(t=this.eventHandler)||void 0===t||t.dispatch("onPresenceStatusChange",n)}function O(e){var t=this;e.data.forEach((function(e){var n,r={from:e.from,to:e.to,chatType:"chat"===e.channel_type?"singleChat":"groupChat",messageId:e.messageId,reactions:e.reactions,ts:e.ts};null===(n=t.eventHandler)||void 0===n||n.dispatch("onReactionChange",r)}))}function T(e){var t,n,r,o;if(e.data){var i=e.data,s={id:i.id||"",name:i.name||"",parentId:i.muc_parent_id||"",messageId:i.msg_parent_id||"",timestamp:i.timestamp||0,operator:i.from||"",operation:""};switch(i.operation){case"create":s.operation="create",s.createTimestamp=s.timestamp,s.messageCount=0,null===(t=this.eventHandler)||void 0===t||t.dispatch("onChatThreadChange",s);break;case"update_msg":s.operation="update",s.messageCount=i.message_count,i.last_message&&"{}"!==JSON.stringify(i.last_message)?s.lastMessage=m.w.call(this,i.last_message):"{}"===JSON.stringify(i.last_message)&&(s.lastMessage={}),null===(n=this.eventHandler)||void 0===n||n.dispatch("onChatThreadChange",s);break;case"update":s.operation="update",s.messageCount=i.message_count,null===(r=this.eventHandler)||void 0===r||r.dispatch("onChatThreadChange",s);break;case"delete":s.operation="destroy",null===(o=this.eventHandler)||void 0===o||o.dispatch("onChatThreadChange",s)}}}function R(e){var t,n=e.data;if(n.resource!==this.clientResource){var r={operation:"deleteRoaming",conversationId:n.to,chatType:"chat"===n.chatType?"singleChat":"groupChat",resource:n.resource};null===(t=this.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",r)}}function I(e){var t,n,r=e.data,o="";if(this.clientResource!==r.res){switch(r.op){case"del":o="deleteConversation";break;case"top":o="pinnedConversation";break;case"not_top":o="unpinnedConversation";break;case"mark":o="markConversation";break;case"mark_delete":o="unMarkConversation";break;case"pin":o="pin";break;case"pin_delete":o="unpin";break;default:return void c.kg.error("unexpected conversation op:",r.op)}if("pin"!==o&&"unpin"!==o){var i={operation:o,conversationId:r.id,conversationType:"chat"===r.type?"singleChat":"groupChat",timestamp:r.ts};"markConversation"!==i.operation&&"unMarkConversation"!==i.operation||r.ext&&(i.conversationMark=y.Z[r.ext]),null===(n=this.eventHandler)||void 0===n||n.dispatch("onMultiDeviceEvent",i)}else{var s=r.ext,a=r.from,u=r.id,l=r.type,d=r.ts,h={messageId:s||"",conversationId:a===this.user?u:a,conversationType:m.U[l],operation:o,operatorId:a,time:d};null===(t=this.eventHandler)||void 0===t||t.dispatch("onMessagePinEvent",h)}}}function S(e){var t,n=this;null===(t=e.values)||void 0===t||t.forEach((function(e){var t,r,o,i,s;if(e.operator_resource!==n.clientResource)if("ignoreInterval"in e.data){var a={operation:"setSilentModeForUser",resource:e.operator_resource,data:e.data};null===(t=n.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",a)}else"group"in e?(a={operation:0===Object.keys(null!==(r=e.data)&&void 0!==r?r:{}).length?"removeSilentModeForConversation":"setSilentModeForConversation",resource:e.operator_resource,conversationId:e.group,type:"groupChat",data:e.data},null===(o=n.eventHandler)||void 0===o||o.dispatch("onMultiDeviceEvent",a)):(a={operation:0===Object.keys(null!==(i=e.data)&&void 0!==i?i:{}).length?"removeSilentModeForConversation":"setSilentModeForConversation",resource:e.operator_resource,conversationId:e.user,type:"singleChat",data:e.data},null===(s=n.eventHandler)||void 0===s||s.dispatch("onMultiDeviceEvent",a))}))}var C=function(e){var t=g.P6.parseNotify(e.payload);switch(t.type){case"presence":_.call(this,t);break;case"reaction":O.call(this,t);break;case"thread":T.call(this,t);break;case"roaming_delete":R.call(this,t);break;case"conv":I.call(this,t);break;case"user_notification_mute":S.call(this,t);break;default:c.kg.error("unexpected notify type: ".concat(t.type))}},N=n(7288),A=n(9743),b=2,M=n(4998),L=n(6801),w=n(2071),U=n(1595),P=n(4319);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}var D,k,H,B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},B.apply(this,arguments)},G=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},F=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},j=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};!function(e){e[e.NORMAL=0]="NORMAL",e[e.SINGLECHAT=1]="SINGLECHAT",e[e.GROUPCHAT=2]="GROUPCHAT",e[e.CHATROOM=3]="CHATROOM",e[e.READ_ACK=4]="READ_ACK",e[e.DELIVER_ACK=5]="DELIVER_ACK",e[e.RECALL=6]="RECALL",e[e.CHANNEL_ACK=7]="CHANNEL_ACK",e[e.EDIT=8]="EDIT"}(D||(D={})),function(e){e[e.APNs=0]="APNs",e[e.FCM=1]="FCM",e[e.HMSPUSH=2]="HMSPUSH",e[e.MIPUSH=3]="MIPUSH",e[e.MEIZUPUSH=4]="MEIZUPUSH",e[e.VIVOPUSH=5]="VIVOPUSH",e[e.OPPOPUSH=6]="OPPOPUSH",e[e.HONORPUSH=7]="HONORPUSH"}(k||(k={})),function(e){e[e.OK=0]="OK",e[e.FAIL=1]="FAIL",e[e.UNAUTHORIZED=2]="UNAUTHORIZED",e[e.MISSING_PARAMETER=3]="MISSING_PARAMETER",e[e.WRONG_PARAMETER=4]="WRONG_PARAMETER",e[e.REDIRECT=5]="REDIRECT",e[e.TOKEN_EXPIRED=6]="TOKEN_EXPIRED",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.NO_ROUTE=8]="NO_ROUTE",e[e.UNKNOWN_COMMAND=9]="UNKNOWN_COMMAND",e[e.PB_PARSER_ERROR=10]="PB_PARSER_ERROR",e[e.BIND_ANOTHER_DEVICE=11]="BIND_ANOTHER_DEVICE",e[e.IM_FORBIDDEN=12]="IM_FORBIDDEN",e[e.TOO_MANY_DEVICES=13]="TOO_MANY_DEVICES",e[e.PLATFORM_LIMIT=14]="PLATFORM_LIMIT",e[e.USER_MUTED=15]="USER_MUTED",e[e.ENCRYPT_DISABLE=16]="ENCRYPT_DISABLE",e[e.ENCRYPT_ENABLE=17]="ENCRYPT_ENABLE",e[e.DECRYPT_FAILURE=18]="DECRYPT_FAILURE",e[e.PERMISSION_DENIED_EXTERNAL=19]="PERMISSION_DENIED_EXTERNAL"}(H||(H={}));var W=["txt","img","video","audio","file","loc","custom","cmd","combine"],K=g.P6.getEnvInfo();function q(){var e="webim",t="",n="",r=[],o=(new Date).valueOf(),i=g.P6.getDevicePlatform(K);if(this.isFixedDeviceId){var s=g.P6.getLocalDeviceInfo();if(s){var a=JSON.parse(s);e=a.deviceId,t=a.deviceName,n=a.deviceUuid}else"webim"===this.deviceId?(n="".concat(i,"_").concat(o.toString()),e="".concat(this.deviceId,"_").concat(n),t=this.deviceId):e=t=n="webim_".concat(i,"_").concat(this.deviceId),g.P6.setLocalDeviceInfo(JSON.stringify({deviceId:e,deviceName:t,deviceUuid:n}))}else"webim"===this.deviceId?(n="random_".concat(i,"_").concat(o.toString()),e="".concat(this.deviceId,"_").concat(n),t=this.deviceId):e=t=n="webim_".concat(i,"_").concat(this.deviceId);this.context.jid&&(this.context.jid.clientResource=e);var u=this.root.lookup("easemob.pb.Provision"),l=u.decode(r);l.compressType=this.compressType,l.encryptType=this.encryptType,l.osType=this.osType,l.version=this.version,l.deviceName=t,l.resource=e,l.deviceUuid=n,l.authToken='{"token":"$t$'+this.token+'"}',l.sessionId=Date.now().toString()+":",this.loginInfoCustomExt&&(l.reason=this.loginInfoCustomExt),c.kg.debug("provision info",{version:this.version,resource:e,isFixedDeviceId:this.isFixedDeviceId,loginInfoCustomExt:!!this.loginInfoCustomExt,token:!!this.token}),l.actionVersion="v5.0",l=u.encode(l).finish();var d=this.root.lookup("easemob.pb.MSync"),h=d.decode(r);return h.version=this.version,h.guid=this.context.jid,h.auth="$t$"+this.token,h.command=3,h.deviceId=t,h.serviceId=this.dataReport.getServiceId(),h.encryptType=this.encryptType,h.payload=l,d.encode(h).finish()}function V(e,t){var n=this,r=g.P6.getEnvInfo();if("web"===r.platform||"zfb"===r.platform||"dd"===r.platform){for(var i="",s=0;s<e.length;s++)i+=String.fromCharCode(e[s]);return i=o().btoa(i),"web"===r.platform?i:{data:i,isBuffer:!1,complete:function(){},fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||(c.kg.debug("send message fail and reconnect"),n.reconnecting||n.reconnect()),t&&n._msgHash&&n._msgHash[t]&&n._msgHash[t].fail({id:t})}}}var a=e;return{data:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||n.reconnecting||n.reconnect(),t&&n._msgHash&&n._msgHash[t]&&n._msgHash[t].fail({id:t})}}}function J(e,t){var n;return G(this,void 0,void 0,(function(){var r,o,i,a,l,d;return F(this,(function(h){switch(h.label){case 0:for(c.kg.debug("distributeMeta, metas length: ",e.length),r=[],o=function(n){var o=e[n],a=new(s())(o.id.low,o.id.high,o.id.unsigned).toString(),l=o.from.name,d=o.to?o.to.name:"",h=!!o.to&&-1!==o.to.domain.indexOf("conference");if(i._load_msg_cache.some((function(e){return e.msgId===a})))return"continue";switch(i._load_msg_cache.length<=i.max_cache_length||i._load_msg_cache.shift(),i._load_msg_cache.push({msgId:a,from:l,to:d,isGroup:h}),o.ns){case 0:v.call(i,o);break;case 1:r.push(u.Z.call(i,o,t,!1,!0,!0));break;case 2:f.call(i,o);break;case 3:p.handleRosterMsg.call(i,o);break;case 4:i.registerConfrIQHandler&&i.registerConfrIQHandler(o,t,i);break;case 5:C.call(i,o);break;default:c.kg.error("distributeMeta",o)}},i=this,a=0;a<e.length;a++)o(a);return[4,Promise.all(r)];case 1:return l=h.sent(),(d=l.filter((function(e){return e&&"cmd"!==e.type}))).length>0&&(null===(n=this.eventHandler)||void 0===n||n.dispatch("onMessage",d)),[2]}}))}))}function z(e,t){J.call(this,e,t)}function Y(e){var t;this._offlineMessagePullState===M.a.SYNC_INIT&&(this._offlineMessagePullState=M.a.SYNC_START,this._offlineMessagePullQueue=e.unread.reduce((function(e,t){return e.find((function(e){return e.name===t.queue.name}))||e.push(t.queue),e}),[]),null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncStart"))}function X(e){var t;if(this._offlineMessagePullState===M.a.SYNC_START){var n=this._offlineMessagePullQueue.findIndex((function(t){return t.name===e.queue.name}));n>-1&&this._offlineMessagePullQueue.splice(n,1),0===this._offlineMessagePullQueue.length&&(this._offlineMessagePullState=M.a.SYNC_FINISH,null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncFinish"))}}function Z(e){var t=this.root.lookup("easemob.pb.CommUnreadDL");t=t.decode(e.payload);var n=new(s())(t.timestamp.low,t.timestamp.high,t.timestamp.unsigned).toString();if(this.expirationTime&&this.compareTokenExpireTime(Number(n),this.expirationTime),0===t.unread.length)ae.call(this);else{Y.call(this,t),c.kg.debug("pull unread message",t.unread);for(var r=0;r<t.unread.length;r++){var o=he(this._queues,t.unread[r].queue),i=he(this.unSyncQueue,t.unread[r].queue);o||i?c.kg.warn("receive unread message and already in queue"):this.unSyncQueue.push(t.unread[r].queue)}for(r=0;r<this.unSyncQueue.length;r++)this.unSyncQueue[r].hasSync||ee.call(this,this.unSyncQueue[r]),this.unSyncQueue[r].hasSync=!0}ae.call(this)}function Q(){var e=[],t=this.root.lookup("easemob.pb.StatisticsBody"),n=t.decode(e);n.operation=0,n=t.encode(n).finish();var r=this.root.lookup("easemob.pb.Meta").decode(e);r.id=(new Date).valueOf(),r.ns=0,r.payload=n;var o=this.root.lookup("easemob.pb.CommSyncUL"),i=o.decode(e);i.meta=r,i=o.encode(i).finish();var s=this.root.lookup("easemob.pb.MSync"),a=s.decode(e);return a.version=this.version,a.encryptType=[0],a.command=0,a.payload=i,s.encode(a).finish()}function $(e){var t=[],n=this.root.lookup("easemob.pb.CommSyncUL"),r=n.decode(t);r.queue=e,r=n.encode(r).finish();var o=this.root.lookup("easemob.pb.MSync"),i=o.decode(t);return i.version=this.version,i.encryptType=this.encryptType,i.command=0,i.payload=r,o.encode(i).finish()}function ee(e){c.kg.debug("sendBackqueue");var t=$.call(this,e);Se.call(this,t)}function te(e,t){var n=[],r=this.root.lookup("easemob.pb.CommSyncUL"),o=r.decode(n);o.queue=t,o.key=new(s())(e.low,e.high,e.unsigned).toString(),o=r.encode(o).finish();var i=this.root.lookup("easemob.pb.MSync"),a=i.decode(n);return a.version=this.version,a.encryptType=this.encryptType,a.command=0,a.payload=o,i.encode(a).finish()}function ne(){var e=this;this.uniPush&&!1===this.isRegisterPush&&(this.isRegisterPush=!0,this.uniPush.onRegister((function(t){c.kg.debug("push token onRegister",t);var n=e.uniPushConfig||{},r=n.APNsCertificateName,o=void 0===r?"":r,i=n.HMSCertificateName,s=void 0===i?"":i,a=n.HONORCertificateName,u=void 0===a?"":a,l=n.MEIZUCertificateName,d=void 0===l?"":l,h=n.MICertificateName,f=void 0===h?"":h,p=n.OPPOCertificateName,E=void 0===p?"":p,v=n.VIVOCertificateName,g=void 0===v?"":v;switch(t.push_type){case k.APNs:e.pushCertificateName=o;break;case k.HMSPUSH:e.pushCertificateName=s;break;case k.HONORPUSH:e.pushCertificateName=u;break;case k.MEIZUPUSH:e.pushCertificateName=d;break;case k.MIPUSH:e.pushCertificateName=f;break;case k.OPPOPUSH:e.pushCertificateName=E;break;case k.VIVOPUSH:e.pushCertificateName=g;break;default:c.kg.error("unexpected push type",t.push_type)}e.pushCertificateName&&t.push_token&&L.r.call(e,{deviceId:e.clientResource,deviceToken:t.push_token,notifierName:e.pushCertificateName}).then((function(){c.kg.debug("uploadPushToken success")})).catch((function(e){c.kg.debug("uploadPushToken failed",e)}))})))}function re(){var e;this._offlineMessagePullState=M.a.SYNC_INIT,this._offlineMessagePullQueue=[],this.times=1,this.autoReconnectNumTotal=0,this.onOpened&&this.onOpened(),ne.call(this),null===(e=this.eventHandler)||void 0===e||e.dispatch("onConnected"),se.call(this),ce.call(this),ue.call(this),ae.call(this)}function oe(e,t){c.kg.debug("sendLastSession",e);var n=te.call(this,e,t);Se.call(this,n)}function ie(e){var t,n,r,o,i,s,u,l,d,h,f,p,v,g,m=this,y=this.root.lookup("easemob.pb.Provision").decode(e.payload);if(this.context.jid&&(this.context.jid.clientResource=y.resource),this.clientResource=y.resource,this.provisionTimer&&clearTimeout(this.provisionTimer),c.kg.debug("receiveProvisionResult",y.status),this._isLogging=!1,y.status.errorCode===H.OK){if(this.disconnectedReason=void 0,y.authToken){var _=JSON.parse(y.authToken).expires_in;if(!this.tokenExpiredTimer&&!this.tokenWillExpireTimer){var O=Date.now();this.expirationTime=_;var T=this.expirationTime-O;this.expiresIn=T<0?0:T,this.tokenExpireTimeCountDown(this.expiresIn)}}this.reconnecting=!1,this.logOut=!1,"zfb"!==K.platform&&"dd"!==K.platform||(this.sock.readyState=1),this._localCache?(null===(t=this._localCache)||void 0===t?void 0:t.getInstance())?re.call(this):this._localCache&&new this._localCache({user:this.user,dbName:"cache_".concat(Math.abs((0,A.un)(this.appKey)),"_").concat(this.user),version:b,onInit:function(){return G(m,void 0,void 0,(function(){return F(this,(function(e){return c.kg.debug("localCache init success"),re.call(this),[2]}))}))}}):re.call(this),null===(n=this.connectionResolve)||void 0===n||n.call(this)}else{var R=void 0,I=y.status,S=I.reason,C=I.errorCode;switch(c.kg.debug("provision errorCode: ",C),c.kg.debug("provision reason: ",S),C){case H.FAIL:R="Sorry, user register limit"===S?E.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the number of user registrations limit has been reached"}):"Sorry, user register rate limit"===S?E.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, user register rate limit"}):"Sorry, token expired"===S?E.Z.create({type:a.E.WEBIM_TOKEN_EXPIRED,message:"Sorry, token expired"}):"Sorry, token or password does not match login info"===S?E.Z.create({type:a.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"INVALID_TOKEN"}):"Sorry, user not found"===S?E.Z.create({type:a.E.USER_NOT_FOUND,message:"User not found"}):E.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(r=this.connectionReject)||void 0===r||r.call(this,R),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",R);break;case H.WRONG_PARAMETER:R=E.Z.create({type:a.E.REQUEST_PARAMETER_ERROR,message:"Invalid parameter"}),null===(i=this.connectionReject)||void 0===i||i.call(this,R),null===(s=this.eventHandler)||void 0===s||s.dispatch("onError",R);break;case H.UNAUTHORIZED:R=E.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(u=this.connectionReject)||void 0===u||u.call(this,R),null===(l=this.eventHandler)||void 0===l||l.dispatch("onError",R);break;case H.IM_FORBIDDEN:R=E.Z.create({type:a.E.WEBIM_SERVER_SERVING_DISABLED,message:"Server serving disabled."}),null===(d=this.connectionReject)||void 0===d||d.call(this,R),null===(h=this.eventHandler)||void 0===h||h.dispatch("onError",R);break;case H.PERMISSION_DENIED:R="Sorry, the app month live count limit"===S?E.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the monthly active user limit for this app has been reached"}):"Sorry, the app day live count limit"===S?E.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the daily active user limit for this app has been reached"}):"Sorry, the app online count limit"===S?E.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the maximum number limit of online users for this app has been reached"}):E.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(f=this.connectionReject)||void 0===f||f.call(this,R),null===(p=this.eventHandler)||void 0===p||p.dispatch("onError",R);break;default:R=E.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:S}),null===(v=this.connectionReject)||void 0===v||v.call(this,R),null===(g=this.eventHandler)||void 0===g||g.dispatch("onError",R)}this.disconnectedReason=R}}function se(){var e,t;if((null===(e=this.unMSyncSendMsgMap)||void 0===e?void 0:e.size)>0){for(var n=Array.from(this.unMSyncSendMsgMap.keys()),r=0;r<n.length;r++){var o=this.unMSyncSendMsgMap.get(n[r]);Se.call(this,o,n[r])}null===(t=this.unMSyncSendMsgMap)||void 0===t||t.clear()}}function ae(){var e=Q.call(this);Se.call(this,e)}function ue(){c.kg.debug("sendUnreadDeal");var e=de.call(this);Se.call(this,e)}function ce(){var e=this;le.call(this),this.heartBeatID=setInterval((function(){(Date.now()-e.lastHeartbeat)/1e3>=30&&(c.kg.debug("send heart beat"),ue.call(e),e.lastHeartbeat=Date.now())}),this.heartBeatWait)}function le(){clearInterval(this.heartBeatID)}function de(){var e=this.root.lookup("easemob.pb.MSync"),t=e.decode([]);return t.version=this.version,t.encryptType=this.encryptType,t.command=1,e.encode(t).finish()}function he(e,t){return e.some((function(e){return e.name===t.name}))}function fe(e){var t=this.root.lookup("easemob.pb.CommNotice"),n=t.decode(e.payload),r=he(this._queues,n.queue);c.kg.debug("receive notice",t,this._queues);var o=he(this.unSyncQueue,n.queue);r||o||this.clientResource===n.queue.clientResource&&n.queue.name===this.context.userId||(this._queues.push(n.queue),1===this._queues.length&&ee.call(this,n.queue))}function pe(e){return G(this,void 0,void 0,(function(){var t,n,r,i,s,a,u,c;return F(this,(function(l){if(t=g.P6.getEnvInfo(),n=this.root.lookup("easemob.pb.MSync"),"miniCore"===this.name){try{i=new Uint8Array(e.data),r=n.decode(i)}catch(e){throw new Error("decode message fail.")}return[2,r]}if("web"===t.platform||"zfb"===t.platform||"dd"===t.platform){for(s=o().atob(e.data),a=[],u=0,c=s.length;u<c;++u)a.push(s.charCodeAt(u));return[2,n.decode(a)]}try{r=n.decode(e.data)}catch(e){throw new Error("decode message fail.")}return[2,r]}))}))}function Ee(e){var t=this;this.lastHeartbeat=Date.now(),this.probingTimer&&clearTimeout(this.probingTimer),e.then((function(e){if(e)switch(e.command){case 0:ve.call(t,e);break;case 1:Z.call(t,e);break;case 2:fe.call(t,e);break;case 3:ie.call(t,e);break;default:c.kg.error("unexpected msync command: ".concat(e.command))}else c.kg.error("unexpected msync result: ".concat(e))}))}function ve(e){var t,n,r,o,i,l,d,h,f,p,v,m,y,_,O,T,R,I,S,C,A,b,M,L,P,x,D,k,H,j,W,K,q,V,J,Y,Z,Q,$,te,ne,re,ie,se,ae,ue;return G(this,void 0,void 0,(function(){var G,ce,le,de,he,fe,pe,Ee,ve,ge,me,ye,_e,Oe,Te,Re,Ie,Se,Ce,Ne,Ae,be,Me,Le,we,Ue,Pe,xe,De,ke,He,Be,Ge,Fe,je,We,Ke,qe,Ve,Je,ze,Ye,Xe,Ze=this;return F(this,(function(F){switch(F.label){case 0:if(G=(G=this.root.lookup("easemob.pb.CommSyncDL")).decode(e.payload),ce=new(s())(G.serverId.low,G.serverId.high,G.serverId.unsigned).toString(),le=new(s())(G.metaId.low,G.metaId.high,G.metaId.unsigned).toString(),!(Number(le)>0))return[3,23];if(clearTimeout(null===(t=this._msgHash[le])||void 0===t?void 0:t.messageTimer),!G.status)return[3,22];if(0!==G.status.errorCode)return[3,21];if(null==(de=this._msgHash[le])?void 0:de.isHandleChatroom){try{he="join"===(null===(n=this._msgHash[le])||void 0===n?void 0:n.operation),(null===(r=this._msgHash[le])||void 0===r?void 0:r.resolve)instanceof Function&&he&&this._msgHash[le].resolve({type:0,data:{action:"apply",id:this._msgHash[le].roomId,result:!0,user:this.context.userId}}),(null===(o=this._msgHash[le])||void 0===o?void 0:o.success)instanceof Function&&he&&this._msgHash[le].success({type:0,data:{action:"apply",id:this._msgHash[le].roomId,result:!0,user:this.context.userId}}),(null===(i=this._msgHash[le])||void 0===i?void 0:i.resolve)instanceof Function&&!he&&this._msgHash[le].resolve({type:0,data:{result:!0}}),(null===(l=this._msgHash[le])||void 0===l?void 0:l.success)instanceof Function&&!he&&this._msgHash[le].success({type:0,data:{result:!0}}),w.iO.has(le)&&(fe=w.iO.get(le),je=fe.rpt,We=fe.requestName,je({isEndApi:!0,data:{isSuccess:1,requestName:We,requestMethod:"WEBSOCKET",requestUrl:this.url,code:U.dd.success}}),w.iO.delete(le))}catch(e){w.iO.has(le)&&(pe=w.iO.get(le),je=pe.rpt,We=pe.requestName,je({isEndApi:!0,data:{isSuccess:0,requestName:We,requestMethod:"WEBSOCKET",requestUrl:this.url,code:U.dd.failed,codeDesc:"when executing success function error"}}),w.iO.delete(le)),qe=E.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:e}),this.onError&&this.onError(qe),null===(d=this.eventHandler)||void 0===d||d.dispatch("onError",qe)}delete this._msgHash[le]}return!de||de.isHandleChatroom?[3,20]:(Ee=null,ve="",ge=0,me=null,this._msgHash[le].thirdMessage?(this._msgHash[le].thirdMessage.id=G.serverId,this._msgHash[le].thirdMessage.timestamp=G.timestamp,[4,u.Z.call(this,this._msgHash[le].thirdMessage,G.status,!0,!0)]):[3,2]);case 1:me=F.sent(),F.label=2;case 2:if(0===G.metas.length)return[3,13];F.label=3;case 3:switch(F.trys.push([3,12,,13]),ye=G.metas[0],_e=G.status,ye.ns){case 1:return[3,4];case 5:return[3,9]}return[3,10];case 4:return this.useReplacedMessageContents?[4,u.Z.call(this,ye,_e,!0,!0)]:[3,8];case 5:return me=F.sent(),[4,null===(f=null===(h=this._localCache)||void 0===h?void 0:h.getInstance())||void 0===f?void 0:f.getMessageByServerMsgId(le)];case 6:return(Oe=F.sent())?[4,null===(v=null===(p=this._localCache)||void 0===p?void 0:p.getInstance())||void 0===v?void 0:v.putMessageToDB(B(B(B({},Oe),me),{id:le}))]:[3,8];case 7:F.sent(),F.label=8;case 8:return[3,11];case 9:return(Te=g.P6.parseNotify(G.metas[0].payload)).edit_msg&&(Re=Te.edit_msg,Ie=Re.count,Se=Re.operator,Ce=Re.edit_time,Ne=Re.sender,Ae=Re.send_time,Ee={operationTime:Ce,operatorId:Se,operationCount:Ie},ve=Ne,ge=Number(Ae)),[3,11];case 10:return c.kg.error("decode local meta error",ye),[3,11];case 11:return[3,13];case 12:return be=F.sent(),qe=E.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:"decode local meta message error",data:be}),this.onError&&this.onError(qe),null===(m=this.eventHandler)||void 0===m||m.dispatch("onError",qe),[3,13];case 13:w.TJ.has(le)&&(w.TJ.get(le).rpt({isEndApi:!0,data:{isSuccess:1,requestMethod:"WEBSOCKET",requestUrl:this.url,code:U.dd.success,msgId:ce}}),w.TJ.delete(le)),F.label=14;case 14:return F.trys.push([14,18,,19]),Me={localMsgId:le,serverMsgId:ce},Ee&&(this._msgHash[le].modifiedInfo=Ee,Le=this._msgHash[le],we=Le.editMessageId,Be=Le.type,Ue=Le.chatType,Pe=Le.msg,xe=Le.to,De=Le.translations,ke={id:we,type:Be,chatType:Ue,msg:Pe,modifiedInfo:Ee,to:xe,from:ve,time:Number(ge)},De&&(ke.translations=De),Me.message=ke,null===(O=null===(_=null===(y=this._localCache)||void 0===y?void 0:y.getInstance())||void 0===_?void 0:_.getMessageByServerMsgId(we))||void 0===O||O.then((function(e){var t,n;e&&"txt"===e.type&&(null===(n=null===(t=Ze._localCache)||void 0===t?void 0:t.getInstance())||void 0===n||n.putMessageToDB(B(B({},e),{msg:ke.msg,modifiedInfo:ke.modifiedInfo,translations:ke.translations})))}))),me&&(Me.message=me),[4,null===(R=null===(T=this._localCache)||void 0===T?void 0:T.getInstance())||void 0===R?void 0:R.updateLocalMessage(le,{serverMsgId:ce,status:N.r.SUCCESS})];case 15:return F.sent(),(null===(I=this._msgHash[le])||void 0===I?void 0:I.success)instanceof Function?[4,this._msgHash[le].success(le,ce)]:[3,17];case 16:F.sent(),F.label=17;case 17:return(null===(S=this._msgHash[le])||void 0===S?void 0:S.resolve)instanceof Function&&this._msgHash[le].resolve(Me),[3,19];case 18:return He=F.sent(),qe=E.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:He}),this.onError&&this.onError(qe),null===(C=this.eventHandler)||void 0===C||C.dispatch("onError",qe),[3,19];case 19:this.onReceivedMessage&&this.onReceivedMessage({id:le,mid:ce,to:this._msgHash[le].to,time:0}),null===(A=this.eventHandler)||void 0===A||A.dispatch("onReceivedMessage",{id:le,mid:ce,to:this._msgHash[le].to}),delete this._msgHash[le],F.label=20;case 20:return[3,22];case 21:if(15===G.status.errorCode)(null===(b=this._msgHash[le])||void 0===b?void 0:b.fail)instanceof Function&&this._msgHash[le].fail({type:a.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject({type:a.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),null===(L=null===(M=this._localCache)||void 0===M?void 0:M.getInstance())||void 0===L||L.updateLocalMessage(le,{serverMsgId:ce,status:N.r.FAIL});else if(1===G.status.errorCode){switch(Be=void 0,G.status.reason){case"blocked":Be=a.E.PERMISSION_DENIED;break;case"group not found":Be=a.E.GROUP_NOT_EXIST;break;case"not in group or chatroom":Be=a.E.GROUP_NOT_JOINED;break;case"exceed recall time limit":Be=a.E.MESSAGE_RECALL_TIME_LIMIT;break;case"message recall disabled":Be=a.E.SERVICE_NOT_ENABLED;break;case"not in group or chatroom white list":Be=a.E.SERVICE_NOT_ALLOW_MESSAGING;break;case"nonroster":Be=a.E.USER_NOT_FRIEND,G.status.reason="not contact";break;case"group is disabled":Be=a.E.GROUP_IS_DISABLED,G.status.reason="group is disabled";break;case"limit directed users":Be=a.E.MAX_LIMIT;break;case"Sorry, edit limit reached":Be=a.E.MAX_LIMIT,G.status.reason="Modify message limit reached";break;case"Sorry, message does not exist":Be=a.E.MODIFY_MESSAGE_NOT_EXIST,G.status.reason="The message does not exist.";break;case"Sorry, You do not have permission":Be=a.E.PERMISSION_DENIED,G.status.reason="You do not have the modified permission.";break;case"Sorry, format is incorrect":Be=a.E.MODIFY_MESSAGE_FORMAT_ERROR,G.status.reason="The modify messaged format error.";break;case"Sorry, edit is not available":Be=a.E.SERVICE_NOT_ENABLED,G.status.reason="The message modify function is not activated.";break;case"Sorry, edit fail":Be=a.E.MODIFY_MESSAGE_FAILED,G.status.reason="Modify message failed.";break;default:G.status.reason.includes("grpID")&&G.status.reason.includes("does not exist!")?(Be=a.E.CHATROOM_NOT_EXIST,G.status.reason="The chat room dose not exist."):G.status.reason.includes("username")&&G.status.reason.includes("doesn't exist!")?Be=a.E.USER_NOT_FOUND:"group member list is full!"===G.status.reason?Be=a.E.CHATROOM_MEMBERS_FULL:G.status.reason.includes("can not join this group")&&G.status.reason.includes("is in the blacklist")?(Be=a.E.PERMISSION_DENIED,G.status.reason="permission denied"):"can not operate this group, reason: group is disabled"===G.status.reason?Be=a.E.GROUP_IS_DISABLED:G.status.reason.includes("moderation")?Be=a.E.MESSAGE_MODERATION_BLOCKED:G.status.reason.includes("group ID illegal, please check it")?(Be=a.E.REQUEST_PARAMETER_ERROR,G.status.reason="Invalid parameter"):Be=G.status.reason.includes("has create too many chatrooms")||G.status.reason.includes("has joined too many chatrooms")?a.E.MAX_LIMIT:G.status.reason.includes("auto create failed")?a.E.SERVER_BUSY:a.E.SERVER_UNKNOWN_ERROR}this._msgHash[le]&&((null===(P=this._msgHash[le])||void 0===P?void 0:P.isHandleChatroom)?(Ke=E.Z.create({type:Be,message:G.status.reason||"",data:""}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ke),this._msgHash[le].error instanceof Function&&this._msgHash[le].error(Ke),w.iO.has(le)&&(Ge=U.dd.failed,Be===a.E.CHATROOM_NOT_EXIST?Ge=U.dd.notFound:Be===a.E.CHATROOM_MEMBERS_FULL&&(Ge=U.dd.reachLimit),Fe=w.iO.get(le),je=Fe.rpt,We=Fe.requestName,je({isEndApi:!0,data:{isSuccess:0,requestName:We,requestMethod:"WEBSOCKET",requestUrl:this.url,code:Ge,codeDesc:G.status.reason}}),w.iO.delete(le))):(Ke=E.Z.create({type:Be,message:G.status.reason||"",data:{id:le,mid:ce}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ke),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:Be,reason:G.status.reason?G.status.reason:"",data:{id:le,mid:ce}}),null===(D=null===(x=this._localCache)||void 0===x?void 0:x.getInstance())||void 0===D||D.updateLocalMessage(le,{serverMsgId:ce,status:N.r.FAIL})),delete this._msgHash[le])}else if(7===G.status.errorCode)"sensitive words"===G.status.reason&&this._msgHash[le]?(Ke=E.Z.create({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"sensitive words",data:{id:le,mid:ce}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ke),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:le,mid:ce,reason:"sensitive words"}}),null===(H=null===(k=this._localCache)||void 0===k?void 0:k.getInstance())||void 0===H||H.updateLocalMessage(le,{serverMsgId:ce,status:N.r.FAIL})):"blocked by mod_antispam"===G.status.reason&&this._msgHash[le]?(Ke=E.Z.create({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"blocked by mod_antispam",data:{id:le,mid:ce}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ke),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:le,mid:ce,reason:"blocked by mod_antispam"}}),null===(W=null===(j=this._localCache)||void 0===j?void 0:j.getInstance())||void 0===W||W.updateLocalMessage(le,{serverMsgId:ce,status:N.r.FAIL})):"user is mute"===G.status.reason&&this._msgHash[le]?(Ke=E.Z.create({type:a.E.USER_MUTED_BY_ADMIN,message:"user is mute",data:{id:le,mid:ce}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ke),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail(Ke),null===(q=null===(K=this._localCache)||void 0===K?void 0:K.getInstance())||void 0===q||q.updateLocalMessage(le,{serverMsgId:ce,status:N.r.FAIL})):"traffic limit"===G.status.reason&&this._msgHash[le]?(Ke=E.Z.create({type:a.E.MESSAGE_CURRENT_LIMITING,message:"traffic limit",data:{id:le,mid:ce}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ke),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail(Ke),null===(J=null===(V=this._localCache)||void 0===V?void 0:V.getInstance())||void 0===J||J.updateLocalMessage(le,{serverMsgId:ce,status:N.r.FAIL})):"Sorry, data is too large"===G.status.reason&&this._msgHash[le]&&(Ke=E.Z.create({type:a.E.MESSAGE_SIZE_LIMIT,message:"Sorry, data is too large",data:{id:le,mid:ce}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ke),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail(Ke),null===(Z=null===(Y=this._localCache)||void 0===Y?void 0:Y.getInstance())||void 0===Z||Z.updateLocalMessage(le,{serverMsgId:ce,status:N.r.FAIL}));else if(19===G.status.errorCode)this._msgHash[le]&&(w.TJ.has(le)&&(w.TJ.get(le).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,codeDesc:G.status.reason||"",msgId:ce}}),w.TJ.delete(le)),Ke=E.Z.create({type:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,message:G.status.reason||"",data:{id:le,mid:ce}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ke),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,data:{id:le,mid:ce,reason:G.status.reason}}),null===($=null===(Q=this._localCache)||void 0===Q?void 0:Q.getInstance())||void 0===$||$.updateLocalMessage(le,{serverMsgId:ce,status:N.r.FAIL}));else if(this._msgHash[le]){w.TJ.has(le)&&(w.TJ.get(le).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.WEBIM_LOAD_MSG_ERROR,codeDesc:(null===(te=G.status)||void 0===te?void 0:te.reason)||"",msgId:ce}}),w.TJ.delete(le));try{Ke=E.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:(null===(ne=G.status)||void 0===ne?void 0:ne.reason)||"",data:{id:le,mid:ce,reason:G.status&&G.status.reason}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ke),null===(ie=null===(re=this._localCache)||void 0===re?void 0:re.getInstance())||void 0===ie||ie.updateLocalMessage(le,{serverMsgId:ce,status:N.r.FAIL}),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:a.E.WEBIM_LOAD_MSG_ERROR,data:{errorCode:G.status&&G.status.errorCode,reason:G.status&&G.status.reason}})}catch(e){qe=E.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing fail function error",data:e}),this.onError&&this.onError(qe),null===(se=this.eventHandler)||void 0===se||se.dispatch("onError",qe)}delete this._msgHash[le]}else w.TJ.has(le)&&(w.TJ.get(le).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,codeDesc:"on message error",msgId:ce}}),w.TJ.delete(le)),qe=E.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"on message error"}),this.onError&&this.onError(qe),null===(ae=this.eventHandler)||void 0===ae||ae.dispatch("onError",qe);F.label=22;case 22:return[2];case 23:if(G.metas&&0!==G.metas.length)try{z.call(this,G.metas,G.status)}catch(e){qe=E.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e}),c.kg.error("decode message error",e),this.onError&&this.onError(qe),null===(ue=this.eventHandler)||void 0===ue||ue.dispatch("onError",qe)}finally{G.isLast?(c.kg.debug("metas & CommSyncDLMessage.isLast",G.isLast),Ve=-1,this._queues.some((function(e,t){return e.name===G.name&&(Ve=t,!0)}))&&Ve>0&&this._queues.splice(Ve,1),this._queues.length>0&&ee.call(this,this._queues[0]),Je=-1,this.unSyncQueue.some((function(e,t){return e.name===G.queue.name&&(Je=t,!0)}))&&this.unSyncQueue.splice(Je,1),X.call(this,G)):G.nextKey&&(Xe=new(s())(G.nextKey.low,G.nextKey.high,G.nextKey.unsigned).toString(),c.kg.debug("nexKey:",Xe,"this.nextKey:",this.nexKey),Xe!==this.nexKey&&(this.nexKey=Xe,oe.call(this,G.nextKey,G.queue)))}else G.isLast?(c.kg.debug("CommSyncDLMessage.isLast",G.isLast),ze=-1,this._queues.some((function(e,t){return e.name===G.queue.name&&(ze=t,!0)}))&&this._queues.splice(ze,1),this._queues.length>0&&ee.call(this,this._queues[0]),Ye=-1,this.unSyncQueue.some((function(e,t){return e.name===G.queue.name&&(Ye=t,!0)}))&&this.unSyncQueue.splice(Ye,1),X.call(this,G)):G.nextKey&&(Xe=new(s())(G.nextKey.low,G.nextKey.high,G.nextKey.unsigned).toString(),c.kg.debug("nexKey:",Xe,"this.nextKey:",this.nexKey),Xe!==this.nexKey&&(this.nexKey=Xe,oe.call(this,G.nextKey,G.queue)));return[2]}}))}))}function ge(e){var t=[],n=this.root.lookup("easemob.pb.KeyValue"),r=[];for(var o in e){var i=n.decode(t);if(i.key=o,void 0!==e[o]){if("object"===x(e[o]))i.type=8,i.stringValue=JSON.stringify(e[o]);else if("string"==typeof e[o])i.type=7,i.stringValue=e[o];else if("boolean"==typeof e[o])i.type=1,i.varintValue=!0===e[o]?1:0;else if(Number.isInteger(e[o]))i.type=2,i.varintValue=e[o];else if("bigint"==typeof e[o]||"symbol"===x(e[o])||"function"==typeof e[o]||Number.isNaN(e[o]))i.type=7,i.stringValue=e[o].toString();else{if("number"!=typeof e[o]||Number.isInteger(e[o]))continue;i.type=6,i.doubleValue=e[o]}r.push(i)}}return r}function me(e){var t,n,r,o=[];if(this.root){var i,u=this.root.lookup("easemob.pb.MessageBody.Content").decode(o);switch(i=!e.group&&"groupchat"!==(null===(t=null==e?void 0:e.chatType)||void 0===t?void 0:t.toLowerCase())||e.roomType?e.group&&e.roomType||"chatroom"===(null===(n=null==e?void 0:e.chatType)||void 0===n?void 0:n.toLowerCase())?"chatRoom":"singleChat":"groupChat",e.type){case"txt":u.type=0,u.text=e.msg;break;case"img":u.type=1,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.size=e.body.size,u.thumbnailDisplayName=e.body.filename):e.file?(u.displayName=e.file.filename,u.remotePath=e.file.url,u.secretKey=e.file.secret,u.fileLength=e.file.file_length,u.size=e.file.size,u.thumbnailDisplayName=e.file.filename):(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.size=e.size,u.thumbnailDisplayName=e.filename),e.isBuildCombinedMsg&&(u.remotePath=e.url,u.secretKey=e.secret,u.size={height:e.height,width:e.width});break;case"video":u.type=2,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.duration=e.body.length,u.thumbnailDisplayName=e.body.filename,u.thumbnailRemotePath=this.useOwnUploadFun?"":"".concat(e.body.url,"?vframe=true"),u.thumbnailSecretKey=this.useOwnUploadFun?"":e.body.secret):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.duration=e.length,u.thumbnailDisplayName=e.filename,u.thumbnailRemotePath=e.thumb,u.thumbnailSecretKey=e.thumb_secret);break;case"loc":u.type=3,u.latitude=e.lat,u.longitude=e.lng,u.address=e.addr,u.buildingName=e.buildingName,u.latitude=e.lat;break;case"audio":u.type=4,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.duration=e.body.length,u.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.duration=e.length,u.thumbnailDisplayName=e.filename);break;case"file":u.type=5,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.thumbnailDisplayName=e.filename);break;case"cmd":u.type=6,u.action=e.action;break;case"custom":u.type=7,u.customEvent=e.customEvent,u.customExts=ge.call(this,e.customExts);break;case"combine":u.type=0,u.subType=0,u.text=e.compatibleText,u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.title=e.title,u.summary=e.summary,u.combineLevel=e.combineLevel}var c=[];e.ext&&(c=ge.call(this,e.ext));var l=this.root.lookup("easemob.pb.MessageBody"),d=l.decode(o),h=e.from||this.context.jid.name;d.from={name:e.isBuildCombinedMsg?h:this.context.jid.name};var f=e.to.indexOf("/"),p=f>-1?e.to.substring(0,f):e.to;if(d.to={name:p},"channel"===e.type)d.type=D.CHANNEL_ACK;else if("recall"===e.type)d.type=D.RECALL,d.ackMessageId=e.ackId;else if("delivery"===e.type)d.type=D.DELIVER_ACK,d.ackMessageId=e.ackId;else if("read"===e.type)d.type=D.READ_ACK,d.ackMessageId=e.ackId,"groupChat"===i&&(d.msgConfig={allowGroupAck:!0},d.ackContent=e.ackContent);else if("chatRoom"===i)d.type=D.CHATROOM;else if("groupChat"===i){if(d.type=D.GROUPCHAT,e.msgConfig){var E=e.msgConfig.allowGroupAck;d.msgConfig={allowGroupAck:!!E}}}else"singleChat"===i&&(d.type=D.SINGLECHAT);e.editMessageId&&(d.type=D.EDIT,d.editMessageId=e.editMessageId),d.contents=[u],d.ext=c;var v=function(e){var t={};return"translations"in e&&(t.translations=e.translations),"isChatThread"in e&&e.isChatThread&&(t.thread={}),Object.keys(t).length>0?JSON.stringify(t):""}(e);v&&(d.meta=v),d=l.encode(d).finish();var g=this.root.lookup("easemob.pb.Meta"),m=g.decode(o);m.id=e.id;var y="easemob.com";if("chatRoom"!==i&&"groupChat"!==i||(y="conference.easemob.com"),m.to={appKey:this.appKey,name:p,domain:y},f>-1&&(m.to.clientResource=e.to.substring(f+1,e.to.length)),"chatRoom"===i&&(m.ext=ge.call(this,function(e){return{chatroom_msg_tag:"high"===e.priority?0:"low"===e.priority?2:1}}(e))),"recall"===e.type&&e.metaExt&&(m.ext=ge.call(this,{recallMessageExtensionInfo:e.metaExt})),m.ns=1,m.payload=d,m.routetype=e.deliverOnlineOnly?1:0,"singleChat"!==i&&Array.isArray(e.receiverList)&&(null===(r=e.receiverList)||void 0===r?void 0:r.length)>0&&(m.directedUsers=e.receiverList,m.routetype=2),e.isBuildCombinedMsg)return m.timestamp=s().fromValue(e.time),g.encode(m).finish();var _=this.root.lookup("easemob.pb.CommSyncUL"),O=_.decode(o);O.meta=m,!e.isPing&&_e.call(this,e,m),O=_.encode(O).finish();var T=this.root.lookup("easemob.pb.MSync"),R=T.decode(o);return R.version=this.version,R.encryptType=this.encryptType,R.command=0,R.payload=O,T.encode(R).finish()}e.fail&&e.fail({type:a.E.WEBIM_CONNCTION_CLIENT_OFFLINE,message:"Not logged in"})}function ye(e){var t,n,r=this,o=B({},e);if(e.file)return o.accessToken=this.token,o.appKey=this.appKey,o.apiUrl=this.apiUrl,o.body&&o.body.url?me.call(this,o):new Promise((function(t,n){var i=o.onFileUploadComplete;o.onFileUploadComplete=function(t){var n,s,a,u,c,l;if(t.entities[0]["file-metadata"]){var d=t.entities[0]["file-metadata"]["content-length"];o.file_length=d,o.filetype=t.entities[0]["file-metadata"]["content-type"],d>204800&&(o.thumbnail=!0)}var h="".concat(r.apiUrl,"/").concat(r.orgName,"/").concat(r.appName,"/chatfiles/").concat(t.entities[0].uuid);o.body={type:o.type||"file",secret:t.entities[0]["share-secret"],filename:o.file.filename||o.filename,url:h,length:o.length||0,filetype:o.filetype||o.file.filetype,file_length:(null===(s=null===(n=o.file)||void 0===n?void 0:n.data)||void 0===s?void 0:s.size)||0,size:{width:o.width||0,height:o.height||0}},o.file.url=t.uri,e.secret=t.entities[0]["share-secret"],t.url=e.url="".concat(h,"?em-redirect=true&share-secret=").concat(t.entities[0]["share-secret"]),e.file_length=o.file_length=(null===(u=null===(a=o.file)||void 0===a?void 0:a.data)||void 0===u?void 0:u.size)||0,"img"===o.type&&(e.thumb="".concat(e.url,"&thumbnail=true"),t.thumb="".concat(t.url,"&thumbnail=true")),"video"===o.type&&(e.thumb="".concat(e.url,"&vframe=true"),e.thumb_secret=t.entities[0]["share-secret"],t.thumb="".concat(t.url,"&vframe=true")),i instanceof Function&&i(t,o.id);var f=me.call(r,o);w.TJ.size<=w.F3&&w.TJ.set(o.id,{rpt:r.dataReport.geOperateFun({operationName:U.fI.SEND_MSG})}),null===(l=null===(c=r._localCache)||void 0===c?void 0:c.getInstance())||void 0===l||l.storeMessage(e,N.r.INPROGRESS),Se.call(r,f)},g.P6.uploadFile.call(r,o,U.fI.UPLOAD_MSG_ATTACH)}));if("combine"===e.type){o.accessToken=this.token,o.appKey=this.appKey,o.apiUrl=this.apiUrl;var i=o.onFileUploadComplete,s=o.onFileUploadError;return new Promise((function(t,n){var u,l,d,h;if((null===(u=e.messageList)||void 0===u?void 0:u.length)>300||0===(null===(l=e.messageList)||void 0===l?void 0:l.length))return r._msgHash[o.id].reject({type:a.E.MAX_LIMIT,message:"The number of combined messages exceeded the limit."});var f=j([],e.messageList,!0),p=0;if(f.forEach((function(e){(null==e?void 0:e.combineLevel)>p&&(p=null==e?void 0:e.combineLevel)})),o.combineLevel=p+1,o.combineLevel>10)return r._msgHash[o.id].reject({type:a.E.MAX_LIMIT,message:"The level of the merged message exceeded the limit."});var E=Oe.call(r,f),v=function(t,n){var s,a,u,c,l,d,h="".concat(r.apiUrl,"/").concat(r.orgName,"/").concat(r.appName,"/chatfiles/").concat(t.entities[0].uuid),f=null===(s=t.entities[0])||void 0===s?void 0:s["share-secret"],p=h+"?em-redirect=true";f&&(p="".concat(p,"&share-secret=").concat(f)),i instanceof Function&&i({url:p,secret:f}),e.url=p,e.secret=f,o.url=p,o.secret=t.entities[0]["share-secret"],o.filename=(null===(a=o.file)||void 0===a?void 0:a.filename)||(null==n?void 0:n.fileName),o.file_length=(null===(c=null===(u=o.file)||void 0===u?void 0:u.data)||void 0===c?void 0:c.size)||(null==n?void 0:n.fileLength)||0,null===(d=null===(l=r._localCache)||void 0===l?void 0:l.getInstance())||void 0===d||d.storeMessage(e,N.r.INPROGRESS);var E=me.call(r,o);Se.call(r,E)},m=g.P6.getEnvInfo();if("web"!==m.platform&&"node"!==m.platform&&"quick_app"!==m.platform&&(null===(h=null===(d=m.global)||void 0===d?void 0:d.canIUse)||void 0===h?void 0:h.call(d,"getFileSystemManager"))){var y=m.global.getFileSystemManager(),_="".concat(r.apiUrl,"/").concat(r.orgName,"/").concat(r.appName,"/chatfiles");y.writeFile({filePath:"".concat(m.global.env.USER_DATA_PATH,"/combine"),data:E.buffer,encoding:"binary",success:function(e){m.global.uploadFile({url:_,filePath:"".concat(m.global.env.USER_DATA_PATH,"/combine"),name:"file",header:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+o.accessToken},success:function(e){if(200===e.statusCode){c.kg.debug("upload success",e);var t=JSON.parse(e.data);v(t,{fileName:"combine",fileLength:E.length})}else c.kg.debug("upload fail"),o.onFileUploadError instanceof Function&&o.onFileUploadError(e),this._msgHash[o.id].reject({type:a.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},fail:function(t){c.kg.debug("upload fail"),o.onFileUploadError instanceof Function&&o.onFileUploadError(e),this._msgHash[o.id].reject({type:a.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:t})}})},fail:function(e){c.kg.debug("write file fail",e),this._msgHash[o.id].reject({type:a.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})}})}else{var O=new File([E],"combine",{type:"application/octet-stream"}),T={url:URL.createObjectURL(O),filename:o.id,data:O};o.file=T,o.onFileUploadComplete=function(e){v(e)},o.onFileUploadError=function(e){s instanceof Function&&s(e),r._msgHash[o.id].reject({type:a.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},g.P6.uploadFile.call(r,o,U.fI.UPLOAD_MSG_ATTACH)}}))}"img"===e.type&&(o.body||(o.body=B(B({},o),{size:{width:o.width||0,height:o.height||0}}))),null===(n=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===n||n.storeMessage(e,N.r.INPROGRESS);var u=me.call(this,o);Se.call(this,u)}function _e(e,t){e.editMessageId||W.includes(e.type)&&(this._msgHash[e.id].thirdMessage=t)}function Oe(e){for(var t=Uint8Array.from("cm",(function(e){return e.charCodeAt(0)})),n=0;n<e.length;n++){for(var r=e[n],o=B(B({},r),{isBuildCombinedMsg:!0}),i=this.mSync.encodeChatMsg.call(this,o),s=i.length,a=new Uint8Array(4),u=0;u<4;u++)a[u]=s>>8*(3-u)&255;c.kg.debug("message length:",a);var l=new Uint8Array(t.length+a.length+i.length);l.set(t),l.set(a,t.length),l.set(i,t.length+a.length),t=l}var d=new Uint8Array(t.length+1),h=0;for(n=2;n<t.length;n++)n%2==1&&(h^=t[n]);return d.set(t),c.kg.debug("checkResult:",h),d[t.length]=h,d}function Te(e,t,n){var r=[],o=this.root.lookup("easemob.pb.MUCBody"),i=e.roomId,s=e.ext,a=void 0===s?"":s,u=e.leaveOtherRooms,c=void 0!==u&&u,l=o.decode(r);l.mucId={appKey:this.appKey,name:i,domain:"conference.easemob.com"},l.operation="join"===n?2:3,l.from={name:this.context.userId},l.isChatroom=!0,"join"===n&&(l.ext=a,l.leaveOtherRooms=c),l=o.encode(l).finish();var d=this.root.lookup("easemob.pb.Meta").decode(r);d.id=t,d.from={appKey:this.appKey,name:this.context.userId,domain:"easemob.com",client_resource:this.context.jid.clientResource},d.to={domain:"easemob.com"},d.ns=2,d.payload=l;var h=this.root.lookup("easemob.pb.CommSyncUL"),f=h.decode(r);f.meta=d,f=h.encode(f).finish();var p=this.root.lookup("easemob.pb.MSync"),E=p.decode(r);return E.version=this.version,E.encryptType=this.encryptType,E.command=0,E.payload=f,p.encode(E).finish()}function Re(e,t){var n=g.P6.getUniqueId(),r=Te.call(this,e,n,t),o="join"===t?U.fI.JOIN_CHATROOM:U.fI.QUIT_CHATROOM,i=this.dataReport.geOperateFun({operationName:o});return w.iO.size<=w.F3&&w.iO.set(n,{rpt:i,requestName:o}),Se.call(this,B(B({},e),{isHandleChatroom:!0,joinMsg:r,id:n,operation:t}),n)}function Ie(e){var t=this;return new Promise((function(n,r){var o,i,s,u,l,d;if(c.kg.debug("call send"),t.logOut)return c.kg.debug("send message failed",a.E.WEBIM_CONNECTION_CLOSED),r({type:a.E.WEBIM_CONNECTION_CLOSED,message:"not login"});if(!e.id||"string"!=typeof e.id||""===e.id)return r({type:a.E.MESSAGE_PARAMETER_ERROR,message:'Missing required parameter: "id"'});if(!e.to||"string"!=typeof e.to||""===e.to)return r({type:a.E.MESSAGE_PARAMETER_ERROR,message:'Missing required parameter: "to"'});var h="file"===e.type||"img"===e.type||"audio"===e.type||"video"===e.type,f="delivery"===e.type||"read"===e.type||"channel"===e.type,p="cmd"===e.type,E="recall"===e.type,v=null==e?void 0:e.editMessageId,g=!(f||E||p||v);if(e.id){if(!h&&!f||h&&t.useOwnUploadFun){var m="recall"===e.type?U.fI.SEND_RECALL_MSG:U.fI.SEND_MSG;v&&(m=U.fI.MODIFY_MESSAGE),w.TJ.size<=w.F3&&w.TJ.set(e.id,{rpt:t.dataReport.geOperateFun({operationName:m})})}g&&(null===(i=null===(o=t._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.storeMessage(e,N.r.CREATE)),t._msgHash[e.id]=B(B({},e),{resolve:n,reject:r})}if(h||"combine"===e.type)return ye.call(t,e);if("txt"===e.type&&(null===(s=e.msgConfig)||void 0===s?void 0:s.languages)&&Array.isArray(null===(u=e.msgConfig)||void 0===u?void 0:u.languages)&&e.msgConfig.languages.length>0){var y=t.translateMessage||t.translation.translateMessage;if(!y)throw new Error("there is no method to translate message");y.call(t,{text:e.msg,languages:e.msgConfig.languages}).then((function(n){var r,o,i,s=null===(r=n.data[0])||void 0===r?void 0:r.translations;s=s.map((function(e){return{code:e.to,text:e.text}})),e.translations=s,t._msgHash[e.id].translations=s,null===(i=null===(o=t._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.storeMessage(e,N.r.INPROGRESS);var a=me.call(t,e);Se.call(t,a,e.id)})).catch((function(e){r(e)}))}else{g&&(null===(d=null===(l=t._localCache)||void 0===l?void 0:l.getInstance())||void 0===d||d.storeMessage(e,N.r.INPROGRESS));var _=me.call(t,e);Se.call(t,_,e.id)}}))}function Se(e,t){var n,r=this;if(e.isHandleChatroom){if(!this.isOpened()){var o={data:"",type:a.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};if(w.iO.has(e.id)){var i=w.iO.get(e.id);(0,i.rpt)({isEndApi:!0,data:{isSuccess:0,requestName:i.requestName,requestMethod:"WEBSOCKET",requestUrl:this.url,code:U.dd.disconnect,codeDesc:"websocket has been disconnected"}}),w.iO.delete(e.id)}return Promise.reject(o)}return new Promise((function(n,o){var i;r._msgHash[e.id]=B(B({},e),{resolve:n,reject:o}),i="miniCore"===r.name?e.joinMsg:V.call(r,e.joinMsg,t);var s=t&&setTimeout((function(){var t,n,o;if(r._msgHash[e.id]){var i={type:a.E.REQUEST_TIMEOUT,message:"request timeout"};null===(n=(t=r._msgHash[e.id]).reject)||void 0===n||n.call(t,i),clearTimeout(null===(o=r._msgHash[e.id])||void 0===o?void 0:o.messageTimer),delete r._msgHash[e.id],r.reconnecting||r.reconnect(!0)}}),P.xz);r._msgHash[e.id].messageTimer=s,r.sock.send(i)}))}if(!this.isOpened())return null===(n=this.unMSyncSendMsgMap)||void 0===n||n.set(t,e),!this.logOut&&this.autoReconnectNumTotal<this.autoReconnectNumMax&&(c.kg.debug("need to reconnect",this.autoReconnectNumTotal,this.autoReconnectNumMax),this.offLineSendConnecting=!0,this.reconnecting||this.reconnect()),void(this.onError&&this.onError({type:a.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}));var s,u=t&&setTimeout((function(){var e,n,o;if(r._msgHash[null!=t?t:""]){var i={type:a.E.MESSAGE_SEND_TIMEOUT,message:"send message timeout"};null===(n=(e=r._msgHash[null!=t?t:""]).reject)||void 0===n||n.call(e,i),clearTimeout(null===(o=r._msgHash[null!=t?t:""])||void 0===o?void 0:o.messageTimer),delete r._msgHash[null!=t?t:""],r.reconnecting||r.reconnect(!0)}}),P.xz);this._msgHash[null!=t?t:""]&&(this._msgHash[null!=t?t:""].messageTimer=u),s="miniCore"===this.name?e:V.call(this,e,t),this.sock.send(s)}var Ce=function(e,t){return e.send=Ie,e.sendMsg=Ie,c.kg.debug("init Msync by ".concat(e.name)),{generateProvision:q.bind(e),base64transform:V.bind(e),distributeMeta:J.bind(e),decodeMeta:z.bind(e),decodeUnreadDL:Z.bind(e),_rebuild:Q.bind(e),_lastsession:te.bind(e),receiveProvision:ie.bind(e),isInQueue:he.bind(e),decodeNotice:fe.bind(e),decodeMSync:pe.bind(e),distributeMSync:Ee.bind(e),encodeChatMsg:me.bind(e),upLoadFile:ye.bind(e),send:Ie.bind(e),stopHeartBeat:le.bind(e),handleChatRoom:Re.bind(e),sendUnreadDeal:ue.bind(e)}}},7252:function(e,t){"use strict";var n=function(){function e(e){this.type=e.type,this.message=e.message,this.data=e.data}return e.create=function(t){return new e(t)},e}();t.Z=n},8161:function(e,t,n){"use strict";n.d(t,{t:function(){return g}}),n(9601),n(1539),n(8674),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948),n(7941),n(3710),n(9714),n(9653),n(6699),n(2023),n(2222),n(8309),n(9554),n(4747),n(2772);var r=n(3720),o=n.n(r),i=n(4363),s=n(4024),a=n(6424),u=n(9743),c=n(7360),l=n(2449),d=n(7288),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)},f=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},p=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},E={0:"TEXT",1:"IMAGE",2:"VIDEO",3:"LOCATION",4:"VOICE",5:"FILE",6:"COMMAND",7:"CUSTOM",8:"COMBINE"};function v(e){for(var t={},n=0;n<e.length;n++)if(8===e[n].type)t[e[n].key]=JSON.parse(e[n].stringValue);else if(7===e[n].type)t[e[n].key]=e[n].stringValue;else if(6===e[n].type)t[e[n].key]=e[n].doubleValue;else if(5===e[n].type)t[e[n].key]=e[n].floatValue;else if(1===e[n].type){var r=e[n].varintValue,i=new(o())(r.low,r.high,r.unsigned).toString();t[e[n].key]=0!==Number(i)}else 2!==e[n].type&&3!==e[n].type&&4!==e[n].type||(r=e[n].varintValue,i=new(o())(r.low,r.high,r.unsigned).toString(),t[e[n].key]=Number(i));return t}function g(e){var t="";return e.remotePath&&(t=s.P6.formatAttachUrl.call(this,e.remotePath),e.remotePath.includes("?em-redirect")||(t="".concat(t,"?em-redirect=true"),e.secretKey&&(t="".concat(t,"&share-secret=").concat(e.secretKey)))),t}function m(e,t){var n,r,o=t.from&&t.from.name;if(o===this.context.userId){var i=null===(n=null==e?void 0:e.from)||void 0===n?void 0:n.clientResource;o===(null===(r=null==t?void 0:t.to)||void 0===r?void 0:r.name)&&i&&i!==this.clientResource&&(o="".concat(o,"/").concat(i))}return o}function y(e,t){var n,r=t.to&&t.to.name;return(null===(n=null==e?void 0:e.to)||void 0===n?void 0:n.clientResource)&&(r="".concat(r,"/").concat(e.to.clientResource)),r}function _(e){var t,n,r,o,u,l,h,m,y,_,O,T,R,I,S,C,N,A,b,M,L,w,U,P,x,D,k;return f(this,void 0,void 0,(function(){var f,H,B,G,F,j,W,K,q,V,J,z,Y,X,Z,Q,$,ee,te,ne,re,oe,ie,se,ae,ue,ce,le,de,he,fe,pe,Ee,ve,ge,me,ye,_e,Oe,Te,Re,Ie,Se,Ce,Ne,Ae,be,Me,Le,we,Ue,Pe;return p(this,(function(p){switch(p.label){case 0:switch(f=e.status,H=e.thirdMessage,B=e.msgBody,G=e.msgId,F=e.type,j=e.from,W=e.to,K=e.time,q=e.onlineState,V=e.chatType,J=e.ignoreCallback,z=e.priority,Y=e.format,X=e.broadcast,Z=void 0!==X&&X,Q=e.isContentReplaced,$=void 0!==Q&&Q,ee={},te={},ne=f.errorCode>0,re=f.errorCode,oe=f.reason,ie={},se=[],ae=[],ue={},ce="",le=0,de=null,he=null,H.ext&&(ie=v(H.ext)),H.meta&&"string"==typeof H.meta&&((pe=JSON.parse(H.meta)).reaction&&(se=pe.reaction).forEach((function(e){e.isAddedBySelf=e.state,delete e.state})),pe.translations&&(ae=pe.translations),pe.edit_msg&&(Ee=pe.edit_msg,ve=Ee.count,ge=Ee.operator,me=Ee.edit_time,ye=Ee.sender,_e=Ee.send_time,ue={operationTime:me,operatorId:ge,operationCount:ve},ce=ye,le=_e),pe.thread&&"{}"!==JSON.stringify(pe.thread)&&(de={messageId:pe.thread.msg_parent_id,parentId:pe.thread.muc_parent_id,chatThreadName:pe.thread.thread_name}),pe.thread_overview&&"{}"!==JSON.stringify(pe.thread_overview)&&(he={id:pe.thread_overview.id,parentId:pe.thread_overview.muc_parent_id,name:pe.thread_overview.name,lastMessage:pe.thread_overview.last_message&&"{}"!==JSON.stringify(pe.thread_overview.last_message)?i.w.call(this,pe.thread_overview.last_message):null,createTimestamp:pe.thread_overview.create_timestamp,updateTimestamp:pe.thread_overview.update_timestamp,messageCount:pe.thread_overview.message_count||0})),B.type){case 0:return[3,1];case 1:return[3,7];case 2:return[3,10];case 3:return[3,13];case 4:return[3,16];case 5:return[3,19];case 6:return[3,22];case 7:return[3,23];case 8:return[3,26]}return[3,27];case 1:return Object.prototype.hasOwnProperty.call(B,"subType")&&0===B.subType?(fe=g.call(this,B),Oe={id:G,type:"combine",chatType:V,to:W,from:j,ext:ie,time:Number(K),onlineState:q,title:B.title||"",summary:B.summary||"",url:fe||"",secret:B.secretKey||"",file_length:B.fileLength||0,filename:B.displayName||"",compatibleText:B.text,combineLevel:B.combineLevel||0},ee.msgConfig&&(Oe.msgConfig=ee.msgConfig),se.length>0&&(Oe.reactions=se),de&&(Oe.chatThread=de),he&&(Oe.chatThreadOverview=he),"chatRoom"===V&&(Oe.priority=z,Oe.broadcast=Z),$&&(Oe.isContentReplaced=$),te=Oe,J?[3,3]:[4,null===(n=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===n?void 0:n.storeMessage(Oe,d.r.SUCCESS)]):[3,4];case 2:p.sent(),null===(r=this.eventHandler)||void 0===r||r.dispatch("onCombineMessage",Oe),p.label=3;case 3:return[3,28];case 4:return!(ee={id:G,type:F,contentsType:E[B.type],from:j,to:W,data:B.text,ext:ie,sourceMsg:B.text,time:K,msgConfig:H.msgConfig,onlineState:q}).msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onTextMessage&&this.onTextMessage(ee),Te={id:G,type:"txt",chatType:V,msg:B.text,to:W,from:j,ext:ie,time:Number(K),onlineState:q},ee.msgConfig&&(Te.msgConfig=ee.msgConfig),se.length>0&&(Te.reactions=se),de&&(Te.chatThread=de),he&&(Te.chatThreadOverview=he),ae.length>0&&(Te.translations=ae),ue.operationCount>0&&(Te.modifiedInfo=ue,H.type===a.gA.EDIT&&(Te.from=ce,Te.time=le)),"chatRoom"===V&&(Te.priority=z,Te.broadcast=Z),$&&(Te.isContentReplaced=$),te=Te,J?[3,6]:[4,null===(u=null===(o=this._localCache)||void 0===o?void 0:o.getInstance())||void 0===u?void 0:u.storeMessage(Te,d.r.SUCCESS)];case 5:p.sent(),null===(l=this.eventHandler)||void 0===l||l.dispatch("onTextMessage",Te),p.label=6;case 6:return[3,28];case 7:return Re=(null===(h=null==B?void 0:B.size)||void 0===h?void 0:h.width)||0,Ie=(null===(m=null==B?void 0:B.size)||void 0===m?void 0:m.height)||0,fe=this.useOwnUploadFun?B.remotePath:g.call(this,B),!(ee={id:G,type:F,contentsType:E[B.type],from:j,to:W,url:fe,secret:B.secretKey,filename:B.displayName,thumb:this.useOwnUploadFun?"":"".concat(fe,"&thumbnail=true"),thumb_secret:B.secretKey,file_length:B.fileLength||"",width:Re,height:Ie,filetype:B.filetype||"",accessToken:this.token,ext:ie,time:K,msgConfig:H.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onPictureMessage&&this.onPictureMessage(ee),Se={id:G,type:"img",chatType:V,from:j,to:W,url:fe||"",width:Re,height:Ie,secret:B.secretKey||"",thumb:this.useOwnUploadFun?"":"".concat(fe,"&thumbnail=true"),thumb_secret:B.secretKey,file_length:B.fileLength||0,ext:ie,time:Number(K),onlineState:q},ee.msgConfig&&(Se.msgConfig=ee.msgConfig),se.length>0&&(Se.reactions=se),de&&(Se.chatThread=de),he&&(Se.chatThreadOverview=he),"chatRoom"===V&&(Se.priority=z,Se.broadcast=Z),$&&(Se.isContentReplaced=$),te=Se,J?[3,9]:[4,null===(_=null===(y=this._localCache)||void 0===y?void 0:y.getInstance())||void 0===_?void 0:_.storeMessage(Se,d.r.SUCCESS)];case 8:p.sent(),null===(O=this.eventHandler)||void 0===O||O.dispatch("onImageMessage",Se),p.label=9;case 9:return[3,28];case 10:return fe=this.useOwnUploadFun?B.remotePath:g.call(this,B),!(ee={id:G,type:F,contentsType:E[B.type],from:j,to:W,url:fe,secret:B.secretKey,filename:B.displayName,length:B.duration||"",file_length:B.fileLength||"",filetype:B.filetype||"",accessToken:this.token||"",ext:ie,time:K,msgConfig:H.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onVideoMessage&&this.onVideoMessage(ee),Ce={id:G,type:"video",chatType:V,from:j,to:W,url:fe,secret:B.secretKey,thumb:s.P6.formatAttachUrl.call(this,B.thumbnailRemotePath),thumb_secret:B.thumbnailSecretKey,filename:B.displayName,length:B.duration||0,file:{},file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ie,time:Number(K),onlineState:q},ee.msgConfig&&(Ce.msgConfig=ee.msgConfig),se.length>0&&(Ce.reactions=se),de&&(Ce.chatThread=de),he&&(Ce.chatThreadOverview=he),"chatRoom"===V&&(Ce.priority=z,Ce.broadcast=Z),$&&(Ce.isContentReplaced=$),te=Ce,J?[3,12]:[4,null===(R=null===(T=this._localCache)||void 0===T?void 0:T.getInstance())||void 0===R?void 0:R.storeMessage(Ce,d.r.SUCCESS)];case 11:p.sent(),null===(I=this.eventHandler)||void 0===I||I.dispatch("onVideoMessage",Ce),p.label=12;case 12:return[3,28];case 13:return!(ee={id:G,type:F,contentsType:E[B.type],from:j,to:W,addr:B.address,buildingName:B.buildingName,lat:B.latitude,lng:B.longitude,ext:ie,time:K,msgConfig:H.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onLocationMessage&&this.onLocationMessage(ee),Ne={id:G,type:"loc",chatType:V,from:j,to:W,buildingName:B.buildingName,addr:B.address,lat:B.latitude,lng:B.longitude,ext:ie,time:Number(K),onlineState:q},ee.msgConfig&&(Ne.msgConfig=ee.msgConfig),se.length>0&&(Ne.reactions=se),de&&(Ne.chatThread=de),he&&(Ne.chatThreadOverview=he),"chatRoom"===V&&(Ne.priority=z,Ne.broadcast=Z),$&&(Ne.isContentReplaced=$),te=Ne,J?[3,15]:[4,null===(C=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===C?void 0:C.storeMessage(Ne,d.r.SUCCESS)];case 14:p.sent(),null===(N=this.eventHandler)||void 0===N||N.dispatch("onLocationMessage",Ne),p.label=15;case 15:return[3,28];case 16:return fe=this.useOwnUploadFun?B.remotePath:g.call(this,B),!(ee={id:G,type:F,contentsType:E[B.type],from:j,to:W,url:fe,secret:B.secretKey,filename:B.displayName,file_length:B.fileLength||"",accessToken:this.token||"",ext:ie,length:B.duration,time:K,msgConfig:H.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onAudioMessage&&this.onAudioMessage(ee),Ae={id:G,type:"audio",chatType:V,from:j,to:W,url:fe,secret:B.secretKey,file:{},filename:B.displayName,length:B.duration||0,file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ie,time:Number(K),onlineState:q},ee.msgConfig&&(Ae.msgConfig=ee.msgConfig),se.length>0&&(Ae.reactions=se),de&&(Ae.chatThread=de),he&&(Ae.chatThreadOverview=he),"chatRoom"===V&&(Ae.priority=z,Ae.broadcast=Z),$&&(Ae.isContentReplaced=$),te=Ae,J?[3,18]:[4,null===(b=null===(A=this._localCache)||void 0===A?void 0:A.getInstance())||void 0===b?void 0:b.storeMessage(Ae,d.r.SUCCESS)];case 17:p.sent(),null===(M=this.eventHandler)||void 0===M||M.dispatch("onAudioMessage",Ae),p.label=18;case 18:return[3,28];case 19:return fe=this.useOwnUploadFun?B.remotePath:g.call(this,B),!(ee={id:G,type:F,contentsType:E[B.type],from:j,to:W,url:fe,secret:B.secretKey,filename:B.displayName,file_length:B.fileLength,accessToken:this.token||"",ext:ie,time:K,msgConfig:H.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onFileMessage&&this.onFileMessage(ee),be={id:G,type:"file",chatType:V,from:j,to:W,url:fe,secret:B.secretKey,file:{},filename:B.displayName,length:B.duration||0,file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ie,time:Number(K),onlineState:q},ee.msgConfig&&(be.msgConfig=ee.msgConfig),se.length>0&&(be.reactions=se),de&&(be.chatThread=de),he&&(be.chatThreadOverview=he),"chatRoom"===V&&(be.priority=z,be.broadcast=Z),$&&(be.isContentReplaced=$),te=be,J?[3,21]:[4,null===(w=null===(L=this._localCache)||void 0===L?void 0:L.getInstance())||void 0===w?void 0:w.storeMessage(be,d.r.SUCCESS)];case 20:p.sent(),null===(U=this.eventHandler)||void 0===U||U.dispatch("onFileMessage",be),p.label=21;case 21:return[3,28];case 22:return!(ee={id:G,type:F,contentsType:E[B.type],from:j,to:W,action:B.action,ext:ie,time:K,msgConfig:H.msgConfig,onlineState:q}).msgConfig&&delete H.msgConfig,ee.error=ne,ee.errorText=oe,ee.errorCode=re,!J&&this.onCmdMessage&&this.onCmdMessage(ee),Me={id:G,type:"cmd",chatType:V,from:j,to:W,action:B.action,ext:ie,time:Number(K),onlineState:q},ee.msgConfig&&(Me.msgConfig=ee.msgConfig),se.length>0&&(Me.reactions=se),de&&(Me.chatThread=de),he&&(Me.chatThreadOverview=he),"chatRoom"===V&&(Me.priority=z,Me.broadcast=Z),$&&(Me.isContentReplaced=$),te=Me,J||null===(P=this.eventHandler)||void 0===P||P.dispatch("onCmdMessage",Me),[3,28];case 23:return Le={},we={},H.contents[0].customExts&&(Le=v(H.contents[0].customExts)),H.contents[0].params&&(we=v(H.contents[0].params)),ee={id:G,type:F,contentsType:E[B.type],from:j,to:W,customEvent:B.customEvent,params:we,customExts:Le,ext:ie,time:K,onlineState:q},!J&&this.onCustomMessage&&this.onCustomMessage(ee),Ue={id:G,type:"custom",chatType:V,from:j,to:W,customEvent:B.customEvent,params:we,customExts:Le,ext:ie,time:Number(K),onlineState:q},ee.msgConfig&&(Ue.msgConfig=ee.msgConfig),se.length>0&&(Ue.reactions=se),de&&(Ue.chatThread=de),he&&(Ue.chatThreadOverview=he),ue.operationCount>0&&(Ue.modifiedInfo=ue,H.type===a.gA.EDIT&&(Ue.from=ce,Ue.time=le)),"chatRoom"===V&&(Ue.priority=z,Ue.broadcast=Z),$&&(Ue.isContentReplaced=$),te=Ue,J?[3,25]:[4,null===(D=null===(x=this._localCache)||void 0===x?void 0:x.getInstance())||void 0===D?void 0:D.storeMessage(Ue,d.r.SUCCESS)];case 24:p.sent(),null===(k=this.eventHandler)||void 0===k||k.dispatch("onCustomMessage",Ue),p.label=25;case 25:return[3,28];case 26:return fe=g.call(this,B),Pe={id:G,type:"combine",chatType:V,to:W,from:j,ext:ie,time:Number(K),onlineState:q,title:B.title||"",summary:B.summary||"",url:fe||"",secret:B.secretKey||"",file_length:B.fileLength||0,filename:B.displayName||"",compatibleText:B.text,combineLevel:B.combineLevel||0},ee.msgConfig&&(Pe.msgConfig=ee.msgConfig),se.length>0&&(Pe.reactions=se),de&&(Pe.chatThread=de),he&&(Pe.chatThreadOverview=he),"chatRoom"===V&&(Pe.priority=z,Pe.broadcast=Z),$&&(Pe.isContentReplaced=$),te=Pe,!J&&this.eventHandler&&this.eventHandler.dispatch("onCombineMessage",Pe),[3,28];case 27:return c.kg.error("Unknow message type, message:",B),[3,28];case 28:return Y?[2,te]:[2,ee]}}))}))}function O(e,t,n){if(this.delivery&&e!==t){var r=this.getUniqueId(),o=new l.Message("delivery",r);o.set({ackId:n,to:e}),c.kg.debug("send delivery ack"),this.send(o.body)}}t.Z=function(e,t,n,r,i){var l,d,E,g,T,R,I,S,C,N,A,b,M,L,w,U,P,x,D,k,H,B,G,F,j,W;return f(this,void 0,void 0,(function(){var f,K,q,V,J,z,Y,X,Z,Q,$,ee,te,ne,re,oe,ie,se,ae,ue,ce,le,de,he,fe,pe,Ee,ve,ge,me,ye,_e,Oe,Te,Re,Ie,Se,Ce,Ne,Ae;return p(this,(function(p){switch(p.label){case 0:if(f=new(o())(e.timestamp.low,e.timestamp.high,e.timestamp.unsigned).toString(),K=this.root.lookup("easemob.pb.MessageBody"),q=K.decode(e.payload),V=3,J=!1,z=new(o())(e.id.low,e.id.high,e.id.unsigned).toString(),i&&e.from&&e.from.name===this.context.userId&&e.from.clientResource===this.clientResource&&q.type===a.gA.CHATROOM)return[2,c.kg.debug("Discard your own chat room message:",z)];if(e.meta&&e.meta.length){if(Y=s.P6.parseNotify(e.meta),X=Y.is_online,Z=Y.callback_replace,this.useReplacedMessageContents&&Z&&(J=!0),X||0===X)switch(X){case 0:V=0;break;case 1:V=1;break;default:V=2}}else V=3;switch(Q=q.ackMessageId?new(o())(q.ackMessageId.low,q.ackMessageId.high,q.ackMessageId.unsigned).toString():"",$="",ee=m.call(this,e,q),te=y.call(this,e,q),c.kg.debug("meta thirdMessage:",{metaId:z,metaNs:e.ns,type:q.type,from:ee,to:te,contentType:null===(d=null===(l=q.contents)||void 0===l?void 0:l[0])||void 0===d?void 0:d.type,contentLen:null===(E=q.contents)||void 0===E?void 0:E.length}),q.type){case a.gA.SINGLECHAT:return[3,1];case a.gA.GROUPCHAT:return[3,2];case a.gA.CHATROOM:return[3,3];case a.gA.READ_ACK:return[3,4];case a.gA.DELIVER_ACK:return[3,5];case a.gA.RECALL:return[3,6];case a.gA.CHANNEL_ACK:return[3,15];case a.gA.EDIT:return[3,16]}return[3,20];case 1:return $="chat","agoraToken"===this.grantType&&($="singleChat"),this.delivery&&!n&&ee!==this.context.userId&&O.call(this,ee,te,z),[3,21];case 2:return $="groupchat","agoraToken"===this.grantType&&($="groupChat"),[3,21];case 3:return $="chatroom","agoraToken"===this.grantType&&($="chatRoom"),V=1,[3,21];case 4:return $="read_ack",ne=void 0,q.ext[0]&&JSON.parse(q.ext[0].stringValue)?(ne={id:z,type:"read",from:ee,to:te,mid:Q,groupReadCount:q.ext[0]&&JSON.parse(q.ext[0].stringValue),ackContent:q.ackContent,onlineState:V},this.onReadMessage&&this.onReadMessage(ne),null===(g=this.eventHandler)||void 0===g||g.dispatch("onReadMessage",ne),[2]):(ne={id:z,type:"read",from:ee,to:te,mid:Q,onlineState:V},this.onReadMessage&&this.onReadMessage(ne),null===(T=this.eventHandler)||void 0===T||T.dispatch("onReadMessage",ne),[2]);case 5:return $="deliver_ack",this.onDeliveredMessage&&this.onDeliveredMessage({id:z,type:"delivery",from:ee,to:te,mid:Q,onlineState:V}),re={id:z,type:"delivery",from:ee,to:te,mid:Q,onlineState:V},null===(R=this.eventHandler)||void 0===R||R.dispatch("onDeliveredMessage",re),[2];case 6:return $="recall",oe="",e.ext&&(oe=(null===(I=v(e.ext))||void 0===I?void 0:I.recallMessageExtensionInfo)||""),ie={id:z,from:ee||"admin",to:te,mid:Q,ext:oe,onlineState:V},se=te===this.user?ee:te,[4,null===(C=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===C?void 0:C.getMessageByServerMsgId(ie.mid)];case 7:return(ae=p.sent())?[4,null===(A=null===(N=this._localCache)||void 0===N?void 0:N.getInstance())||void 0===A?void 0:A.removeMsgByServerMsgId(ie.mid)]:[3,9];case 8:p.sent(),p.label=9;case 9:return"singleChat"!==(null==ae?void 0:ae.chatType)&&"groupChat"!==(null==ae?void 0:ae.chatType)?[3,14]:(ue=(null==ae?void 0:ae.from)===this.user||""===(null==ae?void 0:ae.from),[4,null===(M=null===(b=this._localCache)||void 0===b?void 0:b.getInstance())||void 0===M?void 0:M.getConversationLastMessage(se,ae.chatType)]);case 10:return ce=p.sent(),[4,null===(w=null===(L=this._localCache)||void 0===L?void 0:L.getInstance())||void 0===w?void 0:w.getConversationBySessionId((0,u.MQ)({conversationId:se,conversationType:ae.chatType}))];case 11:return(le=p.sent())?[4,null===(P=null===(U=this._localCache)||void 0===U?void 0:U.getInstance())||void 0===P?void 0:P.updateLocalConversation((0,u.MQ)({conversationId:se,conversationType:ae.chatType}),{lastMessageId:null==ce?void 0:ce.serverMsgId,unReadCount:(0,u.E7)({conversation:le,isRecallSelfMsg:ue,recalledMsgTime:ae.time})})]:[3,13];case 12:p.sent(),p.label=13;case 13:p.label=14;case 14:return this.onRecallMessage&&this.onRecallMessage(ie),null===(x=this.eventHandler)||void 0===x||x.dispatch("onRecallMessage",ie),[2];case 15:return this.onChannelMessage&&this.onChannelMessage({id:z,type:"channel",chatType:"singleChat",from:ee,to:te,time:Number(f),onlineState:V}),de={id:z,type:"channel",chatType:"singleChat",from:ee,to:te,time:Number(f),onlineState:V},null===(D=this.eventHandler)||void 0===D||D.dispatch("onChannelMessage",de),[2];case 16:return he={errorCode:0,reason:""},[4,_.call(this,{status:he,thirdMessage:q,msgBody:q.contents[0],msgId:z,type:$,from:ee,to:te,time:f,onlineState:V,ignoreCallback:!0,format:!0,isContentReplaced:J})];case 17:return fe=p.sent(),pe=!!e.to&&-1!==e.to.domain.indexOf("conference"),fe.chatType=pe?"groupChat":"singleChat",Ee=q.editMessageId&&new(o())(q.editMessageId.low,q.editMessageId.high,q.editMessageId.unsigned).toString(),ve={},"txt"===fe.type?(ge=fe.type,me=fe.chatType,ye=fe.to,_e=fe.from,Oe=fe.time,Te=fe.modifiedInfo,ve={id:Ee,type:ge,chatType:me,to:ye,from:_e,time:Oe,modifiedInfo:Te,msg:fe.msg},fe.translations&&(ve.translations=fe.translations)):"custom"===fe.type&&((ve=fe).id=Ee,delete ve.onlineState),ve?[4,null===(H=null===(k=this._localCache)||void 0===k?void 0:k.getInstance())||void 0===H?void 0:H.getMessageByServerMsgId(Ee)]:[3,19];case 18:"txt"===(null==(Re=p.sent())?void 0:Re.type)&&"txt"===ve.type?null===(G=null===(B=this._localCache)||void 0===B?void 0:B.getInstance())||void 0===G||G.putMessageToDB(h(h({},Re),{msg:ve.msg,modifiedInfo:ve.modifiedInfo,translations:ve.translations})):"custom"===(null==Re?void 0:Re.type)&&"custom"===ve.type&&(null===(j=null===(F=this._localCache)||void 0===F?void 0:F.getInstance())||void 0===j||j.putMessageToDB(h(h({},Re),{modifiedInfo:ve.modifiedInfo,customEvent:ve.customEvent,customExts:ve.customExts,ext:ve.ext}))),p.label=19;case 19:return"txt"!==fe.type&&"custom"!==fe.type||null===(W=this.eventHandler)||void 0===W||W.dispatch("onModifiedMessage",ve),[2];case 20:return c.kg.error("unexpected message type: ".concat(q.type)),[2];case 21:Ie="normal",Ce=!1,"chat"===$.toLowerCase()||"singleChat"===$?Se="singleChat":"groupchat"===$.toLowerCase()||"groupChat"===$?Se="groupChat":(Se="chatRoom",V=1,e.ext&&(Ne=v(e.ext),Ce=!!(null==Ne?void 0:Ne.is_broadcast),Ie=0===Ne.chatroom_msg_tag?"high":2===Ne.chatroom_msg_tag?"low":"normal")),Ae=0,p.label=22;case 22:return Ae<q.contents.length?[4,_.call(this,{status:t,thirdMessage:q,msgBody:q.contents[Ae],msgId:z,type:$,from:ee,to:te,time:f,onlineState:V,chatType:Se,ignoreCallback:n,priority:Ie,format:r,broadcast:Ce,isContentReplaced:J})]:[3,25];case 23:return[2,p.sent()];case 24:return Ae++,[3,22];case 25:return[2]}}))}))}},7288:function(e,t,n){"use strict";var r;n.d(t,{r:function(){return r}}),function(e){e[e.CREATE=0]="CREATE",e[e.FAIL=1]="FAIL",e[e.INPROGRESS=2]="INPROGRESS",e[e.SUCCESS=3]="SUCCESS"}(r||(r={}))},9743:function(e,t,n){"use strict";n.d(t,{E7:function(){return o},MQ:function(){return r},un:function(){return i}}),n(2222);var r=function(e){return"".concat(e.conversationType,"-").concat(e.conversationId)},o=function(e){var t=e.isRecallSelfMsg,n=e.conversation,r=e.recalledMsgTime,o=n.unReadCount,i=void 0===o?0:o,s=n.unreadCountClearTimestamp;return t||(void 0===s?0:s)>r?i:i&&i>0?i-1:0},i=function(e){var t,n=0;if(0===e.length)return n;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n}},7360:function(e,t,n){"use strict";function r(){console.log&&(console.log.apply?console.log.apply(console,Array.prototype.slice.call(arguments)):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}n.d(t,{kg:function(){return E}}),n(1539),n(8674),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948),n(7042),n(2222),n(8309),n(9600),n(3843),n(3710),n(2564),n(285),n(1637),n(4812),n(9554),n(2772),n(4916);var o="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=n(4024);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var a,u=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},c=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},l=function(){},d={};!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(a||(a={}));var h=function(){function e(e,t,n){this.name=e||"defaultLogger",this.currentLevel=0,this.useCookiePersist=!1,this.storageLogLevelKey="loglevel",this.levels=a,this.consoleLogVisibility=!0,this.logMethods=["trace","debug","info","warn","error"],this.methodFactory=n||this.defaultMethodFactory,this.report=!1;var r=this._getPersistedLevel();null==r&&(r=null===t?"WARN":t),this.logs=[],this.reportLogs=[],this.reportInterval=3e5,this.timer=null,this.config={useCache:!1,maxCache:3145728,color:"",background:""},this.logBytes=0,this.setLevel(r,!1,"")}return e.prototype.reportLog=function(){var e,t,n;return u(this,void 0,void 0,(function(){var r,o,s,a,u,l,d,h;return c(this,(function(c){switch(c.label){case 0:if(0===(null===(e=this.reportLogs)||void 0===e?void 0:e.length))return[2];for(r=2097152,o=this.reportLogs.join("\n")+"\n",s=o.length,a=[];s>r;)a.push(o.substring(0,r)),s-=r,o=o.substring(r);a.push(o),u=0,l=a,c.label=1;case 1:if(!(u<l.length))return[3,8];if(d=l[u],this.reportLogs=[],!(null===(n=null===(t=this.connection)||void 0===t?void 0:t.context)||void 0===n?void 0:n.accessToken))return[2];c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.reportData(d)];case 3:return"ok"!==(null==(h=c.sent())?void 0:h.status)&&this.reportLogs.unshift(d),[3,5];case 4:return c.sent(),this.reportLogs.unshift(d),[3,5];case 5:return[4,i.P6.delay(3e3)];case 6:c.sent(),c.label=7;case 7:return u++,[3,1];case 8:return[2]}}))}))},e.prototype.reportData=function(e){var t,n=this;if(this.connection){var r=this.connection.context||{},o=r.orgName,s=r.appName,a=r.accessToken,u=r.userId,c={url:"".concat(null===(t=this.connection)||void 0===t?void 0:t.apiUrl,"/").concat(o,"/").concat(s,"/sdk/users/").concat(u,"/client/logs"),type:"POST",data:JSON.stringify({resource:this.connection.clientResource||"random_".concat(Date.now()),logContent:e}),dataType:"json",headers:{Authorization:"Bearer "+a,"Content-Type":"application/json"}};return i.hj.call(this.connection,c).then((function(e){return n.log("report log success",e),e})).catch((function(e){n.error("report log error",e)}))}this.error("report log error","connection is null")},e.prototype._regularlyReportLogs=function(){var e,t=this;this.timer&&clearInterval(this.timer),(null!==(e=this.reportInterval)&&void 0!==e?e:0)<6e4&&(this.reportInterval=6e4),this.timer=setInterval((function(){t.reportLog()}),this.reportInterval||3e5)},e.prototype._stopReportLogs=function(){return u(this,void 0,void 0,(function(){return c(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.reportLog()];case 1:return e.sent(),[3,3];case 2:return e.sent(),this.error("report log error when stopping upload"),[3,3];case 3:return this.reportLogs=[],clearInterval(this.timer),[2]}}))}))},e.prototype.setConfig=function(e){this.config=e},e.prototype.getLevel=function(){return this.currentLevel},e.prototype.setLevel=function(e,t,n){if("string"==typeof e&&(e=a[e]),void 0===e&&(e=0),!("number"==typeof e&&e>=0&&e<=this.levels.SILENT))throw Error("log.setLevel() called with invalid level: "+e);if(this.currentLevel=e,!1!==t&&this._persistLevel(e),this.replaceLoggingMethods(e,n||""),"undefined"==typeof console&&e<a.SILENT)throw Error("No console available for logging")},e.prototype.setDefaultLevel=function(e){this._getPersistedLevel()||this.setLevel(e,!1,"")},e.prototype.enableAll=function(e){this.setLevel(this.levels.TRACE,!0,"")},e.prototype.disableAll=function(e){this.setLevel(this.levels.SILENT,!0,"")},e.prototype.getLogs=function(){return this.logs},e.prototype.download=function(){if("undefined"!=typeof window&&"undefined"!=typeof document){var e=this.getLogs().join("\n"),t=new Blob([e],{type:"text/plain;charset=UTF-8"}),n=window.URL.createObjectURL(t),r=document.createElement("a");r.style.display="none",r.href=n,r.setAttribute("download","sdklog"),document.body.appendChild(r),r.click()}},e.prototype.setConsoleLogVisibility=function(e){this.consoleLogVisibility=e},e.prototype._bindMethod=function(e,t,n){var r=this,o=e[t],i=this.getTime();if(n)return this._cacheLog;if("function"==typeof o.bind)return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=r.getTime();r.consoleLogVisibility&&o.call.apply(o,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e,"".concat(s," IM SDK [").concat("log"===t?"debug":t,"]: ")],n,!1)),r.onLog&&r.onLog({time:s,level:"log"===t?"debug":t,logs:n}),r._cacheReportLogs.apply(r,n)};try{return Function.prototype.bind.call(o,e,"".concat(i," IM SDK [").concat("log"===t?"debug":t,"]: "))}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}},e.prototype.getTime=function(){var e=new Date;return e.toTimeString().split(" ")[0]+":"+e.getMilliseconds()},e.prototype._cacheLog=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(new Date).toLocaleString()+": ",r="";e.forEach((function(e){"object"===s(e)?r+=JSON.stringify(e)+" ":r+=e+" "})),this._cacheLogCall(n+r),this._cacheReportLogs.apply(this,e)},e.prototype._cacheLogCall=function(e){var t=e.length,n=this.logBytes+t,r=this.config.maxCache;if(!(t>=r)){if(n<r)this.logBytes+=t;else for(var o=n-r,i=0;i<o;){var s=this.logs.shift();void 0!==s&&(i+=s.length)}this.logs.push(e)}},e.prototype._cacheReportLogs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.report){var n=(new Date).toLocaleString()+": ",r="";e.forEach((function(e){"object"===s(e)?r+=JSON.stringify(e)+" ":r+=e+" "})),this.reportLogs.push(n+r)}},e.prototype._getPersistedLevel=function(){var e;if("undefined"==typeof window)return 5;if("undefined"===(e=window&&window.localStorage&&window.localStorage[this.storageLogLevelKey])){var t=window.document.cookie,n=t.indexOf(encodeURIComponent(this.storageLogLevelKey));-1!==n&&(e=/^([^;]+)/.exec(t.slice(n))[1])}return e||5},e.prototype._persistLevel=function(e){var t=this.logMethods[e]||"SILENT";"undefined"!=typeof window&&(window.localStorage&&(window.localStorage[this.storageLogLevelKey]=t),this.useCookiePersist&&(window.document.cookie=encodeURIComponent(this.storageLogLevelKey)+"="+t+";"))},e.prototype.replaceLoggingMethods=function(e,t){for(var n=this,r=0;r<this.logMethods.length;r++){var o=this.logMethods[r];this[o]=r<e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n.report&&n._cacheReportLogs.apply(n,e)}:this.methodFactory(o,e,t)}this.log=this.debug},e.prototype.defaultMethodFactory=function(e,t,n){return this.realMethod(e)||this.enableLoggingWhenConsoleArrives.apply(this,[e,t,n])},e.prototype.realMethod=function(e){return"debug"===e&&(e="log"),"undefined"!=typeof console&&("trace"===e&&o?r:void 0!==console[e]?this._bindMethod(console,e,this.config.useCache):void 0!==console.log?this._bindMethod(console,"log",this.config.useCache):l)},e.prototype.enableLoggingWhenConsoleArrives=function(e,t,n){return function(){"undefined"!=typeof console&&(this.replaceLoggingMethods.call(this,t,n),this[e].apply(this,arguments))}.bind(this)},e}(),f=new h;f.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");return this};var p="undefined"!=typeof window?window.log:void 0;f.noConflict=function(){return"undefined"!=typeof window&&window.log===f&&(window.log=p),f},f.getLoggers=function(){return d},f.initReport=function(e){var t=e.report,n=e.reportInterval,r=e.connection;f.report=t,f.reportInterval=n,f.connection=r,t&&f._regularlyReportLogs()};var E=f},2449:function(e,t,n){"use strict";n.r(t),n.d(t,{Message:function(){return v}});var r=n(4024),o=function(){function e(e){var t=e.id;this.id=t,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.id,type:"read",to:e.to,from:e.from||"",chatType:e.chatType}},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType,ackId:e.id,type:"read",to:e.to,from:e.from||"",ackContent:e.ackContent,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}(),i=function(){function e(e){this.id=e.id,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.ackId,type:"delivery",to:e.to,from:e.from||""}},e.create=function(e){return{id:r.P6.getUniqueId(),ackId:e.ackId,type:"delivery",to:e.to,from:e.from||"",isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}(),s=(n(3843),n(3710),function(){function e(e){var t=e.type,n=e.id;this.id=n,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"channel",to:e.to,from:e.from||"",time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),type:"channel",chatType:e.chatType||"singleChat",to:e.to,from:e.from||"",time:Date.now(),isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}()),a=(n(9753),function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t,this.value=""}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"txt",to:e.to,msg:e.msg,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),isChatThread:e.isChatThread},this.value=e.msg},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){var t,n;return(null===(t=e.msgConfig)||void 0===t?void 0:t.languages)&&Array.isArray(null===(n=e.msgConfig)||void 0===n?void 0:n.languages),{type:"txt",id:r.P6.getUniqueId(),msg:e.msg,to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}()),u=function(){function e(e){var t=e.type,n=e.id;this.id=n||r.P6.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"cmd",to:e.to,action:e.action,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),type:"cmd",to:e.to,from:e.from||"",chatType:e.chatType||"singleChat",action:e.action,time:Date.now(),ext:e.ext,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),c=function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),l=function(){function e(e){var t=e.type,n=e.id;this.id=n||r.P6.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),d=function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&r.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"img",file:e.file,width:e.width,height:e.height,to:e.to,from:e.from||"",roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType,type:"img",url:e.url,width:e.width,height:e.height,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,file_length:e.file_length,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,thumbnailWidth:e.thumbnailWidth,thumbnailHeight:e.thumbnailHeight}},e}(),h=function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&r.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"audio",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType,type:"audio",filename:e.filename,length:e.length,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,file_length:e.file_length,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),f=function(){function e(e){var t=e.type,n=e.id;this.id=n,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&r.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),apiUrl:e.apiUrl,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),p=function(){function e(e){var t=e.type,n=e.id;this.id=n,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&r.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:r.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,file_length:e.file_length,to:e.to,from:e.from||"",ext:e.ext,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList}},e}(),E=function(){function e(e){var t=e.type,n=e.id||r.P6.getUniqueId();this.id=n,this.type=t,this.value=""}return e.create=function(e){return{type:"combine",id:r.P6.getUniqueId(),to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,compatibleText:e.compatibleText,title:e.title,summary:e.summary,messageList:e.messageList,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete}},e}(),v=function(){function e(t,n){return this.type=t,this.id=n||r.P6.getUniqueId(),e.createOldMsg({type:t,id:this.id})}return e.createOldMsg=function(e){switch(e.type){case"read":return new o({type:"read",id:e.id});case"delivery":return new i({type:"delivery",id:e.id});case"channel":return new s({type:"channel",id:e.id});case"txt":return new a({type:"txt",id:e.id});case"cmd":return new u({type:"cmd",id:e.id});case"custom":return new c({type:"custom",id:e.id});case"loc":return new l({type:"loc",id:e.id});case"img":return new d({type:"img",id:e.id});case"audio":return new h({type:"audio",id:e.id});case"video":return new f({type:"video",id:e.id});case"file":return new p({type:"file",id:e.id})}},e.create=function(e){return"txt"!==(t=e).type||"version"in t?function(e){return"img"===e.type&&!("version"in e)}(e)?d.create(e):function(e){return"cmd"===e.type&&!("version"in e)}(e)?u.create(e):function(e){return"file"===e.type&&!("version"in e)}(e)?p.create(e):function(e){return"audio"===e.type&&!("version"in e)}(e)?h.create(e):function(e){return"video"===e.type&&!("version"in e)}(e)?f.create(e):function(e){return"custom"===e.type&&!("version"in e)}(e)?c.create(e):function(e){return"loc"===e.type&&!("version"in e)}(e)?l.create(e):function(e){return"channel"===e.type&&!("version"in e)}(e)?s.create(e):function(e){return"delivery"===e.type&&!("version"in e)}(e)?i.create(e):function(e){return"read"===e.type&&!("version"in e)}(e)?o.create(e):function(e){return"combine"===e.type&&!("version"in e)}(e)?E.create(e):{}:a.create(e);var t},e.prototype.set=function(e){},e.getFileUrl=r.P6.getFileUrl,e}()},5531:function(e,t,n){"use strict";var r;n.d(t,{E:function(){return r}}),function(e){e[e.REQUEST_SUCCESS=0]="REQUEST_SUCCESS",e[e.REQUEST_TIMEOUT=-1]="REQUEST_TIMEOUT",e[e.REQUEST_UNKNOWN=-2]="REQUEST_UNKNOWN",e[e.REQUEST_PARAMETER_ERROR=-3]="REQUEST_PARAMETER_ERROR",e[e.REQUEST_ABORT=-4]="REQUEST_ABORT",e[e.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR=0]="WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_OPEN_ERROR=1]="WEBIM_CONNCTION_OPEN_ERROR",e[e.WEBIM_CONNCTION_AUTH_ERROR=2]="WEBIM_CONNCTION_AUTH_ERROR",e[e.WEBIM_CONNCTION_OPEN_USERGRID_ERROR=3]="WEBIM_CONNCTION_OPEN_USERGRID_ERROR",e[e.WEBIM_CONNCTION_ATTACH_ERROR=4]="WEBIM_CONNCTION_ATTACH_ERROR",e[e.WEBIM_CONNCTION_ATTACH_USERGRID_ERROR=5]="WEBIM_CONNCTION_ATTACH_USERGRID_ERROR",e[e.WEBIM_CONNCTION_REOPEN_ERROR=6]="WEBIM_CONNCTION_REOPEN_ERROR",e[e.WEBIM_CONNCTION_SERVER_CLOSE_ERROR=7]="WEBIM_CONNCTION_SERVER_CLOSE_ERROR",e[e.WEBIM_CONNCTION_SERVER_ERROR=8]="WEBIM_CONNCTION_SERVER_ERROR",e[e.WEBIM_CONNCTION_IQ_ERROR=9]="WEBIM_CONNCTION_IQ_ERROR",e[e.WEBIM_CONNCTION_PING_ERROR=10]="WEBIM_CONNCTION_PING_ERROR",e[e.WEBIM_CONNCTION_NOTIFYVERSION_ERROR=11]="WEBIM_CONNCTION_NOTIFYVERSION_ERROR",e[e.WEBIM_CONNCTION_GETROSTER_ERROR=12]="WEBIM_CONNCTION_GETROSTER_ERROR",e[e.WEBIM_CONNCTION_CROSSDOMAIN_ERROR=13]="WEBIM_CONNCTION_CROSSDOMAIN_ERROR",e[e.WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES=14]="WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES",e[e.WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR=15]="WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR",e[e.WEBIM_CONNCTION_DISCONNECTED=16]="WEBIM_CONNCTION_DISCONNECTED",e[e.WEBIM_CONNCTION_AJAX_ERROR=17]="WEBIM_CONNCTION_AJAX_ERROR",e[e.WEBIM_CONNCTION_JOINROOM_ERROR=18]="WEBIM_CONNCTION_JOINROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOM_ERROR=19]="WEBIM_CONNCTION_GETROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOMINFO_ERROR=20]="WEBIM_CONNCTION_GETROOMINFO_ERROR",e[e.WEBIM_CONNCTION_GETROOMMEMBER_ERROR=21]="WEBIM_CONNCTION_GETROOMMEMBER_ERROR",e[e.WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR=22]="WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR",e[e.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR=23]="WEBIM_CONNCTION_LOAD_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR=24]="WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_JOINCHATROOM_ERROR=25]="WEBIM_CONNCTION_JOINCHATROOM_ERROR",e[e.WEBIM_CONNCTION_QUITCHATROOM_ERROR=26]="WEBIM_CONNCTION_QUITCHATROOM_ERROR",e[e.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR=27]="WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR=28]="WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR=29]="WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR=30]="WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_CALLBACK_INNER_ERROR=31]="WEBIM_CONNCTION_CALLBACK_INNER_ERROR",e[e.WEBIM_CONNCTION_CLIENT_OFFLINE=32]="WEBIM_CONNCTION_CLIENT_OFFLINE",e[e.WEBIM_CONNCTION_CLIENT_LOGOUT=33]="WEBIM_CONNCTION_CLIENT_LOGOUT",e[e.WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR=34]="WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR",e[e.WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP=35]="WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP=36]="WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_ACCEPT_JOIN_GROUP=37]="WEBIM_CONNECTION_ACCEPT_JOIN_GROUP",e[e.WEBIM_CONNECTION_DECLINE_JOIN_GROUP=38]="WEBIM_CONNECTION_DECLINE_JOIN_GROUP",e[e.WEBIM_CONNECTION_CLOSED=39]="WEBIM_CONNECTION_CLOSED",e[e.WEBIM_CONNECTION_ERROR=40]="WEBIM_CONNECTION_ERROR",e[e.MAX_LIMIT=50]="MAX_LIMIT",e[e.MESSAGE_NOT_FOUND=51]="MESSAGE_NOT_FOUND",e[e.NO_PERMISSION=52]="NO_PERMISSION",e[e.OPERATION_UNSUPPORTED=53]="OPERATION_UNSUPPORTED",e[e.OPERATION_NOT_ALLOWED=54]="OPERATION_NOT_ALLOWED",e[e.WEBIM_TOKEN_EXPIRED=56]="WEBIM_TOKEN_EXPIRED",e[e.WEBIM_SERVER_SERVING_DISABLED=57]="WEBIM_SERVER_SERVING_DISABLED",e[e.WEBIM_UPLOADFILE_BROWSER_ERROR=100]="WEBIM_UPLOADFILE_BROWSER_ERROR",e[e.WEBIM_UPLOADFILE_ERROR=101]="WEBIM_UPLOADFILE_ERROR",e[e.WEBIM_UPLOADFILE_NO_LOGIN=102]="WEBIM_UPLOADFILE_NO_LOGIN",e[e.WEBIM_UPLOADFILE_NO_FILE=103]="WEBIM_UPLOADFILE_NO_FILE",e[e.WEBIM_DOWNLOADFILE_ERROR=200]="WEBIM_DOWNLOADFILE_ERROR",e[e.WEBIM_DOWNLOADFILE_NO_LOGIN=201]="WEBIM_DOWNLOADFILE_NO_LOGIN",e[e.WEBIM_DOWNLOADFILE_BROWSER_ERROR=202]="WEBIM_DOWNLOADFILE_BROWSER_ERROR",e[e.PARSE_FILE_ERROR=203]="PARSE_FILE_ERROR",e[e.USER_NOT_FOUND=204]="USER_NOT_FOUND",e[e.MESSAGE_PARAMETER_ERROR=205]="MESSAGE_PARAMETER_ERROR",e[e.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE=206]="WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE",e[e.WEBIM_CONNCTION_USER_REMOVED=207]="WEBIM_CONNCTION_USER_REMOVED",e[e.WEBIM_USER_ALREADY_LOGIN=208]="WEBIM_USER_ALREADY_LOGIN",e[e.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD=216]="WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD",e[e.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE=217]="WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE",e[e.USER_MUTED_BY_ADMIN=219]="USER_MUTED_BY_ADMIN",e[e.USER_NOT_FRIEND=221]="USER_NOT_FRIEND",e[e.WEBIM_MESSAGE_REC_TEXT=300]="WEBIM_MESSAGE_REC_TEXT",e[e.WEBIM_MESSAGE_REC_TEXT_ERROR=301]="WEBIM_MESSAGE_REC_TEXT_ERROR",e[e.WEBIM_MESSAGE_REC_EMOTION=302]="WEBIM_MESSAGE_REC_EMOTION",e[e.WEBIM_MESSAGE_REC_PHOTO=303]="WEBIM_MESSAGE_REC_PHOTO",e[e.SERVER_GET_DNSLIST_FAILED=304]="SERVER_GET_DNSLIST_FAILED",e[e.WEBIM_MESSAGE_REC_AUDIO_FILE=305]="WEBIM_MESSAGE_REC_AUDIO_FILE",e[e.WEBIM_MESSAGE_REC_VEDIO=306]="WEBIM_MESSAGE_REC_VEDIO",e[e.WEBIM_MESSAGE_REC_VEDIO_FILE=307]="WEBIM_MESSAGE_REC_VEDIO_FILE",e[e.WEBIM_MESSAGE_REC_FILE=308]="WEBIM_MESSAGE_REC_FILE",e[e.WEBIM_MESSAGE_SED_TEXT=309]="WEBIM_MESSAGE_SED_TEXT",e[e.WEBIM_MESSAGE_SED_EMOTION=310]="WEBIM_MESSAGE_SED_EMOTION",e[e.WEBIM_MESSAGE_SED_PHOTO=311]="WEBIM_MESSAGE_SED_PHOTO",e[e.WEBIM_MESSAGE_SED_AUDIO=312]="WEBIM_MESSAGE_SED_AUDIO",e[e.WEBIM_MESSAGE_SED_AUDIO_FILE=313]="WEBIM_MESSAGE_SED_AUDIO_FILE",e[e.WEBIM_MESSAGE_SED_VEDIO=314]="WEBIM_MESSAGE_SED_VEDIO",e[e.WEBIM_MESSAGE_SED_VEDIO_FILE=315]="WEBIM_MESSAGE_SED_VEDIO_FILE",e[e.WEBIM_MESSAGE_SED_FILE=316]="WEBIM_MESSAGE_SED_FILE",e[e.WEBIM_MESSAGE_SED_ERROR=317]="WEBIM_MESSAGE_SED_ERROR",e[e.STATUS_INIT=400]="STATUS_INIT",e[e.STATUS_DOLOGIN_USERGRID=401]="STATUS_DOLOGIN_USERGRID",e[e.STATUS_DOLOGIN_IM=402]="STATUS_DOLOGIN_IM",e[e.STATUS_OPENED=403]="STATUS_OPENED",e[e.STATUS_CLOSING=404]="STATUS_CLOSING",e[e.STATUS_CLOSED=405]="STATUS_CLOSED",e[e.STATUS_ERROR=406]="STATUS_ERROR",e[e.SERVER_BUSY=500]="SERVER_BUSY",e[e.MESSAGE_INCLUDE_ILLEGAL_CONTENT=501]="MESSAGE_INCLUDE_ILLEGAL_CONTENT",e[e.MESSAGE_EXTERNAL_LOGIC_BLOCKED=502]="MESSAGE_EXTERNAL_LOGIC_BLOCKED",e[e.SERVER_UNKNOWN_ERROR=503]="SERVER_UNKNOWN_ERROR",e[e.MESSAGE_RECALL_TIME_LIMIT=504]="MESSAGE_RECALL_TIME_LIMIT",e[e.SERVICE_NOT_ENABLED=505]="SERVICE_NOT_ENABLED",e[e.SERVICE_NOT_ALLOW_MESSAGING=506]="SERVICE_NOT_ALLOW_MESSAGING",e[e.SERVICE_NOT_ALLOW_MESSAGING_MUTE=507]="SERVICE_NOT_ALLOW_MESSAGING_MUTE",e[e.MESSAGE_MODERATION_BLOCKED=508]="MESSAGE_MODERATION_BLOCKED",e[e.MESSAGE_CURRENT_LIMITING=509]="MESSAGE_CURRENT_LIMITING",e[e.MESSAGE_WEBSOCKET_DISCONNECTED=510]="MESSAGE_WEBSOCKET_DISCONNECTED",e[e.MESSAGE_SIZE_LIMIT=511]="MESSAGE_SIZE_LIMIT",e[e.MESSAGE_SEND_TIMEOUT=512]="MESSAGE_SEND_TIMEOUT",e[e.GROUP_NOT_EXIST=605]="GROUP_NOT_EXIST",e[e.GROUP_NOT_JOINED=602]="GROUP_NOT_JOINED",e[e.GROUP_MEMBERS_FULL=606]="GROUP_MEMBERS_FULL",e[e.PERMISSION_DENIED=603]="PERMISSION_DENIED",e[e.WEBIM_LOAD_MSG_ERROR=604]="WEBIM_LOAD_MSG_ERROR",e[e.GROUP_ALREADY_JOINED=601]="GROUP_ALREADY_JOINED",e[e.GROUP_MEMBERS_LIMIT=607]="GROUP_MEMBERS_LIMIT",e[e.GROUP_IS_DISABLED=608]="GROUP_IS_DISABLED",e[e.GROUP_MEMBER_ATTRIBUTES_SET_FAILED=609]="GROUP_MEMBER_ATTRIBUTES_SET_FAILED",e[e.REST_PARAMS_STATUS=700]="REST_PARAMS_STATUS",e[e.CHATROOM_NOT_JOINED=702]="CHATROOM_NOT_JOINED",e[e.CHATROOM_MEMBERS_FULL=704]="CHATROOM_MEMBERS_FULL",e[e.CHATROOM_NOT_EXIST=705]="CHATROOM_NOT_EXIST",e[e.LOCAL_DB_OPERATION_FAILED=800]="LOCAL_DB_OPERATION_FAILED",e[e.SDK_RUNTIME_ERROR=999]="SDK_RUNTIME_ERROR",e[e.PRESENCE_PARAM_EXCEED=1100]="PRESENCE_PARAM_EXCEED",e[e.REACTION_ALREADY_ADDED=1101]="REACTION_ALREADY_ADDED",e[e.REACTION_CREATING=1102]="REACTION_CREATING",e[e.REACTION_OPERATION_IS_ILLEGAL=1103]="REACTION_OPERATION_IS_ILLEGAL",e[e.TRANSLATION_NOT_VALID=1200]="TRANSLATION_NOT_VALID",e[e.TRANSLATION_TEXT_TOO_LONG=1201]="TRANSLATION_TEXT_TOO_LONG",e[e.TRANSLATION_FAILED=1204]="TRANSLATION_FAILED",e[e.THREAD_NOT_EXIST=1300]="THREAD_NOT_EXIST",e[e.THREAD_ALREADY_EXIST=1301]="THREAD_ALREADY_EXIST",e[e.MODIFY_MESSAGE_NOT_EXIST=1302]="MODIFY_MESSAGE_NOT_EXIST",e[e.MODIFY_MESSAGE_FORMAT_ERROR=1303]="MODIFY_MESSAGE_FORMAT_ERROR",e[e.MODIFY_MESSAGE_FAILED=1304]="MODIFY_MESSAGE_FAILED",e[e.CONVERSATION_NOT_EXIST=1400]="CONVERSATION_NOT_EXIST"}(r||(r={}))},4998:function(e,t,n){"use strict";var r;n.d(t,{a:function(){return r}}),n(7252),function(e){e[e.SYNC_INIT=0]="SYNC_INIT",e[e.SYNC_START=1]="SYNC_START",e[e.SYNC_FINISH=2]="SYNC_FINISH"}(r||(r={}))},9937:function(e,t,n){"use strict";var r;n.d(t,{Z:function(){return r}}),function(e){e[e.mark_0=0]="mark_0",e[e.mark_1=1]="mark_1",e[e.mark_2=2]="mark_2",e[e.mark_3=3]="mark_3",e[e.mark_4=4]="mark_4",e[e.mark_5=5]="mark_5",e[e.mark_6=6]="mark_6",e[e.mark_7=7]="mark_7",e[e.mark_8=8]="mark_8",e[e.mark_9=9]="mark_9",e[e.mark_10=10]="mark_10",e[e.mark_11=11]="mark_11",e[e.mark_12=12]="mark_12",e[e.mark_13=13]="mark_13",e[e.mark_14=14]="mark_14",e[e.mark_15=15]="mark_15",e[e.mark_16=16]="mark_16",e[e.mark_17=17]="mark_17",e[e.mark_18=18]="mark_18",e[e.mark_19=19]="mark_19"}(r||(r={}))},4024:function(e,t,n){"use strict";n.d(t,{PU:function(){return R},iw:function(){return b},hj:function(){return I},LR:function(){return x},Ki:function(){return N},Og:function(){return L},P4:function(){return M},cT:function(){return P},P6:function(){return H}}),n(9601),n(1539),n(8674),n(3710),n(7941),n(2564),n(6699),n(7042),n(2772),n(9714),n(9653),n(6992),n(8783),n(3948),n(285),n(1637),n(8309),n(4986),n(2222),n(4916);var r=n(5531),o=(n(2023),function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)}),i=function(e,t,n,i){var s,a,u,c,l,d,h,f,p,E,v,g,m,y,_,O,T,R,I,S,C,N,A,b,M=e.response;M&&"string"==typeof M&&(M=JSON.parse(M));var L=e.status,w={elapse:i,httpCode:L,errDesc:null==M?void 0:M.error_description};if(400===L){if(40002===M.error_code)return void t({type:r.E.THREAD_ALREADY_EXIST,message:null==M?void 0:M.error_description,extraInfo:w});if(40009===M.error_code)return void t({type:r.E.OPERATION_UNSUPPORTED,message:null==M?void 0:M.error_description,extraInfo:w});if(60005===M.error_code)return void t({type:r.E.GROUP_MEMBER_ATTRIBUTES_SET_FAILED,message:(null==M?void 0:M.desc)||(null==M?void 0:M.error_description),extraInfo:w});if(60010===M.error_code)return void((null==M?void 0:M.error_description.includes("exceeds chatgroup user metadata single value limit"))?t({type:r.E.MAX_LIMIT,message:(null==M?void 0:M.desc)||M.error_description,extraInfo:w}):t({type:r.E.NO_PERMISSION,message:(null==M?void 0:M.desc)||M.error_description,extraInfo:w}));if(60011===M.error_code)return void t({type:r.E.CHATROOM_NOT_JOINED,message:null==M?void 0:M.desc,extraInfo:w});if(14403===M.error_code)return void t({type:r.E.WEBIM_UPLOADFILE_ERROR,message:null==M?void 0:M.error_description,data:M,extraInfo:w});if(60006===M.error_code||60007===M.error_code||60009===M.error_code||60012===M.error_code)return void t({type:r.E.MAX_LIMIT,message:(null==M?void 0:M.desc)||(null==M?void 0:M.error_description),extraInfo:w});if(91104===M.error_code)return void t({type:r.E.NO_PERMISSION,message:null==M?void 0:M.error_description,extraInfo:w});if(null===(s=M.error_description)||void 0===s?void 0:s.includes("are not members of this group"))return(null===(a=e.responseURL)||void 0===a?void 0:a.includes("chatgroups"))?t({type:r.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):t({type:r.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:w}),void n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==M?void 0:M.error_description,data:e.responseText,extraInfo:w});if("the app not open presence"===(null==M?void 0:M.result))return void t({type:r.E.SERVICE_NOT_ENABLED,message:null==M?void 0:M.result,extraInfo:w});if(null==M?void 0:M.error_description.includes("remark length must less"))return void t({type:r.E.MAX_LIMIT,message:null==M?void 0:M.error_description,extraInfo:w});switch(null==M?void 0:M.error_description){case"the user is already operation this message":t({type:r.E.REACTION_ALREADY_ADDED,message:null==M?void 0:M.error_description,extraInfo:w});break;case"The quantity has exceeded the limit!":t({type:r.E.MAX_LIMIT,message:null==M?void 0:M.error_description,extraInfo:w});break;case"The user not in this group!":t({type:r.E.GROUP_NOT_JOINED,message:null==M?void 0:M.error_description,extraInfo:w});break;case"the user operation is illegal!":t({type:r.E.REACTION_OPERATION_IS_ILLEGAL,message:null==M?void 0:M.error_description,extraInfo:w});break;case"this appKey is not open reaction service!":case"this appKey not open message roaming":t({type:r.E.SERVICE_NOT_ENABLED,message:null==M?void 0:M.error_description,extraInfo:w});break;case"this message is creating reaction, please try again.":t({type:r.E.REACTION_CREATING,message:null==M?void 0:M.error_description,extraInfo:w});break;case"groupId can not be null!":t({type:r.E.GROUP_NOT_EXIST,message:null==M?void 0:M.error_description,extraInfo:w});break;case"The input text is too long.":t({type:r.E.TRANSLATION_TEXT_TOO_LONG,message:null==M?void 0:M.error_description,extraInfo:w});break;case"The target language is not valid.":t({type:r.E.TRANSLATION_NOT_VALID,message:null==M?void 0:M.error_description,extraInfo:w});break;case"report failed, get message by id failed":t({type:r.E.MESSAGE_NOT_FOUND,message:null==M?void 0:M.error_description,extraInfo:w});break;case"ext is too big ":t({type:r.E.PRESENCE_PARAM_EXCEED,message:null==M?void 0:M.error_description,extraInfo:w});break;case"Request body not readable.Please check content type is correct!":case"param mark must be not empty, please check!":case"param mark illegal, please check it!":case"param pin_msg_id illegal, please check it!":t({type:r.E.REQUEST_PARAMETER_ERROR,message:null==M?void 0:M.error_description,extraInfo:w});break;case"updateRemark | they are not friends, please add as a friend first.":t({type:r.E.USER_NOT_FRIEND,message:null==M?void 0:M.error_description,extraInfo:w});break;default:t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==M?void 0:M.error_description,data:e.responseText,extraInfo:w}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==M?void 0:M.error_description,data:e.responseText,extraInfo:w})}}else if(401===L)40001===M.error_code||60001===M.error_code||"Unable to authenticate (OAuth)"===M.error_description?t({type:r.E.NO_PERMISSION,message:null==M?void 0:M.error_description,extraInfo:w}):(n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:w}),t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:w}));else if(403===L)4e4===M.error_code||60004===M.error_code||15002===M.error_code?t({type:r.E.SERVICE_NOT_ENABLED,message:null==M?void 0:M.error_description,extraInfo:w}):40003===M.error_code||40004===M.error_code?t({type:r.E.THREAD_ALREADY_EXIST,message:null==M?void 0:M.error_description,extraInfo:w}):40005===M.error_code||40007===M.error_code||91002===M.error_code?t({type:r.E.MAX_LIMIT,message:null==M?void 0:M.error_description,extraInfo:w}):60002===M.error_code?t({type:r.E.PERMISSION_DENIED,message:null==M?void 0:M.error_description,extraInfo:w}):91101===M.error_code?t({type:r.E.MAX_LIMIT,message:null==M?void 0:M.error_description,extraInfo:w}):91102===M.error_code&&t({type:r.E.REQUEST_PARAMETER_ERROR,message:M.error_description,extraInfo:w}),"group member list is full!"===M.error_description?(null===(u=e.responseURL)||void 0===u?void 0:u.includes("chatgroups"))?t({type:r.E.GROUP_MEMBERS_FULL,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):t({type:r.E.CHATROOM_MEMBERS_FULL,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):(null===(c=M.error_description)||void 0===c?void 0:c.includes(M.error_description.includes("already in group")))?(null===(l=e.responseURL)||void 0===l?void 0:l.includes("chatgroups"))&&t({type:r.E.GROUP_ALREADY_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):(null===(d=M.error_description)||void 0===d?void 0:d.includes("are not members of this group"))?(null===(h=e.responseURL)||void 0===h?void 0:h.includes("chatgroups"))?t({type:r.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):t({type:r.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):(null===(f=M.error_description)||void 0===f?void 0:f.includes("service not open!"))||(null===(p=M.error_description)||void 0===p?void 0:p.includes("message report not open"))||(null===(E=M.error_description)||void 0===E?void 0:E.includes("messageroaming function not open"))?t({type:r.E.SERVICE_NOT_ENABLED,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):(null===(v=M.error_description)||void 0===v?void 0:v.includes("members size is greater than max user size !"))?t({type:r.E.GROUP_MEMBERS_LIMIT,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):(null===(g=M.error_description)||void 0===g?void 0:g.includes("can not operate this group, reason: group is disabled"))?t({type:r.E.GROUP_IS_DISABLED,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):(null===(m=M.error_description)||void 0===m?void 0:m.includes("Invitee's contact max count"))||(null===(y=M.error_description)||void 0===y?void 0:y.includes("Inviter's contact max count"))?t({type:r.E.MAX_LIMIT,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):t({type:r.E.PERMISSION_DENIED,data:e.response||e.responseText,message:"permission denied",extraInfo:o(o({},w),{errDesc:"permission denied"})}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:w});else if(404===L)40011===M.error_code?t({type:r.E.THREAD_NOT_EXIST,message:null==M?void 0:M.error_description,extraInfo:w}):40012===M.error_code?t({type:r.E.NO_PERMISSION,message:null==M?void 0:M.error_description,extraInfo:w}):60003===M.error_code||20004===M.error_code?t({type:r.E.GROUP_NOT_JOINED,message:null==M?void 0:M.error_description,extraInfo:w}):91001===M.error_code&&t({type:r.E.CONVERSATION_NOT_EXIST,message:null==M?void 0:M.error_description,extraInfo:w}),(null===(_=M.error_description)||void 0===_?void 0:_.includes("do not find this group"))||(null===(O=M.error_description)||void 0===O?void 0:O.includes("does not exist"))?(null===(T=e.responseURL)||void 0===T?void 0:T.includes("chatgroups"))?t({type:r.E.GROUP_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:o(o({},w),{errDesc:"The chat room dose not exist."})}):t({type:r.E.CHATROOM_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:o(o({},w),{errDesc:"The chat room dose not exist."})}):(null===(R=M.error_description)||void 0===R?void 0:R.includes("username"))&&(null===(I=M.error_description)||void 0===I?void 0:I.includes("doesn't exist!'"))||(null===(S=M.error_description)||void 0===S?void 0:S.includes("user not found"))||(null===(C=M.error_description)||void 0===C?void 0:C.includes("Service resource not found"))&&"UserNotFoundException"===(null==M?void 0:M.exception)?t({type:r.E.USER_NOT_FOUND,data:e.response||e.responseText,message:M.error_description,extraInfo:w}):M.error_description.includes("user session pin message not exist")?t({type:r.E.MESSAGE_NOT_FOUND,message:M.error_description,extraInfo:w}):t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:w}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:w});else if(406===L)90004===M.error_code&&t({type:r.E.OPERATION_NOT_ALLOWED,message:null==M?void 0:M.error_description,extraInfo:w});else if(429===L||503===L){if(null===(N=M.error_description)||void 0===N?void 0:N.includes("The request has reached the maximum limit"))return void t({type:r.E.MAX_LIMIT,message:e.responseText,extraInfo:w});if(null===(A=M.error_description)||void 0===A?void 0:A.includes("upload client logs reached limit"))return void t({type:r.E.MAX_LIMIT,message:e.responseText});t({type:r.E.SERVER_BUSY,data:e.response||e.responseText,message:"Server is busy.",extraInfo:o(o({},w),{errDesc:"Server is busy."})}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"Server is busy.",extraInfo:o(o({},w),{errDesc:"Server is busy."})})}else if(500===L){if(40006===M.error_code||40008===M.error_code||40010===M.error_code)return void t({type:r.E.SERVER_UNKNOWN_ERROR,message:null==M?void 0:M.error_description,extraInfo:w});if(90005===M.error_code||99999===M.error_code)return void t({type:r.E.REQUEST_UNKNOWN,message:null==M?void 0:M.error_description,extraInfo:w});if(null===(b=M.error_description)||void 0===b?void 0:b.includes("translte failed!"))return void t({type:r.E.TRANSLATION_FAILED,message:e.responseText,extraInfo:w});t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:w}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:w})}else t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:o(o({},w),{errDesc:"ajax error"})}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:o(o({},w),{errDesc:"ajax error"})})},s=n(1595),a=n(2071),u=n(7360),c=5242880,l=5242880,d={size:0},h=(n(2526),n(1817),n(2165),n(5827),n(4553),n(561),n(4319)),f=function(){return f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)};function p(){var e=this.context,t=e.orgName,n=e.appName,r=e.accessToken,o={url:"".concat(this.apiUrl,"/").concat(t,"/").concat(n,"/sdk/chatfiles/part-upload"),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+r}};return u.kg.debug("Call multipartInit"),I.call(this,o,s.fI.SDK_INTERNAL).then((function(e){var t=e.entities[0];return{data:{fileMaxSize:t.file_upper_limit,partMinSize:t.part_lower_limit,uuid:t.uuid},extraInfo:e.extraInfo,type:e.type}}))}function E(e){var t=this;return new Promise((function(n,o){var i,s,a=(new Date).getTime(),c=t.context,l=c.orgName,d=c.appName,p=c.accessToken,E=e.uuid,v=e.partNumber,g=e.part,m=e.onProgress,y="".concat(t.apiUrl,"/").concat(l,"/").concat(d,"/sdk/chatfiles/part-upload/").concat(E),_=new XMLHttpRequest;u.kg.debug("Call multipartUpload"),_.upload&&(null===(s=(i=_.upload).addEventListener)||void 0===s||s.call(i,"progress",(function(e){null==m||m(e)}),!1)),_.addEventListener("abort",(function(){o({type:r.E.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:_,extraInfo:{elapse:(new Date).getTime()-a,httpCode:_.status||-1,errDesc:"Request Abort",url:y}})}),!1),_.addEventListener("error",(function(){o({type:r.E.WEBIM_UPLOADFILE_ERROR,data:_,extraInfo:{elapse:(new Date).getTime()-a,httpCode:_.status||-1,errDesc:"request error",url:y}})}),!1),_.addEventListener("load",(function(){try{var e=JSON.parse(_.responseText);if(200!==_.status)return o({type:r.E.WEBIM_UPLOADFILE_ERROR,data:e,extraInfo:{elapse:(new Date).getTime()-a,httpCode:_.status||-1,errDesc:"part upload failed",url:y}}),!1;try{n(f(f({},e),{extraInfo:{elapse:(new Date).getTime()-a,httpCode:_.status||-1,url:y}}))}catch(e){o({type:r.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:e,extraInfo:{elapse:(new Date).getTime()-a,httpCode:_.status||-1,errDesc:"part upload failed",url:y}})}}catch(e){o({type:r.E.WEBIM_UPLOADFILE_ERROR,data:_.responseText,extraInfo:{elapse:(new Date).getTime()-a,httpCode:_.status||-1,errDesc:"part upload failed",url:y}})}}),!1),_.addEventListener("timeout",(function(){o({type:r.E.REQUEST_TIMEOUT,message:"request timeout",extraInfo:{elapse:(new Date).getTime()-a,httpCode:_.status||-1,errDesc:"request timeout",url:y}})}),!1);var O=new FormData;O.append("part_file",g),O.append("part_number",v),_.timeout=h.zj,_.open("PUT",y),_.setRequestHeader("restrict-access","true"),_.setRequestHeader("Accept","*/*"),_.setRequestHeader("Authorization","Bearer "+p),_.send(O)}))}function v(e){var t=e.uuid,n=e.thumbnailHeight,r=e.thumbnailWidth,o=this.context,i=o.orgName,a=o.appName,c=o.accessToken,l="".concat(this.apiUrl,"/").concat(i,"/").concat(a,"/sdk/chatfiles/part-upload/").concat(t,"?restrict-access=true");r&&(l+="&thumbnail-width=".concat(r)),n&&(l+="&thumbnail-height=".concat(n));var d={url:l,dataType:"json",type:"POST",headers:{Authorization:"Bearer "+c}};return u.kg.debug("Call multipartComplete"),I.call(this,d,s.fI.SDK_INTERNAL)}function g(e){var t=e.uuid,n=this.context,r=n.orgName,o=n.appName,i=n.accessToken,a={url:"".concat(this.apiUrl,"/").concat(r,"/").concat(o,"/sdk/chatfiles/part-upload/").concat(t),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+i}};return u.kg.debug("Call multipartAbort"),I.call(this,a,s.fI.SDK_INTERNAL)}var m=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},y=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},_=function(){function e(e,t){var n=this;this.handleUploadProgress=function(e,t){var r,o;if(e.total){n.progressArr[t]=e.loaded;var i=n.progressArr.reduce((function(e,t){return e+t}),0);null===(o=(r=n.options).onFileUploadProgress)||void 0===o||o.call(r,{isTrusted:e.isTrusted,type:e.type,loaded:i>n.file.size?n.file.size:i,total:n.file.size,lengthComputable:e.lengthComputable})}},this.uuid="",this.pool=[],this.progressArr=[],this.connection=e,this.options=t,this.partSize=c,this.file=t.file,this.init(),this.rpt=this.connection.dataReport.geOperateFun({operationName:s.fI.REST_UPLOAD_FILE_IN_PARTS})}return e.prototype.init=function(){var e,t,n,o;return m(this,void 0,void 0,(function(){var i,a,l,h,f,E,v,g,m,_,O,T,R,I,S;return y(this,(function(y){switch(y.label){case 0:return y.trys.push([0,4,,6]),[4,p.call(this.connection)];case 1:return i=y.sent(),a=i.data||{},l=a.fileMaxSize,h=void 0===l?0:l,f=a.partMinSize,E=void 0===f?c:f,v=a.uuid,g=void 0===v?"":v,m=i.extraInfo,T=m.elapse,R=m.httpCode,S=m.url,this.partSize=E,this.uuid=g,d.size=E,u.kg.debug("multipartInit success","uuid: ".concat(g),"fileMaxSize: ".concat(h),"partMinSize: ".concat(E)),this.file.size>h?[4,this.multipartAbort()]:[3,3];case 2:return y.sent(),null===(t=(e=this.options).onFileUploadError)||void 0===t||t.call(e,{code:r.E.WEBIM_UPLOADFILE_ERROR,message:"The file size exceeds the maximum limit"}),[2];case 3:return this.rpt({data:{requestUrl:S,requestName:s.c.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:T,requestMethod:"POST",isSuccess:1,code:R}}),this.upload(),[3,6];case 4:return _=y.sent(),O=(null==_?void 0:_.extraInfo)||{},T=O.elapse,R=O.httpCode,I=O.errDesc,S=O.url,this.rpt({data:{requestUrl:S,requestName:s.c.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:T,requestMethod:"POST",isSuccess:0,codeDesc:I,code:R}}),[4,this.multipartAbort()];case 5:return y.sent(),null===(o=null===(n=this.options)||void 0===n?void 0:n.onInitFail)||void 0===o||o.call(n),[3,6];case 6:return[2]}}))}))},e.prototype.upload=function(){var e,t,n;return m(this,void 0,void 0,(function(){var r,o,i,a,u,c,l=this;return y(this,(function(d){switch(d.label){case 0:(new FileReader).readAsArrayBuffer(this.file),r=this.file.size,o=Math.ceil(r/this.partSize),d.label=1;case 1:d.trys.push([1,7,,9]),i=function(t){var n,o,i,u;return y(this,(function(c){switch(c.label){case 0:return n=t*a.partSize,o=Math.min(r,n+a.partSize),i=null===(e=a.file)||void 0===e?void 0:e.slice(n,o),(u=E.call(a.connection,{uuid:a.uuid,partNumber:"".concat(t+1),part:i,onProgress:function(e){l.handleUploadProgress(e,t)}})).then((function(e){var t=(null==e?void 0:e.extraInfo)||{},n=t.elapse,r=t.httpCode,o=t.url;l.rpt({data:{requestUrl:o,requestName:s.c.REST_UPLOAD_PART,requestElapse:n,isSuccess:1,requestMethod:"PUT",code:r}}),l.handleTask(u)})),u.catch((function(e){var t=(null==e?void 0:e.extraInfo)||{},n=t.elapse,r=t.httpCode,o=t.url,i=t.errDesc;l.rpt({data:{requestUrl:o,requestName:s.c.REST_UPLOAD_PART,requestElapse:n,isSuccess:0,requestMethod:"PUT",code:r,codeDesc:i}}),delete e.extraInfo})),a.pool.push(u),4!==a.pool.length?[3,2]:[4,Promise.race(a.pool)];case 1:c.sent(),c.label=2;case 2:return[2]}}))},a=this,u=0,d.label=2;case 2:return u<o?[5,i(u)]:[3,5];case 3:d.sent(),d.label=4;case 4:return u++,[3,2];case 5:return[4,Promise.all(this.pool)];case 6:return d.sent(),this.multipartComplete(),[3,9];case 7:return c=d.sent(),[4,this.multipartAbort()];case 8:return d.sent(),this.rpt({data:{isLastApi:1,isSuccess:0}}),null===(n=(t=this.options).onFileUploadError)||void 0===n||n.call(t,c),[3,9];case 9:return[2]}}))}))},e.prototype.multipartComplete=function(){var e,t,n,r;return m(this,void 0,void 0,(function(){var o,i,a,u,c,l,d,h,f,p,E;return y(this,(function(g){switch(g.label){case 0:return g.trys.push([0,2,,3]),o=this.options.thumbnailInfo||{},i=o.width,a=o.height,[4,v.call(this.connection,{uuid:this.uuid,thumbnailHeight:a,thumbnailWidth:i})];case 1:return u=g.sent(),c=(null==u?void 0:u.extraInfo)||{},h=c.elapse,f=c.httpCode,E=c.url,this.rpt({data:{requestUrl:E,requestName:s.c.REST_COMPLETE_UPLOAD_PART,requestElapse:h,requestMethod:"POST",isSuccess:1,code:f}}),this.rpt({data:{isLastApi:1,isSuccess:1}}),null===(t=(e=this.options).onFileUploadComplete)||void 0===t||t.call(e,u),[3,3];case 2:return l=g.sent(),d=(null==l?void 0:l.extraInfo)||{},h=d.elapse,f=d.httpCode,p=d.errDesc,E=d.url,this.rpt({data:{requestUrl:E,requestName:s.c.REST_COMPLETE_UPLOAD_PART,requestElapse:h,requestMethod:"POST",isSuccess:0,codeDesc:p,code:f}}),this.rpt({data:{isLastApi:1,isSuccess:0}}),null===(r=(n=this.options).onFileUploadError)||void 0===r||r.call(n,l),[3,3];case 3:return[2]}}))}))},e.prototype.multipartAbort=function(){return m(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,u;return y(this,(function(c){switch(c.label){case 0:if(!this.uuid)return[2];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,g.call(this.connection,{uuid:this.uuid})];case 2:return e=c.sent(),t=(null==e?void 0:e.extraInfo)||{},o=t.elapse,i=t.httpCode,u=t.url,this.rpt({data:{requestUrl:u,requestName:s.c.REST_ABORT_UPLOAD_PART,requestElapse:o,requestMethod:"DELETE",isSuccess:1,code:i}}),[3,4];case 3:return n=c.sent(),r=(null==n?void 0:n.extraInfo)||{},o=r.elapse,i=r.httpCode,a=r.errDesc,u=r.url,this.rpt({data:{requestUrl:u,requestName:s.c.REST_ABORT_UPLOAD_PART,requestElapse:o,requestMethod:"DELETE",isSuccess:0,codeDesc:a,code:i}}),[3,4];case 4:return[2]}}))}))},e.prototype.handleTask=function(e){var t=this.pool.findIndex((function(t){return t===e}));this.pool.splice(t,1)},e}(),O=function(e){var t,n,o=this,i=(new Date).getTime(),a=e.apiUrl,u=e.orgName,c=e.appName,l=e.operateName,d=e.accessToken,f=e.uploadUrl||"".concat(a,"/").concat(u,"/").concat(c,"/chatfiles"),p=function(t){var n=(new Date).getTime()-i;o.dataReport&&l&&[s.fI.UPLOAD_MSG_ATTACH,s.fI.UPLOAD_CHATROOM_FILE,s.fI.UPLOAD_GROUP_FILE].includes(l)&&o.dataReport.geOperateFun({operationName:l})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:l,requestElapse:n,requestUrl:f,code:(null==v?void 0:v.status)||0,codeDesc:"upload file error"}}),e.onFileUploadError&&e.onFileUploadError(t)};function E(e){p({type:r.E.WEBIM_UPLOADFILE_ERROR,data:v})}var v=new XMLHttpRequest;v.upload&&(null===(n=(t=v.upload).addEventListener)||void 0===n||n.call(t,"progress",e.onFileUploadProgress||R,!1)),v.addEventListener("abort",e.onFileUploadCanceled||R,!1),v.addEventListener("error",E,!1),v.addEventListener("load",(function(t){try{var n=JSON.parse(v.responseText);if(400===v.status)return p({type:r.E.WEBIM_UPLOADFILE_ERROR,data:n}),!1;try{!function(t){var n=(new Date).getTime()-i;o.dataReport&&l&&[s.fI.UPLOAD_MSG_ATTACH,s.fI.UPLOAD_CHATROOM_FILE,s.fI.UPLOAD_GROUP_FILE].includes(l)&&o.dataReport.geOperateFun({operationName:l})({isEndApi:!0,data:{isSuccess:(null==t?void 0:t.error)?0:1,requestMethod:"POST",requestName:l,requestElapse:n,requestUrl:f,code:v.status,codeDesc:(null==t?void 0:t.error_description)||""}}),e.onFileUploadComplete&&e.onFileUploadComplete(t)}(n)}catch(t){p({type:r.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:t})}}catch(t){p({type:r.E.WEBIM_UPLOADFILE_ERROR,data:v.responseText})}}),!1),v.addEventListener("timeout",E,!1),v.timeout=h.zj,v.open("POST",f),v.setRequestHeader("restrict-access","true"),v.setRequestHeader("Accept","*/*"),v.setRequestHeader("Authorization","Bearer "+d);var g=new FormData;g.append("file",e.file.data),e.thumbnailWidth&&g.append("thumbnail-width",e.thumbnailWidth+""),e.thumbnailHeight&&g.append("thumbnail-height",e.thumbnailHeight+""),v.send(g)},T=function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},T.apply(this,arguments)},R=function(){};function I(e,t){var n,o=this;return w().platform===b.WEB?new Promise((function(t,o){var s=e.dataType||"text",a=e.success||R,c=e.error||R,l=new XMLHttpRequest;l.timeout=h.Gf;var d=!1;l.ontimeout=function(){u.kg.warn("request timeout"),d=!0;var e={type:r.E.REQUEST_TIMEOUT,message:"Request Timeout",errorType:"timeout_error",xhr:l};c(e),o(e)},l.onerror=function(){o({type:r.E.REQUEST_UNKNOWN,message:"Request Unknow Error",errorType:"onerror",xhr:l})},l.onabort=function(){o({type:r.E.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:l})},l.onreadystatechange=function(){if(4===l.readyState){var e=(new Date).getTime()-n,h=l.status||0,f={elapse:e,httpCode:h};if(200===h){H.ajaxUnconventionalErrorTimes=0;try{switch(s){case"text":return a(l.responseText),void t(l.responseText);case"json":var p=JSON.parse(l.responseText);return p.extraInfo=f,a(p),void t(p);case"xml":return l.responseXML&&l.responseXML.documentElement?(a(l.responseXML.documentElement),void t(l.responseXML.documentElement)):(c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}),void o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}));default:c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Invalid dataType"}),o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Invalid dataType"})}return t(l.response||l.responseText),void a(l.response||l.responseText,l)}catch(e){o(e)}return}0===h?setTimeout((function(){u.kg.debug("request timeout:",d),!d&&i(l,o,c,e)}),0):([400,401,403,404,429,500,503].includes(h)||(u.kg.debug("rest api request fail status:",h),H.ajaxUnconventionalErrorTimes++),i(l,o,c,e))}0===l.readyState&&(c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Request not initialized"}),o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Request not initialized"}))},e.responseType&&l.responseType&&(l.responseType=e.responseType),e.mimeType&&l.overrideMimeType(e.mimeType);var f=e.type||"POST",p=e.data||null,E="";if("get"===f.toLowerCase()&&p){for(var v in p)p.hasOwnProperty(v)&&(E+=v+"="+p[v]+"&");E=E?E.slice(0,-1):E,e.url+=(e.url.indexOf("?")>0?"&":"?")+(E?E+"&":E)+"_v="+(new Date).getTime(),p=null,E=""}n=(new Date).getTime(),l.open(f,e.url);var g=e.headers||{};for(var m in g["Content-Type"]||(g["Content-Type"]="application/json"),g)g.hasOwnProperty(m)&&l.setRequestHeader(m,g[m]);l.send(p)})).then((function(n){return o.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&o.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:T({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},D(n.extraInfo))}),t===s.fI.SDK_INTERNAL&&(n.extraInfo.url=e.url),t!==s.fI.SDK_INTERNAL&&delete n.extraInfo,"Object"===S(n)?T(T({},n),{type:r.E.REQUEST_SUCCESS}):{data:n,type:r.E.REQUEST_SUCCESS}})).catch((function(r){var i,a;if(o.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&o.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:T({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},D(r.extraInfo))}),t===s.fI.SDK_INTERNAL)if(r.extraInfo)r.extraInfo.url=e.url;else{var u={elapse:(new Date).getTime()-n,httpCode:null!==(a=null===(i=r.xhr)||void 0===i?void 0:i.status)&&void 0!==a?a:0,url:e.url};r.extraInfo=u}throw t!==s.fI.SDK_INTERNAL&&delete r.extraInfo,r})):C.call(this,e,t)}function S(e){return Object.prototype.toString.call(e).slice(8,-1)}function C(e,t){var n=this;return new Promise((function(n,o){var i=e.success||R,s=e.error||R,c=e.type||"POST",l=e.data||null,d="",f=(new Date).getTime(),p=H.getEnvInfo();if("get"===c.toLowerCase()&&l){for(var E in l)l.hasOwnProperty(E)&&(d+=E+"="+l[E]+"&");d=d?d.slice(0,-1):d,e.url+=(e.url.indexOf("?")>0?"&":"?")+(d?d+"&":d)+"_v="+(new Date).getTime(),l=null,d=""}var v={url:e.url,data:e.data,method:c,headers:{},timeout:h.Gf,success:function(e){var r,a,c,l,d,h={elapse:(new Date).getTime()-f,httpCode:Number((null===(r=e.statusCode)||void 0===r?void 0:r.toString())||(null===(a=e.status)||void 0===a?void 0:a.toString())),errDesc:(null===(c=null==e?void 0:e.data)||void 0===c?void 0:c.error_description)||""};if("200"===(null===(l=e.statusCode)||void 0===l?void 0:l.toString())||"200"===(null===(d=e.status)||void 0===d?void 0:d.toString())){e.data.extraInfo=h;var p=e.data;i(p),n(p)}else e.extraInfo=h,s(p=e),o(p),u.kg.debug(t,"reject reason: ",p)},complete:function(){},fail:function(e){var n={elapse:(new Date).getTime()-f,httpCode:a.Tp,errDesc:"request:fail"};if(e.extraInfo=n,e.data={error:"request:fail",error_description:"request:fail"},"request:fail timeout"===e.errMsg)return o({type:r.E.REQUEST_TIMEOUT,message:"Request Timeout",extraInfo:n}),void s({type:r.E.REQUEST_TIMEOUT,message:"Request Timeout",extraInfo:n});s(e),o(e),u.kg.error(t,"fail reason:",e)}};if("zfb"===p.platform||"dd"===p.platform?v.headers=e.headers:v.header=e.headers,"dd"===p.platform)return dd.httpRequest(v);p.global.request(v)})).then((function(o){return n.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&n.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:T({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},D(o.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete o.extraInfo,"Object"===S(o)?T(T({},o),{type:r.E.REQUEST_SUCCESS}):{data:o,type:r.E.REQUEST_SUCCESS}})).catch((function(r){throw n.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&n.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:T({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},D(r.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete r.extraInfo,r}))}function N(){this.autoIncrement?this.autoIncrement++:this.autoIncrement=1;var e=new Date,t=new Date(2010,1,1);return(e.getTime()-t.getTime()+this.autoIncrement).toString()}function A(e,t){var n;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(!e)return n;n=t?e.apply(t,r):e.apply(void 0,r),e=null}}var b,M=A((function(e,t){var n=w();if(n.platform!==b.WEB){var r=n.global,o=function(n){n.isConnected?e():t()};r.offNetworkStatusChange&&r.offNetworkStatusChange(o),r.onNetworkStatusChange&&r.onNetworkStatusChange(o)}else"undefined"!=typeof addEventListener&&(window.addEventListener("online",e),window.addEventListener("offline",t))})),L=A((function(e,t){var n,r,o=w();if(o.platform===b.WEB)document&&document.addEventListener("visibilitychange",(function(){document.hidden?null==t||t():null==e||e()}),!1);else{var i=o.global;i.onAppShow&&(null===(n=i.onAppShow)||void 0===n||n.call(i,e)),i.onAppHide&&(null===(r=i.onAppHide)||void 0===r||r.call(i,t))}}));function w(){return"undefined"!=typeof swan&&U(swan)?{platform:b.BAIDU,global:swan}:"undefined"!=typeof tt&&U(tt)?{platform:b.TT,global:tt}:"undefined"!=typeof dd&&U(dd)?{platform:b.DD,global:dd}:"undefined"!=typeof my&&U(my)?{platform:b.ZFB,global:my}:"undefined"!=typeof wx&&U(wx)?{platform:b.WX,global:wx}:"undefined"!=typeof qq&&U(qq)?{platform:b.QQ,global:qq}:"undefined"!=typeof uni&&U(uni)?{platform:b.UNI,global:uni}:"undefined"!=typeof window&&window.WebSocket?{platform:b.WEB,global:window}:{platform:b.NODE,global:n.g||{}}}function U(e){for(var t=["canIUse","getSystemInfo"],n=0,r=t.length;n<r;n++)if(!e[t[n]])return!1;return!0}function P(e,t){var n,o,i,s=this,a=e.accessToken,u=e.appKey,c=null===(o=null===(n=null==e?void 0:e.file)||void 0===n?void 0:n.data)||void 0===o?void 0:o.size,h=[],f="",p="";if(a)if(u&&(h=u.split("#"),f=h[0],p=h[1]),f||p)if(c<=0)e.onFileUploadError&&e.onFileUploadError({type:r.E.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"});else if(e.uploadUrl)O.call(this,T(T({},e),{orgName:f,appName:p,operateName:t}));else{var E=d.size||l;this.uploadPartEnable&&c>1.5*E?new _(this,{file:null===(i=null==e?void 0:e.file)||void 0===i?void 0:i.data,onFileUploadProgress:e.onFileUploadProgress||R,onFileUploadComplete:e.onFileUploadComplete||R,onFileUploadError:e.onFileUploadError||R,onFileUploadCanceled:e.onFileUploadCanceled||R,onInitFail:function(){O.call(s,T(T({},e),{orgName:f,appName:p,operateName:t}))},thumbnailInfo:{width:e.thumbnailWidth,height:e.thumbnailHeight}}):O.call(this,T(T({},e),{orgName:f,appName:p,operateName:t}))}else e.onFileUploadError&&e.onFileUploadError({type:r.E.WEBIM_UPLOADFILE_ERROR,message:"AppKey illegal"});else e.onFileUploadError&&e.onFileUploadError({type:r.E.WEBIM_UPLOADFILE_NO_LOGIN,message:"AccessToken cannot be empty"})}function x(e,t){e.onFileDownloadComplete=e.onFileDownloadComplete||R,e.onFileDownloadError=e.onFileDownloadError||R;var n=(new Date).getTime(),o=new XMLHttpRequest,i=this;o.addEventListener("load",(function(r){var a=(new Date).getTime()-n;i.dataReport&&t&&t===s.fI.DOWN_GROUP_FILE&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:200===o.status?1:0,requestMethod:"POST",requestName:t,requestElapse:a,requestUrl:null==e?void 0:e.url,code:o.status,codeDesc:200===o.status?"":"download file error"}}),e.onFileDownloadComplete&&e.onFileDownloadComplete(o.response)}),!1),o.addEventListener("error",(function(a){var u=(new Date).getTime()-n;i.dataReport&&t&&t===s.fI.DOWN_GROUP_FILE&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:t,requestElapse:u,requestUrl:null==e?void 0:e.url,code:(null==o?void 0:o.status)||0,codeDesc:"download file error"}}),e.onFileDownloadError&&e.onFileDownloadError({type:r.E.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:o})}),!1);var a=e.method||"GET",u=e.responseType||"blob",c=e.mimeType||"text/plain; charset=x-user-defined";o.open(a,e.url),"undefined"!=typeof Blob?o.responseType=u:o.overrideMimeType(c);var l={"X-Requested-With":"XMLHttpRequest",Accept:"application/octet-stream","share-secret":e.secret,Authorization:"Bearer "+this.context.accessToken},d=e.headers||{};for(var h in d)l[h]=d[h];for(var h in l)l[h]&&o.setRequestHeader(h,l[h]);o.send(null)}function D(e){void 0===e&&(e={});var t=e.elapse,n=void 0===t?0:t,r=e.httpCode,o=void 0===r?0:r,i=e.errDesc;return{requestElapse:n,code:o,codeDesc:void 0===i?"":i}}!function(e){e.WEB="web",e.WX="wx",e.QQ="qq",e.ZFB="zfb",e.DD="dd",e.TT="tt",e.BAIDU="baidu",e.QUICK_APP="quick_app",e.UNI="uni",e.NODE="node"}(b||(b={}));var k="localDeviceInfo",H={autoIncrement:0,ajaxUnconventionalErrorTimes:0,ajax:I,getUniqueId:N,getFileUrl:function(e){var t={url:"",filename:"",filetype:"",data:{}},n="string"==typeof e?document.getElementById(e):e;if(window.URL.createObjectURL){if(!n.files)throw Error("this is not HTMLInputElement");var r=n.files;if(r.length>0){var o=r.item(0);t.data=o,t.url=window.URL.createObjectURL(o),t.filename=(null==o?void 0:o.name)||""}}else{if("string"!=typeof e)throw Error("in IE fileInputId must be string");o=document.getElementById(e).value,t.url=o;var i=o.lastIndexOf("/"),s=o.lastIndexOf("\\"),a=Math.max(i,s);t.filename=a<0?o:o.substring(a+1)}var u=t.filename.lastIndexOf(".");return-1!==u&&(t.filetype=t.filename.substring(u+1).toLowerCase()),t},uploadFile:P,flow:function(e){for(var t=e.length,n=t;n--;)if("function"!=typeof e[n])throw new TypeError("Expected a function");return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var o=0,i=t?e[o].apply(this,n):n[0];++o<t;)i=e[o].call(this,i);return i}},listenNetwork:M,listenBrowserVisibility:L,getEnvInfo:w,wxRequest:C,parseDownloadResponse:function(e){if(!window||!window.URL)throw Error("parseDownloadResponse can be used in broswer only");return e&&e.type&&"application/json"===e.type||0>Object.prototype.toString.call(e).indexOf("Blob")?this.url+"?token=":window.URL.createObjectURL(e)},download:x,parseNotify:function(e){for(var t="",n=0;n<e.length;n++)t+="%"+e[n].toString(16);return JSON.parse(decodeURIComponent(t))},getExtraData:D,retryPromise:function(e,t,n){return new Promise((function(r,o){!function t(i){e().then(r).catch((function(e){i>0?setTimeout((function(){t(i-1)}),n||1e3):o(e)}))}(t||3)}))},formatAttachUrl:function(e){return e&&"string"==typeof e?"".concat(this.apiUrl).concat(e.substr(e.indexOf("/",9))):""},Uint8ArrayToString:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},getLocalDeviceInfo:function(){return function(e){var t,n=H.getEnvInfo(),r=n.platform,o="";r!==b.NODE&&r!==b.QUICK_APP||(o="");try{r===b.WEB?o=localStorage.getItem(e)||"":r===b.WX||r===b.QQ||r===b.TT||r===b.BAIDU||r===b.UNI?o=n.global.getStorageSync(e)||"":r!==b.ZFB&&r!==b.DD||(o=(null===(t=n.global.getStorageSync({key:e}))||void 0===t?void 0:t.data)||"")}catch(t){u.kg.debug("get local ".concat(e," failed: "),t)}return u.kg.debug("".concat(e," "),o),o}(k)},setLocalDeviceInfo:function(e){var t,n,r,o;t=k,n=e,(o=(r=H.getEnvInfo()).platform)!==b.NODE&&o!==b.QUICK_APP&&(o===b.WEB?localStorage.setItem(t,n):r.global.setStorage({key:t,data:n,success:function(e){u.kg.debug("set local ".concat(t," success: "),e)},fail:function(e){u.kg.error("set local ".concat(t," failed: "),e)}}))},detectBrowser:function(){if("undefined"==typeof navigator)return"unknown";var e=navigator.userAgent;return/MicroMessenger/i.test(e)?"WeChat":/QQBrowser/i.test(e)?"QQ":!/Chrome/i.test(e)||/Edg/i.test(e)||/OPR/i.test(e)?!/Safari/i.test(e)||/Chrome/i.test(e)||/CriOS/i.test(e)?/Firefox/i.test(e)?"Firefox":/MSIE/i.test(e)||/Trident/i.test(e)?"IE":/Edg/i.test(e)?"Edge":"unknown":"Safari":"Chrome"},getDevicePlatform:function(e){return e.platform===b.WX&&"undefined"!=typeof uni&&U(uni)?b.UNI:e.platform},delay:function(e){return new Promise((function(t){return setTimeout(t,e)}))}}},9662:function(e,t,n){var r=n(614),o=n(6330),i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not a function")}},9483:function(e,t,n){var r=n(4411),o=n(6330),i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not a constructor")}},6077:function(e,t,n){var r=n(614),o=String,i=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},1223:function(e,t,n){var r=n(5112),o=n(30),i=n(3070).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,{configurable:!0,value:o(null)}),e.exports=function(e){a[s][e]=!0}},5787:function(e,t,n){var r=n(7976),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw o("Incorrect invocation")}},9670:function(e,t,n){var r=n(111),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not an object")}},3013:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7556:function(e,t,n){var r=n(7293);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},260:function(e,t,n){"use strict";var r,o,i,s=n(3013),a=n(9781),u=n(7854),c=n(614),l=n(111),d=n(2597),h=n(648),f=n(6330),p=n(8880),E=n(8052),v=n(7045),g=n(7976),m=n(9518),y=n(7674),_=n(5112),O=n(9711),T=n(9909),R=T.enforce,I=T.get,S=u.Int8Array,C=S&&S.prototype,N=u.Uint8ClampedArray,A=N&&N.prototype,b=S&&m(S),M=C&&m(C),L=Object.prototype,w=u.TypeError,U=_("toStringTag"),P=O("TYPED_ARRAY_TAG"),x="TypedArrayConstructor",D=s&&!!y&&"Opera"!==h(u.opera),k=!1,H={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},G=function(e){var t=m(e);if(l(t)){var n=I(t);return n&&d(n,x)?n[x]:G(t)}},F=function(e){if(!l(e))return!1;var t=h(e);return d(H,t)||d(B,t)};for(r in H)(i=(o=u[r])&&o.prototype)?R(i)[x]=o:D=!1;for(r in B)(i=(o=u[r])&&o.prototype)&&(R(i)[x]=o);if((!D||!c(b)||b===Function.prototype)&&(b=function(){throw w("Incorrect invocation")},D))for(r in H)u[r]&&y(u[r],b);if((!D||!M||M===L)&&(M=b.prototype,D))for(r in H)u[r]&&y(u[r].prototype,M);if(D&&m(A)!==M&&y(A,M),a&&!d(M,U))for(r in k=!0,v(M,U,{configurable:!0,get:function(){return l(this)?this[P]:void 0}}),H)u[r]&&p(u[r],P,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:k&&P,aTypedArray:function(e){if(F(e))return e;throw w("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!y||g(b,e)))return e;throw w(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(a){if(n)for(var o in H){var i=u[o];if(i&&d(i.prototype,e))try{delete i.prototype[e]}catch(n){try{i.prototype[e]=t}catch(e){}}}M[e]&&!n||E(M,e,n?t:D&&C[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(a){if(y){if(n)for(r in H)if((o=u[r])&&d(o,e))try{delete o[e]}catch(e){}if(b[e]&&!n)return;try{return E(b,e,n?t:D&&b[e]||t)}catch(e){}}for(r in H)!(o=u[r])||o[e]&&!n||E(o,e,t)}},getTypedArrayConstructor:G,isView:function(e){if(!l(e))return!1;var t=h(e);return"DataView"===t||d(H,t)||d(B,t)},isTypedArray:F,TypedArray:b,TypedArrayPrototype:M}},3331:function(e,t,n){"use strict";var r=n(7854),o=n(1702),i=n(9781),s=n(3013),a=n(6530),u=n(8880),c=n(7045),l=n(9190),d=n(7293),h=n(5787),f=n(9303),p=n(7466),E=n(7067),v=n(1179),g=n(9518),m=n(7674),y=n(8006).f,_=n(1285),O=n(1589),T=n(8003),R=n(9909),I=a.PROPER,S=a.CONFIGURABLE,C="ArrayBuffer",N="DataView",A="prototype",b="Wrong index",M=R.getterFor(C),L=R.getterFor(N),w=R.set,U=r[C],P=U,x=P&&P[A],D=r[N],k=D&&D[A],H=Object.prototype,B=r.Array,G=r.RangeError,F=o(_),j=o([].reverse),W=v.pack,K=v.unpack,q=function(e){return[255&e]},V=function(e){return[255&e,e>>8&255]},J=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},z=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Y=function(e){return W(e,23,4)},X=function(e){return W(e,52,8)},Z=function(e,t,n){c(e[A],t,{configurable:!0,get:function(){return n(this)[t]}})},Q=function(e,t,n,r){var o=E(n),i=L(e);if(o+t>i.byteLength)throw G(b);var s=i.bytes,a=o+i.byteOffset,u=O(s,a,a+t);return r?u:j(u)},$=function(e,t,n,r,o,i){var s=E(n),a=L(e);if(s+t>a.byteLength)throw G(b);for(var u=a.bytes,c=s+a.byteOffset,l=r(+o),d=0;d<t;d++)u[c+d]=l[i?d:t-d-1]};if(s){var ee=I&&U.name!==C;if(d((function(){U(1)}))&&d((function(){new U(-1)}))&&!d((function(){return new U,new U(1.5),new U(NaN),1!=U.length||ee&&!S})))ee&&S&&u(U,"name",C);else{(P=function(e){return h(this,x),new U(E(e))})[A]=x;for(var te,ne=y(U),re=0;ne.length>re;)(te=ne[re++])in P||u(P,te,U[te]);x.constructor=P}m&&g(k)!==H&&m(k,H);var oe=new D(new P(2)),ie=o(k.setInt8);oe.setInt8(0,2147483648),oe.setInt8(1,2147483649),!oe.getInt8(0)&&oe.getInt8(1)||l(k,{setInt8:function(e,t){ie(this,e,t<<24>>24)},setUint8:function(e,t){ie(this,e,t<<24>>24)}},{unsafe:!0})}else x=(P=function(e){h(this,x);var t=E(e);w(this,{type:C,bytes:F(B(t),0),byteLength:t}),i||(this.byteLength=t,this.detached=!1)})[A],k=(D=function(e,t,n){h(this,k),h(e,x);var r=M(e),o=r.byteLength,s=f(t);if(s<0||s>o)throw G("Wrong offset");if(s+(n=void 0===n?o-s:p(n))>o)throw G("Wrong length");w(this,{type:N,buffer:e,byteLength:n,byteOffset:s,bytes:r.bytes}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=s)})[A],i&&(Z(P,"byteLength",M),Z(D,"buffer",L),Z(D,"byteLength",L),Z(D,"byteOffset",L)),l(k,{getInt8:function(e){return Q(this,1,e)[0]<<24>>24},getUint8:function(e){return Q(this,1,e)[0]},getInt16:function(e){var t=Q(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Q(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return z(Q(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return z(Q(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return K(Q(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return K(Q(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){$(this,1,e,q,t)},setUint8:function(e,t){$(this,1,e,q,t)},setInt16:function(e,t){$(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){$(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){$(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){$(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){$(this,4,e,Y,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){$(this,8,e,X,t,arguments.length>2?arguments[2]:void 0)}});T(P,C),T(D,N),e.exports={ArrayBuffer:P,DataView:D}},1048:function(e,t,n){"use strict";var r=n(7908),o=n(1400),i=n(6244),s=n(5117),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),u=i(n),c=o(e,u),l=o(t,u),d=arguments.length>2?arguments[2]:void 0,h=a((void 0===d?u:o(d,u))-l,u-c),f=1;for(l<c&&c<l+h&&(f=-1,l+=h-1,c+=h-1);h-- >0;)l in n?n[c]=n[l]:s(n,c),c+=f,l+=f;return n}},1285:function(e,t,n){"use strict";var r=n(7908),o=n(1400),i=n(6244);e.exports=function(e){for(var t=r(this),n=i(t),s=arguments.length,a=o(s>1?arguments[1]:void 0,n),u=s>2?arguments[2]:void 0,c=void 0===u?n:o(u,n);c>a;)t[a++]=e;return t}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,o=n(9341)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},7745:function(e,t,n){var r=n(6244);e.exports=function(e,t){for(var n=0,o=r(t),i=new e(o);o>n;)i[n]=t[n++];return i}},8457:function(e,t,n){"use strict";var r=n(9974),o=n(6916),i=n(7908),s=n(3411),a=n(7659),u=n(4411),c=n(6244),l=n(6135),d=n(4121),h=n(1246),f=Array;e.exports=function(e){var t=i(e),n=u(this),p=arguments.length,E=p>1?arguments[1]:void 0,v=void 0!==E;v&&(E=r(E,p>2?arguments[2]:void 0));var g,m,y,_,O,T,R=h(t),I=0;if(!R||this===f&&a(R))for(g=c(t),m=n?new this(g):f(g);g>I;I++)T=v?E(t[I],I):t[I],l(m,I,T);else for(O=(_=d(t,R)).next,m=n?new this:[];!(y=o(O,_)).done;I++)T=v?s(_,E,[y.value,I],!0):y.value,l(m,I,T);return m.length=I,m}},1318:function(e,t,n){var r=n(5656),o=n(1400),i=n(6244),s=function(e){return function(t,n,s){var a,u=r(t),c=i(u),l=o(s,c);if(e&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},2092:function(e,t,n){var r=n(9974),o=n(1702),i=n(8361),s=n(7908),a=n(6244),u=n(5417),c=o([].push),l=function(e){var t=1==e,n=2==e,o=3==e,l=4==e,d=6==e,h=7==e,f=5==e||d;return function(p,E,v,g){for(var m,y,_=s(p),O=i(_),T=r(E,v),R=a(O),I=0,S=g||u,C=t?S(p,R):n||h?S(p,0):void 0;R>I;I++)if((f||I in O)&&(y=T(m=O[I],I,_),e))if(t)C[I]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return I;case 2:c(C,m)}else switch(e){case 4:return!1;case 7:c(C,m)}return d?-1:o||l?l:C}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},6583:function(e,t,n){"use strict";var r=n(2104),o=n(5656),i=n(9303),s=n(6244),a=n(9341),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,d=a("lastIndexOf"),h=l||!d;e.exports=h?function(e){if(l)return r(c,this,arguments)||0;var t=o(this),n=s(t),a=n-1;for(arguments.length>1&&(a=u(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:c},1194:function(e,t,n){var r=n(7293),o=n(5112),i=n(7392),s=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,n){"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},3671:function(e,t,n){var r=n(9662),o=n(7908),i=n(8361),s=n(6244),a=TypeError,u=function(e){return function(t,n,u,c){r(n);var l=o(t),d=i(l),h=s(l),f=e?h-1:0,p=e?-1:1;if(u<2)for(;;){if(f in d){c=d[f],f+=p;break}if(f+=p,e?f<0:h<=f)throw a("Reduce of empty array with no initial value")}for(;e?f>=0:h>f;f+=p)f in d&&(c=n(c,d[f],f,l));return c}};e.exports={left:u(!1),right:u(!0)}},3658:function(e,t,n){"use strict";var r=n(9781),o=n(3157),i=TypeError,s=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(o(e)&&!s(e,"length").writable)throw i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},1589:function(e,t,n){var r=n(1400),o=n(6244),i=n(6135),s=Array,a=Math.max;e.exports=function(e,t,n){for(var u=o(e),c=r(t,u),l=r(void 0===n?u:n,u),d=s(a(l-c,0)),h=0;c<l;c++,h++)i(d,h,e[c]);return d.length=h,d}},206:function(e,t,n){var r=n(1702);e.exports=r([].slice)},4362:function(e,t,n){var r=n(1589),o=Math.floor,i=function(e,t){var n=e.length,u=o(n/2);return n<8?s(e,t):a(e,i(r(e,0,u),t),i(r(e,u),t),t)},s=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},a=function(e,t,n,r){for(var o=t.length,i=n.length,s=0,a=0;s<o||a<i;)e[s+a]=s<o&&a<i?r(t[s],n[a])<=0?t[s++]:n[a++]:s<o?t[s++]:n[a++];return e};e.exports=i},7475:function(e,t,n){var r=n(3157),o=n(4411),i=n(111),s=n(5112)("species"),a=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===a||r(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?a:t}},5417:function(e,t,n){var r=n(7475);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},3411:function(e,t,n){var r=n(9670),o=n(9212);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){o(e,"throw",t)}}},7072:function(e,t,n){var r=n(5112)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},4326:function(e,t,n){var r=n(1702),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},648:function(e,t,n){var r=n(1694),o=n(614),i=n(4326),s=n(5112)("toStringTag"),a=Object,u="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=a(e),s))?n:u?i(t):"Object"==(r=i(t))&&o(t.callee)?"Arguments":r}},5631:function(e,t,n){"use strict";var r=n(30),o=n(7045),i=n(9190),s=n(9974),a=n(5787),u=n(8554),c=n(408),l=n(1656),d=n(6178),h=n(6340),f=n(9781),p=n(2423).fastKey,E=n(9909),v=E.set,g=E.getterFor;e.exports={getConstructor:function(e,t,n,l){var d=e((function(e,o){a(e,h),v(e,{type:t,index:r(null),first:void 0,last:void 0,size:0}),f||(e.size=0),u(o)||c(o,e[l],{that:e,AS_ENTRIES:n})})),h=d.prototype,E=g(t),m=function(e,t,n){var r,o,i=E(e),s=y(e,t);return s?s.value=n:(i.last=s={index:o=p(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=s),r&&(r.next=s),f?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},y=function(e,t){var n,r=E(e),o=p(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(h,{clear:function(){for(var e=E(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=this,n=E(t),r=y(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),f?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=E(this),r=s(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!y(this,e)}}),i(h,n?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),f&&o(h,"size",{configurable:!0,get:function(){return E(this).size}}),d},setStrong:function(e,t,n){var r=t+" Iterator",o=g(t),i=g(r);l(e,t,(function(e,t){v(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?d("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,d(void 0,!0))}),n?"entries":"values",!n,!0),h(t)}}},7710:function(e,t,n){"use strict";var r=n(2109),o=n(7854),i=n(1702),s=n(4705),a=n(8052),u=n(2423),c=n(408),l=n(5787),d=n(614),h=n(8554),f=n(111),p=n(7293),E=n(7072),v=n(8003),g=n(9587);e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),y=-1!==e.indexOf("Weak"),_=m?"set":"add",O=o[e],T=O&&O.prototype,R=O,I={},S=function(e){var t=i(T[e]);a(T,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(y&&!f(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return y&&!f(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!f(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(s(e,!d(O)||!(y||T.forEach&&!p((function(){(new O).entries().next()})))))R=n.getConstructor(t,e,m,_),u.enable();else if(s(e,!0)){var C=new R,N=C[_](y?{}:-0,1)!=C,A=p((function(){C.has(1)})),b=E((function(e){new O(e)})),M=!y&&p((function(){for(var e=new O,t=5;t--;)e[_](t,t);return!e.has(-0)}));b||((R=t((function(e,t){l(e,T);var n=g(new O,e,R);return h(t)||c(t,n[_],{that:n,AS_ENTRIES:m}),n}))).prototype=T,T.constructor=R),(A||M)&&(S("delete"),S("has"),m&&S("get")),(M||N)&&S(_),y&&T.clear&&delete T.clear}return I[e]=R,r({global:!0,constructor:!0,forced:R!=O},I),v(R,e),y||n.setStrong(R,e,m),R}},9920:function(e,t,n){var r=n(2597),o=n(3887),i=n(1236),s=n(3070);e.exports=function(e,t,n){for(var a=o(t),u=s.f,c=i.f,l=0;l<a.length;l++){var d=a[l];r(e,d)||n&&r(n,d)||u(e,d,c(t,d))}}},4964:function(e,t,n){var r=n(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},8544:function(e,t,n){var r=n(7293);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},6178:function(e){e.exports=function(e,t){return{value:e,done:t}}},8880:function(e,t,n){var r=n(9781),o=n(3070),i=n(9114);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},9114:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:function(e,t,n){"use strict";var r=n(4948),o=n(3070),i=n(9114);e.exports=function(e,t,n){var s=r(t);s in e?o.f(e,s,i(0,n)):e[s]=n}},7045:function(e,t,n){var r=n(6339),o=n(3070);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),o.f(e,t,n)}},8052:function(e,t,n){var r=n(614),o=n(3070),i=n(6339),s=n(3072);e.exports=function(e,t,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:t;if(r(n)&&i(n,c,a),a.global)u?e[t]=n:s(t,n);else{try{a.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},9190:function(e,t,n){var r=n(8052);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},3072:function(e,t,n){var r=n(7854),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},5117:function(e,t,n){"use strict";var r=n(6330),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw o("Cannot delete property "+r(t)+" of "+r(e))}},9781:function(e,t,n){var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:function(e){var t="object"==typeof document&&document.all,n=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:n}},317:function(e,t,n){var r=n(7854),o=n(111),i=r.document,s=o(i)&&o(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},7207:function(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},8324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:function(e,t,n){var r=n(317)("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},8886:function(e,t,n){var r=n(8113).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},7871:function(e,t,n){var r=n(3823),o=n(5268);e.exports=!r&&!o&&"object"==typeof window&&"object"==typeof document},9363:function(e){e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},3823:function(e){e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:function(e,t,n){var r=n(8113);e.exports=/MSIE|Trident/.test(r)},1528:function(e,t,n){var r=n(8113);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},6833:function(e,t,n){var r=n(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:function(e,t,n){var r=n(4326);e.exports="undefined"!=typeof process&&"process"==r(process)},1036:function(e,t,n){var r=n(8113);e.exports=/web0s(?!.*chrome)/i.test(r)},8113:function(e){e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:function(e,t,n){var r,o,i=n(7854),s=n(8113),a=i.process,u=i.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},8008:function(e,t,n){var r=n(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),o=n(1236).f,i=n(8880),s=n(8052),a=n(3072),u=n(9920),c=n(4705);e.exports=function(e,t){var n,l,d,h,f,p=e.target,E=e.global,v=e.stat;if(n=E?r:v?r[p]||a(p,{}):(r[p]||{}).prototype)for(l in t){if(h=t[l],d=e.dontCallGetSet?(f=o(n,l))&&f.value:n[l],!c(E?l:p+(v?".":"#")+l,e.forced)&&void 0!==d){if(typeof h==typeof d)continue;u(h,d)}(e.sham||d&&d.sham)&&i(h,"sham",!0),s(n,l,h,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},6677:function(e,t,n){var r=n(7293);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:function(e,t,n){var r=n(4374),o=Function.prototype,i=o.apply,s=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},9974:function(e,t,n){var r=n(1470),o=n(9662),i=n(4374),s=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},4374:function(e,t,n){var r=n(7293);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},7065:function(e,t,n){"use strict";var r=n(1702),o=n(9662),i=n(111),s=n(2597),a=n(206),u=n(4374),c=Function,l=r([].concat),d=r([].join),h={};e.exports=u?c.bind:function(e){var t=o(this),n=t.prototype,r=a(arguments,1),u=function(){var n=l(r,a(arguments));return this instanceof u?function(e,t,n){if(!s(h,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";h[t]=c("C,a","return new C("+d(r,",")+")")}return h[t](e,n)}(t,n.length,n):t.apply(e,n)};return i(n)&&(u.prototype=n),u}},6916:function(e,t,n){var r=n(4374),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6530:function(e,t,n){var r=n(9781),o=n(2597),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function(){}.name,c=a&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},5668:function(e,t,n){var r=n(1702),o=n(9662);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},1470:function(e,t,n){var r=n(4326),o=n(1702);e.exports=function(e){if("Function"===r(e))return o(e)}},1702:function(e,t,n){var r=n(4374),o=Function.prototype,i=o.call,s=r&&o.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},5005:function(e,t,n){var r=n(7854),o=n(614);e.exports=function(e,t){return arguments.length<2?(n=r[e],o(n)?n:void 0):r[e]&&r[e][t];var n}},1246:function(e,t,n){var r=n(648),o=n(8173),i=n(8554),s=n(7497),a=n(5112)("iterator");e.exports=function(e){if(!i(e))return o(e,a)||o(e,"@@iterator")||s[r(e)]}},4121:function(e,t,n){var r=n(6916),o=n(9662),i=n(9670),s=n(6330),a=n(1246),u=TypeError;e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(o(n))return i(r(n,e));throw u(s(e)+" is not iterable")}},8044:function(e,t,n){var r=n(1702),o=n(3157),i=n(614),s=n(4326),a=n(1340),u=r([].push);e.exports=function(e){if(i(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var c=e[r];"string"==typeof c?u(n,c):"number"!=typeof c&&"Number"!=s(c)&&"String"!=s(c)||u(n,a(c))}var l=n.length,d=!0;return function(e,t){if(d)return d=!1,t;if(o(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},8173:function(e,t,n){var r=n(9662),o=n(8554);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||this||Function("return this")()},2597:function(e,t,n){var r=n(1702),o=n(7908),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},3501:function(e){e.exports={}},842:function(e){e.exports=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),o=n(7293),i=n(317);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},1179:function(e){var t=Array,n=Math.abs,r=Math.pow,o=Math.floor,i=Math.log,s=Math.LN2;e.exports={pack:function(e,a,u){var c,l,d,h=t(u),f=8*u-a-1,p=(1<<f)-1,E=p>>1,v=23===a?r(2,-24)-r(2,-77):0,g=e<0||0===e&&1/e<0?1:0,m=0;for((e=n(e))!=e||e===1/0?(l=e!=e?1:0,c=p):(c=o(i(e)/s),e*(d=r(2,-c))<1&&(c--,d*=2),(e+=c+E>=1?v/d:v*r(2,1-E))*d>=2&&(c++,d/=2),c+E>=p?(l=0,c=p):c+E>=1?(l=(e*d-1)*r(2,a),c+=E):(l=e*r(2,E-1)*r(2,a),c=0));a>=8;)h[m++]=255&l,l/=256,a-=8;for(c=c<<a|l,f+=a;f>0;)h[m++]=255&c,c/=256,f-=8;return h[--m]|=128*g,h},unpack:function(e,t){var n,o=e.length,i=8*o-t-1,s=(1<<i)-1,a=s>>1,u=i-7,c=o-1,l=e[c--],d=127&l;for(l>>=7;u>0;)d=256*d+e[c--],u-=8;for(n=d&(1<<-u)-1,d>>=-u,u+=t;u>0;)n=256*n+e[c--],u-=8;if(0===d)d=1-a;else{if(d===s)return n?NaN:l?-1/0:1/0;n+=r(2,t),d-=a}return(l?-1:1)*n*r(2,d-t)}}},8361:function(e,t,n){var r=n(1702),o=n(7293),i=n(4326),s=Object,a=r("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a(e,""):s(e)}:s},9587:function(e,t,n){var r=n(614),o=n(111),i=n(7674);e.exports=function(e,t,n){var s,a;return i&&r(s=t.constructor)&&s!==n&&o(a=s.prototype)&&a!==n.prototype&&i(e,a),e}},2788:function(e,t,n){var r=n(1702),o=n(614),i=n(5465),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},2423:function(e,t,n){var r=n(2109),o=n(1702),i=n(3501),s=n(111),a=n(2597),u=n(3070).f,c=n(8006),l=n(1156),d=n(2050),h=n(9711),f=n(6677),p=!1,E=h("meta"),v=0,g=function(e){u(e,E,{value:{objectID:"O"+v++,weakData:{}}})},m=e.exports={enable:function(){m.enable=function(){},p=!0;var e=c.f,t=o([].splice),n={};n[E]=1,e(n).length&&(c.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===E){t(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,E)){if(!d(e))return"F";if(!t)return"E";g(e)}return e[E].objectID},getWeakData:function(e,t){if(!a(e,E)){if(!d(e))return!0;if(!t)return!1;g(e)}return e[E].weakData},onFreeze:function(e){return f&&p&&d(e)&&!a(e,E)&&g(e),e}};i[E]=!0},9909:function(e,t,n){var r,o,i,s=n(4811),a=n(7854),u=n(111),c=n(8880),l=n(2597),d=n(5465),h=n(6200),f=n(3501),p="Object already initialized",E=a.TypeError,v=a.WeakMap;if(s||d.state){var g=d.state||(d.state=new v);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw E(p);return t.facade=e,g.set(e,t),t},o=function(e){return g.get(e)||{}},i=function(e){return g.has(e)}}else{var m=h("state");f[m]=!0,r=function(e,t){if(l(e,m))throw E(p);return t.facade=e,c(e,m,t),t},o=function(e){return l(e,m)?e[m]:{}},i=function(e){return l(e,m)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw E("Incompatible receiver, "+e+" required");return n}}}},7659:function(e,t,n){var r=n(5112),o=n(7497),i=r("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[i]===e)}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4067:function(e,t,n){var r=n(648);e.exports=function(e){var t=r(e);return"BigInt64Array"==t||"BigUint64Array"==t}},614:function(e,t,n){var r=n(4154),o=r.all;e.exports=r.IS_HTMLDDA?function(e){return"function"==typeof e||e===o}:function(e){return"function"==typeof e}},4411:function(e,t,n){var r=n(1702),o=n(7293),i=n(614),s=n(648),a=n(5005),u=n(2788),c=function(){},l=[],d=a("Reflect","construct"),h=/^\s*(?:class|function)\b/,f=r(h.exec),p=!h.exec(c),E=function(e){if(!i(e))return!1;try{return d(c,l,e),!0}catch(e){return!1}},v=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!f(h,u(e))}catch(e){return!0}};v.sham=!0,e.exports=!d||o((function(){var e;return E(E.call)||!E(Object)||!E((function(){e=!0}))||e}))?v:E},4705:function(e,t,n){var r=n(7293),o=n(614),i=/#|\.prototype\./,s=function(e,t){var n=u[a(e)];return n==l||n!=c&&(o(t)?r(t):!!t)},a=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},5988:function(e,t,n){var r=n(111),o=Math.floor;e.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&o(e)===e}},8554:function(e){e.exports=function(e){return null==e}},111:function(e,t,n){var r=n(614),o=n(4154),i=o.all;e.exports=o.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:r(e)||e===i}:function(e){return"object"==typeof e?null!==e:r(e)}},1913:function(e){e.exports=!1},7850:function(e,t,n){var r=n(111),o=n(4326),i=n(5112)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},2190:function(e,t,n){var r=n(5005),o=n(614),i=n(7976),s=n(3307),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,a(e))}},408:function(e,t,n){var r=n(9974),o=n(6916),i=n(9670),s=n(6330),a=n(7659),u=n(6244),c=n(7976),l=n(4121),d=n(1246),h=n(9212),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},E=p.prototype;e.exports=function(e,t,n){var v,g,m,y,_,O,T,R=n&&n.that,I=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_RECORD),C=!(!n||!n.IS_ITERATOR),N=!(!n||!n.INTERRUPTED),A=r(t,R),b=function(e){return v&&h(v,"normal",e),new p(!0,e)},M=function(e){return I?(i(e),N?A(e[0],e[1],b):A(e[0],e[1])):N?A(e,b):A(e)};if(S)v=e.iterator;else if(C)v=e;else{if(!(g=d(e)))throw f(s(e)+" is not iterable");if(a(g)){for(m=0,y=u(e);y>m;m++)if((_=M(e[m]))&&c(E,_))return _;return new p(!1)}v=l(e,g)}for(O=S?e.next:v.next;!(T=o(O,v)).done;){try{_=M(T.value)}catch(e){h(v,"throw",e)}if("object"==typeof _&&_&&c(E,_))return _}return new p(!1)}},9212:function(e,t,n){var r=n(6916),o=n(9670),i=n(8173);e.exports=function(e,t,n){var s,a;o(e);try{if(!(s=i(e,"return"))){if("throw"===t)throw n;return n}s=r(s,e)}catch(e){a=!0,s=e}if("throw"===t)throw n;if(a)throw s;return o(s),n}},3061:function(e,t,n){"use strict";var r=n(3383).IteratorPrototype,o=n(30),i=n(9114),s=n(8003),a=n(7497),u=function(){return this};e.exports=function(e,t,n,c){var l=t+" Iterator";return e.prototype=o(r,{next:i(+!c,n)}),s(e,l,!1,!0),a[l]=u,e}},1656:function(e,t,n){"use strict";var r=n(2109),o=n(6916),i=n(1913),s=n(6530),a=n(614),u=n(3061),c=n(9518),l=n(7674),d=n(8003),h=n(8880),f=n(8052),p=n(5112),E=n(7497),v=n(3383),g=s.PROPER,m=s.CONFIGURABLE,y=v.IteratorPrototype,_=v.BUGGY_SAFARI_ITERATORS,O=p("iterator"),T="keys",R="values",I="entries",S=function(){return this};e.exports=function(e,t,n,s,p,v,C){u(n,t,s);var N,A,b,M=function(e){if(e===p&&x)return x;if(!_&&e in U)return U[e];switch(e){case T:case R:case I:return function(){return new n(this,e)}}return function(){return new n(this)}},L=t+" Iterator",w=!1,U=e.prototype,P=U[O]||U["@@iterator"]||p&&U[p],x=!_&&P||M(p),D="Array"==t&&U.entries||P;if(D&&(N=c(D.call(new e)))!==Object.prototype&&N.next&&(i||c(N)===y||(l?l(N,y):a(N[O])||f(N,O,S)),d(N,L,!0,!0),i&&(E[L]=S)),g&&p==R&&P&&P.name!==R&&(!i&&m?h(U,"name",R):(w=!0,x=function(){return o(P,this)})),p)if(A={values:M(R),keys:v?x:M(T),entries:M(I)},C)for(b in A)(_||w||!(b in U))&&f(U,b,A[b]);else r({target:t,proto:!0,forced:_||w},A);return i&&!C||U[O]===x||f(U,O,x,{name:p}),E[t]=x,A}},3383:function(e,t,n){"use strict";var r,o,i,s=n(7293),a=n(614),u=n(111),c=n(30),l=n(9518),d=n(8052),h=n(5112),f=n(1913),p=h("iterator"),E=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):E=!0),!u(r)||s((function(){var e={};return r[p].call(e)!==e}))?r={}:f&&(r=c(r)),a(r[p])||d(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:E}},7497:function(e){e.exports={}},6244:function(e,t,n){var r=n(7466);e.exports=function(e){return r(e.length)}},6339:function(e,t,n){var r=n(1702),o=n(7293),i=n(614),s=n(2597),a=n(9781),u=n(6530).CONFIGURABLE,c=n(2788),l=n(9909),d=l.enforce,h=l.get,f=String,p=Object.defineProperty,E=r("".slice),v=r("".replace),g=r([].join),m=a&&!o((function(){return 8!==p((function(){}),"length",{value:8}).length})),y=String(String).split("String"),_=e.exports=function(e,t,n){"Symbol("===E(f(t),0,7)&&(t="["+v(f(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!s(e,"name")||u&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),m&&n&&s(n,"arity")&&e.length!==n.arity&&p(e,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=d(e);return s(r,"source")||(r.source=g(y,"string"==typeof t?t:"")),e};Function.prototype.toString=_((function(){return i(this)&&h(this).source||c(this)}),"toString")},4758:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},5948:function(e,t,n){var r,o,i,s,a,u=n(7854),c=n(9974),l=n(1236).f,d=n(261).set,h=n(8572),f=n(6833),p=n(1528),E=n(1036),v=n(5268),g=u.MutationObserver||u.WebKitMutationObserver,m=u.document,y=u.process,_=u.Promise,O=l(u,"queueMicrotask"),T=O&&O.value;if(!T){var R=new h,I=function(){var e,t;for(v&&(e=y.domain)&&e.exit();t=R.get();)try{t()}catch(e){throw R.head&&r(),e}e&&e.enter()};f||v||E||!g||!m?!p&&_&&_.resolve?((s=_.resolve(void 0)).constructor=_,a=c(s.then,s),r=function(){a(I)}):v?r=function(){y.nextTick(I)}:(d=c(d,u),r=function(){d(I)}):(o=!0,i=m.createTextNode(""),new g(I).observe(i,{characterData:!0}),r=function(){i.data=o=!o}),T=function(e){R.head||r(),R.add(e)}}e.exports=T},8523:function(e,t,n){"use strict";var r=n(9662),o=TypeError,i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw o("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},3929:function(e,t,n){var r=n(7850),o=TypeError;e.exports=function(e){if(r(e))throw o("The method doesn't accept regular expressions");return e}},1574:function(e,t,n){"use strict";var r=n(9781),o=n(1702),i=n(6916),s=n(7293),a=n(1956),u=n(5181),c=n(5296),l=n(7908),d=n(8361),h=Object.assign,f=Object.defineProperty,p=o([].concat);e.exports=!h||s((function(){if(r&&1!==h({b:1},h(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=h({},e)[n]||a(h({},t)).join("")!=o}))?function(e,t){for(var n=l(e),o=arguments.length,s=1,h=u.f,f=c.f;o>s;)for(var E,v=d(arguments[s++]),g=h?p(a(v),h(v)):a(v),m=g.length,y=0;m>y;)E=g[y++],r&&!i(f,v,E)||(n[E]=v[E]);return n}:h},30:function(e,t,n){var r,o=n(9670),i=n(6048),s=n(748),a=n(3501),u=n(490),c=n(317),l=n(6200),d="prototype",h="script",f=l("IE_PROTO"),p=function(){},E=function(e){return"<"+h+">"+e+"</"+h+">"},v=function(e){e.write(E("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g="undefined"!=typeof document?document.domain&&r?v(r):(t=c("iframe"),n="java"+h+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(E("document.F=Object")),e.close(),e.F):v(r);for(var o=s.length;o--;)delete g[d][s[o]];return g()};a[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p[d]=o(e),n=new p,p[d]=null,n[f]=e):n=g(),void 0===t?n:i.f(n,t)}},6048:function(e,t,n){var r=n(9781),o=n(3353),i=n(3070),s=n(9670),a=n(5656),u=n(1956);t.f=r&&!o?Object.defineProperties:function(e,t){s(e);for(var n,r=a(t),o=u(t),c=o.length,l=0;c>l;)i.f(e,n=o[l++],r[n]);return e}},3070:function(e,t,n){var r=n(9781),o=n(4664),i=n(3353),s=n(9670),a=n(4948),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",f="writable";t.f=r?i?function(e,t,n){if(s(e),t=a(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&f in n&&!n[f]){var r=l(e,t);r&&r[f]&&(e[t]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:d in n?n[d]:r[d],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(s(e),t=a(t),s(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:function(e,t,n){var r=n(9781),o=n(6916),i=n(5296),s=n(9114),a=n(5656),u=n(4948),c=n(2597),l=n(4664),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=a(e),t=u(t),l)try{return d(e,t)}catch(e){}if(c(e,t))return s(!o(i.f,e,t),e[t])}},1156:function(e,t,n){var r=n(4326),o=n(5656),i=n(8006).f,s=n(1589),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"Window"==r(e)?function(e){try{return i(e)}catch(e){return s(a)}}(e):i(o(e))}},8006:function(e,t,n){var r=n(6324),o=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},9518:function(e,t,n){var r=n(2597),o=n(614),i=n(7908),s=n(6200),a=n(8544),u=s("IE_PROTO"),c=Object,l=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=i(e);if(r(t,u))return t[u];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof c?l:null}},2050:function(e,t,n){var r=n(7293),o=n(111),i=n(4326),s=n(7556),a=Object.isExtensible,u=r((function(){a(1)}));e.exports=u||s?function(e){return!!o(e)&&(!s||"ArrayBuffer"!=i(e))&&(!a||a(e))}:a},7976:function(e,t,n){var r=n(1702);e.exports=r({}.isPrototypeOf)},6324:function(e,t,n){var r=n(1702),o=n(2597),i=n(5656),s=n(1318).indexOf,a=n(3501),u=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&u(l,n);for(;t.length>c;)o(r,n=t[c++])&&(~s(l,n)||u(l,n));return l}},1956:function(e,t,n){var r=n(6324),o=n(748);e.exports=Object.keys||function(e){return r(e,o)}},5296:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:function(e,t,n){var r=n(5668),o=n(9670),i=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),i(r),t?e(n,r):n.__proto__=r,n}}():void 0)},4699:function(e,t,n){var r=n(9781),o=n(1702),i=n(1956),s=n(5656),a=o(n(5296).f),u=o([].push),c=function(e){return function(t){for(var n,o=s(t),c=i(o),l=c.length,d=0,h=[];l>d;)n=c[d++],r&&!a(o,n)||u(h,e?[n,o[n]]:o[n]);return h}};e.exports={entries:c(!0),values:c(!1)}},288:function(e,t,n){"use strict";var r=n(1694),o=n(648);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},2140:function(e,t,n){var r=n(6916),o=n(614),i=n(111),s=TypeError;e.exports=function(e,t){var n,a;if("string"===t&&o(n=e.toString)&&!i(a=r(n,e)))return a;if(o(n=e.valueOf)&&!i(a=r(n,e)))return a;if("string"!==t&&o(n=e.toString)&&!i(a=r(n,e)))return a;throw s("Can't convert object to primitive value")}},3887:function(e,t,n){var r=n(5005),o=n(1702),i=n(8006),s=n(5181),a=n(9670),u=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=s.f;return n?u(t,n(e)):t}},857:function(e,t,n){var r=n(7854);e.exports=r},2534:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},3702:function(e,t,n){var r=n(7854),o=n(2492),i=n(614),s=n(4705),a=n(2788),u=n(5112),c=n(7871),l=n(3823),d=n(1913),h=n(7392),f=o&&o.prototype,p=u("species"),E=!1,v=i(r.PromiseRejectionEvent),g=s("Promise",(function(){var e=a(o),t=e!==String(o);if(!t&&66===h)return!0;if(d&&(!f.catch||!f.finally))return!0;if(!h||h<51||!/native code/.test(e)){var n=new o((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[p]=r,!(E=n.then((function(){}))instanceof r))return!0}return!t&&(c||l)&&!v}));e.exports={CONSTRUCTOR:g,REJECTION_EVENT:v,SUBCLASSING:E}},2492:function(e,t,n){var r=n(7854);e.exports=r.Promise},9478:function(e,t,n){var r=n(9670),o=n(111),i=n(8523);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},612:function(e,t,n){var r=n(2492),o=n(7072),i=n(3702).CONSTRUCTOR;e.exports=i||!o((function(e){r.all(e).then(void 0,(function(){}))}))},8572:function(e){var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},2261:function(e,t,n){"use strict";var r,o,i=n(6916),s=n(1702),a=n(1340),u=n(7066),c=n(2999),l=n(2309),d=n(30),h=n(9909).get,f=n(9441),p=n(7168),E=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,m=s("".charAt),y=s("".indexOf),_=s("".replace),O=s("".slice),T=(o=/b*/g,i(v,r=/a/,"a"),i(v,o,"a"),0!==r.lastIndex||0!==o.lastIndex),R=c.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(T||I||R||f||p)&&(g=function(e){var t,n,r,o,s,c,l,f=this,p=h(f),S=a(e),C=p.raw;if(C)return C.lastIndex=f.lastIndex,t=i(g,C,S),f.lastIndex=C.lastIndex,t;var N=p.groups,A=R&&f.sticky,b=i(u,f),M=f.source,L=0,w=S;if(A&&(b=_(b,"y",""),-1===y(b,"g")&&(b+="g"),w=O(S,f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==m(S,f.lastIndex-1))&&(M="(?: "+M+")",w=" "+w,L++),n=new RegExp("^(?:"+M+")",b)),I&&(n=new RegExp("^"+M+"$(?!\\s)",b)),T&&(r=f.lastIndex),o=i(v,A?n:f,w),A?o?(o.input=O(o.input,L),o[0]=O(o[0],L),o.index=f.lastIndex,f.lastIndex+=o[0].length):f.lastIndex=0:T&&o&&(f.lastIndex=f.global?o.index+o[0].length:r),I&&o&&o.length>1&&i(E,o[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&N)for(o.groups=c=d(null),s=0;s<N.length;s++)c[(l=N[s])[0]]=o[l[1]];return o}),e.exports=g},7066:function(e,t,n){"use strict";var r=n(9670);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},4706:function(e,t,n){var r=n(6916),o=n(2597),i=n(7976),s=n(7066),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||o(e,"flags")||!i(a,e)?t:r(s,e)}},2999:function(e,t,n){var r=n(7293),o=n(7854).RegExp,i=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),s=i||r((function(){return!o("a","y").sticky})),a=i||r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:i}},9441:function(e,t,n){var r=n(7293),o=n(7854).RegExp;e.exports=r((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},7168:function(e,t,n){var r=n(7293),o=n(7854).RegExp;e.exports=r((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4488:function(e,t,n){var r=n(8554),o=TypeError;e.exports=function(e){if(r(e))throw o("Can't call method on "+e);return e}},7152:function(e,t,n){"use strict";var r,o=n(7854),i=n(2104),s=n(614),a=n(9363),u=n(8113),c=n(206),l=n(8053),d=o.Function,h=/MSIE .\./.test(u)||a&&((r=o.Bun.version.split(".")).length<3||0==r[0]&&(r[1]<3||3==r[1]&&0==r[2]));e.exports=function(e,t){var n=t?2:1;return h?function(r,o){var a=l(arguments.length,1)>n,u=s(r)?r:d(r),h=a?c(arguments,n):[],f=a?function(){i(u,this,h)}:u;return t?e(f,o):e(f)}:e}},6340:function(e,t,n){"use strict";var r=n(5005),o=n(7045),i=n(5112),s=n(9781),a=i("species");e.exports=function(e){var t=r(e);s&&t&&!t[a]&&o(t,a,{configurable:!0,get:function(){return this}})}},8003:function(e,t,n){var r=n(3070).f,o=n(2597),i=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!o(e,i)&&r(e,i,{configurable:!0,value:t})}},6200:function(e,t,n){var r=n(2309),o=n(9711),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},5465:function(e,t,n){var r=n(7854),o=n(3072),i="__core-js_shared__",s=r[i]||o(i,{});e.exports=s},2309:function(e,t,n){var r=n(1913),o=n(5465);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:function(e,t,n){var r=n(9670),o=n(9483),i=n(8554),s=n(5112)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||i(n=r(a)[s])?t:o(n)}},8710:function(e,t,n){var r=n(1702),o=n(9303),i=n(1340),s=n(4488),a=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(e){return function(t,n){var r,l,d=i(s(t)),h=o(n),f=d.length;return h<0||h>=f?e?"":void 0:(r=u(d,h))<55296||r>56319||h+1===f||(l=u(d,h+1))<56320||l>57343?e?a(d,h):r:e?c(d,h,h+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},3197:function(e,t,n){var r=n(1702),o=2147483647,i=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",u=RangeError,c=r(s.exec),l=Math.floor,d=String.fromCharCode,h=r("".charCodeAt),f=r([].join),p=r([].push),E=r("".replace),v=r("".split),g=r("".toLowerCase),m=function(e){return e+22+75*(e<26)},y=function(e,t,n){var r=0;for(e=n?l(e/700):e>>1,e+=l(e/t);e>455;)e=l(e/35),r+=36;return l(r+36*e/(e+38))},_=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=h(e,n++);if(o>=55296&&o<=56319&&n<r){var i=h(e,n++);56320==(64512&i)?p(t,((1023&o)<<10)+(1023&i)+65536):(p(t,o),n--)}else p(t,o)}return t}(e);var n,r,i=e.length,s=128,c=0,E=72;for(n=0;n<e.length;n++)(r=e[n])<128&&p(t,d(r));var v=t.length,g=v;for(v&&p(t,"-");g<i;){var _=o;for(n=0;n<e.length;n++)(r=e[n])>=s&&r<_&&(_=r);var O=g+1;if(_-s>l((o-c)/O))throw u(a);for(c+=(_-s)*O,s=_,n=0;n<e.length;n++){if((r=e[n])<s&&++c>o)throw u(a);if(r==s){for(var T=c,R=36;;){var I=R<=E?1:R>=E+26?26:R-E;if(T<I)break;var S=T-I,C=36-I;p(t,d(m(I+S%C))),T=l(S/C),R+=36}p(t,d(m(T))),E=y(c,O,g==v),c=0,g++}}c++,s++}return f(t,"")};e.exports=function(e){var t,n,r=[],o=v(E(g(e),s,"."),".");for(t=0;t<o.length;t++)n=o[t],p(r,c(i,n)?"xn--"+_(n):n);return f(r,".")}},3111:function(e,t,n){var r=n(1702),o=n(4488),i=n(1340),s=n(1361),a=r("".replace),u=RegExp("^["+s+"]+"),c=RegExp("(^|[^"+s+"])["+s+"]+$"),l=function(e){return function(t){var n=i(o(t));return 1&e&&(n=a(n,u,"")),2&e&&(n=a(n,c,"$1")),n}};e.exports={start:l(1),end:l(2),trim:l(3)}},6293:function(e,t,n){var r=n(7392),o=n(7293),i=n(7854).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},6532:function(e,t,n){var r=n(6916),o=n(5005),i=n(5112),s=n(8052);e.exports=function(){var e=o("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,a=i("toPrimitive");t&&!t[a]&&s(t,a,(function(e){return r(n,this)}),{arity:1})}},2015:function(e,t,n){var r=n(6293);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},261:function(e,t,n){var r,o,i,s,a=n(7854),u=n(2104),c=n(9974),l=n(614),d=n(2597),h=n(7293),f=n(490),p=n(206),E=n(317),v=n(8053),g=n(6833),m=n(5268),y=a.setImmediate,_=a.clearImmediate,O=a.process,T=a.Dispatch,R=a.Function,I=a.MessageChannel,S=a.String,C=0,N={},A="onreadystatechange";h((function(){r=a.location}));var b=function(e){if(d(N,e)){var t=N[e];delete N[e],t()}},M=function(e){return function(){b(e)}},L=function(e){b(e.data)},w=function(e){a.postMessage(S(e),r.protocol+"//"+r.host)};y&&_||(y=function(e){v(arguments.length,1);var t=l(e)?e:R(e),n=p(arguments,1);return N[++C]=function(){u(t,void 0,n)},o(C),C},_=function(e){delete N[e]},m?o=function(e){O.nextTick(M(e))}:T&&T.now?o=function(e){T.now(M(e))}:I&&!g?(s=(i=new I).port2,i.port1.onmessage=L,o=c(s.postMessage,s)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!h(w)?(o=w,a.addEventListener("message",L,!1)):o=A in E("script")?function(e){f.appendChild(E("script"))[A]=function(){f.removeChild(this),b(e)}}:function(e){setTimeout(M(e),0)}),e.exports={set:y,clear:_}},863:function(e,t,n){var r=n(1702);e.exports=r(1..valueOf)},1400:function(e,t,n){var r=n(9303),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},4599:function(e,t,n){var r=n(7593),o=TypeError;e.exports=function(e){var t=r(e,"number");if("number"==typeof t)throw o("Can't convert number to bigint");return BigInt(t)}},7067:function(e,t,n){var r=n(9303),o=n(7466),i=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=o(t);if(t!==n)throw i("Wrong length or index");return n}},5656:function(e,t,n){var r=n(8361),o=n(4488);e.exports=function(e){return r(o(e))}},9303:function(e,t,n){var r=n(4758);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},7466:function(e,t,n){var r=n(9303),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},7908:function(e,t,n){var r=n(4488),o=Object;e.exports=function(e){return o(r(e))}},4590:function(e,t,n){var r=n(3002),o=RangeError;e.exports=function(e,t){var n=r(e);if(n%t)throw o("Wrong offset");return n}},3002:function(e,t,n){var r=n(9303),o=RangeError;e.exports=function(e){var t=r(e);if(t<0)throw o("The argument can't be less than 0");return t}},7593:function(e,t,n){var r=n(6916),o=n(111),i=n(2190),s=n(8173),a=n(2140),u=n(5112),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,u=s(e,l);if(u){if(void 0===t&&(t="default"),n=r(u,e,t),!o(n)||i(n))return n;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},4948:function(e,t,n){var r=n(7593),o=n(2190);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},1694:function(e,t,n){var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},1340:function(e,t,n){var r=n(648),o=String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},6330:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},9843:function(e,t,n){"use strict";var r=n(2109),o=n(7854),i=n(6916),s=n(9781),a=n(3832),u=n(260),c=n(3331),l=n(5787),d=n(9114),h=n(8880),f=n(5988),p=n(7466),E=n(7067),v=n(4590),g=n(4948),m=n(2597),y=n(648),_=n(111),O=n(2190),T=n(30),R=n(7976),I=n(7674),S=n(8006).f,C=n(7321),N=n(2092).forEach,A=n(6340),b=n(7045),M=n(3070),L=n(1236),w=n(9909),U=n(9587),P=w.get,x=w.set,D=w.enforce,k=M.f,H=L.f,B=Math.round,G=o.RangeError,F=c.ArrayBuffer,j=F.prototype,W=c.DataView,K=u.NATIVE_ARRAY_BUFFER_VIEWS,q=u.TYPED_ARRAY_TAG,V=u.TypedArray,J=u.TypedArrayPrototype,z=u.aTypedArrayConstructor,Y=u.isTypedArray,X="BYTES_PER_ELEMENT",Z="Wrong length",Q=function(e,t){z(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},$=function(e,t){b(e,t,{configurable:!0,get:function(){return P(this)[t]}})},ee=function(e){var t;return R(j,e)||"ArrayBuffer"==(t=y(e))||"SharedArrayBuffer"==t},te=function(e,t){return Y(e)&&!O(t)&&t in e&&f(+t)&&t>=0},ne=function(e,t){return t=g(t),te(e,t)?d(2,e[t]):H(e,t)},re=function(e,t,n){return t=g(t),!(te(e,t)&&_(n)&&m(n,"value"))||m(n,"get")||m(n,"set")||n.configurable||m(n,"writable")&&!n.writable||m(n,"enumerable")&&!n.enumerable?k(e,t,n):(e[t]=n.value,e)};s?(K||(L.f=ne,M.f=re,$(J,"buffer"),$(J,"byteOffset"),$(J,"byteLength"),$(J,"length")),r({target:"Object",stat:!0,forced:!K},{getOwnPropertyDescriptor:ne,defineProperty:re}),e.exports=function(e,t,n){var s=e.match(/\d+/)[0]/8,u=e+(n?"Clamped":"")+"Array",c="get"+e,d="set"+e,f=o[u],g=f,m=g&&g.prototype,y={},O=function(e,t){k(e,t,{get:function(){return function(e,t){var n=P(e);return n.view[c](t*s+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=P(e);n&&(r=(r=B(r))<0?0:r>255?255:255&r),o.view[d](t*s+o.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};K?a&&(g=t((function(e,t,n,r){return l(e,m),U(_(t)?ee(t)?void 0!==r?new f(t,v(n,s),r):void 0!==n?new f(t,v(n,s)):new f(t):Y(t)?Q(g,t):i(C,g,t):new f(E(t)),e,g)})),I&&I(g,V),N(S(f),(function(e){e in g||h(g,e,f[e])})),g.prototype=m):(g=t((function(e,t,n,r){l(e,m);var o,a,u,c=0,d=0;if(_(t)){if(!ee(t))return Y(t)?Q(g,t):i(C,g,t);o=t,d=v(n,s);var h=t.byteLength;if(void 0===r){if(h%s)throw G(Z);if((a=h-d)<0)throw G(Z)}else if((a=p(r)*s)+d>h)throw G(Z);u=a/s}else u=E(t),o=new F(a=u*s);for(x(e,{buffer:o,byteOffset:d,byteLength:a,length:u,view:new W(o)});c<u;)O(e,c++)})),I&&I(g,V),m=g.prototype=T(J)),m.constructor!==g&&h(m,"constructor",g),D(m).TypedArrayConstructor=g,q&&h(m,q,u);var R=g!=f;y[u]=g,r({global:!0,constructor:!0,forced:R,sham:!K},y),X in g||h(g,X,s),X in m||h(m,X,s),A(u)}):e.exports=function(){}},3832:function(e,t,n){var r=n(7854),o=n(7293),i=n(7072),s=n(260).NATIVE_ARRAY_BUFFER_VIEWS,a=r.ArrayBuffer,u=r.Int8Array;e.exports=!s||!o((function(){u(1)}))||!o((function(){new u(-1)}))||!i((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||o((function(){return 1!==new u(new a(2),1,void 0).length}))},3074:function(e,t,n){var r=n(7745),o=n(6304);e.exports=function(e,t){return r(o(e),t)}},7321:function(e,t,n){var r=n(9974),o=n(6916),i=n(9483),s=n(7908),a=n(6244),u=n(4121),c=n(1246),l=n(7659),d=n(4067),h=n(260).aTypedArrayConstructor,f=n(4599);e.exports=function(e){var t,n,p,E,v,g,m,y,_=i(this),O=s(e),T=arguments.length,R=T>1?arguments[1]:void 0,I=void 0!==R,S=c(O);if(S&&!l(S))for(y=(m=u(O,S)).next,O=[];!(g=o(y,m)).done;)O.push(g.value);for(I&&T>2&&(R=r(R,arguments[2])),n=a(O),p=new(h(_))(n),E=d(p),t=0;n>t;t++)v=I?R(O[t],t):O[t],p[t]=E?f(v):+v;return p}},6304:function(e,t,n){var r=n(260),o=n(6707),i=r.aTypedArrayConstructor,s=r.getTypedArrayConstructor;e.exports=function(e){return i(o(e,s(e)))}},9711:function(e,t,n){var r=n(1702),o=0,i=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++o+i,36)}},5143:function(e,t,n){var r=n(7293),o=n(5112),i=n(9781),s=n(1913),a=o("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),s&&!e.toJSON||!t.size&&(s||!i)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},3307:function(e,t,n){var r=n(6293);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(e,t,n){var r=n(9781),o=n(7293);e.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:function(e){var t=TypeError;e.exports=function(e,n){if(e<n)throw t("Not enough arguments");return e}},4811:function(e,t,n){var r=n(7854),o=n(614),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},6800:function(e,t,n){var r=n(857),o=n(2597),i=n(6061),s=n(3070).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||s(t,e,{value:i.f(e)})}},6061:function(e,t,n){var r=n(5112);t.f=r},5112:function(e,t,n){var r=n(7854),o=n(2309),i=n(2597),s=n(9711),a=n(6293),u=n(3307),c=r.Symbol,l=o("wks"),d=u?c.for||c:c&&c.withoutSetter||s;e.exports=function(e){return i(l,e)||(l[e]=a&&i(c,e)?c[e]:d("Symbol."+e)),l[e]}},1361:function(e){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9575:function(e,t,n){"use strict";var r=n(2109),o=n(1470),i=n(7293),s=n(3331),a=n(9670),u=n(1400),c=n(7466),l=n(6707),d=s.ArrayBuffer,h=s.DataView,f=h.prototype,p=o(d.prototype.slice),E=o(f.getUint8),v=o(f.setUint8);r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new d(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(p&&void 0===t)return p(a(this),e);for(var n=a(this).byteLength,r=u(e,n),o=u(void 0===t?n:t,n),i=new(l(this,d))(c(o-r)),s=new h(this),f=new h(i),g=0;r<o;)v(f,g++,E(s,r++));return i}})},2222:function(e,t,n){"use strict";var r=n(2109),o=n(7293),i=n(3157),s=n(111),a=n(7908),u=n(6244),c=n(7207),l=n(6135),d=n(5417),h=n(1194),f=n(5112),p=n(7392),E=f("isConcatSpreadable"),v=p>=51||!o((function(){var e=[];return e[E]=!1,e.concat()[0]!==e})),g=function(e){if(!s(e))return!1;var t=e[E];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!v||!h("concat")},{concat:function(e){var t,n,r,o,i,s=a(this),h=d(s,0),f=0;for(t=-1,r=arguments.length;t<r;t++)if(g(i=-1===t?s:arguments[t]))for(o=u(i),c(f+o),n=0;n<o;n++,f++)n in i&&l(h,f,i[n]);else c(f+1),l(h,f++,i);return h.length=f,h}})},7327:function(e,t,n){"use strict";var r=n(2109),o=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},4553:function(e,t,n){"use strict";var r=n(2109),o=n(2092).findIndex,i=n(1223),s="findIndex",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(s)},9826:function(e,t,n){"use strict";var r=n(2109),o=n(2092).find,i=n(1223),s="find",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(s)},9554:function(e,t,n){"use strict";var r=n(2109),o=n(8533);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},1038:function(e,t,n){var r=n(2109),o=n(8457);r({target:"Array",stat:!0,forced:!n(7072)((function(e){Array.from(e)}))},{from:o})},6699:function(e,t,n){"use strict";var r=n(2109),o=n(1318).includes,i=n(7293),s=n(1223);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),s("includes")},2772:function(e,t,n){"use strict";var r=n(2109),o=n(1470),i=n(1318).indexOf,s=n(9341),a=o([].indexOf),u=!!a&&1/a([1],1,-0)<0;r({target:"Array",proto:!0,forced:u||!s("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return u?a(this,e,t)||0:i(this,e,t)}})},9753:function(e,t,n){n(2109)({target:"Array",stat:!0},{isArray:n(3157)})},6992:function(e,t,n){"use strict";var r=n(5656),o=n(1223),i=n(7497),s=n(9909),a=n(3070).f,u=n(1656),c=n(6178),l=n(1913),d=n(9781),h="Array Iterator",f=s.set,p=s.getterFor(h);e.exports=u(Array,"Array",(function(e,t){f(this,{type:h,target:r(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,c(void 0,!0)):c("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values");var E=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&d&&"values"!==E.name)try{a(E,"name",{value:"values"})}catch(e){}},9600:function(e,t,n){"use strict";var r=n(2109),o=n(1702),i=n(8361),s=n(5656),a=n(9341),u=o([].join);r({target:"Array",proto:!0,forced:i!=Object||!a("join",",")},{join:function(e){return u(s(this),void 0===e?",":e)}})},4986:function(e,t,n){var r=n(2109),o=n(6583);r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},1249:function(e,t,n){"use strict";var r=n(2109),o=n(2092).map;r({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},5827:function(e,t,n){"use strict";var r=n(2109),o=n(3671).left,i=n(9341),s=n(7392);r({target:"Array",proto:!0,forced:!n(5268)&&s>79&&s<83||!i("reduce")},{reduce:function(e){var t=arguments.length;return o(this,e,t,t>1?arguments[1]:void 0)}})},7042:function(e,t,n){"use strict";var r=n(2109),o=n(3157),i=n(4411),s=n(111),a=n(1400),u=n(6244),c=n(5656),l=n(6135),d=n(5112),h=n(1194),f=n(206),p=h("slice"),E=d("species"),v=Array,g=Math.max;r({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var n,r,d,h=c(this),p=u(h),m=a(e,p),y=a(void 0===t?p:t,p);if(o(h)&&(n=h.constructor,(i(n)&&(n===v||o(n.prototype))||s(n)&&null===(n=n[E]))&&(n=void 0),n===v||void 0===n))return f(h,m,y);for(r=new(void 0===n?v:n)(g(y-m,0)),d=0;m<y;m++,d++)m in h&&l(r,d,h[m]);return r.length=d,r}})},5212:function(e,t,n){"use strict";var r=n(2109),o=n(2092).some;r({target:"Array",proto:!0,forced:!n(9341)("some")},{some:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},561:function(e,t,n){"use strict";var r=n(2109),o=n(7908),i=n(1400),s=n(9303),a=n(6244),u=n(3658),c=n(7207),l=n(5417),d=n(6135),h=n(5117),f=n(1194)("splice"),p=Math.max,E=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(e,t){var n,r,f,v,g,m,y=o(this),_=a(y),O=i(e,_),T=arguments.length;for(0===T?n=r=0:1===T?(n=0,r=_-O):(n=T-2,r=E(p(s(t),0),_-O)),c(_+n-r),f=l(y,r),v=0;v<r;v++)(g=O+v)in y&&d(f,v,y[g]);if(f.length=r,n<r){for(v=O;v<_-r;v++)m=v+n,(g=v+r)in y?y[m]=y[g]:h(y,m);for(v=_;v>_-r+n;v--)h(y,v-1)}else if(n>r)for(v=_-r;v>O;v--)m=v+n-1,(g=v+r-1)in y?y[m]=y[g]:h(y,m);for(v=0;v<n;v++)y[v+O]=arguments[v+2];return u(y,_-r+n),f}})},3843:function(e,t,n){var r=n(2109),o=n(1702),i=Date,s=o(i.prototype.getTime);r({target:"Date",stat:!0},{now:function(){return s(new i)}})},3710:function(e,t,n){var r=n(1702),o=n(8052),i=Date.prototype,s="Invalid Date",a="toString",u=r(i[a]),c=r(i.getTime);String(new Date(NaN))!=s&&o(i,a,(function(){var e=c(this);return e==e?u(this):s}))},4812:function(e,t,n){var r=n(2109),o=n(7065);r({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},8309:function(e,t,n){var r=n(9781),o=n(6530).EXISTS,i=n(1702),s=n(7045),a=Function.prototype,u=i(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(c.exec);r&&!o&&s(a,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},8862:function(e,t,n){var r=n(2109),o=n(5005),i=n(2104),s=n(6916),a=n(1702),u=n(7293),c=n(614),l=n(2190),d=n(206),h=n(8044),f=n(6293),p=String,E=o("JSON","stringify"),v=a(/./.exec),g=a("".charAt),m=a("".charCodeAt),y=a("".replace),_=a(1..toString),O=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,I=!f||u((function(){var e=o("Symbol")();return"[null]"!=E([e])||"{}"!=E({a:e})||"{}"!=E(Object(e))})),S=u((function(){return'"\\udf06\\ud834"'!==E("\udf06\ud834")||'"\\udead"'!==E("\udead")})),C=function(e,t){var n=d(arguments),r=h(t);if(c(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(c(r)&&(t=s(r,this,p(e),t)),!l(t))return t},i(E,null,n)},N=function(e,t,n){var r=g(n,t-1),o=g(n,t+1);return v(T,e)&&!v(R,o)||v(R,e)&&!v(T,r)?"\\u"+_(m(e,0),16):e};E&&r({target:"JSON",stat:!0,arity:3,forced:I||S},{stringify:function(e,t,n){var r=d(arguments),o=i(I?C:E,null,r);return S&&"string"==typeof o?y(o,O,N):o}})},9098:function(e,t,n){"use strict";n(7710)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(5631))},1532:function(e,t,n){n(9098)},9653:function(e,t,n){"use strict";var r=n(2109),o=n(1913),i=n(9781),s=n(7854),a=n(857),u=n(1702),c=n(4705),l=n(2597),d=n(9587),h=n(7976),f=n(2190),p=n(7593),E=n(7293),v=n(8006).f,g=n(1236).f,m=n(3070).f,y=n(863),_=n(3111).trim,O="Number",T=s[O],R=a[O],I=T.prototype,S=s.TypeError,C=u("".slice),N=u("".charCodeAt),A=c(O,!T(" 0o1")||!T("0b1")||T("+0x1")),b=function(e){var t,n=arguments.length<1?0:T(function(e){var t=p(e,"number");return"bigint"==typeof t?t:function(e){var t,n,r,o,i,s,a,u,c=p(e,"number");if(f(c))throw S("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=_(c),43===(t=N(c,0))||45===t){if(88===(n=N(c,2))||120===n)return NaN}else if(48===t){switch(N(c,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+c}for(s=(i=C(c,2)).length,a=0;a<s;a++)if((u=N(i,a))<48||u>o)return NaN;return parseInt(i,r)}return+c}(t)}(e));return h(I,t=this)&&E((function(){y(t)}))?d(Object(n),this,b):n};b.prototype=I,A&&!o&&(I.constructor=b),r({global:!0,constructor:!0,wrap:!0,forced:A},{Number:b});var M=function(e,t){for(var n,r=i?v(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;r.length>o;o++)l(t,n=r[o])&&!l(e,n)&&m(e,n,g(t,n))};o&&R&&M(a[O],R),(A||o)&&M(a[O],T)},3161:function(e,t,n){n(2109)({target:"Number",stat:!0},{isInteger:n(5988)})},4048:function(e,t,n){n(2109)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},9601:function(e,t,n){var r=n(2109),o=n(1574);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},9720:function(e,t,n){var r=n(2109),o=n(4699).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},9660:function(e,t,n){var r=n(2109),o=n(6293),i=n(7293),s=n(5181),a=n(7908);r({target:"Object",stat:!0,forced:!o||i((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(a(e)):[]}})},7941:function(e,t,n){var r=n(2109),o=n(7908),i=n(1956);r({target:"Object",stat:!0,forced:n(7293)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},1539:function(e,t,n){var r=n(1694),o=n(8052),i=n(288);r||o(Object.prototype,"toString",i,{unsafe:!0})},821:function(e,t,n){"use strict";var r=n(2109),o=n(6916),i=n(9662),s=n(8523),a=n(2534),u=n(408);r({target:"Promise",stat:!0,forced:n(612)},{all:function(e){var t=this,n=s.f(t),r=n.resolve,c=n.reject,l=a((function(){var n=i(t.resolve),s=[],a=0,l=1;u(e,(function(e){var i=a++,u=!1;l++,o(n,t,e).then((function(e){u||(u=!0,s[i]=e,--l||r(s))}),c)})),--l||r(s)}));return l.error&&c(l.value),n.promise}})},4164:function(e,t,n){"use strict";var r=n(2109),o=n(1913),i=n(3702).CONSTRUCTOR,s=n(2492),a=n(5005),u=n(614),c=n(8052),l=s&&s.prototype;if(r({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&u(s)){var d=a("Promise").prototype.catch;l.catch!==d&&c(l,"catch",d,{unsafe:!0})}},3401:function(e,t,n){"use strict";var r,o,i,s=n(2109),a=n(1913),u=n(5268),c=n(7854),l=n(6916),d=n(8052),h=n(7674),f=n(8003),p=n(6340),E=n(9662),v=n(614),g=n(111),m=n(5787),y=n(6707),_=n(261).set,O=n(5948),T=n(842),R=n(2534),I=n(8572),S=n(9909),C=n(2492),N=n(3702),A=n(8523),b="Promise",M=N.CONSTRUCTOR,L=N.REJECTION_EVENT,w=N.SUBCLASSING,U=S.getterFor(b),P=S.set,x=C&&C.prototype,D=C,k=x,H=c.TypeError,B=c.document,G=c.process,F=A.f,j=F,W=!!(B&&B.createEvent&&c.dispatchEvent),K="unhandledrejection",q=function(e){var t;return!(!g(e)||!v(t=e.then))&&t},V=function(e,t){var n,r,o,i=t.value,s=1==t.state,a=s?e.ok:e.fail,u=e.resolve,c=e.reject,d=e.domain;try{a?(s||(2===t.rejection&&Z(t),t.rejection=1),!0===a?n=i:(d&&d.enter(),n=a(i),d&&(d.exit(),o=!0)),n===e.promise?c(H("Promise-chain cycle")):(r=q(n))?l(r,n,u,c):u(n)):c(i)}catch(e){d&&!o&&d.exit(),c(e)}},J=function(e,t){e.notified||(e.notified=!0,O((function(){for(var n,r=e.reactions;n=r.get();)V(n,e);e.notified=!1,t&&!e.rejection&&Y(e)})))},z=function(e,t,n){var r,o;W?((r=B.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!L&&(o=c["on"+e])?o(r):e===K&&T("Unhandled promise rejection",n)},Y=function(e){l(_,c,(function(){var t,n=e.facade,r=e.value;if(X(e)&&(t=R((function(){u?G.emit("unhandledRejection",r,n):z(K,n,r)})),e.rejection=u||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},Z=function(e){l(_,c,(function(){var t=e.facade;u?G.emit("rejectionHandled",t):z("rejectionhandled",t,e.value)}))},Q=function(e,t,n){return function(r){e(t,r,n)}},$=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,J(e,!0))},ee=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw H("Promise can't be resolved itself");var r=q(t);r?O((function(){var n={done:!1};try{l(r,t,Q(ee,n,e),Q($,n,e))}catch(t){$(n,t,e)}})):(e.value=t,e.state=1,J(e,!1))}catch(t){$({done:!1},t,e)}}};if(M&&(k=(D=function(e){m(this,k),E(e),l(r,this);var t=U(this);try{e(Q(ee,t),Q($,t))}catch(e){$(t,e)}}).prototype,(r=function(e){P(this,{type:b,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:0,value:void 0})}).prototype=d(k,"then",(function(e,t){var n=U(this),r=F(y(this,D));return n.parent=!0,r.ok=!v(e)||e,r.fail=v(t)&&t,r.domain=u?G.domain:void 0,0==n.state?n.reactions.add(r):O((function(){V(r,n)})),r.promise})),o=function(){var e=new r,t=U(e);this.promise=e,this.resolve=Q(ee,t),this.reject=Q($,t)},A.f=F=function(e){return e===D||void 0===e?new o(e):j(e)},!a&&v(C)&&x!==Object.prototype)){i=x.then,w||d(x,"then",(function(e,t){var n=this;return new D((function(e,t){l(i,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete x.constructor}catch(e){}h&&h(x,k)}s({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:D}),f(D,b,!1,!0),p(b)},8674:function(e,t,n){n(3401),n(821),n(4164),n(6027),n(683),n(6294)},6027:function(e,t,n){"use strict";var r=n(2109),o=n(6916),i=n(9662),s=n(8523),a=n(2534),u=n(408);r({target:"Promise",stat:!0,forced:n(612)},{race:function(e){var t=this,n=s.f(t),r=n.reject,c=a((function(){var s=i(t.resolve);u(e,(function(e){o(s,t,e).then(n.resolve,r)}))}));return c.error&&r(c.value),n.promise}})},683:function(e,t,n){"use strict";var r=n(2109),o=n(6916),i=n(8523);r({target:"Promise",stat:!0,forced:n(3702).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return o(t.reject,void 0,e),t.promise}})},6294:function(e,t,n){"use strict";var r=n(2109),o=n(5005),i=n(1913),s=n(2492),a=n(3702).CONSTRUCTOR,u=n(9478),c=o("Promise"),l=i&&!a;r({target:"Promise",stat:!0,forced:i||a},{resolve:function(e){return u(l&&this===c?s:this,e)}})},4916:function(e,t,n){"use strict";var r=n(2109),o=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},9714:function(e,t,n){"use strict";var r=n(6530).PROPER,o=n(8052),i=n(9670),s=n(1340),a=n(7293),u=n(4706),c="toString",l=RegExp.prototype[c],d=a((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),h=r&&l.name!=c;(d||h)&&o(RegExp.prototype,c,(function(){var e=i(this);return"/"+s(e.source)+"/"+s(u(e))}),{unsafe:!0})},2023:function(e,t,n){"use strict";var r=n(2109),o=n(1702),i=n(3929),s=n(4488),a=n(1340),u=n(4964),c=o("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~c(a(s(this)),a(i(e)),arguments.length>1?arguments[1]:void 0)}})},8783:function(e,t,n){"use strict";var r=n(8710).charAt,o=n(1340),i=n(9909),s=n(1656),a=n(6178),u="String Iterator",c=i.set,l=i.getterFor(u);s(String,"String",(function(e){c(this,{type:u,string:o(e),index:0})}),(function(){var e,t=l(this),n=t.string,o=t.index;return o>=n.length?a(void 0,!0):(e=r(n,o),t.index+=e.length,a(e,!1))}))},4032:function(e,t,n){"use strict";var r=n(2109),o=n(7854),i=n(6916),s=n(1702),a=n(1913),u=n(9781),c=n(6293),l=n(7293),d=n(2597),h=n(7976),f=n(9670),p=n(5656),E=n(4948),v=n(1340),g=n(9114),m=n(30),y=n(1956),_=n(8006),O=n(1156),T=n(5181),R=n(1236),I=n(3070),S=n(6048),C=n(5296),N=n(8052),A=n(7045),b=n(2309),M=n(6200),L=n(3501),w=n(9711),U=n(5112),P=n(6061),x=n(6800),D=n(6532),k=n(8003),H=n(9909),B=n(2092).forEach,G=M("hidden"),F="Symbol",j="prototype",W=H.set,K=H.getterFor(F),q=Object[j],V=o.Symbol,J=V&&V[j],z=o.TypeError,Y=o.QObject,X=R.f,Z=I.f,Q=O.f,$=C.f,ee=s([].push),te=b("symbols"),ne=b("op-symbols"),re=b("wks"),oe=!Y||!Y[j]||!Y[j].findChild,ie=u&&l((function(){return 7!=m(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=X(q,t);r&&delete q[t],Z(e,t,n),r&&e!==q&&Z(q,t,r)}:Z,se=function(e,t){var n=te[e]=m(J);return W(n,{type:F,tag:e,description:t}),u||(n.description=t),n},ae=function(e,t,n){e===q&&ae(ne,t,n),f(e);var r=E(t);return f(n),d(te,r)?(n.enumerable?(d(e,G)&&e[G][r]&&(e[G][r]=!1),n=m(n,{enumerable:g(0,!1)})):(d(e,G)||Z(e,G,g(1,{})),e[G][r]=!0),ie(e,r,n)):Z(e,r,n)},ue=function(e,t){f(e);var n=p(t),r=y(n).concat(he(n));return B(r,(function(t){u&&!i(ce,n,t)||ae(e,t,n[t])})),e},ce=function(e){var t=E(e),n=i($,this,t);return!(this===q&&d(te,t)&&!d(ne,t))&&(!(n||!d(this,t)||!d(te,t)||d(this,G)&&this[G][t])||n)},le=function(e,t){var n=p(e),r=E(t);if(n!==q||!d(te,r)||d(ne,r)){var o=X(n,r);return!o||!d(te,r)||d(n,G)&&n[G][r]||(o.enumerable=!0),o}},de=function(e){var t=Q(p(e)),n=[];return B(t,(function(e){d(te,e)||d(L,e)||ee(n,e)})),n},he=function(e){var t=e===q,n=Q(t?ne:p(e)),r=[];return B(n,(function(e){!d(te,e)||t&&!d(q,e)||ee(r,te[e])})),r};c||(V=function(){if(h(J,this))throw z("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,t=w(e),n=function(e){this===q&&i(n,ne,e),d(this,G)&&d(this[G],t)&&(this[G][t]=!1),ie(this,t,g(1,e))};return u&&oe&&ie(q,t,{configurable:!0,set:n}),se(t,e)},N(J=V[j],"toString",(function(){return K(this).tag})),N(V,"withoutSetter",(function(e){return se(w(e),e)})),C.f=ce,I.f=ae,S.f=ue,R.f=le,_.f=O.f=de,T.f=he,P.f=function(e){return se(U(e),e)},u&&(A(J,"description",{configurable:!0,get:function(){return K(this).description}}),a||N(q,"propertyIsEnumerable",ce,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),B(y(re),(function(e){x(e)})),r({target:F,stat:!0,forced:!c},{useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(e,t){return void 0===t?m(e):ue(m(e),t)},defineProperty:ae,defineProperties:ue,getOwnPropertyDescriptor:le}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:de}),D(),k(V,F),L[G]=!0},1817:function(e,t,n){"use strict";var r=n(2109),o=n(9781),i=n(7854),s=n(1702),a=n(2597),u=n(614),c=n(7976),l=n(1340),d=n(7045),h=n(9920),f=i.Symbol,p=f&&f.prototype;if(o&&u(f)&&(!("description"in p)||void 0!==f().description)){var E={},v=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(p,this)?new f(e):void 0===e?f():f(e);return""===e&&(E[t]=!0),t};h(v,f),v.prototype=p,p.constructor=v;var g="Symbol(test)"==String(f("test")),m=s(p.valueOf),y=s(p.toString),_=/^Symbol\((.*)\)[^)]+$/,O=s("".replace),T=s("".slice);d(p,"description",{configurable:!0,get:function(){var e=m(this);if(a(E,e))return"";var t=y(e),n=g?T(t,7,-1):O(t,_,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:v})}},763:function(e,t,n){var r=n(2109),o=n(5005),i=n(2597),s=n(1340),a=n(2309),u=n(2015),c=a("string-to-symbol-registry"),l=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=s(e);if(i(c,t))return c[t];var n=o("Symbol")(t);return c[t]=n,l[n]=t,n}})},2165:function(e,t,n){n(6800)("iterator")},2526:function(e,t,n){n(4032),n(763),n(6620),n(8862),n(9660)},6620:function(e,t,n){var r=n(2109),o=n(2597),i=n(2190),s=n(6330),a=n(2309),u=n(2015),c=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!i(e))throw TypeError(s(e)+" is not a symbol");if(o(c,e))return c[e]}})},2990:function(e,t,n){"use strict";var r=n(1702),o=n(260),i=r(n(1048)),s=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(e,t){return i(s(this),e,t,arguments.length>2?arguments[2]:void 0)}))},8927:function(e,t,n){"use strict";var r=n(260),o=n(2092).every,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3105:function(e,t,n){"use strict";var r=n(260),o=n(1285),i=n(4599),s=n(648),a=n(6916),u=n(1702),c=n(7293),l=r.aTypedArray,d=r.exportTypedArrayMethod,h=u("".slice);d("fill",(function(e){var t=arguments.length;l(this);var n="Big"===h(s(this),0,3)?i(e):+e;return a(o,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},5035:function(e,t,n){"use strict";var r=n(260),o=n(2092).filter,i=n(3074),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(e){var t=o(s(this),e,arguments.length>1?arguments[1]:void 0);return i(this,t)}))},7174:function(e,t,n){"use strict";var r=n(260),o=n(2092).findIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},4345:function(e,t,n){"use strict";var r=n(260),o=n(2092).find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2846:function(e,t,n){"use strict";var r=n(260),o=n(2092).forEach,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},8145:function(e,t,n){"use strict";var r=n(3832);(0,n(260).exportTypedArrayStaticMethod)("from",n(7321),r)},4731:function(e,t,n){"use strict";var r=n(260),o=n(1318).includes,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},7209:function(e,t,n){"use strict";var r=n(260),o=n(1318).indexOf,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},6319:function(e,t,n){"use strict";var r=n(7854),o=n(7293),i=n(1702),s=n(260),a=n(6992),u=n(5112)("iterator"),c=r.Uint8Array,l=i(a.values),d=i(a.keys),h=i(a.entries),f=s.aTypedArray,p=s.exportTypedArrayMethod,E=c&&c.prototype,v=!o((function(){E[u].call([1])})),g=!!E&&E.values&&E[u]===E.values&&"values"===E.values.name,m=function(){return l(f(this))};p("entries",(function(){return h(f(this))}),v),p("keys",(function(){return d(f(this))}),v),p("values",m,v||!g,{name:"values"}),p(u,m,v||!g,{name:"values"})},8867:function(e,t,n){"use strict";var r=n(260),o=n(1702),i=r.aTypedArray,s=r.exportTypedArrayMethod,a=o([].join);s("join",(function(e){return a(i(this),e)}))},7789:function(e,t,n){"use strict";var r=n(260),o=n(2104),i=n(6583),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return o(i,s(this),t>1?[e,arguments[1]]:[e])}))},3739:function(e,t,n){"use strict";var r=n(260),o=n(2092).map,i=n(6304),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("map",(function(e){return o(s(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(i(e))(t)}))}))},4483:function(e,t,n){"use strict";var r=n(260),o=n(3671).right,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},9368:function(e,t,n){"use strict";var r=n(260),o=n(3671).left,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},2056:function(e,t,n){"use strict";var r=n(260),o=r.aTypedArray,i=r.exportTypedArrayMethod,s=Math.floor;i("reverse",(function(){for(var e,t=this,n=o(t).length,r=s(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t}))},3462:function(e,t,n){"use strict";var r=n(7854),o=n(6916),i=n(260),s=n(6244),a=n(4590),u=n(7908),c=n(7293),l=r.RangeError,d=r.Int8Array,h=d&&d.prototype,f=h&&h.set,p=i.aTypedArray,E=i.exportTypedArrayMethod,v=!c((function(){var e=new Uint8ClampedArray(2);return o(f,e,{length:1,0:3},1),3!==e[1]})),g=v&&i.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));E("set",(function(e){p(this);var t=a(arguments.length>1?arguments[1]:void 0,1),n=u(e);if(v)return o(f,this,n,t);var r=this.length,i=s(n),c=0;if(i+t>r)throw l("Wrong length");for(;c<i;)this[t+c]=n[c++]}),!v||g)},678:function(e,t,n){"use strict";var r=n(260),o=n(6304),i=n(7293),s=n(206),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("slice",(function(e,t){for(var n=s(a(this),e,t),r=o(this),i=0,u=n.length,c=new r(u);u>i;)c[i]=n[i++];return c}),i((function(){new Int8Array(1).slice()})))},7462:function(e,t,n){"use strict";var r=n(260),o=n(2092).some,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3824:function(e,t,n){"use strict";var r=n(7854),o=n(1470),i=n(7293),s=n(9662),a=n(4362),u=n(260),c=n(8886),l=n(256),d=n(7392),h=n(8008),f=u.aTypedArray,p=u.exportTypedArrayMethod,E=r.Uint16Array,v=E&&o(E.prototype.sort),g=!(!v||i((function(){v(new E(2),null)}))&&i((function(){v(new E(2),{})}))),m=!!v&&!i((function(){if(d)return d<74;if(c)return c<67;if(l)return!0;if(h)return h<602;var e,t,n=new E(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(v(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));p("sort",(function(e){return void 0!==e&&s(e),m?v(this,e):a(f(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!m||g)},5021:function(e,t,n){"use strict";var r=n(260),o=n(7466),i=n(1400),s=n(6304),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=a(this),r=n.length,u=i(e,r);return new(s(n))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,o((void 0===t?r:i(t,r))-u))}))},2974:function(e,t,n){"use strict";var r=n(7854),o=n(2104),i=n(260),s=n(7293),a=n(206),u=r.Int8Array,c=i.aTypedArray,l=i.exportTypedArrayMethod,d=[].toLocaleString,h=!!u&&s((function(){d.call(new u(1))}));l("toLocaleString",(function(){return o(d,h?a(c(this)):c(this),a(arguments))}),s((function(){return[1,2].toLocaleString()!=new u([1,2]).toLocaleString()}))||!s((function(){u.prototype.toLocaleString.call([1,2])})))},5016:function(e,t,n){"use strict";var r=n(260).exportTypedArrayMethod,o=n(7293),i=n(7854),s=n(1702),a=i.Uint8Array,u=a&&a.prototype||{},c=[].toString,l=s([].join);o((function(){c.call({})}))&&(c=function(){return l(this)});var d=u.toString!=c;r("toString",c,d)},2472:function(e,t,n){n(9843)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},4747:function(e,t,n){var r=n(7854),o=n(8324),i=n(8509),s=n(8533),a=n(8880),u=function(e){if(e&&e.forEach!==s)try{a(e,"forEach",s)}catch(t){e.forEach=s}};for(var c in o)o[c]&&u(r[c]&&r[c].prototype);u(i)},3948:function(e,t,n){var r=n(7854),o=n(8324),i=n(8509),s=n(6992),a=n(8880),u=n(5112),c=u("iterator"),l=u("toStringTag"),d=s.values,h=function(e,t){if(e){if(e[c]!==d)try{a(e,c,d)}catch(t){e[c]=d}if(e[l]||a(e,l,t),o[t])for(var n in s)if(e[n]!==s[n])try{a(e,n,s[n])}catch(t){e[n]=s[n]}}};for(var f in o)h(r[f]&&r[f].prototype,f);h(i,"DOMTokenList")},6815:function(e,t,n){var r=n(2109),o=n(7854),i=n(7152)(o.setInterval,!0);r({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},8417:function(e,t,n){var r=n(2109),o=n(7854),i=n(7152)(o.setTimeout,!0);r({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},2564:function(e,t,n){n(6815),n(8417)},5556:function(e,t,n){"use strict";n(6992);var r=n(2109),o=n(7854),i=n(6916),s=n(1702),a=n(9781),u=n(5143),c=n(8052),l=n(7045),d=n(9190),h=n(8003),f=n(3061),p=n(9909),E=n(5787),v=n(614),g=n(2597),m=n(9974),y=n(648),_=n(9670),O=n(111),T=n(1340),R=n(30),I=n(9114),S=n(4121),C=n(1246),N=n(8053),A=n(5112),b=n(4362),M=A("iterator"),L="URLSearchParams",w=L+"Iterator",U=p.set,P=p.getterFor(L),x=p.getterFor(w),D=Object.getOwnPropertyDescriptor,k=function(e){if(!a)return o[e];var t=D(o,e);return t&&t.value},H=k("fetch"),B=k("Request"),G=k("Headers"),F=B&&B.prototype,j=G&&G.prototype,W=o.RegExp,K=o.TypeError,q=o.decodeURIComponent,V=o.encodeURIComponent,J=s("".charAt),z=s([].join),Y=s([].push),X=s("".replace),Z=s([].shift),Q=s([].splice),$=s("".split),ee=s("".slice),te=/\+/g,ne=Array(4),re=function(e){return ne[e-1]||(ne[e-1]=W("((?:%[\\da-f]{2}){"+e+"})","gi"))},oe=function(e){try{return q(e)}catch(t){return e}},ie=function(e){var t=X(e,te," "),n=4;try{return q(t)}catch(e){for(;n;)t=X(t,re(n--),oe);return t}},se=/[!'()~]|%20/g,ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ue=function(e){return ae[e]},ce=function(e){return X(V(e),se,ue)},le=f((function(e,t){U(this,{type:w,iterator:S(P(e).entries),kind:t})}),"Iterator",(function(){var e=x(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),de=function(e){this.entries=[],this.url=null,void 0!==e&&(O(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===J(e,0)?ee(e,1):e:T(e)))};de.prototype={type:L,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,s,a,u,c=C(e);if(c)for(n=(t=S(e,c)).next;!(r=i(n,t)).done;){if(s=(o=S(_(r.value))).next,(a=i(s,o)).done||(u=i(s,o)).done||!i(s,o).done)throw K("Expected sequence with length 2");Y(this.entries,{key:T(a.value),value:T(u.value)})}else for(var l in e)g(e,l)&&Y(this.entries,{key:l,value:T(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=$(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=$(t,"="),Y(this.entries,{key:ie(Z(n)),value:ie(z(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Y(n,ce(e.key)+"="+ce(e.value));return z(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var he=function(){E(this,fe);var e=U(this,new de(arguments.length>0?arguments[0]:void 0));a||(this.length=e.entries.length)},fe=he.prototype;if(d(fe,{append:function(e,t){N(arguments.length,2);var n=P(this);Y(n.entries,{key:T(e),value:T(t)}),a||this.length++,n.updateURL()},delete:function(e){N(arguments.length,1);for(var t=P(this),n=t.entries,r=T(e),o=0;o<n.length;)n[o].key===r?Q(n,o,1):o++;a||(this.length=n.length),t.updateURL()},get:function(e){N(arguments.length,1);for(var t=P(this).entries,n=T(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){N(arguments.length,1);for(var t=P(this).entries,n=T(e),r=[],o=0;o<t.length;o++)t[o].key===n&&Y(r,t[o].value);return r},has:function(e){N(arguments.length,1);for(var t=P(this).entries,n=T(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){N(arguments.length,1);for(var n,r=P(this),o=r.entries,i=!1,s=T(e),u=T(t),c=0;c<o.length;c++)(n=o[c]).key===s&&(i?Q(o,c--,1):(i=!0,n.value=u));i||Y(o,{key:s,value:u}),a||(this.length=o.length),r.updateURL()},sort:function(){var e=P(this);b(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=P(this).entries,r=m(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new le(this,"keys")},values:function(){return new le(this,"values")},entries:function(){return new le(this,"entries")}},{enumerable:!0}),c(fe,M,fe.entries,{name:"entries"}),c(fe,"toString",(function(){return P(this).serialize()}),{enumerable:!0}),a&&l(fe,"size",{get:function(){return P(this).entries.length},configurable:!0,enumerable:!0}),h(he,L),r({global:!0,constructor:!0,forced:!u},{URLSearchParams:he}),!u&&v(G)){var pe=s(j.has),Ee=s(j.set),ve=function(e){if(O(e)){var t,n=e.body;if(y(n)===L)return t=e.headers?new G(e.headers):new G,pe(t,"content-type")||Ee(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),R(e,{body:I(0,T(n)),headers:I(0,t)})}return e};if(v(H)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return H(e,arguments.length>1?ve(arguments[1]):{})}}),v(B)){var ge=function(e){return E(this,F),new B(e,arguments.length>1?ve(arguments[1]):{})};F.constructor=ge,ge.prototype=F,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ge})}}e.exports={URLSearchParams:he,getState:P}},1637:function(e,t,n){n(5556)},8789:function(e,t,n){"use strict";n(8783);var r,o=n(2109),i=n(9781),s=n(5143),a=n(7854),u=n(9974),c=n(1702),l=n(8052),d=n(7045),h=n(5787),f=n(2597),p=n(1574),E=n(8457),v=n(1589),g=n(8710).codeAt,m=n(3197),y=n(1340),_=n(8003),O=n(8053),T=n(5556),R=n(9909),I=R.set,S=R.getterFor("URL"),C=T.URLSearchParams,N=T.getState,A=a.URL,b=a.TypeError,M=a.parseInt,L=Math.floor,w=Math.pow,U=c("".charAt),P=c(/./.exec),x=c([].join),D=c(1..toString),k=c([].pop),H=c([].push),B=c("".replace),G=c([].shift),F=c("".split),j=c("".slice),W=c("".toLowerCase),K=c([].unshift),q="Invalid scheme",V="Invalid host",J="Invalid port",z=/[a-z]/i,Y=/[\d+-.a-z]/i,X=/\d/,Z=/^0x/i,Q=/^[0-7]+$/,$=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ne=/[\0\t\n\r #/:<>?@[\\\]^|]/,re=/^[\u0000-\u0020]+/,oe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ie=/[\t\n\r]/g,se=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)K(t,e%256),e=L(e/256);return x(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=D(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ae={},ue=p({},ae,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=p({},ue,{"#":1,"?":1,"{":1,"}":1}),le=p({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),de=function(e,t){var n=g(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},he={ftp:21,file:null,http:80,https:443,ws:80,wss:443},fe=function(e,t){var n;return 2==e.length&&P(z,U(e,0))&&(":"==(n=U(e,1))||!t&&"|"==n)},pe=function(e){var t;return e.length>1&&fe(j(e,0,2))&&(2==e.length||"/"===(t=U(e,2))||"\\"===t||"?"===t||"#"===t)},Ee=function(e){return"."===e||"%2e"===W(e)},ve={},ge={},me={},ye={},_e={},Oe={},Te={},Re={},Ie={},Se={},Ce={},Ne={},Ae={},be={},Me={},Le={},we={},Ue={},Pe={},xe={},De={},ke=function(e,t,n){var r,o,i,s=y(e);if(t){if(o=this.parse(s))throw b(o);this.searchParams=null}else{if(void 0!==n&&(r=new ke(n,!0)),o=this.parse(s,null,r))throw b(o);(i=N(new C)).bindURL(this),this.searchParams=i}};ke.prototype={type:"URL",parse:function(e,t,n){var o,i,s,a,u,c=this,l=t||ve,d=0,h="",p=!1,g=!1,m=!1;for(e=y(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=B(e,re,""),e=B(e,oe,"$1")),e=B(e,ie,""),o=E(e);d<=o.length;){switch(i=o[d],l){case ve:if(!i||!P(z,i)){if(t)return q;l=me;continue}h+=W(i),l=ge;break;case ge:if(i&&(P(Y,i)||"+"==i||"-"==i||"."==i))h+=W(i);else{if(":"!=i){if(t)return q;h="",l=me,d=0;continue}if(t&&(c.isSpecial()!=f(he,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,t)return void(c.isSpecial()&&he[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?l=be:c.isSpecial()&&n&&n.scheme==c.scheme?l=ye:c.isSpecial()?l=Re:"/"==o[d+1]?(l=_e,d++):(c.cannotBeABaseURL=!0,H(c.path,""),l=Pe)}break;case me:if(!n||n.cannotBeABaseURL&&"#"!=i)return q;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=v(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=De;break}l="file"==n.scheme?be:Oe;continue;case ye:if("/"!=i||"/"!=o[d+1]){l=Oe;continue}l=Ie,d++;break;case _e:if("/"==i){l=Se;break}l=Ue;continue;case Oe:if(c.scheme=n.scheme,i==r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())l=Te;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query="",l=xe;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.path.length--,l=Ue;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query,c.fragment="",l=De}break;case Te:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,l=Ue;continue}l=Se}else l=Ie;break;case Re:if(l=Ie,"/"!=i||"/"!=U(h,d+1))continue;d++;break;case Ie:if("/"!=i&&"\\"!=i){l=Se;continue}break;case Se:if("@"==i){p&&(h="%40"+h),p=!0,s=E(h);for(var _=0;_<s.length;_++){var O=s[_];if(":"!=O||m){var T=de(O,le);m?c.password+=T:c.username+=T}else m=!0}h=""}else if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(p&&""==h)return"Invalid authority";d-=E(h).length+1,h="",l=Ce}else h+=i;break;case Ce:case Ne:if(t&&"file"==c.scheme){l=Le;continue}if(":"!=i||g){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==h)return V;if(t&&""==h&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(h))return a;if(h="",l=we,t)return;continue}"["==i?g=!0:"]"==i&&(g=!1),h+=i}else{if(""==h)return V;if(a=c.parseHost(h))return a;if(h="",l=Ae,t==Ne)return}break;case Ae:if(!P(X,i)){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=h){var R=M(h,10);if(R>65535)return J;c.port=c.isSpecial()&&R===he[c.scheme]?null:R,h=""}if(t)return;l=we;continue}return J}h+=i;break;case be:if(c.scheme="file","/"==i||"\\"==i)l=Me;else{if(!n||"file"!=n.scheme){l=Ue;continue}if(i==r)c.host=n.host,c.path=v(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=v(n.path),c.query="",l=xe;else{if("#"!=i){pe(x(v(o,d),""))||(c.host=n.host,c.path=v(n.path),c.shortenPath()),l=Ue;continue}c.host=n.host,c.path=v(n.path),c.query=n.query,c.fragment="",l=De}}break;case Me:if("/"==i||"\\"==i){l=Le;break}n&&"file"==n.scheme&&!pe(x(v(o,d),""))&&(fe(n.path[0],!0)?H(c.path,n.path[0]):c.host=n.host),l=Ue;continue;case Le:if(i==r||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&fe(h))l=Ue;else if(""==h){if(c.host="",t)return;l=we}else{if(a=c.parseHost(h))return a;if("localhost"==c.host&&(c.host=""),t)return;h="",l=we}continue}h+=i;break;case we:if(c.isSpecial()){if(l=Ue,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=r&&(l=Ue,"/"!=i))continue}else c.fragment="",l=De;else c.query="",l=xe;break;case Ue:if(i==r||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(u=W(u=h))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||H(c.path,"")):Ee(h)?"/"==i||"\\"==i&&c.isSpecial()||H(c.path,""):("file"==c.scheme&&!c.path.length&&fe(h)&&(c.host&&(c.host=""),h=U(h,0)+":"),H(c.path,h)),h="","file"==c.scheme&&(i==r||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)G(c.path);"?"==i?(c.query="",l=xe):"#"==i&&(c.fragment="",l=De)}else h+=de(i,ce);break;case Pe:"?"==i?(c.query="",l=xe):"#"==i?(c.fragment="",l=De):i!=r&&(c.path[0]+=de(i,ae));break;case xe:t||"#"!=i?i!=r&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":de(i,ae)):(c.fragment="",l=De);break;case De:i!=r&&(c.fragment+=de(i,ue))}d++}},parseHost:function(e){var t,n,r;if("["==U(e,0)){if("]"!=U(e,e.length-1))return V;if(t=function(e){var t,n,r,o,i,s,a,u=[0,0,0,0,0,0,0,0],c=0,l=null,d=0,h=function(){return U(e,d)};if(":"==h()){if(":"!=U(e,1))return;d+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&P(ee,h());)t=16*t+M(h(),16),d++,n++;if("."==h()){if(0==n)return;if(d-=n,c>6)return;for(r=0;h();){if(o=null,r>0){if(!("."==h()&&r<4))return;d++}if(!P(X,h()))return;for(;P(X,h());){if(i=M(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;d++}u[c]=256*u[c]+o,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==h()){if(d++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;d++,l=++c}}if(null!==l)for(s=c-l,c=7;0!=c&&s>0;)a=u[c],u[c--]=u[l+s-1],u[l+--s]=a;else if(8!=c)return;return u}(j(e,1,-1)),!t)return V;this.host=t}else if(this.isSpecial()){if(e=m(e),P(te,e))return V;if(t=function(e){var t,n,r,o,i,s,a,u=F(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(o=u[r]))return e;if(i=10,o.length>1&&"0"==U(o,0)&&(i=P(Z,o)?16:8,o=j(o,8==i?1:2)),""===o)s=0;else{if(!P(10==i?$:8==i?Q:ee,o))return e;s=M(o,i)}H(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=w(256,5-t))return null}else if(s>255)return null;for(a=k(n),r=0;r<n.length;r++)a+=n[r]*w(256,3-r);return a}(e),null===t)return V;this.host=t}else{if(P(ne,e))return V;for(t="",n=E(e),r=0;r<n.length;r++)t+=de(n[r],ae);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return f(he,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&fe(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,s=e.path,a=e.query,u=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=se(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+x(s,"/"):"",null!==a&&(c+="?"+a),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw b(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new He(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+se(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(y(e)+":",ve)},getUsername:function(){return this.username},setUsername:function(e){var t=E(y(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=de(t[n],le)}},getPassword:function(){return this.password},setPassword:function(e){var t=E(y(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=de(t[n],le)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?se(e):se(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ce)},getHostname:function(){var e=this.host;return null===e?"":se(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ne)},getPort:function(){var e=this.port;return null===e?"":y(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=y(e))?this.port=null:this.parse(e,Ae))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+x(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,we))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=y(e))?this.query=null:("?"==U(e,0)&&(e=j(e,1)),this.query="",this.parse(e,xe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=y(e))?("#"==U(e,0)&&(e=j(e,1)),this.fragment="",this.parse(e,De)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var He=function(e){var t=h(this,Be),n=O(arguments.length,1)>1?arguments[1]:void 0,r=I(t,new ke(e,!1,n));i||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Be=He.prototype,Ge=function(e,t){return{get:function(){return S(this)[e]()},set:t&&function(e){return S(this)[t](e)},configurable:!0,enumerable:!0}};if(i&&(d(Be,"href",Ge("serialize","setHref")),d(Be,"origin",Ge("getOrigin")),d(Be,"protocol",Ge("getProtocol","setProtocol")),d(Be,"username",Ge("getUsername","setUsername")),d(Be,"password",Ge("getPassword","setPassword")),d(Be,"host",Ge("getHost","setHost")),d(Be,"hostname",Ge("getHostname","setHostname")),d(Be,"port",Ge("getPort","setPort")),d(Be,"pathname",Ge("getPathname","setPathname")),d(Be,"search",Ge("getSearch","setSearch")),d(Be,"searchParams",Ge("getSearchParams")),d(Be,"hash",Ge("getHash","setHash"))),l(Be,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(Be,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),A){var Fe=A.createObjectURL,je=A.revokeObjectURL;Fe&&l(He,"createObjectURL",u(Fe,A)),je&&l(He,"revokeObjectURL",u(je,A))}_(He,"URL"),o({global:!0,constructor:!0,forced:!s,sham:!i},{URL:He})},285:function(e,t,n){n(8789)},3720:function(e){e.exports=n;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function n(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function r(e){return!0===(e&&e.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=r;var o={},i={};function s(e,t){var n,r,s;return t?(s=0<=(e>>>=0)&&e<256)&&(r=i[e])?r:(n=u(e,(0|e)<0?-1:0,!0),s&&(i[e]=n),n):(s=-128<=(e|=0)&&e<128)&&(r=o[e])?r:(n=u(e,e<0?-1:0,!1),s&&(o[e]=n),n)}function a(e,t){if(isNaN(e))return t?g:v;if(t){if(e<0)return g;if(e>=f)return T}else{if(e<=-p)return R;if(e+1>=p)return O}return e<0?a(-e,t).neg():u(e%h|0,e/h|0,t)}function u(e,t,r){return new n(e,t,r)}n.fromInt=s,n.fromNumber=a,n.fromBits=u;var c=Math.pow;function l(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return v;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return l(e.substring(1),t,n).neg();for(var o=a(c(n,8)),i=v,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),d=parseInt(e.substring(s,s+u),n);if(u<8){var h=a(c(n,u));i=i.mul(h).add(a(d))}else i=(i=i.mul(o)).add(a(d))}return i.unsigned=t,i}function d(e,t){return"number"==typeof e?a(e,t):"string"==typeof e?l(e,t):u(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}n.fromString=l,n.fromValue=d;var h=4294967296,f=h*h,p=f/2,E=s(1<<24),v=s(0);n.ZERO=v;var g=s(0,!0);n.UZERO=g;var m=s(1);n.ONE=m;var y=s(1,!0);n.UONE=y;var _=s(-1);n.NEG_ONE=_;var O=u(-1,2147483647,!1);n.MAX_VALUE=O;var T=u(-1,-1,!0);n.MAX_UNSIGNED_VALUE=T;var R=u(0,-2147483648,!1);n.MIN_VALUE=R;var I=n.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(R)){var t=a(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=a(c(e,6),this.unsigned),i=this,s="";;){var u=i.div(o),l=(i.sub(u.mul(o)).toInt()>>>0).toString(e);if((i=u).isZero())return l+s;for(;l.length<6;)l="0"+l;s=""+l+s}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(R)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return 1==(1&this.low)},I.isEven=function(){return 0==(1&this.low)},I.equals=function(e){return r(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(e){if(r(e)||(e=d(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(R)?R:this.not().add(m)},I.neg=I.negate,I.add=function(e){r(e)||(e=d(e));var t=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=e.high>>>16,a=65535&e.high,c=e.low>>>16,l=0,h=0,f=0,p=0;return f+=(p+=i+(65535&e.low))>>>16,h+=(f+=o+c)>>>16,l+=(h+=n+a)>>>16,l+=t+s,u((f&=65535)<<16|(p&=65535),(l&=65535)<<16|(h&=65535),this.unsigned)},I.subtract=function(e){return r(e)||(e=d(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return v;if(r(e)||(e=d(e)),t)return u(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return v;if(this.eq(R))return e.isOdd()?R:v;if(e.eq(R))return this.isOdd()?R:v;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(E)&&e.lt(E))return a(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,i=this.low>>>16,s=65535&this.low,c=e.high>>>16,l=65535&e.high,h=e.low>>>16,f=65535&e.low,p=0,g=0,m=0,y=0;return m+=(y+=s*f)>>>16,g+=(m+=i*f)>>>16,m&=65535,g+=(m+=s*h)>>>16,p+=(g+=o*f)>>>16,g&=65535,p+=(g+=i*h)>>>16,g&=65535,p+=(g+=s*l)>>>16,p+=n*f+o*h+i*l+s*c,u((m&=65535)<<16|(y&=65535),(p&=65535)<<16|(g&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(r(e)||(e=d(e)),e.isZero())throw Error("division by zero");var n,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?u((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?g:v;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return g;if(e.gt(this.shru(1)))return y;i=g}else{if(this.eq(R))return e.eq(m)||e.eq(_)?R:e.eq(R)?m:(n=this.shr(1).div(e).shl(1)).eq(v)?e.isNegative()?m:_:(o=this.sub(e.mul(n)),i=n.add(o.div(e)));if(e.eq(R))return this.unsigned?g:v;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=v}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),l=s<=48?1:c(2,s-48),h=a(n),f=h.mul(e);f.isNegative()||f.gt(o);)f=(h=a(n-=l,this.unsigned)).mul(e);h.isZero()&&(h=m),i=i.add(h),o=o.sub(f)}return i},I.div=I.divide,I.modulo=function(e){return r(e)||(e=d(e)),t?u((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return u(~this.low,~this.high,this.unsigned)},I.and=function(e){return r(e)||(e=d(e)),u(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return r(e)||(e=d(e)),u(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return r(e)||(e=d(e)),u(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):u(0,this.low<<e-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):u(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(r(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?u(this.low>>>e|t<<32-e,t>>>e,this.unsigned):u(32===e?t:t>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},I.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},3281:function(e,t,n){"use strict";e.exports=n(9050)},2967:function(e){"use strict";e.exports=r;var t,n=/\/|\./;function r(e,t){n.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),r[e]=t}r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),r("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:t}),r("empty",{Empty:{fields:{}}}),r("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),r("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),r("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),r.get=function(e){return r[e]||null}},3996:function(e,t,n){"use strict";var r=t,o=n(7025),i=n(9935);function s(e,t,n,r){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",r);for(var i=t.resolvedType.values,s=Object.keys(i),a=0;a<s.length;++a)t.repeated&&i[s[a]]===t.typeDefault&&e("default:"),e("case%j:",s[a])("case %i:",i[s[a]])("m%s=%j",r,i[s[a]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,n,r);else{var u=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,u)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,u?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function a(e,t,n,r){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,n,r,r):e("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}r.fromObject=function(e){var t=e.fieldsArray,n=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r<t.length;++r){var a=t[r].resolve(),u=i.safeProp(a.name);a.map?(n("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),s(n,a,r,u+"[ks[i]]")("}")("}")):a.repeated?(n("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),s(n,a,r,u+"[i]")("}")("}")):(a.resolvedType instanceof o||n("if(d%s!=null){",u),s(n,a,r,u),a.resolvedType instanceof o||n("}"))}return n("return m")},r.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var n=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],s=[],u=[],c=0;c<t.length;++c)t[c].partOf||(t[c].resolve().repeated?r:t[c].map?s:u).push(t[c]);if(r.length){for(n("if(o.arrays||o.defaults){"),c=0;c<r.length;++c)n("d%s=[]",i.safeProp(r[c].name));n("}")}if(s.length){for(n("if(o.objects||o.defaults){"),c=0;c<s.length;++c)n("d%s={}",i.safeProp(s[c].name));n("}")}if(u.length){for(n("if(o.defaults){"),c=0;c<u.length;++c){var l=u[c],d=i.safeProp(l.name);if(l.resolvedType instanceof o)n("d%s=o.enums===String?%j:%j",d,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",d)("}else")("d%s=o.longs===String?%j:%i",d,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var h="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";n("if(o.bytes===String)d%s=%j",d,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",d,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",d,d)("}")}else n("d%s=%j",d,l.typeDefault)}n("}")}var f=!1;for(c=0;c<t.length;++c){l=t[c];var p=e._fieldsArray.indexOf(l);d=i.safeProp(l.name),l.map?(f||(f=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",d,d)("d%s={}",d)("for(var j=0;j<ks2.length;++j){"),a(n,l,p,d+"[ks2[j]]")("}")):l.repeated?(n("if(m%s&&m%s.length){",d,d)("d%s=[]",d)("for(var j=0;j<m%s.length;++j){",d),a(n,l,p,d+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",d,l.name),a(n,l,p,d),l.partOf&&n("if(o.oneofs)")("d%s=%j",i.safeProp(l.partOf.name),l.name)),n("}")}return n("return d")}},5305:function(e,t,n){"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var n=0;n<e.fieldsArray.length;++n){var a=e._fieldsArray[n].resolve(),u=a.resolvedType instanceof r?"int32":a.type,c="m"+i.safeProp(a.name);t("case %i:",a.id),a.map?(t("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[a.keyType]?t("k=%j",o.defaults[a.keyType]):t("k=null"),void 0!==o.defaults[u]?t("value=%j",o.defaults[u]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===o.basic[u]?t("value=types[%i].decode(r,r.uint32())",n):t("value=r.%s()",u),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',c):t("%s[k]=value",c)):a.repeated?(t("if(!(%s&&%s.length))",c,c)("%s=[]",c),void 0!==o.packed[u]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,u)("}else"),void 0===o.basic[u]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,n):t("%s.push(r.%s())",c,u)):void 0===o.basic[u]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,n):t("%s=r.%s()",c,u),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),n=0;n<e._fieldsArray.length;++n){var l=e._fieldsArray[n];l.required&&t("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",s(l))}return t("return m")};var r=n(7025),o=n(7063),i=n(9935);function s(e){return"missing required '"+e.name+"'"}},4928:function(e,t,n){"use strict";e.exports=function(e){for(var t,n=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),u=0;u<a.length;++u){var c=a[u].resolve(),l=e._fieldsArray.indexOf(c),d=c.resolvedType instanceof r?"int32":c.type,h=o.basic[d];t="m"+i.safeProp(c.name),c.map?(n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|o.mapKey[c.keyType],c.keyType),void 0===h?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,d,t),n("}")("}")):c.repeated?(n("if(%s!=null&&%s.length){",t,t),c.packed&&void 0!==o.packed[d]?n("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",d,t)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",t),void 0===h?s(n,c,l,t+"[i]"):n("w.uint32(%i).%s(%s[i])",(c.id<<3|h)>>>0,d,t)),n("}")):(c.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===h?s(n,c,l,t):n("w.uint32(%i).%s(%s)",(c.id<<3|h)>>>0,d,t))}return n("return w")};var r=n(7025),o=n(7063),i=n(9935);function s(e,t,n,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(t.id<<3|2)>>>0)}},7025:function(e,t,n){"use strict";e.exports=s;var r=n(3243);((s.prototype=Object.create(r.prototype)).constructor=s).className="Enum";var o=n(9313),i=n(9935);function s(e,t,n,o,i){if(r.call(this,e,n),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.reserved=void 0,t)for(var s=Object.keys(t),a=0;a<s.length;++a)"number"==typeof t[s[a]]&&(this.valuesById[this.values[s[a]]=t[s[a]]]=s[a])}s.fromJSON=function(e,t){var n=new s(e,t.values,t.options,t.comment,t.comments);return n.reserved=t.reserved,n},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,n){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=n||null,this},s.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},s.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},3548:function(e,t,n){"use strict";e.exports=c;var r=n(3243);((c.prototype=Object.create(r.prototype)).constructor=c).className="Field";var o,i=n(7025),s=n(7063),a=n(9935),u=/^required|optional|repeated$/;function c(e,t,n,o,i,c,l){if(a.isObject(o)?(l=i,c=o,o=i=void 0):a.isObject(i)&&(l=c,c=i,i=void 0),r.call(this,e,c),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(n))throw TypeError("type must be a string");if(void 0!==o&&!u.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=n,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[n],this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}c.fromJSON=function(e,t){return new c(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),c.prototype.setOption=function(e,t,n){return"packed"===e&&(this._packed=null),r.prototype.setOption.call(this,e,t,n)},c.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},c.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},c.d=function(e,t,n,r){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(o,i){a.decorateType(o.constructor).add(new c(i,e,t,n,{default:r}))}},c._configure=function(e){o=e}},8836:function(e,t,n){"use strict";var r=e.exports=n(9482);r.build="light",r.load=function(e,t,n){return"function"==typeof t?(n=t,t=new r.Root):t||(t=new r.Root),t.load(e,n)},r.loadSync=function(e,t){return t||(t=new r.Root),t.loadSync(e)},r.encoder=n(4928),r.decoder=n(5305),r.verifier=n(4497),r.converter=n(3996),r.ReflectionObject=n(3243),r.Namespace=n(9313),r.Root=n(9424),r.Enum=n(7025),r.Type=n(7645),r.Field=n(3548),r.OneOf=n(7598),r.MapField=n(6039),r.Service=n(7513),r.Method=n(4429),r.Message=n(8368),r.wrappers=n(1667),r.types=n(7063),r.util=n(9935),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},9482:function(e,t,n){"use strict";var r=t;function o(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(1173),r.BufferWriter=n(3155),r.Reader=n(1408),r.BufferReader=n(593),r.util=n(9693),r.rpc=n(5994),r.roots=n(5054),r.configure=o,o()},9050:function(e,t,n){"use strict";var r=e.exports=n(8836);r.build="full",r.tokenize=n(626),r.parse=n(2228),r.common=n(2967),r.Root._configure(r.Type,r.parse,r.common)},6039:function(e,t,n){"use strict";e.exports=s;var r=n(3548);((s.prototype=Object.create(r.prototype)).constructor=s).className="MapField";var o=n(7063),i=n(9935);function s(e,t,n,o,s,a){if(r.call(this,e,t,o,void 0,void 0,s,a),!i.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},s.d=function(e,t,n){return"function"==typeof n?n=i.decorateType(n).name:n&&"object"==typeof n&&(n=i.decorateEnum(n).name),function(r,o){i.decorateType(r.constructor).add(new s(o,e,t,n))}}},8368:function(e,t,n){"use strict";e.exports=o;var r=n(9693);function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)this[t[n]]=e[t[n]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},4429:function(e,t,n){"use strict";e.exports=i;var r=n(3243);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var o=n(9935);function i(e,t,n,i,s,a,u,c,l){if(o.isObject(s)?(u=s,s=a=void 0):o.isObject(a)&&(u=a,a=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(n))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");r.call(this,e,u),this.type=t||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=l}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},9313:function(e,t,n){"use strict";e.exports=d;var r=n(3243);((d.prototype=Object.create(r.prototype)).constructor=d).className="Namespace";var o,i,s,a=n(3548),u=n(7598),c=n(9935);function l(e,t){if(e&&e.length){for(var n={},r=0;r<e.length;++r)n[e[r].name]=e[r].toJSON(t);return n}}function d(e,t){r.call(this,e,t),this.nested=void 0,this._nestedArray=null}function h(e){return e._nestedArray=null,e}d.fromJSON=function(e,t){return new d(e,t.options).addJSON(t.nested)},d.arrayToJSON=l,d.isReservedId=function(e,t){if(e)for(var n=0;n<e.length;++n)if("string"!=typeof e[n]&&e[n][0]<=t&&e[n][1]>t)return!0;return!1},d.isReservedName=function(e,t){if(e)for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1},Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),d.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",l(this.nestedArray,e)])},d.prototype.addJSON=function(e){if(e)for(var t,n=Object.keys(e),r=0;r<n.length;++r)t=e[n[r]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?s.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:d.fromJSON)(n[r],t));return this},d.prototype.get=function(e){return this.nested&&this.nested[e]||null},d.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},d.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof o||e instanceof s||e instanceof i||e instanceof d||e instanceof u))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof d&&e instanceof d)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var n=t.nestedArray,r=0;r<n.length;++r)e.add(n[r]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),h(this)},d.prototype.remove=function(e){if(!(e instanceof r))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),h(this)},d.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var n=this;e.length>0;){var r=e.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof d))throw Error("path conflicts with non-namespace objects")}else n.add(n=new d(r))}return t&&n.addJSON(t),n},d.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof d?e[t++].resolveAll():e[t++].resolve();return this.resolve()},d.prototype.lookup=function(e,t,n){if("boolean"==typeof t?(n=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var r=this.get(e[0]);if(r){if(1===e.length){if(!t||t.indexOf(r.constructor)>-1)return r}else if(r instanceof d&&(r=r.lookup(e.slice(1),t,!0)))return r}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof d&&(r=this._nestedArray[o].lookup(e,t,!0)))return r;return null===this.parent||n?null:this.parent.lookup(e,t)},d.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},d.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},d.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},d.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},d._configure=function(e,t,n){o=e,i=t,s=n}},3243:function(e,t,n){"use strict";e.exports=i,i.className="ReflectionObject";var r,o=n(9935);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof r&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof r&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,n){return n&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,n){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(n){var i=r.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var s=i[e];o.setProperty(s,n,t)}else(i={})[e]=o.setProperty({},n,t),r.push(i)}else{var a={};a[e]=t,r.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var n=Object.keys(e),r=0;r<n.length;++r)this.setOption(n[r],e[n[r]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){r=e}},7598:function(e,t,n){"use strict";e.exports=s;var r=n(3243);((s.prototype=Object.create(r.prototype)).constructor=s).className="OneOf";var o=n(3548),i=n(9935);function s(e,t,n,o){if(Array.isArray(t)||(n=t,t=void 0),r.call(this,e,n),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var n=e.get(this.oneof[t]);n&&!n.partOf&&(n.partOf=this,this.fieldsArray.push(n))}a(this)},s.prototype.onRemove=function(e){for(var t,n=0;n<this.fieldsArray.length;++n)(t=this.fieldsArray[n]).parent&&t.parent.remove(t);r.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,n){i.decorateType(t.constructor).add(new s(n,e)),Object.defineProperty(t,n,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},2228:function(e,t,n){"use strict";e.exports=I,I.filename=null,I.defaults={keepCase:!1};var r=n(626),o=n(9424),i=n(7645),s=n(3548),a=n(6039),u=n(7598),c=n(7025),l=n(7513),d=n(4429),h=n(7063),f=n(9935),p=/^[1-9][0-9]*$/,E=/^-?[1-9][0-9]*$/,v=/^0[x][0-9a-fA-F]+$/,g=/^-?0[x][0-9a-fA-F]+$/,m=/^0[0-7]+$/,y=/^-?0[0-7]+$/,_=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,O=/^[a-zA-Z_][a-zA-Z_0-9]*$/,T=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,R=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function I(e,t,n){t instanceof o||(n=t,t=new o),n||(n=I.defaults);var S,C,N,A,b,M=n.preferTrailingComment||!1,L=r(e,n.alternateCommentMode||!1),w=L.next,U=L.push,P=L.peek,x=L.skip,D=L.cmnt,k=!0,H=!1,B=t,G=n.keepCase?function(e){return e}:f.camelCase;function F(e,t,n){var r=I.filename;return n||(I.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+L.line+")")}function j(){var e,t=[];do{if('"'!==(e=w())&&"'"!==e)throw F(e);t.push(w()),x(e),e=P()}while('"'===e||"'"===e);return t.join("")}function W(e){var t=w();switch(t){case"'":case'"':return U(t),j();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var n=1;switch("-"===e.charAt(0)&&(n=-1,e=e.substring(1)),e){case"inf":case"INF":case"Inf":return n*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(p.test(e))return n*parseInt(e,10);if(v.test(e))return n*parseInt(e,16);if(m.test(e))return n*parseInt(e,8);if(_.test(e))return n*parseFloat(e);throw F(e,"number",!0)}(t)}catch(n){if(e&&T.test(t))return t;throw F(t,"value")}}function K(e,t){var n,r;do{!t||'"'!==(n=P())&&"'"!==n?e.push([r=q(w()),x("to",!0)?q(w()):r]):e.push(j())}while(x(",",!0));x(";")}function q(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw F(e,"id");if(E.test(e))return parseInt(e,10);if(g.test(e))return parseInt(e,16);if(y.test(e))return parseInt(e,8);throw F(e,"id")}function V(){if(void 0!==S)throw F("package");if(S=w(),!T.test(S))throw F(S,"name");B=B.define(S),x(";")}function J(){var e,t=P();switch(t){case"weak":e=N||(N=[]),w();break;case"public":w();default:e=C||(C=[])}t=j(),x(";"),e.push(t)}function z(){if(x("="),A=j(),!(H="proto3"===A)&&"proto2"!==A)throw F(A,"syntax");x(";")}function Y(e,t){switch(t){case"option":return Q(e,t),x(";"),!0;case"message":return function(e,t){if(!O.test(t=w()))throw F(t,"type name");var n=new i(t);X(n,(function(e){if(!Y(n,e))switch(e){case"map":!function(e){x("<");var t=w();if(void 0===h.mapKey[t])throw F(t,"type");x(",");var n=w();if(!T.test(n))throw F(n,"type");x(">");var r=w();if(!O.test(r))throw F(r,"name");x("=");var o=new a(G(r),q(w()),t,n);X(o,(function(e){if("option"!==e)throw F(e);Q(o,e),x(";")}),(function(){te(o)})),e.add(o)}(n);break;case"required":case"repeated":Z(n,e);break;case"optional":Z(n,H?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!O.test(t=w()))throw F(t,"name");var n=new u(G(t));X(n,(function(e){"option"===e?(Q(n,e),x(";")):(U(e),Z(n,"optional"))})),e.add(n)}(n,e);break;case"extensions":K(n.extensions||(n.extensions=[]));break;case"reserved":K(n.reserved||(n.reserved=[]),!0);break;default:if(!H||!T.test(e))throw F(e);U(e),Z(n,"optional")}})),e.add(n)}(e,t),!0;case"enum":return function(e,t){if(!O.test(t=w()))throw F(t,"name");var n=new c(t);X(n,(function(e){switch(e){case"option":Q(n,e),x(";");break;case"reserved":K(n.reserved||(n.reserved=[]),!0);break;default:!function(e,t){if(!O.test(t))throw F(t,"name");x("=");var n=q(w(),!0),r={};X(r,(function(e){if("option"!==e)throw F(e);Q(r,e),x(";")}),(function(){te(r)})),e.add(t,n,r.comment)}(n,e)}})),e.add(n)}(e,t),!0;case"service":return function(e,t){if(!O.test(t=w()))throw F(t,"service name");var n=new l(t);X(n,(function(e){if(!Y(n,e)){if("rpc"!==e)throw F(e);!function(e,t){var n=D(),r=t;if(!O.test(t=w()))throw F(t,"name");var o,i,s,a,u=t;if(x("("),x("stream",!0)&&(i=!0),!T.test(t=w()))throw F(t);if(o=t,x(")"),x("returns"),x("("),x("stream",!0)&&(a=!0),!T.test(t=w()))throw F(t);s=t,x(")");var c=new d(u,r,o,s,i,a);c.comment=n,X(c,(function(e){if("option"!==e)throw F(e);Q(c,e),x(";")})),e.add(c)}(n,e)}})),e.add(n)}(e,t),!0;case"extend":return function(e,t){if(!T.test(t=w()))throw F(t,"reference");var n=t;X(null,(function(t){switch(t){case"required":case"repeated":Z(e,t,n);break;case"optional":Z(e,H?"proto3_optional":"optional",n);break;default:if(!H||!T.test(t))throw F(t);U(t),Z(e,"optional",n)}}))}(e,t),!0}return!1}function X(e,t,n){var r=L.line;if(e&&("string"!=typeof e.comment&&(e.comment=D()),e.filename=I.filename),x("{",!0)){for(var o;"}"!==(o=w());)t(o);x(";",!0)}else n&&n(),x(";"),e&&("string"!=typeof e.comment||M)&&(e.comment=D(r)||e.comment)}function Z(e,t,n){var r=w();if("group"!==r){if(!T.test(r))throw F(r,"type");var o=w();if(!O.test(o))throw F(o,"name");o=G(o),x("=");var a=new s(o,q(w()),r,t,n);if(X(a,(function(e){if("option"!==e)throw F(e);Q(a,e),x(";")}),(function(){te(a)})),"proto3_optional"===t){var c=new u("_"+o);a.setOption("proto3_optional",!0),c.add(a),e.add(c)}else e.add(a);H||!a.repeated||void 0===h.packed[r]&&void 0!==h.basic[r]||a.setOption("packed",!1,!0)}else!function(e,t){var n=w();if(!O.test(n))throw F(n,"name");var r=f.lcFirst(n);n===r&&(n=f.ucFirst(n)),x("=");var o=q(w()),a=new i(n);a.group=!0;var u=new s(r,o,n,t);u.filename=I.filename,X(a,(function(e){switch(e){case"option":Q(a,e),x(";");break;case"required":case"repeated":Z(a,e);break;case"optional":Z(a,H?"proto3_optional":"optional");break;default:throw F(e)}})),e.add(a).add(u)}(e,t)}function Q(e,t){var n=x("(",!0);if(!T.test(t=w()))throw F(t,"name");var r,o=t,i=o;n&&(x(")"),i=o="("+o+")",t=P(),R.test(t)&&(r=t.substr(1),o+=t,w())),x("="),function(e,t,n,r){e.setParsedOption&&e.setParsedOption(t,n,r)}(e,i,$(e,o),r)}function $(e,t){if(x("{",!0)){for(var n={};!x("}",!0);){if(!O.test(b=w()))throw F(b,"name");var r,o=b;"{"===P()?r=$(e,t+"."+b):(x(":"),"{"===P()?r=$(e,t+"."+b):(r=W(!0),ee(e,t+"."+b,r)));var i=n[o];i&&(r=[].concat(i).concat(r)),n[o]=r,x(",",!0)}return n}var s=W(!0);return ee(e,t,s),s}function ee(e,t,n){e.setOption&&e.setOption(t,n)}function te(e){if(x("[",!0)){do{Q(e,"option")}while(x(",",!0));x("]")}return e}for(;null!==(b=w());)switch(b){case"package":if(!k)throw F(b);V();break;case"import":if(!k)throw F(b);J();break;case"syntax":if(!k)throw F(b);z();break;case"option":Q(B,b),x(";");break;default:if(Y(B,b)){k=!1;continue}throw F(b)}return I.filename=null,{package:S,imports:C,weakImports:N,syntax:A,root:t}}},1408:function(e,t,n){"use strict";e.exports=u;var r,o=n(9693),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")},d=function(){return o.Buffer?function(e){return(u.create=function(e){return o.Buffer.isBuffer(e)?new r(e):l(e)})(e)}:l};function h(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}u.create=d(),u.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,u.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return c}),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},u.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},u.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},u._configure=function(e){r=e,u.create=d(),r._configure();var t=o.Long?"toLong":"toNumber";o.merge(u.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},593:function(e,t,n){"use strict";e.exports=i;var r=n(1408);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(9693);function i(e){r.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},9424:function(e,t,n){"use strict";e.exports=d;var r=n(9313);((d.prototype=Object.create(r.prototype)).constructor=d).className="Root";var o,i,s,a=n(3548),u=n(7025),c=n(7598),l=n(9935);function d(e){r.call(this,"",e),this.deferred=[],this.files=[]}function h(){}d.fromJSON=function(e,t){return t||(t=new d),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},d.prototype.resolvePath=l.path.resolve,d.prototype.fetch=l.fetch,d.prototype.load=function e(t,n,r){"function"==typeof n&&(r=n,n=void 0);var o=this;if(!r)return l.asPromise(e,o,t,n);var a=r===h;function u(e,t){if(r){var n=r;if(r=null,a)throw e;n(e,t)}}function c(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var n=e.substring(t);if(n in s)return n}return null}function d(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){i.filename=e;var r,s=i(t,o,n),d=0;if(s.imports)for(;d<s.imports.length;++d)(r=c(s.imports[d])||o.resolvePath(e,s.imports[d]))&&f(r);if(s.weakImports)for(d=0;d<s.weakImports.length;++d)(r=c(s.weakImports[d])||o.resolvePath(e,s.weakImports[d]))&&f(r,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){u(e)}a||p||u(null,o)}function f(e,t){if(!(o.files.indexOf(e)>-1))if(o.files.push(e),e in s)a?d(e,s[e]):(++p,setTimeout((function(){--p,d(e,s[e])})));else if(a){var n;try{n=l.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||u(e))}d(e,n)}else++p,o.fetch(e,(function(n,i){--p,r&&(n?t?p||u(null,o):u(n):d(e,i))}))}var p=0;l.isString(t)&&(t=[t]);for(var E,v=0;v<t.length;++v)(E=o.resolvePath("",t[v]))&&f(E);if(a)return o;p||u(null,o)},d.prototype.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,h)},d.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(e,t){var n=t.parent.lookup(t.extend);if(n){var r=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.declaringField=t,t.extensionField=r,n.add(r),!0}return!1}d.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||p(0,e)||this.deferred.push(e);else if(e instanceof u)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof c)){if(e instanceof o)for(var t=0;t<this.deferred.length;)p(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var n=0;n<e.nestedArray.length;++n)this._handleAdd(e._nestedArray[n]);f.test(e.name)&&(e.parent[e.name]=e)}},d.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof u)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var n=0;n<e.nestedArray.length;++n)this._handleRemove(e._nestedArray[n]);f.test(e.name)&&delete e.parent[e.name]}},d._configure=function(e,t,n){o=e,i=t,s=n}},5054:function(e){"use strict";e.exports={}},5994:function(e,t,n){"use strict";t.Service=n(7948)},7948:function(e,t,n){"use strict";e.exports=o;var r=n(9693);function o(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(r.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,i,s){if(!i)throw TypeError("request must be specified");var a=this;if(!s)return r.asPromise(e,a,t,n,o,i);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,n){if(e)return a.emit("error",e,t),s(e);if(null!==n){if(!(n instanceof o))try{n=o[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",n,t),s(null,n)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},7513:function(e,t,n){"use strict";e.exports=a;var r=n(9313);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var o=n(4429),i=n(9935),s=n(5994);function a(e,t){r.call(this,e,t),this.methods={},this._methodsArray=null}function u(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var n=new a(e,t.options);if(t.methods)for(var r=Object.keys(t.methods),i=0;i<r.length;++i)n.add(o.fromJSON(r[i],t.methods[r[i]]));return t.nested&&n.addJSON(t.nested),n.comment=t.comment,n},a.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",r.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",n?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||r.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,u(this)):r.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,u(this)}return r.prototype.remove.call(this,e)},a.prototype.create=function(e,t,n){for(var r,o=new s.Service(e,t,n),a=0;a<this.methodsArray.length;++a){var u=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");o[u]=i.codegen(["r","c"],i.isReserved(u)?u+"_":u)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return o}},626:function(e){"use strict";e.exports=d;var t=/[\s{}=;:[\],'"()<>]/g,n=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,r=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,i=/^\s*\*?\/*/,s=/\n/g,a=/\s/,u=/\\(.?)/g,c={0:"\0",r:"\r",n:"\n",t:"\t"};function l(e){return e.replace(u,(function(e,t){switch(t){case"\\":case"":return t;default:return c[t]||""}}))}function d(e,u){e=e.toString();var c=0,d=e.length,h=1,f=null,p=null,E=0,v=!1,g=!1,m=[],y=null;function _(e){return Error("illegal "+e+" (line "+h+")")}function O(t){return e.charAt(t)}function T(t,n,r){f=e.charAt(t++),E=h,v=!1,g=r;var a,c=t-(u?2:3);do{if(--c<0||"\n"===(a=e.charAt(c))){v=!0;break}}while(" "===a||"\t"===a);for(var l=e.substring(t,n).split(s),d=0;d<l.length;++d)l[d]=l[d].replace(u?i:o,"").trim();p=l.join("\n").trim()}function R(t){var n=I(t),r=e.substring(t,n);return/^\s*\/{1,2}/.test(r)}function I(e){for(var t=e;t<d&&"\n"!==O(t);)t++;return t}function S(){if(m.length>0)return m.shift();if(y)return function(){var t="'"===y?r:n;t.lastIndex=c-1;var o=t.exec(e);if(!o)throw _("string");return c=t.lastIndex,C(y),y=null,l(o[1])}();var o,i,s,f,p,E=0===c;do{if(c===d)return null;for(o=!1;a.test(s=O(c));)if("\n"===s&&(E=!0,++h),++c===d)return null;if("/"===O(c)){if(++c===d)throw _("comment");if("/"===O(c))if(u){if(f=c,p=!1,R(c)){p=!0;do{if((c=I(c))===d)break;c++}while(R(c))}else c=Math.min(d,I(c)+1);p&&T(f,c,E),h++,o=!0}else{for(p="/"===O(f=c+1);"\n"!==O(++c);)if(c===d)return null;++c,p&&T(f,c-1,E),++h,o=!0}else{if("*"!==(s=O(c)))return"/";f=c+1,p=u||"*"===O(f);do{if("\n"===s&&++h,++c===d)throw _("comment");i=s,s=O(c)}while("*"!==i||"/"!==s);++c,p&&T(f,c-2,E),o=!0}}}while(o);var v=c;if(t.lastIndex=0,!t.test(O(v++)))for(;v<d&&!t.test(O(v));)++v;var g=e.substring(c,c=v);return'"'!==g&&"'"!==g||(y=g),g}function C(e){m.push(e)}function N(){if(!m.length){var e=S();if(null===e)return null;C(e)}return m[0]}return Object.defineProperty({next:S,peek:N,push:C,skip:function(e,t){var n=N();if(n===e)return S(),!0;if(!t)throw _("token '"+n+"', '"+e+"' expected");return!1},cmnt:function(e){var t=null;return void 0===e?E===h-1&&(u||"*"===f||v)&&(t=g?p:null):(E<e&&N(),E!==e||v||!u&&"/"!==f||(t=g?null:p)),t}},"line",{get:function(){return h}})}d.unescape=l},7645:function(e,t,n){"use strict";e.exports=m;var r=n(9313);((m.prototype=Object.create(r.prototype)).constructor=m).className="Type";var o=n(7025),i=n(7598),s=n(3548),a=n(6039),u=n(7513),c=n(8368),l=n(1408),d=n(1173),h=n(9935),f=n(4928),p=n(5305),E=n(4497),v=n(3996),g=n(1667);function m(e,t){r.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function y(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(m.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var n=this.fields[e[t]],r=n.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=n}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=m.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,c,!0),this._ctor=e;for(var n=0;n<this.fieldsArray.length;++n)this._fieldsArray[n].resolve();var r={};for(n=0;n<this.oneofsArray.length;++n)r[this._oneofsArray[n].resolve().name]={get:h.oneOfGetter(this._oneofsArray[n].oneof),set:h.oneOfSetter(this._oneofsArray[n].oneof)};n&&Object.defineProperties(e.prototype,r)}}}),m.generateConstructor=function(e){for(var t,n=h.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?n("this%s={}",h.safeProp(t.name)):t.repeated&&n("this%s=[]",h.safeProp(t.name));return n("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},m.fromJSON=function(e,t){var n=new m(e,t.options);n.extensions=t.extensions,n.reserved=t.reserved;for(var c=Object.keys(t.fields),l=0;l<c.length;++l)n.add((void 0!==t.fields[c[l]].keyType?a.fromJSON:s.fromJSON)(c[l],t.fields[c[l]]));if(t.oneofs)for(c=Object.keys(t.oneofs),l=0;l<c.length;++l)n.add(i.fromJSON(c[l],t.oneofs[c[l]]));if(t.nested)for(c=Object.keys(t.nested),l=0;l<c.length;++l){var d=t.nested[c[l]];n.add((void 0!==d.id?s.fromJSON:void 0!==d.fields?m.fromJSON:void 0!==d.values?o.fromJSON:void 0!==d.methods?u.fromJSON:r.fromJSON)(c[l],d))}return t.extensions&&t.extensions.length&&(n.extensions=t.extensions),t.reserved&&t.reserved.length&&(n.reserved=t.reserved),t.group&&(n.group=!0),t.comment&&(n.comment=t.comment),n},m.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,e),"fields",r.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",n?this.comment:void 0])},m.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var n=this.oneofsArray;for(t=0;t<n.length;)n[t++].resolve();return r.prototype.resolveAll.call(this)},m.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},m.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),y(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),y(this)):r.prototype.add.call(this,e)},m.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),y(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),y(this)}return r.prototype.remove.call(this,e)},m.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},m.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},m.prototype.create=function(e){return new this.ctor(e)},m.prototype.setup=function(){for(var e=this.fullName,t=[],n=0;n<this.fieldsArray.length;++n)t.push(this._fieldsArray[n].resolve().resolvedType);this.encode=f(this)({Writer:d,types:t,util:h}),this.decode=p(this)({Reader:l,types:t,util:h}),this.verify=E(this)({types:t,util:h}),this.fromObject=v.fromObject(this)({types:t,util:h}),this.toObject=v.toObject(this)({types:t,util:h});var r=g[e];if(r){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(o),o.toObject=this.toObject,this.toObject=r.toObject.bind(o)}return this},m.prototype.encode=function(e,t){return this.setup().encode(e,t)},m.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},m.prototype.decode=function(e,t){return this.setup().decode(e,t)},m.prototype.decodeDelimited=function(e){return e instanceof l||(e=l.create(e)),this.decode(e,e.uint32())},m.prototype.verify=function(e){return this.setup().verify(e)},m.prototype.fromObject=function(e){return this.setup().fromObject(e)},m.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},m.d=function(e){return function(t){h.decorateType(t,e)}}},7063:function(e,t,n){"use strict";var r=t,o=n(9935),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var n=0,r={};for(t|=0;n<e.length;)r[i[n+t]]=e[n++];return r}r.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),r.long=s([0,0,0,1,1],7),r.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},9935:function(e,t,n){"use strict";var r,o,i=e.exports=n(9693),s=n(5054);i.codegen=n(5124),i.fetch=n(9054),i.path=n(8626),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),n=new Array(t.length),r=0;r<t.length;)n[r]=e[t[r++]];return n}return[]},i.toObject=function(e){for(var t={},n=0;n<e.length;){var r=e[n++],o=e[n++];void 0!==o&&(t[r]=o)}return t};var a=/\\/g,u=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(u,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var c=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;r||(r=n(7645));var o=new r(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var l=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=n(7025));var t=new o("Enum"+l++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,n){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,n,r){var o=n.shift();if("__proto__"===o)return t;if(n.length>0)t[o]=e(t[o]||{},n,r);else{var i=t[o];i&&(r=[].concat(i).concat(r)),t[o]=r}return t}(e,t=t.split("."),n)},Object.defineProperty(i,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(n(9424)))}})},1945:function(e,t,n){"use strict";e.exports=o;var r=n(9693);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new o(n,r)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(r.isString(e)){if(!r.Long)return o.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;o.fromHash=function(e){return e===s?i:new o((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},9693:function(e,t,n){"use strict";var r=t;function o(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;++o)void 0!==e[r[o]]&&n||(e[r[o]]=t[r[o]]);return e}function i(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&o(this,n)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}r.asPromise=n(4537),r.base64=n(7419),r.EventEmitter=n(9211),r.float=n(945),r.inquire=n(7199),r.utf8=n(4997),r.pool=n(6662),r.LongBits=n(1945),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=o,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},4497:function(e,t,n){"use strict";e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n={};e.oneofsArray.length&&t("var p={}");for(var r=0;r<e.fieldsArray.length;++r){var u=e._fieldsArray[r].resolve(),c="m"+o.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",c,u.name),u.map)t("if(!util.isObject(%s))",c)("return%j",i(u,"object"))("var k=Object.keys(%s)",c)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),s(t,u,r,c+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",c)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",c),s(t,u,r,c+"[i]")("}");else{if(u.partOf){var l=o.safeProp(u.partOf.name);1===n[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),n[u.partOf.name]=1,t("p%s=1",l)}s(t,u,r,c)}u.optional&&t("}")}return t("return null")};var r=n(7025),o=n(9935);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,n,o){if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",n,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function a(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",n)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",n)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",n)("return%j",i(t,"boolean key"))}return e}},1667:function(e,t,n){"use strict";var r=t,o=n(8368);r[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),n=this.lookup(t);if(n){var r="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:n.encode(n.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var n="",r="";if(t&&t.json&&e.type_url&&e.value){r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),n=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var s=e.$type.toObject(e,t);return""===n&&(n="type.googleapis.com/"),r=n+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),s["@type"]=r,s}return this.toObject(e,t)}}},1173:function(e,t,n){"use strict";e.exports=d;var r,o=n(9693),i=o.LongBits,s=o.base64,a=o.utf8;function u(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function c(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}var h=function(){return o.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d}};function f(e,t,n){t[n]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function E(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function v(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}d.create=h(),d.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(d.alloc=o.pool(d.alloc,o.Array.prototype.subarray)),d.prototype._push=function(e,t,n){return this.tail=this.tail.next=new u(e,t,n),this.len+=t,this},p.prototype=Object.create(u.prototype),p.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(E,10,i.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=i.from(e);return this._push(E,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(E,t.length(),t)},d.prototype.bool=function(e){return this._push(f,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(v,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=i.from(e);return this._push(v,4,t.lo)._push(v,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};d.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(o.isString(e)){var n=d.alloc(t=s.length(e));s.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},d.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new u(c,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(c,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},d._configure=function(e){r=e,d.create=h(),r._configure()}},3155:function(e,t,n){"use strict";e.exports=i;var r=n(1173);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(9693);function i(){r.call(this)}function s(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.m=t,r.amdO={},e=[],r.O=function(t,n,o,i){if(!n){var s=1/0;for(l=0;l<e.length;l++){n=e[l][0],o=e[l][1],i=e[l][2];for(var a=!0,u=0;u<n.length;u++)(!1&i||s>=i)&&Object.keys(r.O).every((function(e){return r.O[e](n[u])}))?n.splice(u--,1):(a=!1,i<s&&(s=i));if(a){e.splice(l--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,o,i]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={65:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,i,s=n[0],a=n[1],u=n[2],c=0;if(s.some((function(t){return 0!==e[t]}))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(u)var l=u(r)}for(t&&t(n);c<s.length;c++)i=s[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(l)},n=self.webpackChunkwebsdk=self.webpackChunkwebsdk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var o={};return function(){"use strict";r.r(o),r.d(o,{MiniCore:function(){return F},default:function(){return W}}),r(9601),r(1539),r(8674),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(8309),r(3843),r(3710),r(1532),r(7941),r(9554),r(4747),r(4812),r(6699),r(2023),r(2564),r(2222),r(9653),r(7327),r(9575),r(2472),r(2990),r(8927),r(3105),r(5035),r(4345),r(7174),r(2846),r(4731),r(7209),r(6319),r(8867),r(7789),r(3739),r(9368),r(4483),r(2056),r(3462),r(678),r(7462),r(3824),r(5021),r(2974),r(5016),r(5827);var e=r(3281),t=r.n(e),n=r(3720),i=r.n(n),s=r(2449),a=r(4024),u=r(7360),c=r(6424),l=["onTextMessage","onFileMessage","onAudioMessage","onVideoMessage","onImageMessage","onLocationMessage","onCustomMessage","onCMDMessage"],d=function(){function e(e,t,n){this.handlerData={},this.handlerData={},e.addEventHandler=this.addEventHandler.bind(this),e.removeEventHandler=this.removeEventHandler.bind(this)}return e.prototype.addEventHandler=function(e,t){this.handlerData[e]=t},e.prototype.removeEventHandler=function(e){delete this.handlerData[e]},e.prototype.dispatch=function(e,t){for(var n in l.includes(e)&&t?u.kg.debug("dispatch event: "+e,{id:t.id,type:t.type,time:t.time,from:t.from,to:t.to,chatType:t.chatType}):"onMessage"===e?u.kg.debug("dispatch event: "+e,null==t?void 0:t.length):u.kg.debug("dispatch event: "+e,t||""),this.handlerData){var r=this.handlerData[n][e];r&&r(t)}},e}(),h=(r(2772),{biz:"",debug:!1,token:""}),f="https://data-reporting.agora.io/report",p="https://data-reporting.sh.agoralab.co/report",E=r(2071),v=r(1595),g=function(e){var t=Number(v.C8[e]);return t===v.C8.USER_LOGIN?"MANUALLOGIN":t===v.C8.MSYNC_SENDMESSAGE?"SENDMESSAGE":t>v.C8.UNKNOWOPERATION&&t<v.C8.REST_OPERATE?"REST":t>v.C8.REST_OPERATE&&t<v.C8.MSYNC_OPERATE?"MESSAGE":t>v.C8.MSYNC_OPERATE&&t<v.C8.ROSTER_OPERATE?"ROSTER":t>v.C8.ROSTER_OPERATE&&t<v.C8.USER_OPERATE?"USER":t>v.C8.USER_OPERATE&&t<v.C8.GROUP_OPERATE?"GROUP":t>v.C8.GROUP_OPERATE&&t<v.C8.CHATROOM_OPERATE?"CHATROOM":"OPERATION"},m=function(){return(new Date).getTime()},y=function(e){return[a.iw.BAIDU,a.iw.WX,a.iw.DD,a.iw.ZFB,a.iw.TT,a.iw.QUICK_APP,a.iw.UNI].includes(e.platform)},_=function(){return e=1,t=99999,e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e;var e,t},O=r(4319),T={},R=(r(561),r(1249),function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}),I=1e3,S=function(){function e(e){this.eventQueue=[],this.stock=I,this.config=e,this.governor()}return e.prototype.add=function(e){this.stock<=0?console.warn("Event Report limit ".concat(I," per minute")):(this.eventQueue.push(e),this.consume(),this.stock-=1)},e.prototype.consume=function(){var e=this;0!==this.eventQueue.length&&(this.timer&&this.eventQueue.length<=10&&clearTimeout(this.timer),this.timer=setTimeout((function(){var t,n=e.eventQueue.splice(0,10),r=n.filter((function(e){return e.appId===n[0].appId})),o=n.filter((function(e){return e.appId!==n[0].appId}));(t=e.eventQueue).unshift.apply(t,o),e.batchSend(r)}),1e3))},e.prototype.governor=function(){var e=this,t=setInterval((function(){e.stock=I}),6e4);"undefined"!=typeof addEventListener&&addEventListener("beforeunload",(function(){clearInterval(t)}))},e.prototype.batchSend=function(e){var t,n;if(void 0===e&&(e=[]),0!==e.length)try{var r=e.map((function(e){e.biz,e.appId;var t=e.eventId,n=R(e,["biz","appId","eventId"]);return{eventId:Number(t),body:n}}));!function(e,t){try{var n=t.biz,r=t.appId,o=t.data,i=t.debug,s=t.onSuccess;if(!n)throw new Error("biz is not defined");T.global||(T=a.P6.getEnvInfo());var u=T;if(y(u)){var c={url:i?p:f,data:o,method:"POST",timeout:O.zj,success:function(){null==s||s()},fail:function(){},complete:function(){}},l={token:e,appid:null!=r?r:"",sendts:"".concat(Math.floor((new Date).getTime()/1e3)),biz:n,debug:"".concat(i)};if("zfb"===u.platform||"dd"===u.platform?c.headers=l:c.header=l,"dd"===u.platform)return u.global.httpRequest(c);u.global.request(c)}else{var d=new XMLHttpRequest;d.onreadystatechange=function(){2===d.readyState&&(null==s||s())},d.open("POST",i?p:f),d.setRequestHeader("Content-Type","application/json"),d.setRequestHeader("token",e),d.setRequestHeader("appid",null!=r?r:""),d.setRequestHeader("sendts","".concat(Math.floor((new Date).getTime()/1e3))),d.setRequestHeader("biz",n),d.setRequestHeader("debug","".concat(i)),d.send(JSON.stringify(o))}}catch(e){console.error(e)}}(this.config.token,{biz:null===(t=e[0])||void 0===t?void 0:t.biz,appId:null===(n=e[0])||void 0===n?void 0:n.appId,data:r,debug:this.config.debug,onSuccess:this.consume.bind(this)})}catch(e){console.error(e)}},e}(),C=function(){return C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},C.apply(this,arguments)},N=new(function(){function e(e){this.inited=!1,this.appId="",this.biz="",this.eventQueue={},this.config=h,e&&this.init(e)}return e.prototype.init=function(e){var t;if(void 0===e&&(e={}),!e.biz||!e.token)throw new Error("Event Report: biz or token is not defined");try{this.appId=null!==(t=e.appId)&&void 0!==t?t:"",this.biz=e.biz,this.config=C(C({},h),e),this.eventQueue=new S(this.config),this.log(e),this.inited=!0}catch(e){console.error(e)}},e.prototype.send=function(e,t,n){var r;if(void 0===t&&(t={}),this.inited){var o=C(C({},t),{eventId:Number(e),biz:this.biz,appId:null!==(r=null==n?void 0:n.appId)&&void 0!==r?r:this.appId});this.eventQueue.add(o),this.log(o)}else console.error("Event Report: init is not called")},e.prototype.log=function(e){try{if(this.config.debug){var t=e.payload,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["payload"]);console.log("%c Event Report: ".concat(this.config.biz," "),"background: #8A97FC; color: #fff"),console.table(n),t&&(console.info("payload:"),console.table(t))}}catch(e){console.error(e)}},e}()),A=function(){return A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},A.apply(this,arguments)},b={requestName:"",subrequestid:"1",requestMethod:"GET",requestUrl:"",requestElapse:0,code:0,codeDesc:"",isLastApi:0,isSuccess:1},M=function(){function e(e){this.platform=a.P6.getEnvInfo(),this.isReportDt=e.isReport||!1,this.isCollectDt=!0,y(this.platform)&&!this.isReportDt&&(this.isCollectDt=!1),this.eventQueue=[],this.accessChannel=E.yK,this.options=function(e,t){t.platform||(t=a.P6.getEnvInfo());var n=e.org,r=e.appkey,o=e.deviceId,i=e.sdkVersion,s=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||"".concat(t.platform,"_mini_program");return{org:n,appkey:r,deviceId:o,sdkServiceId:"sid_".concat(a.P6.getUniqueId(),"_").concat(_()),did:s,sdkVersion:i,os:E.Wc,sdkProduct:v.aC.web}}(e,this.platform),this.sid=this.options.sdkServiceId,this.init(e)}return e.getInstance=function(){return e.instance},e.prototype.getServiceId=function(){return this.sid||"sid_0"},e.prototype.setIsReportDt=function(e){this.isReportDt=e,e&&this.rptEventQueue()},e.prototype.setIsCollectDt=function(e){this.isCollectDt=e,e||(this.eventQueue=[])},e.prototype.rptEventQueue=function(){var e=this;this.eventQueue.length&&this.eventQueue.forEach((function(t,n){N.send(t.eventId,t.dt),n>=e.eventQueue.length-1&&(e.eventQueue=[])}))},e.prototype.init=function(t){e.instance||(e.instance=this,N.init({biz:E.el,token:E.$x,appId:t.appkey,debug:!1}),this.reportInit())},e.prototype.reportInit=function(){if(this.isCollectDt){var e=this.options,t=e.did,n=e.os,r=e.sdkVersion,o=e.deviceId;this.reportData(E.iB.INIT,{did:t,os:n,sdkVersion:r,deviceId:o})}},e.prototype.geOperateFun=function(e){var t=this;if(!this.isCollectDt)return function(){};var n=1,r=0,o="",i=m(),s=e.uid,u=e.operationName;s&&(this.uid=s);var c={uid:this.uid,operationId:"opr_".concat(a.P6.getUniqueId(),"_").concat(_()),requestid:"req_".concat(a.P6.getUniqueId(),"_").concat(_()),operationName:u};return function(e){var s,l,d,h;if(e.data.isSuccess?(r=0,o=""):(0===e.data.code&&(e.data.code=E.Tp),r=null!==(s=e.data.code)&&void 0!==s?s:r,o=null!==(l=e.data.codeDesc)&&void 0!==l?l:o),(null===(d=e.data)||void 0===d?void 0:d.accessChannel)&&(t.accessChannel=null===(h=e.data)||void 0===h?void 0:h.accessChannel),e.isRetry?(n++,e.data.subrequestid="".concat(n)):(c.requestid="req_".concat(a.P6.getUniqueId(),"_").concat(_()),n=1),e.data.isLastApi){var f=m();e.data.requestElapse=f-i,e.data.requestMethod="",e.data.subrequestid="0",e.data.code=200===r?0:r,e.data.codeDesc=o}else e.data.requestName||(e.data.requestName=u);e.data.requestElapse||(e.data.requestElapse=m()-i),t.reportData.call(t,E.iB.API,A(A(A(A({},b),c),e.data),{accessChannel:t.accessChannel,operationType:g(u)})),e.isEndApi&&t.reportData.call(t,E.iB.API,A(A(A({},c),b),{isSuccess:e.data.isSuccess,isLastApi:1,subrequestid:"0",requestMethod:"",code:200===r?0:r,codeDesc:o,requestElapse:e.data.requestElapse,accessChannel:t.accessChannel,operationType:g(u)}))}},e.prototype.reportData=function(e,t){return n=this,r=void 0,i=function(){var n,r,o,i,s,u,c,l;return function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(d){switch(d.label){case 0:return d.trys.push([0,3,,4]),n=m(),r=0,e!==E.iB.API?[3,2]:[4,(h=this.platform,new Promise((function(e){var t;h.platform||(h=a.P6.getEnvInfo());var n="";if(h.platform===a.iw.WEB){var r=navigator.connection;(null==r?void 0:r.type)?(null==r||r.type,n=v.td.WIFI):(null==r?void 0:r.effectiveType)&&(n=v.td[r.effectiveType.toLocaleUpperCase()]),e(n)}else h.platform===a.iw.NODE?(n=v.td.UNKNOWN,e(n)):null===(t=h.global)||void 0===t||t.getNetworkType({success:function(t){n=v.td[t.networkType.toLocaleUpperCase()],e(n)}})})))];case 1:r=d.sent(),d.label=2;case 2:return o=this.options,i=o.appkey,s=o.sdkServiceId,u=o.sdkProduct,c=A({lts:n,net:r,appkey:i,sdkServiceId:s,sdkProduct:u},t),this.isReportDt?N.send(e,c):this.isCollectDt&&this.eventQueue.push({eventId:e,dt:c}),[3,4];case 3:return l=d.sent(),console.warn(l),[3,4];case 4:return[2]}var h}))},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{u(i.next(e))}catch(e){t(e)}}function a(e){try{u(i.throw(e))}catch(e){t(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(s,a)}u((i=i.apply(n,r||[])).next())}));var n,r,o,i},e}(),L=r(7252),w=r(5531),U=r(4998),P=r(8161),x=r(7288);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}var k=function(){return k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},k.apply(this,arguments)},H=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},B=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};t().util.Long=i(),t().configure();var G=t().Root.fromJSON({nested:{easemob:{nested:{pb:{nested:{MessageBody:{fields:{type:{type:"Type",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},contents:{rule:"repeated",type:"Content",id:4},ext:{rule:"repeated",type:"KeyValue",id:5},ackMessageId:{type:"uint64",id:6},msgConfig:{type:"MessageConfig",id:7},ackContent:{type:"string",id:8},meta:{type:"string",id:9},editMessageId:{type:"uint64",id:11}},nested:{Content:{fields:{type:{type:"Type",id:1},text:{type:"string",id:2},latitude:{type:"double",id:3},longitude:{type:"double",id:4},address:{type:"string",id:5},displayName:{type:"string",id:6},remotePath:{type:"string",id:7},secretKey:{type:"string",id:8},fileLength:{type:"int32",id:9},action:{type:"string",id:10},params:{rule:"repeated",type:"KeyValue",id:11},duration:{type:"int32",id:12},size:{type:"Size",id:13},thumbnailRemotePath:{type:"string",id:14},thumbnailSecretKey:{type:"string",id:15},thumbnailDisplayName:{type:"string",id:16},thumbnailFileLength:{type:"int32",id:17},thumbnailSize:{type:"Size",id:18},customEvent:{type:"string",id:19},customExts:{rule:"repeated",type:"KeyValue",id:20},buildingName:{type:"string",id:21},subType:{type:"SubType",id:22},title:{type:"string",id:23},summary:{type:"string",id:24},combineLevel:{type:"int32",id:25}},nested:{Type:{values:{TEXT:0,IMAGE:1,VIDEO:2,LOCATION:3,VOICE:4,FILE:5,COMMAND:6,CUSTOM:7,COMBINE:8}},Size:{fields:{width:{type:"double",id:1},height:{type:"double",id:2}}},SubType:{values:{COMBINE:0}}}},Type:{values:{NORMAL:0,CHAT:1,GROUPCHAT:2,CHATROOM:3,READ_ACK:4,DELIVER_ACK:5,RECALL:6,CHANNEL_ACK:7,EDIT:8}},MessageConfig:{fields:{allowGroupAck:{type:"bool",id:1}}}}},KeyValue:{oneofs:{value:{oneof:["varintValue","floatValue","doubleValue","stringValue"]}},fields:{key:{type:"string",id:1},type:{type:"ValueType",id:2},varintValue:{type:"int64",id:3},floatValue:{type:"float",id:4},doubleValue:{type:"double",id:5},stringValue:{type:"string",id:6}},nested:{ValueType:{values:{BOOL:1,INT:2,UINT:3,LLINT:4,FLOAT:5,DOUBLE:6,STRING:7,JSON_STRING:8}}}},JID:{fields:{appKey:{type:"string",id:1},name:{type:"string",id:2},domain:{type:"string",id:3},clientResource:{type:"string",id:4}}},ConferenceBody:{fields:{sessionId:{type:"string",id:1},operation:{type:"Operation",id:2},conferenceId:{type:"string",id:3},type:{type:"Type",id:4},content:{type:"string",id:5},network:{type:"string",id:6},version:{type:"string",id:7},identity:{type:"Identity",id:8},duration:{type:"string",id:9},peerName:{type:"string",id:10},endReason:{type:"EndReason",id:11},status:{type:"Status",id:12},isDirect:{type:"bool",id:13},controlType:{type:"StreamControlType",id:14},routeFlag:{type:"int32",id:15},routeKey:{type:"string",id:16}},nested:{Status:{fields:{errorCode:{type:"int32",id:1}}},Operation:{values:{JOIN:0,INITIATE:1,ACCEPT_INITIATE:2,ANSWER:3,TERMINATE:4,REMOVE:5,STREAM_CONTROL:6,MEDIA_REQUEST:7}},Type:{values:{VOICE:0,VIDEO:1}},Identity:{values:{CALLER:0,CALLEE:1}},EndReason:{values:{HANGUP:0,NORESPONSE:1,REJECT:2,BUSY:3,FAIL:4,UNSUPPORTED:5,OFFLINE:6}},StreamControlType:{values:{PAUSE_VOICE:0,RESUME_VOICE:1,PAUSE_VIDEO:2,RESUME_VIDEO:3}}}},MSync:{fields:{version:{type:"Version",id:1,options:{default:"MSYNC_V1"}},guid:{type:"JID",id:2},auth:{type:"string",id:3},compressAlgorimth:{type:"uint32",id:4},crypto:{type:"uint32",id:5},userAgent:{type:"string",id:6},pov:{type:"uint64",id:7},command:{type:"Command",id:8},deviceId:{type:"uint32",id:10},encryptType:{rule:"repeated",type:"EncryptType",id:11,options:{packed:!1}},encryptKey:{type:"string",id:12},payload:{type:"bytes",id:9}},nested:{Version:{values:{MSYNC_V1:0,MSYNC_V2:1}},Command:{values:{SYNC:0,UNREAD:1,NOTICE:2,PROVISION:3}}}},EncryptType:{values:{ENCRYPT_NONE:0,ENCRYPT_AES_128_CBC:1,ENCRYPT_AES_256_CBC:2}},CommSyncUL:{fields:{meta:{type:"Meta",id:1},key:{type:"uint64",id:2},queue:{type:"JID",id:3},isRoam:{type:"bool",id:4},lastFullRoamKey:{type:"uint64",id:5}}},CommSyncDL:{fields:{status:{type:"Status",id:1},metaId:{type:"uint64",id:2},serverId:{type:"uint64",id:3},metas:{rule:"repeated",type:"Meta",id:4},nextKey:{type:"uint64",id:5},queue:{type:"JID",id:6},isLast:{type:"bool",id:7},timestamp:{type:"uint64",id:8},isRoam:{type:"bool",id:9}}},CommNotice:{fields:{queue:{type:"JID",id:1}}},CommUnreadUL:{fields:{}},CommUnreadDL:{fields:{status:{type:"Status",id:1},unread:{rule:"repeated",type:"MetaQueue",id:2},timestamp:{type:"uint64",id:3}}},MetaQueue:{fields:{queue:{type:"JID",id:1},n:{type:"uint32",id:2}}},Meta:{fields:{id:{type:"uint64",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},timestamp:{type:"uint64",id:4},ns:{type:"NameSpace",id:5},payload:{type:"bytes",id:6},routetype:{type:"RouteType",id:7},ext:{rule:"repeated",type:"KeyValue",id:8},meta:{type:"bytes",id:9},directedUsers:{rule:"repeated",type:"string",id:10}},nested:{NameSpace:{values:{STATISTIC:0,CHAT:1,MUC:2,ROSTER:3,CONFERENCE:4,NOTIFY:5,QUERY:6}},RouteType:{values:{ROUTE_ALL:0,ROUTE_ONLINE:1,ROUTE_DIRECT:2}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},reason:{type:"string",id:2},redirectInfo:{rule:"repeated",type:"RedirectInfo",id:3}},nested:{ErrorCode:{values:{OK:0,FAIL:1,UNAUTHORIZED:2,MISSING_PARAMETER:3,WRONG_PARAMETER:4,REDIRECT:5,TOKEN_EXPIRED:6,PERMISSION_DENIED:7,NO_ROUTE:8,UNKNOWN_COMMAND:9,PB_PARSER_ERROR:10,BIND_ANOTHER_DEVICE:11,IM_FORBIDDEN:12,TOO_MANY_DEVICES:13,PLATFORM_LIMIT:14,USER_MUTED:15,ENCRYPT_DISABLE:16,ENCRYPT_ENABLE:17,DECRYPT_FAILURE:18,PERMISSION_DENIED_EXTERNAL:19}}}},RedirectInfo:{fields:{host:{type:"string",id:1},port:{type:"uint32",id:2}}},Provision:{fields:{osType:{type:"OsType",id:1},version:{type:"string",id:2},networkType:{type:"NetworkType",id:3},appSign:{type:"string",id:4},compressType:{rule:"repeated",type:"CompressType",id:5,options:{packed:!1}},encryptType:{rule:"repeated",type:"EncryptType",id:6,options:{packed:!1}},encryptKey:{type:"string",id:7},status:{type:"Status",id:8},deviceUuid:{type:"string",id:9},isManualLogin:{type:"bool",id:10},password:{type:"string",id:11},deviceName:{type:"string",id:12},resource:{type:"string",id:13},auth:{type:"string",id:14},serviceId:{type:"string",id:16},actionVersion:{type:"string",id:17},authToken:{type:"string",id:18},sessionId:{type:"string",id:20},reason:{type:"string",id:21}},nested:{OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}},CompressType:{values:{COMPRESS_NONE:0,COMPRESS_ZLIB:1}}}},MUCBody:{fields:{mucId:{type:"JID",id:1},operation:{type:"Operation",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},setting:{type:"Setting",id:5},reason:{type:"string",id:6},isChatroom:{type:"bool",id:7},status:{type:"Status",id:8},isThread:{type:"bool",id:9},mucParentId:{type:"JID",id:10},mucName:{type:"string",id:11},eventInfo:{type:"EventInfo",id:12},mucMemberCount:{type:"int32",id:13},ext:{type:"string",id:14},leaveOtherRooms:{type:"bool",id:15}},nested:{Operation:{values:{CREATE:0,DESTROY:1,JOIN:2,LEAVE:3,APPLY:4,APPLY_ACCEPT:5,APPLY_DECLINE:6,INVITE:7,INVITE_ACCEPT:8,INVITE_DECLINE:9,KICK:10,GET_BLACKLIST:11,BAN:12,ALLOW:13,UPDATE:14,BLOCK:15,UNBLOCK:16,PRESENCE:17,ABSENCE:18,DIRECT_JOINED:19,ASSIGN_OWNER:20,ADD_ADMIN:21,REMOVE_ADMIN:22,ADD_MUTE:23,REMOVE_MUTE:24,UPDATE_ANNOUNCEMENT:25,DELETE_ANNOUNCEMENT:26,UPLOAD_FILE:27,DELETE_FILE:28,ADD_USER_WHITE_LIST:29,REMOVE_USER_WHITE_LIST:30,BAN_GROUP:31,REMOVE_BAN_GROUP:32,THREAD_CREATE:33,THREAD_DESTROY:34,THREAD_JOIN:35,THREAD_LEAVE:36,THREAD_KICK:37,THREAD_UPDATE:38,THREAD_PRESENCE:39,THREAD_ABSENCE:40,DISABLE_GROUP:41,ABLE_GROUP:42,SET_METADATA:43,DELETE_METADATA:44,GROUP_MEMBER_METADATA_UPDATE:45}},Setting:{fields:{name:{type:"string",id:1},desc:{type:"string",id:2},type:{type:"Type",id:3},maxUsers:{type:"int32",id:4},owner:{type:"string",id:5}},nested:{Type:{values:{PRIVATE_OWNER_INVITE:0,PRIVATE_MEMBER_INVITE:1,PUBLIC_JOIN_APPROVAL:2,PUBLIC_JOIN_OPEN:3,PUBLIC_ANONYMOUS:4}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,PERMISSION_DENIED:1,WRONG_PARAMETER:2,MUC_NOT_EXIST:3,USER_NOT_EXIST:4,UNKNOWN:5}}}},EventInfo:{fields:{eventType:{type:"EventType",id:1,options:{default:"EVENT_NONE"}},ext:{type:"string",id:2}},nested:{EventType:{values:{EVENT_NONE:0,CIRCLE_CHANNEL:1}}}}}},RosterBody:{fields:{operation:{type:"Operation",id:1},status:{type:"Status",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},reason:{type:"string",id:5},rosterVer:{type:"string",id:6},biDirection:{type:"bool",id:7}},nested:{Operation:{values:{GET_ROSTER:0,GET_BLACKLIST:1,ADD:2,REMOVE:3,ACCEPT:4,DECLINE:5,BAN:6,ALLOW:7,REMOTE_ACCEPT:8,REMOTE_DECLINE:9}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,USER_NOT_EXIST:1,USER_ALREADY_FRIEND:2,USER_ALREADY_BLACKLIST:3}}}}}},StatisticsBody:{fields:{operation:{type:"Operation",id:1},os:{type:"OsType",id:2},version:{type:"string",id:3},network:{type:"NetworkType",id:4},imTime:{type:"uint32",id:5},chatTime:{type:"uint32",id:6},location:{type:"string",id:7},reason:{type:"string",id:10}},nested:{Operation:{values:{INFORMATION:0,USER_REMOVED:1,USER_LOGIN_ANOTHER_DEVICE:2,USER_KICKED_BY_CHANGE_PASSWORD:3,USER_KICKED_BY_OTHER_DEVICE:4}},OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}}}}}}}}}}),F=function(){function e(e){var t,n,r,o;if(this.name="miniCore",this.heartBeatWait=O.al,this.Message=s.Message,this.Code=w.E,this.getUniqueId=a.Ki,this._queues=[],this._load_msg_cache=[],this.max_cache_length=100,this.isReport=!1,this.dnsIndex=0,this.autoReconnectNumTotal=0,this.times=1,this._reportLogs=!1,this._reportInterval=O.XV,this._isLogging=!1,this.unSyncQueue=[],this.lastHeartbeat=Date.now(),this.logger=this.getLogger(),this.url=null!==(t=e.url)&&void 0!==t?t:"",this.apiUrl=null!==(n=e.apiUrl)&&void 0!==n?n:"",this.isHttpDNS=!!e.isHttpDNS,this.uploadPartEnable=!0,this.appKey=e.appKey,this.root=G,this.mr_cache={},this.isHttpDNS=void 0===e.isHttpDNS||e.isHttpDNS,this.https="undefined"!=typeof window&&"https:"===(null===(r=window.location)||void 0===r?void 0:r.protocol),this.delivery=e.delivery||!1,this.restIndex=0,this.hostIndex=0,this.autoReconnectNumMax=e.autoReconnectNumMax||O.ke,this.refreshDNSIntervals=this.autoReconnectNumMax<5?this.autoReconnectNumMax:5,this.useReplacedMessageContents=e.useReplacedMessageContents||!1,this.unMSyncSendMsgMap=new Map,this.socketHost=[],this.reconnecting=!1,this._offlineMessagePullState=U.a.SYNC_INIT,this._offlineMessagePullQueue=[],this.dnsArr=["https://rs.easemob.com","https://rs.chat.agora.io","http://59.110.89.59","http://39.97.193.190","http://39.97.193.187"],this.dnsTotal=this.dnsArr.length,this.version="4.10.0.1",this.deviceId=e.deviceId||"webim",this.isFixedDeviceId=null===(o=e.isFixedDeviceId)||void 0===o||o,this.logOut=!0,this.osType=16,this.useOwnUploadFun=e.useOwnUploadFun||!1,this.compressType=[0],this.encryptType=[0],this._msgHash={},this.disconnectedReason=void 0,this.loginInfoCustomExt=void 0,this.context={jid:{appKey:"",clientResource:"",domain:"easemob.com",name:""},userId:"",appKey:"",status:0,restTokenData:"",appName:"",orgName:"",root:{},accessToken:""},this.mSync=this.usePlugin(c.ZP),this.eventHandler=this.usePlugin(d),"string"!=typeof this.appKey||2!==this.appKey.split("#").length)throw Error("Illegal appKey: ".concat(this.appKey));if(this.devInfos=this.appKey.split("#"),this.orgName=this.devInfos[0],this.appName=this.devInfos[1],this.dataReport=new M({appkey:this.appKey,org:this.orgName,sdkVersion:this.version,deviceId:this.deviceId,isReport:this.isReport}),this.isFixedDeviceId){var i=a.P6.getLocalDeviceInfo();i&&(this.clientResource=JSON.parse(i).deviceId)}u.kg.debug("init SDK: miniCore ".concat(this.version))}return e.prototype.addEventHandler=function(e,t){},e.prototype.removeEventHandler=function(e){},e.prototype.usePlugin=function(e,t){var n=this;if("function"==typeof e){if(!t)return new e(this);this[t]=new e(this)}else"object"===D(e)&&(t?(this[t]={},e.LocalCache&&(this._localCache=e.LocalCache,e=e.LocalCacheApi),Object.keys(e).forEach((function(r){var o,i;n[t][r]=null===(i=null===(o=e[r])||void 0===o?void 0:o.bind)||void 0===i?void 0:i.call(o,n)}))):Object.assign(this,e))},e.prototype.isOpened=function(){return this.sock&&1===this.sock.readyState||!1},e.prototype._validateOpenParams=function(e){if("object"!==D(e)||null===e)return L.Z.create({type:w.E.WEBIM_CONNCTION_OPEN_ERROR,message:"the param is illegal"});if(!e.username||"string"!=typeof e.username){var t=L.Z.create({type:w.E.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR,message:"the username cannot be empty"});return u.kg.debug("open params error",t),t}return!("agoraToken"in e)||e.agoraToken&&"string"==typeof e.agoraToken?!("accessToken"in e)||e.accessToken&&"string"==typeof e.accessToken?"accessToken"in e||"agoraToken"in e||e.password?void 0:(t=L.Z.create({type:w.E.WEBIM_CONNCTION_OPEN_ERROR,message:"the accessToken or password is illegal"}),u.kg.debug("open params error",t),t):(t=L.Z.create({type:w.E.WEBIM_CONNCTION_OPEN_ERROR,message:"the accessToken is illegal"}),u.kg.debug("open params error",t),t):(t=L.Z.create({type:w.E.WEBIM_CONNCTION_OPEN_ERROR,message:"the agoraToken is illegal"}),u.kg.debug("open params error",t),console.warn("agoraToken is deprecated, please use accessToken instead"),t)},e.prototype.open=function(e){var t;return H(this,void 0,void 0,(function(){var n,r,o,i,s,c;return B(this,(function(l){switch(l.label){case 0:if(u.kg.debug("open",e.username),this._isLogging)throw L.Z.create({type:w.E.WEBIM_CONNCTION_OPEN_ERROR,message:"Currently logging in, please wait."});if(!this.logOut)throw L.Z.create({type:w.E.WEBIM_USER_ALREADY_LOGIN,message:"The user has logged in."});if(this.retryConnectTimes=0,this._isLogging=!0,n=this._validateOpenParams(e))throw n;r=a.P6.getEnvInfo(),l.label=1;case 1:if(l.trys.push([1,4,5,6]),"web"===r.platform&&(o=a.P6.detectBrowser(),u.kg.debug("browser",o)),u.kg.debug("socket readyState",null===(t=this.sock)||void 0===t?void 0:t.readyState),this.isOpened.call(this))throw L.Z.create({type:w.E.WEBIM_CONNCTION_OPEN_ERROR,message:"You are already logged in"});return i=this.dataReport.geOperateFun({uid:e.username,operationName:v.fI.LOGIN}),[4,this._open(e,!1,i)];case 2:return s=l.sent(),u.kg.initReport({report:this._reportLogs,reportInterval:this._reportInterval,connection:this}),[4,this.retryConnectMSync(i)];case 3:return l.sent(),[2,s];case 4:throw c=l.sent(),this._isLogging=!1,c;case 5:return u.kg.reportLog(),[7];case 6:return[2]}}))}))},e.prototype._open=function(e,t,n){return void 0===t&&(t=!1),H(this,void 0,void 0,(function(){var r,o,i,s,c,l,d,h,f,p,E,g,m;return B(this,(function(y){switch(y.label){case 0:return this.setContext(e),!this.isHttpDNS||t?[3,2]:(this.dnsIndex=0,[4,this.getDNS({rpt:n,isRetry:!!t})]);case 1:y.sent(),y.label=2;case 2:return r=this.apiUrl+"/"+this.orgName+"/"+this.appName+"/token",e.agoraToken?(u.kg.debug("login with agoraToken"),this.grantType="agoraToken",this.token=e.agoraToken,this.context.accessToken=e.agoraToken,this.context.restTokenData=e.agoraToken,this.user=e.username,[2,{accessToken:e.agoraToken}]):[3,3];case 3:return e.accessToken?(u.kg.debug("login with accessToken"),this.grantType="accessToken",this.token=e.accessToken,this.context.accessToken=e.accessToken,this.context.restTokenData=e.accessToken,this.user=e.username,[2,{accessToken:e.accessToken}]):[3,4];case 4:return u.kg.debug("login with password"),o={headers:{"Content-type":"application/json"},url:r,dataType:"json",data:JSON.stringify({grant_type:"password",username:e.username,password:e.password,timestamp:+new Date})},[4,j(a.P6.ajax(o,v.fI.SDK_INTERNAL))];case 5:return i=y.sent(),s=i[0],c=i[1],s?(l=L.Z.create({type:w.E.WEBIM_CONNCTION_OPEN_ERROR,message:s.error_description||s.message,data:s}),d=(null==s?void 0:s.extraInfo)||{},g=d.elapse,E=d.httpCode,h=d.errDesc,f={requestName:v.c.LOGIN_BY_PWD,requestElapse:g,requestUrl:r,isSuccess:0,code:E,codeDesc:h},n&&n({isRetry:!1,data:f}),"invalid password"!==s.message&&"user not found"!==s.message&&this.isHttpDNS&&this.restIndex+1<this.restTotal?(this.restIndex++,this.setRestUrl(),[4,this._open(e,!0,n)]):[3,7]):[3,8];case 6:return[2,y.sent()];case 7:throw n&&n({data:{isLastApi:1,isSuccess:0}}),this.clear(),delete s.extraInfo,l;case 8:if(!c)throw new Error("get token fail.");return this.expiresIn=c.expires_in,this.grantType="password",this.token=c.access_token,this.user=e.username,this.context.accessToken=c.access_token,c.extraInfo&&(p=c.extraInfo,E=p.httpCode,g=p.elapse,m={requestName:v.c.LOGIN_BY_PWD,requestElapse:g,requestUrl:r,isSuccess:1,code:E},n&&n({isRetry:!1,data:m})),[2,{accessToken:c.access_token,duration:c.expires_in}]}}))}))},e.prototype.retryConnectMSync=function(e){var t,n,r;return H(this,void 0,void 0,(function(){var o,i,s,a;return B(this,(function(c){switch(c.label){case 0:o=(new Date).getTime(),c.label=1;case 1:return c.trys.push([1,3,,7]),[4,this.connectMSync.call(this,e)];case 2:return i=c.sent(),e&&e({data:{isLastApi:1,isSuccess:1,accessChannel:null===(t=this.socketHost[this.hostIndex])||void 0===t?void 0:t.channel}}),[2,i];case 3:if(s=c.sent(),u.kg.error("connect to msync failed times:",this.retryConnectTimes+1,s),O.bh.includes(s.type))throw e&&e({data:{isLastApi:1,isSuccess:0,accessChannel:null===(n=this.socketHost[this.hostIndex])||void 0===n?void 0:n.channel,codeDesc:this.disconnectedReason&&JSON.stringify(this.disconnectedReason)||s.message}}),s;return this.retryConnectTimes++,this.retryConnectTimes<O.Ge?(this.isHttpDNS&&(this.hostIndex<this.socketHost.length-1?this.hostIndex++:this.hostIndex=this.socketHost.length-1,this.setSocketUrl()),s.type===w.E.REQUEST_TIMEOUT&&"provision timeout"===s.message||(a=(new Date).getTime()-o,null==e||e({isRetry:1!==this.retryConnectTimes,data:{requestUrl:this.url,requestName:v.c.CONNECT_WEBSOCKET,isSuccess:0,code:v.dd.closed,requestElapse:a,codeDesc:this.disconnectedReason&&JSON.stringify(this.disconnectedReason)||"websocket close"}})),[4,this.retryConnectMSync(e)]):[3,5];case 4:return c.sent(),[3,6];case 5:throw u.kg.error("connect to msync failed",s),e&&e({data:{isLastApi:1,isSuccess:0,accessChannel:null===(r=this.socketHost[this.hostIndex])||void 0===r?void 0:r.channel,codeDesc:this.disconnectedReason&&JSON.stringify(this.disconnectedReason)||s.message}}),s;case 6:return[3,7];case 7:return[2]}}))}))},e.prototype.connectMSync=function(e){var t=this,n="pending",r=(new Date).getTime();return new Promise((function(o,i){t.connectionResolve=o,t.connectionReject=i;var s=new WebSocket(t.url);s.binaryType="arraybuffer",t.sock=s,t.connectionTimer&&clearTimeout(t.connectionTimer),t.connectionTimer=setTimeout((function(){t.disconnectedReason={type:w.E.REQUEST_TIMEOUT,message:"connection timeout"},n="rejected",s.close(),null==i||i(t.disconnectedReason)}),O.th),s.onopen=function(){if(t.connectionTimer&&clearTimeout(t.connectionTimer),e){var n=(new Date).getTime()-r;e({isRetry:0!==t.retryConnectTimes,data:{requestUrl:t.url,requestName:v.c.CONNECT_WEBSOCKET,isSuccess:1,code:v.dd.success,requestElapse:n}})}(0,a.P4)(t.online.bind(t),t.offline.bind(t)),(0,a.Og)((function(){u.kg.debug("visibility true")}),(function(){u.kg.debug("visibility false")}));var o=t.mSync.generateProvision();t.provisionTimer&&clearTimeout(t.provisionTimer),t.provisionTimer=setTimeout((function(){u.kg.debug("provision timeout"),t.disconnectedReason=L.Z.create({type:w.E.REQUEST_TIMEOUT,message:"provision timeout"}),s.close(),null==i||i(t.disconnectedReason)}),O.Nt),s.send(o)},s.onclose=function(e){var r,o,s,a,c,l,d;if(t.connectionTimer&&clearTimeout(t.connectionTimer),u.kg.debug("websocket onclose, isLogging:",t._isLogging),t._isLogging)return null==i||i({type:w.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}),void(n="rejected");"rejected"!==n?(n="rejected",t.logOut?(t.clear(),null===(o=null===(r=null==t?void 0:t._localCache)||void 0===r?void 0:r.getInstance())||void 0===o||o.close(),null===(s=t.eventHandler)||void 0===s||s.dispatch("onDisconnected",t.disconnectedReason),t.resetConnState(),null==i||i({type:w.E.WEBIM_CONNCTION_DISCONNECTED,message:"logout"})):t.autoReconnectNumTotal<t.autoReconnectNumMax?(t.reconnect(),t.autoReconnectNumTotal%t.refreshDNSIntervals==0&&t.isHttpDNS&&(u.kg.debug("refresh dns config when websocket close"),t.getDNS({isRetry:!1}).catch((function(e){u.kg.debug("get dns error",e)})))):(t.disconnectedReason=L.Z.create({type:w.E.WEBIM_CONNCTION_DISCONNECTED,message:"reconnection failed"}),null===(a=t.unMSyncSendMsgMap)||void 0===a||a.clear(),t.rejectMessage(),null===(l=null===(c=null==t?void 0:t._localCache)||void 0===c?void 0:c.getInstance())||void 0===l||l.close(),null===(d=t.eventHandler)||void 0===d||d.dispatch("onDisconnected",t.disconnectedReason),t.resetConnState(),t.reconnecting=!1,null==i||i(t.disconnectedReason),u.kg.debug("reconnect fail"))):u.kg.debug("onclose reject is null")},s.onmessage=function(e){var n=t.mSync,r=n.decodeMSync,o=n.distributeMSync;a.P6.flow([r,o])(e,!1)},s.onerror=function(r){var o,s,a,c;if(t.connectionTimer&&clearTimeout(t.connectionTimer),u.kg.debug("websocket onerror, isLogging:",t._isLogging),t._isLogging)return null==i||i({type:w.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}),void(n="rejected");"rejected"!==n?(n="rejected",t.logOut||(t.autoReconnectNumTotal<t.autoReconnectNumMax?(u.kg.debug("sock.onError reconnect",t.autoReconnectNumTotal,t.autoReconnectNumMax),t.reconnect(),t.autoReconnectNumTotal%t.refreshDNSIntervals==0&&t.isHttpDNS&&(u.kg.debug("refresh dns config when websocket error"),t.getDNS({rpt:e,isRetry:!1}).catch((function(e){u.kg.debug("get dns error",e)})))):(t.disconnectedReason=L.Z.create({type:w.E.WEBIM_CONNCTION_DISCONNECTED,message:"reconnection failed"}),null===(o=t.unMSyncSendMsgMap)||void 0===o||o.clear(),t.rejectMessage(),null===(a=null===(s=null==t?void 0:t._localCache)||void 0===s?void 0:s.getInstance())||void 0===a||a.close(),null===(c=t.eventHandler)||void 0===c||c.dispatch("onDisconnected",t.disconnectedReason),t.resetConnState(),t.reconnecting=!1,u.kg.debug("reconnect fail"),null==i||i(t.disconnectedReason)))):u.kg.debug("onerror reject is null")}}))},e.prototype.close=function(){var e,t,n;u.kg.debug("call close"),u.kg._stopReportLogs(),this.logOut=!0,this.disconnectedReason=void 0,this.reconnecting=!1,this.context.status=w.E.STATUS_CLOSING,this.sock&&this.sock.close(),null===(e=this.unMSyncSendMsgMap)||void 0===e||e.clear(),this.stopHeartBeat(),this.rejectMessage(),this.context.status=w.E.STATUS_CLOSED,this._load_msg_cache=[],this._queues=[],this.unSyncQueue=[],this._msgHash={},this.mr_cache={},this.token="",this.context.accessToken="",this.clearTokenTimeout(),null===(n=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===n||n.close(),this.connectionTimer&&clearTimeout(this.connectionTimer),this.provisionTimer&&clearTimeout(this.provisionTimer),this.probingTimer&&clearTimeout(this.probingTimer)},e.prototype.registerUser=function(e){return H(this,void 0,void 0,(function(){var t,n,r,o,i,s,u,c,l,d,h,f,p,E;return B(this,(function(g){switch(g.label){case 0:return t=this.dataReport.geOperateFun({uid:e.username,operationName:v.fI.REGISTER}),this.isHttpDNS?(this.dnsIndex=0,[4,this.getDNS({rpt:t,isRetry:!1})]):[3,2];case 1:g.sent(),g.label=2;case 2:return n=this.apiUrl,r=n+"/"+this.orgName+"/"+this.appName+"/users",o=JSON.stringify({username:e.username,password:e.password,nickname:e.nickname||""}),i={headers:{"Content-type":"application/json"},url:r,dataType:"json",data:o},[4,j(a.P6.ajax(i,v.fI.SDK_INTERNAL))];case 3:return s=g.sent(),u=s[0],c=s[1],l={requestName:v.c.RESISTER,requestUrl:r},u?(d=u.extraInfo||{},p=d.httpCode,E=d.elapse,h=d.errDesc,t({isRetry:!1,data:k(k({},{requestElapse:E,isSuccess:0,code:p,codeDesc:h}),l)}),!(u.message.includes("Open registration doesn't allow")||u.message.includes("username be unique")||u.message.includes("is not legal"))&&this.isHttpDNS&&this.restIndex+1<this.restTotal?(this.restIndex++,this.setRestUrl(),[4,this.registerUser(e)]):[3,5]):[3,7];case 4:return[2,g.sent()];case 5:throw t({data:{isLastApi:1,isSuccess:0}}),delete u.extraInfo,u;case 6:return[3,8];case 7:if(!c)throw new Error("register user fail.");return f=c.extraInfo||{},p=f.httpCode,E=f.elapse,t({isEndApi:!0,isRetry:!1,data:k(k({},{requestElapse:E,isSuccess:1,code:p}),l)}),[2,{data:null==c?void 0:c.entities[0],type:0}];case 8:return[2]}}))}))},e.prototype.renewToken=function(e){var t=this;return this.isOpened()?this.getTokenExpireTimestamp(e).then((function(n){var r=n.expire_timestamp,o=Date.now();return t.expirationTime=r,t.expiresIn=r-o,t.token=e,t.context.accessToken=e,t.clearTokenTimeout(),t.tokenExpireTimeCountDown(t.expiresIn),{status:!0,token:e,expire:n.expire_timestamp}})):Promise.reject({status:!1})},e.prototype.send=function(e){return Promise.resolve(null)},e.prototype.getTokenExpireTimestamp=function(e){if("string"!=typeof e||""===e)throw Error('Invalid parameter: "token"');var t=this.context,n=t.orgName,r=t.appName,o={url:"".concat(this.apiUrl,"/").concat(n,"/").concat(r,"/sdk/users/").concat(this.user,"/token/expires"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"}};return u.kg.debug("Call getTokenExpireTimestamp",e),a.P6.ajax(o,v.fI.SDK_INTERNAL)},e.prototype.clearTokenTimeout=function(){u.kg.debug("clearTokenTimeout"),this.tokenWillExpireTimer&&clearTimeout(this.tokenWillExpireTimer),this.tokenExpiredTimer&&clearTimeout(this.tokenExpiredTimer),this.tokenWillExpireTimer=null,this.tokenExpiredTimer=null},e.prototype.compareTokenExpireTime=function(e,t){var n,r=Number(t)-Number(e);u.kg.debug("compareTokenExpireTime",r),r<=this.expiresIn/2&&r>0?(null===(n=this.eventHandler)||void 0===n||n.dispatch("onTokenWillExpire"),u.kg.info("onTokenWillExpire",r)):r<=0&&(this.closeByTokenExpired(),u.kg.info("closeByTokenExpired",r))},e.prototype.closeByTokenExpired=function(){var e;u.kg.info("closed By TokenExpired"),null===(e=this.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),this.close()},e.prototype.tokenExpireTimeCountDown=function(e){var t=this;e>Math.pow(2,31)-1&&(e=Math.pow(2,31)-1),this.tokenWillExpireTimer=setTimeout((function(){var n;null===(n=t.eventHandler)||void 0===n||n.dispatch("onTokenWillExpire"),u.kg.info("onTokenWillExpire",Math.floor(e/2))}),e/2),this.tokenExpiredTimer=setTimeout((function(){var e;u.kg.info("onTokenExpired",0),null===(e=t.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),t.close()}),e)},e.prototype.stopHeartBeat=function(){clearInterval(this.heartBeatID)},e.prototype.setContext=function(e){this.context.jid={appKey:this.appKey,name:e.username,domain:this.context.jid.domain,clientResource:this.clientResource},this.context.root=this.root,this.context.userId=e.username,this.context.appKey=this.appKey,this.context.appName=this.appName,this.context.orgName=this.orgName},e.prototype.getDNS=function(e){var t;return H(this,void 0,void 0,(function(){var n,r,o,i,s,c,l,d,h,f,p,E,g,m,y,_,T,R,I,S,C,N;return B(this,(function(A){switch(A.label){case 0:return n=e.rpt,r=e.isRetry,o=this.dnsIndex<this.dnsTotal?this.dnsIndex:0,i=this.dnsArr[o]+"/easemob/server.json",s={url:i,dataType:"json",type:"GET",data:{app_key:encodeURIComponent(this.appKey)}},[4,j(a.P6.ajax(s,v.fI.SDK_INTERNAL))];case 1:return c=A.sent(),l=c[0],d=c[1],l?(h=l.extraInfo||{},f=h.elapse,p=h.httpCode,E=h.errDesc,g={requestUrl:i,requestName:v.c.GET_DNS,isSuccess:0,code:p,codeDesc:E,requestElapse:f},n&&n({isRetry:r,data:g}),u.kg.debug("getHttpDNS failed: "+this.dnsIndex),this.dnsIndex++,this.dnsIndex<this.dnsTotal?[4,this.getDNS({rpt:n,isRetry:!0})]:[3,3]):[3,4];case 2:return A.sent(),[2];case 3:throw L.Z.create({type:w.E.SERVER_GET_DNSLIST_FAILED,message:"get DNS failed",data:l});case 4:if(!d||!(null===(t=d.rest)||void 0===t?void 0:t.hosts)||!d["msync-wx"])throw L.Z.create({type:w.E.SERVER_GET_DNSLIST_FAILED,message:"DNS hosts resolution failed",data:d});return u.kg.debug("getHttpDNS success: "+this.dnsIndex),m=d.extraInfo||{},y=m.elapse,_=m.httpCode,this._reportLogs="true"===d.enableReportLogs,this._reportInterval=Number(d.reportInterval||O.XV),T={requestUrl:i,requestName:v.c.GET_DNS,requestElapse:y,isSuccess:1,code:_},n&&n({isRetry:r,data:T}),R=d.rest.hosts,I=this.https?"https":"http",S=R.filter((function(e){if(e.protocol===I)return e})),this.restHosts=S,this.restTotal=this.restHosts.length,C=d["msync-wx"].hosts,N=C.filter((function(e){if(e.protocol===I)return e})),this.socketHost=N,"true"===(null==d?void 0:d.enableDataReport)?(this.dataReport.setIsCollectDt(!0),this.dataReport.setIsReportDt(!0)):(this.dataReport.setIsReportDt(!1),this.dataReport.setIsCollectDt(!1)),"false"===(null==d?void 0:d.uploadinparts_enable)&&(this.uploadPartEnable=!1),this.setRestUrl(),this.setSocketUrl(),[2]}}))}))},e.prototype.setRestUrl=function(){var e,t;if(this.restIndex>this.restHosts.length)return u.kg.debug("restIndex > restTotal"),"";var n="",r=this.restHosts[this.restIndex],o=r.domain,i=r.ip,s=r.port,a=this.https?"https:":"http:";return i&&"undefined"!=typeof window&&"http:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)?n=a+"//"+i+":"+s:(n=a+"//"+o,s&&"80"!==s&&"443"!==s&&(n+=":".concat(s)),"undefined"==typeof window||window.location||(n="https://"+o),"undefined"!=typeof window&&window.location&&"file:"===(null===(t=window.location)||void 0===t?void 0:t.protocol)&&(n="https://"+o)),"undefined"==typeof window&&(n=a+"//"+o),this.apiUrl=n,n},e.prototype.setSocketUrl=function(){var e=this.socketHost[this.hostIndex],t=e.domain,n=e.ip,r=e.port,o="";o=t||n,r&&"80"!==r&&"443"!==r&&(o+=":"+r),o&&(this.url="//"+o+"/websocket");var i=this.https?"wss:":"ws:";this.url=i+this.url},e.prototype.online=function(){var e;u.kg.debug("online"),null===(e=this.eventHandler)||void 0===e||e.dispatch("onOnline"),this.sock&&1!==this.sock.readyState&&(u.kg.debug("sock.readyState:",this.sock.readyState),this.logOut||this.reconnecting||this.reconnect())},e.prototype.offline=function(){var e,t;u.kg.debug("offline"),null===(e=this.sock)||void 0===e||e.close(),null===(t=this.eventHandler)||void 0===t||t.dispatch("onOffline")},e.prototype.getLogger=function(){var e=u.kg.getLogger("defaultLogger");return e.setConfig({useCache:!1,maxCache:3145728,color:"",background:""}),e.enableAll(),e},e.prototype.rejectMessage=function(){var e=this,t=Object.keys(this._msgHash);if(t.length>0){var n=L.Z.create({type:w.E.MESSAGE_WEBSOCKET_DISCONNECTED,message:"websocket disconnected"});t.forEach((function(t){var r,o,i;(null===(r=e.unMSyncSendMsgMap)||void 0===r?void 0:r.has(t))||(e._msgHash[t].reject instanceof Function&&e._msgHash[t].reject(n),null===(i=null===(o=e._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.updateLocalMessage(t,{serverMsgId:t,status:x.r.FAIL}),e._msgHash[t].fail instanceof Function&&e._msgHash[t].fail(n),e._msgHash[t].messageTimer&&clearTimeout(e._msgHash[t].messageTimer),delete e._msgHash[t])}))}},e.prototype.resetConnState=function(){this.mSync.stopHeartBeat(),this.times=1,this.autoReconnectNumTotal=0,this.hostIndex=0},e.prototype.reconnect=function(e){var t,n=this;if(this.logout)return u.kg.warn("The user has already logged out when reconnecting");u.kg.debug("socket reconnect readyState",this.sock.readyState),(0!==this.sock.readyState&&1!==this.sock.readyState||e)&&(!1===this.reconnecting&&(this.reconnecting=!0),null===(t=this.eventHandler)||void 0===t||t.dispatch("onReconnecting"),u.kg.info("reconnect times: ",this.times),u.kg.info("reconnect sock.readyState: ",this.sock.readyState),this.rejectMessage(),this.isHttpDNS&&(this.hostIndex<this.socketHost.length-1?this.hostIndex++:this.hostIndex=this.socketHost.length-1),setTimeout((function(){(1!==n.sock.readyState||e)&&(u.kg.info("login sock.readyState: ",n.sock.readyState),n.sock.close(),n.connectMSync(),n.times++)}),500*this.times),this.autoReconnectNumTotal++)},e.prototype.clear=function(){this.restTotal=0,this.restIndex=0,this.hostIndex=0,this.hostTotal=0},e.prototype.onShow=function(){var e=this;u.kg.debug("execute onshow callback"),!this.logOut&&!this.reconnecting&&Date.now()-this.lastHeartbeat>2e3&&(u.kg.debug("send ping"),this.mSync.sendUnreadDeal(),this.probingTimer&&clearTimeout(this.probingTimer),this.probingTimer=setTimeout((function(){u.kg.error("Websocket connection timeout"),e.logOut||e.reconnecting||e.reconnect(!0)}),O.xd))},e.prototype.downloadAndParseCombineMessage=function(e){var t=this,n=e.url,r=e.secret;return new Promise((function(e,o){var i,s,c=a.P6.getEnvInfo(),l="web"!==c.platform&&"node"!==c.platform&&"quick_app"!==c.platform&&(null===(s=null===(i=c.global)||void 0===i?void 0:i.canIUse)||void 0===s?void 0:s.call(i,"getFileSystemManager")),d=function(n){var r=function(e){o({message:"Read file failed",data:e})},i=function(n){return H(t,void 0,void 0,(function(){var t,r,i,s,c,d,h,f,p,E,v,g,m;return B(this,(function(y){switch(y.label){case 0:for(t=l?new Uint8Array(n.data):new Uint8Array(n.target.result),r=0,i=0,s=2,c=t.subarray(r,r+s),d=a.P6.Uint8ArrayToString(c),u.kg.debug("file header:",d),i+=s,h=0,f=2;f<t.length-1;f++)f%2==1&&(h^=t[f]);if(p=t.subarray(t.length-1,t.length),u.kg.debug("checkResult:",h,p[0]===h),p[0]!==h)return[2,o({message:"File verification failed"})];if("cm"!==d)return[3,7];y.label=1;case 1:y.trys.push([1,5,,6]),E=[],v=function(){var e,n,o,a;return B(this,(function(u){switch(u.label){case 0:return r+=s,i+=s=4,e=t.subarray(r,r+s),r+=s,s=e.reduce((function(t,n,r){return t+(n<<8*(e.length-r-1))}),0),i+=s,n=t.subarray(r,r+s),o=(o=g.root.lookup("easemob.pb.Meta")).decode(n),[4,P.Z.call(g,o,0,!0,!0)];case 1:return a=u.sent(),E.push(a),[2]}}))},g=this,y.label=2;case 2:return i<t.length-1?[5,v()]:[3,4];case 3:return y.sent(),[3,2];case 4:return[2,e(E)];case 5:return m=y.sent(),o({message:"Parse file failed",data:m}),[3,6];case 6:return[3,8];case 7:return[2,o({message:"File verification failed"})];case 8:return[2]}}))}))};if(l){var s=c.global.getFileSystemManager(),d=n.tempFilePath;s.readFile({filePath:d,success:i,fail:r})}else if(n instanceof Blob){var h=new FileReader;h.readAsArrayBuffer(n),h.onerror=r,h.onload=i}},h=function(e){o({type:w.E.WEBIM_DOWNLOADFILE_ERROR,message:"Download failed, please try again",data:e})};l?c.global.downloadFile({url:n,success:d,fail:h}):a.P6.download.call(t,{url:n,headers:{Accept:"application/json"},onFileDownloadComplete:d,onFileDownloadError:h,secret:r,accessToken:t.context.accessToken})}))},e.prototype.setLoginInfoCustomExt=function(e){if(u.kg.debug("setLoginInfoCustomExt","params:",e),e){if("string"!=typeof e)throw new Error("ext must be a string");if(e.length>1024)throw new Error("ext length must be less than 1024")}this.loginInfoCustomExt=e},e}(),j=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e,null]}))},W=F}(),r.O(o)}()}));
|