!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Pbf=t()}(function(){return function r(s,n,o){function h(i,t){if(!n[i]){if(!s[i]){var e="function"==typeof require&&require;if(!t&&e)return e(i,!0);if(a)return a(i,!0);throw(t=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",t}e=n[i]={exports:{}},s[i][0].call(e.exports,function(t){return h(s[i][1][t]||t)},e,e.exports,r,s,n,o)}return n[i].exports}for(var a="function"==typeof require&&require,t=0;t>>0):4294967296*(i>>>0)+(t>>>0)}function u(t,i,e){var r=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.floor(Math.log(i)/(7*Math.LN2));e.realloc(r);for(var s=e.pos-1;t<=s;s--)e.buf[s+r]=e.buf[s]}function f(t,i){for(var e=0;e>>8,t[e+2]=i>>>16,t[e+3]=i>>>24}function V(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16)+(t[i+3]<<24)}s.prototype={destroy:function(){this.buf=null},readFields:function(t,i,e){for(e=e||this.length;this.pos>3,n=this.pos;this.type=7&r,t(s,i,this),this.pos===n&&this.skip(r)}return i},readMessage:function(t,i){return this.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){var t=y(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=V(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=y(this.buf,this.pos)+y(this.buf,this.pos+4)*n;return this.pos+=8,t},readSFixed64:function(){var t=y(this.buf,this.pos)+V(this.buf,this.pos+4)*n;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var i=this.buf,e=i[this.pos++],r=127&e;if(e<128)return r;if(r|=(127&(e=i[this.pos++]))<<7,e<128)return r;if(r|=(127&(e=i[this.pos++]))<<14,e<128)return r;if(r|=(127&(e=i[this.pos++]))<<21,e<128)return r;var s,n,e=r|=(15&i[this.pos])<<28,i=t,r=this,t=r.buf;if(n=t[r.pos++],s=(112&n)>>4,n<128)return a(e,s,i);if(n=t[r.pos++],s|=(127&n)<<3,n<128)return a(e,s,i);if(n=t[r.pos++],s|=(127&n)<<10,n<128)return a(e,s,i);if(n=t[r.pos++],s|=(127&n)<<17,n<128)return a(e,s,i);if(n=t[r.pos++],s|=(127&n)<<24,n<128)return a(e,s,i);if(n=t[r.pos++],s|=(1&n)<<31,n<128)return a(e,s,i);throw new Error("Expected varint not more than 10 bytes")},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,i=this.pos;if(12<=(this.pos=t)-i&&l)return e=this.buf,l.decode(e.subarray(i,t));for(var e,r,s,n,o=this.buf,h=t,a="",u=i;u>>10&1023|55296),d=56320|1023&d),a+=String.fromCharCode(d),u+=p}return a},readBytes:function(){var t=this.readVarint()+this.pos,i=this.buf.subarray(this.pos,t);return this.pos=t,i},readPackedVarint:function(t,i){if(this.type!==s.Bytes)return t.push(this.readVarint(i));var e=h(this);for(t=t||[];this.pos>>=7,r.buf[r.pos++]=127&i|128,i>>>=7,r.buf[r.pos++]=127&i|128,i>>>=7,r.buf[r.pos++]=127&i|128,i>>>=7,r.buf[r.pos]=127&i,s),s=e,e=(7&i)<<4;s.buf[s.pos++]|=e|((i>>>=3)?128:0),i&&(s.buf[s.pos++]=127&i|((i>>>=7)?128:0),i)&&(s.buf[s.pos++]=127&i|((i>>>=7)?128:0),i)&&(s.buf[s.pos++]=127&i|((i>>>=7)?128:0),i)&&(s.buf[s.pos++]=127&i|((i>>>=7)?128:0),i)&&(s.buf[s.pos++]=127&i)}else this.realloc(4),this.buf[this.pos++]=127&t|(127>>=7)|(127>>=7)|(127>>7&127)},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var i=this.pos,t=(this.pos=function(t,i,e){for(var r,s,n=0;n>6|192:(r<65536?t[e++]=r>>12|224:(t[e++]=r>>18|240,t[e++]=r>>12&63|128),t[e++]=r>>6&63|128),t[e++]=63&r|128)}return e}(this.buf,t,this.pos),this.pos-i);128<=t&&u(i,t,this),this.pos=i-1,this.writeVarint(t),this.pos+=t},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var i=t.length;this.writeVarint(i),this.realloc(i);for(var e=0;e>1,f=-7,d=e?s-1:0,p=e?-1:1,s=t[i+d];for(d+=p,n=s&(1<<-f)-1,s>>=-f,f+=h;0>=-f,f+=r;0>1,d=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:n-1,l=r?1:-1,n=i<0||0===i&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(h=isNaN(i)?1:0,o=u):(o=Math.floor(Math.log(i)/Math.LN2),i*(r=Math.pow(2,-o))<1&&(o--,r*=2),2<=(i+=1<=o+f?d/r:d*Math.pow(2,1-f))*r&&(o++,r/=2),u<=o+f?(h=0,o=u):1<=o+f?(h=(i*r-1)*Math.pow(2,s),o+=f):(h=i*Math.pow(2,f-1)*Math.pow(2,s),o=0));8<=s;t[e+p]=255&h,p+=l,h/=256,s-=8);for(o=o<