jugglechat-websdk 1.9.2 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * JuggleIM.js v1.9.2
2
+ * JuggleIM.js v1.9.4
3
3
  * (c) 2022-2025 JuggleIM
4
4
  * Released under the MIT License.
5
5
  */const noop=()=>{},isObject=e=>"[object Object]"===Object.prototype.toString.call(e),isArray=e=>"[object Array]"===Object.prototype.toString.call(e),isFunction=e=>"[object Function]"===Object.prototype.toString.call(e),isString=e=>"[object String]"===Object.prototype.toString.call(e),isBoolean=e=>"[object Boolean]"===Object.prototype.toString.call(e),isUndefined=e=>"[object Undefined]"===Object.prototype.toString.call(e),isNull=e=>"[object Null]"===Object.prototype.toString.call(e),isNumber=e=>"[object Number]"===Object.prototype.toString.call(e),_isNaN=e=>isNaN(+e),stringify=e=>JSON.stringify(e),parse=t=>{let n={};try{n=JSON.parse(t)}catch(s){n=t}return n},forEach=(e,t)=>{t=t||noop;isObject(e)&&(()=>{for(var n in e)t(e[n],n,e)})(),isArray(e)&&(()=>{for(var n=0,s=e.length;n<s;n++)t(e[n],n,e)})()},isEmpty=e=>{let t=!0;return isObject(e)&&forEach(e,()=>{t=!1}),(isString(e)||isArray(e))&&(t=0===e.length),isNumber(e)&&(t=-1===e),t},rename=(e,t)=>{var n=isObject(e);n&&(e=[e]),e=parse(stringify(e));var s=function(e,n,s){delete s[n],n=t[n],s[n]=e};return forEach(e,e=>{forEach(e,(e,n,o)=>{var i=(n in t);(i?s:noop)(e,n,o)})}),isObject?e[0]:e},extend=(e,t)=>(t=isArray(t)?t:[t],forEach(t,t=>{for(let n in t){let s=t[n];isUndefined(s)||(e[n]=s)}}),e),Defer=Promise,deferred=e=>new Defer(e),templateFormat=(e,t,n)=>{isArray(t)||(t=[t]);let s=[],o=t=>e.replace(n||/\\?\{([^}]+)\}/g,(e,n)=>"\\"===e.charAt(0)?e.slice(1):void 0===t[n]?"{"+n+"}":t[n]);for(let r=0,i=t.length;r<i;r++)s.push(o(t[r]));return s.join("")},isContain=(e,t)=>-1<e.indexOf(t),isEqual=(e,t)=>e===t,Cache$1=e=>{isObject(e)||(e={});let t=(t,n)=>{e[t]=n},n=t=>e[t],s=t=>{delete e[t]},o=()=>{let t=[];for(let n in e)t.push(n);return t},i=()=>{e={}};return{set:t,get:n,remove:s,getKeys:o,clear:i}},map=(e,t)=>e.map(t),filter=(e,t)=>e.filter(t),uniq=(e,t)=>{let n=[],s={};return e.forEach(e=>{let n=t(e);s[n.key]=n.value}),forEach(s,e=>{n.push(e)}),n},some=(e,t)=>e.some(t),toJSON=e=>JSON.stringify(e),toArray=e=>{let t=[];return forEach(e,(e,n)=>{t.push([n,e])}),t},isInclude=(e,t)=>-1<e.indexOf(t),clone$1=e=>JSON.parse(JSON.stringify(e));// 暂时支持 String
@@ -48,7 +48,7 @@ var Storage={get,set,remove,setPrefix};/*!
48
48
  更新版本需要修改:
49
49
  1、对外暴露方式,i.util.global.protobuf 直接修改为了 JProtobuf
50
50
  2、eval 替换成 new Function
51
- */let JProtobuf={};!function(_){var e=Math.min,a=Math.pow,d=Math.floor,p=String.fromCharCode;!function(s,o,e){var n=function i(e){var t=o[e];return t||s[e][0].call(t=o[e]={exports:{}},i,t,t.exports),t.exports}(e[0]);JProtobuf=n,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&e.isLong&&(n.util.Long=e,n.configure()),n}),"object"==typeof module&&module&&module.exports&&(module.exports=n)}({1:[function(e,t,s){t.exports=function(e,t){for(var i=Array(arguments.length-1),n=0,a=2,d=!0;a<arguments.length;)i[n++]=arguments[a++];return new Promise(function(s,o){i[n]=function(e){if(d)if(d=!1,e)o(e);else{for(var t=Array(arguments.length-1),i=0;i<t.length;)t[i++]=arguments[i];s.apply(null,t)}};try{e.apply(t||null,i)}catch(e){d&&(d=!1,o(e))}})}},{}],2:[function(e,t,s){s.length=function(e){var t=e.length;if(!t)return 0;for(var s=0;1<--t%4&&"="==(e[0|t]||"");)++s;return Math.ceil(3*e.length)/4-s};for(var d=Array(64),o=Array(123),n=0;64>n;)o[d[n]=26>n?n+65:52>n?n+71:62>n?n-4:43|n-59]=n++;s.encode=function(a,t,c){for(var n=null,m=[],s=0,l=0,E,g;t<c;)g=a[t++],0===l?(m[s++]=d[g>>2],E=(3&g)<<4,l=1):1===l?(m[s++]=d[E|g>>4],E=(15&g)<<2,l=2):2===l?(m[s++]=d[E|g>>6],m[s++]=d[63&g],l=0):void 0,8191<s&&((n=n||[]).push(p.apply(String,m)),s=0);return l&&(m[s++]=d[E],m[s++]=61,1===l&&(m[s++]=61)),n?(s&&n.push(p.apply(String,m.slice(0,s))),n.join("")):p.apply(String,m.slice(0,s))};var i="invalid encoding";s.decode=function(a,t,i){for(var d=i,e=0,p=0,c,m;p<a.length&&(m=a.charCodeAt(p++),!(61==m&&1<e));){if((m=o[m])===_)throw Error("invalid encoding");0===e?(c=m,e=1):1===e?(t[i++]=c<<2|(48&m)>>4,c=m,e=2):2===e?(t[i++]=(15&c)<<4|(60&m)>>2,c=m,e=3):3===e?(t[i++]=(3&c)<<6|m,e=0):void 0}if(1===e)throw Error("invalid encoding");return i-d},s.test=function(e){return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,s){function o(e,s){function p(m){if("string"!=typeof m){var l=c();if(o.verbose&&void 0,l="return "+l,m){for(var E=Object.keys(m),n=Array(E.length+1),r=Array(E.length),e=0;e<E.length;)n[e]=E[e],r[e]=m[E[e++]];return n[e]=l,Function.apply(null,n).apply(null,r)}return Function(l)()}for(var g=Array(arguments.length-1),T=0;T<g.length;)g[T]=arguments[++T];if(T=0,m=m.replace(/%([%dfijs])/g,function(e,t){var s=g[T++];return"d"===t||"f"===t?""+ +(""+s):"i"===t?""+d(s):"j"===t?JSON.stringify(s):"s"===t?""+s:"%"}),T!==g.length)throw Error("parameter count mismatch");return a.push(m),p}function c(n){return"function "+(n||s||"")+"("+(e&&e.join(",")||"")+"){\n "+a.join("\n ")+"\n}"}"string"==typeof e&&(s=e,e=_);var a=[];return p.toString=c,p}(t.exports=o).verbose=!1},{}],4:[function(e,t,s){function n(){this.i={}}(t.exports=n).prototype.on=function(e,t,s){return(this.i[e]||(this.i[e]=[])).push({fn:t,ctx:s||this}),this},n.prototype.off=function(e,t){if(e===_)this.i={};else if(t===_)this.i[e]=[];else for(var s=this.i[e],n=0;n<s.length;)s[n].fn===t?s.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this.i[e];if(t){for(var s=[],n=1;n<arguments.length;)s.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,s)}return this}},{}],5:[function(e,t,i){function a(o,n,p){return n="function"==typeof n?(p=n,{}):n||{},p?!n.xhr&&s&&s.readFile?s.readFile(o,function(e,t){return e&&"undefined"!=typeof XMLHttpRequest?a.xhr(o,n,p):e?p(e):p(null,n.binary?t:t.toString("utf8"))}):a.xhr(o,n,p):d(a,this,o,n)}t.exports=a;var d=e(1),s=e(7)("fs");a.xhr=function(s,o,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4!==r.readyState)return _;if(0!==r.status&&200!==r.status)return n(Error("status "+r.status));if(o.binary){if(!(e=r.response))for(var e=[],s=0;s<r.responseText.length;++s)e.push(255&r.responseText.charCodeAt(s));return n(null,"undefined"==typeof Uint8Array?e:new Uint8Array(e))}return n(null,r.responseText)},o.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",s),r.send()}},{1:1,7:7}],6:[function(e,t,s){function n(_){var C=Math.LN2,S=Math.log;function O(s,o,p,n){var r=Math.round,c=0>o?1:0;s(0===(o=c?-o:o)?0<1/o?0:2147483648:isNaN(o)?2143289344:34028234663852886e22<o?(2139095040|c<<31)>>>0:11754943508222875e-54>o?(c<<31|r(o/1401298464324817e-60))>>>0:(c<<31|127+(s=d(S(o)/C))<<23|8388607&r(8388608*(o*a(2,-s))))>>>0,p,n)}function t(e,s,o){return e=e(s,o),s=2*(e>>31)+1,o=255&e>>>23,e&=8388607,255==o?e?NaN:1/0*s:0==o?1401298464324817e-60*s*e:s*a(2,o-150)*(8388608+e)}function n(e,t,s){y[0]=e,t[s]=A[0],t[s+1]=A[1],t[s+2]=A[2],t[s+3]=A[3]}function i(e,t,s){y[0]=e,t[s]=A[3],t[s+1]=A[2],t[s+2]=A[1],t[s+3]=A[0]}function e(e,t){return A[0]=e[t],A[1]=e[t+1],A[2]=e[t+2],A[3]=e[t+3],y[0]}function s(e,t){return A[3]=e[t],A[2]=e[t+1],A[1]=e[t+2],A[0]=e[t+3],y[0]}function o(p,t,i,n,c,e){var s=0>n?1:0,m;0===(n=s?-n:n)?(p(0,c,e+t),p(0<1/n?0:2147483648,c,e+i)):isNaN(n)?(p(0,c,e+t),p(2146959360,c,e+i)):17976931348623157e292<n?(p(0,c,e+t),p((2146435072|s<<31)>>>0,c,e+i)):22250738585072014e-324>n?(p((m=n/5e-324)>>>0,c,e+t),p((s<<31|m/4294967296)>>>0,c,e+i)):(p(4503599627370496*(m=n*a(2,-(n=1024===(n=d(S(n)/C))?1023:n)))>>>0,c,e+t),p((s<<31|n+1023<<20|1048575&1048576*m)>>>0,c,e+i))}function r(s,o,d,p,c){return o=s(p,c+o),s=s(p,c+d),p=2*(s>>31)+1,c=2047&s>>>20,d=4294967296*(1048575&s)+o,2047==c?d?NaN:1/0*p:0==c?5e-324*p*d:p*a(2,c-1075)*(d+4503599627370496)}function l(e,t,s){N[0]=e,t[s]=M[0],t[s+1]=M[1],t[s+2]=M[2],t[s+3]=M[3],t[s+4]=M[4],t[s+5]=M[5],t[s+6]=M[6],t[s+7]=M[7]}function p(e,t,s){N[0]=e,t[s]=M[7],t[s+1]=M[6],t[s+2]=M[5],t[s+3]=M[4],t[s+4]=M[3],t[s+5]=M[2],t[s+6]=M[1],t[s+7]=M[0]}function I(e,t){return M[0]=e[t],M[1]=e[t+1],M[2]=e[t+2],M[3]=e[t+3],M[4]=e[t+4],M[5]=e[t+5],M[6]=e[t+6],M[7]=e[t+7],N[0]}function R(e,t){return M[7]=e[t],M[6]=e[t+1],M[5]=e[t+2],M[4]=e[t+3],M[3]=e[t+4],M[2]=e[t+5],M[1]=e[t+6],M[0]=e[t+7],N[0]}var y,A,N,M,v;return"undefined"==typeof Float32Array?(_.writeFloatLE=O.bind(null,E),_.writeFloatBE=O.bind(null,T),_.readFloatLE=t.bind(null,m),_.readFloatBE=t.bind(null,g)):(y=new Float32Array([-0]),A=new Uint8Array(y.buffer),v=128===A[3],_.writeFloatLE=v?n:i,_.writeFloatBE=v?i:n,_.readFloatLE=v?e:s,_.readFloatBE=v?s:e),"undefined"==typeof Float64Array?(_.writeDoubleLE=o.bind(null,E,0,4),_.writeDoubleBE=o.bind(null,T,4,0),_.readDoubleLE=r.bind(null,m,0,4),_.readDoubleBE=r.bind(null,g,4,0)):(N=new Float64Array([-0]),M=new Uint8Array(N.buffer),v=128===M[7],_.writeDoubleLE=v?l:p,_.writeDoubleBE=v?p:l,_.readDoubleLE=v?I:R,_.readDoubleBE=v?R:I),_}function E(e,t,s){t[s]=255&e,t[s+1]=255&e>>>8,t[s+2]=255&e>>>16,t[s+3]=e>>>24}function T(e,t,s){t[s]=e>>>24,t[s+1]=255&e>>>16,t[s+2]=255&e>>>8,t[s+3]=255&e}function m(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function g(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=n(n)},{}],7:[function(e,t,s){function n(e){try{var t=new Function("require")(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(s,t,o){var a=o.isAbsolute=function(e){return /^(?:\/|\w+:)/.test(e)},e=o.normalize=function(e){var s=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),o=a(e),e="";o&&(e=s.shift()+"/");for(var n=0;n<s.length;)".."===s[n]?0<n&&".."!==s[n-1]?s.splice(--n,2):o?s.splice(n,1):++n:"."===s[n]?s.splice(n,1):++n;return e+s.join("/")};o.resolve=function(s,o,r){return r||(o=e(o)),!a(o)&&(s=(s=r?s:e(s)).replace(/(?:\/|^)[^/]+$/,"")).length?e(s+"/"+o):o}},{}],9:[function(e,t,s){t.exports=function(a,i,n){var d=n||8192,r=d>>>1,e=null,p=d;return function(n){return 1>n||r<n?a(n):(d<p+n&&(e=a(d),p=0),n=i.call(e,p,p+=n),(7&p&&(p=1+(7|p)),n))}}},{}],10:[function(e,t,s){s.length=function(e){for(var t=0,s=0,o;s<e.length;++s)128>(o=e.charCodeAt(s))?t+=1:2048>o?t+=2:55296==(64512&o)&&56320==(64512&e.charCodeAt(s+1))?(++s,t+=4):t+=3;return t},s.read=function(a,t,d){if(1>d-t)return"";for(var n=null,c=[],s=0,m;t<d;)128>(m=a[t++])?c[s++]=m:191<m&&224>m?c[s++]=(31&m)<<6|63&a[t++]:239<m&&365>m?(m=((7&m)<<18|(63&a[t++])<<12|(63&a[t++])<<6|63&a[t++])-65536,c[s++]=55296+(m>>10),c[s++]=56320+(1023&m)):c[s++]=(15&m)<<12|(63&a[t++])<<6|63&a[t++],8191<s&&((n=n||[]).push(p.apply(String,c)),s=0);return n?(s&&n.push(p.apply(String,c.slice(0,s))),n.join("")):p.apply(String,c.slice(0,s))},s.write=function(a,t,i){for(var d=i,s=0,p,c;s<a.length;++s)128>(p=a.charCodeAt(s))?t[i++]=p:(2048>p?t[i++]=192|p>>6:(55296==(64512&p)&&56320==(64512&(c=a.charCodeAt(s+1)))?(++s,t[i++]=240|(p=65536+((1023&p)<<10)+(1023&c))>>18,t[i++]=128|63&p>>12):t[i++]=224|p>>12,t[i++]=128|63&p>>6),t[i++]=128|63&p);return i-d}},{}],11:[function(s,t,o){function n(s,o){e.test(s)||(s="google/protobuf/"+s+".proto",o={nested:{google:{nested:{protobuf:{nested:o}}}}}),n[s]=o}t.exports=n;var e=/\/|\./;n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("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}}}}),n("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}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},{}],12:[function(e,t,s){function a(a,t,i,n){var r=!1;if(!t.resolvedType){var d=!1;switch(t.type){case"double":case"float":a("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":a("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":a("m%s=d%s|0",n,n);break;case"uint64":d=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":a("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,d)("else if(typeof d%s===\"string\")",n)("m%s=parseInt(d%s,10)",n,n)("else if(typeof d%s===\"number\")",n)("m%s=d%s",n,n)("else if(typeof d%s===\"object\")",n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,d?"true":"");break;case"bytes":a("if(typeof d%s===\"string\")",n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":a("m%s=String(d%s)",n,n);break;case"bool":a("m%s=Boolean(d%s)",n,n)}}else if(t.resolvedType instanceof c){a("switch(d%s){",n);for(var p=t.resolvedType.values,s=Object.keys(p),o=0;o<s.length;++o)p[s[o]]!==t.typeDefault||r||(a("default:")("if(typeof(d%s)===\"number\"){m%s=d%s;break}",n,n,n),t.repeated||a("break"),r=!0),a("case%j:",s[o])("case %i:",p[s[o]])("m%s=%j",n,p[s[o]])("break");a("}")}else a("if(typeof d%s!==\"object\")",n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,i,n);return a}function r(s,t,o,n){if(t.resolvedType)t.resolvedType instanceof c?s("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,o,n,n,o,n,n):s("d%s=types[%i].toObject(m%s,o)",n,o,n);else{var i=!1;switch(t.type){case"double":case"float":s("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":s("if(typeof m%s===\"number\")",n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("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",n,n,n,n,i?"true":"",n);break;case"bytes":s("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",n,n,n,n,n);break;default:s("d%s=m%s",n,n)}}return s}var c=e(15),m=e(37);s.fromObject=function(o){var t=o.fieldsArray,i=m.codegen(["d"],o.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return i("return new this.ctor");i("var m=new this.ctor");for(var n=0;n<t.length;++n){var d=t[n].resolve(),p=m.safeProp(d.name);d.map?(i("if(d%s){",p)("if(typeof d%s!==\"object\")",p)("throw TypeError(%j)",d.fullName+": object expected")("m%s={}",p)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",p),a(i,d,n,p+"[ks[i]]")("}")("}")):d.repeated?(i("if(d%s){",p)("if(!Array.isArray(d%s))",p)("throw TypeError(%j)",d.fullName+": array expected")("m%s=[]",p)("for(var i=0;i<d%s.length;++i){",p),a(i,d,n,p+"[i]")("}")("}")):(d.resolvedType instanceof c||i("if(d%s!=null){",p),a(i,d,n,p),d.resolvedType instanceof c||i("}"))}return i("return m")},s.toObject=function(d){var t=d.fieldsArray.slice().sort(m.compareFieldsById);if(!t.length)return m.codegen()("return {}");for(var i=m.codegen(["m","o"],d.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],l=[],e=[],s=0;s<t.length;++s)t[s].partOf||(t[s].resolve().repeated?n:t[s].map?l:e).push(t[s]);if(n.length){for(i("if(o.arrays||o.defaults){"),s=0;s<n.length;++s)i("d%s=[]",m.safeProp(n[s].name));i("}")}if(l.length){for(i("if(o.objects||o.defaults){"),s=0;s<l.length;++s)i("d%s={}",m.safeProp(l[s].name));i("}")}if(e.length){for(i("if(o.defaults){"),s=0;s<e.length;++s){var E=e[s],g=m.safeProp(E.name),T;E.resolvedType instanceof c?i("d%s=o.enums===String?%j:%j",g,E.resolvedType.valuesById[E.typeDefault],E.typeDefault):E.long?i("if(util.Long){")("var n=new util.Long(%i,%i,%j)",E.typeDefault.low,E.typeDefault.high,E.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",g)("}else")("d%s=o.longs===String?%j:%i",g,E.typeDefault.toString(),E.typeDefault.toNumber()):E.bytes?(T="["+Array.prototype.slice.call(E.typeDefault).join(",")+"]",i("if(o.bytes===String)d%s=%j",g,p.apply(String,E.typeDefault))("else{")("d%s=%s",g,T)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",g,g)("}")):i("d%s=%j",g,E.typeDefault)}i("}")}for(var y=!1,s=0;s<t.length;++s){var E=t[s],_=d.e.indexOf(E),g=m.safeProp(E.name);E.map?(y||(y=!0,i("var ks2")),i("if(m%s&&(ks2=Object.keys(m%s)).length){",g,g)("d%s={}",g)("for(var j=0;j<ks2.length;++j){"),r(i,E,_,g+"[ks2[j]]")("}")):E.repeated?(i("if(m%s&&m%s.length){",g,g)("d%s=[]",g)("for(var j=0;j<m%s.length;++j){",g),r(i,E,_,g+"[j]")("}")):(i("if(m%s!=null&&m.hasOwnProperty(%j)){",g,E.name),r(i,E,_,g),E.partOf&&i("if(o.oneofs)")("d%s=%j",m.safeProp(E.partOf.name),E.name)),i("}")}return i("return d")}},{15:15,37:37}],13:[function(e,t,s){t.exports=function(p){var t=d.codegen(["r","l"],p.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(p.fieldsArray.filter(function(e){return e.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");p.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var i=0;i<p.fieldsArray.length;++i){var c=p.e[i].resolve(),m=c.resolvedType instanceof o?"int32":c.type,l="m"+d.safeProp(c.name);t("case %i: {",c.id),c.map?(t("if(%s===util.emptyObject)",l)("%s={}",l)("var c2 = r.uint32()+r.pos"),a.defaults[c.keyType]===_?t("k=null"):t("k=%j",a.defaults[c.keyType]),a.defaults[m]===_?t("value=null"):t("value=%j",a.defaults[m]),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",c.keyType)("case 2:"),a.basic[m]===_?t("value=types[%i].decode(r,r.uint32())",i):t("value=r.%s()",m),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),a.long[c.keyType]===_?t("%s[k]=value",l):t("%s[typeof k===\"object\"?util.longToHash(k):k]=value",l)):c.repeated?(t("if(!(%s&&%s.length))",l,l)("%s=[]",l),a.packed[m]!==_&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,m)("}else"),a.basic[m]===_?t(c.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",l,i):t("%s.push(r.%s())",l,m)):a.basic[m]===_?t(c.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",l,i):t("%s=r.%s()",l,m),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),i=0;i<p.e.length;++i){var E=p.e[i];E.required&&t("if(!m.hasOwnProperty(%j))",E.name)("throw util.ProtocolError(%j,{instance:m})","missing required '"+E.name+"'")}return t("return m")};var o=e(15),a=e(36),d=e(37)},{15:15,36:36,37:37}],14:[function(e,t,s){function d(e,t,s,n){t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,n,(3|t.id<<3)>>>0,(4|t.id<<3)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,n,(2|t.id<<3)>>>0)}t.exports=function(c){for(var t=a.codegen(["m","w"],c.name+"$encode")("if(!w)")("w=Writer.create()"),n=c.fieldsArray.slice().sort(a.compareFieldsById),r=0,l;r<n.length;++r){var E=n[r].resolve(),g=c.e.indexOf(E),T=E.resolvedType instanceof p?"int32":E.type,y=m.basic[T];l="m"+a.safeProp(E.name),E.map?(t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",l,E.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",l)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(2|E.id<<3)>>>0,8|m.mapKey[E.keyType],E.keyType),y===_?t("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",g,l):t(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|y,T,l),t("}")("}")):E.repeated?(t("if(%s!=null&&%s.length){",l,l),E.packed&&m.packed[T]!==_?t("w.uint32(%i).fork()",(2|E.id<<3)>>>0)("for(var i=0;i<%s.length;++i)",l)("w.%s(%s[i])",T,l)("w.ldelim()"):(t("for(var i=0;i<%s.length;++i)",l),y===_?d(t,E,g,l+"[i]"):t("w.uint32(%i).%s(%s[i])",(E.id<<3|y)>>>0,T,l)),t("}")):(E.optional&&t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",l,E.name),y===_?d(t,E,g,l):t("w.uint32(%i).%s(%s)",(E.id<<3|y)>>>0,T,l))}return t("return w")};var p=e(15),m=e(36),a=e(37)},{15:15,36:36,37:37}],15:[function(o,t,i){function n(d,t,i,n,r,e){if(a.call(this,d,i),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=r||{},this.valuesOptions=e,this.reserved=_,t)for(var s=Object.keys(t),o=0;o<s.length;++o)"number"==typeof t[s[o]]&&(this.valuesById[this.values[s[o]]=t[s[o]]]=s[o])}t.exports=n;var a=o(24),s=(((n.prototype=Object.create(a.prototype)).constructor=n).className="Enum",o(23)),d=o(37);n.fromJSON=function(e,s){return e=new n(e,s.values,s.options,s.comment,s.comments),e.reserved=s.reserved,e},n.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,d.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:_,"comment",e?this.comment:_,"comments",e?this.comments:_])},n.prototype.add=function(e,t,s,n){if(!d.isString(e))throw TypeError("name must be a string");if(!d.isInteger(t))throw TypeError("id must be an integer");if(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(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 n&&(this.valuesOptions===_&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=s||null,this},n.prototype.remove=function(e){if(!d.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.valuesOptions&&delete this.valuesOptions[e],this},n.prototype.isReservedId=function(e){return s.isReservedId(this.reserved,e)},n.prototype.isReservedName=function(e){return s.isReservedName(this.reserved,e)}},{23:23,24:24,37:37}],16:[function(s,t,i){function d(a,t,i,n,d,E,u){if(m.isObject(n)?(u=d,E=n,n=d=_):m.isObject(d)&&(u=E,E=d,d=_),p.call(this,a,E),!m.isInteger(t)||0>t)throw TypeError("id must be a non-negative integer");if(!m.isString(i))throw TypeError("type must be a string");if(n!==_&&!l.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(d!==_&&!m.isString(d))throw TypeError("extend must be a string");this.rule=(n="proto3_optional"===n?"optional":n)&&"optional"!==n?n:_,this.type=i,this.id=t,this.extend=d||_,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!m.Long&&c.long[i]!==_,this.bytes="bytes"===i,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.o=null,this.comment=u}t.exports=d;var p=s(24),n=(((d.prototype=Object.create(p.prototype)).constructor=d).className="Field",s(15)),c=s(36),m=s(37),l=/^required|optional|repeated$/,e;d.fromJSON=function(e,t){return new d(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(d.prototype,"packed",{get:function(){return null===this.o&&(this.o=!1!==this.getOption("packed")),this.o}}),d.prototype.setOption=function(e,t,s){return"packed"===e&&(this.o=null),p.prototype.setOption.call(this,e,t,s)},d.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,m.toObject(["rule","optional"!==this.rule&&this.rule||_,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:_])},d.prototype.resolve=function(){var s;return this.resolved?this:((this.typeDefault=c.defaults[this.type])===_?(this.resolvedType=(this.declaringField||this).parent.lookupTypeOrEnum(this.type),this.typeDefault=this.resolvedType instanceof e?null:this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof n&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(this.options.packed===_||!this.resolvedType||this.resolvedType instanceof n)||delete this.options.packed,Object.keys(this.options).length||(this.options=_)),this.long?(this.typeDefault=m.Long.fromNumber(this.typeDefault,"u"==(this.type[0]||"")),Object.freeze&&Object.freeze(this.typeDefault)):this.bytes&&"string"==typeof this.typeDefault&&(m.base64.test(this.typeDefault)?m.base64.decode(this.typeDefault,s=m.newBuffer(m.base64.length(this.typeDefault)),0):m.utf8.write(this.typeDefault,s=m.newBuffer(m.utf8.length(this.typeDefault)),0),this.typeDefault=s),this.defaultValue=this.map?m.emptyObject:this.repeated?m.emptyArray:this.typeDefault,this.parent instanceof e&&(this.parent.ctor.prototype[this.name]=this.defaultValue),p.prototype.resolve.call(this))},d.d=function(o,n,a,e){return"function"==typeof n?n=m.decorateType(n).name:n&&"object"==typeof n&&(n=m.decorateEnum(n).name),function(s,t){m.decorateType(s.constructor).add(new d(t,o,n,a,{default:e}))}},d.u=function(n){e=n}},{15:15,24:24,36:36,37:37}],17:[function(e,t,s){var o=t.exports=e(18);o.build="light",o.load=function(e,t,s){return(t="function"==typeof t?(s=t,new o.Root):t||new o.Root).load(e,s)},o.loadSync=function(e,t){return(t=t||new o.Root).loadSync(e)},o.encoder=e(14),o.decoder=e(13),o.verifier=e(40),o.converter=e(12),o.ReflectionObject=e(24),o.Namespace=e(23),o.Root=e(29),o.Enum=e(15),o.Type=e(35),o.Field=e(16),o.OneOf=e(25),o.MapField=e(20),o.Service=e(33),o.Method=e(22),o.Message=e(21),o.wrappers=e(41),o.types=e(36),o.util=e(37),o.ReflectionObject.u(o.Root),o.Namespace.u(o.Type,o.Service,o.Enum),o.Root.u(o.Type),o.Field.u(o.Type)},{12:12,13:13,14:14,15:15,16:16,18:18,20:20,21:21,22:22,23:23,24:24,25:25,29:29,33:33,35:35,36:36,37:37,40:40,41:41}],18:[function(s,t,o){function n(){e.util.u(),e.Writer.u(e.BufferWriter),e.Reader.u(e.BufferReader)}var e=o;e.build="minimal",e.Writer=s(42),e.BufferWriter=s(43),e.Reader=s(27),e.BufferReader=s(28),e.util=s(39),e.rpc=s(31),e.roots=s(30),e.configure=n,n()},{27:27,28:28,30:30,31:31,39:39,42:42,43:43}],19:[function(e,t,s){t=t.exports=e(17),t.build="full",t.tokenize=e(34),t.parse=e(26),t.common=e(11),t.Root.u(t.Type,t.parse,t.common)},{11:11,17:17,26:26,34:34}],20:[function(e,t,i){function a(a,t,i,n,r,e){if(d.call(this,a,t,n,_,_,r,e),!o.isString(i))throw TypeError("keyType must be a string");this.keyType=i,this.resolvedKeyType=null,this.map=!0}t.exports=a;var d=e(16),n=(((a.prototype=Object.create(d.prototype)).constructor=a).className="MapField",e(36)),o=e(37);a.fromJSON=function(e,t){return new a(e,t.id,t.keyType,t.type,t.options,t.comment)},a.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:_])},a.prototype.resolve=function(){if(this.resolved)return this;if(n.mapKey[this.keyType]===_)throw Error("invalid key type: "+this.keyType);return d.prototype.resolve.call(this)},a.d=function(s,n,r){return"function"==typeof r?r=o.decorateType(r).name:r&&"object"==typeof r&&(r=o.decorateEnum(r).name),function(e,t){o.decorateType(e.constructor).add(new a(t,s,n,r))}}},{16:16,36:36,37:37}],21:[function(s,t,o){function n(e){if(e)for(var t=Object.keys(e),s=0;s<t.length;++s)this[t[s]]=e[t[s]]}t.exports=n;var e=s(39);n.create=function(e){return this.$type.create(e)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.fromObject=function(e){return this.$type.fromObject(e)},n.toObject=function(e,t){return this.$type.toObject(e,t)},n.prototype.toJSON=function(){return this.$type.toObject(this,e.toJSONOptions)}},{39:39}],22:[function(e,t,s){function n(a,t,i,n,r,c,m,l,E){if(p.isObject(r)?(m=r,r=c=_):p.isObject(c)&&(m=c,c=_),t!==_&&!p.isString(t))throw TypeError("type must be a string");if(!p.isString(i))throw TypeError("requestType must be a string");if(!p.isString(n))throw TypeError("responseType must be a string");d.call(this,a,m),this.type=t||"rpc",this.requestType=i,this.requestStream=!!r||_,this.responseType=n,this.responseStream=!!c||_,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=l,this.parsedOptions=E}t.exports=n;var d=e(24),p=(((n.prototype=Object.create(d.prototype)).constructor=n).className="Method",e(37));n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},n.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,p.toObject(["type","rpc"!==this.type&&this.type||_,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",e?this.comment:_,"parsedOptions",this.parsedOptions])},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),d.prototype.resolve.call(this))}},{24:24,37:37}],23:[function(d,t,i){function n(e,t){if(!e||!e.length)return _;for(var s={},n=0;n<e.length;++n)s[e[n].name]=e[n].toJSON(t);return s}function a(e,t){c.call(this,e,t),this.nested=_,this.f=null}function p(e){return e.f=null,e}t.exports=a;var c=d(24),m=(((a.prototype=Object.create(c.prototype)).constructor=a).className="Namespace",d(16)),l=d(37),E=d(25),u,g,T;a.fromJSON=function(e,t){return new a(e,t.options).addJSON(t.nested)},a.arrayToJSON=n,a.isReservedId=function(e,t){if(e)for(var s=0;s<e.length;++s)if("string"!=typeof e[s]&&e[s][0]<=t&&e[s][1]>t)return!0;return!1},a.isReservedName=function(e,t){if(e)for(var s=0;s<e.length;++s)if(e[s]===t)return!0;return!1},Object.defineProperty(a.prototype,"nestedArray",{get:function(){return this.f||(this.f=l.toArray(this.nested))}}),a.prototype.toJSON=function(e){return l.toObject(["options",this.options,"nested",n(this.nestedArray,e)])},a.prototype.addJSON=function(e){if(e)for(var t=Object.keys(e),n=0,s;n<t.length;++n)s=e[t[n]],this.add((s.fields===_?s.values===_?s.methods===_?s.id===_?a:m:g:T:u).fromJSON(t[n],s));return this},a.prototype.get=function(e){return this.nested&&this.nested[e]||null},a.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof T)return this.nested[e].values;throw Error("no such enum: "+e)},a.prototype.add=function(e){if(!(e instanceof m&&e.extend!==_||e instanceof u||e instanceof E||e instanceof T||e instanceof g||e instanceof a))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof a&&e instanceof a)||t instanceof u||t instanceof g)throw Error("duplicate name '"+e.name+"' in "+this);for(var s=t.nestedArray,n=0;n<s.length;++n)e.add(s[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return(this.nested[e.name]=e).onAdd(this),p(this)},a.prototype.remove=function(e){if(!(e instanceof c))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=_),e.onRemove(this),p(this)},a.prototype.define=function(e,s){if(l.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 o=this,i;0<e.length;)if(i=e.shift(),!(o.nested&&o.nested[i]))o.add(o=new a(i));else if(!((o=o.nested[i])instanceof a))throw Error("path conflicts with non-namespace objects");return s&&o.addJSON(s),o},a.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof a?e[t++].resolveAll():e[t++].resolve();return this.resolve()},a.prototype.lookup=function(s,o,d){if("boolean"==typeof o?(d=o,o=_):o&&!Array.isArray(o)&&(o=[o]),l.isString(s)&&s.length){if("."===s)return this.root;s=s.split(".")}else if(!s.length)return this;if(""===s[0])return this.root.lookup(s.slice(1),o);var p=this.get(s[0]);if(!p){for(var c=0;c<this.nestedArray.length;++c)if(this.f[c]instanceof a&&(p=this.f[c].lookup(s,o,!0)))return p;}else if(1===s.length){if(!o||~o.indexOf(p.constructor))return p;}else if(p instanceof a&&(p=p.lookup(s.slice(1),o,!0)))return p;return null===this.parent||d?null:this.parent.lookup(s,o)},a.prototype.lookupType=function(e){var t=this.lookup(e,[u]);if(t)return t;throw Error("no such type: "+e)},a.prototype.lookupEnum=function(e){var t=this.lookup(e,[T]);if(t)return t;throw Error("no such Enum '"+e+"' in "+this)},a.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[u,T]);if(t)return t;throw Error("no such Type or Enum '"+e+"' in "+this)},a.prototype.lookupService=function(e){var t=this.lookup(e,[g]);if(t)return t;throw Error("no such Service '"+e+"' in "+this)},a.u=function(e,t,s){u=e,g=t,T=s}},{16:16,24:24,25:25,37:37}],24:[function(s,t,i){function n(e,t){if(!a.isString(e))throw TypeError("name must be a string");if(t&&!a.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}(t.exports=n).className="ReflectionObject";var a=s(37),e;Object.defineProperties(n.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(".")}}}),n.prototype.toJSON=function(){throw Error()},n.prototype.onAdd=function(n){this.parent&&this.parent!==n&&this.parent.remove(this),this.parent=n,this.resolved=!1,n=n.root,n instanceof e&&n.h(this)},n.prototype.onRemove=function(n){n=n.root,n instanceof e&&n.a(this),this.parent=null,this.resolved=!1},n.prototype.resolve=function(){return this.resolved||this.root instanceof e&&(this.resolved=!0),this},n.prototype.getOption=function(e){return this.options?this.options[e]:_},n.prototype.setOption=function(e,t,s){return s&&this.options&&this.options[e]!==_||((this.options||(this.options={}))[e]=t),this},n.prototype.setParsedOption=function(o,i,t){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions,s,d;return t?(s=n.find(function(e){return Object.prototype.hasOwnProperty.call(e,o)}))?(d=s[o],a.setProperty(d,t,i)):((s={})[o]=a.setProperty({},t,i),n.push(s)):((d={})[o]=i,n.push(d)),this},n.prototype.setOptions=function(e,t){if(e)for(var s=Object.keys(e),n=0;n<s.length;++n)this.setOption(s[n],e[s[n]],t);return this},n.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},n.u=function(n){e=n}},{37:37}],25:[function(a,t,i){function d(e,t,s,o){if(Array.isArray(t)||(s=t,t=_),p.call(this,e,s),t!==_&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function o(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}t.exports=d;var p=a(24),e=(((d.prototype=Object.create(p.prototype)).constructor=d).className="OneOf",a(16)),r=a(37);d.fromJSON=function(e,t){return new d(e,t.oneof,t.options,t.comment)},d.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,r.toObject(["options",this.options,"oneof",this.oneof,"comment",e?this.comment:_])},d.prototype.add=function(n){if(n instanceof e)return n.parent&&n.parent!==this.parent&&n.parent.remove(n),this.oneof.push(n.name),this.fieldsArray.push(n),o(n.partOf=this),this;throw TypeError("field must be a Field")},d.prototype.remove=function(n){if(!(n instanceof e))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(n);if(0>t)throw Error(n+" is not a member of "+this);return this.fieldsArray.splice(t,1),-1<(t=this.oneof.indexOf(n.name))&&this.oneof.splice(t,1),n.partOf=null,this},d.prototype.onAdd=function(e){p.prototype.onAdd.call(this,e);for(var t=0,s;t<this.oneof.length;++t)s=e.get(this.oneof[t]),s&&!s.partOf&&(s.partOf=this).fieldsArray.push(s);o(this)},d.prototype.onRemove=function(e){for(var t=0,s;t<this.fieldsArray.length;++t)(s=this.fieldsArray[t]).parent&&s.parent.remove(s);p.prototype.onRemove.call(this,e)},d.d=function(){for(var e=Array(arguments.length),n=0;n<arguments.length;)e[n]=arguments[n++];return function(n,t){r.decorateType(n.constructor).add(new d(t,e)),Object.defineProperty(n,t,{get:r.oneOfGetter(e),set:r.oneOfSetter(e)})}}},{16:16,24:24,37:37}],26:[function(e,t,s){function ee(U,t,G){function q(e,t,s){var n=ee.filename;return s||(ee.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+Y.line+")")}function L(){var e=[],n;do if("\""!==(n=Q())&&"'"!==n)throw q(n);while((e.push(Q()),W(n),"\""===(n=J())||"'"===n));return e.join("")}function k(s){var o=Q();switch(o){case"'":case"\"":return K(o),L();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{var n=o,a=!0,r=1;switch("-"==(n[0]||"")&&(r=-1,n=n.substring(1)),n){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(i.test(n))return r*parseInt(n,10);if(l.test(n))return r*parseInt(n,16);if(T.test(n))return r*parseInt(n,8);if(S.test(n))return r*parseFloat(n);throw q(n,"number",!0)}catch(e){if(s&&D.test(o))return o;throw q(o,"value")}}function O(e,t){for(var s;t&&("\""===(s=J())||"'"===s)?e.push(L()):e.push([s=P(Q()),W("to",!0)?P(Q()):s]),W(",",!0););W(";")}function P(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(t||"-"!=(e[0]||"")){if(r.test(e))return parseInt(e,10);if(u.test(e))return parseInt(e,16);if(C.test(e))return parseInt(e,8)}throw q(e,"id")}function A(o,t){switch(t){case"option":return V(o,t),W(";"),1;case"message":return F(o),1;case"enum":return N(o),1;case"service":var i=o,a=t,d;if(R.test(a=Q()))return x(d=new m(a),function(a){if(!A(d,a)){if("rpc"!==a)throw q(a);var p=d,i=v(),n=a;if(!R.test(a=Q()))throw q(a,"name");var r=a,c,m,l;if(W("("),W("stream",!0)&&(m=!0),!D.test(a=Q()))throw q(a);if(c=a,W(")"),W("returns"),W("("),W("stream",!0)&&(l=!0),!D.test(a=Q()))throw q(a);a=a,W(")");var u=new E(r,n,c,a,m,l);u.comment=i,x(u,function(e){if("option"!==e)throw q(e);V(u,e),W(";")}),p.add(u)}}),i.add(d),1;throw q(a,"service name");case"extend":var p=o,i=t,s;if(D.test(i=Q()))return s=i,x(null,function(e){switch(e){case"required":case"repeated":H(p,e,s);break;case"optional":H(p,$?"proto3_optional":"optional",s);break;default:if(!$||!D.test(e))throw q(e);K(e),H(p,"optional",s)}}),1;throw q(i,"reference")}}function x(s,t,o){var n=Y.line,e;if(s&&("string"!=typeof s.comment&&(s.comment=v()),s.filename=ee.filename),W("{",!0)){for(;"}"!==(e=Q());)t(e);W(";",!0)}else o&&o(),W(";"),s&&("string"!=typeof s.comment||M)&&(s.comment=v(n)||s.comment)}function F(e,t){if(!R.test(t=Q()))throw q(t,"type name");var a=new n(t);x(a,function(d){if(!A(a,d))switch(d){case"map":var t=a,i=(W("<"),Q());if(y.mapKey[i]===_)throw q(i,"type");W(",");var m=Q();if(!D.test(m))throw q(m,"type");W(">");var r=Q();if(!R.test(r))throw q(r,"name");W("=");var l=new p(X(r),P(Q()),i,m);x(l,function(e){if("option"!==e)throw q(e);V(l,e),W(";")},function(){j(l)}),t.add(l);break;case"required":case"repeated":H(a,d);break;case"optional":H(a,$?"proto3_optional":"optional");break;case"oneof":if(r=a,i=d,!R.test(i=Q()))throw q(i,"name");var s=new c(X(i));x(s,function(e){"option"===e?(V(s,e),W(";")):(K(e),H(s,"optional"))}),r.add(s);break;case"extensions":O(a.extensions||(a.extensions=[]));break;case"reserved":O(a.reserved||(a.reserved=[]),!0);break;default:if(!$||!D.test(d))throw q(d);K(d),H(a,"optional")}}),e.add(a)}function H(p,t,i){var m=Q();if("group"===m){var l=p,o=t,E=Q(),T,C;if(R.test(E))return C=g.lcFirst(E),E===C&&(E=g.ucFirst(E)),W("="),S=P(Q()),(T=new n(E)).group=!0,(C=new d(C,S,E,o)).filename=ee.filename,x(T,function(e){switch(e){case"option":V(T,e),W(";");break;case"required":case"repeated":H(T,e);break;case"optional":H(T,$?"proto3_optional":"optional");break;case"message":F(T);break;case"enum":N(T);break;default:throw q(e)}}),void l.add(T).add(C);throw q(E,"name")}for(;m.endsWith(".")||J().startsWith(".");)m+=Q();if(!D.test(m))throw q(m,"type");var S=Q();if(!R.test(S))throw q(S,"name");S=X(S),W("=");var O=new d(S,P(Q()),m,t,i);x(O,function(e){if("option"!==e)throw q(e);V(O,e),W(";")},function(){j(O)}),"proto3_optional"===t?(o=new c("_"+S),O.setOption("proto3_optional",!0),o.add(O),p.add(o)):p.add(O),$||!O.repeated||y.packed[m]===_&&y.basic[m]!==_||O.setOption("packed",!1,!0)}function N(e,t){if(!R.test(t=Q()))throw q(t,"name");var a=new o(t);x(a,function(s){switch(s){case"option":V(a,s),W(";");break;case"reserved":O(a.reserved||(a.reserved=[]),!0);break;default:var t=a,o=s;if(!R.test(o))throw q(o,"name");W("=");var n=P(Q(),!0),i={options:_,setOption:function(e,t){this.options===_&&(this.options={}),this.options[e]=t}};return x(i,function(e){if("option"!==e)throw q(e);V(i,e),W(";")},function(){j(i)}),void t.add(o,n,i.comment,i.options)}}),e.add(a)}function V(o,t){var a=W("(",!0);if(!D.test(t=Q()))throw q(t,"name");var d=t,p=d,a=(a&&(W(")"),p=d="("+d+")",t=J(),f.test(t)&&(c=t.slice(1),d+=t,Q())),W("="),function n(a,i){if(W("{",!0)){for(var t={};!W("}",!0);){if(!R.test(oe=Q()))throw q(oe,"name");if(null===oe)throw q(oe,"end of input");var r=oe,d,p;if(W(":",!0),"{"===J())d=n(a,i+"."+oe);else if("["!==J())d=k(!0),B(a,i+"."+oe,d);else if(d=[],W("[",!0)){for(;p=k(!0),d.push(p),W(",",!0););W("]"),void 0!==p&&B(a,i+"."+oe,p)}var c=t[r];c&&(d=[].concat(c).concat(d)),t[r]=d,W(",",!0),W(";",!0)}return t}var m=k(!0);return B(a,i,m),m}(o,d)),c;t=p,d=a,p=c,(a=o).setParsedOption&&a.setParsedOption(t,d,p)}function B(e,t,s){e.setOption&&e.setOption(t,s)}function j(e){if(W("[",!0)){for(;V(e,"option"),W(",",!0););W("]")}}t instanceof I||(G=t,t=new I);for(var M=(G=G||ee.defaults).preferTrailingComment||!1,Y=a(U,G.alternateCommentMode||!1),Q=Y.next,K=Y.push,J=Y.peek,W=Y.skip,v=Y.cmnt,b=!0,$=!1,z=t,X=G.keepCase?function(e){return e}:g.camelCase,Z,te,ne,se,oe,ie,re;null!==(oe=Q());)switch(oe){case"package":if(!b)throw q(oe);if(Z!==_)throw q("package");if(Z=Q(),!D.test(Z))throw q(Z,"name");z=z.define(Z),W(";");break;case"import":if(!b)throw q(oe);switch(re=ie=void 0,J()){case"weak":re=ne=ne||[],Q();break;case"public":Q();default:re=te=te||[]}ie=L(),W(";"),re.push(ie);break;case"syntax":if(!b)throw q(oe);if(W("="),se=L(),!($="proto3"===se)&&"proto2"!==se)throw q(se,"syntax");W(";");break;case"option":V(z,oe),W(";");break;default:if(A(z,oe)){b=!1;continue}throw q(oe)}return ee.filename=null,{package:Z,imports:te,weakImports:ne,syntax:se,root:t}}(t.exports=ee).filename=null,ee.defaults={keepCase:!1};var a=e(34),I=e(29),n=e(35),d=e(16),p=e(20),c=e(25),o=e(15),m=e(33),E=e(22),y=e(36),g=e(37),i=/^[1-9][0-9]*$/,r=/^-?[1-9][0-9]*$/,l=/^0[x][0-9a-fA-F]+$/,u=/^-?0[x][0-9a-fA-F]+$/,T=/^0[0-7]+$/,C=/^-?0[0-7]+$/,S=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,R=/^[a-zA-Z_][a-zA-Z_0-9]*$/,D=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,f=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/},{15:15,16:16,20:20,22:22,25:25,29:29,33:33,34:34,35:35,36:36,37:37}],27:[function(m,t,i){function E(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function n(e){this.buf=e,this.pos=0,this.len=e.length}function u(){return p.Buffer?function(e){return(n.create=function(e){return p.Buffer.isBuffer(e)?new c(e):o(e)})(e)}:o}function g(){var n=new e(0,0),t=0;if(!(4<this.len-this.pos)){for(;3>t;++t){if(this.pos>=this.len)throw E(this);if(n.lo=(n.lo|(127&this.buf[this.pos])<<7*t)>>>0,128>this.buf[this.pos++])return n}return n.lo=(n.lo|(127&this.buf[this.pos++])<<7*t)>>>0,n}for(;4>t;++t)if(n.lo=(n.lo|(127&this.buf[this.pos])<<7*t)>>>0,128>this.buf[this.pos++])return n;if(n.lo=(n.lo|(127&this.buf[this.pos])<<28)>>>0,n.hi=(n.hi|(127&this.buf[this.pos])>>4)>>>0,128>this.buf[this.pos++])return n;if(t=0,4<this.len-this.pos){for(;5>t;++t)if(n.hi=(n.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,128>this.buf[this.pos++])return n;}else for(;5>t;++t){if(this.pos>=this.len)throw E(this);if(n.hi=(n.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,128>this.buf[this.pos++])return n}throw Error("invalid varint encoding")}function l(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw E(this,8);return new e(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}t.exports=n;var p=m(39),e=p.LongBits,s=p.utf8,o="undefined"==typeof Uint8Array?function(e){if(Array.isArray(e))return new n(e);throw Error("illegal buffer")}:function(e){if(e instanceof Uint8Array||Array.isArray(e))return new n(e);throw Error("illegal buffer")},c,T;n.create=u(),n.prototype.c=p.Array.prototype.subarray||p.Array.prototype.slice,n.prototype.uint32=(T=4294967295,function(){if(T=(127&this.buf[this.pos])>>>0,128>this.buf[this.pos++]||(T=(T|(127&this.buf[this.pos])<<7)>>>0,128>this.buf[this.pos++]||(T=(T|(127&this.buf[this.pos])<<14)>>>0,128>this.buf[this.pos++]||(T=(T|(127&this.buf[this.pos])<<21)>>>0,128>this.buf[this.pos++]||(T=(T|(15&this.buf[this.pos])<<28)>>>0,128>this.buf[this.pos++]||!((this.pos+=5)>this.len))))))return T;throw this.pos=this.len,E(this,10)}),n.prototype.int32=function(){return 0|this.uint32()},n.prototype.sint32=function(){var e=this.uint32();return 0|e>>>1^-(1&e)},n.prototype.bool=function(){return 0!==this.uint32()},n.prototype.fixed32=function(){if(this.pos+4>this.len)throw E(this,4);return l(this.buf,this.pos+=4)},n.prototype.sfixed32=function(){if(this.pos+4>this.len)throw E(this,4);return 0|l(this.buf,this.pos+=4)},n.prototype.float=function(){if(this.pos+4>this.len)throw E(this,4);var e=p.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},n.prototype.double=function(){if(this.pos+8>this.len)throw E(this,4);var e=p.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},n.prototype.bytes=function(){var e=this.uint32(),s=this.pos,o=this.pos+e;if(o>this.len)throw E(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(s,o):s===o?(e=p.Buffer)?e.alloc(0):new this.buf.constructor(0):this.c.call(this.buf,s,o)},n.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},n.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw E(this,e);this.pos+=e}else do if(this.pos>=this.len)throw E(this);while(128&this.buf[this.pos++]);return this},n.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},n.u=function(e){c=e,n.create=u(),c.u();var t=p.Long?"toLong":"toNumber";p.merge(n.prototype,{int64:function(){return g.call(this)[t](!1)},uint64:function(){return g.call(this)[t](!0)},sint64:function(){return g.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},{39:39}],28:[function(o,t,i){function n(e){s.call(this,e)}t.exports=n;var s=o(27),r=((n.prototype=Object.create(s.prototype)).constructor=n,o(39));n.u=function(){r.Buffer&&(n.prototype.c=r.Buffer.prototype.slice)},n.prototype.string=function(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=e(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=e(this.pos+n,this.len))},n.u()},{27:27,39:39}],29:[function(c,t,i){function n(e){a.call(this,"",e),this.deferred=[],this.files=[]}function m(){}function l(s,t){var o=t.parent.lookup(t.extend),i;if(o)return i=new e(t.fullName,t.id,t.type,t.rule,_,t.options),o.get(i.name)||((i.declaringField=t).extensionField=i,o.add(i)),1}t.exports=n;var a=c(23),e=(((n.prototype=Object.create(a.prototype)).constructor=n).className="Root",c(16)),s=c(15),o=c(25),E=c(37),u,g,T;n.fromJSON=function(e,t){return t=t||new n,e.options&&t.setOptions(e.options),t.addJSON(e.nested)},n.prototype.resolvePath=E.path.resolve,n.prototype.fetch=E.fetch,n.prototype.load=function C(d,p,y){function S(e,t){if(y){if(o)throw e;var s=y;y=null,s(e,t)}}function O(e){var n=e.lastIndexOf("google/protobuf/");return-1<n&&(e=e.substring(n),e in T)?e:null}function f(s,t){try{if(E.isString(t)&&"{"==(t[0]||"")&&(t=JSON.parse(t)),E.isString(t)){g.filename=s;var d=g(t,c,p),r=0,m;if(d.imports)for(;r<d.imports.length;++r)(m=O(d.imports[r])||c.resolvePath(s,d.imports[r]))&&a(m);if(d.weakImports)for(r=0;r<d.weakImports.length;++r)(m=O(d.weakImports[r])||c.resolvePath(s,d.weakImports[r]))&&a(m,!0)}else c.setOptions(t.options).addJSON(t.nested)}catch(e){S(e)}o||u||S(null,c)}function a(e,s){if(e=O(e)||e,!~c.files.indexOf(e))if(c.files.push(e),e in T)o?f(e,T[e]):(++u,setTimeout(function(){--u,f(e,T[e])}));else if(o){var i;try{i=E.fs.readFileSync(e).toString("utf8")}catch(e){return void(s||S(e))}f(e,i)}else++u,c.fetch(e,function(n,t){--u,y&&(n?s?u||S(null,c):S(n):f(e,t))})}"function"==typeof p&&(y=p,p=_);var c=this;if(!y)return E.asPromise(C,c,d,p);var o=y===m,u=0;E.isString(d)&&(d=[d]);for(var t=0,I;t<d.length;++t)(I=c.resolvePath("",d[t]))&&a(I);return o?c:(u||S(null,c),_)},n.prototype.loadSync=function(e,t){if(E.isNode)return this.load(e,t,m);throw Error("not supported")},n.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 a.prototype.resolveAll.call(this)};var y=/^[A-Z]/;n.prototype.h=function(r){if(r instanceof e)r.extend===_||r.extensionField||l(0,r)||this.deferred.push(r);else if(r instanceof s)y.test(r.name)&&(r.parent[r.name]=r.values);else if(!(r instanceof o)){if(r instanceof u)for(var t=0;t<this.deferred.length;)l(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var a=0;a<r.nestedArray.length;++a)this.h(r.f[a]);y.test(r.name)&&(r.parent[r.name]=r)}},n.prototype.a=function(o){var t;if(o instanceof e)o.extend!==_&&(o.extensionField?(o.extensionField.parent.remove(o.extensionField),o.extensionField=null):-1<(t=this.deferred.indexOf(o))&&this.deferred.splice(t,1));else if(o instanceof s)y.test(o.name)&&delete o.parent[o.name];else if(o instanceof a){for(var r=0;r<o.nestedArray.length;++r)this.a(o.f[r]);y.test(o.name)&&delete o.parent[o.name]}},n.u=function(e,t,s){u=e,g=t,T=s}},{15:15,16:16,23:23,25:25,37:37}],30:[function(e,t,s){t.exports={}},{}],31:[function(e,t,s){s.Service=e(32)},{32:32}],32:[function(e,t,s){function n(e,t,s){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");a.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!s}t.exports=n;var a=e(39);((n.prototype=Object.create(a.EventEmitter.prototype)).constructor=n).prototype.rpcCall=function s(d,n,p,i,e){if(!i)throw TypeError("request must be specified");var r=this;if(!e)return a.asPromise(s,r,d,n,p,i);if(!r.rpcImpl)return setTimeout(function(){e(Error("already ended"))},0),_;try{return r.rpcImpl(d,n[r.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(n,t){if(n)return r.emit("error",n,d),e(n);if(null===t)return r.end(!0),_;if(!(t instanceof p))try{t=p[r.responseDelimited?"decodeDelimited":"decode"](t)}catch(n){return r.emit("error",n,d),e(n)}return r.emit("data",t,d),e(null,t)})}catch(n){return r.emit("error",n,d),setTimeout(function(){e(n)},0),_}},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{39:39}],33:[function(a,t,i){function d(n,t){e.call(this,n,t),this.methods={},this.l=null}function n(e){return e.l=null,e}t.exports=d;var e=a(23),o=(((d.prototype=Object.create(e.prototype)).constructor=d).className="Service",a(22)),p=a(37),c=a(31);d.fromJSON=function(s,t){var i=new d(s,t.options);if(t.methods)for(var n=Object.keys(t.methods),r=0;r<n.length;++r)i.add(o.fromJSON(n[r],t.methods[n[r]]));return t.nested&&i.addJSON(t.nested),i.comment=t.comment,i},d.prototype.toJSON=function(s){var t=e.prototype.toJSON.call(this,s),o=!!s&&!!s.keepComments;return p.toObject(["options",t&&t.options||_,"methods",e.arrayToJSON(this.methodsArray,s)||{},"nested",t&&t.nested||_,"comment",o?this.comment:_])},Object.defineProperty(d.prototype,"methodsArray",{get:function(){return this.l||(this.l=p.toArray(this.methods))}}),d.prototype.get=function(n){return this.methods[n]||e.prototype.get.call(this,n)},d.prototype.resolveAll=function(){for(var n=this.methodsArray,t=0;t<n.length;++t)n[t].resolve();return e.prototype.resolve.call(this)},d.prototype.add=function(s){if(this.get(s.name))throw Error("duplicate name '"+s.name+"' in "+this);return s instanceof o?n((this.methods[s.name]=s).parent=this):e.prototype.add.call(this,s)},d.prototype.remove=function(s){if(s instanceof o){if(this.methods[s.name]!==s)throw Error(s+" is not a member of "+this);return delete this.methods[s.name],s.parent=null,n(this)}return e.prototype.remove.call(this,s)},d.prototype.create=function(a,t,i){for(var n=new c.Service(a,t,i),e=0,d,m;e<this.methodsArray.length;++e)m=p.lcFirst((d=this.l[e]).resolve().name).replace(/[^$\w_]/g,""),n[m]=p.codegen(["r","c"],p.isReserved(m)?m+"_":m)("return this.rpcCall(m,q,s,r,c)")({m:d,q:d.resolvedRequestType.ctor,s:d.resolvedResponseType.ctor});return n}},{22:22,23:23,31:31,37:37}],34:[function(o,t,i){function n(e){return e.replace(u,function(e,t){return"\\"===t||""===t?t:r[t]||""})}function a(T,C){function a(e){return Error("illegal "+e+" (line "+I+")")}function y(e){return T[0|e]||""}function t(a,d,i){var p={type:T[0|a++]||"",lineEmpty:!1,leading:i},i=C?2:3,e=a-i,E;do if(0>--e||"\n"==(E=T[0|e]||"")){p.lineEmpty=!0;break}while(" "===E||"\t"===E);for(var g=T.substring(a,d).split(l),o=0;o<g.length;++o)g[o]=g[o].replace(C?m:c,"").trim();p.text=g.join("\n").trim(),A[I]=p,R=I}function i(e){var n=g(e),e=T.substring(e,n);return /^\s*\/\//.test(e)}function g(e){for(var t=e;t<O&&"\n"!==y(t);)t++;return t}function o(){if(0<N.length)return N.shift();if(M){var c="'"===M?d:s,m=(c.lastIndex=S-1,c.exec(T));if(m)return S=c.lastIndex,r(M),M=null,n(m[1]);throw a("string")}var d=0===S,l,_,R,A,v;do{if(S===O)return null;for(l=!1;E.test(R=y(S));)if("\n"===R&&(d=!0,++I),++S===O)return null;if("/"===y(S)){if(++S===O)throw a("comment");if("/"!==y(S)){if("*"!==(R=y(S)))return"/";A=S+1,v=C||"*"===y(A);do if("\n"===R&&++I,++S===O)throw a("comment");while((_=R,R=y(S),"*"!==_||"/"!==R));++S,v&&(t(A,S-2,d),d=!0)}else if(C){if(v=!1,i((A=S)-1))for(v=!0;(S=g(S))!==O&&(S++,d&&i(S)););else S=e(O,g(S)+1);v&&(t(A,S,d),d=!0),I++}else{for(v="/"===y(A=S+1);"\n"!==y(++S);)if(S===O)return null;++S,v&&(t(A,S-1,d),d=!0),++I}l=!0}}while(l);var h=S;if(p.lastIndex=0,!p.test(y(h++)))for(;h<O&&!p.test(y(h));)++h;return c=T.substring(S,S=h),"\""!=c&&"'"!=c||(M=c),c}function r(e){N.push(e)}function u(){if(!N.length){var e=o();if(null===e)return null;r(e)}return N[0]}T=T.toString();var S=0,O=T.length,I=1,R=0,A={},N=[],M=null;return Object.defineProperty({next:o,peek:u,push:r,skip:function(e,t){var s=u();if(s===e)return o(),!0;if(t)return!1;throw a("token '"+s+"', '"+e+"' expected")},cmnt:function(e){var t=null,s;return e===_?(s=A[I-1],delete A[I-1],s&&(C||"*"===s.type||s.lineEmpty)&&(t=s.leading?s.text:null)):(R<e&&u(),s=A[e],delete A[e],!s||s.lineEmpty||!C&&"/"!==s.type||(t=s.leading?null:s.text)),t}},"line",{get:function(){return I}})}t.exports=a;var p=/[\s{}=;:[\],'"()<>]/g,s=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,d=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,c=/^ *[*/]+ */,m=/^\s*\*?\/*/,l=/\n/g,E=/\s/,u=/\\(.?)/g,r={0:"\0",r:"\r",n:"\n",t:"\t"};a.unescape=n},{}],35:[function(E,t,i){function g(e,t){m.call(this,e,t),this.fields={},this.oneofs=_,this.extensions=_,this.reserved=_,this.group=_,this.p=null,this.e=null,this.v=null,this.b=null}function n(e){return e.p=e.e=e.v=null,delete e.encode,delete e.decode,delete e.verify,e}t.exports=g;var m=E(23),o=(((g.prototype=Object.create(m.prototype)).constructor=g).className="Type",E(15)),u=E(25),T=E(16),C=E(20),a=E(33),r=E(21),e=E(27),s=E(42),c=E(37),d=E(14),p=E(13),l=E(40),S=E(12),y=E(41);Object.defineProperties(g.prototype,{fieldsById:{get:function(){if(!this.p){this.p={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var s=this.fields[e[t]],o=s.id;if(this.p[o])throw Error("duplicate id "+o+" in "+this);this.p[o]=s}}return this.p}},fieldsArray:{get:function(){return this.e||(this.e=c.toArray(this.fields))}},oneofsArray:{get:function(){return this.v||(this.v=c.toArray(this.oneofs))}},ctor:{get:function(){return this.b||(this.ctor=g.generateConstructor(this)())},set:function(e){for(var t=e.prototype,s=(t instanceof r||((e.prototype=new r).constructor=e,c.merge(e.prototype,t)),e.$type=e.prototype.$type=this,c.merge(e,r,!0),this.b=e,0);s<this.fieldsArray.length;++s)this.e[s].resolve();for(var o={},s=0;s<this.oneofsArray.length;++s)o[this.v[s].resolve().name]={get:c.oneOfGetter(this.v[s].oneof),set:c.oneOfSetter(this.v[s].oneof)};s&&Object.defineProperties(e.prototype,o)}}}),g.generateConstructor=function(e){for(var t=c.codegen(["p"],e.name),n=0,s;n<e.fieldsArray.length;++n)(s=e.e[n]).map?t("this%s={}",c.safeProp(s.name)):s.repeated&&t("this%s=[]",c.safeProp(s.name));return t("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},g.fromJSON=function(d,t){for(var i=new g(d,t.options),n=(i.extensions=t.extensions,i.reserved=t.reserved,Object.keys(t.fields)),p=0;p<n.length;++p)i.add((void 0===t.fields[n[p]].keyType?T:C).fromJSON(n[p],t.fields[n[p]]));if(t.oneofs)for(n=Object.keys(t.oneofs),p=0;p<n.length;++p)i.add(u.fromJSON(n[p],t.oneofs[n[p]]));if(t.nested)for(n=Object.keys(t.nested),p=0;p<n.length;++p){var c=t.nested[n[p]];i.add((c.id===_?c.fields===_?c.values===_?c.methods===_?m:a:o:g:T).fromJSON(n[p],c))}return t.extensions&&t.extensions.length&&(i.extensions=t.extensions),t.reserved&&t.reserved.length&&(i.reserved=t.reserved),t.group&&(i.group=!0),t.comment&&(i.comment=t.comment),i},g.prototype.toJSON=function(e){var t=m.prototype.toJSON.call(this,e),s=!!e&&!!e.keepComments;return c.toObject(["options",t&&t.options||_,"oneofs",m.arrayToJSON(this.oneofsArray,e),"fields",m.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:_,"reserved",this.reserved&&this.reserved.length?this.reserved:_,"group",this.group||_,"nested",t&&t.nested||_,"comment",s?this.comment:_])},g.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();for(var s=this.oneofsArray,t=0;t<s.length;)s[t++].resolve();return m.prototype.resolveAll.call(this)},g.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},g.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof T&&e.extend===_){if((this.p||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).message=this,e.onAdd(this),n(this)}return e instanceof u?(this.oneofs||(this.oneofs={}),(this.oneofs[e.name]=e).onAdd(this),n(this)):m.prototype.add.call(this,e)},g.prototype.remove=function(e){if(e instanceof T&&e.extend===_){if(this.fields&&this.fields[e.name]===e)return delete this.fields[e.name],e.parent=null,e.onRemove(this),n(this);throw Error(e+" is not a member of "+this)}if(e instanceof u){if(this.oneofs&&this.oneofs[e.name]===e)return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),n(this);throw Error(e+" is not a member of "+this)}return m.prototype.remove.call(this,e)},g.prototype.isReservedId=function(e){return m.isReservedId(this.reserved,e)},g.prototype.isReservedName=function(e){return m.isReservedName(this.reserved,e)},g.prototype.create=function(e){return new this.ctor(e)},g.prototype.setup=function(){for(var o=this.fullName,a=[],i=0;i<this.fieldsArray.length;++i)a.push(this.e[i].resolve().resolvedType);this.encode=d(this)({Writer:s,types:a,util:c}),this.decode=p(this)({Reader:e,types:a,util:c}),this.verify=l(this)({types:a,util:c}),this.fromObject=S.fromObject(this)({types:a,util:c}),this.toObject=S.toObject(this)({types:a,util:c});var o=y[o],m;return o&&((m=Object.create(this)).fromObject=this.fromObject,this.fromObject=o.fromObject.bind(m),m.toObject=this.toObject,this.toObject=o.toObject.bind(m)),this},g.prototype.encode=function(e,t){return this.setup().encode(e,t)},g.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},g.prototype.decode=function(e,t){return this.setup().decode(e,t)},g.prototype.decodeDelimited=function(n){return n instanceof e||(n=e.create(n)),this.decode(n,n.uint32())},g.prototype.verify=function(e){return this.setup().verify(e)},g.prototype.fromObject=function(e){return this.setup().fromObject(e)},g.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},g.d=function(e){return function(n){c.decorateType(n,e)}}},{12:12,13:13,14:14,15:15,16:16,20:20,21:21,23:23,25:25,27:27,33:33,37:37,40:40,41:41,42:42}],36:[function(s,o,i){function n(e,t){var s=0,o={};for(t|=0;s<e.length;)o[a[s+t]]=e[s++];return o}var s=s(37),a=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{37:37}],37:[function(d,n,t){var p=n.exports=d(39),s=d(30),o=(p.codegen=d(3),p.fetch=d(5),p.path=d(8),p.fs=p.inquire("fs"),p.toArray=function(e){if(e){for(var t=Object.keys(e),s=Array(t.length),n=0;n<t.length;)s[n]=e[t[n++]];return s}return[]},p.toObject=function(s){for(var t={},o=0;o<s.length;){var i=s[o++],a=s[o++];a!==_&&(t[i]=a)}return t},/\\/g),i=/"/g,c=(p.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)},p.safeProp=function(e){return!/^[$\w_]+$/.test(e)||p.isReserved(e)?"[\""+e.replace(o,"\\\\").replace(i,"\\\"")+"\"]":"."+e},p.ucFirst=function(e){return(e[0]||"").toUpperCase()+e.substring(1)},/_([a-z])/g),m=(p.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,function(e,t){return t.toUpperCase()})},p.compareFieldsById=function(e,t){return e.id-t.id},p.decorateType=function(e,t){return e.$type?(t&&e.$type.name!==t&&(p.decorateRoot.remove(e.$type),e.$type.name=t,p.decorateRoot.add(e.$type)),e.$type):(t=new(l=l||d(35))(t||e.name),p.decorateRoot.add(t),t.ctor=e,Object.defineProperty(e,"$type",{value:t,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:t,enumerable:!1}),t)},0),l,E;p.decorateEnum=function(e){var t;return e.$type||(t=new(E=E||d(15))("Enum"+m++,e),p.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t)},p.setProperty=function(e,t,s){if("object"!=typeof e)throw TypeError("dst must be an object");if(t)return function a(s,o,i){var t=o.shift();return"__proto__"!==t&&"prototype"!==t&&(0<o.length?s[t]=a(s[t]||{},o,i):((o=s[t])&&(i=[].concat(o).concat(i)),s[t]=i)),s}(e,t=t.split("."),s);throw TypeError("path must be specified")},Object.defineProperty(p,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(d(29)))}})},{15:15,29:29,3:3,30:30,35:35,39:39,5:5,8:8}],38:[function(a,t,i){function d(e,t){this.lo=e>>>0,this.hi=t>>>0}t.exports=d;var e=a(39),r=d.zero=new d(0,0),n=(r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1},d.zeroHash="\0\0\0\0\0\0\0\0",d.fromNumber=function(e){var s,o;return 0===e?r:(o=(e=(s=0>e)?-e:e)>>>0,e=(e-o)/4294967296>>>0,s&&(e=~e>>>0,o=~o>>>0,4294967295<++o&&(o=0,4294967295<++e&&(e=0))),new d(o,e))},d.from=function(n){if("number"==typeof n)return d.fromNumber(n);if(e.isString(n)){if(!e.Long)return d.fromNumber(parseInt(n,10));n=e.Long.fromString(n)}return n.low||n.high?new d(n.low>>>0,n.high>>>0):r},d.prototype.toNumber=function(e){var n;return!e&&this.hi>>>31?(e=1+~this.lo>>>0,n=~this.hi>>>0,-(e+4294967296*(n=e?n:n+1>>>0))):this.lo+4294967296*this.hi},d.prototype.toLong=function(n){return e.Long?new e.Long(0|this.lo,0|this.hi,!!n):{low:0|this.lo,high:0|this.hi,unsigned:!!n}},String.prototype.charCodeAt);d.fromHash=function(e){return"\0\0\0\0\0\0\0\0"===e?r:new d((n.call(e,0)|n.call(e,1)<<8|n.call(e,2)<<16|n.call(e,3)<<24)>>>0,(n.call(e,4)|n.call(e,5)<<8|n.call(e,6)<<16|n.call(e,7)<<24)>>>0)},d.prototype.toHash=function(){return p(255&this.lo,255&this.lo>>>8,255&this.lo>>>16,this.lo>>>24,255&this.hi,255&this.hi>>>8,255&this.hi>>>16,this.hi>>>24)},d.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},d.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},d.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0==s?0==t?16384>e?128>e?1:2:2097152>e?3:4:16384>t?128>t?5:6:2097152>t?7:8:128>s?9:10}},{39:39}],39:[function(o,t,i){function a(s,t,o){for(var n=Object.keys(t),i=0;i<n.length;++i)s[n[i]]!==_&&o||(s[n[i]]=t[n[i]]);return s}function e(e){function s(e,t){return this instanceof s?void(Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,s):Object.defineProperty(this,"stack",{value:Error().stack||""}),t&&a(this,t)):new s(e,t)}return s.prototype=Object.create(Error.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:_,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),s}var s=i;s.asPromise=o(1),s.base64=o(2),s.EventEmitter=o(4),s.float=o(6),s.inquire=o(7),s.utf8=o(10),s.pool=o(9),s.LongBits=o(38),s.isNode=!!("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),s.global=s.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&d(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.isset=s.isSet=function(e,t){var s=e[t];return null!=s&&e.hasOwnProperty(t)&&("object"!=typeof s||0<(Array.isArray(s)?s:Object.keys(s)).length)},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),s.y=null,s.w=null,s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.w(e):new s.Array(e):s.Buffer?s.y(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"==typeof Uint8Array?Array:Uint8Array,s.Long=s.global.dcodeIO&&s.global.dcodeIO.Long||s.global.Long||s.inquire("long"),s.key2Re=/^true|false|0|1$/,s.key32Re=/^-?(?:0|[1-9][0-9]*)$/,s.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,n){return e=s.LongBits.fromHash(e),s.Long?s.Long.fromBits(e.lo,e.hi,n):e.toNumber(!!n)},s.merge=a,s.lcFirst=function(e){return(e[0]||"").toLowerCase()+e.substring(1)},s.newError=e,s.ProtocolError=e("ProtocolError"),s.oneOfGetter=function(e){for(var s={},t=0;t<e.length;++t)s[e[t]]=1;return function(){for(var e=Object.keys(this),t=e.length-1;-1<t;--t)if(1===s[e[t]]&&this[e[t]]!==_&&null!==this[e[t]])return e[t]}},s.oneOfSetter=function(e){return function(n){for(var t=0;t<e.length;++t)e[t]!==n&&delete this[e[t]]}},s.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},s.u=function(){var e=s.Buffer;e?(s.y=e.from!==Uint8Array.from&&e.from||function(n,t){return new e(n,t)},s.w=e.allocUnsafe||function(n){return new e(n)}):s.y=s.w=null}},{1:1,10:10,2:2,38:38,4:4,6:6,7:7,9:9}],40:[function(e,t,s){function d(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(o,t,i,n){if(!t.resolvedType)switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":o("if(!util.isInteger(%s))",n)("return%j",d(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":o("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",d(t,"integer|Long"));break;case"float":case"double":o("if(typeof %s!==\"number\")",n)("return%j",d(t,"number"));break;case"bool":o("if(typeof %s!==\"boolean\")",n)("return%j",d(t,"boolean"));break;case"string":o("if(!util.isString(%s))",n)("return%j",d(t,"string"));break;case"bytes":o("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))",n,n,n)("return%j",d(t,"buffer"))}else if(t.resolvedType instanceof a){o("switch(%s){",n)("default:")("return%j",d(t,"enum value"));for(var r=Object.keys(t.resolvedType.values),e=0;e<r.length;++e)o("case %i:",t.resolvedType.values[r[e]]);o("break")("}")}else o("{")("var e=types[%i].verify(%s);",i,n)("if(e)")("return%j+e",t.name+".")("}");return o}t.exports=function(a){var t=p.codegen(["m"],a.name+"$verify")("if(typeof m!==\"object\"||m===null)")("return%j","object expected"),i=a.oneofsArray,c={};i.length&&t("var p={}");for(var r=0;r<a.fieldsArray.length;++r){var m=a.e[r].resolve(),l="m"+p.safeProp(m.name),E;m.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",l,m.name),m.map?(t("if(!util.isObject(%s))",l)("return%j",d(m,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),function(e,t,s){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",s)("return%j",d(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",s)("return%j",d(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",s)("return%j",d(t,"boolean key"))}}(t,m,"k[i]"),n(t,m,r,l+"[k[i]]")("}")):m.repeated?(t("if(!Array.isArray(%s))",l)("return%j",d(m,"array"))("for(var i=0;i<%s.length;++i){",l),n(t,m,r,l+"[i]")("}")):(m.partOf&&(E=p.safeProp(m.partOf.name),1===c[m.partOf.name]&&t("if(p%s===1)",E)("return%j",m.partOf.name+": multiple values"),c[m.partOf.name]=1,t("p%s=1",E)),n(t,m,r,l)),m.optional&&t("}")}return t("return null")};var a=e(15),p=e(37)},{15:15,37:37}],41:[function(e,t,s){var a=e(21);s[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(1+e["@type"].lastIndexOf("/")),t=this.lookup(t),s;if(t)return~(s="."==(e["@type"][0]||"")?e["@type"].slice(1):e["@type"]).indexOf("/")||(s="/"+s),this.create({type_url:s,value:t.encode(t.fromObject(e)).finish()})}return this.fromObject(e)},toObject:function(o,d){var i="",p="",c,m;return d&&d.json&&o.type_url&&o.value&&(p=o.type_url.substring(1+o.type_url.lastIndexOf("/")),i=o.type_url.substring(0,1+o.type_url.lastIndexOf("/")),(c=this.lookup(p))&&(o=c.decode(o.value))),!(o instanceof this.ctor)&&o instanceof a?(c=o.$type.toObject(o,d),m="."===o.$type.fullName[0]?o.$type.fullName.slice(1):o.$type.fullName,c["@type"]=p=(i=""===i?"type.googleapis.com/":i)+m,c):this.toObject(o,d)}}},{21:21}],42:[function(m,t,i){function E(e,t,s){this.fn=e,this.len=t,this.next=_,this.val=s}function n(){}function g(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function a(){this.len=0,this.head=new E(n,0,0),this.tail=this.head,this.states=null}function c(){return C.Buffer?function(){return(a.create=function(){return new u})()}:function(){return new a}}function l(e,t,s){t[s]=255&e}function d(e,t){this.len=e,this.next=_,this.val=t}function p(e,t,s){for(;e.hi;)t[s++]=128|127&e.lo,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;127<e.lo;)t[s++]=128|127&e.lo,e.lo>>>=7;t[s++]=e.lo}function T(e,t,s){t[s]=255&e,t[s+1]=255&e>>>8,t[s+2]=255&e>>>16,t[s+3]=e>>>24}t.exports=a;var C=m(39),e=C.LongBits,s=C.base64,o=C.utf8,u;a.create=c(),a.alloc=function(e){return new C.Array(e)},C.Array!==Array&&(a.alloc=C.pool(a.alloc,C.Array.prototype.subarray)),a.prototype.g=function(e,t,s){return this.tail=this.tail.next=new E(e,t,s),this.len+=t,this},(d.prototype=Object.create(E.prototype)).fn=function(e,s,o){for(;127<e;)s[o++]=128|127&e,e>>>=7;s[o]=e},a.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new d(128>(e>>>=0)?1:16384>e?2:2097152>e?3:268435456>e?4:5,e)).len,this},a.prototype.int32=function(n){return 0>n?this.g(p,10,e.fromNumber(n)):this.uint32(n)},a.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(n){return n=e.from(n),this.g(p,n.length(),n)},a.prototype.sint64=function(n){return n=e.from(n).zzEncode(),this.g(p,n.length(),n)},a.prototype.bool=function(e){return this.g(l,1,e?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(e){return this.g(T,4,e>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(n){return n=e.from(n),this.g(T,4,n.lo).g(T,4,n.hi)},a.prototype.float=function(e){return this.g(C.float.writeFloatLE,4,e)},a.prototype.double=function(e){return this.g(C.float.writeDoubleLE,8,e)};var S=C.Array.prototype.set?function(e,t,s){t.set(e,s)}:function(e,t,s){for(var n=0;n<e.length;++n)t[s+n]=e[n]};a.prototype.bytes=function(e){var o=e.length>>>0,r;return o?(C.isString(e)&&(r=a.alloc(o=s.length(e)),s.decode(e,r,0),e=r),this.uint32(o).g(S,o,e)):this.g(l,1,0)},a.prototype.string=function(e){var t=o.length(e);return t?this.uint32(t).g(o.write,t,e):this.g(l,1,0)},a.prototype.fork=function(){return this.states=new g(this),this.head=this.tail=new E(n,0,0),this.len=0,this},a.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 E(n,0,0),this.len=0),this},a.prototype.ldelim=function(){var e=this.head,t=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=e.next,this.tail=t,this.len+=s),this},a.prototype.finish=function(){for(var e=this.head.next,s=this.constructor.alloc(this.len),o=0;e;)e.fn(e.val,s,o),o+=e.len,e=e.next;return s},a.u=function(e){u=e,a.create=c(),u.u()}},{39:39}],43:[function(a,t,i){function n(){o.call(this)}function s(e,t,s){40>e.length?r.utf8.write(e,t,s):t.utf8Write?t.utf8Write(e,s):t.write(e,s)}t.exports=n;var o=a(42),r=((n.prototype=Object.create(o.prototype)).constructor=n,a(39));n.u=function(){n.alloc=r.w,n.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&"set"===r.Buffer.prototype.set.name?function(e,t,s){t.set(e,s)}:function(e,t,s){if(e.copy)e.copy(t,s,0,e.length);else for(var o=0;o<e.length;)t[s++]=e[o++]}},n.prototype.bytes=function(e){var s=(e=r.isString(e)?r.y(e,"base64"):e).length>>>0;return this.uint32(s),s&&this.g(n.writeBytesBuffer,s,e),this},n.prototype.string=function(e){var t=r.Buffer.byteLength(e);return this.uint32(t),t&&this.g(s,t,e),this},n.u()},{39:39,42:42}]},{},[19])}();var $protobuf={...JProtobuf};/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/const $root=($protobuf.roots["default"]||($protobuf.roots["default"]=new $protobuf.Root)).addJSON({codec:{nested:{ConnectMsgBody:{fields:{protoId:{type:"string",id:1},sdkVersion:{type:"string",id:2},appkey:{type:"string",id:3},token:{type:"string",id:4},deviceId:{type:"string",id:5},platform:{type:"string",id:6},deviceCompany:{type:"string",id:7},deviceModel:{type:"string",id:8},deviceOsVersion:{type:"string",id:9},pushToken:{type:"string",id:10},networkId:{type:"string",id:11},ispNum:{type:"string",id:12},clientIp:{type:"string",id:13},packageName:{type:"string",id:14},pushChannel:{type:"string",id:15},ext:{type:"string",id:16},clientSession:{type:"string",id:17}}},ConnectAckMsgBody:{fields:{code:{type:"int32",id:1},userId:{type:"string",id:2},session:{type:"string",id:3},timestamp:{type:"int64",id:4},ext:{type:"string",id:5}}},DisconnectMsgBody:{fields:{code:{type:"int32",id:1},timestamp:{type:"int64",id:2},ext:{type:"string",id:3}}},PublishMsgBody:{fields:{index:{type:"int32",id:1},topic:{type:"string",id:2},targetId:{type:"string",id:3},timestamp:{type:"int64",id:4},data:{type:"bytes",id:5}}},PublishAckMsgBody:{fields:{index:{type:"int32",id:1},code:{type:"int32",id:2},msgId:{type:"string",id:3},timestamp:{type:"int64",id:4},msgIndex:{type:"int64",id:5},memberCount:{type:"int32",id:6},clientMsgId:{type:"string",id:7},modifiedMsg:{type:"DownMsg",id:8}}},QueryMsgBody:{fields:{index:{type:"int32",id:1},topic:{type:"string",id:2},targetId:{type:"string",id:3},timestamp:{type:"int64",id:4},data:{type:"bytes",id:5}}},QueryAckMsgBody:{fields:{index:{type:"int32",id:1},code:{type:"int32",id:2},timestamp:{type:"int64",id:3},data:{type:"bytes",id:4}}},QueryConfirmMsgBody:{fields:{index:{type:"int32",id:1}}},ImWebsocketMsg:{oneofs:{testof:{oneof:["connectMsgBody","ConnectAckMsgBody","disconnectMsgBody","publishMsgBody","pubAckMsgBody","qryMsgBody","qryAckMsgBody","qryConfirmMsgBody"]}},fields:{version:{type:"int32",id:1},cmd:{type:"int32",id:2},qos:{type:"int32",id:3},payload:{type:"bytes",id:4},connectMsgBody:{type:"ConnectMsgBody",id:11},ConnectAckMsgBody:{type:"ConnectAckMsgBody",id:12},disconnectMsgBody:{type:"DisconnectMsgBody",id:13},publishMsgBody:{type:"PublishMsgBody",id:14},pubAckMsgBody:{type:"PublishAckMsgBody",id:15},qryMsgBody:{type:"QueryMsgBody",id:16},qryAckMsgBody:{type:"QueryAckMsgBody",id:17},qryConfirmMsgBody:{type:"QueryConfirmMsgBody",id:18}}},ChannelType:{values:{Private:1,Group:2,Chatroom:3,System:4}},PushData:{fields:{title:{type:"string",id:1},pushId:{type:"string",id:2},pushText:{type:"string",id:3},pushExtraData:{type:"string",id:4}}},QryHisMsgsReq:{fields:{converId:{type:"string",id:1},type:{type:"ChannelType",id:2},startTime:{type:"int64",id:3},count:{type:"int32",id:4},order:{type:"int32",id:5},msgTypes:{rule:"repeated",type:"string",id:6}}},DownMsgSet:{fields:{msgs:{rule:"repeated",type:"DownMsg",id:1},syncTime:{type:"int64",id:2},isFinished:{type:"bool",id:3},targetUserInfo:{type:"UserInfo",id:4},groupInfo:{type:"GroupInfo",id:5}}},UpMsg:{fields:{msgType:{type:"string",id:1},msgContent:{type:"bytes",id:2},flags:{type:"int32",id:3},clientUid:{type:"string",id:4},pushData:{type:"PushData",id:5},mentionInfo:{type:"MentionInfo",id:6},referMsg:{type:"DownMsg",id:7},toUserIds:{rule:"repeated",type:"string",id:8},mergedMsgs:{type:"MergedMsgs",id:9},SearchText:{type:"string",id:10},lifeTime:{type:"int64",id:11},lifeTimeAfterRead:{type:"int64",id:12},subChannel:{type:"string",id:13},msgTime:{type:"int64",id:51}}},MentionInfo:{fields:{mentionType:{type:"MentionType",id:1},targetUsers:{rule:"repeated",type:"UserInfo",id:2}}},MentionType:{values:{MentionDefault:0,MentionAll:1,MentionSomeone:2}},DownMsg:{fields:{targetId:{type:"string",id:1},type:{type:"ChannelType",id:2},msgType:{type:"string",id:3},senderId:{type:"string",id:4},msgId:{type:"string",id:5},msgIndex:{type:"int64",id:6},msgContent:{type:"bytes",id:7},msgTime:{type:"int64",id:8},flags:{type:"int32",id:9},isSend:{type:"bool",id:10},platform:{type:"string",id:11},clientUid:{type:"string",id:12},pushData:{type:"PushData",id:13},mentionInfo:{type:"MentionInfo",id:14},isRead:{type:"bool",id:15},referMsg:{type:"DownMsg",id:16},targetUserInfo:{type:"UserInfo",id:17},groupInfo:{type:"GroupInfo",id:18},mergedMsgs:{type:"MergedMsgs",id:19},undisturbType:{type:"int32",id:20},memberCount:{type:"int32",id:21},readCount:{type:"int32",id:22},unreadIndex:{type:"int64",id:23},msgItems:{rule:"repeated",type:"StreamMsgItem",id:24},msgExtSet:{rule:"repeated",type:"MsgExtItem",id:25},msgExts:{rule:"repeated",type:"MsgExtItem",id:26},converTags:{rule:"repeated",type:"ConverTag",id:27},searchText:{type:"string",id:29},grpMemberInfo:{type:"GrpMemberInfo",id:30},destroyTime:{type:"int64",id:31},lifeTimeAfterRead:{type:"int64",id:32},isDelete:{type:"bool",id:33},subChannel:{type:"string",id:34},toUserIds:{rule:"repeated",type:"string",id:35},readTime:{type:"int64",id:36}}},GrpMemberInfo:{fields:{grpDisplayName:{type:"string",id:1},extFields:{rule:"repeated",type:"KvItem",id:2},updatedTime:{type:"int64",id:3}}},StreamMsgItem:{fields:{event:{type:"StreamEvent",id:1},subSeq:{type:"int64",id:2},partialContent:{type:"bytes",id:3}}},StreamDownMsg:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3},msgItems:{rule:"repeated",type:"StreamMsgItem",id:4}}},StreamEvent:{values:{DefaultStreamEvent:0,StreamMessage:1,StreamComplete:2}},MergedMsgs:{fields:{channelType:{type:"ChannelType",id:1},userId:{type:"string",id:2},targetId:{type:"string",id:3},msgs:{rule:"repeated",type:"SimpleMsg",id:4}}},GroupInfo:{fields:{groupId:{type:"string",id:1},groupName:{type:"string",id:2},groupPortrait:{type:"string",id:3},isMute:{type:"int32",id:4},extFields:{rule:"repeated",type:"KvItem",id:5},updatedTime:{type:"int64",id:6}}},KvItem:{fields:{key:{type:"string",id:1},value:{type:"string",id:2}}},UserIdReq:{fields:{userId:{type:"string",id:1}}},UserInfo:{fields:{userId:{type:"string",id:1},nickname:{type:"string",id:2},userPortrait:{type:"string",id:3},extFields:{rule:"repeated",type:"KvItem",id:4},updatedTime:{type:"int64",id:5},settings:{rule:"repeated",type:"KvItem",id:6},statuses:{rule:"repeated",type:"KvItem",id:7},userType:{type:"UserType",id:8}}},UserType:{values:{User:0,Bot:1}},SyncConversationsReq:{fields:{startTime:{type:"int64",id:1},count:{type:"int32",id:2}}},QryConversationsReq:{fields:{startTime:{type:"int64",id:1},count:{type:"int32",id:2},order:{type:"int32",id:3},targetId:{type:"string",id:5},channelType:{type:"ChannelType",id:6},tag:{type:"string",id:7}}},QryConversationsResp:{fields:{conversations:{rule:"repeated",type:"Conversation",id:1},isFinished:{type:"bool",id:2}}},ClearUnreadReq:{fields:{conversations:{rule:"repeated",type:"Conversation",id:1}}},DelConversationReq:{fields:{conversations:{rule:"repeated",type:"Conversation",id:1}}},ConversationsReq:{fields:{conversations:{rule:"repeated",type:"Conversation",id:1}}},Conversation:{fields:{userId:{type:"string",id:1},targetId:{type:"string",id:2},channelType:{type:"ChannelType",id:3},sortTime:{type:"int64",id:4},unreadCount:{type:"int64",id:5},msg:{type:"DownMsg",id:6},latestReadIndex:{type:"int64",id:7},mentions:{type:"Mentions",id:8},isTop:{type:"int32",id:9},topUpdatedTime:{type:"int64",id:10},undisturbType:{type:"int32",id:11},targetUserInfo:{type:"UserInfo",id:12},groupInfo:{type:"GroupInfo",id:13},syncTime:{type:"int64",id:14},isDelete:{type:"int32",id:15},latestUnreadIndex:{type:"int64",id:16},unreadTag:{type:"int32",id:17},latestReadMsgId:{type:"string",id:18},latestReadMsgTime:{type:"int64",id:19},converTags:{rule:"repeated",type:"ConverTag",id:20}}},Mentions:{fields:{isMentioned:{type:"bool",id:1},mentionMsgCount:{type:"int32",id:2},senders:{rule:"repeated",type:"UserInfo",id:3},mentionMsgs:{rule:"repeated",type:"MentionMsg",id:4}}},MentionMsg:{fields:{senderId:{type:"string",id:1},msgId:{type:"string",id:2},msgTime:{type:"int64",id:3},mentionType:{type:"MentionType",id:4}}},SyncMsgReq:{fields:{syncTime:{type:"int64",id:1},containsSendBox:{type:"bool",id:2},sendBoxSyncTime:{type:"int64",id:3},chatroomId:{type:"string",id:4}}},SyncChatroomReq:{fields:{chatroomId:{type:"string",id:1},syncTime:{type:"int64",id:2},count:{type:"int32",id:3}}},SyncChatroomMsgResp:{fields:{msgs:{rule:"repeated",type:"DownMsg",id:1}}},Notify:{fields:{type:{type:"NotifyType",id:1},syncTime:{type:"int64",id:2},chatroomId:{type:"string",id:3}}},NotifyType:{values:{Default:0,Msg:1,ChatroomMsg:2,ChatroomAtt:3,ChatroomEvent:4,ChatroomDestroy:5}},RecallMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3},msgTime:{type:"int64",id:4},exts:{rule:"repeated",type:"KvItem",id:5}}},MarkReadReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgs:{rule:"repeated",type:"SimpleMsg",id:3},indexScopes:{rule:"repeated",type:"IndexScope",id:4}}},SimpleMsg:{fields:{msgId:{type:"string",id:1},msgTime:{type:"int64",id:2},msgIndex:{type:"int64",id:3}}},IndexScope:{fields:{startIndex:{type:"int64",id:1},endIndex:{type:"int64",id:2}}},ModifyMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3},msgTime:{type:"int64",id:4},msgSeqNo:{type:"int64",id:5},msgContent:{type:"bytes",id:6},msgType:{type:"string",id:7}}},CleanHisMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},cleanMsgTime:{type:"int64",id:3},cleanScope:{type:"int32",id:4}}},QryHisMsgByIdsReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgIds:{rule:"repeated",type:"string",id:3}}},ChatRoomReq:{fields:{chatId:{type:"string",id:1},chatName:{type:"string",id:2},isAutoCreate:{type:"bool",id:3}}},QryTotalUnreadCountReq:{fields:{time:{type:"int64",id:1},filter:{type:"ConverFilter",id:2}}},ConverFilter:{fields:{channelTypes:{rule:"repeated",type:"ChannelType",id:1},ignoreConvers:{rule:"repeated",type:"SimpleConversation",id:2},tag:{type:"string",id:4}}},SimpleConversation:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2}}},QryTotalUnreadCountResp:{fields:{totalCount:{type:"int64",id:1}}},QryMentionMsgsReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},startIndex:{type:"int64",id:3},count:{type:"int32",id:4},order:{type:"int32",id:5},latestReadIndex:{type:"int64",id:6}}},QryMentionMsgsResp:{fields:{mentionMsgs:{rule:"repeated",type:"DownMsg",id:1},isFinished:{type:"bool",id:2}}},QMentionMsg:{fields:{mentionType:{type:"MentionType",id:1},senderInfo:{type:"UserInfo",id:2},msg:{type:"DownMsg",id:3}}},QryUploadTokenResp:{oneofs:{ossOf:{oneof:["qiniuCred","preSignResp"]}},fields:{ossType:{type:"OssType",id:1},qiniuCred:{type:"QiniuCredResp",id:11},preSignResp:{type:"PreSignResp",id:12}}},PreSignResp:{fields:{url:{type:"string",id:1},objKey:{type:"string",id:2},policy:{type:"string",id:3},signVersion:{type:"string",id:4},credential:{type:"string",id:5},date:{type:"string",id:6},signature:{type:"string",id:7}}},OssType:{values:{DefaultOss:0,QiNiu:1,S3:2,Minio:3,Oss:4}},QiniuCredResp:{fields:{domain:{type:"string",id:1},token:{type:"string",id:2}}},QryUploadTokenReq:{fields:{fileType:{type:"FileType",id:1},ext:{type:"string",id:2}}},FileType:{values:{DefaultFileType:0,Image:1,Audio:2,Video:3,File:4}},QryReadDetailReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3}}},QryReadDetailResp:{fields:{readCount:{type:"int32",id:1},memberCount:{type:"int32",id:2},readMembers:{rule:"repeated",type:"MemberReadDetailItem",id:3},unreadMembers:{rule:"repeated",type:"MemberReadDetailItem",id:4}}},MemberReadDetailItem:{fields:{member:{type:"UserInfo",id:1},time:{type:"int64",id:2}}},QryMergedMsgsReq:{fields:{startTime:{type:"int64",id:1},count:{type:"int32",id:2},order:{type:"int32",id:3}}},UndisturbConversReq:{fields:{userId:{type:"string",id:1},items:{rule:"repeated",type:"UndisturbConverItem",id:2}}},UndisturbConverItem:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},undisturbType:{type:"int32",id:3}}},QryTopConversReq:{fields:{startTime:{type:"int64",id:1},sortType:{type:"TopConverSortType",id:2},order:{type:"int32",id:3}}},TopConverSortType:{values:{ByTopTime:0,BySortTime:1}},DelHisMsgsReq:{fields:{senderId:{type:"string",id:1},targetId:{type:"string",id:2},channelType:{type:"ChannelType",id:3},msgs:{rule:"repeated",type:"SimpleMsg",id:4},delScope:{type:"int32",id:5}}},QryConverReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2}}},SyncChatroomAttResp:{fields:{atts:{rule:"repeated",type:"ChatAttItem",id:1}}},ChatAtts:{fields:{chatId:{type:"string",id:1},atts:{rule:"repeated",type:"ChatAttItem",id:2},isComplete:{type:"bool",id:3},isFinished:{type:"bool",id:4}}},ChatAttItem:{fields:{key:{type:"string",id:1},value:{type:"string",id:2},attTime:{type:"int64",id:3},userId:{type:"string",id:4},optType:{type:"ChatAttOptType",id:5}}},ChatAttOptType:{values:{ChatAttOpt_Default:0,ChatAttOpt_Add:1,ChatAttOpt_Del:2}},UserUndisturb:{fields:{switch:{type:"bool",id:1},timezone:{type:"string",id:2},rules:{rule:"repeated",type:"UserUndisturbItem",id:3}}},UserUndisturbItem:{fields:{start:{type:"string",id:1},end:{type:"string",id:2}}},Nil:{fields:{}},ChatAttBatchReq:{fields:{atts:{rule:"repeated",type:"ChatAttReq",id:1}}},ChatAttBatchResp:{fields:{attResps:{rule:"repeated",type:"ChatAttResp",id:1}}},ChatAttReq:{fields:{key:{type:"string",id:1},value:{type:"string",id:2},isForce:{type:"bool",id:3},isAutoDel:{type:"bool",id:4},msg:{type:"UpMsg",id:5}}},ChatAttResp:{fields:{key:{type:"string",id:1},code:{type:"int32",id:2},attTime:{type:"int64",id:3},msgCode:{type:"int32",id:11},msgId:{type:"string",id:12},msgTime:{type:"int64",id:13},msgSeq:{type:"int64",id:14}}},QryFirstUnreadMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2}}},ChrmEvent:{fields:{eventType:{type:"ChrmEventType",id:1},chatId:{type:"string",id:2},userId:{type:"string",id:3},eventTime:{type:"int64",id:4}}},ChrmEventType:{values:{Join:0,Quit:1,Kick:2,Fallout:3}},MsgExt:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3},ext:{type:"MsgExtItem",id:4}}},MsgExtItem:{fields:{key:{type:"string",id:1},value:{type:"string",id:2},timestamp:{type:"int64",id:3},userInfo:{type:"UserInfo",id:4}}},TagConvers:{fields:{tag:{type:"string",id:1},tagName:{type:"string",id:2},convers:{rule:"repeated",type:"SimpleConversation",id:11}}},UserConverTags:{fields:{tags:{rule:"repeated",type:"ConverTag",id:1}}},ConverTag:{fields:{tag:{type:"string",id:1},tagName:{type:"string",id:2},tagType:{type:"ConverTagType",id:3}}},ConverTagType:{values:{UserTag:0,SystemTag:1,GlobalTag:2}},RtcRoomReq:{fields:{roomType:{type:"RtcRoomType",id:1},roomId:{type:"string",id:2},joinMember:{type:"RtcMember",id:3}}},RtcRoomType:{values:{OneOne:0,OneMore:1}},RtcMember:{fields:{member:{type:"UserInfo",id:1},rtcState:{type:"RtcState",id:2},callTime:{type:"int64",id:3},connectTime:{type:"int64",id:4},hangupTime:{type:"int64",id:5},inviter:{type:"UserInfo",id:6}}},RtcState:{values:{RtcStateDefault:0,RtcIncoming:1,RtcOutgoing:2,RtcConnecting:3,RtcConnected:4}},RtcRoom:{fields:{roomType:{type:"RtcRoomType",id:1},roomId:{type:"string",id:2},owner:{type:"UserInfo",id:3},rtcChannel:{type:"RtcChannel",id:4},rtcMediaType:{type:"RtcMediaType",id:5},ext:{type:"string",id:6},members:{rule:"repeated",type:"RtcMember",id:51}}},RtcInviteReq:{fields:{targetIds:{rule:"repeated",type:"string",id:1},roomType:{type:"RtcRoomType",id:2},roomId:{type:"string",id:3},rtcChannel:{type:"RtcChannel",id:4},rtcMediaType:{type:"RtcMediaType",id:5},ext:{type:"string",id:6}}},RtcMediaType:{values:{RtcAudio:0,RtcVideo:1}},InviteType:{values:{RtcInvite:0,RtcAccept:1,RtcHangup:2}},RtcInviteEvent:{fields:{inviteType:{type:"InviteType",id:1},user:{type:"UserInfo",id:2},room:{type:"RtcRoom",id:3},targetUsers:{rule:"repeated",type:"UserInfo",id:4}}},RtcAnswerReq:{fields:{targetId:{type:"string",id:1},roomId:{type:"string",id:2}}},RtcChannel:{values:{Zego:0}},RtcAuth:{fields:{zegoAuth:{type:"ZegoAuth",id:1}}},ZegoAuth:{fields:{token:{type:"string",id:1}}},RtcRoomEvent:{fields:{roomEventType:{type:"RtcRoomEventType",id:1},members:{rule:"repeated",type:"RtcMember",id:2},room:{type:"RtcRoom",id:3},reason:{type:"RtcRoomQuitReason",id:4},eventTime:{type:"int64",id:5}}},RtcRoomEventType:{values:{DefaultRtcRoomEvent:0,RtcJoin:1,RtcQuit:2,RtcDestroy:3,RtcStateChg:4}},RtcRoomQuitReason:{values:{Active:0,CallTimeout:1,PingTimeout:2}},TransReq:{fields:{items:{rule:"repeated",type:"TransItem",id:1},targetLang:{type:"string",id:2},sourceLang:{type:"string",id:3}}},TransItem:{fields:{key:{type:"string",id:1},content:{type:"string",id:2}}},SetTopMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3}}},GetTopMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2}}},TopMsg:{fields:{msg:{type:"DownMsg",id:1},operator:{type:"UserInfo",id:2},createdTime:{type:"int64",id:3}}},FavoriteMsgIds:{fields:{items:{rule:"repeated",type:"FavoriteMsgIdItem",id:1}}},FavoriteMsgIdItem:{fields:{senderId:{type:"string",id:1},receiverId:{type:"string",id:2},channelType:{type:"ChannelType",id:3},msgId:{type:"string",id:4}}},QryFavoriteMsgsReq:{fields:{limit:{type:"int64",id:1},offset:{type:"string",id:2}}},FavoriteMsgs:{fields:{items:{rule:"repeated",type:"FavoriteMsg",id:1},offset:{type:"string",id:2}}},FavoriteMsg:{fields:{msg:{type:"DownMsg",id:1},createdTime:{type:"int64",id:2}}},RegPushTokenReq:{fields:{deviceId:{type:"string",id:1},platform:{type:"Platform",id:2},pushChannel:{type:"PushChannel",id:3},pushToken:{type:"string",id:4},packageName:{type:"string",id:5}}},Platform:{values:{DefaultPlatform:0,Android:1,iOS:2,Web:3,PC:4}},PushChannel:{values:{DefaultChannel:0,Apple:1,Huawei:2,Xiaomi:3}},PushSwitch:{fields:{switch:{type:"int32",id:1}}}}}});function WebRequest(){let e=()=>{},t=(e,t)=>{for(var n in e)t(e[n],n,e)},n=(n,s,o)=>{s=s||{},o=o||{success:e,fail:e,progress:e};let i=new XMLHttpRequest,r=s.method||"GET";i.open(r,n,!0);let a=s.headers||{};t(a,(e,t)=>{i.setRequestHeader(t,e)});let d=s.body||{},p=()=>/^(200|202)$/.test(i.status),c=s.timeout;return c&&(i.timeout=c),i.onreadystatechange=function(){if(4==i.readyState){let{responseText:e}=i;e=e||"{}";let t=JSON.parse(e);if(p())o.success(t,i);else{let{status:e}=i,n={status:e,result:t};o.fail(n)}}},i.upload.onprogress=function(e){e.lengthComputable&&o.progress&&o.progress(e)},i.onerror=e=>{o.fail(e)},i.send(d),i};return{requestNormal:n,uploadFile:n}}function WebEncoder(){let e=e=>new TextEncoder().encode(e),t=e=>new TextDecoder().decode(e);return{encoder:e,decoder:t}}function UniEncoder(){var e=String.fromCharCode;let t=e=>{var t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);return t.split("").forEach(function(e,t){n[t]=e.charCodeAt(0)}),n},n=t=>{var n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),s=Array(n.length);return n.forEach(function(t,n){s[n]=e(t)}),decodeURIComponent(escape(s.join("")))};return{encoder:t,decoder:n}}let JTextEncoder={};JTextEncoder="undefined"==typeof uni?WebEncoder():UniEncoder();var JTextEncoder$1=JTextEncoder;function UniRequest(){// url: 'https://jugglechat-file.oss-cn-beijing.aliyuncs.com',
51
+ */let JProtobuf={};!function(_){var e=Math.min,a=Math.pow,d=Math.floor,p=String.fromCharCode;!function(s,o,e){var n=function i(e){var t=o[e];return t||s[e][0].call(t=o[e]={exports:{}},i,t,t.exports),t.exports}(e[0]);JProtobuf=n,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&e.isLong&&(n.util.Long=e,n.configure()),n}),"object"==typeof module&&module&&module.exports&&(module.exports=n)}({1:[function(e,t,s){t.exports=function(e,t){for(var i=Array(arguments.length-1),n=0,a=2,d=!0;a<arguments.length;)i[n++]=arguments[a++];return new Promise(function(s,o){i[n]=function(e){if(d)if(d=!1,e)o(e);else{for(var t=Array(arguments.length-1),i=0;i<t.length;)t[i++]=arguments[i];s.apply(null,t)}};try{e.apply(t||null,i)}catch(e){d&&(d=!1,o(e))}})}},{}],2:[function(e,t,s){s.length=function(e){var t=e.length;if(!t)return 0;for(var s=0;1<--t%4&&"="==(e[0|t]||"");)++s;return Math.ceil(3*e.length)/4-s};for(var d=Array(64),o=Array(123),n=0;64>n;)o[d[n]=26>n?n+65:52>n?n+71:62>n?n-4:43|n-59]=n++;s.encode=function(a,t,c){for(var n=null,m=[],s=0,l=0,E,g;t<c;)g=a[t++],0===l?(m[s++]=d[g>>2],E=(3&g)<<4,l=1):1===l?(m[s++]=d[E|g>>4],E=(15&g)<<2,l=2):2===l?(m[s++]=d[E|g>>6],m[s++]=d[63&g],l=0):void 0,8191<s&&((n=n||[]).push(p.apply(String,m)),s=0);return l&&(m[s++]=d[E],m[s++]=61,1===l&&(m[s++]=61)),n?(s&&n.push(p.apply(String,m.slice(0,s))),n.join("")):p.apply(String,m.slice(0,s))};var i="invalid encoding";s.decode=function(a,t,i){for(var d=i,e=0,p=0,c,m;p<a.length&&(m=a.charCodeAt(p++),!(61==m&&1<e));){if((m=o[m])===_)throw Error("invalid encoding");0===e?(c=m,e=1):1===e?(t[i++]=c<<2|(48&m)>>4,c=m,e=2):2===e?(t[i++]=(15&c)<<4|(60&m)>>2,c=m,e=3):3===e?(t[i++]=(3&c)<<6|m,e=0):void 0}if(1===e)throw Error("invalid encoding");return i-d},s.test=function(e){return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,s){function o(e,s){function p(m){if("string"!=typeof m){var l=c();if(o.verbose&&void 0,l="return "+l,m){for(var E=Object.keys(m),n=Array(E.length+1),r=Array(E.length),e=0;e<E.length;)n[e]=E[e],r[e]=m[E[e++]];return n[e]=l,Function.apply(null,n).apply(null,r)}return Function(l)()}for(var g=Array(arguments.length-1),T=0;T<g.length;)g[T]=arguments[++T];if(T=0,m=m.replace(/%([%dfijs])/g,function(e,t){var s=g[T++];return"d"===t||"f"===t?""+ +(""+s):"i"===t?""+d(s):"j"===t?JSON.stringify(s):"s"===t?""+s:"%"}),T!==g.length)throw Error("parameter count mismatch");return a.push(m),p}function c(n){return"function "+(n||s||"")+"("+(e&&e.join(",")||"")+"){\n "+a.join("\n ")+"\n}"}"string"==typeof e&&(s=e,e=_);var a=[];return p.toString=c,p}(t.exports=o).verbose=!1},{}],4:[function(e,t,s){function n(){this.i={}}(t.exports=n).prototype.on=function(e,t,s){return(this.i[e]||(this.i[e]=[])).push({fn:t,ctx:s||this}),this},n.prototype.off=function(e,t){if(e===_)this.i={};else if(t===_)this.i[e]=[];else for(var s=this.i[e],n=0;n<s.length;)s[n].fn===t?s.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this.i[e];if(t){for(var s=[],n=1;n<arguments.length;)s.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,s)}return this}},{}],5:[function(e,t,i){function a(o,n,p){return n="function"==typeof n?(p=n,{}):n||{},p?!n.xhr&&s&&s.readFile?s.readFile(o,function(e,t){return e&&"undefined"!=typeof XMLHttpRequest?a.xhr(o,n,p):e?p(e):p(null,n.binary?t:t.toString("utf8"))}):a.xhr(o,n,p):d(a,this,o,n)}t.exports=a;var d=e(1),s=e(7)("fs");a.xhr=function(s,o,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4!==r.readyState)return _;if(0!==r.status&&200!==r.status)return n(Error("status "+r.status));if(o.binary){if(!(e=r.response))for(var e=[],s=0;s<r.responseText.length;++s)e.push(255&r.responseText.charCodeAt(s));return n(null,"undefined"==typeof Uint8Array?e:new Uint8Array(e))}return n(null,r.responseText)},o.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",s),r.send()}},{1:1,7:7}],6:[function(e,t,s){function n(_){var C=Math.LN2,S=Math.log;function O(s,o,p,n){var r=Math.round,c=0>o?1:0;s(0===(o=c?-o:o)?0<1/o?0:2147483648:isNaN(o)?2143289344:34028234663852886e22<o?(2139095040|c<<31)>>>0:11754943508222875e-54>o?(c<<31|r(o/1401298464324817e-60))>>>0:(c<<31|127+(s=d(S(o)/C))<<23|8388607&r(8388608*(o*a(2,-s))))>>>0,p,n)}function t(e,s,o){return e=e(s,o),s=2*(e>>31)+1,o=255&e>>>23,e&=8388607,255==o?e?NaN:1/0*s:0==o?1401298464324817e-60*s*e:s*a(2,o-150)*(8388608+e)}function n(e,t,s){y[0]=e,t[s]=A[0],t[s+1]=A[1],t[s+2]=A[2],t[s+3]=A[3]}function i(e,t,s){y[0]=e,t[s]=A[3],t[s+1]=A[2],t[s+2]=A[1],t[s+3]=A[0]}function e(e,t){return A[0]=e[t],A[1]=e[t+1],A[2]=e[t+2],A[3]=e[t+3],y[0]}function s(e,t){return A[3]=e[t],A[2]=e[t+1],A[1]=e[t+2],A[0]=e[t+3],y[0]}function o(p,t,i,n,c,e){var s=0>n?1:0,m;0===(n=s?-n:n)?(p(0,c,e+t),p(0<1/n?0:2147483648,c,e+i)):isNaN(n)?(p(0,c,e+t),p(2146959360,c,e+i)):17976931348623157e292<n?(p(0,c,e+t),p((2146435072|s<<31)>>>0,c,e+i)):22250738585072014e-324>n?(p((m=n/5e-324)>>>0,c,e+t),p((s<<31|m/4294967296)>>>0,c,e+i)):(p(4503599627370496*(m=n*a(2,-(n=1024===(n=d(S(n)/C))?1023:n)))>>>0,c,e+t),p((s<<31|n+1023<<20|1048575&1048576*m)>>>0,c,e+i))}function r(s,o,d,p,c){return o=s(p,c+o),s=s(p,c+d),p=2*(s>>31)+1,c=2047&s>>>20,d=4294967296*(1048575&s)+o,2047==c?d?NaN:1/0*p:0==c?5e-324*p*d:p*a(2,c-1075)*(d+4503599627370496)}function l(e,t,s){N[0]=e,t[s]=M[0],t[s+1]=M[1],t[s+2]=M[2],t[s+3]=M[3],t[s+4]=M[4],t[s+5]=M[5],t[s+6]=M[6],t[s+7]=M[7]}function p(e,t,s){N[0]=e,t[s]=M[7],t[s+1]=M[6],t[s+2]=M[5],t[s+3]=M[4],t[s+4]=M[3],t[s+5]=M[2],t[s+6]=M[1],t[s+7]=M[0]}function I(e,t){return M[0]=e[t],M[1]=e[t+1],M[2]=e[t+2],M[3]=e[t+3],M[4]=e[t+4],M[5]=e[t+5],M[6]=e[t+6],M[7]=e[t+7],N[0]}function R(e,t){return M[7]=e[t],M[6]=e[t+1],M[5]=e[t+2],M[4]=e[t+3],M[3]=e[t+4],M[2]=e[t+5],M[1]=e[t+6],M[0]=e[t+7],N[0]}var y,A,N,M,v;return"undefined"==typeof Float32Array?(_.writeFloatLE=O.bind(null,E),_.writeFloatBE=O.bind(null,T),_.readFloatLE=t.bind(null,m),_.readFloatBE=t.bind(null,g)):(y=new Float32Array([-0]),A=new Uint8Array(y.buffer),v=128===A[3],_.writeFloatLE=v?n:i,_.writeFloatBE=v?i:n,_.readFloatLE=v?e:s,_.readFloatBE=v?s:e),"undefined"==typeof Float64Array?(_.writeDoubleLE=o.bind(null,E,0,4),_.writeDoubleBE=o.bind(null,T,4,0),_.readDoubleLE=r.bind(null,m,0,4),_.readDoubleBE=r.bind(null,g,4,0)):(N=new Float64Array([-0]),M=new Uint8Array(N.buffer),v=128===M[7],_.writeDoubleLE=v?l:p,_.writeDoubleBE=v?p:l,_.readDoubleLE=v?I:R,_.readDoubleBE=v?R:I),_}function E(e,t,s){t[s]=255&e,t[s+1]=255&e>>>8,t[s+2]=255&e>>>16,t[s+3]=e>>>24}function T(e,t,s){t[s]=e>>>24,t[s+1]=255&e>>>16,t[s+2]=255&e>>>8,t[s+3]=255&e}function m(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function g(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=n(n)},{}],7:[function(e,t,s){function n(e){try{var t=new Function("require")(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(s,t,o){var a=o.isAbsolute=function(e){return /^(?:\/|\w+:)/.test(e)},e=o.normalize=function(e){var s=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),o=a(e),e="";o&&(e=s.shift()+"/");for(var n=0;n<s.length;)".."===s[n]?0<n&&".."!==s[n-1]?s.splice(--n,2):o?s.splice(n,1):++n:"."===s[n]?s.splice(n,1):++n;return e+s.join("/")};o.resolve=function(s,o,r){return r||(o=e(o)),!a(o)&&(s=(s=r?s:e(s)).replace(/(?:\/|^)[^/]+$/,"")).length?e(s+"/"+o):o}},{}],9:[function(e,t,s){t.exports=function(a,i,n){var d=n||8192,r=d>>>1,e=null,p=d;return function(n){return 1>n||r<n?a(n):(d<p+n&&(e=a(d),p=0),n=i.call(e,p,p+=n),(7&p&&(p=1+(7|p)),n))}}},{}],10:[function(e,t,s){s.length=function(e){for(var t=0,s=0,o;s<e.length;++s)128>(o=e.charCodeAt(s))?t+=1:2048>o?t+=2:55296==(64512&o)&&56320==(64512&e.charCodeAt(s+1))?(++s,t+=4):t+=3;return t},s.read=function(a,t,d){if(1>d-t)return"";for(var n=null,c=[],s=0,m;t<d;)128>(m=a[t++])?c[s++]=m:191<m&&224>m?c[s++]=(31&m)<<6|63&a[t++]:239<m&&365>m?(m=((7&m)<<18|(63&a[t++])<<12|(63&a[t++])<<6|63&a[t++])-65536,c[s++]=55296+(m>>10),c[s++]=56320+(1023&m)):c[s++]=(15&m)<<12|(63&a[t++])<<6|63&a[t++],8191<s&&((n=n||[]).push(p.apply(String,c)),s=0);return n?(s&&n.push(p.apply(String,c.slice(0,s))),n.join("")):p.apply(String,c.slice(0,s))},s.write=function(a,t,i){for(var d=i,s=0,p,c;s<a.length;++s)128>(p=a.charCodeAt(s))?t[i++]=p:(2048>p?t[i++]=192|p>>6:(55296==(64512&p)&&56320==(64512&(c=a.charCodeAt(s+1)))?(++s,t[i++]=240|(p=65536+((1023&p)<<10)+(1023&c))>>18,t[i++]=128|63&p>>12):t[i++]=224|p>>12,t[i++]=128|63&p>>6),t[i++]=128|63&p);return i-d}},{}],11:[function(s,t,o){function n(s,o){e.test(s)||(s="google/protobuf/"+s+".proto",o={nested:{google:{nested:{protobuf:{nested:o}}}}}),n[s]=o}t.exports=n;var e=/\/|\./;n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("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}}}}),n("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}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},{}],12:[function(e,t,s){function a(a,t,i,n){var r=!1;if(!t.resolvedType){var d=!1;switch(t.type){case"double":case"float":a("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":a("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":a("m%s=d%s|0",n,n);break;case"uint64":d=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":a("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,d)("else if(typeof d%s===\"string\")",n)("m%s=parseInt(d%s,10)",n,n)("else if(typeof d%s===\"number\")",n)("m%s=d%s",n,n)("else if(typeof d%s===\"object\")",n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,d?"true":"");break;case"bytes":a("if(typeof d%s===\"string\")",n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":a("m%s=String(d%s)",n,n);break;case"bool":a("m%s=Boolean(d%s)",n,n)}}else if(t.resolvedType instanceof c){a("switch(d%s){",n);for(var p=t.resolvedType.values,s=Object.keys(p),o=0;o<s.length;++o)p[s[o]]!==t.typeDefault||r||(a("default:")("if(typeof(d%s)===\"number\"){m%s=d%s;break}",n,n,n),t.repeated||a("break"),r=!0),a("case%j:",s[o])("case %i:",p[s[o]])("m%s=%j",n,p[s[o]])("break");a("}")}else a("if(typeof d%s!==\"object\")",n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,i,n);return a}function r(s,t,o,n){if(t.resolvedType)t.resolvedType instanceof c?s("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,o,n,n,o,n,n):s("d%s=types[%i].toObject(m%s,o)",n,o,n);else{var i=!1;switch(t.type){case"double":case"float":s("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":s("if(typeof m%s===\"number\")",n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("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",n,n,n,n,i?"true":"",n);break;case"bytes":s("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",n,n,n,n,n);break;default:s("d%s=m%s",n,n)}}return s}var c=e(15),m=e(37);s.fromObject=function(o){var t=o.fieldsArray,i=m.codegen(["d"],o.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return i("return new this.ctor");i("var m=new this.ctor");for(var n=0;n<t.length;++n){var d=t[n].resolve(),p=m.safeProp(d.name);d.map?(i("if(d%s){",p)("if(typeof d%s!==\"object\")",p)("throw TypeError(%j)",d.fullName+": object expected")("m%s={}",p)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",p),a(i,d,n,p+"[ks[i]]")("}")("}")):d.repeated?(i("if(d%s){",p)("if(!Array.isArray(d%s))",p)("throw TypeError(%j)",d.fullName+": array expected")("m%s=[]",p)("for(var i=0;i<d%s.length;++i){",p),a(i,d,n,p+"[i]")("}")("}")):(d.resolvedType instanceof c||i("if(d%s!=null){",p),a(i,d,n,p),d.resolvedType instanceof c||i("}"))}return i("return m")},s.toObject=function(d){var t=d.fieldsArray.slice().sort(m.compareFieldsById);if(!t.length)return m.codegen()("return {}");for(var i=m.codegen(["m","o"],d.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],l=[],e=[],s=0;s<t.length;++s)t[s].partOf||(t[s].resolve().repeated?n:t[s].map?l:e).push(t[s]);if(n.length){for(i("if(o.arrays||o.defaults){"),s=0;s<n.length;++s)i("d%s=[]",m.safeProp(n[s].name));i("}")}if(l.length){for(i("if(o.objects||o.defaults){"),s=0;s<l.length;++s)i("d%s={}",m.safeProp(l[s].name));i("}")}if(e.length){for(i("if(o.defaults){"),s=0;s<e.length;++s){var E=e[s],g=m.safeProp(E.name),T;E.resolvedType instanceof c?i("d%s=o.enums===String?%j:%j",g,E.resolvedType.valuesById[E.typeDefault],E.typeDefault):E.long?i("if(util.Long){")("var n=new util.Long(%i,%i,%j)",E.typeDefault.low,E.typeDefault.high,E.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",g)("}else")("d%s=o.longs===String?%j:%i",g,E.typeDefault.toString(),E.typeDefault.toNumber()):E.bytes?(T="["+Array.prototype.slice.call(E.typeDefault).join(",")+"]",i("if(o.bytes===String)d%s=%j",g,p.apply(String,E.typeDefault))("else{")("d%s=%s",g,T)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",g,g)("}")):i("d%s=%j",g,E.typeDefault)}i("}")}for(var y=!1,s=0;s<t.length;++s){var E=t[s],_=d.e.indexOf(E),g=m.safeProp(E.name);E.map?(y||(y=!0,i("var ks2")),i("if(m%s&&(ks2=Object.keys(m%s)).length){",g,g)("d%s={}",g)("for(var j=0;j<ks2.length;++j){"),r(i,E,_,g+"[ks2[j]]")("}")):E.repeated?(i("if(m%s&&m%s.length){",g,g)("d%s=[]",g)("for(var j=0;j<m%s.length;++j){",g),r(i,E,_,g+"[j]")("}")):(i("if(m%s!=null&&m.hasOwnProperty(%j)){",g,E.name),r(i,E,_,g),E.partOf&&i("if(o.oneofs)")("d%s=%j",m.safeProp(E.partOf.name),E.name)),i("}")}return i("return d")}},{15:15,37:37}],13:[function(e,t,s){t.exports=function(p){var t=d.codegen(["r","l"],p.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(p.fieldsArray.filter(function(e){return e.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");p.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var i=0;i<p.fieldsArray.length;++i){var c=p.e[i].resolve(),m=c.resolvedType instanceof o?"int32":c.type,l="m"+d.safeProp(c.name);t("case %i: {",c.id),c.map?(t("if(%s===util.emptyObject)",l)("%s={}",l)("var c2 = r.uint32()+r.pos"),a.defaults[c.keyType]===_?t("k=null"):t("k=%j",a.defaults[c.keyType]),a.defaults[m]===_?t("value=null"):t("value=%j",a.defaults[m]),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",c.keyType)("case 2:"),a.basic[m]===_?t("value=types[%i].decode(r,r.uint32())",i):t("value=r.%s()",m),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),a.long[c.keyType]===_?t("%s[k]=value",l):t("%s[typeof k===\"object\"?util.longToHash(k):k]=value",l)):c.repeated?(t("if(!(%s&&%s.length))",l,l)("%s=[]",l),a.packed[m]!==_&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,m)("}else"),a.basic[m]===_?t(c.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",l,i):t("%s.push(r.%s())",l,m)):a.basic[m]===_?t(c.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",l,i):t("%s=r.%s()",l,m),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),i=0;i<p.e.length;++i){var E=p.e[i];E.required&&t("if(!m.hasOwnProperty(%j))",E.name)("throw util.ProtocolError(%j,{instance:m})","missing required '"+E.name+"'")}return t("return m")};var o=e(15),a=e(36),d=e(37)},{15:15,36:36,37:37}],14:[function(e,t,s){function d(e,t,s,n){t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,n,(3|t.id<<3)>>>0,(4|t.id<<3)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,n,(2|t.id<<3)>>>0)}t.exports=function(c){for(var t=a.codegen(["m","w"],c.name+"$encode")("if(!w)")("w=Writer.create()"),n=c.fieldsArray.slice().sort(a.compareFieldsById),r=0,l;r<n.length;++r){var E=n[r].resolve(),g=c.e.indexOf(E),T=E.resolvedType instanceof p?"int32":E.type,y=m.basic[T];l="m"+a.safeProp(E.name),E.map?(t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",l,E.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",l)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(2|E.id<<3)>>>0,8|m.mapKey[E.keyType],E.keyType),y===_?t("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",g,l):t(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|y,T,l),t("}")("}")):E.repeated?(t("if(%s!=null&&%s.length){",l,l),E.packed&&m.packed[T]!==_?t("w.uint32(%i).fork()",(2|E.id<<3)>>>0)("for(var i=0;i<%s.length;++i)",l)("w.%s(%s[i])",T,l)("w.ldelim()"):(t("for(var i=0;i<%s.length;++i)",l),y===_?d(t,E,g,l+"[i]"):t("w.uint32(%i).%s(%s[i])",(E.id<<3|y)>>>0,T,l)),t("}")):(E.optional&&t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",l,E.name),y===_?d(t,E,g,l):t("w.uint32(%i).%s(%s)",(E.id<<3|y)>>>0,T,l))}return t("return w")};var p=e(15),m=e(36),a=e(37)},{15:15,36:36,37:37}],15:[function(o,t,i){function n(d,t,i,n,r,e){if(a.call(this,d,i),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=r||{},this.valuesOptions=e,this.reserved=_,t)for(var s=Object.keys(t),o=0;o<s.length;++o)"number"==typeof t[s[o]]&&(this.valuesById[this.values[s[o]]=t[s[o]]]=s[o])}t.exports=n;var a=o(24),s=(((n.prototype=Object.create(a.prototype)).constructor=n).className="Enum",o(23)),d=o(37);n.fromJSON=function(e,s){return e=new n(e,s.values,s.options,s.comment,s.comments),e.reserved=s.reserved,e},n.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,d.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:_,"comment",e?this.comment:_,"comments",e?this.comments:_])},n.prototype.add=function(e,t,s,n){if(!d.isString(e))throw TypeError("name must be a string");if(!d.isInteger(t))throw TypeError("id must be an integer");if(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(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 n&&(this.valuesOptions===_&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=s||null,this},n.prototype.remove=function(e){if(!d.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.valuesOptions&&delete this.valuesOptions[e],this},n.prototype.isReservedId=function(e){return s.isReservedId(this.reserved,e)},n.prototype.isReservedName=function(e){return s.isReservedName(this.reserved,e)}},{23:23,24:24,37:37}],16:[function(s,t,i){function d(a,t,i,n,d,E,u){if(m.isObject(n)?(u=d,E=n,n=d=_):m.isObject(d)&&(u=E,E=d,d=_),p.call(this,a,E),!m.isInteger(t)||0>t)throw TypeError("id must be a non-negative integer");if(!m.isString(i))throw TypeError("type must be a string");if(n!==_&&!l.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(d!==_&&!m.isString(d))throw TypeError("extend must be a string");this.rule=(n="proto3_optional"===n?"optional":n)&&"optional"!==n?n:_,this.type=i,this.id=t,this.extend=d||_,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!m.Long&&c.long[i]!==_,this.bytes="bytes"===i,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.o=null,this.comment=u}t.exports=d;var p=s(24),n=(((d.prototype=Object.create(p.prototype)).constructor=d).className="Field",s(15)),c=s(36),m=s(37),l=/^required|optional|repeated$/,e;d.fromJSON=function(e,t){return new d(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(d.prototype,"packed",{get:function(){return null===this.o&&(this.o=!1!==this.getOption("packed")),this.o}}),d.prototype.setOption=function(e,t,s){return"packed"===e&&(this.o=null),p.prototype.setOption.call(this,e,t,s)},d.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,m.toObject(["rule","optional"!==this.rule&&this.rule||_,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:_])},d.prototype.resolve=function(){var s;return this.resolved?this:((this.typeDefault=c.defaults[this.type])===_?(this.resolvedType=(this.declaringField||this).parent.lookupTypeOrEnum(this.type),this.typeDefault=this.resolvedType instanceof e?null:this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof n&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(this.options.packed===_||!this.resolvedType||this.resolvedType instanceof n)||delete this.options.packed,Object.keys(this.options).length||(this.options=_)),this.long?(this.typeDefault=m.Long.fromNumber(this.typeDefault,"u"==(this.type[0]||"")),Object.freeze&&Object.freeze(this.typeDefault)):this.bytes&&"string"==typeof this.typeDefault&&(m.base64.test(this.typeDefault)?m.base64.decode(this.typeDefault,s=m.newBuffer(m.base64.length(this.typeDefault)),0):m.utf8.write(this.typeDefault,s=m.newBuffer(m.utf8.length(this.typeDefault)),0),this.typeDefault=s),this.defaultValue=this.map?m.emptyObject:this.repeated?m.emptyArray:this.typeDefault,this.parent instanceof e&&(this.parent.ctor.prototype[this.name]=this.defaultValue),p.prototype.resolve.call(this))},d.d=function(o,n,a,e){return"function"==typeof n?n=m.decorateType(n).name:n&&"object"==typeof n&&(n=m.decorateEnum(n).name),function(s,t){m.decorateType(s.constructor).add(new d(t,o,n,a,{default:e}))}},d.u=function(n){e=n}},{15:15,24:24,36:36,37:37}],17:[function(e,t,s){var o=t.exports=e(18);o.build="light",o.load=function(e,t,s){return(t="function"==typeof t?(s=t,new o.Root):t||new o.Root).load(e,s)},o.loadSync=function(e,t){return(t=t||new o.Root).loadSync(e)},o.encoder=e(14),o.decoder=e(13),o.verifier=e(40),o.converter=e(12),o.ReflectionObject=e(24),o.Namespace=e(23),o.Root=e(29),o.Enum=e(15),o.Type=e(35),o.Field=e(16),o.OneOf=e(25),o.MapField=e(20),o.Service=e(33),o.Method=e(22),o.Message=e(21),o.wrappers=e(41),o.types=e(36),o.util=e(37),o.ReflectionObject.u(o.Root),o.Namespace.u(o.Type,o.Service,o.Enum),o.Root.u(o.Type),o.Field.u(o.Type)},{12:12,13:13,14:14,15:15,16:16,18:18,20:20,21:21,22:22,23:23,24:24,25:25,29:29,33:33,35:35,36:36,37:37,40:40,41:41}],18:[function(s,t,o){function n(){e.util.u(),e.Writer.u(e.BufferWriter),e.Reader.u(e.BufferReader)}var e=o;e.build="minimal",e.Writer=s(42),e.BufferWriter=s(43),e.Reader=s(27),e.BufferReader=s(28),e.util=s(39),e.rpc=s(31),e.roots=s(30),e.configure=n,n()},{27:27,28:28,30:30,31:31,39:39,42:42,43:43}],19:[function(e,t,s){t=t.exports=e(17),t.build="full",t.tokenize=e(34),t.parse=e(26),t.common=e(11),t.Root.u(t.Type,t.parse,t.common)},{11:11,17:17,26:26,34:34}],20:[function(e,t,i){function a(a,t,i,n,r,e){if(d.call(this,a,t,n,_,_,r,e),!o.isString(i))throw TypeError("keyType must be a string");this.keyType=i,this.resolvedKeyType=null,this.map=!0}t.exports=a;var d=e(16),n=(((a.prototype=Object.create(d.prototype)).constructor=a).className="MapField",e(36)),o=e(37);a.fromJSON=function(e,t){return new a(e,t.id,t.keyType,t.type,t.options,t.comment)},a.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:_])},a.prototype.resolve=function(){if(this.resolved)return this;if(n.mapKey[this.keyType]===_)throw Error("invalid key type: "+this.keyType);return d.prototype.resolve.call(this)},a.d=function(s,n,r){return"function"==typeof r?r=o.decorateType(r).name:r&&"object"==typeof r&&(r=o.decorateEnum(r).name),function(e,t){o.decorateType(e.constructor).add(new a(t,s,n,r))}}},{16:16,36:36,37:37}],21:[function(s,t,o){function n(e){if(e)for(var t=Object.keys(e),s=0;s<t.length;++s)this[t[s]]=e[t[s]]}t.exports=n;var e=s(39);n.create=function(e){return this.$type.create(e)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.fromObject=function(e){return this.$type.fromObject(e)},n.toObject=function(e,t){return this.$type.toObject(e,t)},n.prototype.toJSON=function(){return this.$type.toObject(this,e.toJSONOptions)}},{39:39}],22:[function(e,t,s){function n(a,t,i,n,r,c,m,l,E){if(p.isObject(r)?(m=r,r=c=_):p.isObject(c)&&(m=c,c=_),t!==_&&!p.isString(t))throw TypeError("type must be a string");if(!p.isString(i))throw TypeError("requestType must be a string");if(!p.isString(n))throw TypeError("responseType must be a string");d.call(this,a,m),this.type=t||"rpc",this.requestType=i,this.requestStream=!!r||_,this.responseType=n,this.responseStream=!!c||_,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=l,this.parsedOptions=E}t.exports=n;var d=e(24),p=(((n.prototype=Object.create(d.prototype)).constructor=n).className="Method",e(37));n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},n.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,p.toObject(["type","rpc"!==this.type&&this.type||_,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",e?this.comment:_,"parsedOptions",this.parsedOptions])},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),d.prototype.resolve.call(this))}},{24:24,37:37}],23:[function(d,t,i){function n(e,t){if(!e||!e.length)return _;for(var s={},n=0;n<e.length;++n)s[e[n].name]=e[n].toJSON(t);return s}function a(e,t){c.call(this,e,t),this.nested=_,this.f=null}function p(e){return e.f=null,e}t.exports=a;var c=d(24),m=(((a.prototype=Object.create(c.prototype)).constructor=a).className="Namespace",d(16)),l=d(37),E=d(25),u,g,T;a.fromJSON=function(e,t){return new a(e,t.options).addJSON(t.nested)},a.arrayToJSON=n,a.isReservedId=function(e,t){if(e)for(var s=0;s<e.length;++s)if("string"!=typeof e[s]&&e[s][0]<=t&&e[s][1]>t)return!0;return!1},a.isReservedName=function(e,t){if(e)for(var s=0;s<e.length;++s)if(e[s]===t)return!0;return!1},Object.defineProperty(a.prototype,"nestedArray",{get:function(){return this.f||(this.f=l.toArray(this.nested))}}),a.prototype.toJSON=function(e){return l.toObject(["options",this.options,"nested",n(this.nestedArray,e)])},a.prototype.addJSON=function(e){if(e)for(var t=Object.keys(e),n=0,s;n<t.length;++n)s=e[t[n]],this.add((s.fields===_?s.values===_?s.methods===_?s.id===_?a:m:g:T:u).fromJSON(t[n],s));return this},a.prototype.get=function(e){return this.nested&&this.nested[e]||null},a.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof T)return this.nested[e].values;throw Error("no such enum: "+e)},a.prototype.add=function(e){if(!(e instanceof m&&e.extend!==_||e instanceof u||e instanceof E||e instanceof T||e instanceof g||e instanceof a))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof a&&e instanceof a)||t instanceof u||t instanceof g)throw Error("duplicate name '"+e.name+"' in "+this);for(var s=t.nestedArray,n=0;n<s.length;++n)e.add(s[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return(this.nested[e.name]=e).onAdd(this),p(this)},a.prototype.remove=function(e){if(!(e instanceof c))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=_),e.onRemove(this),p(this)},a.prototype.define=function(e,s){if(l.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 o=this,i;0<e.length;)if(i=e.shift(),!(o.nested&&o.nested[i]))o.add(o=new a(i));else if(!((o=o.nested[i])instanceof a))throw Error("path conflicts with non-namespace objects");return s&&o.addJSON(s),o},a.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof a?e[t++].resolveAll():e[t++].resolve();return this.resolve()},a.prototype.lookup=function(s,o,d){if("boolean"==typeof o?(d=o,o=_):o&&!Array.isArray(o)&&(o=[o]),l.isString(s)&&s.length){if("."===s)return this.root;s=s.split(".")}else if(!s.length)return this;if(""===s[0])return this.root.lookup(s.slice(1),o);var p=this.get(s[0]);if(!p){for(var c=0;c<this.nestedArray.length;++c)if(this.f[c]instanceof a&&(p=this.f[c].lookup(s,o,!0)))return p;}else if(1===s.length){if(!o||~o.indexOf(p.constructor))return p;}else if(p instanceof a&&(p=p.lookup(s.slice(1),o,!0)))return p;return null===this.parent||d?null:this.parent.lookup(s,o)},a.prototype.lookupType=function(e){var t=this.lookup(e,[u]);if(t)return t;throw Error("no such type: "+e)},a.prototype.lookupEnum=function(e){var t=this.lookup(e,[T]);if(t)return t;throw Error("no such Enum '"+e+"' in "+this)},a.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[u,T]);if(t)return t;throw Error("no such Type or Enum '"+e+"' in "+this)},a.prototype.lookupService=function(e){var t=this.lookup(e,[g]);if(t)return t;throw Error("no such Service '"+e+"' in "+this)},a.u=function(e,t,s){u=e,g=t,T=s}},{16:16,24:24,25:25,37:37}],24:[function(s,t,i){function n(e,t){if(!a.isString(e))throw TypeError("name must be a string");if(t&&!a.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}(t.exports=n).className="ReflectionObject";var a=s(37),e;Object.defineProperties(n.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(".")}}}),n.prototype.toJSON=function(){throw Error()},n.prototype.onAdd=function(n){this.parent&&this.parent!==n&&this.parent.remove(this),this.parent=n,this.resolved=!1,n=n.root,n instanceof e&&n.h(this)},n.prototype.onRemove=function(n){n=n.root,n instanceof e&&n.a(this),this.parent=null,this.resolved=!1},n.prototype.resolve=function(){return this.resolved||this.root instanceof e&&(this.resolved=!0),this},n.prototype.getOption=function(e){return this.options?this.options[e]:_},n.prototype.setOption=function(e,t,s){return s&&this.options&&this.options[e]!==_||((this.options||(this.options={}))[e]=t),this},n.prototype.setParsedOption=function(o,i,t){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions,s,d;return t?(s=n.find(function(e){return Object.prototype.hasOwnProperty.call(e,o)}))?(d=s[o],a.setProperty(d,t,i)):((s={})[o]=a.setProperty({},t,i),n.push(s)):((d={})[o]=i,n.push(d)),this},n.prototype.setOptions=function(e,t){if(e)for(var s=Object.keys(e),n=0;n<s.length;++n)this.setOption(s[n],e[s[n]],t);return this},n.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},n.u=function(n){e=n}},{37:37}],25:[function(a,t,i){function d(e,t,s,o){if(Array.isArray(t)||(s=t,t=_),p.call(this,e,s),t!==_&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function o(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}t.exports=d;var p=a(24),e=(((d.prototype=Object.create(p.prototype)).constructor=d).className="OneOf",a(16)),r=a(37);d.fromJSON=function(e,t){return new d(e,t.oneof,t.options,t.comment)},d.prototype.toJSON=function(e){return e=!!e&&!!e.keepComments,r.toObject(["options",this.options,"oneof",this.oneof,"comment",e?this.comment:_])},d.prototype.add=function(n){if(n instanceof e)return n.parent&&n.parent!==this.parent&&n.parent.remove(n),this.oneof.push(n.name),this.fieldsArray.push(n),o(n.partOf=this),this;throw TypeError("field must be a Field")},d.prototype.remove=function(n){if(!(n instanceof e))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(n);if(0>t)throw Error(n+" is not a member of "+this);return this.fieldsArray.splice(t,1),-1<(t=this.oneof.indexOf(n.name))&&this.oneof.splice(t,1),n.partOf=null,this},d.prototype.onAdd=function(e){p.prototype.onAdd.call(this,e);for(var t=0,s;t<this.oneof.length;++t)s=e.get(this.oneof[t]),s&&!s.partOf&&(s.partOf=this).fieldsArray.push(s);o(this)},d.prototype.onRemove=function(e){for(var t=0,s;t<this.fieldsArray.length;++t)(s=this.fieldsArray[t]).parent&&s.parent.remove(s);p.prototype.onRemove.call(this,e)},d.d=function(){for(var e=Array(arguments.length),n=0;n<arguments.length;)e[n]=arguments[n++];return function(n,t){r.decorateType(n.constructor).add(new d(t,e)),Object.defineProperty(n,t,{get:r.oneOfGetter(e),set:r.oneOfSetter(e)})}}},{16:16,24:24,37:37}],26:[function(e,t,s){function ee(U,t,G){function q(e,t,s){var n=ee.filename;return s||(ee.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+Y.line+")")}function L(){var e=[],n;do if("\""!==(n=Q())&&"'"!==n)throw q(n);while((e.push(Q()),W(n),"\""===(n=J())||"'"===n));return e.join("")}function k(s){var o=Q();switch(o){case"'":case"\"":return K(o),L();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{var n=o,a=!0,r=1;switch("-"==(n[0]||"")&&(r=-1,n=n.substring(1)),n){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(i.test(n))return r*parseInt(n,10);if(l.test(n))return r*parseInt(n,16);if(T.test(n))return r*parseInt(n,8);if(S.test(n))return r*parseFloat(n);throw q(n,"number",!0)}catch(e){if(s&&D.test(o))return o;throw q(o,"value")}}function O(e,t){for(var s;t&&("\""===(s=J())||"'"===s)?e.push(L()):e.push([s=P(Q()),W("to",!0)?P(Q()):s]),W(",",!0););W(";")}function P(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(t||"-"!=(e[0]||"")){if(r.test(e))return parseInt(e,10);if(u.test(e))return parseInt(e,16);if(C.test(e))return parseInt(e,8)}throw q(e,"id")}function A(o,t){switch(t){case"option":return V(o,t),W(";"),1;case"message":return F(o),1;case"enum":return N(o),1;case"service":var i=o,a=t,d;if(R.test(a=Q()))return x(d=new m(a),function(a){if(!A(d,a)){if("rpc"!==a)throw q(a);var p=d,i=v(),n=a;if(!R.test(a=Q()))throw q(a,"name");var r=a,c,m,l;if(W("("),W("stream",!0)&&(m=!0),!D.test(a=Q()))throw q(a);if(c=a,W(")"),W("returns"),W("("),W("stream",!0)&&(l=!0),!D.test(a=Q()))throw q(a);a=a,W(")");var u=new E(r,n,c,a,m,l);u.comment=i,x(u,function(e){if("option"!==e)throw q(e);V(u,e),W(";")}),p.add(u)}}),i.add(d),1;throw q(a,"service name");case"extend":var p=o,i=t,s;if(D.test(i=Q()))return s=i,x(null,function(e){switch(e){case"required":case"repeated":H(p,e,s);break;case"optional":H(p,$?"proto3_optional":"optional",s);break;default:if(!$||!D.test(e))throw q(e);K(e),H(p,"optional",s)}}),1;throw q(i,"reference")}}function x(s,t,o){var n=Y.line,e;if(s&&("string"!=typeof s.comment&&(s.comment=v()),s.filename=ee.filename),W("{",!0)){for(;"}"!==(e=Q());)t(e);W(";",!0)}else o&&o(),W(";"),s&&("string"!=typeof s.comment||M)&&(s.comment=v(n)||s.comment)}function F(e,t){if(!R.test(t=Q()))throw q(t,"type name");var a=new n(t);x(a,function(d){if(!A(a,d))switch(d){case"map":var t=a,i=(W("<"),Q());if(y.mapKey[i]===_)throw q(i,"type");W(",");var m=Q();if(!D.test(m))throw q(m,"type");W(">");var r=Q();if(!R.test(r))throw q(r,"name");W("=");var l=new p(X(r),P(Q()),i,m);x(l,function(e){if("option"!==e)throw q(e);V(l,e),W(";")},function(){j(l)}),t.add(l);break;case"required":case"repeated":H(a,d);break;case"optional":H(a,$?"proto3_optional":"optional");break;case"oneof":if(r=a,i=d,!R.test(i=Q()))throw q(i,"name");var s=new c(X(i));x(s,function(e){"option"===e?(V(s,e),W(";")):(K(e),H(s,"optional"))}),r.add(s);break;case"extensions":O(a.extensions||(a.extensions=[]));break;case"reserved":O(a.reserved||(a.reserved=[]),!0);break;default:if(!$||!D.test(d))throw q(d);K(d),H(a,"optional")}}),e.add(a)}function H(p,t,i){var m=Q();if("group"===m){var l=p,o=t,E=Q(),T,C;if(R.test(E))return C=g.lcFirst(E),E===C&&(E=g.ucFirst(E)),W("="),S=P(Q()),(T=new n(E)).group=!0,(C=new d(C,S,E,o)).filename=ee.filename,x(T,function(e){switch(e){case"option":V(T,e),W(";");break;case"required":case"repeated":H(T,e);break;case"optional":H(T,$?"proto3_optional":"optional");break;case"message":F(T);break;case"enum":N(T);break;default:throw q(e)}}),void l.add(T).add(C);throw q(E,"name")}for(;m.endsWith(".")||J().startsWith(".");)m+=Q();if(!D.test(m))throw q(m,"type");var S=Q();if(!R.test(S))throw q(S,"name");S=X(S),W("=");var O=new d(S,P(Q()),m,t,i);x(O,function(e){if("option"!==e)throw q(e);V(O,e),W(";")},function(){j(O)}),"proto3_optional"===t?(o=new c("_"+S),O.setOption("proto3_optional",!0),o.add(O),p.add(o)):p.add(O),$||!O.repeated||y.packed[m]===_&&y.basic[m]!==_||O.setOption("packed",!1,!0)}function N(e,t){if(!R.test(t=Q()))throw q(t,"name");var a=new o(t);x(a,function(s){switch(s){case"option":V(a,s),W(";");break;case"reserved":O(a.reserved||(a.reserved=[]),!0);break;default:var t=a,o=s;if(!R.test(o))throw q(o,"name");W("=");var n=P(Q(),!0),i={options:_,setOption:function(e,t){this.options===_&&(this.options={}),this.options[e]=t}};return x(i,function(e){if("option"!==e)throw q(e);V(i,e),W(";")},function(){j(i)}),void t.add(o,n,i.comment,i.options)}}),e.add(a)}function V(o,t){var a=W("(",!0);if(!D.test(t=Q()))throw q(t,"name");var d=t,p=d,a=(a&&(W(")"),p=d="("+d+")",t=J(),f.test(t)&&(c=t.slice(1),d+=t,Q())),W("="),function n(a,i){if(W("{",!0)){for(var t={};!W("}",!0);){if(!R.test(oe=Q()))throw q(oe,"name");if(null===oe)throw q(oe,"end of input");var r=oe,d,p;if(W(":",!0),"{"===J())d=n(a,i+"."+oe);else if("["!==J())d=k(!0),B(a,i+"."+oe,d);else if(d=[],W("[",!0)){for(;p=k(!0),d.push(p),W(",",!0););W("]"),void 0!==p&&B(a,i+"."+oe,p)}var c=t[r];c&&(d=[].concat(c).concat(d)),t[r]=d,W(",",!0),W(";",!0)}return t}var m=k(!0);return B(a,i,m),m}(o,d)),c;t=p,d=a,p=c,(a=o).setParsedOption&&a.setParsedOption(t,d,p)}function B(e,t,s){e.setOption&&e.setOption(t,s)}function j(e){if(W("[",!0)){for(;V(e,"option"),W(",",!0););W("]")}}t instanceof I||(G=t,t=new I);for(var M=(G=G||ee.defaults).preferTrailingComment||!1,Y=a(U,G.alternateCommentMode||!1),Q=Y.next,K=Y.push,J=Y.peek,W=Y.skip,v=Y.cmnt,b=!0,$=!1,z=t,X=G.keepCase?function(e){return e}:g.camelCase,Z,te,ne,se,oe,ie,re;null!==(oe=Q());)switch(oe){case"package":if(!b)throw q(oe);if(Z!==_)throw q("package");if(Z=Q(),!D.test(Z))throw q(Z,"name");z=z.define(Z),W(";");break;case"import":if(!b)throw q(oe);switch(re=ie=void 0,J()){case"weak":re=ne=ne||[],Q();break;case"public":Q();default:re=te=te||[]}ie=L(),W(";"),re.push(ie);break;case"syntax":if(!b)throw q(oe);if(W("="),se=L(),!($="proto3"===se)&&"proto2"!==se)throw q(se,"syntax");W(";");break;case"option":V(z,oe),W(";");break;default:if(A(z,oe)){b=!1;continue}throw q(oe)}return ee.filename=null,{package:Z,imports:te,weakImports:ne,syntax:se,root:t}}(t.exports=ee).filename=null,ee.defaults={keepCase:!1};var a=e(34),I=e(29),n=e(35),d=e(16),p=e(20),c=e(25),o=e(15),m=e(33),E=e(22),y=e(36),g=e(37),i=/^[1-9][0-9]*$/,r=/^-?[1-9][0-9]*$/,l=/^0[x][0-9a-fA-F]+$/,u=/^-?0[x][0-9a-fA-F]+$/,T=/^0[0-7]+$/,C=/^-?0[0-7]+$/,S=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,R=/^[a-zA-Z_][a-zA-Z_0-9]*$/,D=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,f=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/},{15:15,16:16,20:20,22:22,25:25,29:29,33:33,34:34,35:35,36:36,37:37}],27:[function(m,t,i){function E(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function n(e){this.buf=e,this.pos=0,this.len=e.length}function u(){return p.Buffer?function(e){return(n.create=function(e){return p.Buffer.isBuffer(e)?new c(e):o(e)})(e)}:o}function g(){var n=new e(0,0),t=0;if(!(4<this.len-this.pos)){for(;3>t;++t){if(this.pos>=this.len)throw E(this);if(n.lo=(n.lo|(127&this.buf[this.pos])<<7*t)>>>0,128>this.buf[this.pos++])return n}return n.lo=(n.lo|(127&this.buf[this.pos++])<<7*t)>>>0,n}for(;4>t;++t)if(n.lo=(n.lo|(127&this.buf[this.pos])<<7*t)>>>0,128>this.buf[this.pos++])return n;if(n.lo=(n.lo|(127&this.buf[this.pos])<<28)>>>0,n.hi=(n.hi|(127&this.buf[this.pos])>>4)>>>0,128>this.buf[this.pos++])return n;if(t=0,4<this.len-this.pos){for(;5>t;++t)if(n.hi=(n.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,128>this.buf[this.pos++])return n;}else for(;5>t;++t){if(this.pos>=this.len)throw E(this);if(n.hi=(n.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,128>this.buf[this.pos++])return n}throw Error("invalid varint encoding")}function l(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw E(this,8);return new e(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}t.exports=n;var p=m(39),e=p.LongBits,s=p.utf8,o="undefined"==typeof Uint8Array?function(e){if(Array.isArray(e))return new n(e);throw Error("illegal buffer")}:function(e){if(e instanceof Uint8Array||Array.isArray(e))return new n(e);throw Error("illegal buffer")},c,T;n.create=u(),n.prototype.c=p.Array.prototype.subarray||p.Array.prototype.slice,n.prototype.uint32=(T=4294967295,function(){if(T=(127&this.buf[this.pos])>>>0,128>this.buf[this.pos++]||(T=(T|(127&this.buf[this.pos])<<7)>>>0,128>this.buf[this.pos++]||(T=(T|(127&this.buf[this.pos])<<14)>>>0,128>this.buf[this.pos++]||(T=(T|(127&this.buf[this.pos])<<21)>>>0,128>this.buf[this.pos++]||(T=(T|(15&this.buf[this.pos])<<28)>>>0,128>this.buf[this.pos++]||!((this.pos+=5)>this.len))))))return T;throw this.pos=this.len,E(this,10)}),n.prototype.int32=function(){return 0|this.uint32()},n.prototype.sint32=function(){var e=this.uint32();return 0|e>>>1^-(1&e)},n.prototype.bool=function(){return 0!==this.uint32()},n.prototype.fixed32=function(){if(this.pos+4>this.len)throw E(this,4);return l(this.buf,this.pos+=4)},n.prototype.sfixed32=function(){if(this.pos+4>this.len)throw E(this,4);return 0|l(this.buf,this.pos+=4)},n.prototype.float=function(){if(this.pos+4>this.len)throw E(this,4);var e=p.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},n.prototype.double=function(){if(this.pos+8>this.len)throw E(this,4);var e=p.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},n.prototype.bytes=function(){var e=this.uint32(),s=this.pos,o=this.pos+e;if(o>this.len)throw E(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(s,o):s===o?(e=p.Buffer)?e.alloc(0):new this.buf.constructor(0):this.c.call(this.buf,s,o)},n.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},n.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw E(this,e);this.pos+=e}else do if(this.pos>=this.len)throw E(this);while(128&this.buf[this.pos++]);return this},n.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},n.u=function(e){c=e,n.create=u(),c.u();var t=p.Long?"toLong":"toNumber";p.merge(n.prototype,{int64:function(){return g.call(this)[t](!1)},uint64:function(){return g.call(this)[t](!0)},sint64:function(){return g.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},{39:39}],28:[function(o,t,i){function n(e){s.call(this,e)}t.exports=n;var s=o(27),r=((n.prototype=Object.create(s.prototype)).constructor=n,o(39));n.u=function(){r.Buffer&&(n.prototype.c=r.Buffer.prototype.slice)},n.prototype.string=function(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=e(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=e(this.pos+n,this.len))},n.u()},{27:27,39:39}],29:[function(c,t,i){function n(e){a.call(this,"",e),this.deferred=[],this.files=[]}function m(){}function l(s,t){var o=t.parent.lookup(t.extend),i;if(o)return i=new e(t.fullName,t.id,t.type,t.rule,_,t.options),o.get(i.name)||((i.declaringField=t).extensionField=i,o.add(i)),1}t.exports=n;var a=c(23),e=(((n.prototype=Object.create(a.prototype)).constructor=n).className="Root",c(16)),s=c(15),o=c(25),E=c(37),u,g,T;n.fromJSON=function(e,t){return t=t||new n,e.options&&t.setOptions(e.options),t.addJSON(e.nested)},n.prototype.resolvePath=E.path.resolve,n.prototype.fetch=E.fetch,n.prototype.load=function C(d,p,y){function S(e,t){if(y){if(o)throw e;var s=y;y=null,s(e,t)}}function O(e){var n=e.lastIndexOf("google/protobuf/");return-1<n&&(e=e.substring(n),e in T)?e:null}function f(s,t){try{if(E.isString(t)&&"{"==(t[0]||"")&&(t=JSON.parse(t)),E.isString(t)){g.filename=s;var d=g(t,c,p),r=0,m;if(d.imports)for(;r<d.imports.length;++r)(m=O(d.imports[r])||c.resolvePath(s,d.imports[r]))&&a(m);if(d.weakImports)for(r=0;r<d.weakImports.length;++r)(m=O(d.weakImports[r])||c.resolvePath(s,d.weakImports[r]))&&a(m,!0)}else c.setOptions(t.options).addJSON(t.nested)}catch(e){S(e)}o||u||S(null,c)}function a(e,s){if(e=O(e)||e,!~c.files.indexOf(e))if(c.files.push(e),e in T)o?f(e,T[e]):(++u,setTimeout(function(){--u,f(e,T[e])}));else if(o){var i;try{i=E.fs.readFileSync(e).toString("utf8")}catch(e){return void(s||S(e))}f(e,i)}else++u,c.fetch(e,function(n,t){--u,y&&(n?s?u||S(null,c):S(n):f(e,t))})}"function"==typeof p&&(y=p,p=_);var c=this;if(!y)return E.asPromise(C,c,d,p);var o=y===m,u=0;E.isString(d)&&(d=[d]);for(var t=0,I;t<d.length;++t)(I=c.resolvePath("",d[t]))&&a(I);return o?c:(u||S(null,c),_)},n.prototype.loadSync=function(e,t){if(E.isNode)return this.load(e,t,m);throw Error("not supported")},n.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 a.prototype.resolveAll.call(this)};var y=/^[A-Z]/;n.prototype.h=function(r){if(r instanceof e)r.extend===_||r.extensionField||l(0,r)||this.deferred.push(r);else if(r instanceof s)y.test(r.name)&&(r.parent[r.name]=r.values);else if(!(r instanceof o)){if(r instanceof u)for(var t=0;t<this.deferred.length;)l(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var a=0;a<r.nestedArray.length;++a)this.h(r.f[a]);y.test(r.name)&&(r.parent[r.name]=r)}},n.prototype.a=function(o){var t;if(o instanceof e)o.extend!==_&&(o.extensionField?(o.extensionField.parent.remove(o.extensionField),o.extensionField=null):-1<(t=this.deferred.indexOf(o))&&this.deferred.splice(t,1));else if(o instanceof s)y.test(o.name)&&delete o.parent[o.name];else if(o instanceof a){for(var r=0;r<o.nestedArray.length;++r)this.a(o.f[r]);y.test(o.name)&&delete o.parent[o.name]}},n.u=function(e,t,s){u=e,g=t,T=s}},{15:15,16:16,23:23,25:25,37:37}],30:[function(e,t,s){t.exports={}},{}],31:[function(e,t,s){s.Service=e(32)},{32:32}],32:[function(e,t,s){function n(e,t,s){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");a.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!s}t.exports=n;var a=e(39);((n.prototype=Object.create(a.EventEmitter.prototype)).constructor=n).prototype.rpcCall=function s(d,n,p,i,e){if(!i)throw TypeError("request must be specified");var r=this;if(!e)return a.asPromise(s,r,d,n,p,i);if(!r.rpcImpl)return setTimeout(function(){e(Error("already ended"))},0),_;try{return r.rpcImpl(d,n[r.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(n,t){if(n)return r.emit("error",n,d),e(n);if(null===t)return r.end(!0),_;if(!(t instanceof p))try{t=p[r.responseDelimited?"decodeDelimited":"decode"](t)}catch(n){return r.emit("error",n,d),e(n)}return r.emit("data",t,d),e(null,t)})}catch(n){return r.emit("error",n,d),setTimeout(function(){e(n)},0),_}},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{39:39}],33:[function(a,t,i){function d(n,t){e.call(this,n,t),this.methods={},this.l=null}function n(e){return e.l=null,e}t.exports=d;var e=a(23),o=(((d.prototype=Object.create(e.prototype)).constructor=d).className="Service",a(22)),p=a(37),c=a(31);d.fromJSON=function(s,t){var i=new d(s,t.options);if(t.methods)for(var n=Object.keys(t.methods),r=0;r<n.length;++r)i.add(o.fromJSON(n[r],t.methods[n[r]]));return t.nested&&i.addJSON(t.nested),i.comment=t.comment,i},d.prototype.toJSON=function(s){var t=e.prototype.toJSON.call(this,s),o=!!s&&!!s.keepComments;return p.toObject(["options",t&&t.options||_,"methods",e.arrayToJSON(this.methodsArray,s)||{},"nested",t&&t.nested||_,"comment",o?this.comment:_])},Object.defineProperty(d.prototype,"methodsArray",{get:function(){return this.l||(this.l=p.toArray(this.methods))}}),d.prototype.get=function(n){return this.methods[n]||e.prototype.get.call(this,n)},d.prototype.resolveAll=function(){for(var n=this.methodsArray,t=0;t<n.length;++t)n[t].resolve();return e.prototype.resolve.call(this)},d.prototype.add=function(s){if(this.get(s.name))throw Error("duplicate name '"+s.name+"' in "+this);return s instanceof o?n((this.methods[s.name]=s).parent=this):e.prototype.add.call(this,s)},d.prototype.remove=function(s){if(s instanceof o){if(this.methods[s.name]!==s)throw Error(s+" is not a member of "+this);return delete this.methods[s.name],s.parent=null,n(this)}return e.prototype.remove.call(this,s)},d.prototype.create=function(a,t,i){for(var n=new c.Service(a,t,i),e=0,d,m;e<this.methodsArray.length;++e)m=p.lcFirst((d=this.l[e]).resolve().name).replace(/[^$\w_]/g,""),n[m]=p.codegen(["r","c"],p.isReserved(m)?m+"_":m)("return this.rpcCall(m,q,s,r,c)")({m:d,q:d.resolvedRequestType.ctor,s:d.resolvedResponseType.ctor});return n}},{22:22,23:23,31:31,37:37}],34:[function(o,t,i){function n(e){return e.replace(u,function(e,t){return"\\"===t||""===t?t:r[t]||""})}function a(T,C){function a(e){return Error("illegal "+e+" (line "+I+")")}function y(e){return T[0|e]||""}function t(a,d,i){var p={type:T[0|a++]||"",lineEmpty:!1,leading:i},i=C?2:3,e=a-i,E;do if(0>--e||"\n"==(E=T[0|e]||"")){p.lineEmpty=!0;break}while(" "===E||"\t"===E);for(var g=T.substring(a,d).split(l),o=0;o<g.length;++o)g[o]=g[o].replace(C?m:c,"").trim();p.text=g.join("\n").trim(),A[I]=p,R=I}function i(e){var n=g(e),e=T.substring(e,n);return /^\s*\/\//.test(e)}function g(e){for(var t=e;t<O&&"\n"!==y(t);)t++;return t}function o(){if(0<N.length)return N.shift();if(M){var c="'"===M?d:s,m=(c.lastIndex=S-1,c.exec(T));if(m)return S=c.lastIndex,r(M),M=null,n(m[1]);throw a("string")}var d=0===S,l,_,R,A,v;do{if(S===O)return null;for(l=!1;E.test(R=y(S));)if("\n"===R&&(d=!0,++I),++S===O)return null;if("/"===y(S)){if(++S===O)throw a("comment");if("/"!==y(S)){if("*"!==(R=y(S)))return"/";A=S+1,v=C||"*"===y(A);do if("\n"===R&&++I,++S===O)throw a("comment");while((_=R,R=y(S),"*"!==_||"/"!==R));++S,v&&(t(A,S-2,d),d=!0)}else if(C){if(v=!1,i((A=S)-1))for(v=!0;(S=g(S))!==O&&(S++,d&&i(S)););else S=e(O,g(S)+1);v&&(t(A,S,d),d=!0),I++}else{for(v="/"===y(A=S+1);"\n"!==y(++S);)if(S===O)return null;++S,v&&(t(A,S-1,d),d=!0),++I}l=!0}}while(l);var h=S;if(p.lastIndex=0,!p.test(y(h++)))for(;h<O&&!p.test(y(h));)++h;return c=T.substring(S,S=h),"\""!=c&&"'"!=c||(M=c),c}function r(e){N.push(e)}function u(){if(!N.length){var e=o();if(null===e)return null;r(e)}return N[0]}T=T.toString();var S=0,O=T.length,I=1,R=0,A={},N=[],M=null;return Object.defineProperty({next:o,peek:u,push:r,skip:function(e,t){var s=u();if(s===e)return o(),!0;if(t)return!1;throw a("token '"+s+"', '"+e+"' expected")},cmnt:function(e){var t=null,s;return e===_?(s=A[I-1],delete A[I-1],s&&(C||"*"===s.type||s.lineEmpty)&&(t=s.leading?s.text:null)):(R<e&&u(),s=A[e],delete A[e],!s||s.lineEmpty||!C&&"/"!==s.type||(t=s.leading?null:s.text)),t}},"line",{get:function(){return I}})}t.exports=a;var p=/[\s{}=;:[\],'"()<>]/g,s=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,d=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,c=/^ *[*/]+ */,m=/^\s*\*?\/*/,l=/\n/g,E=/\s/,u=/\\(.?)/g,r={0:"\0",r:"\r",n:"\n",t:"\t"};a.unescape=n},{}],35:[function(E,t,i){function g(e,t){m.call(this,e,t),this.fields={},this.oneofs=_,this.extensions=_,this.reserved=_,this.group=_,this.p=null,this.e=null,this.v=null,this.b=null}function n(e){return e.p=e.e=e.v=null,delete e.encode,delete e.decode,delete e.verify,e}t.exports=g;var m=E(23),o=(((g.prototype=Object.create(m.prototype)).constructor=g).className="Type",E(15)),u=E(25),T=E(16),C=E(20),a=E(33),r=E(21),e=E(27),s=E(42),c=E(37),d=E(14),p=E(13),l=E(40),S=E(12),y=E(41);Object.defineProperties(g.prototype,{fieldsById:{get:function(){if(!this.p){this.p={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var s=this.fields[e[t]],o=s.id;if(this.p[o])throw Error("duplicate id "+o+" in "+this);this.p[o]=s}}return this.p}},fieldsArray:{get:function(){return this.e||(this.e=c.toArray(this.fields))}},oneofsArray:{get:function(){return this.v||(this.v=c.toArray(this.oneofs))}},ctor:{get:function(){return this.b||(this.ctor=g.generateConstructor(this)())},set:function(e){for(var t=e.prototype,s=(t instanceof r||((e.prototype=new r).constructor=e,c.merge(e.prototype,t)),e.$type=e.prototype.$type=this,c.merge(e,r,!0),this.b=e,0);s<this.fieldsArray.length;++s)this.e[s].resolve();for(var o={},s=0;s<this.oneofsArray.length;++s)o[this.v[s].resolve().name]={get:c.oneOfGetter(this.v[s].oneof),set:c.oneOfSetter(this.v[s].oneof)};s&&Object.defineProperties(e.prototype,o)}}}),g.generateConstructor=function(e){for(var t=c.codegen(["p"],e.name),n=0,s;n<e.fieldsArray.length;++n)(s=e.e[n]).map?t("this%s={}",c.safeProp(s.name)):s.repeated&&t("this%s=[]",c.safeProp(s.name));return t("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},g.fromJSON=function(d,t){for(var i=new g(d,t.options),n=(i.extensions=t.extensions,i.reserved=t.reserved,Object.keys(t.fields)),p=0;p<n.length;++p)i.add((void 0===t.fields[n[p]].keyType?T:C).fromJSON(n[p],t.fields[n[p]]));if(t.oneofs)for(n=Object.keys(t.oneofs),p=0;p<n.length;++p)i.add(u.fromJSON(n[p],t.oneofs[n[p]]));if(t.nested)for(n=Object.keys(t.nested),p=0;p<n.length;++p){var c=t.nested[n[p]];i.add((c.id===_?c.fields===_?c.values===_?c.methods===_?m:a:o:g:T).fromJSON(n[p],c))}return t.extensions&&t.extensions.length&&(i.extensions=t.extensions),t.reserved&&t.reserved.length&&(i.reserved=t.reserved),t.group&&(i.group=!0),t.comment&&(i.comment=t.comment),i},g.prototype.toJSON=function(e){var t=m.prototype.toJSON.call(this,e),s=!!e&&!!e.keepComments;return c.toObject(["options",t&&t.options||_,"oneofs",m.arrayToJSON(this.oneofsArray,e),"fields",m.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:_,"reserved",this.reserved&&this.reserved.length?this.reserved:_,"group",this.group||_,"nested",t&&t.nested||_,"comment",s?this.comment:_])},g.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();for(var s=this.oneofsArray,t=0;t<s.length;)s[t++].resolve();return m.prototype.resolveAll.call(this)},g.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},g.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof T&&e.extend===_){if((this.p||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).message=this,e.onAdd(this),n(this)}return e instanceof u?(this.oneofs||(this.oneofs={}),(this.oneofs[e.name]=e).onAdd(this),n(this)):m.prototype.add.call(this,e)},g.prototype.remove=function(e){if(e instanceof T&&e.extend===_){if(this.fields&&this.fields[e.name]===e)return delete this.fields[e.name],e.parent=null,e.onRemove(this),n(this);throw Error(e+" is not a member of "+this)}if(e instanceof u){if(this.oneofs&&this.oneofs[e.name]===e)return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),n(this);throw Error(e+" is not a member of "+this)}return m.prototype.remove.call(this,e)},g.prototype.isReservedId=function(e){return m.isReservedId(this.reserved,e)},g.prototype.isReservedName=function(e){return m.isReservedName(this.reserved,e)},g.prototype.create=function(e){return new this.ctor(e)},g.prototype.setup=function(){for(var o=this.fullName,a=[],i=0;i<this.fieldsArray.length;++i)a.push(this.e[i].resolve().resolvedType);this.encode=d(this)({Writer:s,types:a,util:c}),this.decode=p(this)({Reader:e,types:a,util:c}),this.verify=l(this)({types:a,util:c}),this.fromObject=S.fromObject(this)({types:a,util:c}),this.toObject=S.toObject(this)({types:a,util:c});var o=y[o],m;return o&&((m=Object.create(this)).fromObject=this.fromObject,this.fromObject=o.fromObject.bind(m),m.toObject=this.toObject,this.toObject=o.toObject.bind(m)),this},g.prototype.encode=function(e,t){return this.setup().encode(e,t)},g.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},g.prototype.decode=function(e,t){return this.setup().decode(e,t)},g.prototype.decodeDelimited=function(n){return n instanceof e||(n=e.create(n)),this.decode(n,n.uint32())},g.prototype.verify=function(e){return this.setup().verify(e)},g.prototype.fromObject=function(e){return this.setup().fromObject(e)},g.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},g.d=function(e){return function(n){c.decorateType(n,e)}}},{12:12,13:13,14:14,15:15,16:16,20:20,21:21,23:23,25:25,27:27,33:33,37:37,40:40,41:41,42:42}],36:[function(s,o,i){function n(e,t){var s=0,o={};for(t|=0;s<e.length;)o[a[s+t]]=e[s++];return o}var s=s(37),a=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{37:37}],37:[function(d,n,t){var p=n.exports=d(39),s=d(30),o=(p.codegen=d(3),p.fetch=d(5),p.path=d(8),p.fs=p.inquire("fs"),p.toArray=function(e){if(e){for(var t=Object.keys(e),s=Array(t.length),n=0;n<t.length;)s[n]=e[t[n++]];return s}return[]},p.toObject=function(s){for(var t={},o=0;o<s.length;){var i=s[o++],a=s[o++];a!==_&&(t[i]=a)}return t},/\\/g),i=/"/g,c=(p.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)},p.safeProp=function(e){return!/^[$\w_]+$/.test(e)||p.isReserved(e)?"[\""+e.replace(o,"\\\\").replace(i,"\\\"")+"\"]":"."+e},p.ucFirst=function(e){return(e[0]||"").toUpperCase()+e.substring(1)},/_([a-z])/g),m=(p.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,function(e,t){return t.toUpperCase()})},p.compareFieldsById=function(e,t){return e.id-t.id},p.decorateType=function(e,t){return e.$type?(t&&e.$type.name!==t&&(p.decorateRoot.remove(e.$type),e.$type.name=t,p.decorateRoot.add(e.$type)),e.$type):(t=new(l=l||d(35))(t||e.name),p.decorateRoot.add(t),t.ctor=e,Object.defineProperty(e,"$type",{value:t,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:t,enumerable:!1}),t)},0),l,E;p.decorateEnum=function(e){var t;return e.$type||(t=new(E=E||d(15))("Enum"+m++,e),p.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t)},p.setProperty=function(e,t,s){if("object"!=typeof e)throw TypeError("dst must be an object");if(t)return function a(s,o,i){var t=o.shift();return"__proto__"!==t&&"prototype"!==t&&(0<o.length?s[t]=a(s[t]||{},o,i):((o=s[t])&&(i=[].concat(o).concat(i)),s[t]=i)),s}(e,t=t.split("."),s);throw TypeError("path must be specified")},Object.defineProperty(p,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(d(29)))}})},{15:15,29:29,3:3,30:30,35:35,39:39,5:5,8:8}],38:[function(a,t,i){function d(e,t){this.lo=e>>>0,this.hi=t>>>0}t.exports=d;var e=a(39),r=d.zero=new d(0,0),n=(r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1},d.zeroHash="\0\0\0\0\0\0\0\0",d.fromNumber=function(e){var s,o;return 0===e?r:(o=(e=(s=0>e)?-e:e)>>>0,e=(e-o)/4294967296>>>0,s&&(e=~e>>>0,o=~o>>>0,4294967295<++o&&(o=0,4294967295<++e&&(e=0))),new d(o,e))},d.from=function(n){if("number"==typeof n)return d.fromNumber(n);if(e.isString(n)){if(!e.Long)return d.fromNumber(parseInt(n,10));n=e.Long.fromString(n)}return n.low||n.high?new d(n.low>>>0,n.high>>>0):r},d.prototype.toNumber=function(e){var n;return!e&&this.hi>>>31?(e=1+~this.lo>>>0,n=~this.hi>>>0,-(e+4294967296*(n=e?n:n+1>>>0))):this.lo+4294967296*this.hi},d.prototype.toLong=function(n){return e.Long?new e.Long(0|this.lo,0|this.hi,!!n):{low:0|this.lo,high:0|this.hi,unsigned:!!n}},String.prototype.charCodeAt);d.fromHash=function(e){return"\0\0\0\0\0\0\0\0"===e?r:new d((n.call(e,0)|n.call(e,1)<<8|n.call(e,2)<<16|n.call(e,3)<<24)>>>0,(n.call(e,4)|n.call(e,5)<<8|n.call(e,6)<<16|n.call(e,7)<<24)>>>0)},d.prototype.toHash=function(){return p(255&this.lo,255&this.lo>>>8,255&this.lo>>>16,this.lo>>>24,255&this.hi,255&this.hi>>>8,255&this.hi>>>16,this.hi>>>24)},d.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},d.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},d.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0==s?0==t?16384>e?128>e?1:2:2097152>e?3:4:16384>t?128>t?5:6:2097152>t?7:8:128>s?9:10}},{39:39}],39:[function(o,t,i){function a(s,t,o){for(var n=Object.keys(t),i=0;i<n.length;++i)s[n[i]]!==_&&o||(s[n[i]]=t[n[i]]);return s}function e(e){function s(e,t){return this instanceof s?void(Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,s):Object.defineProperty(this,"stack",{value:Error().stack||""}),t&&a(this,t)):new s(e,t)}return s.prototype=Object.create(Error.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:_,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),s}var s=i;s.asPromise=o(1),s.base64=o(2),s.EventEmitter=o(4),s.float=o(6),s.inquire=o(7),s.utf8=o(10),s.pool=o(9),s.LongBits=o(38),s.isNode=!!("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),s.global=s.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&d(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.isset=s.isSet=function(e,t){var s=e[t];return null!=s&&e.hasOwnProperty(t)&&("object"!=typeof s||0<(Array.isArray(s)?s:Object.keys(s)).length)},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),s.y=null,s.w=null,s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.w(e):new s.Array(e):s.Buffer?s.y(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"==typeof Uint8Array?Array:Uint8Array,s.Long=s.global.dcodeIO&&s.global.dcodeIO.Long||s.global.Long||s.inquire("long"),s.key2Re=/^true|false|0|1$/,s.key32Re=/^-?(?:0|[1-9][0-9]*)$/,s.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,n){return e=s.LongBits.fromHash(e),s.Long?s.Long.fromBits(e.lo,e.hi,n):e.toNumber(!!n)},s.merge=a,s.lcFirst=function(e){return(e[0]||"").toLowerCase()+e.substring(1)},s.newError=e,s.ProtocolError=e("ProtocolError"),s.oneOfGetter=function(e){for(var s={},t=0;t<e.length;++t)s[e[t]]=1;return function(){for(var e=Object.keys(this),t=e.length-1;-1<t;--t)if(1===s[e[t]]&&this[e[t]]!==_&&null!==this[e[t]])return e[t]}},s.oneOfSetter=function(e){return function(n){for(var t=0;t<e.length;++t)e[t]!==n&&delete this[e[t]]}},s.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},s.u=function(){var e=s.Buffer;e?(s.y=e.from!==Uint8Array.from&&e.from||function(n,t){return new e(n,t)},s.w=e.allocUnsafe||function(n){return new e(n)}):s.y=s.w=null}},{1:1,10:10,2:2,38:38,4:4,6:6,7:7,9:9}],40:[function(e,t,s){function d(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(o,t,i,n){if(!t.resolvedType)switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":o("if(!util.isInteger(%s))",n)("return%j",d(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":o("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",d(t,"integer|Long"));break;case"float":case"double":o("if(typeof %s!==\"number\")",n)("return%j",d(t,"number"));break;case"bool":o("if(typeof %s!==\"boolean\")",n)("return%j",d(t,"boolean"));break;case"string":o("if(!util.isString(%s))",n)("return%j",d(t,"string"));break;case"bytes":o("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))",n,n,n)("return%j",d(t,"buffer"))}else if(t.resolvedType instanceof a){o("switch(%s){",n)("default:")("return%j",d(t,"enum value"));for(var r=Object.keys(t.resolvedType.values),e=0;e<r.length;++e)o("case %i:",t.resolvedType.values[r[e]]);o("break")("}")}else o("{")("var e=types[%i].verify(%s);",i,n)("if(e)")("return%j+e",t.name+".")("}");return o}t.exports=function(a){var t=p.codegen(["m"],a.name+"$verify")("if(typeof m!==\"object\"||m===null)")("return%j","object expected"),i=a.oneofsArray,c={};i.length&&t("var p={}");for(var r=0;r<a.fieldsArray.length;++r){var m=a.e[r].resolve(),l="m"+p.safeProp(m.name),E;m.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",l,m.name),m.map?(t("if(!util.isObject(%s))",l)("return%j",d(m,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),function(e,t,s){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",s)("return%j",d(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",s)("return%j",d(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",s)("return%j",d(t,"boolean key"))}}(t,m,"k[i]"),n(t,m,r,l+"[k[i]]")("}")):m.repeated?(t("if(!Array.isArray(%s))",l)("return%j",d(m,"array"))("for(var i=0;i<%s.length;++i){",l),n(t,m,r,l+"[i]")("}")):(m.partOf&&(E=p.safeProp(m.partOf.name),1===c[m.partOf.name]&&t("if(p%s===1)",E)("return%j",m.partOf.name+": multiple values"),c[m.partOf.name]=1,t("p%s=1",E)),n(t,m,r,l)),m.optional&&t("}")}return t("return null")};var a=e(15),p=e(37)},{15:15,37:37}],41:[function(e,t,s){var a=e(21);s[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(1+e["@type"].lastIndexOf("/")),t=this.lookup(t),s;if(t)return~(s="."==(e["@type"][0]||"")?e["@type"].slice(1):e["@type"]).indexOf("/")||(s="/"+s),this.create({type_url:s,value:t.encode(t.fromObject(e)).finish()})}return this.fromObject(e)},toObject:function(o,d){var i="",p="",c,m;return d&&d.json&&o.type_url&&o.value&&(p=o.type_url.substring(1+o.type_url.lastIndexOf("/")),i=o.type_url.substring(0,1+o.type_url.lastIndexOf("/")),(c=this.lookup(p))&&(o=c.decode(o.value))),!(o instanceof this.ctor)&&o instanceof a?(c=o.$type.toObject(o,d),m="."===o.$type.fullName[0]?o.$type.fullName.slice(1):o.$type.fullName,c["@type"]=p=(i=""===i?"type.googleapis.com/":i)+m,c):this.toObject(o,d)}}},{21:21}],42:[function(m,t,i){function E(e,t,s){this.fn=e,this.len=t,this.next=_,this.val=s}function n(){}function g(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function a(){this.len=0,this.head=new E(n,0,0),this.tail=this.head,this.states=null}function c(){return C.Buffer?function(){return(a.create=function(){return new u})()}:function(){return new a}}function l(e,t,s){t[s]=255&e}function d(e,t){this.len=e,this.next=_,this.val=t}function p(e,t,s){for(;e.hi;)t[s++]=128|127&e.lo,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;127<e.lo;)t[s++]=128|127&e.lo,e.lo>>>=7;t[s++]=e.lo}function T(e,t,s){t[s]=255&e,t[s+1]=255&e>>>8,t[s+2]=255&e>>>16,t[s+3]=e>>>24}t.exports=a;var C=m(39),e=C.LongBits,s=C.base64,o=C.utf8,u;a.create=c(),a.alloc=function(e){return new C.Array(e)},C.Array!==Array&&(a.alloc=C.pool(a.alloc,C.Array.prototype.subarray)),a.prototype.g=function(e,t,s){return this.tail=this.tail.next=new E(e,t,s),this.len+=t,this},(d.prototype=Object.create(E.prototype)).fn=function(e,s,o){for(;127<e;)s[o++]=128|127&e,e>>>=7;s[o]=e},a.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new d(128>(e>>>=0)?1:16384>e?2:2097152>e?3:268435456>e?4:5,e)).len,this},a.prototype.int32=function(n){return 0>n?this.g(p,10,e.fromNumber(n)):this.uint32(n)},a.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(n){return n=e.from(n),this.g(p,n.length(),n)},a.prototype.sint64=function(n){return n=e.from(n).zzEncode(),this.g(p,n.length(),n)},a.prototype.bool=function(e){return this.g(l,1,e?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(e){return this.g(T,4,e>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(n){return n=e.from(n),this.g(T,4,n.lo).g(T,4,n.hi)},a.prototype.float=function(e){return this.g(C.float.writeFloatLE,4,e)},a.prototype.double=function(e){return this.g(C.float.writeDoubleLE,8,e)};var S=C.Array.prototype.set?function(e,t,s){t.set(e,s)}:function(e,t,s){for(var n=0;n<e.length;++n)t[s+n]=e[n]};a.prototype.bytes=function(e){var o=e.length>>>0,r;return o?(C.isString(e)&&(r=a.alloc(o=s.length(e)),s.decode(e,r,0),e=r),this.uint32(o).g(S,o,e)):this.g(l,1,0)},a.prototype.string=function(e){var t=o.length(e);return t?this.uint32(t).g(o.write,t,e):this.g(l,1,0)},a.prototype.fork=function(){return this.states=new g(this),this.head=this.tail=new E(n,0,0),this.len=0,this},a.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 E(n,0,0),this.len=0),this},a.prototype.ldelim=function(){var e=this.head,t=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=e.next,this.tail=t,this.len+=s),this},a.prototype.finish=function(){for(var e=this.head.next,s=this.constructor.alloc(this.len),o=0;e;)e.fn(e.val,s,o),o+=e.len,e=e.next;return s},a.u=function(e){u=e,a.create=c(),u.u()}},{39:39}],43:[function(a,t,i){function n(){o.call(this)}function s(e,t,s){40>e.length?r.utf8.write(e,t,s):t.utf8Write?t.utf8Write(e,s):t.write(e,s)}t.exports=n;var o=a(42),r=((n.prototype=Object.create(o.prototype)).constructor=n,a(39));n.u=function(){n.alloc=r.w,n.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&"set"===r.Buffer.prototype.set.name?function(e,t,s){t.set(e,s)}:function(e,t,s){if(e.copy)e.copy(t,s,0,e.length);else for(var o=0;o<e.length;)t[s++]=e[o++]}},n.prototype.bytes=function(e){var s=(e=r.isString(e)?r.y(e,"base64"):e).length>>>0;return this.uint32(s),s&&this.g(n.writeBytesBuffer,s,e),this},n.prototype.string=function(e){var t=r.Buffer.byteLength(e);return this.uint32(t),t&&this.g(s,t,e),this},n.u()},{39:39,42:42}]},{},[19])}();var $protobuf={...JProtobuf};/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/const $root=($protobuf.roots["default"]||($protobuf.roots["default"]=new $protobuf.Root)).addJSON({codec:{nested:{ConnectMsgBody:{fields:{protoId:{type:"string",id:1},sdkVersion:{type:"string",id:2},appkey:{type:"string",id:3},token:{type:"string",id:4},deviceId:{type:"string",id:5},platform:{type:"string",id:6},deviceCompany:{type:"string",id:7},deviceModel:{type:"string",id:8},deviceOsVersion:{type:"string",id:9},pushToken:{type:"string",id:10},networkId:{type:"string",id:11},ispNum:{type:"string",id:12},clientIp:{type:"string",id:13},packageName:{type:"string",id:14},pushChannel:{type:"string",id:15},ext:{type:"string",id:16},clientSession:{type:"string",id:17}}},ConnectAckMsgBody:{fields:{code:{type:"int32",id:1},userId:{type:"string",id:2},session:{type:"string",id:3},timestamp:{type:"int64",id:4},ext:{type:"string",id:5}}},DisconnectMsgBody:{fields:{code:{type:"int32",id:1},timestamp:{type:"int64",id:2},ext:{type:"string",id:3}}},PublishMsgBody:{fields:{index:{type:"int32",id:1},topic:{type:"string",id:2},targetId:{type:"string",id:3},timestamp:{type:"int64",id:4},data:{type:"bytes",id:5}}},PublishAckMsgBody:{fields:{index:{type:"int32",id:1},code:{type:"int32",id:2},msgId:{type:"string",id:3},timestamp:{type:"int64",id:4},msgIndex:{type:"int64",id:5},memberCount:{type:"int32",id:6},clientMsgId:{type:"string",id:7},modifiedMsg:{type:"DownMsg",id:8}}},QueryMsgBody:{fields:{index:{type:"int32",id:1},topic:{type:"string",id:2},targetId:{type:"string",id:3},timestamp:{type:"int64",id:4},data:{type:"bytes",id:5}}},QueryAckMsgBody:{fields:{index:{type:"int32",id:1},code:{type:"int32",id:2},timestamp:{type:"int64",id:3},data:{type:"bytes",id:4}}},QueryConfirmMsgBody:{fields:{index:{type:"int32",id:1}}},ImWebsocketMsg:{oneofs:{testof:{oneof:["connectMsgBody","ConnectAckMsgBody","disconnectMsgBody","publishMsgBody","pubAckMsgBody","qryMsgBody","qryAckMsgBody","qryConfirmMsgBody"]}},fields:{version:{type:"int32",id:1},cmd:{type:"int32",id:2},qos:{type:"int32",id:3},payload:{type:"bytes",id:4},connectMsgBody:{type:"ConnectMsgBody",id:11},ConnectAckMsgBody:{type:"ConnectAckMsgBody",id:12},disconnectMsgBody:{type:"DisconnectMsgBody",id:13},publishMsgBody:{type:"PublishMsgBody",id:14},pubAckMsgBody:{type:"PublishAckMsgBody",id:15},qryMsgBody:{type:"QueryMsgBody",id:16},qryAckMsgBody:{type:"QueryAckMsgBody",id:17},qryConfirmMsgBody:{type:"QueryConfirmMsgBody",id:18}}},ChannelType:{values:{Private:1,Group:2,Chatroom:3,System:4}},PushData:{fields:{title:{type:"string",id:1},pushId:{type:"string",id:2},pushText:{type:"string",id:3},pushExtraData:{type:"string",id:4}}},QryHisMsgsReq:{fields:{converId:{type:"string",id:1},type:{type:"ChannelType",id:2},startTime:{type:"int64",id:3},count:{type:"int32",id:4},order:{type:"int32",id:5},msgTypes:{rule:"repeated",type:"string",id:6}}},DownMsgSet:{fields:{msgs:{rule:"repeated",type:"DownMsg",id:1},syncTime:{type:"int64",id:2},isFinished:{type:"bool",id:3},targetUserInfo:{type:"UserInfo",id:4},groupInfo:{type:"GroupInfo",id:5}}},UpMsg:{fields:{msgType:{type:"string",id:1},msgContent:{type:"bytes",id:2},flags:{type:"int32",id:3},clientUid:{type:"string",id:4},pushData:{type:"PushData",id:5},mentionInfo:{type:"MentionInfo",id:6},referMsg:{type:"DownMsg",id:7},toUserIds:{rule:"repeated",type:"string",id:8},mergedMsgs:{type:"MergedMsgs",id:9},SearchText:{type:"string",id:10},lifeTime:{type:"int64",id:11},lifeTimeAfterRead:{type:"int64",id:12},subChannel:{type:"string",id:13},msgTime:{type:"int64",id:51}}},MentionInfo:{fields:{mentionType:{type:"MentionType",id:1},targetUsers:{rule:"repeated",type:"UserInfo",id:2}}},MentionType:{values:{MentionDefault:0,MentionAll:1,MentionSomeone:2}},DownMsg:{fields:{targetId:{type:"string",id:1},type:{type:"ChannelType",id:2},msgType:{type:"string",id:3},senderId:{type:"string",id:4},msgId:{type:"string",id:5},msgIndex:{type:"int64",id:6},msgContent:{type:"bytes",id:7},msgTime:{type:"int64",id:8},flags:{type:"int32",id:9},isSend:{type:"bool",id:10},platform:{type:"string",id:11},clientUid:{type:"string",id:12},pushData:{type:"PushData",id:13},mentionInfo:{type:"MentionInfo",id:14},isRead:{type:"bool",id:15},referMsg:{type:"DownMsg",id:16},targetUserInfo:{type:"UserInfo",id:17},groupInfo:{type:"GroupInfo",id:18},mergedMsgs:{type:"MergedMsgs",id:19},undisturbType:{type:"int32",id:20},memberCount:{type:"int32",id:21},readCount:{type:"int32",id:22},unreadIndex:{type:"int64",id:23},msgItems:{rule:"repeated",type:"StreamMsgItem",id:24},msgExtSet:{rule:"repeated",type:"MsgExtItem",id:25},msgExts:{rule:"repeated",type:"MsgExtItem",id:26},converTags:{rule:"repeated",type:"ConverTag",id:27},searchText:{type:"string",id:29},grpMemberInfo:{type:"GrpMemberInfo",id:30},destroyTime:{type:"int64",id:31},lifeTimeAfterRead:{type:"int64",id:32},isDelete:{type:"bool",id:33},subChannel:{type:"string",id:34},toUserIds:{rule:"repeated",type:"string",id:35},readTime:{type:"int64",id:36}}},GrpMemberInfo:{fields:{grpDisplayName:{type:"string",id:1},extFields:{rule:"repeated",type:"KvItem",id:2},updatedTime:{type:"int64",id:3}}},StreamMsgItem:{fields:{event:{type:"StreamEvent",id:1},subSeq:{type:"int64",id:2},partialContent:{type:"bytes",id:3}}},StreamDownMsg:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3},msgItems:{rule:"repeated",type:"StreamMsgItem",id:4}}},StreamEvent:{values:{DefaultStreamEvent:0,StreamMessage:1,StreamComplete:2}},MergedMsgs:{fields:{channelType:{type:"ChannelType",id:1},userId:{type:"string",id:2},targetId:{type:"string",id:3},msgs:{rule:"repeated",type:"SimpleMsg",id:4}}},GroupInfo:{fields:{groupId:{type:"string",id:1},groupName:{type:"string",id:2},groupPortrait:{type:"string",id:3},isMute:{type:"int32",id:4},extFields:{rule:"repeated",type:"KvItem",id:5},updatedTime:{type:"int64",id:6}}},KvItem:{fields:{key:{type:"string",id:1},value:{type:"string",id:2}}},UserIdReq:{fields:{userId:{type:"string",id:1}}},UserInfo:{fields:{userId:{type:"string",id:1},nickname:{type:"string",id:2},userPortrait:{type:"string",id:3},extFields:{rule:"repeated",type:"KvItem",id:4},updatedTime:{type:"int64",id:5},settings:{rule:"repeated",type:"KvItem",id:6},statuses:{rule:"repeated",type:"KvItem",id:7},userType:{type:"UserType",id:8}}},UserType:{values:{User:0,Bot:1}},SyncConversationsReq:{fields:{startTime:{type:"int64",id:1},count:{type:"int32",id:2}}},QryConversationsReq:{fields:{startTime:{type:"int64",id:1},count:{type:"int32",id:2},order:{type:"int32",id:3},targetId:{type:"string",id:5},channelType:{type:"ChannelType",id:6},tag:{type:"string",id:7}}},QryConversationsResp:{fields:{conversations:{rule:"repeated",type:"Conversation",id:1},isFinished:{type:"bool",id:2}}},ClearUnreadReq:{fields:{conversations:{rule:"repeated",type:"Conversation",id:1}}},DelConversationReq:{fields:{conversations:{rule:"repeated",type:"Conversation",id:1}}},ConversationsReq:{fields:{conversations:{rule:"repeated",type:"Conversation",id:1}}},Conversation:{fields:{userId:{type:"string",id:1},targetId:{type:"string",id:2},channelType:{type:"ChannelType",id:3},sortTime:{type:"int64",id:4},unreadCount:{type:"int64",id:5},msg:{type:"DownMsg",id:6},latestReadIndex:{type:"int64",id:7},mentions:{type:"Mentions",id:8},isTop:{type:"int32",id:9},topUpdatedTime:{type:"int64",id:10},undisturbType:{type:"int32",id:11},targetUserInfo:{type:"UserInfo",id:12},groupInfo:{type:"GroupInfo",id:13},syncTime:{type:"int64",id:14},isDelete:{type:"int32",id:15},latestUnreadIndex:{type:"int64",id:16},unreadTag:{type:"int32",id:17},latestReadMsgId:{type:"string",id:18},latestReadMsgTime:{type:"int64",id:19},converTags:{rule:"repeated",type:"ConverTag",id:20}}},Mentions:{fields:{isMentioned:{type:"bool",id:1},mentionMsgCount:{type:"int32",id:2},senders:{rule:"repeated",type:"UserInfo",id:3},mentionMsgs:{rule:"repeated",type:"MentionMsg",id:4}}},MentionMsg:{fields:{senderId:{type:"string",id:1},msgId:{type:"string",id:2},msgTime:{type:"int64",id:3},mentionType:{type:"MentionType",id:4}}},SyncMsgReq:{fields:{syncTime:{type:"int64",id:1},containsSendBox:{type:"bool",id:2},sendBoxSyncTime:{type:"int64",id:3},chatroomId:{type:"string",id:4}}},SyncChatroomReq:{fields:{chatroomId:{type:"string",id:1},syncTime:{type:"int64",id:2},count:{type:"int32",id:3}}},SyncChatroomMsgResp:{fields:{msgs:{rule:"repeated",type:"DownMsg",id:1}}},Notify:{fields:{type:{type:"NotifyType",id:1},syncTime:{type:"int64",id:2},chatroomId:{type:"string",id:3}}},NotifyType:{values:{Default:0,Msg:1,ChatroomMsg:2,ChatroomAtt:3,ChatroomEvent:4,ChatroomDestroy:5}},RecallMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3},msgTime:{type:"int64",id:4},exts:{rule:"repeated",type:"KvItem",id:5}}},MarkReadReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgs:{rule:"repeated",type:"SimpleMsg",id:3},indexScopes:{rule:"repeated",type:"IndexScope",id:4}}},SimpleMsg:{fields:{msgId:{type:"string",id:1},msgTime:{type:"int64",id:2},msgIndex:{type:"int64",id:3}}},IndexScope:{fields:{startIndex:{type:"int64",id:1},endIndex:{type:"int64",id:2}}},ModifyMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3},msgTime:{type:"int64",id:4},msgSeqNo:{type:"int64",id:5},msgContent:{type:"bytes",id:6},msgType:{type:"string",id:7}}},CleanHisMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},cleanMsgTime:{type:"int64",id:3},cleanScope:{type:"int32",id:4}}},QryHisMsgByIdsReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgIds:{rule:"repeated",type:"string",id:3}}},ChatRoomReq:{fields:{chatId:{type:"string",id:1},chatName:{type:"string",id:2},isAutoCreate:{type:"bool",id:3}}},QryTotalUnreadCountReq:{fields:{time:{type:"int64",id:1},filter:{type:"ConverFilter",id:2}}},ConverFilter:{fields:{channelTypes:{rule:"repeated",type:"ChannelType",id:1},ignoreConvers:{rule:"repeated",type:"SimpleConversation",id:2},tag:{type:"string",id:4}}},SimpleConversation:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2}}},QryTotalUnreadCountResp:{fields:{totalCount:{type:"int64",id:1}}},QryMentionMsgsReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},startIndex:{type:"int64",id:3},count:{type:"int32",id:4},order:{type:"int32",id:5},latestReadIndex:{type:"int64",id:6}}},QryMentionMsgsResp:{fields:{mentionMsgs:{rule:"repeated",type:"DownMsg",id:1},isFinished:{type:"bool",id:2}}},QMentionMsg:{fields:{mentionType:{type:"MentionType",id:1},senderInfo:{type:"UserInfo",id:2},msg:{type:"DownMsg",id:3}}},QryUploadTokenResp:{oneofs:{ossOf:{oneof:["qiniuCred","preSignResp"]}},fields:{ossType:{type:"OssType",id:1},qiniuCred:{type:"QiniuCredResp",id:11},preSignResp:{type:"PreSignResp",id:12}}},PreSignResp:{fields:{url:{type:"string",id:1},objKey:{type:"string",id:2},policy:{type:"string",id:3},signVersion:{type:"string",id:4},credential:{type:"string",id:5},date:{type:"string",id:6},signature:{type:"string",id:7},downloadUrl:{type:"string",id:8}}},OssType:{values:{DefaultOss:0,QiNiu:1,S3:2,Minio:3,Oss:4}},QiniuCredResp:{fields:{domain:{type:"string",id:1},token:{type:"string",id:2}}},QryUploadTokenReq:{fields:{fileType:{type:"FileType",id:1},ext:{type:"string",id:2}}},FileType:{values:{DefaultFileType:0,Image:1,Audio:2,Video:3,File:4}},QryReadDetailReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3}}},QryReadDetailResp:{fields:{readCount:{type:"int32",id:1},memberCount:{type:"int32",id:2},readMembers:{rule:"repeated",type:"MemberReadDetailItem",id:3},unreadMembers:{rule:"repeated",type:"MemberReadDetailItem",id:4}}},MemberReadDetailItem:{fields:{member:{type:"UserInfo",id:1},time:{type:"int64",id:2}}},QryMergedMsgsReq:{fields:{startTime:{type:"int64",id:1},count:{type:"int32",id:2},order:{type:"int32",id:3}}},UndisturbConversReq:{fields:{userId:{type:"string",id:1},items:{rule:"repeated",type:"UndisturbConverItem",id:2}}},UndisturbConverItem:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},undisturbType:{type:"int32",id:3}}},QryTopConversReq:{fields:{startTime:{type:"int64",id:1},sortType:{type:"TopConverSortType",id:2},order:{type:"int32",id:3}}},TopConverSortType:{values:{ByTopTime:0,BySortTime:1}},DelHisMsgsReq:{fields:{senderId:{type:"string",id:1},targetId:{type:"string",id:2},channelType:{type:"ChannelType",id:3},msgs:{rule:"repeated",type:"SimpleMsg",id:4},delScope:{type:"int32",id:5}}},QryConverReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2}}},SyncChatroomAttResp:{fields:{atts:{rule:"repeated",type:"ChatAttItem",id:1}}},ChatAtts:{fields:{chatId:{type:"string",id:1},atts:{rule:"repeated",type:"ChatAttItem",id:2},isComplete:{type:"bool",id:3},isFinished:{type:"bool",id:4}}},ChatAttItem:{fields:{key:{type:"string",id:1},value:{type:"string",id:2},attTime:{type:"int64",id:3},userId:{type:"string",id:4},optType:{type:"ChatAttOptType",id:5}}},ChatAttOptType:{values:{ChatAttOpt_Default:0,ChatAttOpt_Add:1,ChatAttOpt_Del:2}},UserUndisturb:{fields:{switch:{type:"bool",id:1},timezone:{type:"string",id:2},rules:{rule:"repeated",type:"UserUndisturbItem",id:3}}},UserUndisturbItem:{fields:{start:{type:"string",id:1},end:{type:"string",id:2}}},Nil:{fields:{}},ChatAttBatchReq:{fields:{atts:{rule:"repeated",type:"ChatAttReq",id:1}}},ChatAttBatchResp:{fields:{attResps:{rule:"repeated",type:"ChatAttResp",id:1}}},ChatAttReq:{fields:{key:{type:"string",id:1},value:{type:"string",id:2},isForce:{type:"bool",id:3},isAutoDel:{type:"bool",id:4},msg:{type:"UpMsg",id:5}}},ChatAttResp:{fields:{key:{type:"string",id:1},code:{type:"int32",id:2},attTime:{type:"int64",id:3},msgCode:{type:"int32",id:11},msgId:{type:"string",id:12},msgTime:{type:"int64",id:13},msgSeq:{type:"int64",id:14}}},QryFirstUnreadMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2}}},ChrmEvent:{fields:{eventType:{type:"ChrmEventType",id:1},chatId:{type:"string",id:2},userId:{type:"string",id:3},eventTime:{type:"int64",id:4}}},ChrmEventType:{values:{Join:0,Quit:1,Kick:2,Fallout:3}},MsgExt:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3},ext:{type:"MsgExtItem",id:4}}},MsgExtItem:{fields:{key:{type:"string",id:1},value:{type:"string",id:2},timestamp:{type:"int64",id:3},userInfo:{type:"UserInfo",id:4}}},TagConvers:{fields:{tag:{type:"string",id:1},tagName:{type:"string",id:2},convers:{rule:"repeated",type:"SimpleConversation",id:11}}},UserConverTags:{fields:{tags:{rule:"repeated",type:"ConverTag",id:1}}},ConverTag:{fields:{tag:{type:"string",id:1},tagName:{type:"string",id:2},tagType:{type:"ConverTagType",id:3}}},ConverTagType:{values:{UserTag:0,SystemTag:1,GlobalTag:2}},RtcRoomReq:{fields:{roomType:{type:"RtcRoomType",id:1},roomId:{type:"string",id:2},joinMember:{type:"RtcMember",id:3}}},RtcRoomType:{values:{OneOne:0,OneMore:1}},RtcMember:{fields:{member:{type:"UserInfo",id:1},rtcState:{type:"RtcState",id:2},callTime:{type:"int64",id:3},connectTime:{type:"int64",id:4},hangupTime:{type:"int64",id:5},inviter:{type:"UserInfo",id:6}}},RtcState:{values:{RtcStateDefault:0,RtcIncoming:1,RtcOutgoing:2,RtcConnecting:3,RtcConnected:4}},RtcRoom:{fields:{roomType:{type:"RtcRoomType",id:1},roomId:{type:"string",id:2},owner:{type:"UserInfo",id:3},rtcChannel:{type:"RtcChannel",id:4},rtcMediaType:{type:"RtcMediaType",id:5},ext:{type:"string",id:6},members:{rule:"repeated",type:"RtcMember",id:51}}},RtcInviteReq:{fields:{targetIds:{rule:"repeated",type:"string",id:1},roomType:{type:"RtcRoomType",id:2},roomId:{type:"string",id:3},rtcChannel:{type:"RtcChannel",id:4},rtcMediaType:{type:"RtcMediaType",id:5},ext:{type:"string",id:6}}},RtcMediaType:{values:{RtcAudio:0,RtcVideo:1}},InviteType:{values:{RtcInvite:0,RtcAccept:1,RtcHangup:2}},RtcInviteEvent:{fields:{inviteType:{type:"InviteType",id:1},user:{type:"UserInfo",id:2},room:{type:"RtcRoom",id:3},targetUsers:{rule:"repeated",type:"UserInfo",id:4}}},RtcAnswerReq:{fields:{targetId:{type:"string",id:1},roomId:{type:"string",id:2}}},RtcChannel:{values:{Zego:0}},RtcAuth:{fields:{zegoAuth:{type:"ZegoAuth",id:1}}},ZegoAuth:{fields:{token:{type:"string",id:1}}},RtcRoomEvent:{fields:{roomEventType:{type:"RtcRoomEventType",id:1},members:{rule:"repeated",type:"RtcMember",id:2},room:{type:"RtcRoom",id:3},reason:{type:"RtcRoomQuitReason",id:4},eventTime:{type:"int64",id:5}}},RtcRoomEventType:{values:{DefaultRtcRoomEvent:0,RtcJoin:1,RtcQuit:2,RtcDestroy:3,RtcStateChg:4}},RtcRoomQuitReason:{values:{Active:0,CallTimeout:1,PingTimeout:2}},TransReq:{fields:{items:{rule:"repeated",type:"TransItem",id:1},targetLang:{type:"string",id:2},sourceLang:{type:"string",id:3}}},TransItem:{fields:{key:{type:"string",id:1},content:{type:"string",id:2}}},SetTopMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2},msgId:{type:"string",id:3}}},GetTopMsgReq:{fields:{targetId:{type:"string",id:1},channelType:{type:"ChannelType",id:2}}},TopMsg:{fields:{msg:{type:"DownMsg",id:1},operator:{type:"UserInfo",id:2},createdTime:{type:"int64",id:3}}},FavoriteMsgIds:{fields:{items:{rule:"repeated",type:"FavoriteMsgIdItem",id:1}}},FavoriteMsgIdItem:{fields:{senderId:{type:"string",id:1},receiverId:{type:"string",id:2},channelType:{type:"ChannelType",id:3},msgId:{type:"string",id:4}}},QryFavoriteMsgsReq:{fields:{limit:{type:"int64",id:1},offset:{type:"string",id:2}}},FavoriteMsgs:{fields:{items:{rule:"repeated",type:"FavoriteMsg",id:1},offset:{type:"string",id:2}}},FavoriteMsg:{fields:{msg:{type:"DownMsg",id:1},createdTime:{type:"int64",id:2}}},RegPushTokenReq:{fields:{deviceId:{type:"string",id:1},platform:{type:"Platform",id:2},pushChannel:{type:"PushChannel",id:3},pushToken:{type:"string",id:4},packageName:{type:"string",id:5}}},Platform:{values:{DefaultPlatform:0,Android:1,iOS:2,Web:3,PC:4}},PushChannel:{values:{DefaultChannel:0,Apple:1,Huawei:2,Xiaomi:3}},PushSwitch:{fields:{switch:{type:"int32",id:1}}}}}});function WebRequest(){let e=()=>{},t=(e,t)=>{for(var n in e)t(e[n],n,e)},n=(n,s,o)=>{s=s||{},o=o||{success:e,fail:e,progress:e};let i=new XMLHttpRequest,r=s.method||"GET";i.open(r,n,!0);let a=s.headers||{};t(a,(e,t)=>{i.setRequestHeader(t,e)});let d=s.body||{},p=()=>/^(200|202)$/.test(i.status),c=s.timeout;return c&&(i.timeout=c),i.onreadystatechange=function(){if(4==i.readyState){let{responseText:e}=i;e=e||"{}";let t=JSON.parse(e);if(p())o.success(t,i);else{let{status:e}=i,n={status:e,result:t};o.fail(n)}}},i.upload.onprogress=function(e){e.lengthComputable&&o.progress&&o.progress(e)},i.onerror=e=>{o.fail(e)},i.send(d),i};return{requestNormal:n,uploadFile:n}}function WebEncoder(){let e=e=>new TextEncoder().encode(e),t=e=>new TextDecoder().decode(e);return{encoder:e,decoder:t}}function UniEncoder(){var e=String.fromCharCode;let t=e=>{var t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);return t.split("").forEach(function(e,t){n[t]=e.charCodeAt(0)}),n},n=t=>{var n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),s=Array(n.length);return n.forEach(function(t,n){s[n]=e(t)}),decodeURIComponent(escape(s.join("")))};return{encoder:t,decoder:n}}let JTextEncoder={};JTextEncoder="undefined"==typeof uni?WebEncoder():UniEncoder();var JTextEncoder$1=JTextEncoder;function UniRequest(){// url: 'https://jugglechat-file.oss-cn-beijing.aliyuncs.com',
52
52
  // filePath: tempPath,
53
53
  // header: header,
54
54
  // name: 'file',
@@ -59,7 +59,7 @@ var Storage={get,set,remove,setPrefix};/*!
59
59
  // OSSAccessKeyId: 'LTAI5tCtWtVhvRJ741YN2PKW',
60
60
  // Signature: 'NKVdKWn+RGT9gQjhAXyl/xtEcr0='
61
61
  // },
62
- function e(e){const t=e.indexOf("://");if(-1===t)return null;const n=e.slice(0,t+3),s=e.slice(t+3),o=s.indexOf("/"),i=-1===o?s:s.slice(0,o);return n+i}let t=()=>{},n=(e,n,s)=>{n=n||{},s=s||{success:t,fail:t,progress:t};let o=n.headers||{},i=n.body||{},r=uni.request({url:e,data:i,header:o,method:n.method||"GET",success:t=>{let{data:n}=t;s.success(n,{responseURL:e})},fail:e=>{s.fail(e)}});return r},s=(t,n,s)=>{let{tempPath:o,header:i,method:r,isUniWebThumbnail:a}=n;if(a){let e=WebRequest();return e.uploadFile(t,n,s)}let{objKey:d,policy:p,signVersion:c,signature:m,date:l,credential:E}=n,u={key:d,policy:p,"x-oss-signature-version":c,"x-oss-credential":E,"x-oss-date":l,"x-oss-signature":m},g=e(t),T=uni.uploadFile({url:g,filePath:o,header:i,name:"file",formData:u,success:()=>{let e=`${g}/${d}`;s.success({url:e})},fail:e=>{s.fail(e)}});T.onProgressUpdate(e=>{let{totalBytesSent:t,totalBytesExpectedToSend:n}=e;s.progress({loaded:t,total:n})})};return{requestNormal:n,uploadFile:s}}let JRequest={};JRequest="undefined"==typeof uni?WebRequest():UniRequest();var jrequest=JRequest;function Uploder(e,{type:t}){let n=(t,n,s)=>{function o(e){let t=e.split(".");return t[t.length-1]}let{token:i,domain:r}=n,{file:a,name:d}=t,p=`${utils.getUUID()}.${o(a.name)}`;d=d||p;let c={fname:d},m=e.upload(a,p,i,c);m.subscribe({next:e=>{let{total:{percent:t}}=e;s.onprogress({percent:t})},error:e=>{s.onerror(e)},complete:e=>{let{key:t}=e,n=`${r}/${t}?attname=${d}`;s.oncompleted({url:n})}})},s=(e,t,n)=>{let{url:s}=t,{file:o,name:i,tempPath:r}=e;jrequest.uploadFile(s,{...t,method:"PUT",headers:{"Content-Type":""},tempPath:r,body:o},{success:e=>{s=e.url||s.split("?")[0],n.oncompleted({url:s})},progress:e=>{let t=100*(e.loaded/e.total);n.onprogress({percent:t})},fail:e=>{n.onerror(e)}})},o=(e,t,n)=>{let{url:s}=t,{file:o,name:i,tempPath:r}=e;jrequest.uploadFile(s,{...t,method:"PUT",headers:{"Content-Type":"","x-amz-acl":"public-read"},tempPath:r,body:o},{success:()=>{s=s.split("?")[0],n.oncompleted({url:s})},progress:e=>{let t=100*(e.loaded/e.total);n.onprogress({percent:t})},fail:e=>{n.onerror(e)}})},i=(e,i,r)=>utils.isEqual(t,UPLOAD_TYPE.QINIU)?n(e,i,r):utils.isEqual(t,UPLOAD_TYPE.ALI)?s(e,i,r):utils.isEqual(t,UPLOAD_TYPE.S3)?o(e,i,r):utils.isEqual(t,UPLOAD_TYPE.MINIO)?o(e,i,r):void 0,r=(e,t,n={})=>{let{scale:s=.4}=n,o=document.createElement("video");o.src=URL.createObjectURL(e),o.preload="auto",o.onloadeddata=function(){i()};var i=function(){var e=document.createElement("canvas");let n=o.videoHeight,i=o.videoWidth,r=o.duration;e.width=i*s,e.height=n*s,e.getContext("2d").drawImage(o,0,0,e.width,e.height),e.toBlob(e=>{var s=new File([e],"frame.png",{type:"image/png"});let o={height:n,width:i,duration:r};t(s,o)})}},a=(e,t,n={})=>{let{scale:s=.4,fileCompressLimit:o=500}=n,i=e.size/1e3,r=new Image;r.src=URL.createObjectURL(e),r.onload=function(){a()};var a=function(){var e=document.createElement("canvas");let n=r.height,a=r.width;i<=o&&(s=1),e.width=a*s,e.height=n*s,e.getContext("2d").drawImage(r,0,0,e.width,e.height),e.toBlob(e=>{var s=new File([e],"tb.png",{type:"image/png"});t(s,{height:n,width:a,type:"image/png"})})}};/* 视频截取首帧 */ /* 图片压缩缩略图 */return{exec:i,capture:r,compress:a}}function WebSession(){return sessionStorage}function UniSession(){let e={},t=t=>{delete e[t]},n=t=>e[t],s=(t,n)=>{e[t]=n};return{removeItem:t,getItem:n,setItem:s}}let JSession={};JSession="undefined"==typeof uni?WebSession():UniSession();var JSessionStorage=JSession;/*
62
+ function e(e){const t=e.indexOf("://");if(-1===t)return null;const n=e.slice(0,t+3),s=e.slice(t+3),o=s.indexOf("/"),i=-1===o?s:s.slice(0,o);return n+i}let t=()=>{},n=(e,n,s)=>{n=n||{},s=s||{success:t,fail:t,progress:t};let o=n.headers||{},i=n.body||{},r=uni.request({url:e,data:i,header:o,method:n.method||"GET",success:t=>{let{data:n}=t;s.success(n,{responseURL:e})},fail:e=>{s.fail(e)}});return r},s=(t,n,s)=>{let{tempPath:o,header:i,method:r,isUniWebThumbnail:a}=n;if(a){let e=WebRequest();return e.uploadFile(t,n,s)}let{objKey:d,policy:p,signVersion:c,signature:m,date:l,credential:E}=n,u={key:d,policy:p,"x-oss-signature-version":c,"x-oss-credential":E,"x-oss-date":l,"x-oss-signature":m},g=e(t),T=uni.uploadFile({url:g,filePath:o,header:i,name:"file",formData:u,success:()=>{let e=`${g}/${d}`;s.success({url:e})},fail:e=>{s.fail(e)}});T.onProgressUpdate(e=>{let{totalBytesSent:t,totalBytesExpectedToSend:n}=e;s.progress({loaded:t,total:n})})};return{requestNormal:n,uploadFile:s}}let JRequest={};JRequest="undefined"==typeof uni?WebRequest():UniRequest();var jrequest=JRequest;function Uploder(e,{type:t}){let n=(t,n,s)=>{function o(e){let t=e.split(".");return t[t.length-1]}let{token:i,domain:r,downloadUrl:a}=n,{file:d,name:p}=t,c=`${utils.getUUID()}.${o(d.name)}`;p=p||c;let m={fname:p},l=e.upload(d,c,i,m);l.subscribe({next:e=>{let{total:{percent:t}}=e;s.onprogress({percent:t})},error:e=>{s.onerror(e)},complete:e=>{let{key:t}=e,n=`${r}/${t}?attname=${p}`;n=a||n,s.oncompleted({url:n})}})},s=(e,t,n)=>{let{url:s,downloadUrl:o}=t,{file:i,name:r,tempPath:a}=e;jrequest.uploadFile(s,{...t,method:"PUT",headers:{"Content-Type":""},tempPath:a,body:i},{success:e=>{s=e.url||s.split("?")[0],s=o||s,n.oncompleted({url:s})},progress:e=>{let t=100*(e.loaded/e.total);n.onprogress({percent:t})},fail:e=>{n.onerror(e)}})},o=(e,t,n)=>{let{url:s,downloadUrl:o}=t,{file:i,name:r,tempPath:a}=e;jrequest.uploadFile(s,{...t,method:"PUT",headers:{"Content-Type":"","x-amz-acl":"public-read"},tempPath:a,body:i},{success:()=>{s=s.split("?")[0],s=o||s,n.oncompleted({url:s})},progress:e=>{let t=100*(e.loaded/e.total);n.onprogress({percent:t})},fail:e=>{n.onerror(e)}})},i=(e,i,r)=>utils.isEqual(t,UPLOAD_TYPE.QINIU)?n(e,i,r):utils.isEqual(t,UPLOAD_TYPE.ALI)?s(e,i,r):utils.isEqual(t,UPLOAD_TYPE.S3)?o(e,i,r):utils.isEqual(t,UPLOAD_TYPE.MINIO)?o(e,i,r):void 0,r=(e,t,n={})=>{let{scale:s=.4}=n,o=document.createElement("video");o.src=URL.createObjectURL(e),o.preload="auto",o.onloadeddata=function(){i()};var i=function(){var e=document.createElement("canvas");let n=o.videoHeight,i=o.videoWidth,r=o.duration;e.width=i*s,e.height=n*s,e.getContext("2d").drawImage(o,0,0,e.width,e.height),e.toBlob(e=>{var s=new File([e],"frame.png",{type:"image/png"});let o={height:n,width:i,duration:r};t(s,o)})}},a=(e,t,n={})=>{let{scale:s=.4,fileCompressLimit:o=500}=n,i=e.size/1e3,r=new Image;r.src=URL.createObjectURL(e),r.onload=function(){a()};var a=function(){var e=document.createElement("canvas");let n=r.height,a=r.width;i<=o&&(s=1),e.width=a*s,e.height=n*s,e.getContext("2d").drawImage(r,0,0,e.width,e.height),e.toBlob(e=>{var s=new File([e],"tb.png",{type:"image/png"});t(s,{height:n,width:a,type:"image/png"})})}};/* 视频截取首帧 */ /* 图片压缩缩略图 */return{exec:i,capture:r,compress:a}}function WebSession(){return sessionStorage}function UniSession(){let e={},t=t=>{delete e[t]},n=t=>e[t],s=(t,n)=>{e[t]=n};return{removeItem:t,getItem:n,setItem:s}}let JSession={};JSession="undefined"==typeof uni?WebSession():UniSession();var JSessionStorage=JSession;/*
63
63
  let params = { content: 123 }
64
64
  let params = { content: { name: 123 } }
65
65
  let params = [{ content: 123 }]
@@ -92,7 +92,7 @@ if(utils.isEqual(r,COMMAND_TOPICS.NTF)){let e=$root.lookup("codec.Notify"),t=e.d
92
92
  utils.isEmpty(m)||Storage.setPrefix(`${d}_${m}`);let l=common.getNaviStorageKey(d,m),E=Storage.get(l);return utils.isEmpty(E)?void utils.forEach(e,t=>{let m=t.replace(/http:\/\/|https:\/\/|file:\/\//g,""),{http:E}=utils.getProtocol(t);m=`${E}//${m}/navigator/general`;let u={headers:{"x-appkey":d,"x-token":p}},g=jrequest.requestNormal(m,u,{success:function(e,t){if(!r){let{responseURL:i}=t,a=i.replace(/(\/navigator\/general)/g,"");r=!0;let{code:p,data:m={}}=e,{servers:E,user_id:u}=m,g={servers:E,userId:u,code:p,url:a};// 默认规则:导航和 CMP 的协议必须一致
93
93
  utils.isEmpty(E)||(Storage.set(c,u),Storage.setPrefix(`${d}_${u}`),l=common.getNaviStorageKey(),Storage.set(l,g),o.info({tag:LOG_MODULE.NAV_REQEST,remote:g})),n(g),s()}},fail:function(t){a.push(t),utils.isEqual(a.length,e.length)&&n(t.result)}});i.push(g)}):(o.info({tag:LOG_MODULE.NAV_REQEST,local:E}),n(E))};var Network={detect,getNavis};function Consumer(){let e=[],t=!1,n=!1,s=(t,n)=>n?e.unshift(t):void e.push(t),o=s=>{// 如果正在执行,终止本次任务,执行任务结束后自动消费队列 ntf, 1 是首次,所以判断大于 1
94
94
  if(n)return;n=!0,t=utils.isEqual(e.length,0);let i=e.shift(),r={item:i},a=()=>{n=!1,o(s)};t?n=!1:s(r,a)};return{consume:o,produce:s}}function MessageSyncer(e,t,n,{logger:s}){let o=Consumer(),i=i=>{function r(s,o){let{msg:i}=s,r=common.updateSyncTime({...i,io:n});if(r||utils.isEqual(i.name,MESSAGE_TYPE.STREAM_TEXT)){let{msgIndex:n,ackIndex:s}=i,o={msgIndex:n,ackIndex:s};e(SIGNAL_CMD.PUBLISH_ACK,o),t.emit(SIGNAL_NAME.CMD_RECEIVED,i)}o()}function a(i,r){let{user:a,msg:d,name:p,$message:c}=i,m=Storage.get(STORAGE.SYNC_RECEIVED_MSG_TIME).time||1700927161470,l=Storage.get(STORAGE.SYNC_SENT_MSG_TIME).time||1700927161470;// 如果本地记录时间戳大于 ntf 中的接收时间,认为消息已被当前端接收过,不再执行拉取动作
95
- if(m>=d.receiveTime)return s.info({tag:LOG_MODULE.MSG_SYNC,syncReceiveTime:m,msg:d}),r();let E={userId:a.id,syncTime:m,containsSendBox:!0,sendBoxSyncTime:l,topic:COMMAND_TOPICS.SYNC_MESSAGES};e(SIGNAL_CMD.QUERY,E,({isFinished:e,messages:a,code:p})=>{if(a=a||[],s.info({tag:LOG_MODULE.MSG_SYNC,data:E,msg:d,code:p,count:a.length}),!utils.isEqual(p,ErrorType.COMMAND_SUCCESS.code))return r();let m=[];utils.forEach(a,(e,t)=>{let{flags:n,sentTime:s,isSender:o}=e,i=common.formatter.toMsg(n);i.isStorage&&m.push(e)}),c.insertBatchMsgs({msgs:utils.clone(m)}).then(()=>{utils.forEach(a,(s,o)=>{let{sentTime:i,isSender:r}=s,d=common.updateSyncTime({sentTime:i,isSender:r,io:n});if(d){let n=e&&utils.isEqual(a.length-1,o);t.emit(SIGNAL_NAME.CMD_RECEIVED,[s,n])}});let s=!e;s&&o.produce(i,s),r()})})}function d(n,i){let{user:r,name:a,time:d,$conversation:p}=n,c=Storage.get(STORAGE.SYNC_CONVERSATION_TIME).time||0;if(c>d)return s.info({tag:LOG_MODULE.CONV_SYNC,syncTime:c,time:d}),i();let m={userId:r.id,syncTime:c,topic:COMMAND_TOPICS.SYNC_CONVERSATIONS,count:200};e(SIGNAL_CMD.QUERY,m,e=>{let{isFinished:r,conversations:a,code:d}=e;if(s.info({tag:LOG_MODULE.CONV_SYNC,data:m,code:d,count:a.length}),!utils.isEqual(d,ErrorType.COMMAND_SUCCESS.code))return t.emit(SIGNAL_NAME.CMD_SYNC_CONVERSATION_FINISHED,{}),i();let l=a.length,E=a[l-1]||{syncTime:0},{syncTime:u}=E;u>c&&(Storage.set(STORAGE.SYNC_CONVERSATION_TIME,{time:u}),n=utils.extend(n,{time:u})),a=utils.clone(a),p._batchInsertConversations({conversations:a,syncTime:u}).then(e=>{t.emit(SIGNAL_NAME.CMD_SYNC_CONVERSATIONS_PROGRESS,e);let s=!r;s?o.produce(n,s):t.emit(SIGNAL_NAME.CMD_SYNC_CONVERSATION_FINISHED,{}),i()})})}o.produce(i),o.consume(({item:e},t)=>{let{name:n}=e;utils.isEqual(n,SIGNAL_NAME.CMD_RECEIVED)&&r(e,t),utils.isEqual(n,SIGNAL_NAME.S_SYNC_CONVERSATION_NTF)&&d(e,t),utils.isEqual(n,SIGNAL_NAME.S_NTF)&&a(e,t)})};return{exec:i}}let chatroomCacher=Cache();var chatroomCacher$1={set:(e,t)=>{let n=chatroomCacher.get(e),{msgs:s=[]}=t;200<=s.length&&(s.shift(0),t=utils.extend(t,{msgs:s})),n=utils.extend(n,t),chatroomCacher.set(e,n)},get:e=>{let t=chatroomCacher.get(e);return t},remove:e=>{chatroomCacher.remove(e)},getAll:()=>chatroomCacher.getAll()};function ChatroomSyncer(e,t,n,{logger:s}){let o=Consumer(),i=n=>{function i(e,t){let{msg:n}=e,o=chatroomCacher$1.get(n.targetId),{isJoined:i}=o;s.info({tag:LOG_MODULE.MSG_SYNC,...e,isJoined:i}),i?(utils.isEqual(n.type,NOTIFY_TYPE.CHATROOM)&&a(e,t),utils.isEqual(n.type,NOTIFY_TYPE.CHATROOM_DESTORY)&&r(e,t)):t()}function r(e,n){let{msg:s}=e,o=s.targetId;t.emit(SIGNAL_NAME.CMD_CHATROOM_DESTROY,{id:o}),n()}function a(n,o){let{msg:i}=n,r=i.targetId,a=d(r);if(a>=i.receiveTime&&0<i.receiveTime)return s.info({tag:LOG_MODULE.MSG_SYNC,syncTime:a,msg:i}),o();if(i.isNotSync)return s.info({tag:LOG_MODULE.MSG_SYNC,syncTime:a,msg:i}),p(i.targetId,i.receiveTime),o();let c=i.count||50,m={syncTime:a,chatroomId:r,count:c,topic:COMMAND_TOPICS.SYNC_CHATROOM_MESSAGES};e(SIGNAL_CMD.QUERY,m,({messages:e,code:n})=>{if(e=e||[],s.info({tag:LOG_MODULE.MSG_SYNC,data:m,msg:i,code:n,count:e.length}),!utils.isEqual(n,ErrorType.COMMAND_SUCCESS.code))return o();let{msgs:a=[]}=chatroomCacher$1.get(r);utils.forEach(e,e=>{p(e.conversationId,e.sentTime);let{messageId:n}=e,s=utils.isInclude(a,n);s||(a.push(n),t.emit(SIGNAL_NAME.CMD_RECEIVED,[e]))}),chatroomCacher$1.set(r,{msgs:a}),o()})}function d(e){let t=chatroomCacher$1.get(e);return t.syncMsgTime||0}function p(e,t){let n=d(e);t>n&&chatroomCacher$1.set(e,{syncMsgTime:t})}o.produce(n),o.consume(({item:e},t)=>{let{name:n}=e;utils.isEqual(n,SIGNAL_NAME.S_NTF)&&i(e,t)})};return{exec:i}}function ChatroomAttSyncer(e,t,n,{logger:s}){let o=Consumer(),i=n=>{function i(e,t){s.info({tag:LOG_MODULE.MSG_SYNC,...e});let{msg:n}=e,o=chatroomCacher$1.get(n.targetId),{isJoined:i}=o;utils.isEqual(n.type,NOTIFY_TYPE.CHATROOM_ATTR)&&i&&r(e,t)}function r(n,o){let{msg:i}=n,r=i.targetId,p=a(r);if(p>=i.receiveTime&&0<i.receiveTime)return o();let c={syncTime:p,chatroomId:r,targetId:r,topic:COMMAND_TOPICS.SYNC_CHATROOM_ATTRS};e(SIGNAL_CMD.QUERY,c,e=>{let{code:n,attrs:r,chatroomId:a}=e;return r=r||[],s.info({tag:LOG_MODULE.MSG_SYNC,data:c,msg:i,code:n,count:r.length}),utils.isEqual(n,ErrorType.COMMAND_SUCCESS.code)?void(utils.forEach(r,e=>{d(a,e.updateTime)}),t.emit(SIGNAL_NAME.CMD_CHATROOM_ATTR_RECEIVED,{attrs:r,chatroomId:a}),o()):o()})}function a(e){let t=chatroomCacher$1.get(e);return t.syncAttTime||0}function d(e,t){let n=a(e);t>n&&chatroomCacher$1.set(e,{syncAttTime:t})}o.produce(n),o.consume(({item:e},t)=>{let{name:n}=e;utils.isEqual(n,SIGNAL_NAME.S_NTF)&&i(e,t)})};return{exec:i}}function TagSyncer(e,t,n,{logger:s}){let o=({$conversation:e})=>{let{id:s}=n.getCurrentUser(),o={topic:COMMAND_TOPICS.CONVERSATION_TAG_QUERY,userId:s};n.sendCommand(SIGNAL_CMD.QUERY,o,n=>{let{code:s,tags:o}=n;utils.isEqual(ErrorType.COMMAND_SUCCESS.code,s)&&(utils.map(o,e=>{let t=CONVERSATION_TAG[e.id]||{};return utils.extend(e,t),e}),e._batchInsertTags(o).then(e=>{t.emit(SIGNAL_NAME.CMD_SYNC_TAG_FINISHED,e)}))})};return{exec:o}}function Timer(e={}){let t={timeout:60000};utils.extend(t,e);let{timeout:n}=t,s=0,o=utils.noop,i=e=>{o=e,s=setInterval(()=>{o()},n)},r=()=>{clearInterval(s)},a=()=>{r(),i(o)};return{resume:i,pause:r,reset:a}}function Counter(e={}){let t={timeout:9000};utils.extend(t,e);let{timeout:n}=t,s=0,o=e=>{s=setTimeout(()=>{e(t)},n)},i=()=>{clearTimeout(s)};return{start:o,clear:i}}let VERSION="1.9.2";var WebWS=WebSocket;function UniWS(e){let t={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},n={readyState:t.CONNECTING,onopen:()=>{},onclose:()=>{},onerror:()=>{},onmessage:()=>{}},s=uni.connectSocket({url:e,complete:()=>{}});return s.onOpen(()=>{n.readyState=t.OPEN,n.onopen()}),s.onClose(()=>{n.readyState=t.CLOSED,n.onclose()}),s.onError(()=>{n.readyState=t.CLOSED,n.onerror()}),s.onMessage(e=>{n.onmessage(e)}),n.send=e=>{s.send({data:e})},n.close=()=>{s.close()},n}let JWebSocket=WebWS;common.isUni()&&(JWebSocket=UniWS);var JWebSocket$1=JWebSocket;function NetworkWatcher(e){let t=()=>{let t=e.ononline||utils.noop;t()},n=()=>{"object"==typeof window&&window.addEventListener&&(window.removeEventListener("online",t),window.addEventListener("online",t))};return{watch:n}}/*
95
+ if(m>=d.receiveTime)return s.info({tag:LOG_MODULE.MSG_SYNC,syncReceiveTime:m,msg:d}),r();let E={userId:a.id,syncTime:m,containsSendBox:!0,sendBoxSyncTime:l,topic:COMMAND_TOPICS.SYNC_MESSAGES};e(SIGNAL_CMD.QUERY,E,({isFinished:e,messages:a,code:p})=>{if(a=a||[],s.info({tag:LOG_MODULE.MSG_SYNC,data:E,msg:d,code:p,count:a.length}),!utils.isEqual(p,ErrorType.COMMAND_SUCCESS.code))return r();let m=[];utils.forEach(a,(e,t)=>{let{flags:n,sentTime:s,isSender:o}=e,i=common.formatter.toMsg(n);i.isStorage&&m.push(e)}),c.insertBatchMsgs({msgs:utils.clone(m)}).then(()=>{utils.forEach(a,(s,o)=>{let{sentTime:i,isSender:r}=s,d=common.updateSyncTime({sentTime:i,isSender:r,io:n});if(d){let n=e&&utils.isEqual(a.length-1,o);t.emit(SIGNAL_NAME.CMD_RECEIVED,[s,n])}});let s=!e;s&&o.produce(i,s),r()})})}function d(n,i){let{user:r,name:a,time:d,$conversation:p}=n,c=Storage.get(STORAGE.SYNC_CONVERSATION_TIME).time||0;if(c>d)return s.info({tag:LOG_MODULE.CONV_SYNC,syncTime:c,time:d}),i();let m={userId:r.id,syncTime:c,topic:COMMAND_TOPICS.SYNC_CONVERSATIONS,count:200};e(SIGNAL_CMD.QUERY,m,e=>{let{isFinished:r,conversations:a,code:d}=e;if(s.info({tag:LOG_MODULE.CONV_SYNC,data:m,code:d,count:a.length}),!utils.isEqual(d,ErrorType.COMMAND_SUCCESS.code))return t.emit(SIGNAL_NAME.CMD_SYNC_CONVERSATION_FINISHED,{}),i();let l=a.length,E=a[l-1]||{syncTime:0},{syncTime:u}=E;u>c&&(Storage.set(STORAGE.SYNC_CONVERSATION_TIME,{time:u}),n=utils.extend(n,{time:u})),a=utils.clone(a),p._batchInsertConversations({conversations:a,syncTime:u}).then(e=>{t.emit(SIGNAL_NAME.CMD_SYNC_CONVERSATIONS_PROGRESS,e);let s=!r;s?o.produce(n,s):t.emit(SIGNAL_NAME.CMD_SYNC_CONVERSATION_FINISHED,{}),i()})})}o.produce(i),o.consume(({item:e},t)=>{let{name:n}=e;utils.isEqual(n,SIGNAL_NAME.CMD_RECEIVED)&&r(e,t),utils.isEqual(n,SIGNAL_NAME.S_SYNC_CONVERSATION_NTF)&&d(e,t),utils.isEqual(n,SIGNAL_NAME.S_NTF)&&a(e,t)})};return{exec:i}}let chatroomCacher=Cache();var chatroomCacher$1={set:(e,t)=>{let n=chatroomCacher.get(e),{msgs:s=[]}=t;200<=s.length&&(s.shift(0),t=utils.extend(t,{msgs:s})),n=utils.extend(n,t),chatroomCacher.set(e,n)},get:e=>{let t=chatroomCacher.get(e);return t},remove:e=>{chatroomCacher.remove(e)},getAll:()=>chatroomCacher.getAll()};function ChatroomSyncer(e,t,n,{logger:s}){let o=Consumer(),i=n=>{function i(e,t){let{msg:n}=e,o=chatroomCacher$1.get(n.targetId),{isJoined:i}=o;s.info({tag:LOG_MODULE.MSG_SYNC,...e,isJoined:i}),i?(utils.isEqual(n.type,NOTIFY_TYPE.CHATROOM)&&a(e,t),utils.isEqual(n.type,NOTIFY_TYPE.CHATROOM_DESTORY)&&r(e,t)):t()}function r(e,n){let{msg:s}=e,o=s.targetId;t.emit(SIGNAL_NAME.CMD_CHATROOM_DESTROY,{id:o}),n()}function a(n,o){let{msg:i}=n,r=i.targetId,a=d(r);if(a>=i.receiveTime&&0<i.receiveTime)return s.info({tag:LOG_MODULE.MSG_SYNC,syncTime:a,msg:i}),o();if(i.isNotSync)return s.info({tag:LOG_MODULE.MSG_SYNC,syncTime:a,msg:i}),p(i.targetId,i.receiveTime),o();let c=i.count||50,m={syncTime:a,chatroomId:r,count:c,topic:COMMAND_TOPICS.SYNC_CHATROOM_MESSAGES};e(SIGNAL_CMD.QUERY,m,({messages:e,code:n})=>{if(e=e||[],s.info({tag:LOG_MODULE.MSG_SYNC,data:m,msg:i,code:n,count:e.length}),!utils.isEqual(n,ErrorType.COMMAND_SUCCESS.code))return o();let{msgs:a=[]}=chatroomCacher$1.get(r);utils.forEach(e,e=>{p(e.conversationId,e.sentTime);let{messageId:n}=e,s=utils.isInclude(a,n);s||(a.push(n),t.emit(SIGNAL_NAME.CMD_RECEIVED,[e]))}),chatroomCacher$1.set(r,{msgs:a}),o()})}function d(e){let t=chatroomCacher$1.get(e);return t.syncMsgTime||0}function p(e,t){let n=d(e);t>n&&chatroomCacher$1.set(e,{syncMsgTime:t})}o.produce(n),o.consume(({item:e},t)=>{let{name:n}=e;utils.isEqual(n,SIGNAL_NAME.S_NTF)&&i(e,t)})};return{exec:i}}function ChatroomAttSyncer(e,t,n,{logger:s}){let o=Consumer(),i=n=>{function i(e,t){s.info({tag:LOG_MODULE.MSG_SYNC,...e});let{msg:n}=e,o=chatroomCacher$1.get(n.targetId),{isJoined:i}=o;utils.isEqual(n.type,NOTIFY_TYPE.CHATROOM_ATTR)&&i&&r(e,t)}function r(n,o){let{msg:i}=n,r=i.targetId,p=a(r);if(p>=i.receiveTime&&0<i.receiveTime)return o();let c={syncTime:p,chatroomId:r,targetId:r,topic:COMMAND_TOPICS.SYNC_CHATROOM_ATTRS};e(SIGNAL_CMD.QUERY,c,e=>{let{code:n,attrs:r,chatroomId:a}=e;return r=r||[],s.info({tag:LOG_MODULE.MSG_SYNC,data:c,msg:i,code:n,count:r.length}),utils.isEqual(n,ErrorType.COMMAND_SUCCESS.code)?void(utils.forEach(r,e=>{d(a,e.updateTime)}),t.emit(SIGNAL_NAME.CMD_CHATROOM_ATTR_RECEIVED,{attrs:r,chatroomId:a}),o()):o()})}function a(e){let t=chatroomCacher$1.get(e);return t.syncAttTime||0}function d(e,t){let n=a(e);t>n&&chatroomCacher$1.set(e,{syncAttTime:t})}o.produce(n),o.consume(({item:e},t)=>{let{name:n}=e;utils.isEqual(n,SIGNAL_NAME.S_NTF)&&i(e,t)})};return{exec:i}}function TagSyncer(e,t,n,{logger:s}){let o=({$conversation:e})=>{let{id:s}=n.getCurrentUser(),o={topic:COMMAND_TOPICS.CONVERSATION_TAG_QUERY,userId:s};n.sendCommand(SIGNAL_CMD.QUERY,o,n=>{let{code:s,tags:o}=n;utils.isEqual(ErrorType.COMMAND_SUCCESS.code,s)&&(utils.map(o,e=>{let t=CONVERSATION_TAG[e.id]||{};return utils.extend(e,t),e}),e._batchInsertTags(o).then(e=>{t.emit(SIGNAL_NAME.CMD_SYNC_TAG_FINISHED,e)}))})};return{exec:o}}function Timer(e={}){let t={timeout:60000};utils.extend(t,e);let{timeout:n}=t,s=0,o=utils.noop,i=e=>{o=e,s=setInterval(()=>{o()},n)},r=()=>{clearInterval(s)},a=()=>{r(),i(o)};return{resume:i,pause:r,reset:a}}function Counter(e={}){let t={timeout:9000};utils.extend(t,e);let{timeout:n}=t,s=0,o=e=>{s=setTimeout(()=>{e(t)},n)},i=()=>{clearTimeout(s)};return{start:o,clear:i}}let VERSION="1.9.4";var WebWS=WebSocket;function UniWS(e){let t={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},n={readyState:t.CONNECTING,onopen:()=>{},onclose:()=>{},onerror:()=>{},onmessage:()=>{}},s=uni.connectSocket({url:e,complete:()=>{}});return s.onOpen(()=>{n.readyState=t.OPEN,n.onopen()}),s.onClose(()=>{n.readyState=t.CLOSED,n.onclose()}),s.onError(()=>{n.readyState=t.CLOSED,n.onerror()}),s.onMessage(e=>{n.onmessage(e)}),n.send=e=>{s.send({data:e})},n.close=()=>{s.close()},n}let JWebSocket=WebWS;common.isUni()&&(JWebSocket=UniWS);var JWebSocket$1=JWebSocket;function NetworkWatcher(e){let t=()=>{let t=e.ononline||utils.noop;t()},n=()=>{"object"==typeof window&&window.addEventListener&&(window.removeEventListener("online",t),window.addEventListener("online",t))};return{watch:n}}/*
96
96
  fileCompressLimit: 图片缩略图压缩限制,小于设置数值将不执行压缩,单位 KB
97
97
  config = { appkey, nav, isSync, upload, uploadType, fileCompressLimit }
98
98
  */function IO(e){function t(){let e=s({ignores:[]}),t=utils.find(g,e=>e===T),n=g[t]||{};return F(),n.onmessage=utils.noop,n.onclose=utils.noop,n.onerror=utils.noop,S.remove(CONNECT_TOOL.RECONNECT_COUNT),S.remove(CONNECT_TOOL.RECONNECT_FREQUENCY),P(e,({next:e})=>{e=e||utils.noop,e()})}function n(){E&&j.exec({msg:{type:NOTIFY_TYPE.MSG},name:SIGNAL_NAME.S_NTF,$message:e.$message,user:{id:x.id}})}function s(e={}){let{ignores:t=["token"]}=e,n=utils.clone(x);return utils.forEach(t,e=>{delete n[e]}),n}function o(){return e.currentDomain=_,e}function i(t){utils.extend(e,t)}function r(e,t){let n={topic:COMMAND_TOPICS.GET_USER_INFO,userId:e.id};B(SIGNAL_CMD.QUERY,n,e=>{t(e)})}let a=Emitter(),{appkey:d,navList:p,serverList:l=[],isSync:E=!0,reconnectCount:u=100,logger:c,msgEncryptHook:m}=e;m=m||{},utils.isArray(p)||(p=["https://nav.fake.com"]);/*
@@ -117,7 +117,7 @@ let r=-1<utils.find(i,t=>utils.isEqual(t.senderId,e.id));if(!r){let e=utils.find
117
117
  1、内存中缓存最近 200 个会话,并按 message.sentTime 倒序排序
118
118
  2、startTime 是 0 时,优先返回内存中会话,内存数量小于 count 数,从服务端获取
119
119
  3、startTime 非 0 是,直接从服务端获取,并更新到内存中
120
- */let s=common.ConversationUtils();e.on(SIGNAL_NAME.CMD_CONVERSATION_CHANGED,o=>{function i(e){let o=n(e);if(s.isExisted(o)){s.update(o);let e=s.getPer(o);return t.emit(EVENT.CONVERSATION_CHANGED,{conversations:utils.clone([e])})}s.update([o]);let i=s.getPer(o);t.emit(EVENT.CONVERSATION_ADDED,{conversations:utils.clone([i])})}if(!utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_MSG_EXSET)){if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_DELETE_MSGS))return e.emit(SIGNAL_NAME.CMD_CONVERSATION_CHANGED,{...o,name:MESSAGE_TYPE.CLIENT_REMOVE_MSGS});if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_CONVERSATION_TAG_ADD)){let{content:{id:e,name:n,conversations:s}}=o;return 0<s.length?t.emit(EVENT.TAG_CONVERSATION_ADDED,{id:e,conversations:s}):utils.isEmpty(n)||0!=s.length?t.emit(EVENT.TAG_ADDED,{tags:[{id:e,name:n}]}):t.emit(EVENT.TAG_CHANGED,{tags:[{id:e,name:n}]})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_CONVERSATION_TAG_REMOVE)){let{content:{tags:e}}=o;return t.emit(EVENT.TAG_REMOVED,{tags:e})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_REMOVE_CONVERS_FROM_TAG)){let{content:{id:e,conversations:n}}=o;return t.emit(EVENT.TAG_CONVERSATION_REMOVED,{id:e,conversations:n})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_ADD_CONVER)){let{content:e}=o;s.update(e);let n=s.getPer(e);return t.emit(EVENT.CONVERSATION_ADDED,{conversations:utils.clone([n])})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_CLEAR_TOTALUNREAD)){let{content:{clearTime:e}}=o,n=s.get();return s.read(n),t.emit(EVENT.CLEAR_TOTAL_UNREADCOUNT,{clearTime:e})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_REMOVE_CONVERS)){let{content:{conversations:e}}=o,n=[];return utils.forEach(e,e=>{let t=s.remove(e);n.push(t)}),t.emit(EVENT.CONVERSATION_REMOVED,{conversations:n})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_TOPCONVERS)){let{content:{conversations:e}}=o,n=e[0]||{isTop:!1},i=s.modify(e,{isTop:n.isTop});return t.emit(EVENT.CONVERSATION_TOP,{conversations:e}),t.emit(EVENT.CONVERSATION_CHANGED,{conversations:i})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_UNDISTURB)){let{content:{conversations:e}}=o,n=e[0]||{undisturbType:UNDISTURB_TYPE.UNDISTURB},i=s.modify(e,{undisturbType:n.undisturbType});return t.emit(EVENT.CONVERSATION_UNDISTURBED,{conversations:e}),t.emit(EVENT.CONVERSATION_CHANGED,{conversations:i})}// 如果会话最后一条消息大于清理的时间,不更新会话列表
120
+ */let s=common.ConversationUtils();e.on(SIGNAL_NAME.CMD_CONVERSATION_CHANGED,o=>{function i(e){let o=n(e);if(s.isExisted(o)){s.update(o);let e=s.getPer(o);return t.emit(EVENT.CONVERSATION_CHANGED,{conversations:utils.clone([e])})}s.update([o]);let i=s.getPer(o);t.emit(EVENT.CONVERSATION_ADDED,{conversations:utils.clone([i])})}let r=common.formatter.toMsg(o.flags)||{};if(r.isStorage&&!utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_MSG_EXSET)){if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_DELETE_MSGS))return e.emit(SIGNAL_NAME.CMD_CONVERSATION_CHANGED,{...o,name:MESSAGE_TYPE.CLIENT_REMOVE_MSGS});if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_CONVERSATION_TAG_ADD)){let{content:{id:e,name:n,conversations:s}}=o;return 0<s.length?t.emit(EVENT.TAG_CONVERSATION_ADDED,{id:e,conversations:s}):utils.isEmpty(n)||0!=s.length?t.emit(EVENT.TAG_ADDED,{tags:[{id:e,name:n}]}):t.emit(EVENT.TAG_CHANGED,{tags:[{id:e,name:n}]})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_CONVERSATION_TAG_REMOVE)){let{content:{tags:e}}=o;return t.emit(EVENT.TAG_REMOVED,{tags:e})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_REMOVE_CONVERS_FROM_TAG)){let{content:{id:e,conversations:n}}=o;return t.emit(EVENT.TAG_CONVERSATION_REMOVED,{id:e,conversations:n})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_ADD_CONVER)){let{content:e}=o;s.update(e);let n=s.getPer(e);return t.emit(EVENT.CONVERSATION_ADDED,{conversations:utils.clone([n])})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_CLEAR_TOTALUNREAD)){let{content:{clearTime:e}}=o,n=s.get();return s.read(n),t.emit(EVENT.CLEAR_TOTAL_UNREADCOUNT,{clearTime:e})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_REMOVE_CONVERS)){let{content:{conversations:e}}=o,n=[];return utils.forEach(e,e=>{let t=s.remove(e);n.push(t)}),t.emit(EVENT.CONVERSATION_REMOVED,{conversations:n})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_TOPCONVERS)){let{content:{conversations:e}}=o,n=e[0]||{isTop:!1},i=s.modify(e,{isTop:n.isTop});return t.emit(EVENT.CONVERSATION_TOP,{conversations:e}),t.emit(EVENT.CONVERSATION_CHANGED,{conversations:i})}if(utils.isEqual(o.name,MESSAGE_TYPE.COMMAND_UNDISTURB)){let{content:{conversations:e}}=o,n=e[0]||{undisturbType:UNDISTURB_TYPE.UNDISTURB},i=s.modify(e,{undisturbType:n.undisturbType});return t.emit(EVENT.CONVERSATION_UNDISTURBED,{conversations:e}),t.emit(EVENT.CONVERSATION_CHANGED,{conversations:i})}// 如果会话最后一条消息大于清理的时间,不更新会话列表
121
121
  if(utils.isEqual(o.name,MESSAGE_TYPE.CLEAR_MSG)){let{content:{cleanTime:e,conversationType:n,conversationId:i,senderId:r}}=o,a={conversationType:n,conversationId:i},d=s.getPer(a)||a,{latestMessage:p}=d||{};if(p=p||{sender:{id:""}},e>=p.sentTime){if(!utils.isEmpty(r)&&!utils.isEqual(r,p.sender.id))return;d.latestMessage={},t.emit(EVENT.CONVERSATION_CHANGED,{conversations:[d]})}return}if(utils.isEqual(MESSAGE_TYPE.CLIENT_REMOVE_MSGS,o.name)){let{content:{messages:n}}=o;if(utils.isEmpty(n))return;let i=n[0],r=s.getPer(i);utils.isEmpty(r)&&(r={latestMessage:{tid:""}});let a=utils.map(n,e=>e.tid),{latestMessage:d}=r,p=r.mentions||{},c=p.msgs||[],m=tools.isNestInclude(c,n,(e,t)=>utils.isEqual(e.messageId,t.tid)),l=utils.isInclude(a,d.tid);// 只有会话最后一条消息被删除时触发会话列表变更或这删除的消息 @ 消息
122
122
  if(l||m){let n=s.getPer(o),i=n.mentions||{},r=e.getCurrentUser();i=tools.createMentions(i,o,r);let a={mentions:i};l&&utils.extend(a,{latestMessage:{}});let d=s.modify(n,a);t.emit(EVENT.CONVERSATION_CHANGED,{conversations:utils.clone(d)})}return}// 如果会话最后一条消息和被撤回消息不匹配,不更新会话列表
123
123
  if(utils.isEqual(o.name,MESSAGE_TYPE.RECALL)){let{content:{messageId:e}}=o,t=s.getPer(o),{latestMessage:n,mentions:i}=t||{};n=n||{};let r=utils.isEqual(n.messageId,e);i=i||{};let a=i.msgs||[],d=utils.find(a,t=>utils.isEqual(t.messageId,e));if(!r&&utils.isEqual(d,-1))return;// 对外模拟 recallinfo 消息
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "jugglechat-websdk",
4
- "version": "1.9.2",
4
+ "version": "1.9.4",
5
5
  "description": "JuggleChat SDK, IM, Chat",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",