Migrate from protobuf.js 5.x to 6.x (remove long.js and bytebuffer.js) Upgrade jQuery from 1.x to 3.x Upgrade jQueryUI to 1.12.x Use minimized version of js libraries Disable debug messages Fix default value for Event_RoomSay’s RoomMessageType field
10 lines
66 KiB
JavaScript
10 lines
66 KiB
JavaScript
/*!
|
|
* protobuf.js v6.7.0 (c) 2016, Daniel Wirtz
|
|
* Compiled Sun, 02 Apr 2017 11:28:32 UTC
|
|
* Licensed under the BSD-3-Clause License
|
|
* see: https://github.com/dcodeIO/protobuf.js for details
|
|
*/
|
|
!function(t,e){"use strict";!function(e,r,n){function i(t){var n=r[t];return n||e[t][0].call(n=r[t]={exports:{}},i,n,n.exports),n.exports}var o=t.protobuf=i(n[0]);"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(o.util.Long=t,o.configure()),o}),"object"==typeof module&&module&&module.exports&&(module.exports=o)}({1:[function(t,e){function r(t,e){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,o){r.push(function(t){if(i)if(i=!1,t)o(t);else{for(var e=[],r=1;r<arguments.length;)e.push(arguments[r++]);n.apply(null,e)}});try{t.apply(e||this,r)}catch(t){i&&(i=!1,o(t))}})}e.exports=r},{}],2:[function(t,r,n){var i=n;i.length=function(t){var e=t.length;if(!e)return 0;for(var r=0;--e%4>1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var o=Array(64),s=Array(123),a=0;a<64;)s[o[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;i.encode=function(t,e,r){for(var n,i=[],s=0,a=0;e<r;){var u=t[e++];switch(a){case 0:i[s++]=o[u>>2],n=(3&u)<<4,a=1;break;case 1:i[s++]=o[n|u>>4],n=(15&u)<<2,a=2;break;case 2:i[s++]=o[n|u>>6],i[s++]=o[63&u],a=0}}return a&&(i[s++]=o[n],i[s]=61,1===a&&(i[s+1]=61)),String.fromCharCode.apply(String,i)};i.decode=function(t,r,n){for(var i,o=n,a=0,u=0;u<t.length;){var f=t.charCodeAt(u++);if(61===f&&a>1)break;if((f=s[f])===e)throw Error("invalid encoding");switch(a){case 0:i=f,a=1;break;case 1:r[n++]=i<<2|(48&f)>>4,i=f,a=2;break;case 2:r[n++]=(15&i)<<4|(60&f)>>2,i=f,a=3;break;case 3:r[n++]=(3&i)<<6|f,a=0}}if(1===a)throw Error("invalid encoding");return n-o},i.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)}},{}],3:[function(t,r){function n(){function t(){for(var e=[],r=0;r<arguments.length;)e.push(arguments[r++]);var n=i.apply(null,e),l=c;if(h.length){var p=h[h.length-1];o.test(p)?l=++c:u.test(p)&&++l,a.test(p)&&!a.test(n)?(l=++c,d=!0):d&&f.test(p)&&(l=--c,d=!1),s.test(n)&&(l=--c)}for(r=0;r<l;++r)n="\t"+n;return h.push(n),t}function r(t){return"function"+(t?" "+t.replace(/[^\w_$]/g,"_"):"")+"("+p.join(",")+") {\n"+h.join("\n")+"\n}"}function l(r,i){"object"==typeof r&&(i=r,r=e);var o=t.str(r);n.verbose&&console.log("--- codegen ---\n"+o.replace(/^/gm,"> ").replace(/\t/g," "));var s=Object.keys(i||(i={}));return Function.apply(null,s.concat("return "+o)).apply(null,s.map(function(t){return i[t]}))}for(var p=[],h=[],c=1,d=!1,y=0;y<arguments.length;)p.push(arguments[y++]);return t.str=r,t.eof=l,t}function i(t){for(var e=[],r=1;r<arguments.length;)e.push(arguments[r++]);if(r=0,t=t.replace(/%([dfjs])/g,function(t,n){switch(n){case"d":return Math.floor(e[r++]);case"f":return+e[r++];case"j":return JSON.stringify(e[r++]);default:return e[r++]}}),r!==e.length)throw Error("argument count mismatch");return t}r.exports=n;var o=/[{[]$/,s=/^[}\]]/,a=/:$/,u=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(t){}n.verbose=!1},{}],4:[function(t,r){function n(){this.a={}}r.exports=n,n.prototype.on=function(t,e,r){return(this.a[t]||(this.a[t]=[])).push({fn:e,ctx:r||this}),this},n.prototype.off=function(t,r){if(t===e)this.a={};else if(r===e)this.a[t]=[];else for(var n=this.a[t],i=0;i<n.length;)n[i].fn===r?n.splice(i,1):++i;return this},n.prototype.emit=function(t){var e=this.a[t];if(e){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<e.length;)e[n].fn.apply(e[n++].ctx,r)}return this}},{}],5:[function(t,r){function n(t,e,r){return"function"==typeof e?(r=e,e={}):e||(e={}),r?!e.xhr&&s&&s.readFile?s.readFile(t,function(i,o){return i&&"undefined"!=typeof XMLHttpRequest?n.xhr(t,e,r):i?r(i):r(null,e.binary?o:o.toString("utf8"))}):n.xhr(t,e,r):i(n,this,t,e)}r.exports=n;var i=t(1),o=t(7),s=o("fs");n.xhr=function(t,r,n){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4!==i.readyState)return e;if(0!==i.status&&200!==i.status)return n(Error("status "+i.status));if(r.binary){var t=i.response;if(!t){t=[];for(var o=0;o<i.responseText.length;++o)t.push(255&i.responseText.charCodeAt(o))}return n(null,"undefined"!=typeof Uint8Array?new Uint8Array(t):t)}return n(null,i.responseText)},r.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",t),i.send()}},{1:1,7:7}],6:[function(t,e){function r(t){return"undefined"!=typeof Float32Array?function(){function e(t,e,r){o[0]=t,e[r]=s[0],e[r+1]=s[1],e[r+2]=s[2],e[r+3]=s[3]}function r(t,e,r){o[0]=t,e[r]=s[3],e[r+1]=s[2],e[r+2]=s[1],e[r+3]=s[0]}function n(t,e){return s[0]=t[e],s[1]=t[e+1],s[2]=t[e+2],s[3]=t[e+3],o[0]}function i(t,e){return s[3]=t[e],s[2]=t[e+1],s[1]=t[e+2],s[0]=t[e+3],o[0]}var o=new Float32Array([-0]),s=new Uint8Array(o.buffer),a=128===s[3];t.writeFloatLE=a?e:r,t.writeFloatBE=a?r:e,t.readFloatLE=a?n:i,t.readFloatBE=a?i:n}():function(){function e(t,e,r,n){var i=e<0?1:0;if(i&&(e=-e),0===e)t(1/e>0?0:2147483648,r,n);else if(isNaN(e))t(2143289344,r,n);else if(e>3.4028234663852886e38)t((i<<31|2139095040)>>>0,r,n);else if(e<1.1754943508222875e-38)t((i<<31|Math.round(e/1.401298464324817e-45))>>>0,r,n);else{var o=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-o)*8388608);t((i<<31|o+127<<23|s)>>>0,r,n)}}function r(t,e,r){var n=t(e,r),i=2*(n>>31)+1,o=n>>>23&255,s=8388607&n;return 255===o?s?0/0:1/0*i:0===o?1.401298464324817e-45*i*s:i*Math.pow(2,o-150)*(s+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,i),t.readFloatLE=r.bind(null,o),t.readFloatBE=r.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){function e(t,e,r){o[0]=t,e[r]=s[0],e[r+1]=s[1],e[r+2]=s[2],e[r+3]=s[3],e[r+4]=s[4],e[r+5]=s[5],e[r+6]=s[6],e[r+7]=s[7]}function r(t,e,r){o[0]=t,e[r]=s[7],e[r+1]=s[6],e[r+2]=s[5],e[r+3]=s[4],e[r+4]=s[3],e[r+5]=s[2],e[r+6]=s[1],e[r+7]=s[0]}function n(t,e){return s[0]=t[e],s[1]=t[e+1],s[2]=t[e+2],s[3]=t[e+3],s[4]=t[e+4],s[5]=t[e+5],s[6]=t[e+6],s[7]=t[e+7],o[0]}function i(t,e){return s[7]=t[e],s[6]=t[e+1],s[5]=t[e+2],s[4]=t[e+3],s[3]=t[e+4],s[2]=t[e+5],s[1]=t[e+6],s[0]=t[e+7],o[0]}var o=new Float64Array([-0]),s=new Uint8Array(o.buffer),a=128===s[7];t.writeDoubleLE=a?e:r,t.writeDoubleBE=a?r:e,t.readDoubleLE=a?n:i,t.readDoubleBE=a?i:n}():function(){function e(t,e,r,n,i,o){var s=n<0?1:0;if(s&&(n=-n),0===n)t(0,i,o+e),t(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))t(0,i,o+e),t(2146959360,i,o+r);else if(n>1.7976931348623157e308)t(0,i,o+e),t((s<<31|2146435072)>>>0,i,o+r);else{var a;if(n<2.2250738585072014e-308)a=n/5e-324,t(a>>>0,i,o+e),t((s<<31|a/4294967296)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),a=n*Math.pow(2,-u),t(4503599627370496*a>>>0,i,o+e),t((s<<31|u+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}}function r(t,e,r,n,i){var o=t(n,i+e),s=t(n,i+r),a=2*(s>>31)+1,u=s>>>20&2047,f=4294967296*(1048575&s)+o;return 2047===u?f?0/0:1/0*a:0===u?5e-324*a*f:a*Math.pow(2,u-1075)*(f+4503599627370496)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,i,4,0),t.readDoubleLE=r.bind(null,o,0,4),t.readDoubleBE=r.bind(null,s,4,0)}(),t}function n(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function i(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=255&t}function o(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function s(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}e.exports=r(r)},{}],7:[function(t,e,r){function n(t){try{var e=eval("quire".replace(/^/,"re"))(t);if(e&&(e.length||Object.keys(e).length))return e}catch(t){}return null}e.exports=n},{}],8:[function(t,e,r){var n=r,i=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},o=n.normalize=function(t){t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var e=t.split("/"),r=i(t),n="";r&&(n=e.shift()+"/");for(var o=0;o<e.length;)".."===e[o]?o>0&&".."!==e[o-1]?e.splice(--o,2):r?e.splice(o,1):++o:"."===e[o]?e.splice(o,1):++o;return n+e.join("/")};n.resolve=function(t,e,r){return r||(e=o(e)),i(e)?e:(r||(t=o(t)),(t=t.replace(/(?:\/|^)[^\/]+$/,"")).length?o(t+"/"+e):e)}},{}],9:[function(t,e){function r(t,e,r){var n=r||8192,i=n>>>1,o=null,s=n;return function(r){if(r<1||r>i)return t(r);s+r>n&&(o=t(n),s=0);var a=e.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}e.exports=r},{}],10:[function(t,e,r){var n=r;n.length=function(t){for(var e=0,r=0,n=0;n<t.length;++n)r=t.charCodeAt(n),r<128?e+=1:r<2048?e+=2:55296==(64512&r)&&56320==(64512&t.charCodeAt(n+1))?(++n,e+=4):e+=3;return e},n.read=function(t,e,r){if(r-e<1)return"";for(var n,i=null,o=[],s=0;e<r;)n=t[e++],n<128?o[s++]=n:n>191&&n<224?o[s++]=(31&n)<<6|63&t[e++]:n>239&&n<365?(n=((7&n)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[s++]=55296+(n>>10),o[s++]=56320+(1023&n)):o[s++]=(15&n)<<12|(63&t[e++])<<6|63&t[e++],s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))},n.write=function(t,e,r){for(var n,i,o=r,s=0;s<t.length;++s)n=t.charCodeAt(s),n<128?e[r++]=n:n<2048?(e[r++]=n>>6|192,e[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(i=t.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&i),++s,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-o}},{}],11:[function(t,e){function r(e,s){if(n||(n=t(35)),!(e instanceof n))throw TypeError("type must be a Type");if(s){if("function"!=typeof s)throw TypeError("ctor must be a function")}else s=r.generate(e).eof(e.name);s.constructor=r,(s.prototype=new i).constructor=s,o.merge(s,i,!0),s.$type=e,s.prototype.$type=e;for(var a=0;a<e.fieldsArray.length;++a)s.prototype[e.b[a].name]=Array.isArray(e.b[a].resolve().defaultValue)?o.emptyArray:o.isObject(e.b[a].defaultValue)&&!e.b[a].long?o.emptyObject:e.b[a].defaultValue;var u={};for(a=0;a<e.oneofsArray.length;++a)u[e.c[a].resolve().name]={get:o.oneOfGetter(e.c[a].oneof),set:o.oneOfSetter(e.c[a].oneof)};return a&&Object.defineProperties(s.prototype,u),e.ctor=s,s.prototype}e.exports=r;var n,i=t(22),o=t(37);r.generate=function(t){for(var e,r=o.codegen("p"),n=0;n<t.fieldsArray.length;++n)(e=t.b[n]).map?r("this%s={}",o.safeProp(e.name)):e.repeated&&r("this%s=[]",o.safeProp(e.name));return r("if(p){")("for(var ks=Object.keys(p),i=0;i<ks.length;++i)")("this[ks[i]]=p[ks[i]];")("}")},r.create=r,r.prototype=i},{22:22,35:35,37:37}],12:[function(t,e){function r(t,e){n.test(t)||(t="google/protobuf/"+t+".proto",e={nested:{google:{nested:{protobuf:{nested:e}}}}}),r[t]=e}e.exports=r;var n=/\/|\./;r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var i;r("duration",{Duration:i={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:i}),r("empty",{Empty:{fields:{}}}),r("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),r("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}})},{}],13:[function(t,e,r){function n(t,e,r,n){if(e.resolvedType)if(e.resolvedType instanceof s){t("switch(d%s){",n);for(var i=e.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)e.repeated&&i[o[a]]===e.typeDefault&&t("default:"),t("case%j:",o[a])("case %j:",i[o[a]])("m%s=%j",n,i[o[a]])("break");t("}")}else t('if(typeof d%s!=="object")',n)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%d].fromObject(d%s)",n,r,n);else{var u=!1;switch(e.type){case"double":case"float":t("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",n,n);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,u)('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,u?"true":"");break;case"bytes":t('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)",n)("m%s=d%s",n,n);break;case"string":t("m%s=String(d%s)",n,n);break;case"bool":t("m%s=Boolean(d%s)",n,n)}}return t}function i(t,e,r,n){if(e.resolvedType)e.resolvedType instanceof s?t("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):t("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var i=!1;switch(e.type){case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('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":t("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:t("d%s=m%s",n,n)}}return t}var o=r,s=t(16),a=t(37);o.fromObject=function(t){var e=t.fieldsArray,r=a.codegen("d")("if(d instanceof this.ctor)")("return d");if(!e.length)return r("return new this.ctor");r("var m=new this.ctor");for(var i=0;i<e.length;++i){var o=e[i].resolve(),u=a.safeProp(o.name);o.map?(r("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",o.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),n(r,o,i,u+"[ks[i]]")("}")("}")):o.repeated?(r("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",o.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),n(r,o,i,u+"[i]")("}")("}")):(o.resolvedType instanceof s||r("if(d%s!=null){",u),n(r,o,i,u),o.resolvedType instanceof s||r("}"))}return r("return m")},o.toObject=function(t){var e=t.fieldsArray.slice().sort(a.compareFieldsById);if(!e.length)return a.codegen()("return {}");for(var r=a.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=[],o=[],s=[],u=0;u<e.length;++u)e[u].partOf||(e[u].resolve().repeated?n:e[u].map?o:s).push(e[u]);var f,l,p=!1;for(u=0;u<e.length;++u){var f=e[u],h=t.b.indexOf(f),l=a.safeProp(f.name);f.map?(p||(p=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),i(r,f,h,l+"[ks2[j]]")("}")):f.repeated?(r("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),i(r,f,h,l+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",l,f.name),i(r,f,h,l),f.partOf&&r("if(o.oneofs)")("d%s=%j",a.safeProp(f.partOf.name),f.name)),r("}")}return r("return d")}},{16:16,37:37}],14:[function(t,r){function n(t){return"missing required '"+t.name+"'"}function i(t){var r=a.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter(function(t){return t.map}).length?",k":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&r("if((t&7)===4)")("break"),r("switch(t>>>3){");for(var i=0;i<t.fieldsArray.length;++i){var u=t.b[i].resolve(),f=u.resolvedType instanceof o?"uint32":u.type,l="m"+a.safeProp(u.name);r("case %d:",u.id),u.map?(r("r.skip().pos++")("if(%s===util.emptyObject)",l)("%s={}",l)("k=r.%s()",u.keyType)("r.pos++"),s.long[u.keyType]!==e?s.basic[f]===e?r('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',l,i):r('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',l,f):s.basic[f]===e?r("%s[k]=types[%d].decode(r,r.uint32())",l,i):r("%s[k]=r.%s()",l,f)):u.repeated?(r("if(!(%s&&%s.length))",l,l)("%s=[]",l),s.packed[f]!==e&&r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,f)("}else"),s.basic[f]===e?r(u.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",l,i):r("%s.push(r.%s())",l,f)):s.basic[f]===e?r(u.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",l,i):r("%s=r.%s()",l,f),r("break")}for(r("default:")("r.skipType(t&7)")("break")("}")("}"),i=0;i<t.b.length;++i){var p=t.b[i];p.required&&r("if(!m.hasOwnProperty(%j))",p.name)("throw util.ProtocolError(%j,{instance:m})",n(p))}return r("return m")}r.exports=i;var o=t(16),s=t(36),a=t(37)},{16:16,36:36,37:37}],15:[function(t,r){function n(t,e,r,n){return e.resolvedType.group?t("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):t("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(e.id<<3|2)>>>0)}function i(t){for(var r,i,u=a.codegen("m","w")("if(!w)")("w=Writer.create()"),f=t.fieldsArray.slice().sort(a.compareFieldsById),r=0;r<f.length;++r){var l=f[r].resolve(),p=t.b.indexOf(l),h=l.resolvedType instanceof o?"uint32":l.type,c=s.basic[h];i="m"+a.safeProp(l.name),l.map?(u("if(%s&&m.hasOwnProperty(%j)){",i,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(l.id<<3|2)>>>0,8|s.mapKey[l.keyType],l.keyType),c===e?u("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",p,i):u(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|c,h,i),u("}")("}")):l.repeated?(u("if(%s&&%s.length){",i,i),l.packed&&s.packed[h]!==e?u("w.uint32(%d).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",h,i)("w.ldelim()"):(u("for(var i=0;i<%s.length;++i)",i),c===e?n(u,l,p,i+"[i]"):u("w.uint32(%d).%s(%s[i])",(l.id<<3|c)>>>0,h,i)),u("}")):(l.optional&&(l.bytes||l.resolvedType&&!(l.resolvedType instanceof o)?u("if(%s&&m.hasOwnProperty(%j))",i,l.name):u("if(%s!=null&&m.hasOwnProperty(%j))",i,l.name)),c===e?n(u,l,p,i):u("w.uint32(%d).%s(%s)",(l.id<<3|c)>>>0,h,i))}return u("return w")}r.exports=i;var o=t(16),s=t(36),a=t(37)},{16:16,36:36,37:37}],16:[function(t,r){function n(t,e,r){if(i.call(this,t,r),e&&"object"!=typeof e)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comments={},e)for(var n=Object.keys(e),o=0;o<n.length;++o)this.valuesById[this.values[n[o]]=e[n[o]]]=n[o]}r.exports=n;var i=t(25);((n.prototype=Object.create(i.prototype)).constructor=n).className="Enum";var o=t(37);n.fromJSON=function(t,e){return new n(t,e.values,e.options)},n.prototype.toJSON=function(){return{options:this.options,values:this.values}},n.prototype.add=function(t,r,n){if(!o.isString(t))throw TypeError("name must be a string");if(!o.isInteger(r))throw TypeError("id must be an integer");if(this.values[t]!==e)throw Error("duplicate name");if(this.valuesById[r]!==e){if(!this.options||!this.options.allow_alias)throw Error("duplicate id");this.values[t]=r}else this.valuesById[this.values[t]=r]=t;return this.comments[t]=n||null,this},n.prototype.remove=function(t){if(!o.isString(t))throw TypeError("name must be a string");var r=this.values[t];if(r===e)throw Error("name does not exist");return delete this.valuesById[r],delete this.values[t],delete this.comments[t],this}},{25:25,37:37}],17:[function(t,r){function n(t,r,n,o,s,l){if(u.isObject(o)?(l=o,o=s=e):u.isObject(s)&&(l=s,s=e),i.call(this,t,l),!u.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!u.isString(n))throw TypeError("type must be a string");if(o!==e&&!f.test(o=(""+o).toLowerCase()))throw TypeError("rule must be a string rule");if(s!==e&&!u.isString(s))throw TypeError("extend must be a string");this.rule=o&&"optional"!==o?o:e,this.type=n,this.id=r,this.extend=s||e,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!u.Long&&a.long[n]!==e,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.d=null}r.exports=n;var i=t(25);((n.prototype=Object.create(i.prototype)).constructor=n).className="Field";var o,s=t(16),a=t(36),u=t(37),f=/^required|optional|repeated$/;Object.defineProperty(n.prototype,"packed",{get:function(){return null===this.d&&(this.d=this.getOption("packed")!==!1),this.d}}),n.prototype.setOption=function(t,e,r){return"packed"===t&&(this.d=null),i.prototype.setOption.call(this,t,e,r)},n.fromJSON=function(t,e){return new n(t,e.id,e.type,e.rule,e.extend,e.options)},n.prototype.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||e,type:this.type,id:this.id,extend:this.extend,options:this.options}},n.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=a.defaults[this.type])===e&&(o||(o=t(35)),this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&this.options.default!==e&&(this.typeDefault=this.options.default,this.resolvedType instanceof s&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),!this.options||this.options.packed===e||!this.resolvedType||this.resolvedType instanceof s||delete this.options.packed,this.long)this.typeDefault=u.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var r;u.base64.test(this.typeDefault)?u.base64.decode(this.typeDefault,r=u.newBuffer(u.base64.length(this.typeDefault)),0):u.utf8.write(this.typeDefault,r=u.newBuffer(u.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue=u.emptyObject:this.repeated?this.defaultValue=u.emptyArray:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{16:16,25:25,35:35,36:36,37:37}],18:[function(t,e){function r(t,e,r){return"function"==typeof e?(r=e,e=new i.Root):e||(e=new i.Root),e.load(t,r)}function n(t,e){return e||(e=new i.Root),e.loadSync(t)}var i=e.exports=t(19);i.build="light",i.load=r,i.loadSync=n,i.encoder=t(15),i.decoder=t(14),i.verifier=t(40),i.converter=t(13),i.ReflectionObject=t(25),i.Namespace=t(24),i.Root=t(30),i.Enum=t(16),i.Type=t(35),i.Field=t(17),i.OneOf=t(26),i.MapField=t(21),i.Service=t(33),i.Method=t(23),i.Class=t(11),i.Message=t(22),i.types=t(36),i.util=t(37),i.ReflectionObject.e(i.Root),i.Namespace.e(i.Type,i.Service),i.Root.e(i.Type)},{11:11,13:13,14:14,15:15,16:16,17:17,19:19,21:21,22:22,23:23,24:24,25:25,26:26,30:30,33:33,35:35,36:36,37:37,40:40}],19:[function(t,e,r){function n(){i.Reader.e(i.BufferReader),i.util.e()}var i=r;i.build="minimal",i.roots={},i.Writer=t(41),i.BufferWriter=t(42),i.Reader=t(28),i.BufferReader=t(29),i.util=t(39),i.rpc=t(31),i.configure=n,i.Writer.e(i.BufferWriter),n()},{28:28,29:29,31:31,39:39,41:41,42:42}],20:[function(t,e){var r=e.exports=t(18);r.build="full",r.tokenize=t(34),r.parse=t(27),r.common=t(12),r.Root.e(r.Type,r.parse,r.common)},{12:12,18:18,27:27,34:34}],21:[function(t,r){function n(t,e,r,n,o){if(i.call(this,t,e,n,o),!s.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=t(17);((n.prototype=Object.create(i.prototype)).constructor=n).className="MapField";var o=t(36),s=t(37);n.fromJSON=function(t,e){return new n(t,e.id,e.keyType,e.type,e.options)},n.prototype.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},n.prototype.resolve=function(){if(this.resolved)return this;if(o.mapKey[this.keyType]===e)throw Error("invalid key type: "+this.keyType);return i.prototype.resolve.call(this)}},{17:17,36:36,37:37}],22:[function(t,e){function r(t){if(t)for(var e=Object.keys(t),r=0;r<e.length;++r)this[e[r]]=t[e[r]]}e.exports=r;var n=t(37);r.encode=function(t,e){return this.$type.encode(t,e)},r.encodeDelimited=function(t,e){return this.$type.encodeDelimited(t,e)},r.decode=function(t){return this.$type.decode(t)},r.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},r.verify=function(t){return this.$type.verify(t)},r.fromObject=function(t){return this.$type.fromObject(t)},r.from=r.fromObject,r.toObject=function(t,e){return this.$type.toObject(t,e)},r.prototype.toObject=function(t){return this.$type.toObject(this,t)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{37:37}],23:[function(t,r){function n(t,r,n,s,a,u,f){if(o.isObject(a)?(f=a,a=u=e):o.isObject(u)&&(f=u,u=e),r!==e&&!o.isString(r))throw TypeError("type must be a string");if(!o.isString(n))throw TypeError("requestType must be a string");if(!o.isString(s))throw TypeError("responseType must be a string");i.call(this,t,f),this.type=r||"rpc",this.requestType=n,this.requestStream=!!a||e,this.responseType=s,this.responseStream=!!u||e,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var i=t(25);((n.prototype=Object.create(i.prototype)).constructor=n).className="Method";var o=t(37);n.fromJSON=function(t,e){return new n(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options)},n.prototype.toJSON=function(){return{type:"rpc"!==this.type&&this.type||e,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),i.prototype.resolve.call(this))}},{25:25,37:37}],24:[function(t,r){function n(t){if(!t||!t.length)return e;for(var r={},n=0;n<t.length;++n)r[t[n].name]=t[n].toJSON();return r}function i(t,r){s.call(this,t,r),this.nested=e,this.f=null}function o(t){return t.f=null,t}r.exports=i;var s=t(25);((i.prototype=Object.create(s.prototype)).constructor=i).className="Namespace";var a,u,f=t(16),l=t(17),p=t(37);i.fromJSON=function(t,e){return new i(t,e.options).addJSON(e.nested)},i.arrayToJSON=n,Object.defineProperty(i.prototype,"nestedArray",{get:function(){return this.f||(this.f=p.toArray(this.nested))}}),i.prototype.toJSON=function(){return{options:this.options,nested:n(this.nestedArray)}},i.prototype.addJSON=function(t){var r=this;if(t)for(var n,o=Object.keys(t),s=0;s<o.length;++s)n=t[o[s]],r.add((n.fields!==e?a.fromJSON:n.values!==e?f.fromJSON:n.methods!==e?u.fromJSON:n.id!==e?l.fromJSON:i.fromJSON)(o[s],n));return this},i.prototype.get=function(t){return this.nested&&this.nested[t]||null},i.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof f)return this.nested[t].values;throw Error("no such enum")},i.prototype.add=function(t){if(!(t instanceof l&&t.extend!==e||t instanceof a||t instanceof f||t instanceof u||t instanceof i))throw TypeError("object must be a valid nested object");if(this.nested){var r=this.get(t.name);if(r){if(!(r instanceof i&&t instanceof i)||r instanceof a||r instanceof u)throw Error("duplicate name '"+t.name+"' in "+this);for(var n=r.nestedArray,s=0;s<n.length;++s)t.add(n[s]);this.remove(r),this.nested||(this.nested={}),t.setOptions(r.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),o(this)},i.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=e),t.onRemove(this),o(this)},i.prototype.define=function(t,e){if(p.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var r=this;t.length>0;){var n=t.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof i))throw Error("path conflicts with non-namespace objects")}else r.add(r=new i(n))}return e&&r.addJSON(e),r},i.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e<t.length;)t[e]instanceof i?t[e++].resolveAll():t[e++].resolve();return this.resolve()},i.prototype.lookup=function(t,r,n){if("boolean"==typeof r?(n=r,r=e):r&&!Array.isArray(r)&&(r=[r]),p.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),r);var o=this.get(t[0]);if(o)if(1===t.length){if(!r||r.indexOf(o.constructor)>-1)return o}else if(o instanceof i&&(o=o.lookup(t.slice(1),r,!0)))return o;return null===this.parent||n?null:this.parent.lookup(t,r)},i.prototype.lookupType=function(t){var e=this.lookup(t,[a]);if(!e)throw Error("no such type");return e},i.prototype.lookupEnum=function(t){var e=this.lookup(t,[f]);if(!e)throw Error("no such Enum '"+t+"' in "+this);return e},i.prototype.lookupTypeOrEnum=function(t){var e=this.lookup(t,[a,f]);if(!e)throw Error("no such Type or Enum '"+t+"' in "+this);return e},i.prototype.lookupService=function(t){var e=this.lookup(t,[u]);if(!e)throw Error("no such Service '"+t+"' in "+this);return e},i.e=function(t,e){a=t,u=e}},{16:16,17:17,25:25,37:37}],25:[function(t,r){function n(t,e){if(!o.isString(t))throw TypeError("name must be a string");if(e&&!o.isObject(e))throw TypeError("options must be an object");this.options=e,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}r.exports=n,n.className="ReflectionObject";var i,o=t(37);Object.defineProperties(n.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}}),n.prototype.toJSON=function(){throw Error()},n.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof i&&e.g(this)},n.prototype.onRemove=function(t){var e=t.root;e instanceof i&&e.h(this),this.parent=null,this.resolved=!1},n.prototype.resolve=function(){return this.resolved?this:(this.root instanceof i&&(this.resolved=!0),this)},n.prototype.getOption=function(t){return this.options?this.options[t]:e},n.prototype.setOption=function(t,r,n){return n&&this.options&&this.options[t]!==e||((this.options||(this.options={}))[t]=r),this},n.prototype.setOptions=function(t,e){if(t)for(var r=Object.keys(t),n=0;n<r.length;++n)this.setOption(r[n],t[r[n]],e);return this},n.prototype.toString=function(){var t=this.constructor.className,e=this.fullName;return e.length?t+" "+e:t},n.e=function(t){i=t}},{37:37}],26:[function(t,r){function n(t,r,n){if(Array.isArray(r)||(n=r,r=e),o.call(this,t,n),r!==e&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.fieldsArray=[]}function i(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}r.exports=n;var o=t(25);((n.prototype=Object.create(o.prototype)).constructor=n).className="OneOf";var s=t(17);n.fromJSON=function(t,e){return new n(t,e.oneof,e.options)},n.prototype.toJSON=function(){return{oneof:this.oneof,options:this.options}},n.prototype.add=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,i(this),this},n.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");var e=this.fieldsArray.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(e,1),e=this.oneof.indexOf(t.name),
|
|
e>-1&&this.oneof.splice(e,1),t.partOf=null,this},n.prototype.onAdd=function(t){o.prototype.onAdd.call(this,t);for(var e=this,r=0;r<this.oneof.length;++r){var n=t.get(this.oneof[r]);n&&!n.partOf&&(n.partOf=e,e.fieldsArray.push(n))}i(this)},n.prototype.onRemove=function(t){for(var e,r=0;r<this.fieldsArray.length;++r)(e=this.fieldsArray[r]).parent&&e.parent.remove(e);o.prototype.onRemove.call(this,t)}},{17:17,25:25}],27:[function(t,r){function n(t){return t.substring(0,1)+t.substring(1).replace(S,function(t,e){return e.toUpperCase()})}function i(t,r,S){function T(t,e,r){var n=i.filename;return r||(i.filename=null),Error("illegal "+(e||"token")+" '"+t+"' ("+(n?n+", ":"")+"line "+tt.line()+")")}function E(){var t,e=[];do{if('"'!==(t=et())&&"'"!==t)throw T(t);e.push(et()),it(t),t=nt()}while('"'===t||"'"===t);return e.join("")}function N(t){var e=et();switch(e){case"'":case'"':return rt(e),E();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return L(e,!0)}catch(r){if(t&&x.test(e))return e;throw T(e,"value")}}function F(t,e){var r,n;do{!e||'"'!==(r=nt())&&"'"!==r?t.push([n=I(et()),it("to",!0)?I(et()):n]):t.push(E())}while(it(",",!0));it(";")}function L(t,e){var r=1;switch("-"===t.charAt(0)&&(r=-1,t=t.substring(1)),t){case"inf":case"INF":case"Inf":return 1/0*r;case"nan":case"NAN":case"Nan":case"NaN":return 0/0;case"0":return 0}if(v.test(t))return r*parseInt(t,10);if(g.test(t))return r*parseInt(t,16);if(w.test(t))return r*parseInt(t,8);if(O.test(t))return r*parseFloat(t);throw T(t,"number",e)}function I(t,e){switch(t){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!e&&"-"===t.charAt(0))throw T(t,"id");if(m.test(t))return parseInt(t,10);if(b.test(t))return parseInt(t,16);if(k.test(t))return parseInt(t,8);throw T(t,"id")}function B(t,e){switch(e){case"option":return M(t,e),it(";"),!0;case"message":return D(t,e),!0;case"enum":return q(t,e),!0;case"service":return _(t,e),!0;case"extend":return W(t,e),!0}return!1}function J(t,e,r){var n=tt.line();if(t&&(t.comment=ot(),t.filename=i.filename),it("{",!0)){for(var o;"}"!==(o=et());)e(o);it(";",!0)}else r&&r(),it(";"),t&&"string"!=typeof t.comment&&(t.comment=ot(n))}function D(t,e){if(!j.test(e=et()))throw T(e,"type name");var r=new a(e);J(r,function(t){if(!B(r,t))switch(t){case"map":$(r);break;case"required":case"optional":case"repeated":R(r,t);break;case"oneof":P(r,t);break;case"extensions":F(r.extensions||(r.extensions=[]));break;case"reserved":F(r.reserved||(r.reserved=[]),!0);break;default:if(!at||!x.test(t))throw T(t);rt(t),R(r,"optional")}}),t.add(r)}function R(t,e,r){var n=et();if("group"===n)return void V(t,e);if(!x.test(n))throw T(n,"type");var i=et();if(!j.test(i))throw T(i,"name");i=ft(i),it("=");var o=new u(i,I(et()),n,e,r);J(o,function(t){if("option"!==t)throw T(t);M(o,t),it(";")},function(){H(o)}),t.add(o),!at&&o.repeated&&o.setOption("packed",!1,!0)}function V(t,e){var r=et();if(!j.test(r))throw T(r,"name");var n=y.lcFirst(r);r===n&&(r=y.ucFirst(r)),it("=");var o=I(et()),s=new a(r);s.group=!0;var f=new u(n,o,r,e);f.filename=i.filename,J(s,function(t){switch(t){case"option":M(s,t),it(";");break;case"required":case"optional":case"repeated":R(s,t);break;default:throw T(t)}}),t.add(s).add(f)}function $(t){it("<");var r=et();if(d.mapKey[r]===e)throw T(r,"type");it(",");var n=et();if(!x.test(n))throw T(n,"type");it(">");var i=et();if(!j.test(i))throw T(i,"name");it("=");var o=new f(ft(i),I(et()),r,n);J(o,function(t){if("option"!==t)throw T(t);M(o,t),it(";")},function(){H(o)}),t.add(o)}function P(t,e){if(!j.test(e=et()))throw T(e,"name");var r=new l(ft(e));J(r,function(t){"option"===t?(M(r,t),it(";")):(rt(t),R(r,"optional"))}),t.add(r)}function q(t,e){if(!j.test(e=et()))throw T(e,"name");var r=new p(e);J(r,function(t){"option"===t?(M(r,t),it(";")):z(r,t)}),t.add(r)}function z(t,e){if(!j.test(e))throw T(e,"name");it("=");var r=I(et(),!0),n={};J(n,function(t){if("option"!==t)throw T(t);M(n,t),it(";")},function(){H(n)}),t.add(e,r,n.comment)}function M(t,e){var r=it("(",!0);if(!x.test(e=et()))throw T(e,"name");var n=e;r&&(it(")"),n="("+n+")",e=nt(),A.test(e)&&(n+=e,et())),it("="),C(t,n)}function C(t,e){if(it("{",!0))do{if(!j.test(Y=et()))throw T(Y,"name");"{"===nt()?C(t,e+"."+Y):(it(":"),U(t,e+"."+Y,N(!0)))}while(!it("}",!0));else U(t,e,N(!0))}function U(t,e,r){t.setOption&&t.setOption(e,r)}function H(t){if(it("[",!0)){do{M(t,"option")}while(it(",",!0));it("]")}return t}function _(t,e){if(!j.test(e=et()))throw T(e,"service name");var r=new h(e);J(r,function(t){if(!B(r,t)){if("rpc"!==t)throw T(t);Z(r,t)}}),t.add(r)}function Z(t,e){var r=e;if(!j.test(e=et()))throw T(e,"name");var n,i,o,s,a=e;if(it("("),it("stream",!0)&&(i=!0),!x.test(e=et()))throw T(e);if(n=e,it(")"),it("returns"),it("("),it("stream",!0)&&(s=!0),!x.test(e=et()))throw T(e);o=e,it(")");var u=new c(a,r,n,o,i,s);J(u,function(t){if("option"!==t)throw T(t);M(u,t),it(";")}),t.add(u)}function W(t,e){if(!x.test(e=et()))throw T(e,"reference");var r=e;J(null,function(e){switch(e){case"required":case"repeated":case"optional":R(t,e,r);break;default:if(!at||!x.test(e))throw T(e);rt(e),R(t,"optional",r)}})}r instanceof s||(S=r,r=new s),S||(S=i.defaults);for(var K,G,X,Q,Y,tt=o(t),et=tt.next,rt=tt.push,nt=tt.peek,it=tt.skip,ot=tt.cmnt,st=!0,at=!1,ut=r,ft=S.keepCase?function(t){return t}:n;null!==(Y=et());)switch(Y){case"package":if(!st)throw T(Y);!function(){if(K!==e)throw T("package");if(K=et(),!x.test(K))throw T(K,"name");ut=ut.define(K),it(";")}();break;case"import":if(!st)throw T(Y);!function(){var t,e=nt();switch(e){case"weak":t=X||(X=[]),et();break;case"public":et();default:t=G||(G=[])}e=E(),it(";"),t.push(e)}();break;case"syntax":if(!st)throw T(Y);!function(){if(it("="),Q=E(),!(at="proto3"===Q)&&"proto2"!==Q)throw T(Q,"syntax");it(";")}();break;case"option":if(!st)throw T(Y);M(ut,Y),it(";");break;default:if(B(ut,Y)){st=!1;continue}throw T(Y)}return i.filename=null,{package:K,imports:G,weakImports:X,syntax:Q,root:r}}r.exports=i,i.filename=null,i.defaults={keepCase:!1};var o=t(34),s=t(30),a=t(35),u=t(17),f=t(21),l=t(26),p=t(16),h=t(33),c=t(23),d=t(36),y=t(37),v=/^[1-9][0-9]*$/,m=/^-?[1-9][0-9]*$/,g=/^0[x][0-9a-fA-F]+$/,b=/^-?0[x][0-9a-fA-F]+$/,w=/^0[0-7]+$/,k=/^-?0[0-7]+$/,O=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,j=/^[a-zA-Z_][a-zA-Z_0-9]*$/,x=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,A=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,S=/_([a-z])/g},{16:16,17:17,21:21,23:23,26:26,30:30,33:33,34:34,35:35,36:36,37:37}],28:[function(t,e){function r(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function n(t){this.buf=t,this.pos=0,this.len=t.length}function i(){var t=new f(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw r(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function o(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function s(){if(this.pos+8>this.len)throw r(this,8);return new f(o(this.buf,this.pos+=4),o(this.buf,this.pos+=4))}e.exports=n;var a,u=t(39),f=u.LongBits,l=u.utf8,p="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new n(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new n(t);throw Error("illegal buffer")};n.create=u.Buffer?function(t){return(n.create=function(t){return u.Buffer.isBuffer(t)?new a(t):p(t)})(t)}:p,n.prototype.i=u.Array.prototype.subarray||u.Array.prototype.slice,n.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return t}}(),n.prototype.int32=function(){return 0|this.uint32()},n.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},n.prototype.bool=function(){return 0!==this.uint32()},n.prototype.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return o(this.buf,this.pos+=4)},n.prototype.sfixed32=function(){if(this.pos+4>this.len)throw r(this,4);return 0|o(this.buf,this.pos+=4)},n.prototype.float=function(){if(this.pos+4>this.len)throw r(this,4);var t=u.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},n.prototype.double=function(){if(this.pos+8>this.len)throw r(this,4);var t=u.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},n.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw r(this,t);return this.pos+=t,e===n?new this.buf.constructor(0):this.i.call(this.buf,e,n)},n.prototype.string=function(){var t=this.bytes();return l.read(t,0,t.length)},n.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw r(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw r(this)}while(128&this.buf[this.pos++]);return this},n.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4==(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},n.e=function(t){a=t;var e=u.Long?"toLong":"toNumber";u.merge(n.prototype,{int64:function(){return i.call(this)[e](!1)},uint64:function(){return i.call(this)[e](!0)},sint64:function(){return i.call(this).zzDecode()[e](!1)},fixed64:function(){return s.call(this)[e](!0)},sfixed64:function(){return s.call(this)[e](!1)}})}},{39:39}],29:[function(t,e){function r(t){n.call(this,t)}e.exports=r;var n=t(28);(r.prototype=Object.create(n.prototype)).constructor=r;var i=t(39);i.Buffer&&(r.prototype.i=i.Buffer.prototype.slice),r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{28:28,39:39}],30:[function(t,r){function n(t){s.call(this,"",t),this.deferred=[],this.files=[]}function i(){}function o(t,r){var n=r.parent.lookup(r.extend);if(n){var i=new l(r.fullName,r.id,r.type,r.rule,e,r.options);return i.declaringField=r,r.extensionField=i,n.add(i),!0}return!1}r.exports=n;var s=t(24);((n.prototype=Object.create(s.prototype)).constructor=n).className="Root";var a,u,f,l=t(17),p=t(16),h=t(37);n.fromJSON=function(t,e){return e||(e=new n),t.options&&e.setOptions(t.options),e.addJSON(t.nested)},n.prototype.resolvePath=h.path.resolve,n.prototype.load=function t(r,n,o){function s(t,e){if(o){var r=o;if(o=null,c)throw t;r(t,e)}}function a(t,e){try{if(h.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),h.isString(e)){u.filename=t;var r,i=u(e,p,n),o=0;if(i.imports)for(;o<i.imports.length;++o)(r=p.resolvePath(t,i.imports[o]))&&l(r);if(i.weakImports)for(o=0;o<i.weakImports.length;++o)(r=p.resolvePath(t,i.weakImports[o]))&&l(r,!0)}else p.setOptions(e.options).addJSON(e.nested)}catch(t){s(t)}c||d||s(null,p)}function l(t,e){var r=t.lastIndexOf("google/protobuf/");if(r>-1){var n=t.substring(r);n in f&&(t=n)}if(!(p.files.indexOf(t)>-1)){if(p.files.push(t),t in f)return void(c?a(t,f[t]):(++d,setTimeout(function(){--d,a(t,f[t])})));if(c){var i;try{i=h.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||s(t))}a(t,i)}else++d,h.fetch(t,function(r,n){if(--d,o)return r?void(e?d||s(null,p):s(r)):void a(t,n)})}}"function"==typeof n&&(o=n,n=e);var p=this;if(!o)return h.asPromise(t,p,r,n);var c=o===i,d=0;h.isString(r)&&(r=[r]);for(var y,v=0;v<r.length;++v)(y=p.resolvePath("",r[v]))&&l(y);return c?p:(d||s(null,p),e)},n.prototype.loadSync=function(t,e){if(!h.isNode)throw Error("not supported");return this.load(t,e,i)},n.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return s.prototype.resolveAll.call(this)};var c=/^[A-Z]/;n.prototype.g=function(t){if(t instanceof l)t.extend===e||t.extensionField||o(this,t)||this.deferred.push(t);else if(t instanceof p)c.test(t.name)&&(t.parent[t.name]=t.values);else{if(t instanceof a)for(var r=0;r<this.deferred.length;)o(this,this.deferred[r])?this.deferred.splice(r,1):++r;for(var n=0;n<t.nestedArray.length;++n)this.g(t.f[n]);c.test(t.name)&&(t.parent[t.name]=t)}},n.prototype.h=function(t){if(t instanceof l){if(t.extend!==e)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var r=this.deferred.indexOf(t);r>-1&&this.deferred.splice(r,1)}}else if(t instanceof p)c.test(t.name)&&delete t.parent[t.name];else if(t instanceof s){for(var n=0;n<t.nestedArray.length;++n)this.h(t.f[n]);c.test(t.name)&&delete t.parent[t.name]}},n.e=function(t,e,r){a=t,u=e,f=r}},{16:16,17:17,24:24,37:37}],31:[function(t,e,r){r.Service=t(32)},{32:32}],32:[function(t,r){function n(t,e,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!r}r.exports=n;var i=t(39);(n.prototype=Object.create(i.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function t(r,n,o,s,a){if(!s)throw TypeError("request must be specified");var u=this;if(!a)return i.asPromise(t,u,r,n,o,s);if(!u.rpcImpl)return setTimeout(function(){a(Error("already ended"))},0),e;try{return u.rpcImpl(r,n[u.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(t,n){if(t)return u.emit("error",t,r),a(t);if(null===n)return u.end(!0),e;if(!(n instanceof o))try{n=o[u.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return u.emit("error",t,r),a(t)}return u.emit("data",n,r),a(null,n)})}catch(t){return u.emit("error",t,r),setTimeout(function(){a(t)},0),e}},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{39:39}],33:[function(t,r){function n(t,e){o.call(this,t,e),this.methods={},this.j=null}function i(t){return t.j=null,t}r.exports=n;var o=t(24);((n.prototype=Object.create(o.prototype)).constructor=n).className="Service";var s=t(23),a=t(37),u=t(31);n.fromJSON=function(t,e){var r=new n(t,e.options);if(e.methods)for(var i=Object.keys(e.methods),o=0;o<i.length;++o)r.add(s.fromJSON(i[o],e.methods[i[o]]));return e.nested&&r.addJSON(e.nested),r},n.prototype.toJSON=function(){var t=o.prototype.toJSON.call(this);return{options:t&&t.options||e,methods:o.arrayToJSON(this.methodsArray)||{},nested:t&&t.nested||e}},Object.defineProperty(n.prototype,"methodsArray",{get:function(){return this.j||(this.j=a.toArray(this.methods))}}),n.prototype.get=function(t){return this.methods[t]||o.prototype.get.call(this,t)},n.prototype.resolveAll=function(){for(var t=this.methodsArray,e=0;e<t.length;++e)t[e].resolve();return o.prototype.resolve.call(this)},n.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof s?(this.methods[t.name]=t,t.parent=this,i(this)):o.prototype.add.call(this,t)},n.prototype.remove=function(t){if(t instanceof s){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,i(this)}return o.prototype.remove.call(this,t)},n.prototype.create=function(t,e,r){for(var n=new u.Service(t,e,r),i=0;i<this.methodsArray.length;++i)n[a.lcFirst(this.j[i].resolve().name)]=a.codegen("r","c")("return this.rpcCall(m,q,s,r,c)").eof(a.lcFirst(this.j[i].name),{m:this.j[i],q:this.j[i].resolvedRequestType.ctor,s:this.j[i].resolvedResponseType.ctor});return n}},{23:23,24:24,31:31,37:37}],34:[function(t,r){function n(t){return t.replace(p,function(t,e){switch(e){case"\\":case"":return e;default:return h[e]||""}})}function i(t){function r(t){return Error("illegal "+t+" (line "+w+")")}function i(){var e="'"===A?a:s;e.lastIndex=g-1;var i=e.exec(t);if(!i)throw r("string");return g=e.lastIndex,d(A),A=null,n(i[1])}function p(e){return t.charAt(e)}function h(e,r){k=t.charAt(e++),j=w;for(var n=t.substring(e,r).split(f),i=0;i<n.length;++i)n[i]=n[i].replace(u,"").trim();O=n.join("\n").trim()}function c(){if(x.length>0)return x.shift();if(A)return i();var e,n,s,a,u;do{if(g===b)return null;for(e=!1;l.test(s=p(g));)if("\n"===s&&++w,++g===b)return null;if("/"===p(g)){if(++g===b)throw r("comment");if("/"===p(g)){for(u="/"===p(a=g+1);"\n"!==p(++g);)if(g===b)return null;++g,u&&h(a,g-1),++w,e=!0}else{if("*"!==(s=p(g)))return"/";u="*"===p(a=g+1);do{if("\n"===s&&++w,++g===b)throw r("comment");n=s,s=p(g)}while("*"!==n||"/"!==s);++g,u&&h(a,g-2),e=!0}}}while(e);var f=g;if(o.lastIndex=0,!o.test(p(f++)))for(;f<b&&!o.test(p(f));)++f;var c=t.substring(g,g=f);return'"'!==c&&"'"!==c||(A=c),c}function d(t){x.push(t)}function y(){if(!x.length){var t=c();if(null===t)return null;d(t)}return x[0]}function v(t,e){var n=y();if(n===t)return c(),!0;if(!e)throw r("token '"+n+"', '"+t+"' expected");return!1}function m(t){var r;return t===e?r=j===w-1&&O||null:(O||y(),r=j===t&&"/"===k&&O||null),k=O=null,j=0,r}t=""+t;var g=0,b=t.length,w=1,k=null,O=null,j=0,x=[],A=null;return{next:c,peek:y,push:d,skip:v,line:function(){return w},cmnt:m}}r.exports=i;var o=/[\s{}=;:[\],'"()<>]/g,s=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,a=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,u=/^ *[*\/]+ */,f=/\n/g,l=/\s/,p=/\\(.?)/g,h={0:"\0",r:"\r",n:"\n",t:"\t"};i.unescape=n},{}],35:[function(t,r){function n(t,r){o.call(this,t,r),this.fields={},this.oneofs=e,this.extensions=e,this.reserved=e,this.group=e,this.k=null,this.b=null,this.c=null,this.l=null}function i(t){return t.k=t.b=t.c=t.l=null,delete t.encode,delete t.decode,delete t.verify,t}r.exports=n;var o=t(24);((n.prototype=Object.create(o.prototype)).constructor=n).className="Type";var s=t(16),a=t(26),u=t(17),f=t(21),l=t(33),p=t(11),h=t(22),c=t(28),d=t(41),y=t(37),v=t(15),m=t(14),g=t(40),b=t(13);Object.defineProperties(n.prototype,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var r=this.fields[t[e]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.b||(this.b=y.toArray(this.fields))}},oneofsArray:{get:function(){return this.c||(this.c=y.toArray(this.oneofs))}},ctor:{get:function(){return this.l||(this.l=p(this).constructor)},set:function(t){!t||t.prototype instanceof h?this.l=t:p(this,t)}}}),n.fromJSON=function(t,r){var i=new n(t,r.options);i.extensions=r.extensions,i.reserved=r.reserved;for(var p=Object.keys(r.fields),h=0;h<p.length;++h)i.add((e!==r.fields[p[h]].keyType?f.fromJSON:u.fromJSON)(p[h],r.fields[p[h]]));if(r.oneofs)for(p=Object.keys(r.oneofs),h=0;h<p.length;++h)i.add(a.fromJSON(p[h],r.oneofs[p[h]]));if(r.nested)for(p=Object.keys(r.nested),h=0;h<p.length;++h){var c=r.nested[p[h]];i.add((c.id!==e?u.fromJSON:c.fields!==e?n.fromJSON:c.values!==e?s.fromJSON:c.methods!==e?l.fromJSON:o.fromJSON)(p[h],c))}return r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),i},n.prototype.toJSON=function(){var t=o.prototype.toJSON.call(this);return{options:t&&t.options||e,oneofs:o.arrayToJSON(this.oneofsArray),fields:o.arrayToJSON(this.fieldsArray.filter(function(t){return!t.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:e,reserved:this.reserved&&this.reserved.length?this.reserved:e,group:this.group||e,nested:t&&t.nested||e}},n.prototype.resolveAll=function(){for(var t=this.fieldsArray,e=0;e<t.length;)t[e++].resolve();var r=this.oneofsArray;for(e=0;e<r.length;)r[e++].resolve();return o.prototype.resolve.call(this)},n.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},n.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof u&&t.extend===e){if(this.k?this.k[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),i(this)}return t instanceof a?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),i(this)):o.prototype.add.call(this,t)},n.prototype.remove=function(t){if(t instanceof u&&t.extend===e){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),i(this)}if(t instanceof a){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),i(this)}return o.prototype.remove.call(this,t)},n.prototype.isReservedId=function(t){if(this.reserved)for(var e=0;e<this.reserved.length;++e)if("string"!=typeof this.reserved[e]&&this.reserved[e][0]<=t&&this.reserved[e][1]>=t)return!0;return!1},n.prototype.isReservedName=function(t){if(this.reserved)for(var e=0;e<this.reserved.length;++e)if(this.reserved[e]===t)return!0;return!1},n.prototype.create=function(t){return new this.ctor(t)},n.prototype.setup=function(){for(var t=this.fullName,e=[],r=0;r<this.fieldsArray.length;++r)e.push(this.b[r].resolve().resolvedType);return this.encode=v(this).eof(t+"$encode",{Writer:d,types:e,util:y}),this.decode=m(this).eof(t+"$decode",{Reader:c,types:e,util:y}),this.verify=g(this).eof(t+"$verify",{types:e,util:y}),this.fromObject=this.from=b.fromObject(this).eof(t+"$fromObject",{types:e,util:y}),this.toObject=b.toObject(this).eof(t+"$toObject",{types:e,util:y}),this},n.prototype.encode=function(t,e){return this.setup().encode(t,e)},n.prototype.encodeDelimited=function(t,e){return this.encode(t,e&&e.len?e.fork():e).ldelim()},n.prototype.decode=function(t,e){return this.setup().decode(t,e)},n.prototype.decodeDelimited=function(t){return t instanceof c||(t=c.create(t)),this.decode(t,t.uint32())},n.prototype.verify=function(t){return this.setup().verify(t)},n.prototype.fromObject=function(t){return this.setup().fromObject(t)},n.prototype.from=n.prototype.fromObject,n.prototype.toObject=function(t,e){return this.setup().toObject(t,e)}},{11:11,13:13,14:14,15:15,16:16,17:17,21:21,22:22,24:24,26:26,28:28,33:33,37:37,40:40,41:41}],36:[function(t,e,r){function n(t,e){var r=0,n={};for(e|=0;r<t.length;)n[s[r+e]]=t[r++];return n}var i=r,o=t(37),s=["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,"",o.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(t,e){var r=e.exports=t(39);r.codegen=t(3),r.fetch=t(5),r.path=t(8),r.fs=r.inquire("fs"),r.toArray=function(t){var e=[];if(t)for(var r=Object.keys(t),n=0;n<r.length;++n)e.push(t[r[n]]);return e};r.safeProp=function(t){return'["'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},r.compareFieldsById=function(t,e){return t.id-e.id}},{3:3,39:39,5:5,8:8}],38:[function(t,e){function r(t,e){this.lo=t>>>0,this.hi=e>>>0}e.exports=r;var n=t(39),i=r.zero=new r(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(t){if(0===t)return i;var e=t<0;e&&(t=-t);var n=t>>>0,o=(t-n)/4294967296>>>0;return e&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new r(n,o)},r.from=function(t){if("number"==typeof t)return r.fromNumber(t);if(n.isString(t)){if(!n.Long)return r.fromNumber(parseInt(t,10));t=n.Long.fromString(t)}return t.low||t.high?new r(t.low>>>0,t.high>>>0):i},r.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;r.fromHash=function(t){return t===o?i:new r((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},r.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},r.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},{39:39}],39:[function(r,n,i){function o(t,r,n){for(var i=Object.keys(r),o=0;o<i.length;++o)t[i[o]]!==e&&n||(t[i[o]]=r[i[o]]);return t}function s(t){function e(t,r){if(!(this instanceof e))return new e(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&o(this,r)}return(e.prototype=Object.create(Error.prototype)).constructor=e,Object.defineProperty(e.prototype,"name",{get:function(){return t}}),e.prototype.toString=function(){return this.name+": "+this.message},e}var a=i;a.asPromise=r(1),a.base64=r(2),a.EventEmitter=r(4),a.float=r(6),a.inquire=r(7),a.utf8=r(10),a.pool=r(9),a.LongBits=r(38),a.emptyArray=Object.freeze?Object.freeze([]):[],a.emptyObject=Object.freeze?Object.freeze({}):{},a.isNode=!!(t.process&&t.process.versions&&t.process.versions.node),a.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},a.isString=function(t){return"string"==typeof t||t instanceof String},a.isObject=function(t){return t&&"object"==typeof t},a.isset=a.isSet=function(t,e){var r=t[e];return!(null==r||!t.hasOwnProperty(e))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},a.Buffer=function(){try{var t=a.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),a.o=null,a.p=null,a.newBuffer=function(t){return"number"==typeof t?a.Buffer?a.p(t):new a.Array(t):a.Buffer?a.o(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},a.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,a.Long=t.dcodeIO&&t.dcodeIO.Long||a.inquire("long"),a.key2Re=/^true|false|0|1$/,a.key32Re=/^-?(?:0|[1-9][0-9]*)$/,a.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,a.longToHash=function(t){return t?a.LongBits.from(t).toHash():a.LongBits.zeroHash},a.longFromHash=function(t,e){var r=a.LongBits.fromHash(t);return a.Long?a.Long.fromBits(r.lo,r.hi,e):r.toNumber(!!e)},a.merge=o,a.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},a.newError=s,a.ProtocolError=s("ProtocolError"),a.oneOfGetter=function(t){for(var r={},n=0;n<t.length;++n)r[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===r[t[n]]&&this[t[n]]!==e&&null!==this[t[n]])return t[n]}},a.oneOfSetter=function(t){return function(e){for(var r=0;r<t.length;++r)t[r]!==e&&delete this[t[r]]}},a.lazyResolve=function(t,e){for(var r=0;r<e.length;++r)for(var n=Object.keys(e[r]),i=0;i<n.length;++i){for(var o=e[r][n[i]].split("."),s=t;o.length;)s=s[o.shift()];e[r][n[i]]=s}},a.toJSONOptions={longs:String,enums:String,bytes:String},a.e=function(){var t=a.Buffer;if(!t)return void(a.o=a.p=null);a.o=t.from!==Uint8Array.from&&t.from||function(e,r){return new t(e,r)},a.p=t.allocUnsafe||function(e){return new t(e)}}},{1:1,10:10,2:2,38:38,4:4,6:6,7:7,9:9}],40:[function(t,e){function r(t,e){return t.name+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function n(t,e,n,i){if(e.resolvedType)if(e.resolvedType instanceof s){t("switch(%s){",i)("default:")("return%j",r(e,"enum value"));for(var o=Object.keys(e.resolvedType.values),a=0;a<o.length;++a)t("case %d:",e.resolvedType.values[o[a]]);t("break")("}")}else t("var e=types[%d].verify(%s);",n,i)("if(e)")("return%j+e",e.name+".");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",i)("return%j",r(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",r(e,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',i)("return%j",r(e,"number"));break;case"bool":t('if(typeof %s!=="boolean")',i)("return%j",r(e,"boolean"));break;case"string":t("if(!util.isString(%s))",i)("return%j",r(e,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",r(e,"buffer"))}return t}function i(t,e,n){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",n)("return%j",r(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",n)("return%j",r(e,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",n)("return%j",r(e,"boolean key"))}return t}function o(t){var e=a.codegen("m")('if(typeof m!=="object"||m===null)')("return%j","object expected"),o=t.oneofsArray,s={};o.length&&e("var p={}");for(var u=0;u<t.fieldsArray.length;++u){var f=t.b[u].resolve(),l="m"+a.safeProp(f.name);if(f.map)e("if(%s!=null){",l)("if(!util.isObject(%s))",l)("return%j",r(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),i(e,f,"k[i]"),n(e,f,u,l+"[k[i]]")("}")("}");else if(f.repeated)e("if(%s!=null){",l)("if(!Array.isArray(%s))",l)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",l),n(e,f,u,l+"[i]")("}")("}");else{if(f.optional&&e("if(%s!=null){",l),f.partOf){var p=a.safeProp(f.partOf.name);1===s[f.partOf.name]&&e("if(p%s===1)",p)("return%j",f.partOf.name+": multiple values"),s[f.partOf.name]=1,e("p%s=1",p)}n(e,f,u,l),f.optional&&e("}")}}return e("return null")}e.exports=o;var s=t(16),a=t(37)},{16:16,37:37}],41:[function(t,r){function n(t,r,n){this.fn=t,this.len=r,this.next=e,this.val=n}function i(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function a(t,e,r){e[r]=255&t}function u(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t}function f(t,r){this.len=t,this.next=e,this.val=r}function l(t,e,r){for(;t.hi;)e[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function p(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}r.exports=s;var h,c=t(39),d=c.LongBits,y=c.base64,v=c.utf8;s.create=c.Buffer?function(){return(s.create=function(){return new h})()}:function(){return new s},s.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(s.alloc=c.pool(s.alloc,c.Array.prototype.subarray)),s.prototype.push=function(t,e,r){return this.tail=this.tail.next=new n(t,e,r),this.len+=e,this},
|
|
f.prototype=Object.create(n.prototype),f.prototype.fn=u,s.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},s.prototype.int32=function(t){return t<0?this.push(l,10,d.fromNumber(t)):this.uint32(t)},s.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},s.prototype.uint64=function(t){var e=d.from(t);return this.push(l,e.length(),e)},s.prototype.int64=s.prototype.uint64,s.prototype.sint64=function(t){var e=d.from(t).zzEncode();return this.push(l,e.length(),e)},s.prototype.bool=function(t){return this.push(a,1,t?1:0)},s.prototype.fixed32=function(t){return this.push(p,4,t>>>0)},s.prototype.sfixed32=s.prototype.fixed32,s.prototype.fixed64=function(t){var e=d.from(t);return this.push(p,4,e.lo).push(p,4,e.hi)},s.prototype.sfixed64=s.prototype.fixed64,s.prototype.float=function(t){return this.push(c.float.writeFloatLE,4,t)},s.prototype.double=function(t){return this.push(c.float.writeDoubleLE,8,t)};var m=c.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n<t.length;++n)e[r+n]=t[n]};s.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this.push(a,1,0);if(c.isString(t)){var r=s.alloc(e=y.length(t));y.decode(t,r,0),t=r}return this.uint32(e).push(m,e,t)},s.prototype.string=function(t){var e=v.length(t);return e?this.uint32(e).push(v.write,e,t):this.push(a,1,0)},s.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new n(i,0,0),this.len=0,this},s.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 n(i,0,0),this.len=0),this},s.prototype.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=e,this.len+=r),this},s.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e},s.e=function(t){h=t}},{39:39}],42:[function(t,e){function r(){i.call(this)}function n(t,e,r){t.length<40?o.utf8.write(t,e,r):e.utf8Write(t,r)}e.exports=r;var i=t(41);(r.prototype=Object.create(i.prototype)).constructor=r;var o=t(39),s=o.Buffer;r.alloc=function(t){return(r.alloc=o.p)(t)};var a=s&&s.prototype instanceof Uint8Array&&"set"===s.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n<t.length;)e[r++]=t[n++]};r.prototype.bytes=function(t){o.isString(t)&&(t=o.o(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this.push(a,e,t),this},r.prototype.string=function(t){var e=s.byteLength(t);return this.uint32(e),e&&this.push(n,e,t),this}},{39:39,41:41}]},{},[20])}("object"==typeof window&&window||"object"==typeof self&&self||this);
|
|
//# sourceMappingURL=protobuf.min.js.map
|