easemob-websdk 4.3.0 → 4.3.1-beta

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.
@@ -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()}(this,(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,{w:function(){return i}}),n(9601),n(2772);var r=n(7360),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)};function i(e){var t,n,i,s=e.id,a=e.payload,u=e.timestamp,c=e.to,l=a.bodies&&a.bodies.length>0?a.bodies[0]:{},d={},f={},p=a.type?a.type:c.indexOf("@conference.easemob.com")>-1?"groupChat":"singleChat";switch(p="chat"===p?"singleChat":p,l.type){case"txt":var h=null===(t=null==a?void 0:a.meta)||void 0===t?void 0:t.edit_msg;if(d={id:s,type:"txt",chatType:p,msg:l.msg||"",to:a.to||"",from:a.from,time:u,ext:a.ext},h){var v=h.edit_time,_=h.operator,E=h.count;d.modifiedInfo={operationTime:v,operatorId:_,operationCount:E}}break;case"img":d={id:s,type:"img",chatType:p,to:a.to,from:a.from,time:u,ext:a.ext,width:(null===(n=l.size)||void 0===n?void 0:n.width)||0,height:(null===(i=l.size)||void 0===i?void 0:i.height)||0,secret:l.secret||"",url:(null==l?void 0:l.url)||"",file_length:l.file_length||0,file:{}};break;case"video":d={id:s,type:"video",chatType:p,from:a.from,to:a.to,url:(null==l?void 0:l.url)||"",secret:l.secret||"",filename:l.filename,length:l.length||0,file:{},file_length:l.file_length||0,filetype:a.ext.file_type||"",ext:a.ext,time:u};break;case"loc":d={id:s,type:"loc",chatType:p,from:a.from,to:a.to,buildingName:l.buildingName||"",addr:l.addr,lat:l.lat,lng:l.lng,ext:a.ext,time:u};break;case"audio":d={id:s,type:"audio",chatType:p,from:a.from,to:a.to,secret:l.secret||"",ext:a.ext,time:u,url:(null==l?void 0:l.url)||"",file:{},filename:l.filename,length:l.length||0,file_length:l.file_length||0,filetype:a.ext.file_type||""};break;case"file":d={id:s,type:"file",chatType:p,from:a.from,to:a.to,ext:a.ext,time:u,url:(null==l?void 0:l.url)||"",secret:l.secret||"",file:{},filename:l.filename||"",file_length:l.file_length||0,filetype:a.ext.file_type||""};break;case"cmd":d={id:s,type:"cmd",chatType:p,from:a.from,to:a.to,ext:a.ext,time:u,action:l.action||""};break;case"custom":d={id:s,type:"custom",chatType:p,from:a.from,to:a.to,ext:a.ext,time:u,customEvent:l.customEvent||"",customExts:l.customExts||""};break;case"combine":d={id:s,type:"combine",chatType:p,msg:l.msg||"",to:a.to||"",from:a.from,time:u,ext:a.ext,title:l.title||"",summary:l.summary||"",url:(null==l?void 0:l.url)||"",compatibleText:l.text,combineLevel:l.combineLevel||0,secret:l.secret||"",filename:l.filename||"",file_length:l.file_length||0};break;default:r.kg.error("unexpected message: ".concat(e))}if(a.msgConfig&&(f.msgConfig=a.msgConfig),null==a?void 0:a.meta){var y=a.meta;y.thread&&(f.chatThread={messageId:y.thread.msg_parent_id,parentId:y.thread.muc_parent_id,chatThreadName:y.thread.thread_name}),y.reaction&&(f.reactions=y.reaction),y.translations&&(f.translations=y.translations)}return o(o({},d),f)}},2071:function(e,t,n){"use strict";n.d(t,{$x:function(){return s},F3:function(){return a},TJ:function(){return o},Tp:function(){return l},Wc:function(){return r},el:function(){return i},iB:function(){return u},yK:function(){return c}}),n(6992),n(1532),n(1539),n(8783),n(3948);var r=7,o=new Map,i="im",s="32f24ab2ddb74f508aa9286c356cec84",a=1e3,u={INIT:9674,API:9675},c="direct",l=-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_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_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_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.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.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.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"}(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"}(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,{g:function(){return w},Z:function(){return ve}}),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(9714),n(5212),n(8309),n(2772),n(9653),n(7941),n(3843),n(1038),n(2564),n(9753),n(8264),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(561),n(3161),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 f(e,t){var n,r,o,i,s,a,u=this,c=this.context,f=c.userId,p=c.jid,h=t.from.name===f&&p.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",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",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),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;r.type=t.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",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="memberPresence",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 f=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(f).forEach((function(e){var t=d[e];if(t){var n=f[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),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),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 p=function(e){var t=this.root.lookup("easemob.pb.MUCBody").decode(e.payload),n=t.operation;c.kg.debug("onMucMessage",t),f.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)}},v=n(7252),_=function(e){var t,n,r,o,i,s,u=this.root.lookup("easemob.pb.StatisticsBody").decode(e.payload);switch(u.operation){case 0:this.onStatisticMessage&&this.onStatisticMessage(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onStatisticMessage",u);break;case 1:s=v.Z.create({type:a.E.WEBIM_CONNCTION_USER_REMOVED,message:"user has been removed"}),this.logOut=!0,this.onError&&this.onError(s),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",s);break;case 2:s=v.Z.create({type:a.E.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,message:"the user is already logged on another device"}),this.logOut=!0,this.onError&&this.onError(s),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",s);break;case 3:s=v.Z.create({type:a.E.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,message:"the user was kicked by changing password"}),this.logOut=!0,this.onError&&this.onError(s),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",s);break;case 4:s=v.Z.create({type:a.E.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,message:"the user was kicked by other device"}),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)}},E=(n(9720),n(4370)),y=n(4363);function g(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 m(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 O(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=(0,y.w)(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 T(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 R(e){var t,n=e.data,r={operation:"del"===n.op?"deleteConversation":"top"===n.op?"pinnedConversation":"unpinnedConversation",conversationId:n.id,conversationType:"chat"===n.type?"singleChat":"groupChat",timestamp:n.ts};this.clientResource!==n.res&&(null===(t=this.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",r))}var I=function(e){var t=E.P6.parseNotify(e.payload);switch(t.type){case"presence":g.call(this,t);break;case"reaction":m.call(this,t);break;case"thread":O.call(this,t);break;case"roaming_delete":T.call(this,t);break;case"conv":R.call(this,t);break;default:c.kg.error("unexpected notify type: ".concat(t.type))}},C=n(7288),S=n(9743),b=1,N=n(2071),A=n(1595);function M(e){return M="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},M(e)}var w,L=function(){return L=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},L.apply(this,arguments)},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())}))},x=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])}}},P=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"}(w||(w={}));var D=E.P6.getEnvInfo();function k(){var e="webim",t="",n="",r=[],o=(new Date).valueOf();"webim"===this.deviceId?(n="random_"+o.toString(),e=this.deviceId+"_"+n,t=this.deviceId):e=t=n="webim_"+this.deviceId,this.context.jid&&(this.context.jid.clientResource=e);var i=this.root.lookup("easemob.pb.Provision"),s=i.decode(r);s.compressType=this.compressType,s.encryptType=this.encryptType,s.osType=this.osType,s.version=this.version,s.deviceName=t,s.resource=e,s.deviceUuid=n,s.authToken='{"token":"$t$'+this.token+'"}',s.actionVersion="v2.0",s=i.encode(s).finish();var a=this.root.lookup("easemob.pb.MSync"),u=a.decode(r);return u.version=this.version,u.guid=this.context.jid,u.auth="$t$"+this.token,u.command=3,u.deviceId=t,u.serviceId=this.dataReport.getServiceId(),u.encryptType=this.encryptType,u.payload=s,a.encode(u).finish()}function H(e,t){var n=this,r=E.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 B(e,t){switch(e.ns){case 0:_.call(this,e);break;case 1:u.Z.call(this,e,t);break;case 2:p.call(this,e);break;case 3:h.handleRosterMsg.call(this,e);break;case 4:this.registerConfrIQHandler&&this.registerConfrIQHandler(e,t,this);break;case 5:I.call(this,e);break;default:c.kg.error("distributeMeta",e)}}function G(e,t){for(var n=function(n){var o=new(s())(e[n].id.low,e[n].id.high,e[n].id.unsigned).toString();if(r._load_msg_cache.some((function(e){return e.msgId===o})))return"continue";var i=e[n].from.name,a=e[n].to?e[n].to.name:"",u=!!e[n].to&&-1!==e[n].to.domain.indexOf("conference");r._load_msg_cache.length<=r.max_cache_length||r._load_msg_cache.shift(),r._load_msg_cache.push({msgId:o,from:i,to:a,isGroup:u}),B.call(r,e[n],t)},r=this,o=0;o<e.length;o++)n(o)}function F(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)X.call(this);else for(var r=0;r<t.unread.length;r++)c.kg.debug("pull unread message",t.unread),q.call(this,t.unread[r].queue);X.call(this)}function j(){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 W(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 q(e){c.kg.debug("sendBackqueue");var t=W.call(this,e);he.call(this,t)}function K(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 V(){var e;this.times=1,this.autoReconnectNumTotal=0,this.onOpened&&this.onOpened(),null===(e=this.eventHandler)||void 0===e||e.dispatch("onConnected"),Y.call(this),Z.call(this),$.call(this),X.call(this)}function J(e,t){c.kg.debug("sendLastSession");var n=K.call(this,e,t);he.call(this,n)}function z(e){var t,n,r,o,i,s,u=this,l=this.root.lookup("easemob.pb.Provision").decode(e.payload);if(this.context.jid&&(this.context.jid.clientResource=l.resource),this.clientResource=l.resource,0===l.status.errorCode){if(l.authToken){var d=JSON.parse(l.authToken).expires_in;if(!this.tokenExpiredTimer&&!this.tokenWillExpireTimer){var f=Date.now();this.expirationTime=d;var p=this.expirationTime-f;this.expiresIn=p<0?0:p,this.tokenExpireTimeCountDown(this.expiresIn)}}this.reconnecting=!1,this.logOut=!1,"zfb"!==D.platform&&"dd"!==D.platform||(this.sock.readyState=1),this._localCache?(null===(t=this._localCache)||void 0===t?void 0:t.getInstance())?V.call(this):this._localCache&&new this._localCache({user:this.user,dbName:"cache_".concat(Math.abs((0,S.un)(this.appKey)),"_").concat(this.user),version:b,onInit:function(){return U(u,void 0,void 0,(function(){return x(this,(function(e){return c.kg.debug("localCache init success"),V.call(this),[2]}))}))}}):V.call(this)}else{var h=void 0,_=l.status.reason;switch(_){case"Sorry, the app day live count limit":h=v.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the daily active user limit for this app has been reached"}),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",h);break;case"Sorry, the app online count limit":h=v.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the maximum number limit of online users for this app has been reached"}),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",h);break;case"Sorry, the app month live count limit":h=v.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the monthly active user limit for this app has been reached"}),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",h);break;case"Sorry, who are you?":h=v.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",h);break;default:h=v.Z.create({type:a.E.SERVER_UNKNOWN_ERROR,message:_}),null===(s=this.eventHandler)||void 0===s||s.dispatch("onError",h)}}}function Y(){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]);he.call(this,o,n[r])}null===(t=this.unMSyncSendMsgMap)||void 0===t||t.clear()}}function X(){var e=j.call(this);he.call(this,e)}function $(){var e=ee.call(this);he.call(this,e)}function Z(){var e=this;Q.call(this),this.heartBeatID=setInterval((function(){$.call(e)}),this.heartBeatWait)}function Q(){clearInterval(this.heartBeatID)}function ee(){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 te(e,t){return e.some((function(e){return e.name===t.name}))}function ne(e){var t=this,n=this.root.lookup("easemob.pb.CommNotice"),r=n.decode(e.payload),o=te(this._queues,r.queue);c.kg.debug("receive notice",n,this._queues),o||this.clientResource===r.queue.clientResource&&r.queue.name===this.context.userId||(this.qTimer&&clearTimeout(this.qTimer),this.qTimer=setTimeout((function(){var e=r.queue;te(t._queues,e)&&(q.call(t,e),c.kg.debug("⬇q:",e))}),1e4),this._queues.push(r.queue),1===this._queues.length&&q.call(this,r.queue))}function re(e){if("string"==typeof e){var t=JSON.parse(e);if(Array.isArray(t)){var n=t[0],r=t[1];this.closeInfo={code:n,reason:r}}}}function oe(e){return U(this,void 0,void 0,(function(){var t,n,r,i,s,a,u,l;return x(this,(function(d){if(t=E.P6.getEnvInfo(),n=this.root.lookup("easemob.pb.MSync"),"miniCore"===this.name){try{e.data instanceof ArrayBuffer||(c.kg.debug("received message: ".concat(e.data)),re.call(this,e.data)),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('[401,"normal closed"]'===e.data&&(c.kg.debug("received message: ".concat(e.data)),re.call(this,e.data)),s=o().atob(e.data),a=[],u=0,l=s.length;u<l;++u)a.push(s.charCodeAt(u));return[2,n.decode(a)]}try{e.data instanceof ArrayBuffer||(c.kg.debug("received message: ".concat(e.data)),re.call(this,e.data)),r=n.decode(e.data)}catch(e){throw new Error("decode message fail.")}return[2,r]}))}))}function ie(e){var t=this;e.then((function(e){if(e)switch(e.command){case 0:se.call(t,e);break;case 1:F.call(t,e);break;case 2:ne.call(t,e);break;case 3:z.call(t,e);break;default:c.kg.error("unexpected msync command: ".concat(e.command))}else c.kg.error("unexpected msync result: ".concat(e))}))}function se(e){var t,n,r,o,i,u,c,l,d,f,p,h,_,y,g,m,O,T,R,I,S,b,M,w,P,D,k,H,B,F,j,W,K,V,z,Y,X,$,Z,Q,ee;return U(this,void 0,void 0,(function(){var U,te,ne,re,oe,ie,se,ae,ue,ce,le,de,fe,pe,he,ve,_e,Ee,ye,ge,me,Oe,Te,Re,Ie,Ce,Se,be,Ne,Ae=this;return x(this,(function(x){switch(x.label){case 0:if(U=(U=this.root.lookup("easemob.pb.CommSyncDL")).decode(e.payload),te=new(s())(U.serverId.low,U.serverId.high,U.serverId.unsigned).toString(),ne=new(s())(U.metaId.low,U.metaId.high,U.metaId.unsigned).toString(),!(Number(ne)>0))return[3,10];if(!U.status)return[3,9];if(0!==U.status.errorCode)return[3,8];if(null==(re=this._msgHash[ne])?void 0:re.isHandleChatroom){try{oe="join"===(null===(t=this._msgHash[ne])||void 0===t?void 0:t.operation),(null===(n=this._msgHash[ne])||void 0===n?void 0:n.resolve)instanceof Function&&oe&&this._msgHash[ne].resolve({type:0,data:{action:"apply",id:this._msgHash[ne].roomId,result:!0,user:this.context.userId}}),(null===(r=this._msgHash[ne])||void 0===r?void 0:r.success)instanceof Function&&oe&&this._msgHash[ne].success({type:0,data:{action:"apply",id:this._msgHash[ne].roomId,result:!0,user:this.context.userId}}),(null===(o=this._msgHash[ne])||void 0===o?void 0:o.resolve)instanceof Function&&!oe&&this._msgHash[ne].resolve({type:0,data:{result:!0}}),(null===(i=this._msgHash[ne])||void 0===i?void 0:i.success)instanceof Function&&!oe&&this._msgHash[ne].success({type:0,data:{result:!0}})}catch(e){Se=v.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:e}),this.onError&&this.onError(Se),null===(u=this.eventHandler)||void 0===u||u.dispatch("onError",Se)}delete this._msgHash[ne]}if(!re||re.isHandleChatroom)return[3,7];if(ie=null,se="",ae=0,0!==U.metas.length)try{(ue=E.P6.parseNotify(U.metas[0].payload)).edit_msg&&(ce=ue.edit_msg,le=ce.count,de=ce.operator,fe=ce.edit_time,pe=ce.sender,he=ce.send_time,ie={operationTime:fe,operatorId:de,operationCount:le},se=pe,ae=Number(he))}catch(e){Se=v.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e}),this.onError&&this.onError(Se),null===(c=this.eventHandler)||void 0===c||c.dispatch("onError",Se)}N.TJ.has(ne)&&(N.TJ.get(ne).rpt({isEndApi:!0,data:{isSuccess:1,requestMethod:"WEBSOCKET",requestUrl:this.url,code:A.dd.success,msgId:te}}),N.TJ.delete(ne)),x.label=1;case 1:return x.trys.push([1,5,,6]),ve={localMsgId:ne,serverMsgId:te},ie&&(this._msgHash[ne].modifiedInfo=ie,_e=this._msgHash[ne],Ee=_e.editMessageId,Ie=_e.type,ye=_e.chatType,ge=_e.msg,me=_e.to,Oe=_e.translations,Te={id:Ee,type:Ie,chatType:ye,msg:ge,modifiedInfo:ie,to:me,from:se,time:Number(ae)},Oe&&(Te.translations=Oe),ve.message=Te,null===(f=null===(d=null===(l=this._localCache)||void 0===l?void 0:l.getInstance())||void 0===d?void 0:d.getMessageByServerMsgId(Ee))||void 0===f||f.then((function(e){var t,n;e&&"txt"===e.type&&(null===(n=null===(t=Ae._localCache)||void 0===t?void 0:t.getInstance())||void 0===n||n.putMessageToDB(L(L({},e),{msg:Te.msg,modifiedInfo:Te.modifiedInfo,translations:Te.translations})))}))),[4,null===(h=null===(p=this._localCache)||void 0===p?void 0:p.getInstance())||void 0===h?void 0:h.updateLocalMessage(ne,{serverMsgId:te,status:C.r.SUCCESS})];case 2:return x.sent(),(null===(_=this._msgHash[ne])||void 0===_?void 0:_.success)instanceof Function?[4,this._msgHash[ne].success(ne,te)]:[3,4];case 3:x.sent(),x.label=4;case 4:return(null===(y=this._msgHash[ne])||void 0===y?void 0:y.resolve)instanceof Function&&this._msgHash[ne].resolve(ve),[3,6];case 5:return Re=x.sent(),Se=v.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:Re}),this.onError&&this.onError(Se),null===(g=this.eventHandler)||void 0===g||g.dispatch("onError",Se),[3,6];case 6:this.onReceivedMessage&&this.onReceivedMessage({id:ne,mid:te,to:this._msgHash[ne].to,time:0}),null===(m=this.eventHandler)||void 0===m||m.dispatch("onReceivedMessage",{id:ne,mid:te,to:this._msgHash[ne].to}),delete this._msgHash[ne],x.label=7;case 7:return[3,9];case 8:if(15===U.status.errorCode)(null===(O=this._msgHash[ne])||void 0===O?void 0:O.fail)instanceof Function&&this._msgHash[ne].fail({type:a.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject({type:a.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),null===(R=null===(T=this._localCache)||void 0===T?void 0:T.getInstance())||void 0===R||R.updateLocalMessage(ne,{serverMsgId:te,status:C.r.FAIL});else if(1===U.status.errorCode){switch(Ie=void 0,U.status.reason){case"blocked":Ie=a.E.PERMISSION_DENIED;break;case"group not found":Ie=a.E.GROUP_NOT_EXIST;break;case"not in group or chatroom":Ie=a.E.GROUP_NOT_JOINED;break;case"exceed recall time limit":Ie=a.E.MESSAGE_RECALL_TIME_LIMIT;break;case"message recall disabled":Ie=a.E.SERVICE_NOT_ENABLED;break;case"not in group or chatroom white list":Ie=a.E.SERVICE_NOT_ALLOW_MESSAGING;break;case"nonroster":Ie=a.E.USER_NOT_FRIEND,U.status.reason="not contact";break;case"group is disabled":Ie=a.E.GROUP_IS_DISABLED,U.status.reason="group is disabled";break;case"limit directed users":Ie=a.E.MAX_LIMIT;break;case"Sorry, edit limit reached":Ie=a.E.MAX_LIMIT,U.status.reason="Modify message limit reached";break;case"Sorry, message does not exist":Ie=a.E.MODIFY_MESSAGE_NOT_EXIST,U.status.reason="The message does not exist.";break;case"Sorry, You do not have permission":Ie=a.E.PERMISSION_DENIED,U.status.reason="You do not have the modified permission.";break;case"Sorry, format is incorrect":Ie=a.E.MODIFY_MESSAGE_FORMAT_ERROR,U.status.reason="The modify messaged format error.";break;case"Sorry, edit is not available":Ie=a.E.SERVICE_NOT_ENABLED,U.status.reason="The message modify function is not activated.";break;case"Sorry, edit fail":Ie=a.E.MODIFY_MESSAGE_FAILED,U.status.reason="Modify message failed.";break;default:U.status.reason.includes("grpID")&&U.status.reason.includes("does not exist!")?(Ie=a.E.CHATROOM_NOT_EXIST,U.status.reason="The chat room dose not exist."):U.status.reason.includes("username")&&U.status.reason.includes("doesn't exist!")?Ie=a.E.USER_NOT_FOUND:"group member list is full!"===U.status.reason?Ie=a.E.CHATROOM_MEMBERS_FULL:U.status.reason.includes("can not join this group")&&U.status.reason.includes("is in the blacklist")?(Ie=a.E.PERMISSION_DENIED,U.status.reason="permission denied"):Ie="can not operate this group, reason: group is disabled"===U.status.reason?a.E.GROUP_IS_DISABLED:U.status.reason.includes("moderation")?a.E.MESSAGE_MODERATION_BLOCKED:a.E.SERVER_UNKNOWN_ERROR}this._msgHash[ne]&&((null===(I=this._msgHash[ne])||void 0===I?void 0:I.isHandleChatroom)?(Ce=v.Z.create({type:Ie,message:U.status.reason||"",data:""}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject(Ce),this._msgHash[ne].error instanceof Function&&this._msgHash[ne].error(Ce)):(Ce=v.Z.create({type:Ie,message:U.status.reason||"",data:{id:ne,mid:te}}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject(Ce),this._msgHash[ne].fail instanceof Function&&this._msgHash[ne].fail({type:Ie,reason:U.status.reason?U.status.reason:"",data:{id:ne,mid:te}}),null===(b=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===b||b.updateLocalMessage(ne,{serverMsgId:te,status:C.r.FAIL})),delete this._msgHash[ne])}else if(7===U.status.errorCode)"sensitive words"===U.status.reason&&this._msgHash[ne]?(Ce=v.Z.create({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"sensitive words",data:{id:ne,mid:te}}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject(Ce),this._msgHash[ne].fail instanceof Function&&this._msgHash[ne].fail({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:ne,mid:te,reason:"sensitive words"}}),null===(w=null===(M=this._localCache)||void 0===M?void 0:M.getInstance())||void 0===w||w.updateLocalMessage(ne,{serverMsgId:te,status:C.r.FAIL})):"blocked by mod_antispam"===U.status.reason&&this._msgHash[ne]?(Ce=v.Z.create({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"blocked by mod_antispam",data:{id:ne,mid:te}}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject(Ce),this._msgHash[ne].fail instanceof Function&&this._msgHash[ne].fail({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:ne,mid:te,reason:"blocked by mod_antispam"}}),null===(D=null===(P=this._localCache)||void 0===P?void 0:P.getInstance())||void 0===D||D.updateLocalMessage(ne,{serverMsgId:te,status:C.r.FAIL})):"user is mute"===U.status.reason&&this._msgHash[ne]?(Ce=v.Z.create({type:a.E.USER_MUTED_BY_ADMIN,message:"user is mute",data:{id:ne,mid:te}}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject(Ce),this._msgHash[ne].fail instanceof Function&&this._msgHash[ne].fail(Ce),null===(H=null===(k=this._localCache)||void 0===k?void 0:k.getInstance())||void 0===H||H.updateLocalMessage(ne,{serverMsgId:te,status:C.r.FAIL})):"traffic limit"===U.status.reason&&this._msgHash[ne]?(Ce=v.Z.create({type:a.E.MESSAGE_CURRENT_LIMITING,message:"traffic limit",data:{id:ne,mid:te}}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject(Ce),this._msgHash[ne].fail instanceof Function&&this._msgHash[ne].fail(Ce),null===(F=null===(B=this._localCache)||void 0===B?void 0:B.getInstance())||void 0===F||F.updateLocalMessage(ne,{serverMsgId:te,status:C.r.FAIL})):"Sorry, data is too large"===U.status.reason&&this._msgHash[ne]&&(Ce=v.Z.create({type:a.E.MESSAGE_SIZE_LIMIT,message:"Sorry, data is too large",data:{id:ne,mid:te}}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject(Ce),this._msgHash[ne].fail instanceof Function&&this._msgHash[ne].fail(Ce),null===(W=null===(j=this._localCache)||void 0===j?void 0:j.getInstance())||void 0===W||W.updateLocalMessage(ne,{serverMsgId:te,status:C.r.FAIL}));else if(19===U.status.errorCode)this._msgHash[ne]&&(N.TJ.has(ne)&&(N.TJ.get(ne).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,codeDesc:U.status.reason||"",msgId:te}}),N.TJ.delete(ne)),Ce=v.Z.create({type:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,message:U.status.reason||"",data:{id:ne,mid:te}}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject(Ce),this._msgHash[ne].fail instanceof Function&&this._msgHash[ne].fail({type:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,data:{id:ne,mid:te,reason:U.status.reason}}),null===(V=null===(K=this._localCache)||void 0===K?void 0:K.getInstance())||void 0===V||V.updateLocalMessage(ne,{serverMsgId:te,status:C.r.FAIL}));else if(this._msgHash[ne]){N.TJ.has(ne)&&(N.TJ.get(ne).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.WEBIM_LOAD_MSG_ERROR,codeDesc:(null===(z=U.status)||void 0===z?void 0:z.reason)||"",msgId:te}}),N.TJ.delete(ne));try{Ce=v.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:(null===(Y=U.status)||void 0===Y?void 0:Y.reason)||"",data:{id:ne,mid:te,reason:U.status&&U.status.reason}}),this._msgHash[ne].reject instanceof Function&&this._msgHash[ne].reject(Ce),null===($=null===(X=this._localCache)||void 0===X?void 0:X.getInstance())||void 0===$||$.updateLocalMessage(ne,{serverMsgId:te,status:C.r.FAIL}),this._msgHash[ne].fail instanceof Function&&this._msgHash[ne].fail({type:a.E.WEBIM_LOAD_MSG_ERROR,data:{errorCode:U.status&&U.status.errorCode,reason:U.status&&U.status.reason}})}catch(e){Se=v.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing fail function error",data:e}),this.onError&&this.onError(Se),null===(Z=this.eventHandler)||void 0===Z||Z.dispatch("onError",Se)}delete this._msgHash[ne]}else N.TJ.has(ne)&&(N.TJ.get(ne).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,codeDesc:"on message error",msgId:te}}),N.TJ.delete(ne)),Se=v.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"on message error"}),this.onError&&this.onError(Se),null===(Q=this.eventHandler)||void 0===Q||Q.dispatch("onError",Se);x.label=9;case 9:return[2];case 10:if(0!==U.metas.length)try{G.call(this,U.metas,U.status)}catch(e){Se=v.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e}),this.onError&&this.onError(Se),null===(ee=this.eventHandler)||void 0===ee||ee.dispatch("onError",Se)}finally{U.isLast?(be=-1,this._queues.some((function(e,t){return e.name===U.name&&(be=t,!0)}))&&be>0&&this._queues.splice(be,1),this._queues.length>0&&(q.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer))):J.call(this,U.nextKey,U.queue)}else U.isLast&&(Ne=-1,this._queues.some((function(e,t){return e.name===U.queue.name&&(Ne=t,!0)}))&&this._queues.splice(Ne,1),this._queues.length>0&&(q.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer)));return[2]}}))}))}function ae(e){var t=[],n=this.root.lookup("easemob.pb.KeyValue"),r=[];for(var o in e){var i=n.decode(t);i.key=o,"object"===M(e[o])?(i.type=8,i.stringValue=JSON.stringify(e[o])):"string"==typeof e[o]?(i.type=7,i.stringValue=e[o]):"boolean"==typeof e[o]?(i.type=1,i.varintValue=!0===e[o]?1:0):Number.isInteger(e[o])?(i.type=2,i.varintValue=e[o]):(i.type=6,i.doubleValue=e[o]),r.push(i)}return r}function ue(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.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):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"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=ae.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 l=[];e.ext&&(l=ae.call(this,e.ext));var d=this.root.lookup("easemob.pb.MessageBody"),f=d.decode(o),p=e.from||this.context.jid.name;f.from={name:e.isBuildCombinedMsg?p:this.context.jid.name},f.to={name:e.to},"channel"===e.type?f.type=w.CHANNEL_ACK:"recall"===e.type?(f.type=w.RECALL,f.ackMessageId=e.ackId):"delivery"===e.type?(f.type=w.DELIVER_ACK,f.ackMessageId=e.ackId):"read"===e.type?(f.type=w.READ_ACK,f.ackMessageId=e.ackId,"groupChat"===i&&(f.msgConfig={allowGroupAck:!0},f.ackContent=e.ackContent)):"chatRoom"===i?f.type=w.CHATROOM:"groupChat"===i?(f.type=w.GROUPCHAT,e.msgConfig&&(f.msgConfig={allowGroupAck:!0})):"singleChat"===i&&(f.type=w.SINGLECHAT),e.editMessageId&&(f.type=w.EDIT,f.editMessageId=e.editMessageId),f.contents=[u],f.ext=l;var h=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);h&&(f.meta=h),f=d.encode(f).finish();var v=this.root.lookup("easemob.pb.Meta"),_=v.decode(o);_.id=e.id;var E="easemob.com";if("chatRoom"!==i&&"groupChat"!==i||(E="conference.easemob.com"),_.to={appKey:this.appKey,name:e.to,domain:E},"chatRoom"===i&&(_.ext=ae.call(this,function(e){return{chatroom_msg_tag:"high"===e.priority?0:"low"===e.priority?2:1}}(e))),_.ns=1,_.payload=f,_.routetype=e.deliverOnlineOnly?1:0,"singleChat"!==i&&Array.isArray(e.receiverList)&&(null===(r=e.receiverList)||void 0===r?void 0:r.length)>0&&(_.directedUsers=e.receiverList,_.routetype=2,c.kg.debug("receiverList:",e.receiverList,"thirdMessage",_)),e.isBuildCombinedMsg)return _.timestamp=s().fromValue(e.time),v.encode(_).finish();var y=this.root.lookup("easemob.pb.CommSyncUL"),g=y.decode(o);g.meta=_,g=y.encode(g).finish();var m=this.root.lookup("easemob.pb.MSync"),O=m.decode(o);return O.version=this.version,O.encryptType=this.encryptType,O.command=0,O.payload=g,m.encode(O).finish()}e.fail&&e.fail({type:a.E.WEBIM_CONNCTION_CLIENT_OFFLINE,message:"Not logged in"})}function ce(e){var t,n,r=this,o=L({},e);if(e.file)return o.accessToken=this.token,o.appKey=this.appKey,o.apiUrl=this.apiUrl,o.body&&o.body.url?ue.call(this,o):new Promise((function(t,n){var i=o.onFileUploadComplete;o.onFileUploadComplete=function(t){var n,s,a,u;if(t.entities[0]["file-metadata"]){var c=t.entities[0]["file-metadata"]["content-length"];o.file_length=c,o.filetype=t.entities[0]["file-metadata"]["content-type"],c>204800&&(o.thumbnail=!0)}o.body={type:o.type||"file",secret:t.entities[0]["share-secret"],filename:o.file.filename||o.filename,url:(r.isHttpDNS?r.apiUrl+t.uri.substr(t.uri.indexOf("/",9)):t.uri)+"/"+t.entities[0].uuid,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"];var l=(r.isHttpDNS?r.apiUrl+t.uri.substr(t.uri.indexOf("/",9)):t.uri)+"/"+t.entities[0].uuid;e.url=l,t.url=l,"img"===o.type&&(e.thumb="".concat(l,"?thumbnail=true"),t.thumb="".concat(l,"?thumbnail=true")),i instanceof Function&&i(t,o.id);var d=ue.call(r,o);N.TJ.size<=N.F3&&N.TJ.set(o.id,{rpt:r.dataReport.geOperateFun({operationName:A.fI.SEND_MSG})}),null===(u=null===(a=r._localCache)||void 0===a?void 0:a.getInstance())||void 0===u||u.storeMessage(e,C.r.INPROGRESS),he.call(r,d)},E.P6.uploadFile.call(r,o,A.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,f;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 p=P([],e.messageList,!0),h=0;if(p.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 v=le.call(r,p),_=function(t,n){var s,a,u,c,l,d,f=(r.isHttpDNS?r.apiUrl+t.uri.substr(t.uri.indexOf("/",9)):t.uri)+"/"+t.entities[0].uuid,p=null===(s=t.entities[0])||void 0===s?void 0:s["share-secret"],h=f+"?em-redirect=true";p&&(h="".concat(h,"&share-secret=").concat(p)),i instanceof Function&&i({url:h,secret:p}),e.url=h,e.secret=p,o.url=f,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,C.r.INPROGRESS);var v=ue.call(r,o);he.call(r,v)},y=E.P6.getEnvInfo();if("web"!==y.platform&&"node"!==y.platform&&"quick_app"!==y.platform&&(null===(f=null===(d=y.global)||void 0===d?void 0:d.canIUse)||void 0===f?void 0:f.call(d,"getFileSystemManager"))){var g=y.global.getFileSystemManager(),m=r.apiUrl+"/"+r.orgName+"/"+r.appName+"/chatfiles";g.writeFile({filePath:"".concat(y.global.env.USER_DATA_PATH,"/combine"),data:v.buffer,encoding:"binary",success:function(e){y.global.uploadFile({url:m,filePath:"".concat(y.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);_(t,{fileName:"combine",fileLength:v.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([v],"combine",{type:"application/octet-stream"}),T={url:URL.createObjectURL(O),filename:o.id,data:O};o.file=T,o.onFileUploadComplete=function(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})},E.P6.uploadFile.call(r,o,A.fI.UPLOAD_MSG_ATTACH)}}))}"img"===e.type&&(o.body||(o.body=L(L({},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,C.r.INPROGRESS);var u=ue.call(this,o);he.call(this,u)}function le(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=L(L({},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),f=0;for(n=2;n<t.length;n++)n%2==1&&(f^=t[n]);return d.set(t),c.kg.debug("checkResult:",f),d[t.length]=f,d}function de(e,t,n){var r=[],o=this.root.lookup("easemob.pb.MUCBody"),i=o.decode(r);i.mucId={appKey:this.appKey,name:e,domain:"conference.easemob.com"},i.operation="join"===n?2:3,i.from={name:this.context.userId},i.isChatroom=!0,i=o.encode(i).finish();var s=this.root.lookup("easemob.pb.Meta").decode(r);s.id=t,s.from={appKey:this.appKey,name:this.context.userId,domain:"easemob.com",client_resource:this.context.jid.clientResource},s.to={domain:"easemob.com"},s.ns=2,s.payload=i;var a=this.root.lookup("easemob.pb.CommSyncUL"),u=a.decode(r);u.meta=s,u=a.encode(u).finish();var c=this.root.lookup("easemob.pb.MSync"),l=c.decode(r);return l.version=this.version,l.encryptType=this.encryptType,l.command=0,l.payload=u,c.encode(l).finish()}function fe(e,t){var n=E.P6.getUniqueId(),r=de.call(this,e.roomId,n,t);return he.call(this,L(L({},e),{isHandleChatroom:!0,joinMsg:r,id:n,operation:t}),n)}function pe(e){var t=this;return new Promise((function(n,r){var o,i,s,u,c,l;if(t.logOut)return 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 d="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,h="recall"===e.type,v=null==e?void 0:e.editMessageId,_=!(f||h||p||v);if(e.id){if(!d&&!f||d&&t.useOwnUploadFun){var E="recall"===e.type?A.fI.SEND_RECALL_MSG:A.fI.SEND_MSG;v&&(E=A.fI.MODIFY_MESSAGE),N.TJ.size<=N.F3&&N.TJ.set(e.id,{rpt:t.dataReport.geOperateFun({operationName:E})})}_&&(null===(i=null===(o=t._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.storeMessage(e,C.r.CREATE)),t._msgHash[e.id]=L(L({},e),{resolve:n,reject:r})}if(d||"combine"===e.type)return ce.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,C.r.INPROGRESS);var a=ue.call(t,e);he.call(t,a,e.id)})).catch((function(e){r(e)}))}else{_&&(null===(l=null===(c=t._localCache)||void 0===c?void 0:c.getInstance())||void 0===l||l.storeMessage(e,C.r.INPROGRESS));var g=ue.call(t,e);he.call(t,g,e.id)}}))}function he(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"};return Promise.reject(i)}return new Promise((function(n,r){var i;o._msgHash[e.id]=L(L({},e),{resolve:n,reject:r}),i="miniCore"===o.name?e.joinMsg:H.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&&(this.autoReconnectNumTotal<=this.socketHost.length&&this.isHttpDNS||!this.isHttpDNS)&&(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:H.call(this,e,t),this.sock.send(r)}var ve=function(e,t){return e.send=pe,e.sendMsg=pe,c.kg.debug("init Msync by ".concat(e.name)),{generateProvision:k.bind(e),base64transform:H.bind(e),distributeMeta:B.bind(e),decodeMeta:G.bind(e),decodeUnreadDL:F.bind(e),_rebuild:j.bind(e),_lastsession:K.bind(e),receiveProvision:z.bind(e),isInQueue:te.bind(e),decodeNotice:ne.bind(e),decodeMSync:oe.bind(e),distributeMSync:ie.bind(e),encodeChatMsg:ue.bind(e),upLoadFile:ce.bind(e),send:pe.bind(e),stopHeartBeat:Q.bind(e),handleChatRoom:fe.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(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(9554),n(4747),n(8309),n(2772),n(2222);var r=n(3720),o=n.n(r),i=n(4363),s=n(4370),a=n(6424),u=n(9743),c=n(7360),l=n(2449),d=n(7288),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)},p=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])}}},v={0:"TEXT",1:"IMAGE",2:"VIDEO",3:"LOCATION",4:"VOICE",5:"FILE",6:"COMMAND",7:"CUSTOM",8:"COMBINE"};function _(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 E(e){var t,n,r,o,s,u,l,f,E,y,g,m,O,T,R,I,C,S,b,N,A,M,w,L,U,x,P;return p(this,void 0,void 0,(function(){var p,D,k,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,fe,pe,he,ve,_e,Ee,ye,ge,me,Oe,Te,Re,Ie,Ce,Se,be,Ne,Ae,Me;return h(this,(function(h){switch(h.label){case 0:switch(p=e.status,D=e.thirdMessage,k=e.msgBody,H=e.msgId,B=e.type,G=e.from,F=e.to,j=e.time,W=e.onlineState,q=e.chatType,K=e.ignoreCallback,V=e.priority,J=e.format,z=e.broadcast,Y=void 0!==z&&z,X={},$={},Z=p.errorCode>0,Q=p.errorCode,ee=p.reason,te={},ne=[],re=[],oe={},ie="",se=0,ae=null,ue=null,D.ext&&(te=_(D.ext)),D.meta&&"string"==typeof D.meta&&((le=JSON.parse(D.meta)).reaction&&(ne=le.reaction).forEach((function(e){e.isAddedBySelf=e.state,delete e.state})),le.translations&&(re=le.translations),le.edit_msg&&(de=le.edit_msg,fe=de.count,pe=de.operator,he=de.edit_time,ve=de.sender,_e=de.send_time,oe={operationTime:he,operatorId:pe,operationCount:fe},ie=ve,se=_e),le.thread&&"{}"!==JSON.stringify(le.thread)&&(ae={messageId:le.thread.msg_parent_id,parentId:le.thread.muc_parent_id,chatThreadName:le.thread.thread_name}),le.thread_overview&&"{}"!==JSON.stringify(le.thread_overview)&&(ue={id:le.thread_overview.id,parentId:le.thread_overview.muc_parent_id,name:le.thread_overview.name,lastMessage:le.thread_overview.last_message&&"{}"!==JSON.stringify(le.thread_overview.last_message)?(0,i.w)(le.thread_overview.last_message):null,createTimestamp:le.thread_overview.create_timestamp,updateTimestamp:le.thread_overview.update_timestamp,messageCount:le.thread_overview.message_count||0})),k.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(k,"subType")&&0===k.subType?(ce=(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&(ce="".concat(ce,"&share-secret=").concat(k.secretKey)),Ee={id:H,type:"combine",chatType:q,to:F,from:G,ext:te,time:Number(j),onlineState:W,title:k.title||"",summary:k.summary||"",url:ce||"",secret:k.secretKey||"",file_length:k.fileLength||0,filename:k.displayName||"",compatibleText:k.text,combineLevel:k.combineLevel||0},X.msgConfig&&(Ee.msgConfig=X.msgConfig),ne.length>0&&(Ee.reactions=ne),ae&&(Ee.chatThread=ae),ue&&(Ee.chatThreadOverview=ue),"chatRoom"===q&&(Ee.priority=V,Ee.broadcast=Y),$=Ee,K?[3,3]:[4,null===(n=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===n?void 0:n.storeMessage(Ee,d.r.SUCCESS)]):[3,4];case 2:h.sent(),null===(r=this.eventHandler)||void 0===r||r.dispatch("onCombineMessage",Ee),h.label=3;case 3:return[3,28];case 4:return!(X={id:H,type:B,contentsType:v[k.type],from:G,to:F,data:k.text,ext:te,sourceMsg:k.text,time:j,msgConfig:D.msgConfig,onlineState:W}).msgConfig&&delete D.msgConfig,X.error=Z,X.errorText=ee,X.errorCode=Q,!K&&this.onTextMessage&&this.onTextMessage(X),ye={id:H,type:"txt",chatType:q,msg:k.text,to:F,from:G,ext:te,time:Number(j),onlineState:W},X.msgConfig&&(ye.msgConfig=X.msgConfig),ne.length>0&&(ye.reactions=ne),ae&&(ye.chatThread=ae),ue&&(ye.chatThreadOverview=ue),re.length>0&&(ye.translations=re),oe.operationCount>0&&(ye.modifiedInfo=oe,D.type===a.g.EDIT&&(ye.from=ie,ye.time=se)),"chatRoom"===q&&(ye.priority=V,ye.broadcast=Y),$=ye,K?[3,6]:[4,null===(s=null===(o=this._localCache)||void 0===o?void 0:o.getInstance())||void 0===s?void 0:s.storeMessage(ye,d.r.SUCCESS)];case 5:h.sent(),null===(u=this.eventHandler)||void 0===u||u.dispatch("onTextMessage",ye),h.label=6;case 6:return[3,28];case 7:return ge=(null===(l=null==k?void 0:k.size)||void 0===l?void 0:l.width)||0,me=(null===(f=null==k?void 0:k.size)||void 0===f?void 0:f.height)||0,ce=this.useOwnUploadFun?k.remotePath:(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&!this.useOwnUploadFun&&(ce="".concat(ce,"&share-secret=").concat(k.secretKey)),!(X={id:H,type:B,contentsType:v[k.type],from:G,to:F,url:ce,secret:k.secretKey,filename:k.displayName,thumb:this.useOwnUploadFun?"":"".concat(ce,"&thumbnail=true"),thumb_secret:k.secretKey,file_length:k.fileLength||"",width:ge,height:me,filetype:k.filetype||"",accessToken:this.token,ext:te,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete X.delay,!X.msgConfig&&delete D.msgConfig,X.error=Z,X.errorText=ee,X.errorCode=Q,!K&&this.onPictureMessage&&this.onPictureMessage(X),Oe={id:H,type:"img",chatType:q,from:G,to:F,url:ce||"",width:ge,height:me,secret:k.secretKey||"",thumb:this.useOwnUploadFun?"":"".concat(ce,"&thumbnail=true"),thumb_secret:k.secretKey,file_length:k.fileLength||0,ext:te,time:Number(j),onlineState:W},X.msgConfig&&(Oe.msgConfig=X.msgConfig),ne.length>0&&(Oe.reactions=ne),ae&&(Oe.chatThread=ae),ue&&(Oe.chatThreadOverview=ue),"chatRoom"===q&&(Oe.priority=V,Oe.broadcast=Y),$=Oe,K?[3,9]:[4,null===(y=null===(E=this._localCache)||void 0===E?void 0:E.getInstance())||void 0===y?void 0:y.storeMessage(Oe,d.r.SUCCESS)];case 8:h.sent(),null===(g=this.eventHandler)||void 0===g||g.dispatch("onImageMessage",Oe),h.label=9;case 9:return[3,28];case 10:return ce=this.useOwnUploadFun?k.remotePath:(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&!this.useOwnUploadFun&&(ce="".concat(ce,"&share-secret=").concat(k.secretKey)),!(X={id:H,type:B,contentsType:v[k.type],from:G,to:F,url:ce,secret:k.secretKey,filename:k.displayName,length:k.duration||"",file_length:k.fileLength||"",filetype:k.filetype||"",accessToken:this.token||"",ext:te,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete X.delay,!X.msgConfig&&delete D.msgConfig,X.error=Z,X.errorText=ee,X.errorCode=Q,!K&&this.onVideoMessage&&this.onVideoMessage(X),Te={id:H,type:"video",chatType:q,from:G,to:F,url:ce,secret:k.secretKey,filename:k.displayName,length:k.duration||0,file:{},file_length:k.fileLength||0,filetype:k.filetype||"",accessToken:this.token||"",ext:te,time:Number(j),onlineState:W},X.msgConfig&&(Te.msgConfig=X.msgConfig),ne.length>0&&(Te.reactions=ne),ae&&(Te.chatThread=ae),ue&&(Te.chatThreadOverview=ue),"chatRoom"===q&&(Te.priority=V,Te.broadcast=Y),$=Te,K?[3,12]:[4,null===(O=null===(m=this._localCache)||void 0===m?void 0:m.getInstance())||void 0===O?void 0:O.storeMessage(Te,d.r.SUCCESS)];case 11:h.sent(),null===(T=this.eventHandler)||void 0===T||T.dispatch("onVideoMessage",Te),h.label=12;case 12:return[3,28];case 13:return!(X={id:H,type:B,contentsType:v[k.type],from:G,to:F,addr:k.address,buildingName:k.buildingName,lat:k.latitude,lng:k.longitude,ext:te,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete X.delay,!X.msgConfig&&delete D.msgConfig,X.error=Z,X.errorText=ee,X.errorCode=Q,!K&&this.onLocationMessage&&this.onLocationMessage(X),Re={id:H,type:"loc",chatType:q,from:G,to:F,buildingName:k.buildingName,addr:k.address,lat:k.latitude,lng:k.longitude,ext:te,time:Number(j),onlineState:W},X.msgConfig&&(Re.msgConfig=X.msgConfig),ne.length>0&&(Re.reactions=ne),ae&&(Re.chatThread=ae),ue&&(Re.chatThreadOverview=ue),"chatRoom"===q&&(Re.priority=V,Re.broadcast=Y),$=Re,K?[3,15]:[4,null===(I=null===(R=this._localCache)||void 0===R?void 0:R.getInstance())||void 0===I?void 0:I.storeMessage(Re,d.r.SUCCESS)];case 14:h.sent(),null===(C=this.eventHandler)||void 0===C||C.dispatch("onLocationMessage",Re),h.label=15;case 15:return[3,28];case 16:return ce=this.useOwnUploadFun?k.remotePath:(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&!this.useOwnUploadFun&&(ce="".concat(ce,"&share-secret=").concat(k.secretKey)),!(X={id:H,type:B,contentsType:v[k.type],from:G,to:F,url:ce,secret:k.secretKey,filename:k.displayName,file_length:k.fileLength||"",accessToken:this.token||"",ext:te,length:k.duration,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete X.delay,!X.msgConfig&&delete D.msgConfig,X.error=Z,X.errorText=ee,X.errorCode=Q,!K&&this.onAudioMessage&&this.onAudioMessage(X),Ie={id:H,type:"audio",chatType:q,from:G,to:F,url:ce,secret:k.secretKey,file:{},filename:k.displayName,length:k.duration||0,file_length:k.fileLength||0,filetype:k.filetype||"",accessToken:this.token||"",ext:te,time:Number(j),onlineState:W},X.msgConfig&&(Ie.msgConfig=X.msgConfig),ne.length>0&&(Ie.reactions=ne),ae&&(Ie.chatThread=ae),ue&&(Ie.chatThreadOverview=ue),"chatRoom"===q&&(Ie.priority=V,Ie.broadcast=Y),$=Ie,K?[3,18]:[4,null===(b=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===b?void 0:b.storeMessage(Ie,d.r.SUCCESS)];case 17:h.sent(),null===(N=this.eventHandler)||void 0===N||N.dispatch("onAudioMessage",Ie),h.label=18;case 18:return[3,28];case 19:return ce=this.useOwnUploadFun?k.remotePath:(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&!this.useOwnUploadFun&&(ce="".concat(ce,"&share-secret=").concat(k.secretKey)),!(X={id:H,type:B,contentsType:v[k.type],from:G,to:F,url:ce,secret:k.secretKey,filename:k.displayName,file_length:k.fileLength,accessToken:this.token||"",ext:te,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete X.delay,!X.msgConfig&&delete D.msgConfig,X.error=Z,X.errorText=ee,X.errorCode=Q,!K&&this.onFileMessage&&this.onFileMessage(X),Ce={id:H,type:"file",chatType:q,from:G,to:F,url:ce,secret:k.secretKey,file:{},filename:k.displayName,length:k.duration||0,file_length:k.fileLength||0,filetype:k.filetype||"",accessToken:this.token||"",ext:te,time:Number(j),onlineState:W},X.msgConfig&&(Ce.msgConfig=X.msgConfig),ne.length>0&&(Ce.reactions=ne),ae&&(Ce.chatThread=ae),ue&&(Ce.chatThreadOverview=ue),"chatRoom"===q&&(Ce.priority=V,Ce.broadcast=Y),$=Ce,K?[3,21]:[4,null===(M=null===(A=this._localCache)||void 0===A?void 0:A.getInstance())||void 0===M?void 0:M.storeMessage(Ce,d.r.SUCCESS)];case 20:h.sent(),null===(w=this.eventHandler)||void 0===w||w.dispatch("onFileMessage",Ce),h.label=21;case 21:return[3,28];case 22:return!(X={id:H,type:B,contentsType:v[k.type],from:G,to:F,action:k.action,ext:te,time:j,msgConfig:D.msgConfig,onlineState:W}).msgConfig&&delete D.msgConfig,X.error=Z,X.errorText=ee,X.errorCode=Q,!K&&this.onCmdMessage&&this.onCmdMessage(X),Se={id:H,type:"cmd",chatType:q,from:G,to:F,action:k.action,ext:te,time:Number(j),onlineState:W},X.msgConfig&&(Se.msgConfig=X.msgConfig),ne.length>0&&(Se.reactions=ne),ae&&(Se.chatThread=ae),ue&&(Se.chatThreadOverview=ue),"chatRoom"===q&&(Se.priority=V,Se.broadcast=Y),$=Se,K||null===(L=this.eventHandler)||void 0===L||L.dispatch("onCmdMessage",Se),[3,28];case 23:return be={},Ne={},D.contents[0].customExts&&(be=_(D.contents[0].customExts)),D.contents[0].params&&(Ne=_(D.contents[0].params)),X={id:H,type:B,contentsType:v[k.type],from:G,to:F,customEvent:k.customEvent,params:Ne,customExts:be,ext:te,time:j,onlineState:W},!K&&this.onCustomMessage&&this.onCustomMessage(X),Ae={id:H,type:"custom",chatType:q,from:G,to:F,customEvent:k.customEvent,params:Ne,customExts:be,ext:te,time:Number(j),onlineState:W},X.msgConfig&&(Ae.msgConfig=X.msgConfig),ne.length>0&&(Ae.reactions=ne),ae&&(Ae.chatThread=ae),ue&&(Ae.chatThreadOverview=ue),"chatRoom"===q&&(Ae.priority=V,Ae.broadcast=Y),$=Ae,K?[3,25]:[4,null===(x=null===(U=this._localCache)||void 0===U?void 0:U.getInstance())||void 0===x?void 0:x.storeMessage(Ae,d.r.SUCCESS)];case 24:h.sent(),null===(P=this.eventHandler)||void 0===P||P.dispatch("onCustomMessage",Ae),h.label=25;case 25:return[3,28];case 26:return ce=(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&(ce="".concat(ce,"&share-secret=").concat(k.secretKey)),Me={id:H,type:"combine",chatType:q,to:F,from:G,ext:te,time:Number(j),onlineState:W,title:k.title||"",summary:k.summary||"",url:ce||"",secret:k.secretKey||"",file_length:k.fileLength||0,filename:k.displayName||"",compatibleText:k.text,combineLevel:k.combineLevel||0},X.msgConfig&&(Me.msgConfig=X.msgConfig),ne.length>0&&(Me.reactions=ne),ae&&(Me.chatThread=ae),ue&&(Me.chatThreadOverview=ue),"chatRoom"===q&&(Me.priority=V,Me.broadcast=Y),$=Me,!K&&this.eventHandler&&this.eventHandler.dispatch("onCombineMessage",Me),[3,28];case 27:return c.kg.error("Unknow message type, message:",k),[3,28];case 28:return J?[2,$]:[2,X]}}))}))}function y(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){var i,l,d,v,g,m,O,T,R,I,C,S,b,N,A,M,w,L,U,x;return p(this,void 0,void 0,(function(){var p,P,D,k,H,B,G,F,j,W,q,K,V,J,z,Y,X,$,Z,Q,ee,te,ne,re,oe,ie,se,ae,ue;return h(this,(function(h){switch(h.label){case 0:if(p=new(o())(e.timestamp.low,e.timestamp.high,e.timestamp.unsigned).toString(),P=this.root.lookup("easemob.pb.MessageBody"),D=P.decode(e.payload),k=1,e.meta&&e.meta.length)switch(s.P6.parseNotify(e.meta).is_online){case 0:k=0;break;case 1:k=1;break;default:k=2}else k=3;switch(H=new(o())(e.id.low,e.id.high,e.id.unsigned).toString(),B=D.ackMessageId?new(o())(D.ackMessageId.low,D.ackMessageId.high,D.ackMessageId.unsigned).toString():"",G="",F=D.from&&D.from.name,j=D.to&&D.to.name,c.kg.debug("thirdMessage:",D),D.type){case a.g.SINGLECHAT:return[3,1];case a.g.GROUPCHAT:return[3,2];case a.g.CHATROOM:return[3,3];case a.g.READ_ACK:return[3,4];case a.g.DELIVER_ACK:return[3,5];case a.g.RECALL:return[3,6];case a.g.CHANNEL_ACK:return[3,15];case a.g.EDIT:return[3,16]}return[3,19];case 1:return G="chat","agoraToken"===this.grantType&&(G="singleChat"),this.delivery&&!n&&F!==this.context.userId&&y.call(this,F,j,H),[3,20];case 2:return G="groupchat","agoraToken"===this.grantType&&(G="groupChat"),[3,20];case 3:return G="chatroom","agoraToken"===this.grantType&&(G="chatRoom"),k=1,[3,20];case 4:return G="read_ack",W=void 0,D.ext[0]&&JSON.parse(D.ext[0].stringValue)?(W={id:H,type:"read",from:F,to:j,mid:B,groupReadCount:D.ext[0]&&JSON.parse(D.ext[0].stringValue),ackContent:D.ackContent,onlineState:k},this.onReadMessage&&this.onReadMessage(W),null===(i=this.eventHandler)||void 0===i||i.dispatch("onReadMessage",W),[2]):(W={id:H,type:"read",from:F,to:j,mid:B,onlineState:k},this.onReadMessage&&this.onReadMessage(W),null===(l=this.eventHandler)||void 0===l||l.dispatch("onReadMessage",W),[2]);case 5:return G="deliver_ack",this.onDeliveredMessage&&this.onDeliveredMessage({id:H,type:"delivery",from:F,to:j,mid:B,onlineState:k}),q={id:H,type:"delivery",from:F,to:j,mid:B,onlineState:k},null===(d=this.eventHandler)||void 0===d||d.dispatch("onDeliveredMessage",q),[2];case 6:return G="recall",K={id:H,from:F||"admin",to:j,mid:B,onlineState:k},V=j===this.user?F:j,[4,null===(g=null===(v=this._localCache)||void 0===v?void 0:v.getInstance())||void 0===g?void 0:g.getMessageByServerMsgId(K.mid)];case 7:return(J=h.sent())?[4,null===(O=null===(m=this._localCache)||void 0===m?void 0:m.getInstance())||void 0===O?void 0:O.removeMsgByServerMsgId(K.mid)]:[3,9];case 8:h.sent(),h.label=9;case 9:return"singleChat"!==(null==J?void 0:J.chatType)&&"groupChat"!==(null==J?void 0:J.chatType)?[3,14]:(z=(null==J?void 0:J.from)===this.user||""===(null==J?void 0:J.from),[4,null===(R=null===(T=this._localCache)||void 0===T?void 0:T.getInstance())||void 0===R?void 0:R.getConversationLastMessage(V,J.chatType)]);case 10:return Y=h.sent(),[4,null===(C=null===(I=this._localCache)||void 0===I?void 0:I.getInstance())||void 0===C?void 0:C.getConversationBySessionId((0,u.MQ)({conversationId:V,conversationType:J.chatType}))];case 11:return(X=h.sent())?[4,null===(b=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===b?void 0:b.updateLocalConversation((0,u.MQ)({conversationId:V,conversationType:J.chatType}),{lastMessageId:null==Y?void 0:Y.serverMsgId,unReadCount:(0,u.E7)({conversation:X,isRecallSelfMsg:z,recalledMsgTime:J.time})})]:[3,13];case 12:h.sent(),h.label=13;case 13:h.label=14;case 14:return this.onRecallMessage&&this.onRecallMessage(K),null===(N=this.eventHandler)||void 0===N||N.dispatch("onRecallMessage",K),[2];case 15:return this.onChannelMessage&&this.onChannelMessage({id:H,type:"channel",chatType:"singleChat",from:F,to:j,time:Number(p),onlineState:k}),$={id:H,type:"channel",chatType:"singleChat",from:F,to:j,time:Number(p),onlineState:k},null===(A=this.eventHandler)||void 0===A||A.dispatch("onChannelMessage",$),[2];case 16:return Z={errorCode:0,reason:""},[4,E.call(this,{status:Z,thirdMessage:D,msgBody:D.contents[0],msgId:H,type:G,from:F,to:j,time:p,onlineState:k,ignoreCallback:!0,format:!0})];case 17:return Q=h.sent(),ee=!!e.to&&-1!==e.to.domain.indexOf("conference"),Q.chatType=ee?"groupChat":"singleChat",te=D.editMessageId&&new(o())(D.editMessageId.low,D.editMessageId.high,D.editMessageId.unsigned).toString(),ne={id:te,type:Q.type,chatType:Q.chatType,msg:Q.msg,to:Q.to,from:Q.from,time:Q.time,modifiedInfo:Q.modifiedInfo},Q.translations&&(ne.translations=Q.translations),[4,null===(w=null===(M=this._localCache)||void 0===M?void 0:M.getInstance())||void 0===w?void 0:w.getMessageByServerMsgId(te)];case 18:return"txt"===(null==(re=h.sent())?void 0:re.type)&&(null===(U=null===(L=this._localCache)||void 0===L?void 0:L.getInstance())||void 0===U||U.putMessageToDB(f(f({},re),{msg:ne.msg,modifiedInfo:ne.modifiedInfo,translations:ne.translations}))),"txt"===Q.type&&(null===(x=this.eventHandler)||void 0===x||x.dispatch("onModifiedMessage",ne)),[2];case 19:return c.kg.error("unexpected message type: ".concat(D.type)),[2];case 20:oe="normal",se=!1,"chat"===G.toLowerCase()||"singleChat"===G?ie="singleChat":"groupchat"===G.toLowerCase()||"groupChat"===G?ie="groupChat":(ie="chatRoom",k=1,e.ext&&(ae=_(e.ext),se=!!(null==ae?void 0:ae.is_broadcast),oe=0===ae.chatroom_msg_tag?"high":2===ae.chatroom_msg_tag?"low":"normal")),ue=0,h.label=21;case 21:return ue<D.contents.length?[4,E.call(this,{status:t,thirdMessage:D,msgBody:D.contents[ue],msgId:H,type:G,from:F,to:j,time:p,onlineState:k,chatType:ie,ignoreCallback:n,priority:oe,format:r,broadcast:se})]:[3,24];case 22:return[2,h.sent()];case 23:return ue++,[3,21];case 24: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 p}}),n(7042),n(2222),n(8309),n(9600),n(6992),n(1539),n(8783),n(3948),n(285),n(1637),n(4812),n(3710),n(9554),n(2772),n(4916),n(2526),n(1817),n(2165);var o="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent);function i(e){return i="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},i(e)}var s,a=function(){},u={};!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"}(s||(s={}));var c=function(){function e(e,t,n){this.name=e||"defaultLogger",this.currentLevel=0,this.useCookiePersist=!1,this.storageLogLevelKey="loglevel",this.levels=s,this.logMethods=["trace","debug","info","warn","error"],this.methodFactory=n||this.defaultMethodFactory;var r=this._getPersistedLevel();null==r&&(r=null===t?"WARN":t),this.logs=[],this.config={useCache:!1,maxCache:3145728,color:"",background:""},this.logBytes=0,this.setLevel(r,!1,"")}return 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=s[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<s.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._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();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})};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"===i(e)?r+=JSON.stringify(e)+" ":r+=e+" "})),this._cacheLogCall(n+r)},e.prototype._cacheLogCall=function(e){var t=l(e),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+=l(s))}this.logs.push(e)}},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=0;n<this.logMethods.length;n++){var r=this.logMethods[n];this[r]=n<e?a:this.methodFactory(r,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):a)},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}();function l(e){for(var t=e.length,n=0;n<e.length;n++)e.charCodeAt(n)>255&&t++;return t}var d=new c;d.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");return this};var f="undefined"!=typeof window?window.log:void 0;d.noConflict=function(){return"undefined"!=typeof window&&window.log===d&&(window.log=f),d},d.getLoggers=function(){return u};var p=d},2449:function(e,t,n){"use strict";n.r(t),n.d(t,{Message:function(){return _}});var r=n(4370),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}(),f=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}(),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:"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}(),v=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}(),_=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 f({type:"audio",id:e.id});case"video":return new p({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)?f.create(e):function(e){return"video"===e.type&&!("version"in e)}(e)?p.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)?v.create(e):{}:a.create(e);var t},e.prototype.set=function(e){},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.LOCAL_DB_OPERATION_FAILED=55]="LOCAL_DB_OPERATION_FAILED",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.WEBIM_MESSAGE_REC_AUDIO=304]="WEBIM_MESSAGE_REC_AUDIO",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.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={}))},4370:function(e,t,n){"use strict";n.d(t,{iw:function(){return E},hj:function(){return d},LR:function(){return T},Ki:function(){return h},P4:function(){return y},cT:function(){return O},P6:function(){return I}}),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(2023);var r=n(5531),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)},i=function(e,t,n,i){var s,a,u,c,l,d,f,p,h,v,_,E,y,g,m,O,T,R,I,C,S,b,N,A=e.response;A&&"string"==typeof A&&(A=JSON.parse(A));var M=e.status,w={elapse:i,httpCode:M,errDesc:null==A?void 0:A.error_description};if(400===M){if(40002===A.error_code)return void t({type:r.E.THREAD_ALREADY_EXIST,message:null==A?void 0:A.error_description,extraInfo:w});if(40009===A.error_code)return void t({type:r.E.OPERATION_UNSUPPORTED,message:null==A?void 0:A.error_description,extraInfo:w});if(60005===A.error_code)return void t({type:r.E.GROUP_MEMBER_ATTRIBUTES_SET_FAILED,message:(null==A?void 0:A.desc)||(null==A?void 0:A.error_description),extraInfo:w});if(60010===A.error_code)return void((null==A?void 0:A.error_description.includes("exceeds chatgroup user metadata single value limit"))?t({type:r.E.MAX_LIMIT,message:(null==A?void 0:A.desc)||A.error_description,extraInfo:w}):t({type:r.E.NO_PERMISSION,message:(null==A?void 0:A.desc)||A.error_description,extraInfo:w}));if(60011===A.error_code)return void t({type:r.E.CHATROOM_NOT_JOINED,message:null==A?void 0:A.desc,extraInfo:w});if(60006===A.error_code||60007===A.error_code||60009===A.error_code||60012===A.error_code)return void t({type:r.E.MAX_LIMIT,message:(null==A?void 0:A.desc)||(null==A?void 0:A.error_description),extraInfo:w});if(null===(s=A.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:A.error_description,extraInfo:w}):t({type:r.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}),void n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==A?void 0:A.error_description,data:e.responseText,extraInfo:w});if("the app not open presence"===(null==A?void 0:A.result))return void t({type:r.E.SERVICE_NOT_ENABLED,message:null==A?void 0:A.result,extraInfo:w});if(null==A?void 0:A.error_description.includes("remark length must less"))return void t({type:r.E.MAX_LIMIT,message:null==A?void 0:A.error_description,extraInfo:w});switch(null==A?void 0:A.error_description){case"the user is already operation this message":t({type:r.E.REACTION_ALREADY_ADDED,message:null==A?void 0:A.error_description,extraInfo:w});break;case"The quantity has exceeded the limit!":t({type:r.E.MAX_LIMIT,message:null==A?void 0:A.error_description,extraInfo:w});break;case"The user not in this group!":t({type:r.E.GROUP_NOT_JOINED,message:null==A?void 0:A.error_description,extraInfo:w});break;case"the user operation is illegal!":t({type:r.E.REACTION_OPERATION_IS_ILLEGAL,message:null==A?void 0:A.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==A?void 0:A.error_description,extraInfo:w});break;case"this message is creating reaction, please try again.":t({type:r.E.REACTION_CREATING,message:null==A?void 0:A.error_description,extraInfo:w});break;case"groupId can not be null!":t({type:r.E.GROUP_NOT_EXIST,message:null==A?void 0:A.error_description,extraInfo:w});break;case"The input text is too long.":t({type:r.E.TRANSLATION_TEXT_TOO_LONG,message:null==A?void 0:A.error_description,extraInfo:w});break;case"The target language is not valid.":t({type:r.E.TRANSLATION_NOT_VALID,message:null==A?void 0:A.error_description,extraInfo:w});break;case"report failed, get message by id failed":t({type:r.E.MESSAGE_NOT_FOUND,message:null==A?void 0:A.error_description,extraInfo:w});break;case"ext is too big ":t({type:r.E.PRESENCE_PARAM_EXCEED,message:null==A?void 0:A.error_description,extraInfo:w});break;case"Request body not readable.Please check content type is correct!":t({type:r.E.REQUEST_PARAMETER_ERROR,message:null==A?void 0:A.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==A?void 0:A.error_description,extraInfo:w});break;default:t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==A?void 0:A.error_description,data:e.responseText,extraInfo:w}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==A?void 0:A.error_description,data:e.responseText,extraInfo:w})}}else if(401===M)40001===A.error_code||60001===A.error_code||"Unable to authenticate (OAuth)"===A.error_description?t({type:r.E.NO_PERMISSION,message:null==A?void 0:A.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===M)4e4===A.error_code||60004===A.error_code||15002===A.error_code?t({type:r.E.SERVICE_NOT_ENABLED,message:null==A?void 0:A.error_description,extraInfo:w}):40003===A.error_code||40004===A.error_code?t({type:r.E.THREAD_ALREADY_EXIST,message:null==A?void 0:A.error_description,extraInfo:w}):40005===A.error_code||40007===A.error_code||91002===A.error_code?t({type:r.E.MAX_LIMIT,message:null==A?void 0:A.error_description,extraInfo:w}):60002===A.error_code&&t({type:r.E.PERMISSION_DENIED,message:null==A?void 0:A.error_description,extraInfo:w}),"group member list is full!"===A.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:A.error_description,extraInfo:w}):t({type:r.E.CHATROOM_MEMBERS_FULL,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(c=A.error_description)||void 0===c?void 0:c.includes(A.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:A.error_description,extraInfo:w}):(null===(d=A.error_description)||void 0===d?void 0:d.includes("are not members of this group"))?(null===(f=e.responseURL)||void 0===f?void 0:f.includes("chatgroups"))?t({type:r.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):t({type:r.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(p=A.error_description)||void 0===p?void 0:p.includes("service not open!"))||(null===(h=A.error_description)||void 0===h?void 0:h.includes("message report not open"))||(null===(v=A.error_description)||void 0===v?void 0:v.includes("messageroaming function not open"))?t({type:r.E.SERVICE_NOT_ENABLED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(_=A.error_description)||void 0===_?void 0:_.includes("members size is greater than max user size !"))?t({type:r.E.GROUP_MEMBERS_LIMIT,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(E=A.error_description)||void 0===E?void 0:E.includes("can not operate this group, reason: group is disabled"))?t({type:r.E.GROUP_IS_DISABLED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(y=A.error_description)||void 0===y?void 0:y.includes("Invitee's contact max count"))||(null===(g=A.error_description)||void 0===g?void 0:g.includes("Inviter's contact max count"))?t({type:r.E.MAX_LIMIT,data:e.response||e.responseText,message:A.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===M)40011===A.error_code?t({type:r.E.THREAD_NOT_EXIST,message:null==A?void 0:A.error_description,extraInfo:w}):40012===A.error_code?t({type:r.E.NO_PERMISSION,message:null==A?void 0:A.error_description,extraInfo:w}):60003===A.error_code||20004===A.error_code?t({type:r.E.GROUP_NOT_JOINED,message:null==A?void 0:A.error_description,extraInfo:w}):91001===A.error_code&&t({type:r.E.CONVERSATION_NOT_EXIST,message:null==A?void 0:A.error_description,extraInfo:w}),(null===(m=A.error_description)||void 0===m?void 0:m.includes("do not find this group"))||(null===(O=A.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=A.error_description)||void 0===R?void 0:R.includes("username"))&&(null===(I=A.error_description)||void 0===I?void 0:I.includes("doesn't exist!'"))||(null===(C=A.error_description)||void 0===C?void 0:C.includes("user not found"))||(null===(S=A.error_description)||void 0===S?void 0:S.includes("Service resource not found"))&&"UserNotFoundException"===(null==A?void 0:A.exception)?t({type:r.E.USER_NOT_FOUND,data:e.response||e.responseText,message:A.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===M)90004===A.error_code&&t({type:r.E.OPERATION_NOT_ALLOWED,message:null==A?void 0:A.error_description,extraInfo:w});else if(429===M||503===M){if(null===(b=A.error_description)||void 0===b?void 0:b.includes("The request has reached the maximum limit"))return void t({type:r.E.MAX_LIMIT,message:e.responseText,extraInfo:w});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===M){if(40006===A.error_code||40008===A.error_code||40010===A.error_code)return void t({type:r.E.SERVER_UNKNOWN_ERROR,message:null==A?void 0:A.error_description,extraInfo:w});if(90005===A.error_code||99999===A.error_code)return void t({type:r.E.REQUEST_UNKNOWN,message:null==A?void 0:A.error_description,extraInfo:w});if(null===(N=A.error_description)||void 0===N?void 0:N.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=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)},l=function(){};function d(e,t){var n,o=this;return g().platform===E.WEB?new Promise((function(t,o){var s=e.dataType||"text",a=e.success||l,c=e.error||l,d=new XMLHttpRequest;d.ontimeout=function(){o({type:r.E.REQUEST_TIMEOUT,message:"Request Timeout",errorType:"timeout_error",xhr:d})},d.onerror=function(){o({type:r.E.REQUEST_UNKNOWN,message:"Request Unknow Error",errorType:"onerror",xhr:d})},d.onabort=function(){o({type:r.E.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:d})},d.onreadystatechange=function(){if(4===d.readyState){var e=(new Date).getTime()-n,l=d.status||0,f={elapse:e,httpCode:l};if(200===l){I.ajaxUnconventionalErrorTimes=0;try{switch(s){case"text":return a(d.responseText),void t(d.responseText);case"json":var p=JSON.parse(d.responseText);return p.extraInfo=f,a(p),void t(p);case"xml":return d.responseXML&&d.responseXML.documentElement?(a(d.responseXML.documentElement),void t(d.responseXML.documentElement)):(c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}),void o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}));default:c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"Invalid dataType"}),o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"Invalid dataType"})}return t(d.response||d.responseText),void a(d.response||d.responseText,d)}catch(e){o(e)}return}[400,401,403,404,429,500,503].includes(l)||(u.kg.debug("rest api request fail status:",l),I.ajaxUnconventionalErrorTimes++),i(d,o,c,e)}0===d.readyState&&(c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"Request not initialized"}),o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"Request not initialized"}))},e.responseType&&d.responseType&&(d.responseType=e.responseType),e.mimeType&&d.overrideMimeType(e.mimeType);var f=e.type||"POST",p=e.data||null,h="";if("get"===f.toLowerCase()&&p){for(var v in p)p.hasOwnProperty(v)&&(h+=v+"="+p[v]+"&");h=h?h.slice(0,-1):h,e.url+=(e.url.indexOf("?")>0?"&":"?")+(h?h+"&":h)+"_v="+(new Date).getTime(),p=null,h=""}n=(new Date).getTime(),d.open(f,e.url);var _=e.headers||{};for(var E in _["Content-Type"]||(_["Content-Type"]="application/json"),_)_.hasOwnProperty(E)&&d.setRequestHeader(E,_[E]);d.send(p)})).then((function(n){return o.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&o.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:c({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},R(n.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete n.extraInfo,"Object"===f(n)?c(c({},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:c({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},R(n.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete n.extraInfo,n})):p.call(this,e,t)}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}function p(e,t){var n=this;return new Promise((function(t,n){var r=e.success||l,o=e.error||l,i=e.type||"POST",s=e.data||null,u="",c=(new Date).getTime(),d=I.getEnvInfo();if("get"===i.toLowerCase()&&s){for(var f in s)s.hasOwnProperty(f)&&(u+=f+"="+s[f]+"&");u=u?u.slice(0,-1):u,e.url+=(e.url.indexOf("?")>0?"&":"?")+(u?u+"&":u)+"_v="+(new Date).getTime(),s=null,u=""}var p={url:e.url,data:e.data,method:i,headers:{},success:function(e){var i,s,a,u,l,d={elapse:(new Date).getTime()-c,httpCode:Number((null===(i=e.statusCode)||void 0===i?void 0:i.toString())||(null===(s=e.status)||void 0===s?void 0:s.toString())),errDesc:(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.error_description)||""};if("200"===(null===(u=e.statusCode)||void 0===u?void 0:u.toString())||"200"===(null===(l=e.status)||void 0===l?void 0:l.toString())){e.data.extraInfo=d;var f=e.data;r(f),t(f)}else e.extraInfo=d,o(f=e),n(f)},complete:function(){},fail:function(e){var t={elapse:(new Date).getTime()-c,httpCode:a.Tp,errDesc:"request:fail"};e.extraInfo=t,e.data={error:"request:fail",error_description:"request:fail"},o(e),n(e)}};if("zfb"===d.platform||"dd"===d.platform?p.headers=e.headers:p.header=e.headers,"dd"===d.platform)return dd.httpRequest(p);d.global.request(p)})).then((function(o){return n.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&n.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:c({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},R(o.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete o.extraInfo,"Object"===f(o)?c(c({},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:c({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},R(r.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete r.extraInfo,r}))}function h(){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()}var v,_,E,y=(v=function(e,t){var n=g();if(n.platform!==E.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))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!v)return _;_=v.apply(void 0,e),v=null});function g(){return"undefined"!=typeof swan&&m(swan)?{platform:E.BAIDU,global:swan}:"undefined"!=typeof tt&&m(tt)?{platform:E.TT,global:tt}:"undefined"!=typeof dd&&m(dd)?{platform:E.DD,global:dd}:"undefined"!=typeof my&&m(my)?{platform:E.ZFB,global:my}:"undefined"!=typeof wx&&m(wx)?{platform:E.WX,global:wx}:"undefined"!=typeof uni&&m(uni)?{platform:E.UNI,global:uni}:"undefined"!=typeof window&&window.WebSocket?{platform:E.WEB,global:window}:{platform:E.NODE,global:n.g||{}}}function m(e){for(var t=["canIUse","getSystemInfo"],n=0,r=t.length;n<r;n++)if(!e[t[n]])return!1;return!0}function O(e,t){var n,o,i,a,u=this,c=(new Date).getTime(),d=e.accessToken;if(d){var f=e.appKey,p=[],h="",v="";if(f&&(h=(p=f.split("#"))[0],v=p[1]),h||v){var _=e.apiUrl,E=e.uploadUrl||_+"/"+h+"/"+v+"/chatfiles";if((null===(o=null===(n=null==e?void 0:e.file)||void 0===n?void 0:n.data)||void 0===o?void 0:o.size)<=0)e.onFileUploadError&&e.onFileUploadError({type:r.E.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"});else{var y=new XMLHttpRequest;y.upload&&(null===(a=(i=y.upload).addEventListener)||void 0===a||a.call(i,"progress",e.onFileUploadProgress||l,!1)),y.addEventListener("abort",e.onFileUploadCanceled||l,!1),y.addEventListener("error",(function(e){m({type:r.E.WEBIM_UPLOADFILE_ERROR,data:y})}),!1),y.addEventListener("load",(function(n){try{var o=JSON.parse(y.responseText);if(400===y.status)return m({type:r.E.WEBIM_UPLOADFILE_ERROR,data:o}),!1;try{!function(n){var r=(new Date).getTime()-c;u.dataReport&&t&&[s.fI.UPLOAD_MSG_ATTACH,s.fI.UPLOAD_CHATROOM_FILE,s.fI.UPLOAD_GROUP_FILE].includes(t)&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:(null==n?void 0:n.error)?0:1,requestMethod:"POST",requestName:t,requestElapse:r,requestUrl:E,code:y.status,codeDesc:(null==n?void 0:n.error_description)||""}}),e.onFileUploadComplete&&e.onFileUploadComplete(n)}(o)}catch(n){m({type:r.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:n})}}catch(n){m({type:r.E.WEBIM_UPLOADFILE_ERROR,data:y.responseText})}}),!1),y.open("POST",E),y.setRequestHeader("restrict-access","true"),y.setRequestHeader("Accept","*/*"),y.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+""),y.send(g)}}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 m(n){var r=(new Date).getTime()-c;u.dataReport&&t&&[s.fI.UPLOAD_MSG_ATTACH,s.fI.UPLOAD_CHATROOM_FILE,s.fI.UPLOAD_GROUP_FILE].includes(t)&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:t,requestElapse:r,requestUrl:E,code:(null==y?void 0:y.status)||0,codeDesc:"upload file error"}}),e.onFileUploadError&&e.onFileUploadError(n)}}function T(e,t){e.onFileDownloadComplete=e.onFileDownloadComplete||l,e.onFileDownloadError=e.onFileDownloadError||l;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 d={"X-Requested-With":"XMLHttpRequest",Accept:"application/octet-stream","share-secret":e.secret,Authorization:"Bearer "+this.context.accessToken},f=e.headers||{};for(var p in f)d[p]=f[p];for(var p in d)d[p]&&o.setRequestHeader(p,d[p]);o.send(null)}function R(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.ZFB="zfb",e.DD="dd",e.TT="tt",e.BAIDU="baidu",e.QUICK_APP="quick_app",e.UNI="uni",e.NODE="node"}(E||(E={}));var I={autoIncrement:0,ajaxUnconventionalErrorTimes:0,ajax:d,getUniqueId:h,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:O,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:y,getEnvInfo:g,wxRequest:p,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:T,parseNotify:function(e){for(var t="",n=0;n<e.length;n++)t+="%"+e[n].toString(16);return JSON.parse(decodeURIComponent(t))},getExtraData:R,Uint8ArrayToString:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}}},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),f=n(648),p=n(6330),h=n(8880),v=n(8052),_=n(7045),E=n(7976),y=n(9518),g=n(7674),m=n(5112),O=n(9711),T=n(9909),R=T.enforce,I=T.get,C=u.Int8Array,S=C&&C.prototype,b=u.Uint8ClampedArray,N=b&&b.prototype,A=C&&y(C),M=S&&y(S),w=Object.prototype,L=u.TypeError,U=m("toStringTag"),x=O("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",D=s&&!!g&&"Opera"!==f(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=y(e);if(l(t)){var n=I(t);return n&&d(n,P)?n[P]:G(t)}},F=function(e){if(!l(e))return!1;var t=f(e);return d(H,t)||d(B,t)};for(r in H)(i=(o=u[r])&&o.prototype)?R(i)[P]=o:D=!1;for(r in B)(i=(o=u[r])&&o.prototype)&&(R(i)[P]=o);if((!D||!c(A)||A===Function.prototype)&&(A=function(){throw L("Incorrect invocation")},D))for(r in H)u[r]&&g(u[r],A);if((!D||!M||M===w)&&(M=A.prototype,D))for(r in H)u[r]&&g(u[r].prototype,M);if(D&&y(N)!==M&&g(N,M),a&&!d(M,U))for(r in k=!0,_(M,U,{configurable:!0,get:function(){return l(this)?this[x]:void 0}}),H)u[r]&&h(u[r],x,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:k&&x,aTypedArray:function(e){if(F(e))return e;throw L("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!g||E(A,e)))return e;throw L(p(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||v(M,e,n?t:D&&S[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(a){if(g){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 v(A,e,n?t:D&&A[e]||t)}catch(e){}}for(r in H)!(o=u[r])||o[e]&&!n||v(o,e,t)}},getTypedArrayConstructor:G,isView:function(e){if(!l(e))return!1;var t=f(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),f=n(5787),p=n(9303),h=n(7466),v=n(7067),_=n(1179),E=n(9518),y=n(7674),g=n(8006).f,m=n(1285),O=n(1589),T=n(8003),R=n(9909),I=a.PROPER,C=a.CONFIGURABLE,S="ArrayBuffer",b="DataView",N="prototype",A="Wrong index",M=R.getterFor(S),w=R.getterFor(b),L=R.set,U=r[S],x=U,P=x&&x[N],D=r[b],k=D&&D[N],H=Object.prototype,B=r.Array,G=r.RangeError,F=o(m),j=o([].reverse),W=_.pack,q=_.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)},$=function(e,t,n){c(e[N],t,{configurable:!0,get:function(){return n(this)[t]}})},Z=function(e,t,n,r){var o=v(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)},Q=function(e,t,n,r,o,i){var s=v(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!==S;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&&!C})))ee&&C&&u(U,"name",S);else{(x=function(e){return f(this,P),new U(v(e))})[N]=P;for(var te,ne=g(U),re=0;ne.length>re;)(te=ne[re++])in x||u(x,te,U[te]);P.constructor=x}y&&E(k)!==H&&y(k,H);var oe=new D(new x(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 P=(x=function(e){f(this,P);var t=v(e);L(this,{type:S,bytes:F(B(t),0),byteLength:t}),i||(this.byteLength=t,this.detached=!1)})[N],k=(D=function(e,t,n){f(this,k),f(e,P);var r=M(e),o=r.byteLength,s=p(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:b,buffer:e,byteLength:n,byteOffset:s,bytes:r.bytes}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=s)})[N],i&&($(x,"byteLength",M),$(D,"buffer",w),$(D,"byteLength",w),$(D,"byteOffset",w)),l(k,{getInt8:function(e){return Z(this,1,e)[0]<<24>>24},getUint8:function(e){return Z(this,1,e)[0]},getInt16:function(e){var t=Z(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Z(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return z(Z(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return z(Z(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return q(Z(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return q(Z(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Q(this,1,e,K,t)},setUint8:function(e,t){Q(this,1,e,K,t)},setInt16:function(e,t){Q(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Q(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Q(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Q(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Q(this,4,e,Y,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Q(this,8,e,X,t,arguments.length>2?arguments[2]:void 0)}});T(x,S),T(D,b),e.exports={ArrayBuffer:x,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,f=a((void 0===d?u:o(d,u))-l,u-c),p=1;for(l<c&&c<l+f&&(p=-1,l+=f-1,c+=f-1);f-- >0;)l in n?n[c]=n[l]:s(n,c),c+=p,l+=p;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),f=n(1246),p=Array;e.exports=function(e){var t=i(e),n=u(this),h=arguments.length,v=h>1?arguments[1]:void 0,_=void 0!==v;_&&(v=r(v,h>2?arguments[2]:void 0));var E,y,g,m,O,T,R=f(t),I=0;if(!R||this===p&&a(R))for(E=c(t),y=n?new this(E):p(E);E>I;I++)T=_?v(t[I],I):t[I],l(y,I,T);else for(O=(m=d(t,R)).next,y=n?new this:[];!(g=o(O,m)).done;I++)T=_?s(m,v,[g.value,I],!0):g.value,l(y,I,T);return y.length=I,y}},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,f=7==e,p=5==e||d;return function(h,v,_,E){for(var y,g,m=s(h),O=i(m),T=r(v,_),R=a(O),I=0,C=E||u,S=t?C(h,R):n||f?C(h,0):void 0;R>I;I++)if((p||I in O)&&(g=T(y=O[I],I,m),e))if(t)S[I]=g;else if(g)switch(e){case 3:return!0;case 5:return y;case 6:return I;case 2:c(S,y)}else switch(e){case 4:return!1;case 7:c(S,y)}return d?-1:o||l?l:S}};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"),f=l||!d;e.exports=f?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),f=s(l),p=e?f-1:0,h=e?-1:1;if(u<2)for(;;){if(p in d){c=d[p],p+=h;break}if(p+=h,e?p<0:f<=p)throw a("Reduce of empty array with no initial value")}for(;e?p>=0:f>p;p+=h)p in d&&(c=n(c,d[p],p,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)),f=0;c<l;c++,f++)i(d,f,e[c]);return d.length=f,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),f=n(6340),p=n(9781),h=n(2423).fastKey,v=n(9909),_=v.set,E=v.getterFor;e.exports={getConstructor:function(e,t,n,l){var d=e((function(e,o){a(e,f),_(e,{type:t,index:r(null),first:void 0,last:void 0,size:0}),p||(e.size=0),u(o)||c(o,e[l],{that:e,AS_ENTRIES:n})})),f=d.prototype,v=E(t),y=function(e,t,n){var r,o,i=v(e),s=g(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),p?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},g=function(e,t){var n,r=v(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(f,{clear:function(){for(var e=v(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,p?e.size=0:this.size=0},delete:function(e){var t=this,n=v(t),r=g(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),p?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=v(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!!g(this,e)}}),i(f,n?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),p&&o(f,"size",{configurable:!0,get:function(){return v(this).size}}),d},setStrong:function(e,t,n){var r=t+" Iterator",o=E(t),i=E(r);l(e,t,(function(e,t){_(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),f(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),f=n(8554),p=n(111),h=n(7293),v=n(7072),_=n(8003),E=n(9587);e.exports=function(e,t,n){var y=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),m=y?"set":"add",O=o[e],T=O&&O.prototype,R=O,I={},C=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!(g&&!p(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return g&&!p(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!p(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(s(e,!d(O)||!(g||T.forEach&&!h((function(){(new O).entries().next()})))))R=n.getConstructor(t,e,y,m),u.enable();else if(s(e,!0)){var S=new R,b=S[m](g?{}:-0,1)!=S,N=h((function(){S.has(1)})),A=v((function(e){new O(e)})),M=!g&&h((function(){for(var e=new O,t=5;t--;)e[m](t,t);return!e.has(-0)}));A||((R=t((function(e,t){l(e,T);var n=E(new O,e,R);return f(t)||c(t,n[m],{that:n,AS_ENTRIES:y}),n}))).prototype=T,T.constructor=R),(N||M)&&(C("delete"),C("has"),y&&C("get")),(M||b)&&C(m),g&&T.clear&&delete T.clear}return I[e]=R,r({global:!0,constructor:!0,forced:R!=O},I),_(R,e),g||n.setStrong(R,e,y),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,f,p,h=e.target,v=e.global,_=e.stat;if(n=v?r:_?r[h]||a(h,{}):(r[h]||{}).prototype)for(l in t){if(f=t[l],d=e.dontCallGetSet?(p=o(n,l))&&p.value:n[l],!c(v?l:h+(_?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;u(f,d)}(e.sham||d&&d.sham)&&i(f,"sham",!0),s(n,l,f,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),f={};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(f,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";f[t]=c("C,a","return new C("+d(r,",")+")")}return f[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,f=t(u),p=8*u-a-1,h=(1<<p)-1,v=h>>1,_=23===a?r(2,-24)-r(2,-77):0,E=e<0||0===e&&1/e<0?1:0,y=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+v>=1?_/d:_*r(2,1-v))*d>=2&&(c++,d/=2),c+v>=h?(l=0,c=h):c+v>=1?(l=(e*d-1)*r(2,a),c+=v):(l=e*r(2,v-1)*r(2,a),c=0));a>=8;)f[y++]=255&l,l/=256,a-=8;for(c=c<<a|l,p+=a;p>0;)f[y++]=255&c,c/=256,p-=8;return f[--y]|=128*E,f},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),f=n(9711),p=n(6677),h=!1,v=f("meta"),_=0,E=function(e){u(e,v,{value:{objectID:"O"+_++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},h=!0;var e=c.f,t=o([].splice),n={};n[v]=1,e(n).length&&(c.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===v){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,v)){if(!d(e))return"F";if(!t)return"E";E(e)}return e[v].objectID},getWeakData:function(e,t){if(!a(e,v)){if(!d(e))return!0;if(!t)return!1;E(e)}return e[v].weakData},onFreeze:function(e){return p&&h&&d(e)&&!a(e,v)&&E(e),e}};i[v]=!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),f=n(6200),p=n(3501),h="Object already initialized",v=a.TypeError,_=a.WeakMap;if(s||d.state){var E=d.state||(d.state=new _);E.get=E.get,E.has=E.has,E.set=E.set,r=function(e,t){if(E.has(e))throw v(h);return t.facade=e,E.set(e,t),t},o=function(e){return E.get(e)||{}},i=function(e){return E.has(e)}}else{var y=f("state");p[y]=!0,r=function(e,t){if(l(e,y))throw v(h);return t.facade=e,c(e,y,t),t},o=function(e){return l(e,y)?e[y]:{}},i=function(e){return l(e,y)}}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 v("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"),f=/^\s*(?:class|function)\b/,p=r(f.exec),h=!f.exec(c),v=function(e){if(!i(e))return!1;try{return d(c,l,e),!0}catch(e){return!1}},_=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(f,u(e))}catch(e){return!0}};_.sham=!0,e.exports=!d||o((function(){var e;return v(v.call)||!v(Object)||!v((function(){e=!0}))||e}))?_:v},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),f=n(9212),p=TypeError,h=function(e,t){this.stopped=e,this.result=t},v=h.prototype;e.exports=function(e,t,n){var _,E,y,g,m,O,T,R=n&&n.that,I=!(!n||!n.AS_ENTRIES),C=!(!n||!n.IS_RECORD),S=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),N=r(t,R),A=function(e){return _&&f(_,"normal",e),new h(!0,e)},M=function(e){return I?(i(e),b?N(e[0],e[1],A):N(e[0],e[1])):b?N(e,A):N(e)};if(C)_=e.iterator;else if(S)_=e;else{if(!(E=d(e)))throw p(s(e)+" is not iterable");if(a(E)){for(y=0,g=u(e);g>y;y++)if((m=M(e[y]))&&c(v,m))return m;return new h(!1)}_=l(e,E)}for(O=C?e.next:_.next;!(T=o(O,_)).done;){try{m=M(T.value)}catch(e){f(_,"throw",e)}if("object"==typeof m&&m&&c(v,m))return m}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),f=n(8880),p=n(8052),h=n(5112),v=n(7497),_=n(3383),E=s.PROPER,y=s.CONFIGURABLE,g=_.IteratorPrototype,m=_.BUGGY_SAFARI_ITERATORS,O=h("iterator"),T="keys",R="values",I="entries",C=function(){return this};e.exports=function(e,t,n,s,h,_,S){u(n,t,s);var b,N,A,M=function(e){if(e===h&&P)return P;if(!m&&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,x=U[O]||U["@@iterator"]||h&&U[h],P=!m&&x||M(h),D="Array"==t&&U.entries||x;if(D&&(b=c(D.call(new e)))!==Object.prototype&&b.next&&(i||c(b)===g||(l?l(b,g):a(b[O])||p(b,O,C)),d(b,w,!0,!0),i&&(v[w]=C)),E&&h==R&&x&&x.name!==R&&(!i&&y?f(U,"name",R):(L=!0,P=function(){return o(x,this)})),h)if(N={values:M(R),keys:_?P:M(T),entries:M(I)},S)for(A in N)(m||L||!(A in U))&&p(U,A,N[A]);else r({target:t,proto:!0,forced:m||L},N);return i&&!S||U[O]===P||p(U,O,P,{name:h}),v[t]=P,N}},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),f=n(5112),p=n(1913),h=f("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):v=!0),!u(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:p&&(r=c(r)),a(r[h])||d(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},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,f=l.get,p=String,h=Object.defineProperty,v=r("".slice),_=r("".replace),E=r([].join),y=a&&!o((function(){return 8!==h((function(){}),"length",{value:8}).length})),g=String(String).split("String"),m=e.exports=function(e,t,n){"Symbol("===v(p(t),0,7)&&(t="["+_(p(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),y&&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=E(g,"string"==typeof t?t:"")),e};Function.prototype.toString=m((function(){return i(this)&&f(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,f=n(8572),p=n(6833),h=n(1528),v=n(1036),_=n(5268),E=u.MutationObserver||u.WebKitMutationObserver,y=u.document,g=u.process,m=u.Promise,O=l(u,"queueMicrotask"),T=O&&O.value;if(!T){var R=new f,I=function(){var e,t;for(_&&(e=g.domain)&&e.exit();t=R.get();)try{t()}catch(e){throw R.head&&r(),e}e&&e.enter()};p||_||v||!E||!y?!h&&m&&m.resolve?((s=m.resolve(void 0)).constructor=m,a=c(s.then,s),r=function(){a(I)}):_?r=function(){g.nextTick(I)}:(d=c(d,u),r=function(){d(I)}):(o=!0,i=y.createTextNode(""),new E(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),f=Object.assign,p=Object.defineProperty,h=o([].concat);e.exports=!f||s((function(){if(r&&1!==f({b:1},f(p({},"a",{enumerable:!0,get:function(){p(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!=f({},e)[n]||a(f({},t)).join("")!=o}))?function(e,t){for(var n=l(e),o=arguments.length,s=1,f=u.f,p=c.f;o>s;)for(var v,_=d(arguments[s++]),E=f?h(a(_),f(_)):a(_),y=E.length,g=0;y>g;)v=E[g++],r&&!i(p,_,v)||(n[v]=_[v]);return n}:f},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",f="script",p=l("IE_PROTO"),h=function(){},v=function(e){return"<"+f+">"+e+"</"+f+">"},_=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},E=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;E="undefined"!=typeof document?document.domain&&r?_(r):(t=c("iframe"),n="java"+f+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):_(r);for(var o=s.length;o--;)delete E[d][s[o]];return E()};a[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=o(e),n=new h,h[d]=null,n[p]=e):n=E(),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",f="configurable",p="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&&p in n&&!n[p]){var r=l(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],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,f=[];l>d;)n=c[d++],r&&!a(o,n)||u(f,e?[n,o[n]]:o[n]);return f}};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),f=n(7392),p=o&&o.prototype,h=u("species"),v=!1,_=i(r.PromiseRejectionEvent),E=s("Promise",(function(){var e=a(o),t=e!==String(o);if(!t&&66===f)return!0;if(d&&(!p.catch||!p.finally))return!0;if(!f||f<51||!/native code/.test(e)){var n=new o((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[h]=r,!(v=n.then((function(){}))instanceof r))return!0}return!t&&(c||l)&&!_}));e.exports={CONSTRUCTOR:E,REJECTION_EVENT:_,SUBCLASSING:v}},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),f=n(9909).get,p=n(9441),h=n(7168),v=l("native-string-replace",String.prototype.replace),_=RegExp.prototype.exec,E=_,y=s("".charAt),g=s("".indexOf),m=s("".replace),O=s("".slice),T=(o=/b*/g,i(_,r=/a/,"a"),i(_,o,"a"),0!==r.lastIndex||0!==o.lastIndex),R=c.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(T||I||R||p||h)&&(E=function(e){var t,n,r,o,s,c,l,p=this,h=f(p),C=a(e),S=h.raw;if(S)return S.lastIndex=p.lastIndex,t=i(E,S,C),p.lastIndex=S.lastIndex,t;var b=h.groups,N=R&&p.sticky,A=i(u,p),M=p.source,w=0,L=C;if(N&&(A=m(A,"y",""),-1===g(A,"g")&&(A+="g"),L=O(C,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==y(C,p.lastIndex-1))&&(M="(?: "+M+")",L=" "+L,w++),n=new RegExp("^(?:"+M+")",A)),I&&(n=new RegExp("^"+M+"$(?!\\s)",A)),T&&(r=p.lastIndex),o=i(_,N?n:p,L),N?o?(o.input=O(o.input,w),o[0]=O(o[0],w),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:T&&o&&(p.lastIndex=p.global?o.index+o[0].length:r),I&&o&&o.length>1&&i(v,o[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&b)for(o.groups=c=d(null),s=0;s<b.length;s++)c[(l=b[s])[0]]=o[l[1]];return o}),e.exports=E},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,f=/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 f?function(r,o){var a=l(arguments.length,1)>n,u=s(r)?r:d(r),f=a?c(arguments,n):[],p=a?function(){i(u,this,f)}:u;return t?e(p,o):e(p)}: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)),f=o(n),p=d.length;return f<0||f>=p?e?"":void 0:(r=u(d,f))<55296||r>56319||f+1===p||(l=u(d,f+1))<56320||l>57343?e?a(d,f):r:e?c(d,f,f+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,f=r("".charCodeAt),p=r([].join),h=r([].push),v=r("".replace),_=r("".split),E=r("".toLowerCase),y=function(e){return e+22+75*(e<26)},g=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))},m=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=f(e,n++);if(o>=55296&&o<=56319&&n<r){var i=f(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,v=72;for(n=0;n<e.length;n++)(r=e[n])<128&&h(t,d(r));var _=t.length,E=_;for(_&&h(t,"-");E<i;){var m=o;for(n=0;n<e.length;n++)(r=e[n])>=s&&r<m&&(m=r);var O=E+1;if(m-s>l((o-c)/O))throw u(a);for(c+=(m-s)*O,s=m,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<=v?1:R>=v+26?26:R-v;if(T<I)break;var C=T-I,S=36-I;h(t,d(y(I+C%S))),T=l(C/S),R+=36}h(t,d(y(T))),v=g(c,O,E==_),c=0,E++}}c++,s++}return p(t,"")};e.exports=function(e){var t,n,r=[],o=_(v(E(e),s,"."),".");for(t=0;t<o.length;t++)n=o[t],h(r,c(i,n)?"xn--"+m(n):n);return p(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),f=n(7293),p=n(490),h=n(206),v=n(317),_=n(8053),E=n(6833),y=n(5268),g=a.setImmediate,m=a.clearImmediate,O=a.process,T=a.Dispatch,R=a.Function,I=a.MessageChannel,C=a.String,S=0,b={},N="onreadystatechange";f((function(){r=a.location}));var A=function(e){if(d(b,e)){var t=b[e];delete b[e],t()}},M=function(e){return function(){A(e)}},w=function(e){A(e.data)},L=function(e){a.postMessage(C(e),r.protocol+"//"+r.host)};g&&m||(g=function(e){_(arguments.length,1);var t=l(e)?e:R(e),n=h(arguments,1);return b[++S]=function(){u(t,void 0,n)},o(S),S},m=function(e){delete b[e]},y?o=function(e){O.nextTick(M(e))}:T&&T.now?o=function(e){T.now(M(e))}:I&&!E?(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&&!f(L)?(o=L,a.addEventListener("message",w,!1)):o=N in v("script")?function(e){p.appendChild(v("script"))[N]=function(){p.removeChild(this),A(e)}}:function(e){setTimeout(M(e),0)}),e.exports={set:g,clear:m}},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),f=n(8880),p=n(5988),h=n(7466),v=n(7067),_=n(4590),E=n(4948),y=n(2597),g=n(648),m=n(111),O=n(2190),T=n(30),R=n(7976),I=n(7674),C=n(8006).f,S=n(7321),b=n(2092).forEach,N=n(6340),A=n(7045),M=n(3070),w=n(1236),L=n(9909),U=n(9587),x=L.get,P=L.set,D=L.enforce,k=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",$="Wrong length",Z=function(e,t){z(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},Q=function(e,t){A(e,t,{configurable:!0,get:function(){return x(this)[t]}})},ee=function(e){var t;return R(j,e)||"ArrayBuffer"==(t=g(e))||"SharedArrayBuffer"==t},te=function(e,t){return Y(e)&&!O(t)&&t in e&&p(+t)&&t>=0},ne=function(e,t){return t=E(t),te(e,t)?d(2,e[t]):H(e,t)},re=function(e,t,n){return t=E(t),!(te(e,t)&&m(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?k(e,t,n):(e[t]=n.value,e)};s?(q||(w.f=ne,M.f=re,Q(J,"buffer"),Q(J,"byteOffset"),Q(J,"byteLength"),Q(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,p=o[u],E=p,y=E&&E.prototype,g={},O=function(e,t){k(e,t,{get:function(){return function(e,t){var n=x(e);return n.view[c](t*s+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=x(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&&(E=t((function(e,t,n,r){return l(e,y),U(m(t)?ee(t)?void 0!==r?new p(t,_(n,s),r):void 0!==n?new p(t,_(n,s)):new p(t):Y(t)?Z(E,t):i(S,E,t):new p(v(t)),e,E)})),I&&I(E,V),b(C(p),(function(e){e in E||f(E,e,p[e])})),E.prototype=y):(E=t((function(e,t,n,r){l(e,y);var o,a,u,c=0,d=0;if(m(t)){if(!ee(t))return Y(t)?Z(E,t):i(S,E,t);o=t,d=_(n,s);var f=t.byteLength;if(void 0===r){if(f%s)throw G($);if((a=f-d)<0)throw G($)}else if((a=h(r)*s)+d>f)throw G($);u=a/s}else u=v(t),o=new F(a=u*s);for(P(e,{buffer:o,byteOffset:d,byteLength:a,length:u,view:new W(o)});c<u;)O(e,c++)})),I&&I(E,V),y=E.prototype=T(J)),y.constructor!==E&&f(y,"constructor",E),D(y).TypedArrayConstructor=E,K&&f(y,K,u);var R=E!=p;g[u]=E,r({global:!0,constructor:!0,forced:R,sham:!q},g),X in E||f(E,X,s),X in y||f(y,X,s),N(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),f=n(260).aTypedArrayConstructor,p=n(4599);e.exports=function(e){var t,n,h,v,_,E,y,g,m=i(this),O=s(e),T=arguments.length,R=T>1?arguments[1]:void 0,I=void 0!==R,C=c(O);if(C&&!l(C))for(g=(y=u(O,C)).next,O=[];!(E=o(g,y)).done;)O.push(E.value);for(I&&T>2&&(R=r(R,arguments[2])),n=a(O),h=new(f(m))(n),v=d(h),t=0;n>t;t++)_=I?R(O[t],t):O[t],h[t]=v?p(_):+_;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"},8264:function(e,t,n){"use strict";var r=n(2109),o=n(7854),i=n(3331),s=n(6340),a="ArrayBuffer",u=i[a];r({global:!0,constructor:!0,forced:o[a]!==u},{ArrayBuffer:u}),s(a)},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,f=s.DataView,p=f.prototype,h=o(d.prototype.slice),v=o(p.getUint8),_=o(p.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 f(this),p=new f(i),E=0;r<o;)_(p,E++,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),f=n(1194),p=n(5112),h=n(7392),v=p("isConcatSpreadable"),_=h>=51||!o((function(){var e=[];return e[v]=!1,e.concat()[0]!==e})),E=function(e){if(!s(e))return!1;var t=e[v];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!_||!f("concat")},{concat:function(e){var t,n,r,o,i,s=a(this),f=d(s,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(E(i=-1===t?s:arguments[t]))for(o=u(i),c(p+o),n=0;n<o;n++,p++)n in i&&l(f,p,i[n]);else c(p+1),l(f,p++,i);return f.length=p,f}})},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)}})},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),f="Array Iterator",p=s.set,h=s.getterFor(f);e.exports=u(Array,"Array",(function(e,t){p(this,{type:f,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 v=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&d&&"values"!==v.name)try{a(v,"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),f=n(1194),p=n(206),h=f("slice"),v=d("species"),_=Array,E=Math.max;r({target:"Array",proto:!0,forced:!h},{slice:function(e,t){var n,r,d,f=c(this),h=u(f),y=a(e,h),g=a(void 0===t?h:t,h);if(o(f)&&(n=f.constructor,(i(n)&&(n===_||o(n.prototype))||s(n)&&null===(n=n[v]))&&(n=void 0),n===_||void 0===n))return p(f,y,g);for(r=new(void 0===n?_:n)(E(g-y,0)),d=0;y<g;y++,d++)y in f&&l(r,d,f[y]);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),f=n(5117),p=n(1194)("splice"),h=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!p},{splice:function(e,t){var n,r,p,_,E,y,g=o(this),m=a(g),O=i(e,m),T=arguments.length;for(0===T?n=r=0:1===T?(n=0,r=m-O):(n=T-2,r=v(h(s(t),0),m-O)),c(m+n-r),p=l(g,r),_=0;_<r;_++)(E=O+_)in g&&d(p,_,g[E]);if(p.length=r,n<r){for(_=O;_<m-r;_++)y=_+n,(E=_+r)in g?g[y]=g[E]:f(g,y);for(_=m;_>m-r+n;_--)f(g,_-1)}else if(n>r)for(_=m-r;_>O;_--)y=_+n-1,(E=_+r-1)in g?g[y]=g[E]:f(g,y);for(_=0;_<n;_++)g[_+O]=arguments[_+2];return u(g,m-r+n),p}})},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),f=n(8044),p=n(6293),h=String,v=o("JSON","stringify"),_=a(/./.exec),E=a("".charAt),y=a("".charCodeAt),g=a("".replace),m=a(1..toString),O=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,I=!p||u((function(){var e=o("Symbol")();return"[null]"!=v([e])||"{}"!=v({a:e})||"{}"!=v(Object(e))})),C=u((function(){return'"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),S=function(e,t){var n=d(arguments),r=f(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(v,null,n)},b=function(e,t,n){var r=E(n,t-1),o=E(n,t+1);return _(T,e)&&!_(R,o)||_(R,e)&&!_(T,r)?"\\u"+m(y(e,0),16):e};v&&r({target:"JSON",stat:!0,arity:3,forced:I||C},{stringify:function(e,t,n){var r=d(arguments),o=i(I?S:v,null,r);return C&&"string"==typeof o?g(o,O,b):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),f=n(7976),p=n(2190),h=n(7593),v=n(7293),_=n(8006).f,E=n(1236).f,y=n(3070).f,g=n(863),m=n(3111).trim,O="Number",T=s[O],R=a[O],I=T.prototype,C=s.TypeError,S=u("".slice),b=u("".charCodeAt),N=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(p(c))throw C("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=m(c),43===(t=b(c,0))||45===t){if(88===(n=b(c,2))||120===n)return NaN}else if(48===t){switch(b(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=S(c,2)).length,a=0;a<s;a++)if((u=b(i,a))<48||u>o)return NaN;return parseInt(i,r)}return+c}(t)}(e));return f(I,t=this)&&v((function(){g(t)}))?d(Object(n),this,A):n};A.prototype=I,N&&!o&&(I.constructor=A),r({global:!0,constructor:!0,wrap:!0,forced:N},{Number:A});var M=function(e,t){for(var n,r=i?_(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)&&y(e,n,E(t,n))};o&&R&&M(a[O],R),(N||o)&&M(a[O],T)},3161:function(e,t,n){n(2109)({target:"Number",stat:!0},{isInteger:n(5988)})},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),f=n(7674),p=n(8003),h=n(6340),v=n(9662),_=n(614),E=n(111),y=n(5787),g=n(6707),m=n(261).set,O=n(5948),T=n(842),R=n(2534),I=n(8572),C=n(9909),S=n(2492),b=n(3702),N=n(8523),A="Promise",M=b.CONSTRUCTOR,w=b.REJECTION_EVENT,L=b.SUBCLASSING,U=C.getterFor(A),x=C.set,P=S&&S.prototype,D=S,k=P,H=c.TypeError,B=c.document,G=c.process,F=N.f,j=F,W=!!(B&&B.createEvent&&c.dispatchEvent),q="unhandledrejection",K=function(e){var t;return!(!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&&$(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(m,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},$=function(e){l(m,c,(function(){var t=e.facade;u?G.emit("rejectionHandled",t):z("rejectionhandled",t,e.value)}))},Z=function(e,t,n){return function(r){e(t,r,n)}},Q=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,Z(ee,n,e),Z(Q,n,e))}catch(t){Q(n,t,e)}})):(e.value=t,e.state=1,J(e,!1))}catch(t){Q({done:!1},t,e)}}};if(M&&(k=(D=function(e){y(this,k),v(e),l(r,this);var t=U(this);try{e(Z(ee,t),Z(Q,t))}catch(e){Q(t,e)}}).prototype,(r=function(e){x(this,{type:A,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(g(this,D));return n.parent=!0,r.ok=!_(e)||e,r.fail=_(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=Z(ee,t),this.reject=Z(Q,t)},N.f=F=function(e){return e===D||void 0===e?new o(e):j(e)},!a&&_(S)&&P!==Object.prototype)){i=P.then,L||d(P,"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 P.constructor}catch(e){}f&&f(P,k)}s({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:D}),p(D,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"})})),f=r&&l.name!=c;(d||f)&&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),f=n(7976),p=n(9670),h=n(5656),v=n(4948),_=n(1340),E=n(9114),y=n(30),g=n(1956),m=n(8006),O=n(1156),T=n(5181),R=n(1236),I=n(3070),C=n(6048),S=n(5296),b=n(8052),N=n(7045),A=n(2309),M=n(6200),w=n(3501),L=n(9711),U=n(5112),x=n(6061),P=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,q=H.getterFor(F),K=Object[j],V=o.Symbol,J=V&&V[j],z=o.TypeError,Y=o.QObject,X=R.f,$=I.f,Z=O.f,Q=S.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!=y($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=X(K,t);r&&delete K[t],$(e,t,n),r&&e!==K&&$(K,t,r)}:$,se=function(e,t){var n=te[e]=y(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),p(e);var r=v(t);return p(n),d(te,r)?(n.enumerable?(d(e,G)&&e[G][r]&&(e[G][r]=!1),n=y(n,{enumerable:E(0,!1)})):(d(e,G)||$(e,G,E(1,{})),e[G][r]=!0),ie(e,r,n)):$(e,r,n)},ue=function(e,t){p(e);var n=h(t),r=g(n).concat(fe(n));return B(r,(function(t){u&&!i(ce,n,t)||ae(e,t,n[t])})),e},ce=function(e){var t=v(e),n=i(Q,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=v(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=Z(h(e)),n=[];return B(t,(function(e){d(te,e)||d(w,e)||ee(n,e)})),n},fe=function(e){var t=e===K,n=Z(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(f(J,this))throw z("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?_(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,E(1,e))};return u&&oe&&ie(K,t,{configurable:!0,set:n}),se(t,e)},b(J=V[j],"toString",(function(){return q(this).tag})),b(V,"withoutSetter",(function(e){return se(L(e),e)})),S.f=ce,I.f=ae,C.f=ue,R.f=le,m.f=O.f=de,T.f=fe,x.f=function(e){return se(U(e),e)},u&&(N(J,"description",{configurable:!0,get:function(){return q(this).description}}),a||b(K,"propertyIsEnumerable",ce,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),B(g(re),(function(e){P(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?y(e):ue(y(e),t)},defineProperty:ae,defineProperties:ue,getOwnPropertyDescriptor:le}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:de}),D(),k(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),f=n(9920),p=i.Symbol,h=p&&p.prototype;if(o&&u(p)&&(!("description"in h)||void 0!==p().description)){var v={},_=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(h,this)?new p(e):void 0===e?p():p(e);return""===e&&(v[t]=!0),t};f(_,p),_.prototype=h,h.constructor=_;var E="Symbol(test)"==String(p("test")),y=s(h.valueOf),g=s(h.toString),m=/^Symbol\((.*)\)[^)]+$/,O=s("".replace),T=s("".slice);d(h,"description",{configurable:!0,get:function(){var e=y(this);if(a(v,e))return"";var t=g(e),n=E?T(t,7,-1):O(t,m,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:_})}},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,f=u("".slice);d("fill",(function(e){var t=arguments.length;l(this);var n="Big"===f(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),f=i(a.entries),p=s.aTypedArray,h=s.exportTypedArrayMethod,v=c&&c.prototype,_=!o((function(){v[u].call([1])})),E=!!v&&v.values&&v[u]===v.values&&"values"===v.values.name,y=function(){return l(p(this))};h("entries",(function(){return f(p(this))}),_),h("keys",(function(){return d(p(this))}),_),h("values",y,_||!E,{name:"values"}),h(u,y,_||!E,{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,f=d&&d.prototype,p=f&&f.set,h=i.aTypedArray,v=i.exportTypedArrayMethod,_=!c((function(){var e=new Uint8ClampedArray(2);return o(p,e,{length:1,0:3},1),3!==e[1]})),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]}));v("set",(function(e){h(this);var t=a(arguments.length>1?arguments[1]:void 0,1),n=u(e);if(_)return o(p,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)},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),f=n(8008),p=u.aTypedArray,h=u.exportTypedArrayMethod,v=r.Uint16Array,_=v&&o(v.prototype.sort),E=!(!_||i((function(){_(new v(2),null)}))&&i((function(){_(new v(2),{})}))),y=!!_&&!i((function(){if(d)return d<74;if(c)return c<67;if(l)return!0;if(f)return f<602;var e,t,n=new v(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(_(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),y?_(this,e):a(p(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))}),!y||E)},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,f=!!u&&s((function(){d.call(new u(1))}));l("toLocaleString",(function(){return o(d,f?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,f=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 p in o)f(r[p]&&r[p].prototype,p);f(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),f=n(8003),p=n(3061),h=n(9909),v=n(5787),_=n(614),E=n(2597),y=n(9974),g=n(648),m=n(9670),O=n(111),T=n(1340),R=n(30),I=n(9114),C=n(4121),S=n(1246),b=n(8053),N=n(5112),A=n(4362),M=N("iterator"),w="URLSearchParams",L=w+"Iterator",U=h.set,x=h.getterFor(w),P=h.getterFor(L),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,q=o.TypeError,K=o.decodeURIComponent,V=o.encodeURIComponent,J=s("".charAt),z=s([].join),Y=s([].push),X=s("".replace),$=s([].shift),Z=s([].splice),Q=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=p((function(e,t){U(this,{type:L,iterator:C(x(e).entries),kind:t})}),"Iterator",(function(){var e=P(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=S(e);if(c)for(n=(t=C(e,c)).next;!(r=i(n,t)).done;){if(s=(o=C(m(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)E(e,l)&&Y(this.entries,{key:l,value:T(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=Q(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=Q(t,"="),Y(this.entries,{key:ie($(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 fe=function(){v(this,pe);var e=U(this,new de(arguments.length>0?arguments[0]:void 0));a||(this.length=e.entries.length)},pe=fe.prototype;if(d(pe,{append:function(e,t){b(arguments.length,2);var n=x(this);Y(n.entries,{key:T(e),value:T(t)}),a||this.length++,n.updateURL()},delete:function(e){b(arguments.length,1);for(var t=x(this),n=t.entries,r=T(e),o=0;o<n.length;)n[o].key===r?Z(n,o,1):o++;a||(this.length=n.length),t.updateURL()},get:function(e){b(arguments.length,1);for(var t=x(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){b(arguments.length,1);for(var t=x(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){b(arguments.length,1);for(var t=x(this).entries,n=T(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){b(arguments.length,1);for(var n,r=x(this),o=r.entries,i=!1,s=T(e),u=T(t),c=0;c<o.length;c++)(n=o[c]).key===s&&(i?Z(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=x(this);A(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=x(this).entries,r=y(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(pe,M,pe.entries,{name:"entries"}),c(pe,"toString",(function(){return x(this).serialize()}),{enumerable:!0}),a&&l(pe,"size",{get:function(){return x(this).entries.length},configurable:!0,enumerable:!0}),f(fe,w),r({global:!0,constructor:!0,forced:!u},{URLSearchParams:fe}),!u&&_(G)){var he=s(j.has),ve=s(j.set),_e=function(e){if(O(e)){var t,n=e.body;if(g(n)===w)return t=e.headers?new G(e.headers):new G,he(t,"content-type")||ve(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(_(H)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return H(e,arguments.length>1?_e(arguments[1]):{})}}),_(B)){var Ee=function(e){return v(this,F),new B(e,arguments.length>1?_e(arguments[1]):{})};F.constructor=Ee,Ee.prototype=F,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ee})}}e.exports={URLSearchParams:fe,getState:x}},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),f=n(5787),p=n(2597),h=n(1574),v=n(8457),_=n(1589),E=n(8710).codeAt,y=n(3197),g=n(1340),m=n(8003),O=n(8053),T=n(5556),R=n(9909),I=R.set,C=R.getterFor("URL"),S=T.URLSearchParams,b=T.getState,N=a.URL,A=a.TypeError,M=a.parseInt,w=Math.floor,L=Math.pow,U=c("".charAt),x=c(/./.exec),P=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),q=c([].unshift),K="Invalid scheme",V="Invalid host",J="Invalid port",z=/[a-z]/i,Y=/[\d+-.a-z]/i,X=/\d/,$=/^0x/i,Z=/^[0-7]+$/,Q=/^\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 P(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=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=E(e,0);return n>32&&n<127&&!p(t,e)?e:encodeURIComponent(e)},fe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},pe=function(e,t){var n;return 2==e.length&&x(z,U(e,0))&&(":"==(n=U(e,1))||!t&&"|"==n)},he=function(e){var t;return e.length>1&&pe(j(e,0,2))&&(2==e.length||"/"===(t=U(e,2))||"\\"===t||"?"===t||"#"===t)},ve=function(e){return"."===e||"%2e"===W(e)},_e={},Ee={},ye={},ge={},me={},Oe={},Te={},Re={},Ie={},Ce={},Se={},be={},Ne={},Ae={},Me={},we={},Le={},Ue={},xe={},Pe={},De={},ke=function(e,t,n){var r,o,i,s=g(e);if(t){if(o=this.parse(s))throw A(o);this.searchParams=null}else{if(void 0!==n&&(r=new ke(n,!0)),o=this.parse(s,null,r))throw A(o);(i=b(new S)).bindURL(this),this.searchParams=i}};ke.prototype={type:"URL",parse:function(e,t,n){var o,i,s,a,u,c=this,l=t||_e,d=0,f="",h=!1,E=!1,y=!1;for(e=g(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=v(e);d<=o.length;){switch(i=o[d],l){case _e:if(!i||!x(z,i)){if(t)return K;l=ye;continue}f+=W(i),l=Ee;break;case Ee:if(i&&(x(Y,i)||"+"==i||"-"==i||"."==i))f+=W(i);else{if(":"!=i){if(t)return K;f="",l=ye,d=0;continue}if(t&&(c.isSpecial()!=p(fe,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&fe[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?l=Ae:c.isSpecial()&&n&&n.scheme==c.scheme?l=ge:c.isSpecial()?l=Re:"/"==o[d+1]?(l=me,d++):(c.cannotBeABaseURL=!0,H(c.path,""),l=xe)}break;case ye:if(!n||n.cannotBeABaseURL&&"#"!=i)return K;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=_(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=De;break}l="file"==n.scheme?Ae:Oe;continue;case ge:if("/"!=i||"/"!=o[d+1]){l=Oe;continue}l=Ie,d++;break;case me:if("/"==i){l=Ce;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=_(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=_(n.path),c.query="",l=Pe;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=_(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=_(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=Ce}else l=Ie;break;case Re:if(l=Ie,"/"!=i||"/"!=U(f,d+1))continue;d++;break;case Ie:if("/"!=i&&"\\"!=i){l=Ce;continue}break;case Ce:if("@"==i){h&&(f="%40"+f),h=!0,s=v(f);for(var m=0;m<s.length;m++){var O=s[m];if(":"!=O||y){var T=de(O,le);y?c.password+=T:c.username+=T}else y=!0}f=""}else if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";d-=v(f).length+1,f="",l=Se}else f+=i;break;case Se:case be:if(t&&"file"==c.scheme){l=we;continue}if(":"!=i||E){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return V;if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(f))return a;if(f="",l=Le,t)return;continue}"["==i?E=!0:"]"==i&&(E=!1),f+=i}else{if(""==f)return V;if(a=c.parseHost(f))return a;if(f="",l=Ne,t==be)return}break;case Ne:if(!x(X,i)){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var R=M(f,10);if(R>65535)return J;c.port=c.isSpecial()&&R===fe[c.scheme]?null:R,f=""}if(t)return;l=Le;continue}return J}f+=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=_(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=_(n.path),c.query="",l=Pe;else{if("#"!=i){he(P(_(o,d),""))||(c.host=n.host,c.path=_(n.path),c.shortenPath()),l=Ue;continue}c.host=n.host,c.path=_(n.path),c.query=n.query,c.fragment="",l=De}}break;case Me:if("/"==i||"\\"==i){l=we;break}n&&"file"==n.scheme&&!he(P(_(o,d),""))&&(pe(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&&pe(f))l=Ue;else if(""==f){if(c.host="",t)return;l=Le}else{if(a=c.parseHost(f))return a;if("localhost"==c.host&&(c.host=""),t)return;f="",l=Le}continue}f+=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=De;else c.query="",l=Pe;break;case Ue:if(i==r||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(u=W(u=f))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||H(c.path,"")):ve(f)?"/"==i||"\\"==i&&c.isSpecial()||H(c.path,""):("file"==c.scheme&&!c.path.length&&pe(f)&&(c.host&&(c.host=""),f=U(f,0)+":"),H(c.path,f)),f="","file"==c.scheme&&(i==r||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)G(c.path);"?"==i?(c.query="",l=Pe):"#"==i&&(c.fragment="",l=De)}else f+=de(i,ce);break;case xe:"?"==i?(c.query="",l=Pe):"#"==i?(c.fragment="",l=De):i!=r&&(c.path[0]+=de(i,ae));break;case Pe: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,f=function(){return U(e,d)};if(":"==f()){if(":"!=U(e,1))return;d+=2,l=++c}for(;f();){if(8==c)return;if(":"!=f()){for(t=n=0;n<4&&x(ee,f());)t=16*t+M(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,c>6)return;for(r=0;f();){if(o=null,r>0){if(!("."==f()&&r<4))return;d++}if(!x(X,f()))return;for(;x(X,f());){if(i=M(f(),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(":"==f()){if(d++,!f())return}else if(f())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=y(e),x(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=x($,o)?16:8,o=j(o,8==i?1:2)),""===o)s=0;else{if(!x(10==i?Q:8==i?Z: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=k(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(x(ne,e))return V;for(t="",n=v(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 p(fe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&pe(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?"/"+P(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(g(e)+":",_e)},getUsername:function(){return this.username},setUsername:function(e){var t=v(g(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=v(g(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,Se)},getHostname:function(){var e=this.host;return null===e?"":se(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,be)},getPort:function(){var e=this.port;return null===e?"":g(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=g(e))?this.port=null:this.parse(e,Ne))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+P(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=g(e))?this.query=null:("?"==U(e,0)&&(e=j(e,1)),this.query="",this.parse(e,Pe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=g(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=f(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 C(this)[e]()},set:t&&function(e){return C(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 C(this).serialize()}),{enumerable:!0}),l(Be,"toString",(function(){return C(this).serialize()}),{enumerable:!0}),N){var Fe=N.createObjectURL,je=N.revokeObjectURL;Fe&&l(He,"createObjectURL",u(Fe,N)),je&&l(He,"revokeObjectURL",u(je,N))}m(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?E:_;if(t){if(e<0)return E;if(e>=p)return T}else{if(e<=-h)return R;if(e+1>=h)return O}return e<0?a(-e,t).neg():u(e%f|0,e/f|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 _;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=_,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 f=a(c(n,u));i=i.mul(f).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 f=4294967296,p=f*f,h=p/2,v=s(1<<24),_=s(0);n.ZERO=_;var E=s(0,!0);n.UZERO=E;var y=s(1);n.ONE=y;var g=s(1,!0);n.UONE=g;var m=s(-1);n.NEG_ONE=m;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)*f+(this.low>>>0):this.high*f+(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(y)},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,f=0,p=0,h=0;return p+=(h+=i+(65535&e.low))>>>16,f+=(p+=o+c)>>>16,l+=(f+=n+a)>>>16,l+=t+s,u((p&=65535)<<16|(h&=65535),(l&=65535)<<16|(f&=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 _;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 _;if(this.eq(R))return e.isOdd()?R:_;if(e.eq(R))return this.isOdd()?R:_;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(v)&&e.lt(v))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,f=e.low>>>16,p=65535&e.low,h=0,E=0,y=0,g=0;return y+=(g+=s*p)>>>16,E+=(y+=i*p)>>>16,y&=65535,E+=(y+=s*f)>>>16,h+=(E+=o*p)>>>16,E&=65535,h+=(E+=i*f)>>>16,E&=65535,h+=(E+=s*l)>>>16,h+=n*p+o*f+i*l+s*c,u((y&=65535)<<16|(g&=65535),(h&=65535)<<16|(E&=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?E:_;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return E;if(e.gt(this.shru(1)))return g;i=E}else{if(this.eq(R))return e.eq(y)||e.eq(m)?R:e.eq(R)?y:(n=this.shr(1).div(e).shl(1)).eq(_)?e.isNegative()?y:m:(o=this.sub(e.mul(n)),i=n.add(o.div(e)));if(e.eq(R))return this.unsigned?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=_}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),f=a(n),p=f.mul(e);p.isNegative()||p.gt(o);)p=(f=a(n-=l,this.unsigned)).mul(e);f.isZero()&&(f=y),i=i.add(f),o=o.sub(p)}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 f="["+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,f)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",d,d)("}")}else n("d%s=%j",d,l.typeDefault)}n("}")}var p=!1;for(c=0;c<t.length;++c){l=t[c];var h=e._fieldsArray.indexOf(l);d=i.safeProp(l.name),l.map?(p||(p=!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,f=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===f?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,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===f?s(n,c,l,t+"[i]"):n("w.uint32(%i).%s(%s[i])",(c.id<<3|f)>>>0,d,t)),n("}")):(c.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===f?s(n,c,l,t):n("w.uint32(%i).%s(%s)",(c.id<<3|f)>>>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 f(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),f(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),f(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),f=n(7063),p=n(9935),h=/^[1-9][0-9]*$/,v=/^-?[1-9][0-9]*$/,_=/^0[x][0-9a-fA-F]+$/,E=/^-?0[x][0-9a-fA-F]+$/,y=/^0[0-7]+$/,g=/^-?0[0-7]+$/,m=/^(?![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 C,S,b,N,A,M=n.preferTrailingComment||!1,w=r(e,n.alternateCommentMode||!1),L=w.next,U=w.push,x=w.peek,P=w.skip,D=w.cmnt,k=!0,H=!1,B=t,G=n.keepCase?function(e){return e}:p.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()),P(e),e=x()}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(_.test(e))return n*parseInt(e,16);if(y.test(e))return n*parseInt(e,8);if(m.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=x())&&"'"!==n?e.push([r=K(L()),P("to",!0)?K(L()):r]):e.push(j())}while(P(",",!0));P(";")}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(v.test(e))return parseInt(e,10);if(E.test(e))return parseInt(e,16);if(g.test(e))return parseInt(e,8);throw F(e,"id")}function V(){if(void 0!==C)throw F("package");if(C=L(),!T.test(C))throw F(C,"name");B=B.define(C),P(";")}function J(){var e,t=x();switch(t){case"weak":e=b||(b=[]),L();break;case"public":L();default:e=S||(S=[])}t=j(),P(";"),e.push(t)}function z(){if(P("="),N=j(),!(H="proto3"===N)&&"proto2"!==N)throw F(N,"syntax");P(";")}function Y(e,t){switch(t){case"option":return Z(e,t),P(";"),!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){P("<");var t=L();if(void 0===f.mapKey[t])throw F(t,"type");P(",");var n=L();if(!T.test(n))throw F(n,"type");P(">");var r=L();if(!O.test(r))throw F(r,"name");P("=");var o=new a(G(r),K(L()),t,n);X(o,(function(e){if("option"!==e)throw F(e);Z(o,e),P(";")}),(function(){te(o)})),e.add(o)}(n);break;case"required":case"repeated":$(n,e);break;case"optional":$(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?(Z(n,e),P(";")):(U(e),$(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),$(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":Z(n,e),P(";");break;case"reserved":q(n.reserved||(n.reserved=[]),!0);break;default:!function(e,t){if(!O.test(t))throw F(t,"name");P("=");var n=K(L(),!0),r={};X(r,(function(e){if("option"!==e)throw F(e);Z(r,e),P(";")}),(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=D(),r=t;if(!O.test(t=L()))throw F(t,"name");var o,i,s,a,u=t;if(P("("),P("stream",!0)&&(i=!0),!T.test(t=L()))throw F(t);if(o=t,P(")"),P("returns"),P("("),P("stream",!0)&&(a=!0),!T.test(t=L()))throw F(t);s=t,P(")");var c=new d(u,r,o,s,i,a);c.comment=n,X(c,(function(e){if("option"!==e)throw F(e);Z(c,e),P(";")})),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":$(e,t,n);break;case"optional":$(e,H?"proto3_optional":"optional",n);break;default:if(!H||!T.test(t))throw F(t);U(t),$(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=D()),e.filename=I.filename),P("{",!0)){for(var o;"}"!==(o=L());)t(o);P(";",!0)}else n&&n(),P(";"),e&&("string"!=typeof e.comment||M)&&(e.comment=D(r)||e.comment)}function $(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),P("=");var a=new s(o,K(L()),r,t,n);if(X(a,(function(e){if("option"!==e)throw F(e);Z(a,e),P(";")}),(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===f.packed[r]&&void 0!==f.basic[r]||a.setOption("packed",!1,!0)}else!function(e,t){var n=L();if(!O.test(n))throw F(n,"name");var r=p.lcFirst(n);n===r&&(n=p.ucFirst(n)),P("=");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":Z(a,e),P(";");break;case"required":case"repeated":$(a,e);break;case"optional":$(a,H?"proto3_optional":"optional");break;default:throw F(e)}})),e.add(a).add(u)}(e,t)}function Z(e,t){var n=P("(",!0);if(!T.test(t=L()))throw F(t,"name");var r,o=t,i=o;n&&(P(")"),i=o="("+o+")",t=x(),R.test(t)&&(r=t.substr(1),o+=t,L())),P("="),function(e,t,n,r){e.setParsedOption&&e.setParsedOption(t,n,r)}(e,i,Q(e,o),r)}function Q(e,t){if(P("{",!0)){for(var n={};!P("}",!0);){if(!O.test(A=L()))throw F(A,"name");var r,o=A;"{"===x()?r=Q(e,t+"."+A):(P(":"),"{"===x()?r=Q(e,t+"."+A):(r=W(!0),ee(e,t+"."+A,r)));var i=n[o];i&&(r=[].concat(i).concat(r)),n[o]=r,P(",",!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(P("[",!0)){do{Z(e,"option")}while(P(",",!0));P("]")}return e}for(;null!==(A=L());)switch(A){case"package":if(!k)throw F(A);V();break;case"import":if(!k)throw F(A);J();break;case"syntax":if(!k)throw F(A);z();break;case"option":Z(B,A),P(";");break;default:if(Y(B,A)){k=!1;continue}throw F(A)}return I.filename=null,{package:C,imports:S,weakImports:b,syntax:N,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 f(){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 p(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(p(this.buf,this.pos+=4),p(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 p(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|p(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 f.call(this)[t](!1)},uint64:function(){return f.call(this)[t](!0)},sint64:function(){return f.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 f(){}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===f;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]))&&p(r);if(s.weakImports)for(d=0;d<s.weakImports.length;++d)(r=c(s.weakImports[d])||o.resolvePath(e,s.weakImports[d]))&&p(r,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){u(e)}a||h||u(null,o)}function p(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 v,_=0;_<t.length;++_)(v=o.resolvePath("",t[_]))&&p(v);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,f)},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 p=/^[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)p.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]);p.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)p.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]);p.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,f=1,p=null,h=null,v=0,_=!1,E=!1,y=[],g=null;function m(e){return Error("illegal "+e+" (line "+f+")")}function O(t){return e.charAt(t)}function T(t,n,r){p=e.charAt(t++),v=f,_=!1,E=r;var a,c=t-(u?2:3);do{if(--c<0||"\n"===(a=e.charAt(c))){_=!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 C(){if(y.length>0)return y.shift();if(g)return function(){var t="'"===g?r:n;t.lastIndex=c-1;var o=t.exec(e);if(!o)throw m("string");return c=t.lastIndex,S(g),g=null,l(o[1])}();var o,i,s,p,h,v=0===c;do{if(c===d)return null;for(o=!1;a.test(s=O(c));)if("\n"===s&&(v=!0,++f),++c===d)return null;if("/"===O(c)){if(++c===d)throw m("comment");if("/"===O(c))if(u){if(p=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(p,c,v),f++,o=!0}else{for(h="/"===O(p=c+1);"\n"!==O(++c);)if(c===d)return null;++c,h&&T(p,c-1,v),++f,o=!0}else{if("*"!==(s=O(c)))return"/";p=c+1,h=u||"*"===O(p);do{if("\n"===s&&++f,++c===d)throw m("comment");i=s,s=O(c)}while("*"!==i||"/"!==s);++c,h&&T(p,c-2,v),o=!0}}}while(o);var _=c;if(t.lastIndex=0,!t.test(O(_++)))for(;_<d&&!t.test(O(_));)++_;var E=e.substring(c,c=_);return'"'!==E&&"'"!==E||(g=E),E}function S(e){y.push(e)}function b(){if(!y.length){var e=C();if(null===e)return null;S(e)}return y[0]}return Object.defineProperty({next:C,peek:b,push:S,skip:function(e,t){var n=b();if(n===e)return C(),!0;if(!t)throw m("token '"+n+"', '"+e+"' expected");return!1},cmnt:function(e){var t=null;return void 0===e?v===f-1&&(u||"*"===p||_)&&(t=E?h:null):(v<e&&b(),v!==e||_||!u&&"/"!==p||(t=E?null:h)),t}},"line",{get:function(){return f}})}d.unescape=l},7645:function(e,t,n){"use strict";e.exports=y;var r=n(9313);((y.prototype=Object.create(r.prototype)).constructor=y).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),f=n(9935),p=n(4928),h=n(5305),v=n(4497),_=n(3996),E=n(1667);function y(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 g(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(y.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=f.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=f.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=y.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,f.merge(e.prototype,t)),e.$type=e.prototype.$type=this,f.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:f.oneOfGetter(this._oneofsArray[n].oneof),set:f.oneOfSetter(this._oneofsArray[n].oneof)};n&&Object.defineProperties(e.prototype,r)}}}),y.generateConstructor=function(e){for(var t,n=f.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?n("this%s={}",f.safeProp(t.name)):t.repeated&&n("this%s=[]",f.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]]")},y.fromJSON=function(e,t){var n=new y(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?y.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},y.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return f.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])},y.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)},y.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},y.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),g(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),g(this)):r.prototype.add.call(this,e)},y.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),g(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),g(this)}return r.prototype.remove.call(this,e)},y.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},y.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},y.prototype.create=function(e){return new this.ctor(e)},y.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=p(this)({Writer:d,types:t,util:f}),this.decode=h(this)({Reader:l,types:t,util:f}),this.verify=v(this)({types:t,util:f}),this.fromObject=_.fromObject(this)({types:t,util:f}),this.toObject=_.toObject(this)({types:t,util:f});var r=E[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},y.prototype.encode=function(e,t){return this.setup().encode(e,t)},y.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},y.prototype.decode=function(e,t){return this.setup().decode(e,t)},y.prototype.decodeDelimited=function(e){return e instanceof l||(e=l.create(e)),this.decode(e,e.uint32())},y.prototype.verify=function(e){return this.setup().verify(e)},y.prototype.fromObject=function(e){return this.setup().fromObject(e)},y.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},y.d=function(e){return function(t){f.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 f=function(){return o.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d}};function p(e,t,n){t[n]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function v(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,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=f(),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(v,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(v,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(v,t.length(),t)},d.prototype.bool=function(e){return this._push(p,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(_,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=i.from(e);return this._push(_,4,t.lo)._push(_,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 E=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(p,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(E,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(p,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=f(),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=this.webpackChunkwebsdk=this.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 D},default:function(){return H}}),__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__(1532),__webpack_require__(9554),__webpack_require__(4747),__webpack_require__(7941),__webpack_require__(4812),__webpack_require__(3710),__webpack_require__(3843),__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__(4370),s=__webpack_require__(7360),a=__webpack_require__(6424),u=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 s.kg.debug("dispatch event: "+e,t||""),this.handlerData){var r=this.handlerData[n][e];r&&r(t)}},e}(),c=(__webpack_require__(2772),{biz:"",debug:!1,token:""}),l="https://data-reporting.agora.io/report",d="https://data-reporting.sh.agoralab.co/report",f=(__webpack_require__(6699),__webpack_require__(2023),__webpack_require__(2071)),p=__webpack_require__(1595),h=function(e){var t=Number(p.C8[e]);return t===p.C8.USER_LOGIN?"MANUALLOGIN":t===p.C8.MSYNC_SENDMESSAGE?"SENDMESSAGE":t>p.C8.UNKNOWOPERATION&&t<p.C8.REST_OPERATE?"REST":t>p.C8.REST_OPERATE&&t<p.C8.MSYNC_OPERATE?"MESSAGE":t>p.C8.MSYNC_OPERATE&&t<p.C8.ROSTER_OPERATE?"ROSTER":t>p.C8.ROSTER_OPERATE&&t<p.C8.USER_OPERATE?"USER":t>p.C8.USER_OPERATE&&t<p.C8.GROUP_OPERATE?"GROUP":t>p.C8.GROUP_OPERATE&&t<p.C8.CHATROOM_OPERATE?"CHATROOM":"OPERATION"},v=function(){return(new Date).getTime()},_=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)},E=function(){return e=1,t=99999,e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e;var e,t},y={},g=(__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}),m=1e3,O=function(){function e(e){this.eventQueue=[],this.stock=m,this.config=e,this.governor()}return e.prototype.add=function(e){this.stock<=0?console.warn("Event Report limit ".concat(m," 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=m}),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=g(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");y.global||(y=i.P6.getEnvInfo());var u=y;if(_(u)){var c={url:s?d:l,data:o,method:"POST",success:function(){null==a||a()},fail:function(){},complete:function(){}},f={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=f:c.header=f,"dd"===u.platform)return u.global.httpRequest(c);u.global.request(c)}else{var p=new XMLHttpRequest;p.onreadystatechange=function(){2===p.readyState&&(null==a||a())},p.open("POST",s?d:l),p.setRequestHeader("Content-Type","application/json"),p.setRequestHeader("token",e),p.setRequestHeader("appid",null!=r?r:""),p.setRequestHeader("sendts","".concat(Math.floor((new Date).getTime()/1e3))),p.setRequestHeader("biz",n),p.setRequestHeader("debug","".concat(s)),p.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}(),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=new(function(){function e(e){this.inited=!1,this.appId="",this.biz="",this.eventQueue={},this.config=c,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=T(T({},c),e),this.eventQueue=new O(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=T(T({},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}()),I=function(){return I=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},I.apply(this,arguments)},C={requestName:"",subrequestid:"1",requestMethod:"GET",requestUrl:"",requestElapse:0,code:0,codeDesc:"",isLastApi:0,isSuccess:1},S=function(){function e(e){this.platform=i.P6.getEnvInfo(),this.isReportDt=e.isReport||!1,this.isCollectDt=!0,_(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(E()),did:a,sdkVersion:s,os:f.Wc,sdkProduct:p.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){R.send(t.eventId,t.dt),n>=e.eventQueue.length-1&&(e.eventQueue=[])}))},e.prototype.init=function(t){e.instance||(e.instance=this,R.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=v(),a=e.uid,u=e.operationName;a&&(this.uid=a);var c={uid:this.uid,operationId:"opr_".concat(i.P6.getUniqueId(),"_").concat(E()),requestid:"req_".concat(i.P6.getUniqueId(),"_").concat(E()),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(E()),n=1),e.data.isLastApi){var _=v();e.data.requestElapse=_-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=v()-s),t.reportData.call(t,f.iB.API,I(I(I(I({},C),c),e.data),{accessChannel:t.accessChannel,operationType:h(u)})),e.isEndApi&&t.reportData.call(t,f.iB.API,I(I(I({},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:h(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=v(),r=0,e!==f.iB.API?[3,2]:[4,(h=this.platform,new Promise((function(e){var t;h.platform||(h=i.P6.getEnvInfo());var n="";if(h.platform===i.iw.WEB){var r=navigator.connection;(null==r?void 0:r.type)?(null==r||r.type,n=p.td.WIFI):(null==r?void 0:r.effectiveType)&&(n=p.td[r.effectiveType.toLocaleUpperCase()]),e(n)}else h.platform===i.iw.NODE?(n=p.td.UNKNOWN,e(n)):null===(t=h.global)||void 0===t||t.getNetworkType({success:function(t){n=p.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=I({lts:n,net:r,appkey:s,sdkServiceId:a,sdkProduct:u},t),this.isReportDt?R.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 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),N=__webpack_require__(5531),A=__webpack_require__(8161),M=__webpack_require__(7288);function w(e){return w="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},w(e)}var L=function(){return L=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},L.apply(this,arguments)},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())}))},x=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 P=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}},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}},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}},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}}}}}}}}}}),D=function(){function e(e){var t,n,r;if(this.name="miniCore",this.heartBeatWait=3e4,this.Message=o.Message,this.Code=N.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.url=null!==(t=e.url)&&void 0!==t?t:"",this.apiUrl=null!==(n=e.apiUrl)&&void 0!==n?n:"",this.isHttpDNS=!!e.isHttpDNS,this.appKey=e.appKey,this.root=P,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.unMSyncSendMsgMap=new Map,this.socketHost=[],this.reconnecting=!1,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.version="4.3.0.1",this.deviceId=e.deviceId||"webim",this.logOut=!0,this.osType=16,this.compressType=[0],this.encryptType=[0],this._msgHash={},this.closeInfo=null,this.context={jid:{appKey:"",clientResource:"",domain:"easemob.com",name:""},userId:"",appKey:"",status:0,restTokenData:"",appName:"",orgName:"",root:{},accessToken:""},this.mSync=this.usePlugin(a.Z),this.eventHandler=this.usePlugin(u),"string"!=typeof this.appKey||2!==this.appKey.split("#").length)throw Error("Illegal appKey: ".concat(this.appKey));var s=this.appKey.split("#");this.orgName=s[0],this.appName=s[1],this.dataReport=new S({appkey:this.appKey,org:this.orgName,sdkVersion:this.version,deviceId:this.deviceId,isReport:this.isReport})}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"===w(e)&&(t?(this[t]={},e.LocalCache&&(this._localCache=e.LocalCache,e=e.LocalCacheApi),Object.keys(e).forEach((function(r){n[t][r]=e[r].bind(n)}))):Object.assign(this,e))},e.prototype.isOpened=function(){return this.sock&&1===this.sock.readyState||!1},e.prototype.open=function(e){return U(this,void 0,void 0,(function(){var t=this;return x(this,(function(n){if(this.isOpened.call(this))throw b.Z.create({type:N.E.WEBIM_CONNCTION_OPEN_ERROR,message:"You are already logged in"});return[2,new Promise((function(n,r){t._open(L(L({},e),{promise:{resolve:n,reject:r}}))}))]}))}))},e.prototype._open=function(e,t){var n,r,o,s;return U(this,void 0,void 0,(function(){var a,u,c,l,d,f,h,v,_,E,y,g,m,O,T,R;return x(this,(function(I){switch(I.label){case 0:if(a=e.promise,this.setContext(e),!e.username||"string"!=typeof e.username)throw new Error("Invalid parameter username: ".concat(e.username));return u=this.dataReport.geOperateFun({uid:e.username,operationName:p.fI.LOGIN}),!this.isHttpDNS||t?[3,2]:[4,this.getDNS({rpt:u,isRetry:!!t})];case 1:I.sent(),I.label=2;case 2:return c=this.apiUrl+"/"+this.orgName+"/"+this.appName+"/token",e.agoraToken?(this.grantType="agoraToken",this.token=e.agoraToken,this.context.accessToken=e.agoraToken,this.context.restTokenData=e.agoraToken,this.user=e.username,null===(n=null==a?void 0:a.resolve)||void 0===n||n.call(a,{accessToken:e.agoraToken}),[3,6]):[3,3];case 3:return e.password?(l={headers:{"Content-type":"application/json"},url:c,dataType:"json",data:JSON.stringify({grant_type:"password",username:e.username,password:e.password,timestamp:+new Date})},[4,k(i.P6.ajax(l,p.fI.SDK_INTERNAL))]):[3,5];case 4:if(d=I.sent(),f=d[0],h=d[1],f)return v=b.Z.create({type:N.E.WEBIM_CONNCTION_OPEN_ERROR,message:f.error_description,data:f}),_=(null==f?void 0:f.extraInfo)||{},O=_.elapse,m=_.httpCode,E=_.errDesc,y={requestName:p.c.LOGIN_BY_PWD,requestElapse:O,requestUrl:c,isSuccess:0,code:m,codeDesc:E},u({isRetry:!1,data:y}),this.isHttpDNS&&this.restIndex+1<this.restTotal?(this.restIndex++,this.setRestUrl(),this._open(e,!0),[2]):(u({data:{isLastApi:1,isSuccess:0}}),this.clear(),delete f.extraInfo,null===(r=null==a?void 0:a.reject)||void 0===r||r.call(a,v),[2]);if(!h)throw new Error("get token fail.");return this.expiresIn=h.expires_in,this.grantType="password",this.token=h.access_token,this.user=e.username,this.context.accessToken=h.access_token,null===(o=null==a?void 0:a.resolve)||void 0===o||o.call(a,{accessToken:h.access_token,duration:h.expires_in}),h.extraInfo&&(g=h.extraInfo,m=g.httpCode,O=g.elapse,T={requestName:p.c.LOGIN_BY_PWD,requestElapse:O,requestUrl:c,isSuccess:1,code:m},u({isRetry:!1,data:T})),[3,6];case 5:if(!e.accessToken)throw new Error("Invalid parameter params: ".concat(e));this.grantType="accessToken",this.token=e.accessToken,this.context.accessToken=e.accessToken,this.context.restTokenData=e.accessToken,this.user=e.username,null===(s=null==a?void 0:a.resolve)||void 0===s||s.call(a,{accessToken:e.accessToken}),I.label=6;case 6:return(R=new WebSocket(this.url)).binaryType="arraybuffer",this.sock=R,this.initEventHandle(R,u),[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));var o=n.mSync.generateProvision();e.send(o)},e.onclose=function(e){var t,r,o,i,a,u,c,l,d,f,p,h;s.kg.debug("websocket onclose");var v=401===(null==e?void 0:e.code)||401===(null===(t=n.closeInfo)||void 0===t?void 0:t.code);if(n.logOut)n.clear(),null===(o=null===(r=null==n?void 0:n._localCache)||void 0===r?void 0:r.getInstance())||void 0===o||o.close(),null===(i=n.eventHandler)||void 0===i||i.dispatch("onDisconnected"),n.resetConnState(),v&&(s.kg.debug("websocket provision error"),n.closeInfo=null);else if(v){s.kg.debug("websocket provision error");var _={type:N.E.WEBIM_CONNECTION_ERROR,message:"provision error",data:e};n.closeInfo=null,null===(a=n.eventHandler)||void 0===a||a.dispatch("onError",_),null===(c=null===(u=null==n?void 0:n._localCache)||void 0===u?void 0:u.getInstance())||void 0===c||c.close(),n.onClosed&&n.onClosed(),null===(l=n.eventHandler)||void 0===l||l.dispatch("onDisconnected"),n.resetConnState()}else if(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}));else{var E={type:N.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};null===(d=n.unMSyncSendMsgMap)||void 0===d||d.clear(),n.rejectMessage(),null===(p=null===(f=null==n?void 0:n._localCache)||void 0===f?void 0:f.getInstance())||void 0===p||p.close(),null===(h=n.eventHandler)||void 0===h||h.dispatch("onDisconnected",E),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;if(s.kg.debug("websocket onerror"),!n.logOut&&3!==n.sock.readyState)if(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}));else{var c={type:N.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};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",c),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;this.logOut=!0,this.reconnecting=!1,this.context.status=N.E.STATUS_CLOSING,this.sock&&this.sock.close(),null===(e=this.unMSyncSendMsgMap)||void 0===e||e.clear(),this.stopHeartBeat(),this.rejectMessage(),this.context.status=N.E.STATUS_CLOSED,this._load_msg_cache=[],this._queues=[],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 U(this,void 0,void 0,(function(){var t,n,r,o,s,a,u,c,l,d,f,h,v,_;return x(this,(function(E){switch(E.label){case 0:return t=this.dataReport.geOperateFun({uid:e.username,operationName:p.fI.REGISTER}),this.isHttpDNS?[4,this.getDNS({rpt:t,isRetry:!1})]:[3,2];case 1:E.sent(),E.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,k(i.P6.ajax(s,p.fI.SDK_INTERNAL))];case 3:if(a=E.sent(),u=a[0],c=a[1],l={requestName:p.c.RESISTER,requestUrl:r},u){if(d=u.extraInfo||{},v=d.httpCode,_=d.elapse,f=d.errDesc,t({isRetry:!1,data:L(L({},{requestElapse:_,isSuccess:0,code:v,codeDesc:f}),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 h=c.extraInfo||{},v=h.httpCode,_=h.elapse,t({isEndApi:!0,isRetry:!1,data:L(L({},{requestElapse:_,isSuccess:1,code:v}),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.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,p.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};var t=this.appKey.split("#"),n=t[0],r=t[1];this.context.root=this.root,this.context.userId=e.username,this.context.appKey=this.appKey,this.context.appName=r,this.context.orgName=n},e.prototype.getDNS=function(e){return U(this,void 0,void 0,(function(){var t,n,r,o,a,u,c,l,d,f,h,v,_,E,y,g,m,O,T,R,I;return x(this,(function(C){switch(C.label){case 0:return t=e.rpt,n=e.isRetry,r=this.dnsArr[this.dnsIndex]+"/easemob/server.json",o={url:r,dataType:"json",type:"GET",data:{app_key:encodeURIComponent(this.appKey)}},[4,k(i.P6.ajax(o,p.fI.SDK_INTERNAL))];case 1:if(a=C.sent(),u=a[0],c=a[1],u){if(l=u.extraInfo||{},d=l.elapse,f=l.httpCode,h=l.errDesc,v={requestUrl:r,requestName:p.c.GET_DNS,isSuccess:0,code:f,codeDesc:h,requestElapse:d},t&&t({isRetry:n,data:v}),s.kg.debug("getHttpDNS fail: "+this.dnsIndex),this.dnsIndex++,this.dnsIndex<this.dnsTotal)return this.getDNS({rpt:t,isRetry:!0}),[2];throw new Error("get DNS config fail.")}if(!c)throw new Error("get DNS config fail.");return _=c.extraInfo||{},E=_.elapse,y=_.httpCode,g={requestUrl:r,requestName:p.c.GET_DNS,requestElapse:E,isSuccess:1,code:y},t&&t({isRetry:n,data:g}),m=c.rest.hosts,O=this.https?"https":"http",T=m.filter((function(e){if(e.protocol===O)return e})),this.restHosts=T,R=c["msync-wx"].hosts,I=R.filter((function(e){if(e.protocol===O)return e})),this.socketHost=I,"true"===(null==c?void 0:c.enableDataReport)?(this.dataReport.setIsCollectDt(!0),this.dataReport.setIsReportDt(!0)):(this.dataReport.setIsReportDt(!1),this.dataReport.setIsCollectDt(!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;s.kg.debug("offline"),null===(e=this.eventHandler)||void 0===e||e.dispatch("onOffline")},e.prototype.rejectMessage=function(){var e=this,t=Object.keys(this._msgHash);if(t.length>0){var n=b.Z.create({type:N.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:M.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;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 U(t,void 0,void 0,(function(){var t,r,a,u,c,d,f,p,h,v,_,E,y;return x(this,(function(g){switch(g.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,f=0,p=2;p<t.length-1;p++)p%2==1&&(f^=t[p]);if(h=t.subarray(t.length-1,t.length),s.kg.debug("checkResult:",f,h[0]===f),h[0]!==f)return[2,o({message:"File verification failed"})];if("cm"!==d)return[3,7];g.label=1;case 1:g.trys.push([1,5,,6]),v=[],_=function(){var e,n,o,i;return x(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=E.root.lookup("easemob.pb.Meta")).decode(n),[4,A.Z.call(E,o,0,!0,!0)];case 1:return i=s.sent(),v.push(i),[2]}}))},E=this,g.label=2;case 2:return a<t.length-1?[5,_()]:[3,4];case 3:return g.sent(),[3,2];case 4:return[2,e(v)];case 5:return y=g.sent(),o({message:"Parse file failed",data:y}),[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 f=new FileReader;f.readAsArrayBuffer(n),f.onerror=r,f.onload=a}},f=function(e){o({type:N.E.WEBIM_DOWNLOADFILE_ERROR,message:"Download failed, please try again",data:e})};l?c.global.downloadFile({url:n,success:d,fail:f}):i.P6.download.call(t,{url:n,headers:{Accept:"application/json"},onFileDownloadComplete:d,onFileDownloadError:f,secret:r,accessToken:t.context.accessToken})}))},e}(),k=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e,null]}))},H=D}(),__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()}(this,(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,{w:function(){return i}}),n(9601),n(2772);var r=n(7360),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)};function i(e){var t,n,i,s=e.id,a=e.payload,u=e.timestamp,c=e.to,l=a.bodies&&a.bodies.length>0?a.bodies[0]:{},d={},f={},p=a.type?a.type:c.indexOf("@conference.easemob.com")>-1?"groupChat":"singleChat";switch(p="chat"===p?"singleChat":p,l.type){case"txt":var h=null===(t=null==a?void 0:a.meta)||void 0===t?void 0:t.edit_msg;if(d={id:s,type:"txt",chatType:p,msg:l.msg||"",to:a.to||"",from:a.from,time:u,ext:a.ext},h){var v=h.edit_time,_=h.operator,E=h.count;d.modifiedInfo={operationTime:v,operatorId:_,operationCount:E}}break;case"img":d={id:s,type:"img",chatType:p,to:a.to,from:a.from,time:u,ext:a.ext,width:(null===(n=l.size)||void 0===n?void 0:n.width)||0,height:(null===(i=l.size)||void 0===i?void 0:i.height)||0,secret:l.secret||"",url:(null==l?void 0:l.url)||"",file_length:l.file_length||0,file:{}};break;case"video":d={id:s,type:"video",chatType:p,from:a.from,to:a.to,url:(null==l?void 0:l.url)||"",secret:l.secret||"",filename:l.filename,length:l.length||0,file:{},file_length:l.file_length||0,filetype:a.ext.file_type||"",ext:a.ext,time:u};break;case"loc":d={id:s,type:"loc",chatType:p,from:a.from,to:a.to,buildingName:l.buildingName||"",addr:l.addr,lat:l.lat,lng:l.lng,ext:a.ext,time:u};break;case"audio":d={id:s,type:"audio",chatType:p,from:a.from,to:a.to,secret:l.secret||"",ext:a.ext,time:u,url:(null==l?void 0:l.url)||"",file:{},filename:l.filename,length:l.length||0,file_length:l.file_length||0,filetype:a.ext.file_type||""};break;case"file":d={id:s,type:"file",chatType:p,from:a.from,to:a.to,ext:a.ext,time:u,url:(null==l?void 0:l.url)||"",secret:l.secret||"",file:{},filename:l.filename||"",file_length:l.file_length||0,filetype:a.ext.file_type||""};break;case"cmd":d={id:s,type:"cmd",chatType:p,from:a.from,to:a.to,ext:a.ext,time:u,action:l.action||""};break;case"custom":d={id:s,type:"custom",chatType:p,from:a.from,to:a.to,ext:a.ext,time:u,customEvent:l.customEvent||"",customExts:l.customExts||""};break;case"combine":d={id:s,type:"combine",chatType:p,msg:l.msg||"",to:a.to||"",from:a.from,time:u,ext:a.ext,title:l.title||"",summary:l.summary||"",url:(null==l?void 0:l.url)||"",compatibleText:l.text,combineLevel:l.combineLevel||0,secret:l.secret||"",filename:l.filename||"",file_length:l.file_length||0};break;default:r.kg.error("unexpected message: ".concat(e))}if(a.msgConfig&&(f.msgConfig=a.msgConfig),null==a?void 0:a.meta){var y=a.meta;y.thread&&(f.chatThread={messageId:y.thread.msg_parent_id,parentId:y.thread.muc_parent_id,chatThreadName:y.thread.thread_name}),y.reaction&&(f.reactions=y.reaction),y.translations&&(f.translations=y.translations)}return o(o({},d),f)}},2071:function(e,t,n){"use strict";n.d(t,{$x:function(){return s},F3:function(){return a},TJ:function(){return o},Tp:function(){return l},Wc:function(){return r},el:function(){return i},iB:function(){return u},yK:function(){return c}}),n(6992),n(1532),n(1539),n(8783),n(3948);var r=7,o=new Map,i="im",s="32f24ab2ddb74f508aa9286c356cec84",a=1e3,u={INIT:9674,API:9675},c="direct",l=-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_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_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_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.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.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.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"}(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"}(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,{g:function(){return w},Z:function(){return Ee}}),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(9714),n(5212),n(8309),n(2772),n(9653),n(7941),n(3843),n(1038),n(2564),n(9753),n(8264),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(561),n(3161),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 f(e,t){var n,r,o,i,s,a,u=this,c=this.context,f=c.userId,p=c.jid,h=t.from.name===f&&p.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",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",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),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;r.type=t.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",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="memberPresence",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 f=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(f).forEach((function(e){var t=d[e];if(t){var n=f[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),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),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 p=function(e){var t=this.root.lookup("easemob.pb.MUCBody").decode(e.payload),n=t.operation;c.kg.debug("onMucMessage",t),f.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)}},v=n(7252),_=function(e){var t,n,r,o,i,s,u=this.root.lookup("easemob.pb.StatisticsBody").decode(e.payload);switch(u.operation){case 0:this.onStatisticMessage&&this.onStatisticMessage(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onStatisticMessage",u);break;case 1:s=v.Z.create({type:a.E.WEBIM_CONNCTION_USER_REMOVED,message:"user has been removed"}),this.logOut=!0,this.onError&&this.onError(s),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",s);break;case 2:s=v.Z.create({type:a.E.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,message:"the user is already logged on another device"}),this.logOut=!0,this.onError&&this.onError(s),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",s);break;case 3:s=v.Z.create({type:a.E.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,message:"the user was kicked by changing password"}),this.logOut=!0,this.onError&&this.onError(s),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",s);break;case 4:s=v.Z.create({type:a.E.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,message:"the user was kicked by other device"}),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)}},E=(n(9720),n(4370)),y=n(4363);function g(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 m(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 O(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=(0,y.w)(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 T(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 R(e){var t,n=e.data,r={operation:"del"===n.op?"deleteConversation":"top"===n.op?"pinnedConversation":"unpinnedConversation",conversationId:n.id,conversationType:"chat"===n.type?"singleChat":"groupChat",timestamp:n.ts};this.clientResource!==n.res&&(null===(t=this.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",r))}var I=function(e){var t=E.P6.parseNotify(e.payload);switch(t.type){case"presence":g.call(this,t);break;case"reaction":m.call(this,t);break;case"thread":O.call(this,t);break;case"roaming_delete":T.call(this,t);break;case"conv":R.call(this,t);break;default:c.kg.error("unexpected notify type: ".concat(t.type))}},C=n(7288),S=n(9743),b=1,N=n(2071),A=n(1595);function M(e){return M="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},M(e)}var w,L=function(){return L=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},L.apply(this,arguments)},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())}))},x=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])}}},P=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"}(w||(w={}));var D=["txt","img","video","audio","file","loc","custom","cmd","combine"],k=E.P6.getEnvInfo();function H(){var e="webim",t="",n="",r=[],o=(new Date).valueOf();"webim"===this.deviceId?(n="random_"+o.toString(),e=this.deviceId+"_"+n,t=this.deviceId):e=t=n="webim_"+this.deviceId,this.context.jid&&(this.context.jid.clientResource=e);var i=this.root.lookup("easemob.pb.Provision"),s=i.decode(r);s.compressType=this.compressType,s.encryptType=this.encryptType,s.osType=this.osType,s.version=this.version,s.deviceName=t,s.resource=e,s.deviceUuid=n,s.authToken='{"token":"$t$'+this.token+'"}',s.actionVersion="v2.0",s=i.encode(s).finish();var a=this.root.lookup("easemob.pb.MSync"),u=a.decode(r);return u.version=this.version,u.guid=this.context.jid,u.auth="$t$"+this.token,u.command=3,u.deviceId=t,u.serviceId=this.dataReport.getServiceId(),u.encryptType=this.encryptType,u.payload=s,a.encode(u).finish()}function B(e,t){var n=this,r=E.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 G(e,t){switch(e.ns){case 0:_.call(this,e);break;case 1:u.Z.call(this,e,t);break;case 2:p.call(this,e);break;case 3:h.handleRosterMsg.call(this,e);break;case 4:this.registerConfrIQHandler&&this.registerConfrIQHandler(e,t,this);break;case 5:I.call(this,e);break;default:c.kg.error("distributeMeta",e)}}function F(e,t){for(var n=function(n){var o=new(s())(e[n].id.low,e[n].id.high,e[n].id.unsigned).toString();if(r._load_msg_cache.some((function(e){return e.msgId===o})))return"continue";var i=e[n].from.name,a=e[n].to?e[n].to.name:"",u=!!e[n].to&&-1!==e[n].to.domain.indexOf("conference");r._load_msg_cache.length<=r.max_cache_length||r._load_msg_cache.shift(),r._load_msg_cache.push({msgId:o,from:i,to:a,isGroup:u}),G.call(r,e[n],t)},r=this,o=0;o<e.length;o++)n(o)}function j(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)Z.call(this);else for(var r=0;r<t.unread.length;r++)c.kg.debug("pull unread message",t.unread),K.call(this,t.unread[r].queue);Z.call(this)}function W(){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 K(e){c.kg.debug("sendBackqueue");var t=q.call(this,e);_e.call(this,t)}function V(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 J(){var e;this.times=1,this.autoReconnectNumTotal=0,this.onOpened&&this.onOpened(),null===(e=this.eventHandler)||void 0===e||e.dispatch("onConnected"),X.call(this),Q.call(this),$.call(this),Z.call(this)}function z(e,t){c.kg.debug("sendLastSession");var n=V.call(this,e,t);_e.call(this,n)}function Y(e){var t,n,r,o,i,s,u,l,d,f,p,h,_=this,E=this.root.lookup("easemob.pb.Provision").decode(e.payload);if(this.context.jid&&(this.context.jid.clientResource=E.resource),this.clientResource=E.resource,0===E.status.errorCode){if(E.authToken){var y=JSON.parse(E.authToken).expires_in;if(!this.tokenExpiredTimer&&!this.tokenWillExpireTimer){var g=Date.now();this.expirationTime=y;var m=this.expirationTime-g;this.expiresIn=m<0?0:m,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())?J.call(this):this._localCache&&new this._localCache({user:this.user,dbName:"cache_".concat(Math.abs((0,S.un)(this.appKey)),"_").concat(this.user),version:b,onInit:function(){return U(_,void 0,void 0,(function(){return x(this,(function(e){return c.kg.debug("localCache init success"),J.call(this),[2]}))}))}}):J.call(this)}else{var O=void 0,T=E.status.reason;switch(c.kg.debug("provision reason: ",T),T){case"Sorry, the app day live count limit":O=v.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the daily active user limit for this app has been reached"}),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",O);break;case"Sorry, the app online count limit":O=v.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the maximum number limit of online users for this app has been reached"}),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",O);break;case"Sorry, the app month live count limit":O=v.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the monthly active user limit for this app has been reached"}),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",O);break;case"Sorry, user register limit":O=v.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, the number of user registrations limit has been reached"}),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",O);break;case"Sorry, user register rate limit":O=v.Z.create({type:a.E.MAX_LIMIT,message:"Sorry, user register rate limit"}),null===(s=this.eventHandler)||void 0===s||s.dispatch("onError",O);break;case"Sorry, invalid username":O=v.Z.create({type:a.E.REQUEST_PARAMETER_ERROR,message:"Invalid parameter"}),null===(u=this.eventHandler)||void 0===u||u.dispatch("onError",O);break;case"Sorry, who are you?":O=v.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(l=this.eventHandler)||void 0===l||l.dispatch("onError",O);break;case"service exception":O=v.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(d=this.eventHandler)||void 0===d||d.dispatch("onError",O);break;case"Msync service exception":O=v.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(f=this.eventHandler)||void 0===f||f.dispatch("onError",O);break;case"Thrift service exception":O=v.Z.create({type:a.E.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(p=this.eventHandler)||void 0===p||p.dispatch("onError",O);break;default:O=v.Z.create({type:a.E.SERVER_UNKNOWN_ERROR,message:T}),null===(h=this.eventHandler)||void 0===h||h.dispatch("onError",O)}}}function X(){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]);_e.call(this,o,n[r])}null===(t=this.unMSyncSendMsgMap)||void 0===t||t.clear()}}function Z(){var e=W.call(this);_e.call(this,e)}function $(){var e=te.call(this);_e.call(this,e)}function Q(){var e=this;ee.call(this),this.heartBeatID=setInterval((function(){$.call(e)}),this.heartBeatWait)}function ee(){clearInterval(this.heartBeatID)}function te(){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 ne(e,t){return e.some((function(e){return e.name===t.name}))}function re(e){var t=this,n=this.root.lookup("easemob.pb.CommNotice"),r=n.decode(e.payload),o=ne(this._queues,r.queue);c.kg.debug("receive notice",n,this._queues),o||this.clientResource===r.queue.clientResource&&r.queue.name===this.context.userId||(this.qTimer&&clearTimeout(this.qTimer),this.qTimer=setTimeout((function(){var e=r.queue;ne(t._queues,e)&&(K.call(t,e),c.kg.debug("⬇q:",e))}),1e4),this._queues.push(r.queue),1===this._queues.length&&K.call(this,r.queue))}function oe(e){if("string"==typeof e){var t=JSON.parse(e);if(Array.isArray(t)){var n=t[0],r=t[1];this.closeInfo={code:n,reason:r}}}}function ie(e){return U(this,void 0,void 0,(function(){var t,n,r,i,s,a,u,l;return x(this,(function(d){if(t=E.P6.getEnvInfo(),n=this.root.lookup("easemob.pb.MSync"),"miniCore"===this.name){try{e.data instanceof ArrayBuffer||(c.kg.debug("received message: ".concat(e.data)),oe.call(this,e.data)),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('[401,"normal closed"]'===e.data&&(c.kg.debug("received message: ".concat(e.data)),oe.call(this,e.data)),s=o().atob(e.data),a=[],u=0,l=s.length;u<l;++u)a.push(s.charCodeAt(u));return[2,n.decode(a)]}try{e.data instanceof ArrayBuffer||(c.kg.debug("received message: ".concat(e.data)),oe.call(this,e.data)),r=n.decode(e.data)}catch(e){throw new Error("decode message fail.")}return[2,r]}))}))}function se(e){var t=this;e.then((function(e){if(e)switch(e.command){case 0:ae.call(t,e);break;case 1:j.call(t,e);break;case 2:re.call(t,e);break;case 3:Y.call(t,e);break;default:c.kg.error("unexpected msync command: ".concat(e.command))}else c.kg.error("unexpected msync result: ".concat(e))}))}function ae(e){var t,n,r,o,i,l,d,f,p,h,_,y,g,m,O,T,R,I,S,b,M,w,P,D,k,H,B,G,j,W,q,V,J,Y,X,Z,$,Q,ee,te,ne,re,oe,ie,se;return U(this,void 0,void 0,(function(){var U,ae,ue,ce,le,de,fe,pe,he,ve,_e,Ee,ye,ge,me,Oe,Te,Re,Ie,Ce,Se,be,Ne,Ae,Me,we,Le,Ue,xe,Pe,De,ke,He,Be,Ge=this;return x(this,(function(x){switch(x.label){case 0:if(U=(U=this.root.lookup("easemob.pb.CommSyncDL")).decode(e.payload),ae=new(s())(U.serverId.low,U.serverId.high,U.serverId.unsigned).toString(),ue=new(s())(U.metaId.low,U.metaId.high,U.metaId.unsigned).toString(),!(Number(ue)>0))return[3,23];if(!U.status)return[3,22];if(0!==U.status.errorCode)return[3,21];if(null==(ce=this._msgHash[ue])?void 0:ce.isHandleChatroom){try{le="join"===(null===(t=this._msgHash[ue])||void 0===t?void 0:t.operation),(null===(n=this._msgHash[ue])||void 0===n?void 0:n.resolve)instanceof Function&&le&&this._msgHash[ue].resolve({type:0,data:{action:"apply",id:this._msgHash[ue].roomId,result:!0,user:this.context.userId}}),(null===(r=this._msgHash[ue])||void 0===r?void 0:r.success)instanceof Function&&le&&this._msgHash[ue].success({type:0,data:{action:"apply",id:this._msgHash[ue].roomId,result:!0,user:this.context.userId}}),(null===(o=this._msgHash[ue])||void 0===o?void 0:o.resolve)instanceof Function&&!le&&this._msgHash[ue].resolve({type:0,data:{result:!0}}),(null===(i=this._msgHash[ue])||void 0===i?void 0:i.success)instanceof Function&&!le&&this._msgHash[ue].success({type:0,data:{result:!0}})}catch(e){ke=v.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:e}),this.onError&&this.onError(ke),null===(l=this.eventHandler)||void 0===l||l.dispatch("onError",ke)}delete this._msgHash[ue]}return!ce||ce.isHandleChatroom?[3,20]:(de=null,fe="",pe=0,he=null,this._msgHash[ue].thirdMessage?(this._msgHash[ue].thirdMessage.id=U.serverId,this._msgHash[ue].thirdMessage.timestamp=U.timestamp,[4,u.Z.call(this,this._msgHash[ue].thirdMessage,U.status,!0,!0)]):[3,2]);case 1:he=x.sent(),x.label=2;case 2:if(0===U.metas.length)return[3,13];x.label=3;case 3:switch(x.trys.push([3,12,,13]),ve=U.metas[0],_e=U.status,ve.ns){case 1:return[3,4];case 5:return[3,9]}return[3,10];case 4:return this.useReplacedMessageContents?[4,u.Z.call(this,ve,_e,!0,!0)]:[3,8];case 5:return he=x.sent(),[4,null===(f=null===(d=this._localCache)||void 0===d?void 0:d.getInstance())||void 0===f?void 0:f.getMessageByServerMsgId(ue)];case 6:return(Ee=x.sent())?[4,null===(h=null===(p=this._localCache)||void 0===p?void 0:p.getInstance())||void 0===h?void 0:h.putMessageToDB(L(L(L({},Ee),he),{id:ue}))]:[3,8];case 7:x.sent(),x.label=8;case 8:return[3,11];case 9:return(ye=E.P6.parseNotify(U.metas[0].payload)).edit_msg&&(ge=ye.edit_msg,me=ge.count,Oe=ge.operator,Te=ge.edit_time,Re=ge.sender,Ie=ge.send_time,de={operationTime:Te,operatorId:Oe,operationCount:me},fe=Re,pe=Number(Ie)),[3,11];case 10:return c.kg.error("decode local meta error",ve),[3,11];case 11:return[3,13];case 12:return Ce=x.sent(),ke=v.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:"decode local meta message error",data:Ce}),this.onError&&this.onError(ke),null===(_=this.eventHandler)||void 0===_||_.dispatch("onError",ke),[3,13];case 13:N.TJ.has(ue)&&(N.TJ.get(ue).rpt({isEndApi:!0,data:{isSuccess:1,requestMethod:"WEBSOCKET",requestUrl:this.url,code:A.dd.success,msgId:ae}}),N.TJ.delete(ue)),x.label=14;case 14:return x.trys.push([14,18,,19]),Se={localMsgId:ue,serverMsgId:ae},de&&(this._msgHash[ue].modifiedInfo=de,be=this._msgHash[ue],Ne=be.editMessageId,Pe=be.type,Ae=be.chatType,Me=be.msg,we=be.to,Le=be.translations,Ue={id:Ne,type:Pe,chatType:Ae,msg:Me,modifiedInfo:de,to:we,from:fe,time:Number(pe)},Le&&(Ue.translations=Le),Se.message=Ue,null===(m=null===(g=null===(y=this._localCache)||void 0===y?void 0:y.getInstance())||void 0===g?void 0:g.getMessageByServerMsgId(Ne))||void 0===m||m.then((function(e){var t,n;e&&"txt"===e.type&&(null===(n=null===(t=Ge._localCache)||void 0===t?void 0:t.getInstance())||void 0===n||n.putMessageToDB(L(L({},e),{msg:Ue.msg,modifiedInfo:Ue.modifiedInfo,translations:Ue.translations})))}))),he&&(Se.message=he),[4,null===(T=null===(O=this._localCache)||void 0===O?void 0:O.getInstance())||void 0===T?void 0:T.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.SUCCESS})];case 15:return x.sent(),(null===(R=this._msgHash[ue])||void 0===R?void 0:R.success)instanceof Function?[4,this._msgHash[ue].success(ue,ae)]:[3,17];case 16:x.sent(),x.label=17;case 17:return(null===(I=this._msgHash[ue])||void 0===I?void 0:I.resolve)instanceof Function&&this._msgHash[ue].resolve(Se),[3,19];case 18:return xe=x.sent(),ke=v.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:xe}),this.onError&&this.onError(ke),null===(S=this.eventHandler)||void 0===S||S.dispatch("onError",ke),[3,19];case 19:this.onReceivedMessage&&this.onReceivedMessage({id:ue,mid:ae,to:this._msgHash[ue].to,time:0}),null===(b=this.eventHandler)||void 0===b||b.dispatch("onReceivedMessage",{id:ue,mid:ae,to:this._msgHash[ue].to}),delete this._msgHash[ue],x.label=20;case 20:return[3,22];case 21:if(15===U.status.errorCode)(null===(M=this._msgHash[ue])||void 0===M?void 0:M.fail)instanceof Function&&this._msgHash[ue].fail({type:a.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject({type:a.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),null===(P=null===(w=this._localCache)||void 0===w?void 0:w.getInstance())||void 0===P||P.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.FAIL});else if(1===U.status.errorCode){switch(Pe=void 0,U.status.reason){case"blocked":Pe=a.E.PERMISSION_DENIED;break;case"group not found":Pe=a.E.GROUP_NOT_EXIST;break;case"not in group or chatroom":Pe=a.E.GROUP_NOT_JOINED;break;case"exceed recall time limit":Pe=a.E.MESSAGE_RECALL_TIME_LIMIT;break;case"message recall disabled":Pe=a.E.SERVICE_NOT_ENABLED;break;case"not in group or chatroom white list":Pe=a.E.SERVICE_NOT_ALLOW_MESSAGING;break;case"nonroster":Pe=a.E.USER_NOT_FRIEND,U.status.reason="not contact";break;case"group is disabled":Pe=a.E.GROUP_IS_DISABLED,U.status.reason="group is disabled";break;case"limit directed users":Pe=a.E.MAX_LIMIT;break;case"Sorry, edit limit reached":Pe=a.E.MAX_LIMIT,U.status.reason="Modify message limit reached";break;case"Sorry, message does not exist":Pe=a.E.MODIFY_MESSAGE_NOT_EXIST,U.status.reason="The message does not exist.";break;case"Sorry, You do not have permission":Pe=a.E.PERMISSION_DENIED,U.status.reason="You do not have the modified permission.";break;case"Sorry, format is incorrect":Pe=a.E.MODIFY_MESSAGE_FORMAT_ERROR,U.status.reason="The modify messaged format error.";break;case"Sorry, edit is not available":Pe=a.E.SERVICE_NOT_ENABLED,U.status.reason="The message modify function is not activated.";break;case"Sorry, edit fail":Pe=a.E.MODIFY_MESSAGE_FAILED,U.status.reason="Modify message failed.";break;default:U.status.reason.includes("grpID")&&U.status.reason.includes("does not exist!")?(Pe=a.E.CHATROOM_NOT_EXIST,U.status.reason="The chat room dose not exist."):U.status.reason.includes("username")&&U.status.reason.includes("doesn't exist!")?Pe=a.E.USER_NOT_FOUND:"group member list is full!"===U.status.reason?Pe=a.E.CHATROOM_MEMBERS_FULL:U.status.reason.includes("can not join this group")&&U.status.reason.includes("is in the blacklist")?(Pe=a.E.PERMISSION_DENIED,U.status.reason="permission denied"):"can not operate this group, reason: group is disabled"===U.status.reason?Pe=a.E.GROUP_IS_DISABLED:U.status.reason.includes("moderation")?Pe=a.E.MESSAGE_MODERATION_BLOCKED:U.status.reason.includes("group ID illegal, please check it")?(Pe=a.E.REQUEST_PARAMETER_ERROR,U.status.reason="Invalid parameter"):Pe=U.status.reason.includes("has create too many chatrooms")||U.status.reason.includes("has joined too many chatrooms")?a.E.MAX_LIMIT:U.status.reason.includes("auto create failed")?a.E.SERVER_BUSY:a.E.SERVER_UNKNOWN_ERROR}this._msgHash[ue]&&((null===(D=this._msgHash[ue])||void 0===D?void 0:D.isHandleChatroom)?(De=v.Z.create({type:Pe,message:U.status.reason||"",data:""}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject(De),this._msgHash[ue].error instanceof Function&&this._msgHash[ue].error(De)):(De=v.Z.create({type:Pe,message:U.status.reason||"",data:{id:ue,mid:ae}}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject(De),this._msgHash[ue].fail instanceof Function&&this._msgHash[ue].fail({type:Pe,reason:U.status.reason?U.status.reason:"",data:{id:ue,mid:ae}}),null===(H=null===(k=this._localCache)||void 0===k?void 0:k.getInstance())||void 0===H||H.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.FAIL})),delete this._msgHash[ue])}else if(7===U.status.errorCode)"sensitive words"===U.status.reason&&this._msgHash[ue]?(De=v.Z.create({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"sensitive words",data:{id:ue,mid:ae}}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject(De),this._msgHash[ue].fail instanceof Function&&this._msgHash[ue].fail({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:ue,mid:ae,reason:"sensitive words"}}),null===(G=null===(B=this._localCache)||void 0===B?void 0:B.getInstance())||void 0===G||G.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.FAIL})):"blocked by mod_antispam"===U.status.reason&&this._msgHash[ue]?(De=v.Z.create({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"blocked by mod_antispam",data:{id:ue,mid:ae}}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject(De),this._msgHash[ue].fail instanceof Function&&this._msgHash[ue].fail({type:a.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:ue,mid:ae,reason:"blocked by mod_antispam"}}),null===(W=null===(j=this._localCache)||void 0===j?void 0:j.getInstance())||void 0===W||W.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.FAIL})):"user is mute"===U.status.reason&&this._msgHash[ue]?(De=v.Z.create({type:a.E.USER_MUTED_BY_ADMIN,message:"user is mute",data:{id:ue,mid:ae}}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject(De),this._msgHash[ue].fail instanceof Function&&this._msgHash[ue].fail(De),null===(V=null===(q=this._localCache)||void 0===q?void 0:q.getInstance())||void 0===V||V.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.FAIL})):"traffic limit"===U.status.reason&&this._msgHash[ue]?(De=v.Z.create({type:a.E.MESSAGE_CURRENT_LIMITING,message:"traffic limit",data:{id:ue,mid:ae}}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject(De),this._msgHash[ue].fail instanceof Function&&this._msgHash[ue].fail(De),null===(Y=null===(J=this._localCache)||void 0===J?void 0:J.getInstance())||void 0===Y||Y.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.FAIL})):"Sorry, data is too large"===U.status.reason&&this._msgHash[ue]&&(De=v.Z.create({type:a.E.MESSAGE_SIZE_LIMIT,message:"Sorry, data is too large",data:{id:ue,mid:ae}}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject(De),this._msgHash[ue].fail instanceof Function&&this._msgHash[ue].fail(De),null===(Z=null===(X=this._localCache)||void 0===X?void 0:X.getInstance())||void 0===Z||Z.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.FAIL}));else if(19===U.status.errorCode)this._msgHash[ue]&&(N.TJ.has(ue)&&(N.TJ.get(ue).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,codeDesc:U.status.reason||"",msgId:ae}}),N.TJ.delete(ue)),De=v.Z.create({type:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,message:U.status.reason||"",data:{id:ue,mid:ae}}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject(De),this._msgHash[ue].fail instanceof Function&&this._msgHash[ue].fail({type:a.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,data:{id:ue,mid:ae,reason:U.status.reason}}),null===(Q=null===($=this._localCache)||void 0===$?void 0:$.getInstance())||void 0===Q||Q.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.FAIL}));else if(this._msgHash[ue]){N.TJ.has(ue)&&(N.TJ.get(ue).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.WEBIM_LOAD_MSG_ERROR,codeDesc:(null===(ee=U.status)||void 0===ee?void 0:ee.reason)||"",msgId:ae}}),N.TJ.delete(ue));try{De=v.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:(null===(te=U.status)||void 0===te?void 0:te.reason)||"",data:{id:ue,mid:ae,reason:U.status&&U.status.reason}}),this._msgHash[ue].reject instanceof Function&&this._msgHash[ue].reject(De),null===(re=null===(ne=this._localCache)||void 0===ne?void 0:ne.getInstance())||void 0===re||re.updateLocalMessage(ue,{serverMsgId:ae,status:C.r.FAIL}),this._msgHash[ue].fail instanceof Function&&this._msgHash[ue].fail({type:a.E.WEBIM_LOAD_MSG_ERROR,data:{errorCode:U.status&&U.status.errorCode,reason:U.status&&U.status.reason}})}catch(e){ke=v.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing fail function error",data:e}),this.onError&&this.onError(ke),null===(oe=this.eventHandler)||void 0===oe||oe.dispatch("onError",ke)}delete this._msgHash[ue]}else N.TJ.has(ue)&&(N.TJ.get(ue).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,codeDesc:"on message error",msgId:ae}}),N.TJ.delete(ue)),ke=v.Z.create({type:a.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"on message error"}),this.onError&&this.onError(ke),null===(ie=this.eventHandler)||void 0===ie||ie.dispatch("onError",ke);x.label=22;case 22:return[2];case 23:if(0!==U.metas.length)try{F.call(this,U.metas,U.status)}catch(e){ke=v.Z.create({type:a.E.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e}),this.onError&&this.onError(ke),null===(se=this.eventHandler)||void 0===se||se.dispatch("onError",ke)}finally{U.isLast?(He=-1,this._queues.some((function(e,t){return e.name===U.name&&(He=t,!0)}))&&He>0&&this._queues.splice(He,1),this._queues.length>0&&(K.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer))):z.call(this,U.nextKey,U.queue)}else U.isLast&&(Be=-1,this._queues.some((function(e,t){return e.name===U.queue.name&&(Be=t,!0)}))&&this._queues.splice(Be,1),this._queues.length>0&&(K.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer)));return[2]}}))}))}function ue(e){var t=[],n=this.root.lookup("easemob.pb.KeyValue"),r=[];for(var o in e){var i=n.decode(t);i.key=o,void 0!==e[o]&&("object"===M(e[o])?(i.type=8,i.stringValue=JSON.stringify(e[o])):"string"==typeof e[o]?(i.type=7,i.stringValue=e[o]):"boolean"==typeof e[o]?(i.type=1,i.varintValue=!0===e[o]?1:0):Number.isInteger(e[o])?(i.type=2,i.varintValue=e[o]):(i.type=6,i.doubleValue=e[o]),r.push(i))}return r}function ce(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.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):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"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=ue.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 l=[];e.ext&&(l=ue.call(this,e.ext));var d=this.root.lookup("easemob.pb.MessageBody"),f=d.decode(o),p=e.from||this.context.jid.name;f.from={name:e.isBuildCombinedMsg?p:this.context.jid.name},f.to={name:e.to},"channel"===e.type?f.type=w.CHANNEL_ACK:"recall"===e.type?(f.type=w.RECALL,f.ackMessageId=e.ackId):"delivery"===e.type?(f.type=w.DELIVER_ACK,f.ackMessageId=e.ackId):"read"===e.type?(f.type=w.READ_ACK,f.ackMessageId=e.ackId,"groupChat"===i&&(f.msgConfig={allowGroupAck:!0},f.ackContent=e.ackContent)):"chatRoom"===i?f.type=w.CHATROOM:"groupChat"===i?(f.type=w.GROUPCHAT,e.msgConfig&&(f.msgConfig={allowGroupAck:!0})):"singleChat"===i&&(f.type=w.SINGLECHAT),e.editMessageId&&(f.type=w.EDIT,f.editMessageId=e.editMessageId),f.contents=[u],f.ext=l;var h=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);h&&(f.meta=h),f=d.encode(f).finish();var v=this.root.lookup("easemob.pb.Meta"),_=v.decode(o);_.id=e.id;var E="easemob.com";if("chatRoom"!==i&&"groupChat"!==i||(E="conference.easemob.com"),_.to={appKey:this.appKey,name:e.to,domain:E},"chatRoom"===i&&(_.ext=ue.call(this,function(e){return{chatroom_msg_tag:"high"===e.priority?0:"low"===e.priority?2:1}}(e))),_.ns=1,_.payload=f,_.routetype=e.deliverOnlineOnly?1:0,"singleChat"!==i&&Array.isArray(e.receiverList)&&(null===(r=e.receiverList)||void 0===r?void 0:r.length)>0&&(_.directedUsers=e.receiverList,_.routetype=2,c.kg.debug("receiverList:",e.receiverList,"thirdMessage",_)),e.isBuildCombinedMsg)return _.timestamp=s().fromValue(e.time),v.encode(_).finish();var y=this.root.lookup("easemob.pb.CommSyncUL"),g=y.decode(o);g.meta=_,de.call(this,e,_),g=y.encode(g).finish();var m=this.root.lookup("easemob.pb.MSync"),O=m.decode(o);return O.version=this.version,O.encryptType=this.encryptType,O.command=0,O.payload=g,m.encode(O).finish()}e.fail&&e.fail({type:a.E.WEBIM_CONNCTION_CLIENT_OFFLINE,message:"Not logged in"})}function le(e){var t,n,r=this,o=L({},e);if(e.file)return o.accessToken=this.token,o.appKey=this.appKey,o.apiUrl=this.apiUrl,o.body&&o.body.url?ce.call(this,o):new Promise((function(t,n){var i=o.onFileUploadComplete;o.onFileUploadComplete=function(t){var n,s,a,u;if(t.entities[0]["file-metadata"]){var c=t.entities[0]["file-metadata"]["content-length"];o.file_length=c,o.filetype=t.entities[0]["file-metadata"]["content-type"],c>204800&&(o.thumbnail=!0)}o.body={type:o.type||"file",secret:t.entities[0]["share-secret"],filename:o.file.filename||o.filename,url:(r.isHttpDNS?r.apiUrl+t.uri.substr(t.uri.indexOf("/",9)):t.uri)+"/"+t.entities[0].uuid,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"];var l=(r.isHttpDNS?r.apiUrl+t.uri.substr(t.uri.indexOf("/",9)):t.uri)+"/"+t.entities[0].uuid;e.url=l,t.url=l,"img"===o.type&&(e.thumb="".concat(l,"?thumbnail=true"),t.thumb="".concat(l,"?thumbnail=true")),i instanceof Function&&i(t,o.id);var d=ce.call(r,o);N.TJ.size<=N.F3&&N.TJ.set(o.id,{rpt:r.dataReport.geOperateFun({operationName:A.fI.SEND_MSG})}),null===(u=null===(a=r._localCache)||void 0===a?void 0:a.getInstance())||void 0===u||u.storeMessage(e,C.r.INPROGRESS),_e.call(r,d)},E.P6.uploadFile.call(r,o,A.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,f;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 p=P([],e.messageList,!0),h=0;if(p.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 v=fe.call(r,p),_=function(t,n){var s,a,u,c,l,d,f=(r.isHttpDNS?r.apiUrl+t.uri.substr(t.uri.indexOf("/",9)):t.uri)+"/"+t.entities[0].uuid,p=null===(s=t.entities[0])||void 0===s?void 0:s["share-secret"],h=f+"?em-redirect=true";p&&(h="".concat(h,"&share-secret=").concat(p)),i instanceof Function&&i({url:h,secret:p}),e.url=h,e.secret=p,o.url=f,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,C.r.INPROGRESS);var v=ce.call(r,o);_e.call(r,v)},y=E.P6.getEnvInfo();if("web"!==y.platform&&"node"!==y.platform&&"quick_app"!==y.platform&&(null===(f=null===(d=y.global)||void 0===d?void 0:d.canIUse)||void 0===f?void 0:f.call(d,"getFileSystemManager"))){var g=y.global.getFileSystemManager(),m=r.apiUrl+"/"+r.orgName+"/"+r.appName+"/chatfiles";g.writeFile({filePath:"".concat(y.global.env.USER_DATA_PATH,"/combine"),data:v.buffer,encoding:"binary",success:function(e){y.global.uploadFile({url:m,filePath:"".concat(y.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);_(t,{fileName:"combine",fileLength:v.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([v],"combine",{type:"application/octet-stream"}),T={url:URL.createObjectURL(O),filename:o.id,data:O};o.file=T,o.onFileUploadComplete=function(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})},E.P6.uploadFile.call(r,o,A.fI.UPLOAD_MSG_ATTACH)}}))}"img"===e.type&&(o.body||(o.body=L(L({},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,C.r.INPROGRESS);var u=ce.call(this,o);_e.call(this,u)}function de(e,t){e.editMessageId||D.includes(e.type)&&(this._msgHash[e.id].thirdMessage=t)}function fe(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=L(L({},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),f=0;for(n=2;n<t.length;n++)n%2==1&&(f^=t[n]);return d.set(t),c.kg.debug("checkResult:",f),d[t.length]=f,d}function pe(e,t,n){var r=[],o=this.root.lookup("easemob.pb.MUCBody"),i=o.decode(r);i.mucId={appKey:this.appKey,name:e,domain:"conference.easemob.com"},i.operation="join"===n?2:3,i.from={name:this.context.userId},i.isChatroom=!0,i=o.encode(i).finish();var s=this.root.lookup("easemob.pb.Meta").decode(r);s.id=t,s.from={appKey:this.appKey,name:this.context.userId,domain:"easemob.com",client_resource:this.context.jid.clientResource},s.to={domain:"easemob.com"},s.ns=2,s.payload=i;var a=this.root.lookup("easemob.pb.CommSyncUL"),u=a.decode(r);u.meta=s,u=a.encode(u).finish();var c=this.root.lookup("easemob.pb.MSync"),l=c.decode(r);return l.version=this.version,l.encryptType=this.encryptType,l.command=0,l.payload=u,c.encode(l).finish()}function he(e,t){var n=E.P6.getUniqueId(),r=pe.call(this,e.roomId,n,t);return _e.call(this,L(L({},e),{isHandleChatroom:!0,joinMsg:r,id:n,operation:t}),n)}function ve(e){var t=this;return new Promise((function(n,r){var o,i,s,u,c,l;if(t.logOut)return 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 d="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,h="recall"===e.type,v=null==e?void 0:e.editMessageId,_=!(f||h||p||v);if(e.id){if(!d&&!f||d&&t.useOwnUploadFun){var E="recall"===e.type?A.fI.SEND_RECALL_MSG:A.fI.SEND_MSG;v&&(E=A.fI.MODIFY_MESSAGE),N.TJ.size<=N.F3&&N.TJ.set(e.id,{rpt:t.dataReport.geOperateFun({operationName:E})})}_&&(null===(i=null===(o=t._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.storeMessage(e,C.r.CREATE)),t._msgHash[e.id]=L(L({},e),{resolve:n,reject:r})}if(d||"combine"===e.type)return le.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,C.r.INPROGRESS);var a=ce.call(t,e);_e.call(t,a,e.id)})).catch((function(e){r(e)}))}else{_&&(null===(l=null===(c=t._localCache)||void 0===c?void 0:c.getInstance())||void 0===l||l.storeMessage(e,C.r.INPROGRESS));var g=ce.call(t,e);_e.call(t,g,e.id)}}))}function _e(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"};return Promise.reject(i)}return new Promise((function(n,r){var i;o._msgHash[e.id]=L(L({},e),{resolve:n,reject:r}),i="miniCore"===o.name?e.joinMsg:B.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&&(this.autoReconnectNumTotal<=this.socketHost.length&&this.isHttpDNS||!this.isHttpDNS)&&(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:B.call(this,e,t),this.sock.send(r)}var Ee=function(e,t){return e.send=ve,e.sendMsg=ve,c.kg.debug("init Msync by ".concat(e.name)),{generateProvision:H.bind(e),base64transform:B.bind(e),distributeMeta:G.bind(e),decodeMeta:F.bind(e),decodeUnreadDL:j.bind(e),_rebuild:W.bind(e),_lastsession:V.bind(e),receiveProvision:Y.bind(e),isInQueue:ne.bind(e),decodeNotice:re.bind(e),decodeMSync:ie.bind(e),distributeMSync:se.bind(e),encodeChatMsg:ce.bind(e),upLoadFile:le.bind(e),send:ve.bind(e),stopHeartBeat:ee.bind(e),handleChatRoom:he.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(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(9554),n(4747),n(8309),n(2772),n(2222);var r=n(3720),o=n.n(r),i=n(4363),s=n(4370),a=n(6424),u=n(9743),c=n(7360),l=n(2449),d=n(7288),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)},p=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])}}},v={0:"TEXT",1:"IMAGE",2:"VIDEO",3:"LOCATION",4:"VOICE",5:"FILE",6:"COMMAND",7:"CUSTOM",8:"COMBINE"};function _(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 E(e){var t,n,r,o,s,u,l,f,E,y,g,m,O,T,R,I,C,S,b,N,A,M,w,L,U,x,P;return p(this,void 0,void 0,(function(){var p,D,k,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,fe,pe,he,ve,_e,Ee,ye,ge,me,Oe,Te,Re,Ie,Ce,Se,be,Ne,Ae,Me,we,Le;return h(this,(function(h){switch(h.label){case 0:switch(p=e.status,D=e.thirdMessage,k=e.msgBody,H=e.msgId,B=e.type,G=e.from,F=e.to,j=e.time,W=e.onlineState,q=e.chatType,K=e.ignoreCallback,V=e.priority,J=e.format,z=e.broadcast,Y=void 0!==z&&z,X=e.isContentReplaced,Z=void 0!==X&&X,$={},Q={},ee=p.errorCode>0,te=p.errorCode,ne=p.reason,re={},oe=[],ie=[],se={},ae="",ue=0,ce=null,le=null,D.ext&&(re=_(D.ext)),D.meta&&"string"==typeof D.meta&&((fe=JSON.parse(D.meta)).reaction&&(oe=fe.reaction).forEach((function(e){e.isAddedBySelf=e.state,delete e.state})),fe.translations&&(ie=fe.translations),fe.edit_msg&&(pe=fe.edit_msg,he=pe.count,ve=pe.operator,_e=pe.edit_time,Ee=pe.sender,ye=pe.send_time,se={operationTime:_e,operatorId:ve,operationCount:he},ae=Ee,ue=ye),fe.thread&&"{}"!==JSON.stringify(fe.thread)&&(ce={messageId:fe.thread.msg_parent_id,parentId:fe.thread.muc_parent_id,chatThreadName:fe.thread.thread_name}),fe.thread_overview&&"{}"!==JSON.stringify(fe.thread_overview)&&(le={id:fe.thread_overview.id,parentId:fe.thread_overview.muc_parent_id,name:fe.thread_overview.name,lastMessage:fe.thread_overview.last_message&&"{}"!==JSON.stringify(fe.thread_overview.last_message)?(0,i.w)(fe.thread_overview.last_message):null,createTimestamp:fe.thread_overview.create_timestamp,updateTimestamp:fe.thread_overview.update_timestamp,messageCount:fe.thread_overview.message_count||0})),k.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(k,"subType")&&0===k.subType?(de=(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&(de="".concat(de,"&share-secret=").concat(k.secretKey)),ge={id:H,type:"combine",chatType:q,to:F,from:G,ext:re,time:Number(j),onlineState:W,title:k.title||"",summary:k.summary||"",url:de||"",secret:k.secretKey||"",file_length:k.fileLength||0,filename:k.displayName||"",compatibleText:k.text,combineLevel:k.combineLevel||0},$.msgConfig&&(ge.msgConfig=$.msgConfig),oe.length>0&&(ge.reactions=oe),ce&&(ge.chatThread=ce),le&&(ge.chatThreadOverview=le),"chatRoom"===q&&(ge.priority=V,ge.broadcast=Y),Z&&(ge.isContentReplaced=Z),Q=ge,K?[3,3]:[4,null===(n=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===n?void 0:n.storeMessage(ge,d.r.SUCCESS)]):[3,4];case 2:h.sent(),null===(r=this.eventHandler)||void 0===r||r.dispatch("onCombineMessage",ge),h.label=3;case 3:return[3,28];case 4:return!($={id:H,type:B,contentsType:v[k.type],from:G,to:F,data:k.text,ext:re,sourceMsg:k.text,time:j,msgConfig:D.msgConfig,onlineState:W}).msgConfig&&delete D.msgConfig,$.error=ee,$.errorText=ne,$.errorCode=te,!K&&this.onTextMessage&&this.onTextMessage($),me={id:H,type:"txt",chatType:q,msg:k.text,to:F,from:G,ext:re,time:Number(j),onlineState:W},$.msgConfig&&(me.msgConfig=$.msgConfig),oe.length>0&&(me.reactions=oe),ce&&(me.chatThread=ce),le&&(me.chatThreadOverview=le),ie.length>0&&(me.translations=ie),se.operationCount>0&&(me.modifiedInfo=se,D.type===a.g.EDIT&&(me.from=ae,me.time=ue)),"chatRoom"===q&&(me.priority=V,me.broadcast=Y),Z&&(me.isContentReplaced=Z),Q=me,K?[3,6]:[4,null===(s=null===(o=this._localCache)||void 0===o?void 0:o.getInstance())||void 0===s?void 0:s.storeMessage(me,d.r.SUCCESS)];case 5:h.sent(),null===(u=this.eventHandler)||void 0===u||u.dispatch("onTextMessage",me),h.label=6;case 6:return[3,28];case 7:return Oe=(null===(l=null==k?void 0:k.size)||void 0===l?void 0:l.width)||0,Te=(null===(f=null==k?void 0:k.size)||void 0===f?void 0:f.height)||0,de=this.useOwnUploadFun?k.remotePath:(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&!this.useOwnUploadFun&&(de="".concat(de,"&share-secret=").concat(k.secretKey)),!($={id:H,type:B,contentsType:v[k.type],from:G,to:F,url:de,secret:k.secretKey,filename:k.displayName,thumb:this.useOwnUploadFun?"":"".concat(de,"&thumbnail=true"),thumb_secret:k.secretKey,file_length:k.fileLength||"",width:Oe,height:Te,filetype:k.filetype||"",accessToken:this.token,ext:re,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete $.delay,!$.msgConfig&&delete D.msgConfig,$.error=ee,$.errorText=ne,$.errorCode=te,!K&&this.onPictureMessage&&this.onPictureMessage($),Re={id:H,type:"img",chatType:q,from:G,to:F,url:de||"",width:Oe,height:Te,secret:k.secretKey||"",thumb:this.useOwnUploadFun?"":"".concat(de,"&thumbnail=true"),thumb_secret:k.secretKey,file_length:k.fileLength||0,ext:re,time:Number(j),onlineState:W},$.msgConfig&&(Re.msgConfig=$.msgConfig),oe.length>0&&(Re.reactions=oe),ce&&(Re.chatThread=ce),le&&(Re.chatThreadOverview=le),"chatRoom"===q&&(Re.priority=V,Re.broadcast=Y),Z&&(Re.isContentReplaced=Z),Q=Re,K?[3,9]:[4,null===(y=null===(E=this._localCache)||void 0===E?void 0:E.getInstance())||void 0===y?void 0:y.storeMessage(Re,d.r.SUCCESS)];case 8:h.sent(),null===(g=this.eventHandler)||void 0===g||g.dispatch("onImageMessage",Re),h.label=9;case 9:return[3,28];case 10:return de=this.useOwnUploadFun?k.remotePath:(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&!this.useOwnUploadFun&&(de="".concat(de,"&share-secret=").concat(k.secretKey)),!($={id:H,type:B,contentsType:v[k.type],from:G,to:F,url:de,secret:k.secretKey,filename:k.displayName,length:k.duration||"",file_length:k.fileLength||"",filetype:k.filetype||"",accessToken:this.token||"",ext:re,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete $.delay,!$.msgConfig&&delete D.msgConfig,$.error=ee,$.errorText=ne,$.errorCode=te,!K&&this.onVideoMessage&&this.onVideoMessage($),Ie={id:H,type:"video",chatType:q,from:G,to:F,url:de,secret:k.secretKey,filename:k.displayName,length:k.duration||0,file:{},file_length:k.fileLength||0,filetype:k.filetype||"",accessToken:this.token||"",ext:re,time:Number(j),onlineState:W},$.msgConfig&&(Ie.msgConfig=$.msgConfig),oe.length>0&&(Ie.reactions=oe),ce&&(Ie.chatThread=ce),le&&(Ie.chatThreadOverview=le),"chatRoom"===q&&(Ie.priority=V,Ie.broadcast=Y),Z&&(Ie.isContentReplaced=Z),Q=Ie,K?[3,12]:[4,null===(O=null===(m=this._localCache)||void 0===m?void 0:m.getInstance())||void 0===O?void 0:O.storeMessage(Ie,d.r.SUCCESS)];case 11:h.sent(),null===(T=this.eventHandler)||void 0===T||T.dispatch("onVideoMessage",Ie),h.label=12;case 12:return[3,28];case 13:return!($={id:H,type:B,contentsType:v[k.type],from:G,to:F,addr:k.address,buildingName:k.buildingName,lat:k.latitude,lng:k.longitude,ext:re,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete $.delay,!$.msgConfig&&delete D.msgConfig,$.error=ee,$.errorText=ne,$.errorCode=te,!K&&this.onLocationMessage&&this.onLocationMessage($),Ce={id:H,type:"loc",chatType:q,from:G,to:F,buildingName:k.buildingName,addr:k.address,lat:k.latitude,lng:k.longitude,ext:re,time:Number(j),onlineState:W},$.msgConfig&&(Ce.msgConfig=$.msgConfig),oe.length>0&&(Ce.reactions=oe),ce&&(Ce.chatThread=ce),le&&(Ce.chatThreadOverview=le),"chatRoom"===q&&(Ce.priority=V,Ce.broadcast=Y),Z&&(Ce.isContentReplaced=Z),Q=Ce,K?[3,15]:[4,null===(I=null===(R=this._localCache)||void 0===R?void 0:R.getInstance())||void 0===I?void 0:I.storeMessage(Ce,d.r.SUCCESS)];case 14:h.sent(),null===(C=this.eventHandler)||void 0===C||C.dispatch("onLocationMessage",Ce),h.label=15;case 15:return[3,28];case 16:return de=this.useOwnUploadFun?k.remotePath:(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&!this.useOwnUploadFun&&(de="".concat(de,"&share-secret=").concat(k.secretKey)),!($={id:H,type:B,contentsType:v[k.type],from:G,to:F,url:de,secret:k.secretKey,filename:k.displayName,file_length:k.fileLength||"",accessToken:this.token||"",ext:re,length:k.duration,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete $.delay,!$.msgConfig&&delete D.msgConfig,$.error=ee,$.errorText=ne,$.errorCode=te,!K&&this.onAudioMessage&&this.onAudioMessage($),Se={id:H,type:"audio",chatType:q,from:G,to:F,url:de,secret:k.secretKey,file:{},filename:k.displayName,length:k.duration||0,file_length:k.fileLength||0,filetype:k.filetype||"",accessToken:this.token||"",ext:re,time:Number(j),onlineState:W},$.msgConfig&&(Se.msgConfig=$.msgConfig),oe.length>0&&(Se.reactions=oe),ce&&(Se.chatThread=ce),le&&(Se.chatThreadOverview=le),"chatRoom"===q&&(Se.priority=V,Se.broadcast=Y),Z&&(Se.isContentReplaced=Z),Q=Se,K?[3,18]:[4,null===(b=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===b?void 0:b.storeMessage(Se,d.r.SUCCESS)];case 17:h.sent(),null===(N=this.eventHandler)||void 0===N||N.dispatch("onAudioMessage",Se),h.label=18;case 18:return[3,28];case 19:return de=this.useOwnUploadFun?k.remotePath:(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&!this.useOwnUploadFun&&(de="".concat(de,"&share-secret=").concat(k.secretKey)),!($={id:H,type:B,contentsType:v[k.type],from:G,to:F,url:de,secret:k.secretKey,filename:k.displayName,file_length:k.fileLength,accessToken:this.token||"",ext:re,time:j,msgConfig:D.msgConfig,onlineState:W}).delay&&delete $.delay,!$.msgConfig&&delete D.msgConfig,$.error=ee,$.errorText=ne,$.errorCode=te,!K&&this.onFileMessage&&this.onFileMessage($),be={id:H,type:"file",chatType:q,from:G,to:F,url:de,secret:k.secretKey,file:{},filename:k.displayName,length:k.duration||0,file_length:k.fileLength||0,filetype:k.filetype||"",accessToken:this.token||"",ext:re,time:Number(j),onlineState:W},$.msgConfig&&(be.msgConfig=$.msgConfig),oe.length>0&&(be.reactions=oe),ce&&(be.chatThread=ce),le&&(be.chatThreadOverview=le),"chatRoom"===q&&(be.priority=V,be.broadcast=Y),Z&&(be.isContentReplaced=Z),Q=be,K?[3,21]:[4,null===(M=null===(A=this._localCache)||void 0===A?void 0:A.getInstance())||void 0===M?void 0:M.storeMessage(be,d.r.SUCCESS)];case 20:h.sent(),null===(w=this.eventHandler)||void 0===w||w.dispatch("onFileMessage",be),h.label=21;case 21:return[3,28];case 22:return!($={id:H,type:B,contentsType:v[k.type],from:G,to:F,action:k.action,ext:re,time:j,msgConfig:D.msgConfig,onlineState:W}).msgConfig&&delete D.msgConfig,$.error=ee,$.errorText=ne,$.errorCode=te,!K&&this.onCmdMessage&&this.onCmdMessage($),Ne={id:H,type:"cmd",chatType:q,from:G,to:F,action:k.action,ext:re,time:Number(j),onlineState:W},$.msgConfig&&(Ne.msgConfig=$.msgConfig),oe.length>0&&(Ne.reactions=oe),ce&&(Ne.chatThread=ce),le&&(Ne.chatThreadOverview=le),"chatRoom"===q&&(Ne.priority=V,Ne.broadcast=Y),Z&&(Ne.isContentReplaced=Z),Q=Ne,K||null===(L=this.eventHandler)||void 0===L||L.dispatch("onCmdMessage",Ne),[3,28];case 23:return Ae={},Me={},D.contents[0].customExts&&(Ae=_(D.contents[0].customExts)),D.contents[0].params&&(Me=_(D.contents[0].params)),$={id:H,type:B,contentsType:v[k.type],from:G,to:F,customEvent:k.customEvent,params:Me,customExts:Ae,ext:re,time:j,onlineState:W},!K&&this.onCustomMessage&&this.onCustomMessage($),we={id:H,type:"custom",chatType:q,from:G,to:F,customEvent:k.customEvent,params:Me,customExts:Ae,ext:re,time:Number(j),onlineState:W},$.msgConfig&&(we.msgConfig=$.msgConfig),oe.length>0&&(we.reactions=oe),ce&&(we.chatThread=ce),le&&(we.chatThreadOverview=le),"chatRoom"===q&&(we.priority=V,we.broadcast=Y),Z&&(we.isContentReplaced=Z),Q=we,K?[3,25]:[4,null===(x=null===(U=this._localCache)||void 0===U?void 0:U.getInstance())||void 0===x?void 0:x.storeMessage(we,d.r.SUCCESS)];case 24:h.sent(),null===(P=this.eventHandler)||void 0===P||P.dispatch("onCustomMessage",we),h.label=25;case 25:return[3,28];case 26:return de=(k.remotePath&&this.apiUrl+k.remotePath.substr(k.remotePath.indexOf("/",9)))+"?em-redirect=true",k.secretKey&&(de="".concat(de,"&share-secret=").concat(k.secretKey)),Le={id:H,type:"combine",chatType:q,to:F,from:G,ext:re,time:Number(j),onlineState:W,title:k.title||"",summary:k.summary||"",url:de||"",secret:k.secretKey||"",file_length:k.fileLength||0,filename:k.displayName||"",compatibleText:k.text,combineLevel:k.combineLevel||0},$.msgConfig&&(Le.msgConfig=$.msgConfig),oe.length>0&&(Le.reactions=oe),ce&&(Le.chatThread=ce),le&&(Le.chatThreadOverview=le),"chatRoom"===q&&(Le.priority=V,Le.broadcast=Y),Z&&(Le.isContentReplaced=Z),Q=Le,!K&&this.eventHandler&&this.eventHandler.dispatch("onCombineMessage",Le),[3,28];case 27:return c.kg.error("Unknow message type, message:",k),[3,28];case 28:return J?[2,Q]:[2,$]}}))}))}function y(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){var i,l,d,v,g,m,O,T,R,I,C,S,b,N,A,M,w,L,U,x;return p(this,void 0,void 0,(function(){var p,P,D,k,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,fe;return h(this,(function(h){switch(h.label){case 0:if(p=new(o())(e.timestamp.low,e.timestamp.high,e.timestamp.unsigned).toString(),P=this.root.lookup("easemob.pb.MessageBody"),D=P.decode(e.payload),k=3,H=!1,e.meta&&e.meta.length){if(B=s.P6.parseNotify(e.meta),G=B.is_online,F=B.callback_replace,this.useReplacedMessageContents&&F&&(H=!0),G)switch(G){case 0:k=0;break;case 1:k=1;break;default:k=2}}else k=3;switch(j=new(o())(e.id.low,e.id.high,e.id.unsigned).toString(),W=D.ackMessageId?new(o())(D.ackMessageId.low,D.ackMessageId.high,D.ackMessageId.unsigned).toString():"",q="",K=D.from&&D.from.name,V=D.to&&D.to.name,c.kg.debug("thirdMessage:",D),D.type){case a.g.SINGLECHAT:return[3,1];case a.g.GROUPCHAT:return[3,2];case a.g.CHATROOM:return[3,3];case a.g.READ_ACK:return[3,4];case a.g.DELIVER_ACK:return[3,5];case a.g.RECALL:return[3,6];case a.g.CHANNEL_ACK:return[3,15];case a.g.EDIT:return[3,16]}return[3,19];case 1:return q="chat","agoraToken"===this.grantType&&(q="singleChat"),this.delivery&&!n&&K!==this.context.userId&&y.call(this,K,V,j),[3,20];case 2:return q="groupchat","agoraToken"===this.grantType&&(q="groupChat"),[3,20];case 3:return q="chatroom","agoraToken"===this.grantType&&(q="chatRoom"),k=1,[3,20];case 4:return q="read_ack",J=void 0,D.ext[0]&&JSON.parse(D.ext[0].stringValue)?(J={id:j,type:"read",from:K,to:V,mid:W,groupReadCount:D.ext[0]&&JSON.parse(D.ext[0].stringValue),ackContent:D.ackContent,onlineState:k},this.onReadMessage&&this.onReadMessage(J),null===(i=this.eventHandler)||void 0===i||i.dispatch("onReadMessage",J),[2]):(J={id:j,type:"read",from:K,to:V,mid:W,onlineState:k},this.onReadMessage&&this.onReadMessage(J),null===(l=this.eventHandler)||void 0===l||l.dispatch("onReadMessage",J),[2]);case 5:return q="deliver_ack",this.onDeliveredMessage&&this.onDeliveredMessage({id:j,type:"delivery",from:K,to:V,mid:W,onlineState:k}),z={id:j,type:"delivery",from:K,to:V,mid:W,onlineState:k},null===(d=this.eventHandler)||void 0===d||d.dispatch("onDeliveredMessage",z),[2];case 6:return q="recall",Y={id:j,from:K||"admin",to:V,mid:W,onlineState:k},X=V===this.user?K:V,[4,null===(g=null===(v=this._localCache)||void 0===v?void 0:v.getInstance())||void 0===g?void 0:g.getMessageByServerMsgId(Y.mid)];case 7:return(Z=h.sent())?[4,null===(O=null===(m=this._localCache)||void 0===m?void 0:m.getInstance())||void 0===O?void 0:O.removeMsgByServerMsgId(Y.mid)]:[3,9];case 8:h.sent(),h.label=9;case 9:return"singleChat"!==(null==Z?void 0:Z.chatType)&&"groupChat"!==(null==Z?void 0:Z.chatType)?[3,14]:($=(null==Z?void 0:Z.from)===this.user||""===(null==Z?void 0:Z.from),[4,null===(R=null===(T=this._localCache)||void 0===T?void 0:T.getInstance())||void 0===R?void 0:R.getConversationLastMessage(X,Z.chatType)]);case 10:return Q=h.sent(),[4,null===(C=null===(I=this._localCache)||void 0===I?void 0:I.getInstance())||void 0===C?void 0:C.getConversationBySessionId((0,u.MQ)({conversationId:X,conversationType:Z.chatType}))];case 11:return(ee=h.sent())?[4,null===(b=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===b?void 0:b.updateLocalConversation((0,u.MQ)({conversationId:X,conversationType:Z.chatType}),{lastMessageId:null==Q?void 0:Q.serverMsgId,unReadCount:(0,u.E7)({conversation:ee,isRecallSelfMsg:$,recalledMsgTime:Z.time})})]:[3,13];case 12:h.sent(),h.label=13;case 13:h.label=14;case 14:return this.onRecallMessage&&this.onRecallMessage(Y),null===(N=this.eventHandler)||void 0===N||N.dispatch("onRecallMessage",Y),[2];case 15:return this.onChannelMessage&&this.onChannelMessage({id:j,type:"channel",chatType:"singleChat",from:K,to:V,time:Number(p),onlineState:k}),te={id:j,type:"channel",chatType:"singleChat",from:K,to:V,time:Number(p),onlineState:k},null===(A=this.eventHandler)||void 0===A||A.dispatch("onChannelMessage",te),[2];case 16:return ne={errorCode:0,reason:""},[4,E.call(this,{status:ne,thirdMessage:D,msgBody:D.contents[0],msgId:j,type:q,from:K,to:V,time:p,onlineState:k,ignoreCallback:!0,format:!0,isContentReplaced:H})];case 17:return re=h.sent(),oe=!!e.to&&-1!==e.to.domain.indexOf("conference"),re.chatType=oe?"groupChat":"singleChat",ie=D.editMessageId&&new(o())(D.editMessageId.low,D.editMessageId.high,D.editMessageId.unsigned).toString(),se={id:ie,type:re.type,chatType:re.chatType,msg:re.msg,to:re.to,from:re.from,time:re.time,modifiedInfo:re.modifiedInfo},re.translations&&(se.translations=re.translations),[4,null===(w=null===(M=this._localCache)||void 0===M?void 0:M.getInstance())||void 0===w?void 0:w.getMessageByServerMsgId(ie)];case 18:return"txt"===(null==(ae=h.sent())?void 0:ae.type)&&(null===(U=null===(L=this._localCache)||void 0===L?void 0:L.getInstance())||void 0===U||U.putMessageToDB(f(f({},ae),{msg:se.msg,modifiedInfo:se.modifiedInfo,translations:se.translations}))),"txt"===re.type&&(null===(x=this.eventHandler)||void 0===x||x.dispatch("onModifiedMessage",se)),[2];case 19:return c.kg.error("unexpected message type: ".concat(D.type)),[2];case 20:ue="normal",le=!1,"chat"===q.toLowerCase()||"singleChat"===q?ce="singleChat":"groupchat"===q.toLowerCase()||"groupChat"===q?ce="groupChat":(ce="chatRoom",k=1,e.ext&&(de=_(e.ext),le=!!(null==de?void 0:de.is_broadcast),ue=0===de.chatroom_msg_tag?"high":2===de.chatroom_msg_tag?"low":"normal")),fe=0,h.label=21;case 21:return fe<D.contents.length?[4,E.call(this,{status:t,thirdMessage:D,msgBody:D.contents[fe],msgId:j,type:q,from:K,to:V,time:p,onlineState:k,chatType:ce,ignoreCallback:n,priority:ue,format:r,broadcast:le,isContentReplaced:H})]:[3,24];case 22:return[2,h.sent()];case 23:return fe++,[3,21];case 24: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 p}}),n(7042),n(2222),n(8309),n(9600),n(6992),n(1539),n(8783),n(3948),n(285),n(1637),n(4812),n(3710),n(9554),n(2772),n(4916),n(2526),n(1817),n(2165);var o="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent);function i(e){return i="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},i(e)}var s,a=function(){},u={};!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"}(s||(s={}));var c=function(){function e(e,t,n){this.name=e||"defaultLogger",this.currentLevel=0,this.useCookiePersist=!1,this.storageLogLevelKey="loglevel",this.levels=s,this.logMethods=["trace","debug","info","warn","error"],this.methodFactory=n||this.defaultMethodFactory;var r=this._getPersistedLevel();null==r&&(r=null===t?"WARN":t),this.logs=[],this.config={useCache:!1,maxCache:3145728,color:"",background:""},this.logBytes=0,this.setLevel(r,!1,"")}return 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=s[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<s.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._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();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})};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"===i(e)?r+=JSON.stringify(e)+" ":r+=e+" "})),this._cacheLogCall(n+r)},e.prototype._cacheLogCall=function(e){var t=l(e),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+=l(s))}this.logs.push(e)}},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=0;n<this.logMethods.length;n++){var r=this.logMethods[n];this[r]=n<e?a:this.methodFactory(r,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):a)},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}();function l(e){for(var t=e.length,n=0;n<e.length;n++)e.charCodeAt(n)>255&&t++;return t}var d=new c;d.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");return this};var f="undefined"!=typeof window?window.log:void 0;d.noConflict=function(){return"undefined"!=typeof window&&window.log===d&&(window.log=f),d},d.getLoggers=function(){return u};var p=d},2449:function(e,t,n){"use strict";n.r(t),n.d(t,{Message:function(){return _}});var r=n(4370),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}(),f=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}(),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:"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}(),v=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}(),_=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 f({type:"audio",id:e.id});case"video":return new p({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)?f.create(e):function(e){return"video"===e.type&&!("version"in e)}(e)?p.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)?v.create(e):{}:a.create(e);var t},e.prototype.set=function(e){},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.LOCAL_DB_OPERATION_FAILED=55]="LOCAL_DB_OPERATION_FAILED",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.WEBIM_MESSAGE_REC_AUDIO=304]="WEBIM_MESSAGE_REC_AUDIO",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.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={}))},4370:function(e,t,n){"use strict";n.d(t,{iw:function(){return E},hj:function(){return d},LR:function(){return T},Ki:function(){return h},P4:function(){return y},cT:function(){return O},P6:function(){return I}}),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(2023);var r=n(5531),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)},i=function(e,t,n,i){var s,a,u,c,l,d,f,p,h,v,_,E,y,g,m,O,T,R,I,C,S,b,N,A=e.response;A&&"string"==typeof A&&(A=JSON.parse(A));var M=e.status,w={elapse:i,httpCode:M,errDesc:null==A?void 0:A.error_description};if(400===M){if(40002===A.error_code)return void t({type:r.E.THREAD_ALREADY_EXIST,message:null==A?void 0:A.error_description,extraInfo:w});if(40009===A.error_code)return void t({type:r.E.OPERATION_UNSUPPORTED,message:null==A?void 0:A.error_description,extraInfo:w});if(60005===A.error_code)return void t({type:r.E.GROUP_MEMBER_ATTRIBUTES_SET_FAILED,message:(null==A?void 0:A.desc)||(null==A?void 0:A.error_description),extraInfo:w});if(60010===A.error_code)return void((null==A?void 0:A.error_description.includes("exceeds chatgroup user metadata single value limit"))?t({type:r.E.MAX_LIMIT,message:(null==A?void 0:A.desc)||A.error_description,extraInfo:w}):t({type:r.E.NO_PERMISSION,message:(null==A?void 0:A.desc)||A.error_description,extraInfo:w}));if(60011===A.error_code)return void t({type:r.E.CHATROOM_NOT_JOINED,message:null==A?void 0:A.desc,extraInfo:w});if(60006===A.error_code||60007===A.error_code||60009===A.error_code||60012===A.error_code)return void t({type:r.E.MAX_LIMIT,message:(null==A?void 0:A.desc)||(null==A?void 0:A.error_description),extraInfo:w});if(null===(s=A.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:A.error_description,extraInfo:w}):t({type:r.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}),void n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==A?void 0:A.error_description,data:e.responseText,extraInfo:w});if("the app not open presence"===(null==A?void 0:A.result))return void t({type:r.E.SERVICE_NOT_ENABLED,message:null==A?void 0:A.result,extraInfo:w});if(null==A?void 0:A.error_description.includes("remark length must less"))return void t({type:r.E.MAX_LIMIT,message:null==A?void 0:A.error_description,extraInfo:w});switch(null==A?void 0:A.error_description){case"the user is already operation this message":t({type:r.E.REACTION_ALREADY_ADDED,message:null==A?void 0:A.error_description,extraInfo:w});break;case"The quantity has exceeded the limit!":t({type:r.E.MAX_LIMIT,message:null==A?void 0:A.error_description,extraInfo:w});break;case"The user not in this group!":t({type:r.E.GROUP_NOT_JOINED,message:null==A?void 0:A.error_description,extraInfo:w});break;case"the user operation is illegal!":t({type:r.E.REACTION_OPERATION_IS_ILLEGAL,message:null==A?void 0:A.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==A?void 0:A.error_description,extraInfo:w});break;case"this message is creating reaction, please try again.":t({type:r.E.REACTION_CREATING,message:null==A?void 0:A.error_description,extraInfo:w});break;case"groupId can not be null!":t({type:r.E.GROUP_NOT_EXIST,message:null==A?void 0:A.error_description,extraInfo:w});break;case"The input text is too long.":t({type:r.E.TRANSLATION_TEXT_TOO_LONG,message:null==A?void 0:A.error_description,extraInfo:w});break;case"The target language is not valid.":t({type:r.E.TRANSLATION_NOT_VALID,message:null==A?void 0:A.error_description,extraInfo:w});break;case"report failed, get message by id failed":t({type:r.E.MESSAGE_NOT_FOUND,message:null==A?void 0:A.error_description,extraInfo:w});break;case"ext is too big ":t({type:r.E.PRESENCE_PARAM_EXCEED,message:null==A?void 0:A.error_description,extraInfo:w});break;case"Request body not readable.Please check content type is correct!":t({type:r.E.REQUEST_PARAMETER_ERROR,message:null==A?void 0:A.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==A?void 0:A.error_description,extraInfo:w});break;default:t({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==A?void 0:A.error_description,data:e.responseText,extraInfo:w}),n({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==A?void 0:A.error_description,data:e.responseText,extraInfo:w})}}else if(401===M)40001===A.error_code||60001===A.error_code||"Unable to authenticate (OAuth)"===A.error_description?t({type:r.E.NO_PERMISSION,message:null==A?void 0:A.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===M)4e4===A.error_code||60004===A.error_code||15002===A.error_code?t({type:r.E.SERVICE_NOT_ENABLED,message:null==A?void 0:A.error_description,extraInfo:w}):40003===A.error_code||40004===A.error_code?t({type:r.E.THREAD_ALREADY_EXIST,message:null==A?void 0:A.error_description,extraInfo:w}):40005===A.error_code||40007===A.error_code||91002===A.error_code?t({type:r.E.MAX_LIMIT,message:null==A?void 0:A.error_description,extraInfo:w}):60002===A.error_code&&t({type:r.E.PERMISSION_DENIED,message:null==A?void 0:A.error_description,extraInfo:w}),"group member list is full!"===A.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:A.error_description,extraInfo:w}):t({type:r.E.CHATROOM_MEMBERS_FULL,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(c=A.error_description)||void 0===c?void 0:c.includes(A.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:A.error_description,extraInfo:w}):(null===(d=A.error_description)||void 0===d?void 0:d.includes("are not members of this group"))?(null===(f=e.responseURL)||void 0===f?void 0:f.includes("chatgroups"))?t({type:r.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):t({type:r.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(p=A.error_description)||void 0===p?void 0:p.includes("service not open!"))||(null===(h=A.error_description)||void 0===h?void 0:h.includes("message report not open"))||(null===(v=A.error_description)||void 0===v?void 0:v.includes("messageroaming function not open"))?t({type:r.E.SERVICE_NOT_ENABLED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(_=A.error_description)||void 0===_?void 0:_.includes("members size is greater than max user size !"))?t({type:r.E.GROUP_MEMBERS_LIMIT,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(E=A.error_description)||void 0===E?void 0:E.includes("can not operate this group, reason: group is disabled"))?t({type:r.E.GROUP_IS_DISABLED,data:e.response||e.responseText,message:A.error_description,extraInfo:w}):(null===(y=A.error_description)||void 0===y?void 0:y.includes("Invitee's contact max count"))||(null===(g=A.error_description)||void 0===g?void 0:g.includes("Inviter's contact max count"))?t({type:r.E.MAX_LIMIT,data:e.response||e.responseText,message:A.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===M)40011===A.error_code?t({type:r.E.THREAD_NOT_EXIST,message:null==A?void 0:A.error_description,extraInfo:w}):40012===A.error_code?t({type:r.E.NO_PERMISSION,message:null==A?void 0:A.error_description,extraInfo:w}):60003===A.error_code||20004===A.error_code?t({type:r.E.GROUP_NOT_JOINED,message:null==A?void 0:A.error_description,extraInfo:w}):91001===A.error_code&&t({type:r.E.CONVERSATION_NOT_EXIST,message:null==A?void 0:A.error_description,extraInfo:w}),(null===(m=A.error_description)||void 0===m?void 0:m.includes("do not find this group"))||(null===(O=A.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=A.error_description)||void 0===R?void 0:R.includes("username"))&&(null===(I=A.error_description)||void 0===I?void 0:I.includes("doesn't exist!'"))||(null===(C=A.error_description)||void 0===C?void 0:C.includes("user not found"))||(null===(S=A.error_description)||void 0===S?void 0:S.includes("Service resource not found"))&&"UserNotFoundException"===(null==A?void 0:A.exception)?t({type:r.E.USER_NOT_FOUND,data:e.response||e.responseText,message:A.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===M)90004===A.error_code&&t({type:r.E.OPERATION_NOT_ALLOWED,message:null==A?void 0:A.error_description,extraInfo:w});else if(429===M||503===M){if(null===(b=A.error_description)||void 0===b?void 0:b.includes("The request has reached the maximum limit"))return void t({type:r.E.MAX_LIMIT,message:e.responseText,extraInfo:w});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===M){if(40006===A.error_code||40008===A.error_code||40010===A.error_code)return void t({type:r.E.SERVER_UNKNOWN_ERROR,message:null==A?void 0:A.error_description,extraInfo:w});if(90005===A.error_code||99999===A.error_code)return void t({type:r.E.REQUEST_UNKNOWN,message:null==A?void 0:A.error_description,extraInfo:w});if(null===(N=A.error_description)||void 0===N?void 0:N.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=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)},l=function(){};function d(e,t){var n,o=this;return g().platform===E.WEB?new Promise((function(t,o){var s=e.dataType||"text",a=e.success||l,c=e.error||l,d=new XMLHttpRequest;d.ontimeout=function(){o({type:r.E.REQUEST_TIMEOUT,message:"Request Timeout",errorType:"timeout_error",xhr:d})},d.onerror=function(){o({type:r.E.REQUEST_UNKNOWN,message:"Request Unknow Error",errorType:"onerror",xhr:d})},d.onabort=function(){o({type:r.E.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:d})},d.onreadystatechange=function(){if(4===d.readyState){var e=(new Date).getTime()-n,l=d.status||0,f={elapse:e,httpCode:l};if(200===l){I.ajaxUnconventionalErrorTimes=0;try{switch(s){case"text":return a(d.responseText),void t(d.responseText);case"json":var p=JSON.parse(d.responseText);return p.extraInfo=f,a(p),void t(p);case"xml":return d.responseXML&&d.responseXML.documentElement?(a(d.responseXML.documentElement),void t(d.responseXML.documentElement)):(c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}),void o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}));default:c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"Invalid dataType"}),o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"Invalid dataType"})}return t(d.response||d.responseText),void a(d.response||d.responseText,d)}catch(e){o(e)}return}[400,401,403,404,429,500,503].includes(l)||(u.kg.debug("rest api request fail status:",l),I.ajaxUnconventionalErrorTimes++),i(d,o,c,e)}0===d.readyState&&(c({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"Request not initialized"}),o({type:r.E.WEBIM_CONNCTION_AJAX_ERROR,data:d.responseText,message:"Request not initialized"}))},e.responseType&&d.responseType&&(d.responseType=e.responseType),e.mimeType&&d.overrideMimeType(e.mimeType);var f=e.type||"POST",p=e.data||null,h="";if("get"===f.toLowerCase()&&p){for(var v in p)p.hasOwnProperty(v)&&(h+=v+"="+p[v]+"&");h=h?h.slice(0,-1):h,e.url+=(e.url.indexOf("?")>0?"&":"?")+(h?h+"&":h)+"_v="+(new Date).getTime(),p=null,h=""}n=(new Date).getTime(),d.open(f,e.url);var _=e.headers||{};for(var E in _["Content-Type"]||(_["Content-Type"]="application/json"),_)_.hasOwnProperty(E)&&d.setRequestHeader(E,_[E]);d.send(p)})).then((function(n){return o.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&o.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:c({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},R(n.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete n.extraInfo,"Object"===f(n)?c(c({},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:c({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},R(n.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete n.extraInfo,n})):p.call(this,e,t)}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}function p(e,t){var n=this;return new Promise((function(t,n){var r=e.success||l,o=e.error||l,i=e.type||"POST",s=e.data||null,u="",c=(new Date).getTime(),d=I.getEnvInfo();if("get"===i.toLowerCase()&&s){for(var f in s)s.hasOwnProperty(f)&&(u+=f+"="+s[f]+"&");u=u?u.slice(0,-1):u,e.url+=(e.url.indexOf("?")>0?"&":"?")+(u?u+"&":u)+"_v="+(new Date).getTime(),s=null,u=""}var p={url:e.url,data:e.data,method:i,headers:{},success:function(e){var i,s,a,u,l,d={elapse:(new Date).getTime()-c,httpCode:Number((null===(i=e.statusCode)||void 0===i?void 0:i.toString())||(null===(s=e.status)||void 0===s?void 0:s.toString())),errDesc:(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.error_description)||""};if("200"===(null===(u=e.statusCode)||void 0===u?void 0:u.toString())||"200"===(null===(l=e.status)||void 0===l?void 0:l.toString())){e.data.extraInfo=d;var f=e.data;r(f),t(f)}else e.extraInfo=d,o(f=e),n(f)},complete:function(){},fail:function(e){var t={elapse:(new Date).getTime()-c,httpCode:a.Tp,errDesc:"request:fail"};e.extraInfo=t,e.data={error:"request:fail",error_description:"request:fail"},o(e),n(e)}};if("zfb"===d.platform||"dd"===d.platform?p.headers=e.headers:p.header=e.headers,"dd"===d.platform)return dd.httpRequest(p);d.global.request(p)})).then((function(o){return n.dataReport&&t&&t!==s.fI.SDK_INTERNAL&&n.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:c({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},R(o.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete o.extraInfo,"Object"===f(o)?c(c({},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:c({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},R(r.extraInfo))}),t!==s.fI.SDK_INTERNAL&&delete r.extraInfo,r}))}function h(){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()}var v,_,E,y=(v=function(e,t){var n=g();if(n.platform!==E.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))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!v)return _;_=v.apply(void 0,e),v=null});function g(){return"undefined"!=typeof swan&&m(swan)?{platform:E.BAIDU,global:swan}:"undefined"!=typeof tt&&m(tt)?{platform:E.TT,global:tt}:"undefined"!=typeof dd&&m(dd)?{platform:E.DD,global:dd}:"undefined"!=typeof my&&m(my)?{platform:E.ZFB,global:my}:"undefined"!=typeof wx&&m(wx)?{platform:E.WX,global:wx}:"undefined"!=typeof uni&&m(uni)?{platform:E.UNI,global:uni}:"undefined"!=typeof window&&window.WebSocket?{platform:E.WEB,global:window}:{platform:E.NODE,global:n.g||{}}}function m(e){for(var t=["canIUse","getSystemInfo"],n=0,r=t.length;n<r;n++)if(!e[t[n]])return!1;return!0}function O(e,t){var n,o,i,a,u=this,c=(new Date).getTime(),d=e.accessToken;if(d){var f=e.appKey,p=[],h="",v="";if(f&&(h=(p=f.split("#"))[0],v=p[1]),h||v){var _=e.apiUrl,E=e.uploadUrl||_+"/"+h+"/"+v+"/chatfiles";if((null===(o=null===(n=null==e?void 0:e.file)||void 0===n?void 0:n.data)||void 0===o?void 0:o.size)<=0)e.onFileUploadError&&e.onFileUploadError({type:r.E.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"});else{var y=new XMLHttpRequest;y.upload&&(null===(a=(i=y.upload).addEventListener)||void 0===a||a.call(i,"progress",e.onFileUploadProgress||l,!1)),y.addEventListener("abort",e.onFileUploadCanceled||l,!1),y.addEventListener("error",(function(e){m({type:r.E.WEBIM_UPLOADFILE_ERROR,data:y})}),!1),y.addEventListener("load",(function(n){try{var o=JSON.parse(y.responseText);if(400===y.status)return m({type:r.E.WEBIM_UPLOADFILE_ERROR,data:o}),!1;try{!function(n){var r=(new Date).getTime()-c;u.dataReport&&t&&[s.fI.UPLOAD_MSG_ATTACH,s.fI.UPLOAD_CHATROOM_FILE,s.fI.UPLOAD_GROUP_FILE].includes(t)&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:(null==n?void 0:n.error)?0:1,requestMethod:"POST",requestName:t,requestElapse:r,requestUrl:E,code:y.status,codeDesc:(null==n?void 0:n.error_description)||""}}),e.onFileUploadComplete&&e.onFileUploadComplete(n)}(o)}catch(n){m({type:r.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:n})}}catch(n){m({type:r.E.WEBIM_UPLOADFILE_ERROR,data:y.responseText})}}),!1),y.open("POST",E),y.setRequestHeader("restrict-access","true"),y.setRequestHeader("Accept","*/*"),y.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+""),y.send(g)}}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 m(n){var r=(new Date).getTime()-c;u.dataReport&&t&&[s.fI.UPLOAD_MSG_ATTACH,s.fI.UPLOAD_CHATROOM_FILE,s.fI.UPLOAD_GROUP_FILE].includes(t)&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:t,requestElapse:r,requestUrl:E,code:(null==y?void 0:y.status)||0,codeDesc:"upload file error"}}),e.onFileUploadError&&e.onFileUploadError(n)}}function T(e,t){e.onFileDownloadComplete=e.onFileDownloadComplete||l,e.onFileDownloadError=e.onFileDownloadError||l;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 d={"X-Requested-With":"XMLHttpRequest",Accept:"application/octet-stream","share-secret":e.secret,Authorization:"Bearer "+this.context.accessToken},f=e.headers||{};for(var p in f)d[p]=f[p];for(var p in d)d[p]&&o.setRequestHeader(p,d[p]);o.send(null)}function R(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.ZFB="zfb",e.DD="dd",e.TT="tt",e.BAIDU="baidu",e.QUICK_APP="quick_app",e.UNI="uni",e.NODE="node"}(E||(E={}));var I={autoIncrement:0,ajaxUnconventionalErrorTimes:0,ajax:d,getUniqueId:h,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:O,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:y,getEnvInfo:g,wxRequest:p,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:T,parseNotify:function(e){for(var t="",n=0;n<e.length;n++)t+="%"+e[n].toString(16);return JSON.parse(decodeURIComponent(t))},getExtraData:R,Uint8ArrayToString:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}}},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),f=n(648),p=n(6330),h=n(8880),v=n(8052),_=n(7045),E=n(7976),y=n(9518),g=n(7674),m=n(5112),O=n(9711),T=n(9909),R=T.enforce,I=T.get,C=u.Int8Array,S=C&&C.prototype,b=u.Uint8ClampedArray,N=b&&b.prototype,A=C&&y(C),M=S&&y(S),w=Object.prototype,L=u.TypeError,U=m("toStringTag"),x=O("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",D=s&&!!g&&"Opera"!==f(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=y(e);if(l(t)){var n=I(t);return n&&d(n,P)?n[P]:G(t)}},F=function(e){if(!l(e))return!1;var t=f(e);return d(H,t)||d(B,t)};for(r in H)(i=(o=u[r])&&o.prototype)?R(i)[P]=o:D=!1;for(r in B)(i=(o=u[r])&&o.prototype)&&(R(i)[P]=o);if((!D||!c(A)||A===Function.prototype)&&(A=function(){throw L("Incorrect invocation")},D))for(r in H)u[r]&&g(u[r],A);if((!D||!M||M===w)&&(M=A.prototype,D))for(r in H)u[r]&&g(u[r].prototype,M);if(D&&y(N)!==M&&g(N,M),a&&!d(M,U))for(r in k=!0,_(M,U,{configurable:!0,get:function(){return l(this)?this[x]:void 0}}),H)u[r]&&h(u[r],x,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:k&&x,aTypedArray:function(e){if(F(e))return e;throw L("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!g||E(A,e)))return e;throw L(p(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||v(M,e,n?t:D&&S[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(a){if(g){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 v(A,e,n?t:D&&A[e]||t)}catch(e){}}for(r in H)!(o=u[r])||o[e]&&!n||v(o,e,t)}},getTypedArrayConstructor:G,isView:function(e){if(!l(e))return!1;var t=f(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),f=n(5787),p=n(9303),h=n(7466),v=n(7067),_=n(1179),E=n(9518),y=n(7674),g=n(8006).f,m=n(1285),O=n(1589),T=n(8003),R=n(9909),I=a.PROPER,C=a.CONFIGURABLE,S="ArrayBuffer",b="DataView",N="prototype",A="Wrong index",M=R.getterFor(S),w=R.getterFor(b),L=R.set,U=r[S],x=U,P=x&&x[N],D=r[b],k=D&&D[N],H=Object.prototype,B=r.Array,G=r.RangeError,F=o(m),j=o([].reverse),W=_.pack,q=_.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[N],t,{configurable:!0,get:function(){return n(this)[t]}})},$=function(e,t,n,r){var o=v(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)},Q=function(e,t,n,r,o,i){var s=v(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!==S;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&&!C})))ee&&C&&u(U,"name",S);else{(x=function(e){return f(this,P),new U(v(e))})[N]=P;for(var te,ne=g(U),re=0;ne.length>re;)(te=ne[re++])in x||u(x,te,U[te]);P.constructor=x}y&&E(k)!==H&&y(k,H);var oe=new D(new x(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 P=(x=function(e){f(this,P);var t=v(e);L(this,{type:S,bytes:F(B(t),0),byteLength:t}),i||(this.byteLength=t,this.detached=!1)})[N],k=(D=function(e,t,n){f(this,k),f(e,P);var r=M(e),o=r.byteLength,s=p(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:b,buffer:e,byteLength:n,byteOffset:s,bytes:r.bytes}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=s)})[N],i&&(Z(x,"byteLength",M),Z(D,"buffer",w),Z(D,"byteLength",w),Z(D,"byteOffset",w)),l(k,{getInt8:function(e){return $(this,1,e)[0]<<24>>24},getUint8:function(e){return $(this,1,e)[0]},getInt16:function(e){var t=$(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=$(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return z($(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return z($(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return q($(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return q($(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Q(this,1,e,K,t)},setUint8:function(e,t){Q(this,1,e,K,t)},setInt16:function(e,t){Q(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Q(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Q(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Q(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Q(this,4,e,Y,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Q(this,8,e,X,t,arguments.length>2?arguments[2]:void 0)}});T(x,S),T(D,b),e.exports={ArrayBuffer:x,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,f=a((void 0===d?u:o(d,u))-l,u-c),p=1;for(l<c&&c<l+f&&(p=-1,l+=f-1,c+=f-1);f-- >0;)l in n?n[c]=n[l]:s(n,c),c+=p,l+=p;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),f=n(1246),p=Array;e.exports=function(e){var t=i(e),n=u(this),h=arguments.length,v=h>1?arguments[1]:void 0,_=void 0!==v;_&&(v=r(v,h>2?arguments[2]:void 0));var E,y,g,m,O,T,R=f(t),I=0;if(!R||this===p&&a(R))for(E=c(t),y=n?new this(E):p(E);E>I;I++)T=_?v(t[I],I):t[I],l(y,I,T);else for(O=(m=d(t,R)).next,y=n?new this:[];!(g=o(O,m)).done;I++)T=_?s(m,v,[g.value,I],!0):g.value,l(y,I,T);return y.length=I,y}},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,f=7==e,p=5==e||d;return function(h,v,_,E){for(var y,g,m=s(h),O=i(m),T=r(v,_),R=a(O),I=0,C=E||u,S=t?C(h,R):n||f?C(h,0):void 0;R>I;I++)if((p||I in O)&&(g=T(y=O[I],I,m),e))if(t)S[I]=g;else if(g)switch(e){case 3:return!0;case 5:return y;case 6:return I;case 2:c(S,y)}else switch(e){case 4:return!1;case 7:c(S,y)}return d?-1:o||l?l:S}};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"),f=l||!d;e.exports=f?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),f=s(l),p=e?f-1:0,h=e?-1:1;if(u<2)for(;;){if(p in d){c=d[p],p+=h;break}if(p+=h,e?p<0:f<=p)throw a("Reduce of empty array with no initial value")}for(;e?p>=0:f>p;p+=h)p in d&&(c=n(c,d[p],p,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)),f=0;c<l;c++,f++)i(d,f,e[c]);return d.length=f,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),f=n(6340),p=n(9781),h=n(2423).fastKey,v=n(9909),_=v.set,E=v.getterFor;e.exports={getConstructor:function(e,t,n,l){var d=e((function(e,o){a(e,f),_(e,{type:t,index:r(null),first:void 0,last:void 0,size:0}),p||(e.size=0),u(o)||c(o,e[l],{that:e,AS_ENTRIES:n})})),f=d.prototype,v=E(t),y=function(e,t,n){var r,o,i=v(e),s=g(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),p?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},g=function(e,t){var n,r=v(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(f,{clear:function(){for(var e=v(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,p?e.size=0:this.size=0},delete:function(e){var t=this,n=v(t),r=g(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),p?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=v(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!!g(this,e)}}),i(f,n?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),p&&o(f,"size",{configurable:!0,get:function(){return v(this).size}}),d},setStrong:function(e,t,n){var r=t+" Iterator",o=E(t),i=E(r);l(e,t,(function(e,t){_(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),f(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),f=n(8554),p=n(111),h=n(7293),v=n(7072),_=n(8003),E=n(9587);e.exports=function(e,t,n){var y=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),m=y?"set":"add",O=o[e],T=O&&O.prototype,R=O,I={},C=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!(g&&!p(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return g&&!p(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!p(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(s(e,!d(O)||!(g||T.forEach&&!h((function(){(new O).entries().next()})))))R=n.getConstructor(t,e,y,m),u.enable();else if(s(e,!0)){var S=new R,b=S[m](g?{}:-0,1)!=S,N=h((function(){S.has(1)})),A=v((function(e){new O(e)})),M=!g&&h((function(){for(var e=new O,t=5;t--;)e[m](t,t);return!e.has(-0)}));A||((R=t((function(e,t){l(e,T);var n=E(new O,e,R);return f(t)||c(t,n[m],{that:n,AS_ENTRIES:y}),n}))).prototype=T,T.constructor=R),(N||M)&&(C("delete"),C("has"),y&&C("get")),(M||b)&&C(m),g&&T.clear&&delete T.clear}return I[e]=R,r({global:!0,constructor:!0,forced:R!=O},I),_(R,e),g||n.setStrong(R,e,y),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,f,p,h=e.target,v=e.global,_=e.stat;if(n=v?r:_?r[h]||a(h,{}):(r[h]||{}).prototype)for(l in t){if(f=t[l],d=e.dontCallGetSet?(p=o(n,l))&&p.value:n[l],!c(v?l:h+(_?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;u(f,d)}(e.sham||d&&d.sham)&&i(f,"sham",!0),s(n,l,f,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),f={};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(f,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";f[t]=c("C,a","return new C("+d(r,",")+")")}return f[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,f=t(u),p=8*u-a-1,h=(1<<p)-1,v=h>>1,_=23===a?r(2,-24)-r(2,-77):0,E=e<0||0===e&&1/e<0?1:0,y=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+v>=1?_/d:_*r(2,1-v))*d>=2&&(c++,d/=2),c+v>=h?(l=0,c=h):c+v>=1?(l=(e*d-1)*r(2,a),c+=v):(l=e*r(2,v-1)*r(2,a),c=0));a>=8;)f[y++]=255&l,l/=256,a-=8;for(c=c<<a|l,p+=a;p>0;)f[y++]=255&c,c/=256,p-=8;return f[--y]|=128*E,f},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),f=n(9711),p=n(6677),h=!1,v=f("meta"),_=0,E=function(e){u(e,v,{value:{objectID:"O"+_++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},h=!0;var e=c.f,t=o([].splice),n={};n[v]=1,e(n).length&&(c.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===v){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,v)){if(!d(e))return"F";if(!t)return"E";E(e)}return e[v].objectID},getWeakData:function(e,t){if(!a(e,v)){if(!d(e))return!0;if(!t)return!1;E(e)}return e[v].weakData},onFreeze:function(e){return p&&h&&d(e)&&!a(e,v)&&E(e),e}};i[v]=!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),f=n(6200),p=n(3501),h="Object already initialized",v=a.TypeError,_=a.WeakMap;if(s||d.state){var E=d.state||(d.state=new _);E.get=E.get,E.has=E.has,E.set=E.set,r=function(e,t){if(E.has(e))throw v(h);return t.facade=e,E.set(e,t),t},o=function(e){return E.get(e)||{}},i=function(e){return E.has(e)}}else{var y=f("state");p[y]=!0,r=function(e,t){if(l(e,y))throw v(h);return t.facade=e,c(e,y,t),t},o=function(e){return l(e,y)?e[y]:{}},i=function(e){return l(e,y)}}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 v("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"),f=/^\s*(?:class|function)\b/,p=r(f.exec),h=!f.exec(c),v=function(e){if(!i(e))return!1;try{return d(c,l,e),!0}catch(e){return!1}},_=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(f,u(e))}catch(e){return!0}};_.sham=!0,e.exports=!d||o((function(){var e;return v(v.call)||!v(Object)||!v((function(){e=!0}))||e}))?_:v},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),f=n(9212),p=TypeError,h=function(e,t){this.stopped=e,this.result=t},v=h.prototype;e.exports=function(e,t,n){var _,E,y,g,m,O,T,R=n&&n.that,I=!(!n||!n.AS_ENTRIES),C=!(!n||!n.IS_RECORD),S=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),N=r(t,R),A=function(e){return _&&f(_,"normal",e),new h(!0,e)},M=function(e){return I?(i(e),b?N(e[0],e[1],A):N(e[0],e[1])):b?N(e,A):N(e)};if(C)_=e.iterator;else if(S)_=e;else{if(!(E=d(e)))throw p(s(e)+" is not iterable");if(a(E)){for(y=0,g=u(e);g>y;y++)if((m=M(e[y]))&&c(v,m))return m;return new h(!1)}_=l(e,E)}for(O=C?e.next:_.next;!(T=o(O,_)).done;){try{m=M(T.value)}catch(e){f(_,"throw",e)}if("object"==typeof m&&m&&c(v,m))return m}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),f=n(8880),p=n(8052),h=n(5112),v=n(7497),_=n(3383),E=s.PROPER,y=s.CONFIGURABLE,g=_.IteratorPrototype,m=_.BUGGY_SAFARI_ITERATORS,O=h("iterator"),T="keys",R="values",I="entries",C=function(){return this};e.exports=function(e,t,n,s,h,_,S){u(n,t,s);var b,N,A,M=function(e){if(e===h&&P)return P;if(!m&&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,x=U[O]||U["@@iterator"]||h&&U[h],P=!m&&x||M(h),D="Array"==t&&U.entries||x;if(D&&(b=c(D.call(new e)))!==Object.prototype&&b.next&&(i||c(b)===g||(l?l(b,g):a(b[O])||p(b,O,C)),d(b,w,!0,!0),i&&(v[w]=C)),E&&h==R&&x&&x.name!==R&&(!i&&y?f(U,"name",R):(L=!0,P=function(){return o(x,this)})),h)if(N={values:M(R),keys:_?P:M(T),entries:M(I)},S)for(A in N)(m||L||!(A in U))&&p(U,A,N[A]);else r({target:t,proto:!0,forced:m||L},N);return i&&!S||U[O]===P||p(U,O,P,{name:h}),v[t]=P,N}},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),f=n(5112),p=n(1913),h=f("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):v=!0),!u(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:p&&(r=c(r)),a(r[h])||d(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},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,f=l.get,p=String,h=Object.defineProperty,v=r("".slice),_=r("".replace),E=r([].join),y=a&&!o((function(){return 8!==h((function(){}),"length",{value:8}).length})),g=String(String).split("String"),m=e.exports=function(e,t,n){"Symbol("===v(p(t),0,7)&&(t="["+_(p(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),y&&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=E(g,"string"==typeof t?t:"")),e};Function.prototype.toString=m((function(){return i(this)&&f(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,f=n(8572),p=n(6833),h=n(1528),v=n(1036),_=n(5268),E=u.MutationObserver||u.WebKitMutationObserver,y=u.document,g=u.process,m=u.Promise,O=l(u,"queueMicrotask"),T=O&&O.value;if(!T){var R=new f,I=function(){var e,t;for(_&&(e=g.domain)&&e.exit();t=R.get();)try{t()}catch(e){throw R.head&&r(),e}e&&e.enter()};p||_||v||!E||!y?!h&&m&&m.resolve?((s=m.resolve(void 0)).constructor=m,a=c(s.then,s),r=function(){a(I)}):_?r=function(){g.nextTick(I)}:(d=c(d,u),r=function(){d(I)}):(o=!0,i=y.createTextNode(""),new E(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),f=Object.assign,p=Object.defineProperty,h=o([].concat);e.exports=!f||s((function(){if(r&&1!==f({b:1},f(p({},"a",{enumerable:!0,get:function(){p(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!=f({},e)[n]||a(f({},t)).join("")!=o}))?function(e,t){for(var n=l(e),o=arguments.length,s=1,f=u.f,p=c.f;o>s;)for(var v,_=d(arguments[s++]),E=f?h(a(_),f(_)):a(_),y=E.length,g=0;y>g;)v=E[g++],r&&!i(p,_,v)||(n[v]=_[v]);return n}:f},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",f="script",p=l("IE_PROTO"),h=function(){},v=function(e){return"<"+f+">"+e+"</"+f+">"},_=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},E=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;E="undefined"!=typeof document?document.domain&&r?_(r):(t=c("iframe"),n="java"+f+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):_(r);for(var o=s.length;o--;)delete E[d][s[o]];return E()};a[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=o(e),n=new h,h[d]=null,n[p]=e):n=E(),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",f="configurable",p="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&&p in n&&!n[p]){var r=l(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],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,f=[];l>d;)n=c[d++],r&&!a(o,n)||u(f,e?[n,o[n]]:o[n]);return f}};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),f=n(7392),p=o&&o.prototype,h=u("species"),v=!1,_=i(r.PromiseRejectionEvent),E=s("Promise",(function(){var e=a(o),t=e!==String(o);if(!t&&66===f)return!0;if(d&&(!p.catch||!p.finally))return!0;if(!f||f<51||!/native code/.test(e)){var n=new o((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[h]=r,!(v=n.then((function(){}))instanceof r))return!0}return!t&&(c||l)&&!_}));e.exports={CONSTRUCTOR:E,REJECTION_EVENT:_,SUBCLASSING:v}},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),f=n(9909).get,p=n(9441),h=n(7168),v=l("native-string-replace",String.prototype.replace),_=RegExp.prototype.exec,E=_,y=s("".charAt),g=s("".indexOf),m=s("".replace),O=s("".slice),T=(o=/b*/g,i(_,r=/a/,"a"),i(_,o,"a"),0!==r.lastIndex||0!==o.lastIndex),R=c.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(T||I||R||p||h)&&(E=function(e){var t,n,r,o,s,c,l,p=this,h=f(p),C=a(e),S=h.raw;if(S)return S.lastIndex=p.lastIndex,t=i(E,S,C),p.lastIndex=S.lastIndex,t;var b=h.groups,N=R&&p.sticky,A=i(u,p),M=p.source,w=0,L=C;if(N&&(A=m(A,"y",""),-1===g(A,"g")&&(A+="g"),L=O(C,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==y(C,p.lastIndex-1))&&(M="(?: "+M+")",L=" "+L,w++),n=new RegExp("^(?:"+M+")",A)),I&&(n=new RegExp("^"+M+"$(?!\\s)",A)),T&&(r=p.lastIndex),o=i(_,N?n:p,L),N?o?(o.input=O(o.input,w),o[0]=O(o[0],w),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:T&&o&&(p.lastIndex=p.global?o.index+o[0].length:r),I&&o&&o.length>1&&i(v,o[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&b)for(o.groups=c=d(null),s=0;s<b.length;s++)c[(l=b[s])[0]]=o[l[1]];return o}),e.exports=E},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,f=/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 f?function(r,o){var a=l(arguments.length,1)>n,u=s(r)?r:d(r),f=a?c(arguments,n):[],p=a?function(){i(u,this,f)}:u;return t?e(p,o):e(p)}: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)),f=o(n),p=d.length;return f<0||f>=p?e?"":void 0:(r=u(d,f))<55296||r>56319||f+1===p||(l=u(d,f+1))<56320||l>57343?e?a(d,f):r:e?c(d,f,f+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,f=r("".charCodeAt),p=r([].join),h=r([].push),v=r("".replace),_=r("".split),E=r("".toLowerCase),y=function(e){return e+22+75*(e<26)},g=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))},m=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=f(e,n++);if(o>=55296&&o<=56319&&n<r){var i=f(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,v=72;for(n=0;n<e.length;n++)(r=e[n])<128&&h(t,d(r));var _=t.length,E=_;for(_&&h(t,"-");E<i;){var m=o;for(n=0;n<e.length;n++)(r=e[n])>=s&&r<m&&(m=r);var O=E+1;if(m-s>l((o-c)/O))throw u(a);for(c+=(m-s)*O,s=m,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<=v?1:R>=v+26?26:R-v;if(T<I)break;var C=T-I,S=36-I;h(t,d(y(I+C%S))),T=l(C/S),R+=36}h(t,d(y(T))),v=g(c,O,E==_),c=0,E++}}c++,s++}return p(t,"")};e.exports=function(e){var t,n,r=[],o=_(v(E(e),s,"."),".");for(t=0;t<o.length;t++)n=o[t],h(r,c(i,n)?"xn--"+m(n):n);return p(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),f=n(7293),p=n(490),h=n(206),v=n(317),_=n(8053),E=n(6833),y=n(5268),g=a.setImmediate,m=a.clearImmediate,O=a.process,T=a.Dispatch,R=a.Function,I=a.MessageChannel,C=a.String,S=0,b={},N="onreadystatechange";f((function(){r=a.location}));var A=function(e){if(d(b,e)){var t=b[e];delete b[e],t()}},M=function(e){return function(){A(e)}},w=function(e){A(e.data)},L=function(e){a.postMessage(C(e),r.protocol+"//"+r.host)};g&&m||(g=function(e){_(arguments.length,1);var t=l(e)?e:R(e),n=h(arguments,1);return b[++S]=function(){u(t,void 0,n)},o(S),S},m=function(e){delete b[e]},y?o=function(e){O.nextTick(M(e))}:T&&T.now?o=function(e){T.now(M(e))}:I&&!E?(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&&!f(L)?(o=L,a.addEventListener("message",w,!1)):o=N in v("script")?function(e){p.appendChild(v("script"))[N]=function(){p.removeChild(this),A(e)}}:function(e){setTimeout(M(e),0)}),e.exports={set:g,clear:m}},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),f=n(8880),p=n(5988),h=n(7466),v=n(7067),_=n(4590),E=n(4948),y=n(2597),g=n(648),m=n(111),O=n(2190),T=n(30),R=n(7976),I=n(7674),C=n(8006).f,S=n(7321),b=n(2092).forEach,N=n(6340),A=n(7045),M=n(3070),w=n(1236),L=n(9909),U=n(9587),x=L.get,P=L.set,D=L.enforce,k=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",$=function(e,t){z(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},Q=function(e,t){A(e,t,{configurable:!0,get:function(){return x(this)[t]}})},ee=function(e){var t;return R(j,e)||"ArrayBuffer"==(t=g(e))||"SharedArrayBuffer"==t},te=function(e,t){return Y(e)&&!O(t)&&t in e&&p(+t)&&t>=0},ne=function(e,t){return t=E(t),te(e,t)?d(2,e[t]):H(e,t)},re=function(e,t,n){return t=E(t),!(te(e,t)&&m(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?k(e,t,n):(e[t]=n.value,e)};s?(q||(w.f=ne,M.f=re,Q(J,"buffer"),Q(J,"byteOffset"),Q(J,"byteLength"),Q(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,p=o[u],E=p,y=E&&E.prototype,g={},O=function(e,t){k(e,t,{get:function(){return function(e,t){var n=x(e);return n.view[c](t*s+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=x(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&&(E=t((function(e,t,n,r){return l(e,y),U(m(t)?ee(t)?void 0!==r?new p(t,_(n,s),r):void 0!==n?new p(t,_(n,s)):new p(t):Y(t)?$(E,t):i(S,E,t):new p(v(t)),e,E)})),I&&I(E,V),b(C(p),(function(e){e in E||f(E,e,p[e])})),E.prototype=y):(E=t((function(e,t,n,r){l(e,y);var o,a,u,c=0,d=0;if(m(t)){if(!ee(t))return Y(t)?$(E,t):i(S,E,t);o=t,d=_(n,s);var f=t.byteLength;if(void 0===r){if(f%s)throw G(Z);if((a=f-d)<0)throw G(Z)}else if((a=h(r)*s)+d>f)throw G(Z);u=a/s}else u=v(t),o=new F(a=u*s);for(P(e,{buffer:o,byteOffset:d,byteLength:a,length:u,view:new W(o)});c<u;)O(e,c++)})),I&&I(E,V),y=E.prototype=T(J)),y.constructor!==E&&f(y,"constructor",E),D(y).TypedArrayConstructor=E,K&&f(y,K,u);var R=E!=p;g[u]=E,r({global:!0,constructor:!0,forced:R,sham:!q},g),X in E||f(E,X,s),X in y||f(y,X,s),N(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),f=n(260).aTypedArrayConstructor,p=n(4599);e.exports=function(e){var t,n,h,v,_,E,y,g,m=i(this),O=s(e),T=arguments.length,R=T>1?arguments[1]:void 0,I=void 0!==R,C=c(O);if(C&&!l(C))for(g=(y=u(O,C)).next,O=[];!(E=o(g,y)).done;)O.push(E.value);for(I&&T>2&&(R=r(R,arguments[2])),n=a(O),h=new(f(m))(n),v=d(h),t=0;n>t;t++)_=I?R(O[t],t):O[t],h[t]=v?p(_):+_;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"},8264:function(e,t,n){"use strict";var r=n(2109),o=n(7854),i=n(3331),s=n(6340),a="ArrayBuffer",u=i[a];r({global:!0,constructor:!0,forced:o[a]!==u},{ArrayBuffer:u}),s(a)},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,f=s.DataView,p=f.prototype,h=o(d.prototype.slice),v=o(p.getUint8),_=o(p.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 f(this),p=new f(i),E=0;r<o;)_(p,E++,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),f=n(1194),p=n(5112),h=n(7392),v=p("isConcatSpreadable"),_=h>=51||!o((function(){var e=[];return e[v]=!1,e.concat()[0]!==e})),E=function(e){if(!s(e))return!1;var t=e[v];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!_||!f("concat")},{concat:function(e){var t,n,r,o,i,s=a(this),f=d(s,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(E(i=-1===t?s:arguments[t]))for(o=u(i),c(p+o),n=0;n<o;n++,p++)n in i&&l(f,p,i[n]);else c(p+1),l(f,p++,i);return f.length=p,f}})},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)}})},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),f="Array Iterator",p=s.set,h=s.getterFor(f);e.exports=u(Array,"Array",(function(e,t){p(this,{type:f,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 v=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&d&&"values"!==v.name)try{a(v,"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),f=n(1194),p=n(206),h=f("slice"),v=d("species"),_=Array,E=Math.max;r({target:"Array",proto:!0,forced:!h},{slice:function(e,t){var n,r,d,f=c(this),h=u(f),y=a(e,h),g=a(void 0===t?h:t,h);if(o(f)&&(n=f.constructor,(i(n)&&(n===_||o(n.prototype))||s(n)&&null===(n=n[v]))&&(n=void 0),n===_||void 0===n))return p(f,y,g);for(r=new(void 0===n?_:n)(E(g-y,0)),d=0;y<g;y++,d++)y in f&&l(r,d,f[y]);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),f=n(5117),p=n(1194)("splice"),h=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!p},{splice:function(e,t){var n,r,p,_,E,y,g=o(this),m=a(g),O=i(e,m),T=arguments.length;for(0===T?n=r=0:1===T?(n=0,r=m-O):(n=T-2,r=v(h(s(t),0),m-O)),c(m+n-r),p=l(g,r),_=0;_<r;_++)(E=O+_)in g&&d(p,_,g[E]);if(p.length=r,n<r){for(_=O;_<m-r;_++)y=_+n,(E=_+r)in g?g[y]=g[E]:f(g,y);for(_=m;_>m-r+n;_--)f(g,_-1)}else if(n>r)for(_=m-r;_>O;_--)y=_+n-1,(E=_+r-1)in g?g[y]=g[E]:f(g,y);for(_=0;_<n;_++)g[_+O]=arguments[_+2];return u(g,m-r+n),p}})},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),f=n(8044),p=n(6293),h=String,v=o("JSON","stringify"),_=a(/./.exec),E=a("".charAt),y=a("".charCodeAt),g=a("".replace),m=a(1..toString),O=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,I=!p||u((function(){var e=o("Symbol")();return"[null]"!=v([e])||"{}"!=v({a:e})||"{}"!=v(Object(e))})),C=u((function(){return'"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),S=function(e,t){var n=d(arguments),r=f(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(v,null,n)},b=function(e,t,n){var r=E(n,t-1),o=E(n,t+1);return _(T,e)&&!_(R,o)||_(R,e)&&!_(T,r)?"\\u"+m(y(e,0),16):e};v&&r({target:"JSON",stat:!0,arity:3,forced:I||C},{stringify:function(e,t,n){var r=d(arguments),o=i(I?S:v,null,r);return C&&"string"==typeof o?g(o,O,b):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),f=n(7976),p=n(2190),h=n(7593),v=n(7293),_=n(8006).f,E=n(1236).f,y=n(3070).f,g=n(863),m=n(3111).trim,O="Number",T=s[O],R=a[O],I=T.prototype,C=s.TypeError,S=u("".slice),b=u("".charCodeAt),N=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(p(c))throw C("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=m(c),43===(t=b(c,0))||45===t){if(88===(n=b(c,2))||120===n)return NaN}else if(48===t){switch(b(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=S(c,2)).length,a=0;a<s;a++)if((u=b(i,a))<48||u>o)return NaN;return parseInt(i,r)}return+c}(t)}(e));return f(I,t=this)&&v((function(){g(t)}))?d(Object(n),this,A):n};A.prototype=I,N&&!o&&(I.constructor=A),r({global:!0,constructor:!0,wrap:!0,forced:N},{Number:A});var M=function(e,t){for(var n,r=i?_(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)&&y(e,n,E(t,n))};o&&R&&M(a[O],R),(N||o)&&M(a[O],T)},3161:function(e,t,n){n(2109)({target:"Number",stat:!0},{isInteger:n(5988)})},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),f=n(7674),p=n(8003),h=n(6340),v=n(9662),_=n(614),E=n(111),y=n(5787),g=n(6707),m=n(261).set,O=n(5948),T=n(842),R=n(2534),I=n(8572),C=n(9909),S=n(2492),b=n(3702),N=n(8523),A="Promise",M=b.CONSTRUCTOR,w=b.REJECTION_EVENT,L=b.SUBCLASSING,U=C.getterFor(A),x=C.set,P=S&&S.prototype,D=S,k=P,H=c.TypeError,B=c.document,G=c.process,F=N.f,j=F,W=!!(B&&B.createEvent&&c.dispatchEvent),q="unhandledrejection",K=function(e){var t;return!(!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(m,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(m,c,(function(){var t=e.facade;u?G.emit("rejectionHandled",t):z("rejectionhandled",t,e.value)}))},$=function(e,t,n){return function(r){e(t,r,n)}},Q=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,$(ee,n,e),$(Q,n,e))}catch(t){Q(n,t,e)}})):(e.value=t,e.state=1,J(e,!1))}catch(t){Q({done:!1},t,e)}}};if(M&&(k=(D=function(e){y(this,k),v(e),l(r,this);var t=U(this);try{e($(ee,t),$(Q,t))}catch(e){Q(t,e)}}).prototype,(r=function(e){x(this,{type:A,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(g(this,D));return n.parent=!0,r.ok=!_(e)||e,r.fail=_(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=$(ee,t),this.reject=$(Q,t)},N.f=F=function(e){return e===D||void 0===e?new o(e):j(e)},!a&&_(S)&&P!==Object.prototype)){i=P.then,L||d(P,"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 P.constructor}catch(e){}f&&f(P,k)}s({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:D}),p(D,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"})})),f=r&&l.name!=c;(d||f)&&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),f=n(7976),p=n(9670),h=n(5656),v=n(4948),_=n(1340),E=n(9114),y=n(30),g=n(1956),m=n(8006),O=n(1156),T=n(5181),R=n(1236),I=n(3070),C=n(6048),S=n(5296),b=n(8052),N=n(7045),A=n(2309),M=n(6200),w=n(3501),L=n(9711),U=n(5112),x=n(6061),P=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,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,$=O.f,Q=S.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!=y(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]=y(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),p(e);var r=v(t);return p(n),d(te,r)?(n.enumerable?(d(e,G)&&e[G][r]&&(e[G][r]=!1),n=y(n,{enumerable:E(0,!1)})):(d(e,G)||Z(e,G,E(1,{})),e[G][r]=!0),ie(e,r,n)):Z(e,r,n)},ue=function(e,t){p(e);var n=h(t),r=g(n).concat(fe(n));return B(r,(function(t){u&&!i(ce,n,t)||ae(e,t,n[t])})),e},ce=function(e){var t=v(e),n=i(Q,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=v(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=$(h(e)),n=[];return B(t,(function(e){d(te,e)||d(w,e)||ee(n,e)})),n},fe=function(e){var t=e===K,n=$(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(f(J,this))throw z("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?_(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,E(1,e))};return u&&oe&&ie(K,t,{configurable:!0,set:n}),se(t,e)},b(J=V[j],"toString",(function(){return q(this).tag})),b(V,"withoutSetter",(function(e){return se(L(e),e)})),S.f=ce,I.f=ae,C.f=ue,R.f=le,m.f=O.f=de,T.f=fe,x.f=function(e){return se(U(e),e)},u&&(N(J,"description",{configurable:!0,get:function(){return q(this).description}}),a||b(K,"propertyIsEnumerable",ce,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),B(g(re),(function(e){P(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?y(e):ue(y(e),t)},defineProperty:ae,defineProperties:ue,getOwnPropertyDescriptor:le}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:de}),D(),k(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),f=n(9920),p=i.Symbol,h=p&&p.prototype;if(o&&u(p)&&(!("description"in h)||void 0!==p().description)){var v={},_=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(h,this)?new p(e):void 0===e?p():p(e);return""===e&&(v[t]=!0),t};f(_,p),_.prototype=h,h.constructor=_;var E="Symbol(test)"==String(p("test")),y=s(h.valueOf),g=s(h.toString),m=/^Symbol\((.*)\)[^)]+$/,O=s("".replace),T=s("".slice);d(h,"description",{configurable:!0,get:function(){var e=y(this);if(a(v,e))return"";var t=g(e),n=E?T(t,7,-1):O(t,m,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:_})}},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,f=u("".slice);d("fill",(function(e){var t=arguments.length;l(this);var n="Big"===f(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),f=i(a.entries),p=s.aTypedArray,h=s.exportTypedArrayMethod,v=c&&c.prototype,_=!o((function(){v[u].call([1])})),E=!!v&&v.values&&v[u]===v.values&&"values"===v.values.name,y=function(){return l(p(this))};h("entries",(function(){return f(p(this))}),_),h("keys",(function(){return d(p(this))}),_),h("values",y,_||!E,{name:"values"}),h(u,y,_||!E,{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,f=d&&d.prototype,p=f&&f.set,h=i.aTypedArray,v=i.exportTypedArrayMethod,_=!c((function(){var e=new Uint8ClampedArray(2);return o(p,e,{length:1,0:3},1),3!==e[1]})),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]}));v("set",(function(e){h(this);var t=a(arguments.length>1?arguments[1]:void 0,1),n=u(e);if(_)return o(p,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)},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),f=n(8008),p=u.aTypedArray,h=u.exportTypedArrayMethod,v=r.Uint16Array,_=v&&o(v.prototype.sort),E=!(!_||i((function(){_(new v(2),null)}))&&i((function(){_(new v(2),{})}))),y=!!_&&!i((function(){if(d)return d<74;if(c)return c<67;if(l)return!0;if(f)return f<602;var e,t,n=new v(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(_(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),y?_(this,e):a(p(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))}),!y||E)},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,f=!!u&&s((function(){d.call(new u(1))}));l("toLocaleString",(function(){return o(d,f?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,f=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 p in o)f(r[p]&&r[p].prototype,p);f(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),f=n(8003),p=n(3061),h=n(9909),v=n(5787),_=n(614),E=n(2597),y=n(9974),g=n(648),m=n(9670),O=n(111),T=n(1340),R=n(30),I=n(9114),C=n(4121),S=n(1246),b=n(8053),N=n(5112),A=n(4362),M=N("iterator"),w="URLSearchParams",L=w+"Iterator",U=h.set,x=h.getterFor(w),P=h.getterFor(L),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,q=o.TypeError,K=o.decodeURIComponent,V=o.encodeURIComponent,J=s("".charAt),z=s([].join),Y=s([].push),X=s("".replace),Z=s([].shift),$=s([].splice),Q=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=p((function(e,t){U(this,{type:L,iterator:C(x(e).entries),kind:t})}),"Iterator",(function(){var e=P(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=S(e);if(c)for(n=(t=C(e,c)).next;!(r=i(n,t)).done;){if(s=(o=C(m(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)E(e,l)&&Y(this.entries,{key:l,value:T(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=Q(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=Q(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 fe=function(){v(this,pe);var e=U(this,new de(arguments.length>0?arguments[0]:void 0));a||(this.length=e.entries.length)},pe=fe.prototype;if(d(pe,{append:function(e,t){b(arguments.length,2);var n=x(this);Y(n.entries,{key:T(e),value:T(t)}),a||this.length++,n.updateURL()},delete:function(e){b(arguments.length,1);for(var t=x(this),n=t.entries,r=T(e),o=0;o<n.length;)n[o].key===r?$(n,o,1):o++;a||(this.length=n.length),t.updateURL()},get:function(e){b(arguments.length,1);for(var t=x(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){b(arguments.length,1);for(var t=x(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){b(arguments.length,1);for(var t=x(this).entries,n=T(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){b(arguments.length,1);for(var n,r=x(this),o=r.entries,i=!1,s=T(e),u=T(t),c=0;c<o.length;c++)(n=o[c]).key===s&&(i?$(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=x(this);A(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=x(this).entries,r=y(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(pe,M,pe.entries,{name:"entries"}),c(pe,"toString",(function(){return x(this).serialize()}),{enumerable:!0}),a&&l(pe,"size",{get:function(){return x(this).entries.length},configurable:!0,enumerable:!0}),f(fe,w),r({global:!0,constructor:!0,forced:!u},{URLSearchParams:fe}),!u&&_(G)){var he=s(j.has),ve=s(j.set),_e=function(e){if(O(e)){var t,n=e.body;if(g(n)===w)return t=e.headers?new G(e.headers):new G,he(t,"content-type")||ve(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(_(H)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return H(e,arguments.length>1?_e(arguments[1]):{})}}),_(B)){var Ee=function(e){return v(this,F),new B(e,arguments.length>1?_e(arguments[1]):{})};F.constructor=Ee,Ee.prototype=F,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ee})}}e.exports={URLSearchParams:fe,getState:x}},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),f=n(5787),p=n(2597),h=n(1574),v=n(8457),_=n(1589),E=n(8710).codeAt,y=n(3197),g=n(1340),m=n(8003),O=n(8053),T=n(5556),R=n(9909),I=R.set,C=R.getterFor("URL"),S=T.URLSearchParams,b=T.getState,N=a.URL,A=a.TypeError,M=a.parseInt,w=Math.floor,L=Math.pow,U=c("".charAt),x=c(/./.exec),P=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),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,$=/^[0-7]+$/,Q=/^\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 P(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=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=E(e,0);return n>32&&n<127&&!p(t,e)?e:encodeURIComponent(e)},fe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},pe=function(e,t){var n;return 2==e.length&&x(z,U(e,0))&&(":"==(n=U(e,1))||!t&&"|"==n)},he=function(e){var t;return e.length>1&&pe(j(e,0,2))&&(2==e.length||"/"===(t=U(e,2))||"\\"===t||"?"===t||"#"===t)},ve=function(e){return"."===e||"%2e"===W(e)},_e={},Ee={},ye={},ge={},me={},Oe={},Te={},Re={},Ie={},Ce={},Se={},be={},Ne={},Ae={},Me={},we={},Le={},Ue={},xe={},Pe={},De={},ke=function(e,t,n){var r,o,i,s=g(e);if(t){if(o=this.parse(s))throw A(o);this.searchParams=null}else{if(void 0!==n&&(r=new ke(n,!0)),o=this.parse(s,null,r))throw A(o);(i=b(new S)).bindURL(this),this.searchParams=i}};ke.prototype={type:"URL",parse:function(e,t,n){var o,i,s,a,u,c=this,l=t||_e,d=0,f="",h=!1,E=!1,y=!1;for(e=g(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=v(e);d<=o.length;){switch(i=o[d],l){case _e:if(!i||!x(z,i)){if(t)return K;l=ye;continue}f+=W(i),l=Ee;break;case Ee:if(i&&(x(Y,i)||"+"==i||"-"==i||"."==i))f+=W(i);else{if(":"!=i){if(t)return K;f="",l=ye,d=0;continue}if(t&&(c.isSpecial()!=p(fe,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&fe[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?l=Ae:c.isSpecial()&&n&&n.scheme==c.scheme?l=ge:c.isSpecial()?l=Re:"/"==o[d+1]?(l=me,d++):(c.cannotBeABaseURL=!0,H(c.path,""),l=xe)}break;case ye:if(!n||n.cannotBeABaseURL&&"#"!=i)return K;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=_(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=De;break}l="file"==n.scheme?Ae:Oe;continue;case ge:if("/"!=i||"/"!=o[d+1]){l=Oe;continue}l=Ie,d++;break;case me:if("/"==i){l=Ce;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=_(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=_(n.path),c.query="",l=Pe;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=_(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=_(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=Ce}else l=Ie;break;case Re:if(l=Ie,"/"!=i||"/"!=U(f,d+1))continue;d++;break;case Ie:if("/"!=i&&"\\"!=i){l=Ce;continue}break;case Ce:if("@"==i){h&&(f="%40"+f),h=!0,s=v(f);for(var m=0;m<s.length;m++){var O=s[m];if(":"!=O||y){var T=de(O,le);y?c.password+=T:c.username+=T}else y=!0}f=""}else if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";d-=v(f).length+1,f="",l=Se}else f+=i;break;case Se:case be:if(t&&"file"==c.scheme){l=we;continue}if(":"!=i||E){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return V;if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(f))return a;if(f="",l=Le,t)return;continue}"["==i?E=!0:"]"==i&&(E=!1),f+=i}else{if(""==f)return V;if(a=c.parseHost(f))return a;if(f="",l=Ne,t==be)return}break;case Ne:if(!x(X,i)){if(i==r||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var R=M(f,10);if(R>65535)return J;c.port=c.isSpecial()&&R===fe[c.scheme]?null:R,f=""}if(t)return;l=Le;continue}return J}f+=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=_(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=_(n.path),c.query="",l=Pe;else{if("#"!=i){he(P(_(o,d),""))||(c.host=n.host,c.path=_(n.path),c.shortenPath()),l=Ue;continue}c.host=n.host,c.path=_(n.path),c.query=n.query,c.fragment="",l=De}}break;case Me:if("/"==i||"\\"==i){l=we;break}n&&"file"==n.scheme&&!he(P(_(o,d),""))&&(pe(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&&pe(f))l=Ue;else if(""==f){if(c.host="",t)return;l=Le}else{if(a=c.parseHost(f))return a;if("localhost"==c.host&&(c.host=""),t)return;f="",l=Le}continue}f+=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=De;else c.query="",l=Pe;break;case Ue:if(i==r||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(u=W(u=f))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||H(c.path,"")):ve(f)?"/"==i||"\\"==i&&c.isSpecial()||H(c.path,""):("file"==c.scheme&&!c.path.length&&pe(f)&&(c.host&&(c.host=""),f=U(f,0)+":"),H(c.path,f)),f="","file"==c.scheme&&(i==r||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)G(c.path);"?"==i?(c.query="",l=Pe):"#"==i&&(c.fragment="",l=De)}else f+=de(i,ce);break;case xe:"?"==i?(c.query="",l=Pe):"#"==i?(c.fragment="",l=De):i!=r&&(c.path[0]+=de(i,ae));break;case Pe: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,f=function(){return U(e,d)};if(":"==f()){if(":"!=U(e,1))return;d+=2,l=++c}for(;f();){if(8==c)return;if(":"!=f()){for(t=n=0;n<4&&x(ee,f());)t=16*t+M(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,c>6)return;for(r=0;f();){if(o=null,r>0){if(!("."==f()&&r<4))return;d++}if(!x(X,f()))return;for(;x(X,f());){if(i=M(f(),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(":"==f()){if(d++,!f())return}else if(f())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=y(e),x(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=x(Z,o)?16:8,o=j(o,8==i?1:2)),""===o)s=0;else{if(!x(10==i?Q:8==i?$: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=k(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(x(ne,e))return V;for(t="",n=v(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 p(fe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&pe(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?"/"+P(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(g(e)+":",_e)},getUsername:function(){return this.username},setUsername:function(e){var t=v(g(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=v(g(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,Se)},getHostname:function(){var e=this.host;return null===e?"":se(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,be)},getPort:function(){var e=this.port;return null===e?"":g(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=g(e))?this.port=null:this.parse(e,Ne))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+P(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=g(e))?this.query=null:("?"==U(e,0)&&(e=j(e,1)),this.query="",this.parse(e,Pe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=g(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=f(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 C(this)[e]()},set:t&&function(e){return C(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 C(this).serialize()}),{enumerable:!0}),l(Be,"toString",(function(){return C(this).serialize()}),{enumerable:!0}),N){var Fe=N.createObjectURL,je=N.revokeObjectURL;Fe&&l(He,"createObjectURL",u(Fe,N)),je&&l(He,"revokeObjectURL",u(je,N))}m(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?E:_;if(t){if(e<0)return E;if(e>=p)return T}else{if(e<=-h)return R;if(e+1>=h)return O}return e<0?a(-e,t).neg():u(e%f|0,e/f|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 _;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=_,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 f=a(c(n,u));i=i.mul(f).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 f=4294967296,p=f*f,h=p/2,v=s(1<<24),_=s(0);n.ZERO=_;var E=s(0,!0);n.UZERO=E;var y=s(1);n.ONE=y;var g=s(1,!0);n.UONE=g;var m=s(-1);n.NEG_ONE=m;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)*f+(this.low>>>0):this.high*f+(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(y)},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,f=0,p=0,h=0;return p+=(h+=i+(65535&e.low))>>>16,f+=(p+=o+c)>>>16,l+=(f+=n+a)>>>16,l+=t+s,u((p&=65535)<<16|(h&=65535),(l&=65535)<<16|(f&=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 _;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 _;if(this.eq(R))return e.isOdd()?R:_;if(e.eq(R))return this.isOdd()?R:_;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(v)&&e.lt(v))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,f=e.low>>>16,p=65535&e.low,h=0,E=0,y=0,g=0;return y+=(g+=s*p)>>>16,E+=(y+=i*p)>>>16,y&=65535,E+=(y+=s*f)>>>16,h+=(E+=o*p)>>>16,E&=65535,h+=(E+=i*f)>>>16,E&=65535,h+=(E+=s*l)>>>16,h+=n*p+o*f+i*l+s*c,u((y&=65535)<<16|(g&=65535),(h&=65535)<<16|(E&=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?E:_;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return E;if(e.gt(this.shru(1)))return g;i=E}else{if(this.eq(R))return e.eq(y)||e.eq(m)?R:e.eq(R)?y:(n=this.shr(1).div(e).shl(1)).eq(_)?e.isNegative()?y:m:(o=this.sub(e.mul(n)),i=n.add(o.div(e)));if(e.eq(R))return this.unsigned?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=_}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),f=a(n),p=f.mul(e);p.isNegative()||p.gt(o);)p=(f=a(n-=l,this.unsigned)).mul(e);f.isZero()&&(f=y),i=i.add(f),o=o.sub(p)}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 f="["+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,f)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",d,d)("}")}else n("d%s=%j",d,l.typeDefault)}n("}")}var p=!1;for(c=0;c<t.length;++c){l=t[c];var h=e._fieldsArray.indexOf(l);d=i.safeProp(l.name),l.map?(p||(p=!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,f=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===f?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,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===f?s(n,c,l,t+"[i]"):n("w.uint32(%i).%s(%s[i])",(c.id<<3|f)>>>0,d,t)),n("}")):(c.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===f?s(n,c,l,t):n("w.uint32(%i).%s(%s)",(c.id<<3|f)>>>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 f(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),f(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),f(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),f=n(7063),p=n(9935),h=/^[1-9][0-9]*$/,v=/^-?[1-9][0-9]*$/,_=/^0[x][0-9a-fA-F]+$/,E=/^-?0[x][0-9a-fA-F]+$/,y=/^0[0-7]+$/,g=/^-?0[0-7]+$/,m=/^(?![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 C,S,b,N,A,M=n.preferTrailingComment||!1,w=r(e,n.alternateCommentMode||!1),L=w.next,U=w.push,x=w.peek,P=w.skip,D=w.cmnt,k=!0,H=!1,B=t,G=n.keepCase?function(e){return e}:p.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()),P(e),e=x()}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(_.test(e))return n*parseInt(e,16);if(y.test(e))return n*parseInt(e,8);if(m.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=x())&&"'"!==n?e.push([r=K(L()),P("to",!0)?K(L()):r]):e.push(j())}while(P(",",!0));P(";")}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(v.test(e))return parseInt(e,10);if(E.test(e))return parseInt(e,16);if(g.test(e))return parseInt(e,8);throw F(e,"id")}function V(){if(void 0!==C)throw F("package");if(C=L(),!T.test(C))throw F(C,"name");B=B.define(C),P(";")}function J(){var e,t=x();switch(t){case"weak":e=b||(b=[]),L();break;case"public":L();default:e=S||(S=[])}t=j(),P(";"),e.push(t)}function z(){if(P("="),N=j(),!(H="proto3"===N)&&"proto2"!==N)throw F(N,"syntax");P(";")}function Y(e,t){switch(t){case"option":return $(e,t),P(";"),!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){P("<");var t=L();if(void 0===f.mapKey[t])throw F(t,"type");P(",");var n=L();if(!T.test(n))throw F(n,"type");P(">");var r=L();if(!O.test(r))throw F(r,"name");P("=");var o=new a(G(r),K(L()),t,n);X(o,(function(e){if("option"!==e)throw F(e);$(o,e),P(";")}),(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?($(n,e),P(";")):(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":$(n,e),P(";");break;case"reserved":q(n.reserved||(n.reserved=[]),!0);break;default:!function(e,t){if(!O.test(t))throw F(t,"name");P("=");var n=K(L(),!0),r={};X(r,(function(e){if("option"!==e)throw F(e);$(r,e),P(";")}),(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=D(),r=t;if(!O.test(t=L()))throw F(t,"name");var o,i,s,a,u=t;if(P("("),P("stream",!0)&&(i=!0),!T.test(t=L()))throw F(t);if(o=t,P(")"),P("returns"),P("("),P("stream",!0)&&(a=!0),!T.test(t=L()))throw F(t);s=t,P(")");var c=new d(u,r,o,s,i,a);c.comment=n,X(c,(function(e){if("option"!==e)throw F(e);$(c,e),P(";")})),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=D()),e.filename=I.filename),P("{",!0)){for(var o;"}"!==(o=L());)t(o);P(";",!0)}else n&&n(),P(";"),e&&("string"!=typeof e.comment||M)&&(e.comment=D(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),P("=");var a=new s(o,K(L()),r,t,n);if(X(a,(function(e){if("option"!==e)throw F(e);$(a,e),P(";")}),(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===f.packed[r]&&void 0!==f.basic[r]||a.setOption("packed",!1,!0)}else!function(e,t){var n=L();if(!O.test(n))throw F(n,"name");var r=p.lcFirst(n);n===r&&(n=p.ucFirst(n)),P("=");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":$(a,e),P(";");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 $(e,t){var n=P("(",!0);if(!T.test(t=L()))throw F(t,"name");var r,o=t,i=o;n&&(P(")"),i=o="("+o+")",t=x(),R.test(t)&&(r=t.substr(1),o+=t,L())),P("="),function(e,t,n,r){e.setParsedOption&&e.setParsedOption(t,n,r)}(e,i,Q(e,o),r)}function Q(e,t){if(P("{",!0)){for(var n={};!P("}",!0);){if(!O.test(A=L()))throw F(A,"name");var r,o=A;"{"===x()?r=Q(e,t+"."+A):(P(":"),"{"===x()?r=Q(e,t+"."+A):(r=W(!0),ee(e,t+"."+A,r)));var i=n[o];i&&(r=[].concat(i).concat(r)),n[o]=r,P(",",!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(P("[",!0)){do{$(e,"option")}while(P(",",!0));P("]")}return e}for(;null!==(A=L());)switch(A){case"package":if(!k)throw F(A);V();break;case"import":if(!k)throw F(A);J();break;case"syntax":if(!k)throw F(A);z();break;case"option":$(B,A),P(";");break;default:if(Y(B,A)){k=!1;continue}throw F(A)}return I.filename=null,{package:C,imports:S,weakImports:b,syntax:N,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 f(){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 p(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(p(this.buf,this.pos+=4),p(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 p(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|p(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 f.call(this)[t](!1)},uint64:function(){return f.call(this)[t](!0)},sint64:function(){return f.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 f(){}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===f;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]))&&p(r);if(s.weakImports)for(d=0;d<s.weakImports.length;++d)(r=c(s.weakImports[d])||o.resolvePath(e,s.weakImports[d]))&&p(r,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){u(e)}a||h||u(null,o)}function p(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 v,_=0;_<t.length;++_)(v=o.resolvePath("",t[_]))&&p(v);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,f)},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 p=/^[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)p.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]);p.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)p.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]);p.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,f=1,p=null,h=null,v=0,_=!1,E=!1,y=[],g=null;function m(e){return Error("illegal "+e+" (line "+f+")")}function O(t){return e.charAt(t)}function T(t,n,r){p=e.charAt(t++),v=f,_=!1,E=r;var a,c=t-(u?2:3);do{if(--c<0||"\n"===(a=e.charAt(c))){_=!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 C(){if(y.length>0)return y.shift();if(g)return function(){var t="'"===g?r:n;t.lastIndex=c-1;var o=t.exec(e);if(!o)throw m("string");return c=t.lastIndex,S(g),g=null,l(o[1])}();var o,i,s,p,h,v=0===c;do{if(c===d)return null;for(o=!1;a.test(s=O(c));)if("\n"===s&&(v=!0,++f),++c===d)return null;if("/"===O(c)){if(++c===d)throw m("comment");if("/"===O(c))if(u){if(p=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(p,c,v),f++,o=!0}else{for(h="/"===O(p=c+1);"\n"!==O(++c);)if(c===d)return null;++c,h&&T(p,c-1,v),++f,o=!0}else{if("*"!==(s=O(c)))return"/";p=c+1,h=u||"*"===O(p);do{if("\n"===s&&++f,++c===d)throw m("comment");i=s,s=O(c)}while("*"!==i||"/"!==s);++c,h&&T(p,c-2,v),o=!0}}}while(o);var _=c;if(t.lastIndex=0,!t.test(O(_++)))for(;_<d&&!t.test(O(_));)++_;var E=e.substring(c,c=_);return'"'!==E&&"'"!==E||(g=E),E}function S(e){y.push(e)}function b(){if(!y.length){var e=C();if(null===e)return null;S(e)}return y[0]}return Object.defineProperty({next:C,peek:b,push:S,skip:function(e,t){var n=b();if(n===e)return C(),!0;if(!t)throw m("token '"+n+"', '"+e+"' expected");return!1},cmnt:function(e){var t=null;return void 0===e?v===f-1&&(u||"*"===p||_)&&(t=E?h:null):(v<e&&b(),v!==e||_||!u&&"/"!==p||(t=E?null:h)),t}},"line",{get:function(){return f}})}d.unescape=l},7645:function(e,t,n){"use strict";e.exports=y;var r=n(9313);((y.prototype=Object.create(r.prototype)).constructor=y).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),f=n(9935),p=n(4928),h=n(5305),v=n(4497),_=n(3996),E=n(1667);function y(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 g(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(y.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=f.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=f.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=y.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,f.merge(e.prototype,t)),e.$type=e.prototype.$type=this,f.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:f.oneOfGetter(this._oneofsArray[n].oneof),set:f.oneOfSetter(this._oneofsArray[n].oneof)};n&&Object.defineProperties(e.prototype,r)}}}),y.generateConstructor=function(e){for(var t,n=f.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?n("this%s={}",f.safeProp(t.name)):t.repeated&&n("this%s=[]",f.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]]")},y.fromJSON=function(e,t){var n=new y(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?y.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},y.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return f.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])},y.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)},y.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},y.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),g(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),g(this)):r.prototype.add.call(this,e)},y.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),g(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),g(this)}return r.prototype.remove.call(this,e)},y.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},y.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},y.prototype.create=function(e){return new this.ctor(e)},y.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=p(this)({Writer:d,types:t,util:f}),this.decode=h(this)({Reader:l,types:t,util:f}),this.verify=v(this)({types:t,util:f}),this.fromObject=_.fromObject(this)({types:t,util:f}),this.toObject=_.toObject(this)({types:t,util:f});var r=E[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},y.prototype.encode=function(e,t){return this.setup().encode(e,t)},y.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},y.prototype.decode=function(e,t){return this.setup().decode(e,t)},y.prototype.decodeDelimited=function(e){return e instanceof l||(e=l.create(e)),this.decode(e,e.uint32())},y.prototype.verify=function(e){return this.setup().verify(e)},y.prototype.fromObject=function(e){return this.setup().fromObject(e)},y.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},y.d=function(e){return function(t){f.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 f=function(){return o.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d}};function p(e,t,n){t[n]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function v(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,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=f(),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(v,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(v,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(v,t.length(),t)},d.prototype.bool=function(e){return this._push(p,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(_,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=i.from(e);return this._push(_,4,t.lo)._push(_,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 E=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(p,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(E,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(p,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=f(),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=this.webpackChunkwebsdk=this.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 D},default:function(){return H}}),__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__(1532),__webpack_require__(9554),__webpack_require__(4747),__webpack_require__(7941),__webpack_require__(4812),__webpack_require__(3710),__webpack_require__(3843),__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__(4370),s=__webpack_require__(7360),a=__webpack_require__(6424),u=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 s.kg.debug("dispatch event: "+e,t||""),this.handlerData){var r=this.handlerData[n][e];r&&r(t)}},e}(),c=(__webpack_require__(2772),{biz:"",debug:!1,token:""}),l="https://data-reporting.agora.io/report",d="https://data-reporting.sh.agoralab.co/report",f=(__webpack_require__(6699),__webpack_require__(2023),__webpack_require__(2071)),p=__webpack_require__(1595),h=function(e){var t=Number(p.C8[e]);return t===p.C8.USER_LOGIN?"MANUALLOGIN":t===p.C8.MSYNC_SENDMESSAGE?"SENDMESSAGE":t>p.C8.UNKNOWOPERATION&&t<p.C8.REST_OPERATE?"REST":t>p.C8.REST_OPERATE&&t<p.C8.MSYNC_OPERATE?"MESSAGE":t>p.C8.MSYNC_OPERATE&&t<p.C8.ROSTER_OPERATE?"ROSTER":t>p.C8.ROSTER_OPERATE&&t<p.C8.USER_OPERATE?"USER":t>p.C8.USER_OPERATE&&t<p.C8.GROUP_OPERATE?"GROUP":t>p.C8.GROUP_OPERATE&&t<p.C8.CHATROOM_OPERATE?"CHATROOM":"OPERATION"},v=function(){return(new Date).getTime()},_=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)},E=function(){return e=1,t=99999,e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e;var e,t},y={},g=(__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}),m=1e3,O=function(){function e(e){this.eventQueue=[],this.stock=m,this.config=e,this.governor()}return e.prototype.add=function(e){this.stock<=0?console.warn("Event Report limit ".concat(m," 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=m}),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=g(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");y.global||(y=i.P6.getEnvInfo());var u=y;if(_(u)){var c={url:s?d:l,data:o,method:"POST",success:function(){null==a||a()},fail:function(){},complete:function(){}},f={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=f:c.header=f,"dd"===u.platform)return u.global.httpRequest(c);u.global.request(c)}else{var p=new XMLHttpRequest;p.onreadystatechange=function(){2===p.readyState&&(null==a||a())},p.open("POST",s?d:l),p.setRequestHeader("Content-Type","application/json"),p.setRequestHeader("token",e),p.setRequestHeader("appid",null!=r?r:""),p.setRequestHeader("sendts","".concat(Math.floor((new Date).getTime()/1e3))),p.setRequestHeader("biz",n),p.setRequestHeader("debug","".concat(s)),p.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}(),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=new(function(){function e(e){this.inited=!1,this.appId="",this.biz="",this.eventQueue={},this.config=c,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=T(T({},c),e),this.eventQueue=new O(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=T(T({},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}()),I=function(){return I=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},I.apply(this,arguments)},C={requestName:"",subrequestid:"1",requestMethod:"GET",requestUrl:"",requestElapse:0,code:0,codeDesc:"",isLastApi:0,isSuccess:1},S=function(){function e(e){this.platform=i.P6.getEnvInfo(),this.isReportDt=e.isReport||!1,this.isCollectDt=!0,_(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(E()),did:a,sdkVersion:s,os:f.Wc,sdkProduct:p.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){R.send(t.eventId,t.dt),n>=e.eventQueue.length-1&&(e.eventQueue=[])}))},e.prototype.init=function(t){e.instance||(e.instance=this,R.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=v(),a=e.uid,u=e.operationName;a&&(this.uid=a);var c={uid:this.uid,operationId:"opr_".concat(i.P6.getUniqueId(),"_").concat(E()),requestid:"req_".concat(i.P6.getUniqueId(),"_").concat(E()),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(E()),n=1),e.data.isLastApi){var _=v();e.data.requestElapse=_-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=v()-s),t.reportData.call(t,f.iB.API,I(I(I(I({},C),c),e.data),{accessChannel:t.accessChannel,operationType:h(u)})),e.isEndApi&&t.reportData.call(t,f.iB.API,I(I(I({},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:h(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=v(),r=0,e!==f.iB.API?[3,2]:[4,(h=this.platform,new Promise((function(e){var t;h.platform||(h=i.P6.getEnvInfo());var n="";if(h.platform===i.iw.WEB){var r=navigator.connection;(null==r?void 0:r.type)?(null==r||r.type,n=p.td.WIFI):(null==r?void 0:r.effectiveType)&&(n=p.td[r.effectiveType.toLocaleUpperCase()]),e(n)}else h.platform===i.iw.NODE?(n=p.td.UNKNOWN,e(n)):null===(t=h.global)||void 0===t||t.getNetworkType({success:function(t){n=p.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=I({lts:n,net:r,appkey:s,sdkServiceId:a,sdkProduct:u},t),this.isReportDt?R.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 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),N=__webpack_require__(5531),A=__webpack_require__(8161),M=__webpack_require__(7288);function w(e){return w="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},w(e)}var L=function(){return L=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},L.apply(this,arguments)},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())}))},x=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 P=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}},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}},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}},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}}}}}}}}}}),D=function(){function e(e){var t,n,r;if(this.name="miniCore",this.heartBeatWait=3e4,this.Message=o.Message,this.Code=N.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.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.appKey=e.appKey,this.root=P,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.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.version="4.3.1.1",this.deviceId=e.deviceId||"webim",this.logOut=!0,this.osType=16,this.useOwnUploadFun=e.useOwnUploadFun||!1,this.compressType=[0],this.encryptType=[0],this._msgHash={},this.closeInfo=null,this.context={jid:{appKey:"",clientResource:"",domain:"easemob.com",name:""},userId:"",appKey:"",status:0,restTokenData:"",appName:"",orgName:"",root:{},accessToken:""},this.mSync=this.usePlugin(a.Z),this.eventHandler=this.usePlugin(u),"string"!=typeof this.appKey||2!==this.appKey.split("#").length)throw Error("Illegal appKey: ".concat(this.appKey));var s=this.appKey.split("#");this.orgName=s[0],this.appName=s[1],this.dataReport=new S({appkey:this.appKey,org:this.orgName,sdkVersion:this.version,deviceId:this.deviceId,isReport:this.isReport})}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"===w(e)&&(t?(this[t]={},e.LocalCache&&(this._localCache=e.LocalCache,e=e.LocalCacheApi),Object.keys(e).forEach((function(r){n[t][r]=e[r].bind(n)}))):Object.assign(this,e))},e.prototype.isOpened=function(){return this.sock&&1===this.sock.readyState||!1},e.prototype.open=function(e){return U(this,void 0,void 0,(function(){var t=this;return x(this,(function(n){if(this.isOpened.call(this))throw b.Z.create({type:N.E.WEBIM_CONNCTION_OPEN_ERROR,message:"You are already logged in"});return[2,new Promise((function(n,r){t._open(L(L({},e),{promise:{resolve:n,reject:r}}))}))]}))}))},e.prototype._open=function(e,t){var n,r,o,s;return U(this,void 0,void 0,(function(){var a,u,c,l,d,f,h,v,_,E,y,g,m,O,T,R;return x(this,(function(I){switch(I.label){case 0:if(a=e.promise,this.setContext(e),!e.username||"string"!=typeof e.username)throw new Error("Invalid parameter username: ".concat(e.username));return u=this.dataReport.geOperateFun({uid:e.username,operationName:p.fI.LOGIN}),!this.isHttpDNS||t?[3,2]:[4,this.getDNS({rpt:u,isRetry:!!t})];case 1:I.sent(),I.label=2;case 2:return c=this.apiUrl+"/"+this.orgName+"/"+this.appName+"/token",e.agoraToken?(this.grantType="agoraToken",this.token=e.agoraToken,this.context.accessToken=e.agoraToken,this.context.restTokenData=e.agoraToken,this.user=e.username,null===(n=null==a?void 0:a.resolve)||void 0===n||n.call(a,{accessToken:e.agoraToken}),[3,6]):[3,3];case 3:return e.password?(l={headers:{"Content-type":"application/json"},url:c,dataType:"json",data:JSON.stringify({grant_type:"password",username:e.username,password:e.password,timestamp:+new Date})},[4,k(i.P6.ajax(l,p.fI.SDK_INTERNAL))]):[3,5];case 4:if(d=I.sent(),f=d[0],h=d[1],f)return v=b.Z.create({type:N.E.WEBIM_CONNCTION_OPEN_ERROR,message:f.error_description,data:f}),_=(null==f?void 0:f.extraInfo)||{},O=_.elapse,m=_.httpCode,E=_.errDesc,y={requestName:p.c.LOGIN_BY_PWD,requestElapse:O,requestUrl:c,isSuccess:0,code:m,codeDesc:E},u({isRetry:!1,data:y}),this.isHttpDNS&&this.restIndex+1<this.restTotal?(this.restIndex++,this.setRestUrl(),this._open(e,!0),[2]):(u({data:{isLastApi:1,isSuccess:0}}),this.clear(),delete f.extraInfo,null===(r=null==a?void 0:a.reject)||void 0===r||r.call(a,v),[2]);if(!h)throw new Error("get token fail.");return this.expiresIn=h.expires_in,this.grantType="password",this.token=h.access_token,this.user=e.username,this.context.accessToken=h.access_token,null===(o=null==a?void 0:a.resolve)||void 0===o||o.call(a,{accessToken:h.access_token,duration:h.expires_in}),h.extraInfo&&(g=h.extraInfo,m=g.httpCode,O=g.elapse,T={requestName:p.c.LOGIN_BY_PWD,requestElapse:O,requestUrl:c,isSuccess:1,code:m},u({isRetry:!1,data:T})),[3,6];case 5:if(!e.accessToken)throw new Error("Invalid parameter params: ".concat(e));this.grantType="accessToken",this.token=e.accessToken,this.context.accessToken=e.accessToken,this.context.restTokenData=e.accessToken,this.user=e.username,null===(s=null==a?void 0:a.resolve)||void 0===s||s.call(a,{accessToken:e.accessToken}),I.label=6;case 6:return(R=new WebSocket(this.url)).binaryType="arraybuffer",this.sock=R,this.initEventHandle(R,u),[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));var o=n.mSync.generateProvision();e.send(o)},e.onclose=function(e){var t,r,o,i,a,u,c,l,d,f,p,h;s.kg.debug("websocket onclose");var v=401===(null==e?void 0:e.code)||401===(null===(t=n.closeInfo)||void 0===t?void 0:t.code);if(n.logOut)n.clear(),null===(o=null===(r=null==n?void 0:n._localCache)||void 0===r?void 0:r.getInstance())||void 0===o||o.close(),null===(i=n.eventHandler)||void 0===i||i.dispatch("onDisconnected"),n.resetConnState(),v&&(s.kg.debug("websocket provision error"),n.closeInfo=null);else if(v){s.kg.debug("websocket provision error");var _={type:N.E.WEBIM_CONNECTION_ERROR,message:"provision error",data:e};n.closeInfo=null,null===(a=n.eventHandler)||void 0===a||a.dispatch("onError",_),null===(c=null===(u=null==n?void 0:n._localCache)||void 0===u?void 0:u.getInstance())||void 0===c||c.close(),n.onClosed&&n.onClosed(),null===(l=n.eventHandler)||void 0===l||l.dispatch("onDisconnected"),n.resetConnState()}else if(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}));else{var E={type:N.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};null===(d=n.unMSyncSendMsgMap)||void 0===d||d.clear(),n.rejectMessage(),null===(p=null===(f=null==n?void 0:n._localCache)||void 0===f?void 0:f.getInstance())||void 0===p||p.close(),null===(h=n.eventHandler)||void 0===h||h.dispatch("onDisconnected",E),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;if(s.kg.debug("websocket onerror"),!n.logOut&&3!==n.sock.readyState)if(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}));else{var c={type:N.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};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",c),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;this.logOut=!0,this.reconnecting=!1,this.context.status=N.E.STATUS_CLOSING,this.sock&&this.sock.close(),null===(e=this.unMSyncSendMsgMap)||void 0===e||e.clear(),this.stopHeartBeat(),this.rejectMessage(),this.context.status=N.E.STATUS_CLOSED,this._load_msg_cache=[],this._queues=[],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 U(this,void 0,void 0,(function(){var t,n,r,o,s,a,u,c,l,d,f,h,v,_;return x(this,(function(E){switch(E.label){case 0:return t=this.dataReport.geOperateFun({uid:e.username,operationName:p.fI.REGISTER}),this.isHttpDNS?[4,this.getDNS({rpt:t,isRetry:!1})]:[3,2];case 1:E.sent(),E.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,k(i.P6.ajax(s,p.fI.SDK_INTERNAL))];case 3:if(a=E.sent(),u=a[0],c=a[1],l={requestName:p.c.RESISTER,requestUrl:r},u){if(d=u.extraInfo||{},v=d.httpCode,_=d.elapse,f=d.errDesc,t({isRetry:!1,data:L(L({},{requestElapse:_,isSuccess:0,code:v,codeDesc:f}),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 h=c.extraInfo||{},v=h.httpCode,_=h.elapse,t({isEndApi:!0,isRetry:!1,data:L(L({},{requestElapse:_,isSuccess:1,code:v}),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.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,p.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};var t=this.appKey.split("#"),n=t[0],r=t[1];this.context.root=this.root,this.context.userId=e.username,this.context.appKey=this.appKey,this.context.appName=r,this.context.orgName=n},e.prototype.getDNS=function(e){return U(this,void 0,void 0,(function(){var t,n,r,o,a,u,c,l,d,f,h,v,_,E,y,g,m,O,T,R,I;return x(this,(function(C){switch(C.label){case 0:return t=e.rpt,n=e.isRetry,r=this.dnsArr[this.dnsIndex]+"/easemob/server.json",o={url:r,dataType:"json",type:"GET",data:{app_key:encodeURIComponent(this.appKey)}},[4,k(i.P6.ajax(o,p.fI.SDK_INTERNAL))];case 1:if(a=C.sent(),u=a[0],c=a[1],u){if(l=u.extraInfo||{},d=l.elapse,f=l.httpCode,h=l.errDesc,v={requestUrl:r,requestName:p.c.GET_DNS,isSuccess:0,code:f,codeDesc:h,requestElapse:d},t&&t({isRetry:n,data:v}),s.kg.debug("getHttpDNS fail: "+this.dnsIndex),this.dnsIndex++,this.dnsIndex<this.dnsTotal)return this.getDNS({rpt:t,isRetry:!0}),[2];throw new Error("get DNS config fail.")}if(!c)throw new Error("get DNS config fail.");return _=c.extraInfo||{},E=_.elapse,y=_.httpCode,g={requestUrl:r,requestName:p.c.GET_DNS,requestElapse:E,isSuccess:1,code:y},t&&t({isRetry:n,data:g}),m=c.rest.hosts,O=this.https?"https":"http",T=m.filter((function(e){if(e.protocol===O)return e})),this.restHosts=T,R=c["msync-wx"].hosts,I=R.filter((function(e){if(e.protocol===O)return e})),this.socketHost=I,"true"===(null==c?void 0:c.enableDataReport)?(this.dataReport.setIsCollectDt(!0),this.dataReport.setIsReportDt(!0)):(this.dataReport.setIsReportDt(!1),this.dataReport.setIsCollectDt(!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:N.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:M.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;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 U(t,void 0,void 0,(function(){var t,r,a,u,c,d,f,p,h,v,_,E,y;return x(this,(function(g){switch(g.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,f=0,p=2;p<t.length-1;p++)p%2==1&&(f^=t[p]);if(h=t.subarray(t.length-1,t.length),s.kg.debug("checkResult:",f,h[0]===f),h[0]!==f)return[2,o({message:"File verification failed"})];if("cm"!==d)return[3,7];g.label=1;case 1:g.trys.push([1,5,,6]),v=[],_=function(){var e,n,o,i;return x(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=E.root.lookup("easemob.pb.Meta")).decode(n),[4,A.Z.call(E,o,0,!0,!0)];case 1:return i=s.sent(),v.push(i),[2]}}))},E=this,g.label=2;case 2:return a<t.length-1?[5,_()]:[3,4];case 3:return g.sent(),[3,2];case 4:return[2,e(v)];case 5:return y=g.sent(),o({message:"Parse file failed",data:y}),[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 f=new FileReader;f.readAsArrayBuffer(n),f.onerror=r,f.onload=a}},f=function(e){o({type:N.E.WEBIM_DOWNLOADFILE_ERROR,message:"Download failed, please try again",data:e})};l?c.global.downloadFile({url:n,success:d,fail:f}):i.P6.download.call(t,{url:n,headers:{Accept:"application/json"},onFileDownloadComplete:d,onFileDownloadError:f,secret:r,accessToken:t.context.accessToken})}))},e}(),k=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e,null]}))},H=D}(),__webpack_exports__=__webpack_require__.O(__webpack_exports__),__webpack_exports__}()}));