web-dc-api 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4014,6 +4014,7 @@ interface IDatabaseOperations {
4014
4014
  * @returns 错误信息或null表示成功
4015
4015
  */
4016
4016
  syncDBToDC(tId: string): Promise<Error | null>;
4017
+ autoExpandDBSpace(threadId: string, expandSpace: number): Promise<boolean>;
4017
4018
  /**
4018
4019
  * 获取数据库信息
4019
4020
  * @param id threaddbID
@@ -27650,6 +27651,25 @@ declare class DBManager {
27650
27651
  getDB(id: ThreadID, opts?: ManagedOptions): Promise<DB>;
27651
27652
  getDBInfo(id: ThreadID, opts?: ManagedOptions): Promise<[IDBInfo | null, Error | null]>;
27652
27653
  deleteDB(id: ThreadID, deleteThreadFlag: boolean, opts?: ManagedOptions): Promise<void>;
27654
+ /**
27655
+ * 为指定的threaddb添加可使用空间
27656
+ * Add usable space to a specified threaddb
27657
+ * @param threadid Thread ID string
27658
+ * @param space Space to add (uint32)
27659
+ * @returns Promise that resolves when space is added
27660
+ */
27661
+ addDBSpace(threadid: string, space: number): Promise<void>;
27662
+ /**
27663
+ * 获取当前threaddb已经使用的存储大小
27664
+ * Get the current storage size info of threaddb
27665
+ * @param threadid Thread ID string
27666
+ * @returns Promise resolving to object with allocatedSize and usedSize
27667
+ */
27668
+ getThreadDBSizeInfo(threadid: string): Promise<{
27669
+ allocatedSize: number;
27670
+ usedSize: number;
27671
+ }>;
27672
+ autoExpandDBSpace(threadId: string, expandSpace?: number): Promise<boolean>;
27653
27673
  private deleteThreadNamespace;
27654
27674
  /**********************数据库数据操作相关**********************/
27655
27675
  /**
@@ -28289,6 +28309,7 @@ declare class DatabaseModule implements DCModule, IDatabaseOperations {
28289
28309
  * @returns 错误信息或null
28290
28310
  */
28291
28311
  syncDBToDC(tId: string): Promise<Error | null>;
28312
+ autoExpandDBSpace(threadId: string, expandSpace?: number): Promise<boolean>;
28292
28313
  /**
28293
28314
  * 升级集合结构
28294
28315
  * @param threadId 线程ID
@@ -28859,6 +28880,7 @@ declare class DC implements DCContext {
28859
28880
  */
28860
28881
  initUserDB(collections: ICollectionConfig[], verno?: number, //版本编码,当版本编码变化时,需要重构表结构
28861
28882
  reset?: boolean): Promise<[IDBInfo | null, Error | null]>;
28883
+ private autoExpandDBSpace;
28862
28884
  private setUserDefaultDB;
28863
28885
  private checkSetUserDefaultDB;
28864
28886
  /**
@@ -29169,7 +29191,7 @@ declare class KeyManager {
29169
29191
  static generateMnemonic(strength?: 128 | 256): string;
29170
29192
  static validateMnemonic(mnemonic: string): boolean;
29171
29193
  static getMasterKeyFromMnemonic(mnemonic: string, password?: string): Promise<HDKey>;
29172
- static deriveKey(mnemonic: string, path?: string, // 以太坊路径
29194
+ static deriveKey(mnemonic: string, path?: string, // 以太坊路径
29173
29195
  password?: string): Promise<{
29174
29196
  privateKey: Uint8Array;
29175
29197
  publicKey: Uint8Array;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "web-dc-api",
3
- "version": "0.1.21",
4
- "description": "web相关的dcapi",
3
+ "version": "0.1.23",
4
+ "description": "一个革命性的去中心化 Web 开发 SDK,让您无需任何服务器即可构建完整的互联网应用",
5
5
  "type": "module",
6
6
  "browser": "dist/dc.min.js",
7
7
  "main": "dist/cjs/index.js",
@@ -106,4 +106,8 @@
106
106
  "vite-plugin-dts": "^4.5.4",
107
107
  "webpack-bundle-analyzer": "^4.10.2"
108
108
  }
109
+ ,
110
+ "optionalDependencies": {
111
+ "@rollup/rollup-linux-x64-gnu": "4.54.0"
112
+ }
109
113
  }
@@ -1 +0,0 @@
1
- "use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function getDefaultExportFromNamespaceIfNotNamed(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")&&1===Object.keys(t).length?t.default:t}var indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;return hasRequiredAspromise=1,aspromise=function(t,e){var r=new Array(arguments.length-1),i=0,n=2,o=!0;for(;n<arguments.length;)r[i++]=arguments[n++];return new Promise((function(n,u){r[i]=function(t){if(o)if(o=!1,t)u(t);else{for(var e=new Array(arguments.length-1),r=0;r<e.length;)e[r++]=arguments[r];n.apply(null,e)}};try{t.apply(e||null,r)}catch(t){o&&(o=!1,u(t))}}))},aspromise}var base64={},hasRequiredBase64,eventemitter,hasRequiredEventemitter,float,hasRequiredFloat,inquire_1,hasRequiredInquire;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(t){var e=t;e.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 r=new Array(64),i=new Array(123),n=0;n<64;)i[r[n]=n<26?n+65:n<52?n+71:n<62?n-4:n-59|43]=n++;e.encode=function(t,e,i){for(var n,o=null,u=[],s=0,f=0;e<i;){var a=t[e++];switch(f){case 0:u[s++]=r[a>>2],n=(3&a)<<4,f=1;break;case 1:u[s++]=r[n|a>>4],n=(15&a)<<2,f=2;break;case 2:u[s++]=r[n|a>>6],u[s++]=r[63&a],f=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,u)),s=0)}return f&&(u[s++]=r[n],u[s++]=61,1===f&&(u[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,u.slice(0,s))),o.join("")):String.fromCharCode.apply(String,u.slice(0,s))};var o="invalid encoding";e.decode=function(t,e,r){for(var n,u=r,s=0,f=0;f<t.length;){var a=t.charCodeAt(f++);if(61===a&&s>1)break;if(void 0===(a=i[a]))throw Error(o);switch(s){case 0:n=a,s=1;break;case 1:e[r++]=n<<2|(48&a)>>4,n=a,s=2;break;case 2:e[r++]=(15&n)<<4|(60&a)>>2,n=a,s=3;break;case 3:e[r++]=(3&n)<<6|a,s=0}}if(1===s)throw Error(o);return r-u},e.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}}(base64)),base64}function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;function t(){this._listeners={}}return hasRequiredEventemitter=1,eventemitter=t,t.prototype.on=function(t,e,r){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:r||this}),this},t.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var r=this._listeners[t],i=0;i<r.length;)r[i].fn===e?r.splice(i,1):++i;return this},t.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<e.length;)e[i].fn.apply(e[i++].ctx,r)}return this},eventemitter}function requireFloat(){if(hasRequiredFloat)return float;function t(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),i=128===r[3];function n(t,i,n){e[0]=t,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3]}function o(t,i,n){e[0]=t,i[n]=r[3],i[n+1]=r[2],i[n+2]=r[1],i[n+3]=r[0]}function u(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],e[0]}function s(t,i){return r[3]=t[i],r[2]=t[i+1],r[1]=t[i+2],r[0]=t[i+3],e[0]}t.writeFloatLE=i?n:o,t.writeFloatBE=i?o:n,t.readFloatLE=i?u:s,t.readFloatBE=i?s:u}():function(){function o(t,e,r,i){var n=e<0?1:0;if(n&&(e=-e),0===e)t(1/e>0?0:2147483648,r,i);else if(isNaN(e))t(2143289344,r,i);else if(e>34028234663852886e22)t((n<<31|2139095040)>>>0,r,i);else if(e<11754943508222875e-54)t((n<<31|Math.round(e/1401298464324817e-60))>>>0,r,i);else{var o=Math.floor(Math.log(e)/Math.LN2);t((n<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,r,i)}}function u(t,e,r){var i=t(e,r),n=2*(i>>31)+1,o=i>>>23&255,u=8388607&i;return 255===o?u?NaN:n*(1/0):0===o?1401298464324817e-60*n*u:n*Math.pow(2,o-150)*(u+8388608)}t.writeFloatLE=o.bind(null,e),t.writeFloatBE=o.bind(null,r),t.readFloatLE=u.bind(null,i),t.readFloatBE=u.bind(null,n)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),i=128===r[7];function n(t,i,n){e[0]=t,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3],i[n+4]=r[4],i[n+5]=r[5],i[n+6]=r[6],i[n+7]=r[7]}function o(t,i,n){e[0]=t,i[n]=r[7],i[n+1]=r[6],i[n+2]=r[5],i[n+3]=r[4],i[n+4]=r[3],i[n+5]=r[2],i[n+6]=r[1],i[n+7]=r[0]}function u(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],r[4]=t[i+4],r[5]=t[i+5],r[6]=t[i+6],r[7]=t[i+7],e[0]}function s(t,i){return r[7]=t[i],r[6]=t[i+1],r[5]=t[i+2],r[4]=t[i+3],r[3]=t[i+4],r[2]=t[i+5],r[1]=t[i+6],r[0]=t[i+7],e[0]}t.writeDoubleLE=i?n:o,t.writeDoubleBE=i?o:n,t.readDoubleLE=i?u:s,t.readDoubleBE=i?s:u}():function(){function o(t,e,r,i,n,o){var u=i<0?1:0;if(u&&(i=-i),0===i)t(0,n,o+e),t(1/i>0?0:2147483648,n,o+r);else if(isNaN(i))t(0,n,o+e),t(2146959360,n,o+r);else if(i>17976931348623157e292)t(0,n,o+e),t((u<<31|2146435072)>>>0,n,o+r);else{var s;if(i<22250738585072014e-324)t((s=i/5e-324)>>>0,n,o+e),t((u<<31|s/4294967296)>>>0,n,o+r);else{var f=Math.floor(Math.log(i)/Math.LN2);1024===f&&(f=1023),t(4503599627370496*(s=i*Math.pow(2,-f))>>>0,n,o+e),t((u<<31|f+1023<<20|1048576*s&1048575)>>>0,n,o+r)}}}function u(t,e,r,i,n){var o=t(i,n+e),u=t(i,n+r),s=2*(u>>31)+1,f=u>>>20&2047,a=4294967296*(1048575&u)+o;return 2047===f?a?NaN:s*(1/0):0===f?5e-324*s*a:s*Math.pow(2,f-1075)*(a+4503599627370496)}t.writeDoubleLE=o.bind(null,e,0,4),t.writeDoubleBE=o.bind(null,r,4,0),t.readDoubleLE=u.bind(null,i,0,4),t.readDoubleBE=u.bind(null,n,4,0)}(),t}function e(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 r(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 i(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function n(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}return hasRequiredFloat=1,float=t(t)}function requireInquire(){if(hasRequiredInquire)return inquire_1;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}return hasRequiredInquire=1,inquire_1=inquire,inquire_1}var utf8={},hasRequiredUtf8,pool_1,hasRequiredPool,longbits,hasRequiredLongbits,hasRequiredMinimal$1,writer,hasRequiredWriter,writer_buffer,hasRequiredWriter_buffer,reader,hasRequiredReader,reader_buffer,hasRequiredReader_buffer;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(t){var e=t;e.length=function(t){for(var e=0,r=0,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e+=1:r<2048?e+=2:55296==(64512&r)&&56320==(64512&t.charCodeAt(i+1))?(++i,e+=4):e+=3;return e},e.read=function(t,e,r){if(r-e<1)return"";for(var i,n=null,o=[],u=0;e<r;)(i=t[e++])<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&t[e++]:i>239&&i<365?(i=((7&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&t[e++])<<6|63&t[e++],u>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,o)),u=0);return n?(u&&n.push(String.fromCharCode.apply(String,o.slice(0,u))),n.join("")):String.fromCharCode.apply(String,o.slice(0,u))},e.write=function(t,e,r){for(var i,n,o=r,u=0;u<t.length;++u)(i=t.charCodeAt(u))<128?e[r++]=i:i<2048?(e[r++]=i>>6|192,e[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=t.charCodeAt(u+1)))?(i=65536+((1023&i)<<10)+(1023&n),++u,e[r++]=i>>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=63&i|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=63&i|128);return r-o}}(utf8)),utf8}function requirePool(){if(hasRequiredPool)return pool_1;return hasRequiredPool=1,pool_1=function(t,e,r){var i=r||8192,n=i>>>1,o=null,u=i;return function(r){if(r<1||r>n)return t(r);u+r>i&&(o=t(i),u=0);var s=e.call(o,u,u+=r);return 7&u&&(u=1+(7|u)),s}}}function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=e;var t=requireMinimal$1();function e(t,e){this.lo=t>>>0,this.hi=e>>>0}var r=e.zero=new e(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=e.zeroHash="\0\0\0\0\0\0\0\0";e.fromNumber=function(t){if(0===t)return r;var i=t<0;i&&(t=-t);var n=t>>>0,o=(t-n)/4294967296>>>0;return i&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new e(n,o)},e.from=function(i){if("number"==typeof i)return e.fromNumber(i);if(t.isString(i)){if(!t.Long)return e.fromNumber(parseInt(i,10));i=t.Long.fromString(i)}return i.low||i.high?new e(i.low>>>0,i.high>>>0):r},e.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},e.prototype.toLong=function(e){return t.Long?new t.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var n=String.prototype.charCodeAt;return e.fromHash=function(t){return t===i?r:new e((n.call(t,0)|n.call(t,1)<<8|n.call(t,2)<<16|n.call(t,3)<<24)>>>0,(n.call(t,4)|n.call(t,5)<<8|n.call(t,6)<<16|n.call(t,7)<<24)>>>0)},e.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)},e.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},e.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},e.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},longbits}function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,function(){var t=minimal$1;function e(t,e,r){for(var i=Object.keys(e),n=0;n<i.length;++n)void 0!==t[i[n]]&&r||(t[i[n]]=e[i[n]]);return t}function r(t){function r(t,i){if(!(this instanceof r))return new r(t,i);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&e(this,i)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}t.asPromise=requireAspromise(),t.base64=requireBase64(),t.EventEmitter=requireEventemitter(),t.float=requireFloat(),t.inquire=requireInquire(),t.utf8=requireUtf8(),t.pool=requirePool(),t.LongBits=requireLongbits(),t.isNode=Boolean(void 0!==commonjsGlobal&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),t.global=t.isNode&&commonjsGlobal||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||minimal$1,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},t.isString=function(t){return"string"==typeof t||t instanceof String},t.isObject=function(t){return t&&"object"==typeof t},t.isset=t.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)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var i=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(i.lo,i.hi,r):i.toNumber(Boolean(r))},t.merge=e,t.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},t.newError=r,t.ProtocolError=r("ProtocolError"),t.oneOfGetter=function(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=1;return function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(1===e[t[r]]&&void 0!==this[t[r]]&&null!==this[t[r]])return t[r]}},t.oneOfSetter=function(t){return function(e){for(var r=0;r<t.length;++r)t[r]!==e&&delete this[t[r]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var e=t.Buffer;e?(t._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},t._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):t._Buffer_from=t._Buffer_allocUnsafe=null}}()),minimal$1}function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=f;var t,e=requireMinimal$1(),r=e.LongBits,i=e.base64,n=e.utf8;function o(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function u(){}function s(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function f(){this.len=0,this.head=new o(u,0,0),this.tail=this.head,this.states=null}var a=function(){return e.Buffer?function(){return(f.create=function(){return new t})()}:function(){return new f}};function h(t,e,r){e[r]=255&t}function l(t,e){this.len=t,this.next=void 0,this.val=e}function c(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}f.create=a(),f.alloc=function(t){return new e.Array(t)},e.Array!==Array&&(f.alloc=e.pool(f.alloc,e.Array.prototype.subarray)),f.prototype._push=function(t,e,r){return this.tail=this.tail.next=new o(t,e,r),this.len+=e,this},l.prototype=Object.create(o.prototype),l.prototype.fn=function(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t},f.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new l((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},f.prototype.int32=function(t){return t<0?this._push(c,10,r.fromNumber(t)):this.uint32(t)},f.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},f.prototype.uint64=function(t){var e=r.from(t);return this._push(c,e.length(),e)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(t){var e=r.from(t).zzEncode();return this._push(c,e.length(),e)},f.prototype.bool=function(t){return this._push(h,1,t?1:0)},f.prototype.fixed32=function(t){return this._push(p,4,t>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(t){var e=r.from(t);return this._push(p,4,e.lo)._push(p,4,e.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(t){return this._push(e.float.writeFloatLE,4,t)},f.prototype.double=function(t){return this._push(e.float.writeDoubleLE,8,t)};var d=e.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var i=0;i<t.length;++i)e[r+i]=t[i]};return f.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(h,1,0);if(e.isString(t)){var n=f.alloc(r=i.length(t));i.decode(t,n,0),t=n}return this.uint32(r)._push(d,r,t)},f.prototype.string=function(t){var e=n.length(t);return e?this.uint32(e)._push(n.write,e,t):this._push(h,1,0)},f.prototype.fork=function(){return this.states=new s(this),this.head=this.tail=new o(u,0,0),this.len=0,this},f.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 o(u,0,0),this.len=0),this},f.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},f.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},f._configure=function(e){t=e,f.create=a(),t._configure()},writer}function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=r;var t=requireWriter();(r.prototype=Object.create(t.prototype)).constructor=r;var e=requireMinimal$1();function r(){t.call(this)}function i(t,r,i){t.length<40?e.utf8.write(t,r,i):r.utf8Write?r.utf8Write(t,i):r.write(t,i)}return r._configure=function(){r.alloc=e._Buffer_allocUnsafe,r.writeBytesBuffer=e.Buffer&&e.Buffer.prototype instanceof Uint8Array&&"set"===e.Buffer.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 i=0;i<t.length;)e[r++]=t[i++]}},r.prototype.bytes=function(t){e.isString(t)&&(t=e._Buffer_from(t,"base64"));var i=t.length>>>0;return this.uint32(i),i&&this._push(r.writeBytesBuffer,i,t),this},r.prototype.string=function(t){var r=e.Buffer.byteLength(t);return this.uint32(r),r&&this._push(i,r,t),this},r._configure(),writer_buffer}function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=o;var t,e=requireMinimal$1(),r=e.LongBits,i=e.utf8;function n(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length}var u,s="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new o(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new o(t);throw Error("illegal buffer")},f=function(){return e.Buffer?function(r){return(o.create=function(r){return e.Buffer.isBuffer(r)?new t(r):s(r)})(r)}:s};function a(){var t=new r(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw n(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 n(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 h(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function l(){if(this.pos+8>this.len)throw n(this,8);return new r(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}return o.create=f(),o.prototype._slice=e.Array.prototype.subarray||e.Array.prototype.slice,o.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return u}),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return h(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw n(this,4);return 0|h(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.bytes=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw n(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(r,i);if(r===i){var o=e.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,i)},o.prototype.string=function(){var t=this.bytes();return i.read(t,0,t.length)},o.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw n(this)}while(128&this.buf[this.pos++]);return this},o.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(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},o._configure=function(r){t=r,o.create=f(),t._configure();var i=e.Long?"toLong":"toNumber";e.merge(o.prototype,{int64:function(){return a.call(this)[i](!1)},uint64:function(){return a.call(this)[i](!0)},sint64:function(){return a.call(this).zzDecode()[i](!1)},fixed64:function(){return l.call(this)[i](!0)},sfixed64:function(){return l.call(this)[i](!1)}})},reader}function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=r;var t=requireReader();(r.prototype=Object.create(t.prototype)).constructor=r;var e=requireMinimal$1();function r(e){t.call(this,e)}return r._configure=function(){e.Buffer&&(r.prototype._slice=e.Buffer.prototype.slice)},r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},r._configure(),reader_buffer}var rpc={},service,hasRequiredService,hasRequiredRpc,roots,hasRequiredRoots,hasRequiredIndexMinimal,minimal,hasRequiredMinimal;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=e;var t=requireMinimal$1();function e(e,r,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");t.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(r),this.responseDelimited=Boolean(i)}return(e.prototype=Object.create(t.EventEmitter.prototype)).constructor=e,e.prototype.rpcCall=function e(r,i,n,o,u){if(!o)throw TypeError("request must be specified");var s=this;if(!u)return t.asPromise(e,s,r,i,n,o);if(s.rpcImpl)try{return s.rpcImpl(r,i[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(t,e){if(t)return s.emit("error",t,r),u(t);if(null!==e){if(!(e instanceof n))try{e=n[s.responseDelimited?"decodeDelimited":"decode"](e)}catch(t){return s.emit("error",t,r),u(t)}return s.emit("data",e,r),u(null,e)}s.end(!0)}))}catch(t){return s.emit("error",t,r),void setTimeout((function(){u(t)}),0)}else setTimeout((function(){u(Error("already ended"))}),0)},e.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service}function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,function(t){t.Service=requireService()}(rpc)),rpc}function requireRoots(){return hasRequiredRoots?roots:(hasRequiredRoots=1,roots={})}function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,function(){var t=indexMinimal;function e(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=requireWriter(),t.BufferWriter=requireWriter_buffer(),t.Reader=requireReader(),t.BufferReader=requireReader_buffer(),t.util=requireMinimal$1(),t.rpc=requireRpc(),t.roots=requireRoots(),t.configure=e,e()}()),indexMinimal}function requireMinimal(){return hasRequiredMinimal?minimal:(hasRequiredMinimal=1,minimal=requireIndexMinimal())}var minimalExports=requireMinimal();exports.commonjsGlobal=commonjsGlobal,exports.getDefaultExportFromCjs=getDefaultExportFromCjs,exports.getDefaultExportFromNamespaceIfNotNamed=getDefaultExportFromNamespaceIfNotNamed,exports.minimalExports=minimalExports;
@@ -1 +0,0 @@
1
- var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function getDefaultExportFromNamespaceIfNotNamed(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")&&1===Object.keys(t).length?t.default:t}var indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;return hasRequiredAspromise=1,aspromise=function(t,e){var r=new Array(arguments.length-1),i=0,n=2,o=!0;for(;n<arguments.length;)r[i++]=arguments[n++];return new Promise((function(n,u){r[i]=function(t){if(o)if(o=!1,t)u(t);else{for(var e=new Array(arguments.length-1),r=0;r<e.length;)e[r++]=arguments[r];n.apply(null,e)}};try{t.apply(e||null,r)}catch(t){o&&(o=!1,u(t))}}))},aspromise}var base64={},hasRequiredBase64,eventemitter,hasRequiredEventemitter,float,hasRequiredFloat,inquire_1,hasRequiredInquire;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(t){var e=t;e.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 r=new Array(64),i=new Array(123),n=0;n<64;)i[r[n]=n<26?n+65:n<52?n+71:n<62?n-4:n-59|43]=n++;e.encode=function(t,e,i){for(var n,o=null,u=[],s=0,f=0;e<i;){var a=t[e++];switch(f){case 0:u[s++]=r[a>>2],n=(3&a)<<4,f=1;break;case 1:u[s++]=r[n|a>>4],n=(15&a)<<2,f=2;break;case 2:u[s++]=r[n|a>>6],u[s++]=r[63&a],f=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,u)),s=0)}return f&&(u[s++]=r[n],u[s++]=61,1===f&&(u[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,u.slice(0,s))),o.join("")):String.fromCharCode.apply(String,u.slice(0,s))};var o="invalid encoding";e.decode=function(t,e,r){for(var n,u=r,s=0,f=0;f<t.length;){var a=t.charCodeAt(f++);if(61===a&&s>1)break;if(void 0===(a=i[a]))throw Error(o);switch(s){case 0:n=a,s=1;break;case 1:e[r++]=n<<2|(48&a)>>4,n=a,s=2;break;case 2:e[r++]=(15&n)<<4|(60&a)>>2,n=a,s=3;break;case 3:e[r++]=(3&n)<<6|a,s=0}}if(1===s)throw Error(o);return r-u},e.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}}(base64)),base64}function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;function t(){this._listeners={}}return hasRequiredEventemitter=1,eventemitter=t,t.prototype.on=function(t,e,r){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:r||this}),this},t.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var r=this._listeners[t],i=0;i<r.length;)r[i].fn===e?r.splice(i,1):++i;return this},t.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<e.length;)e[i].fn.apply(e[i++].ctx,r)}return this},eventemitter}function requireFloat(){if(hasRequiredFloat)return float;function t(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),i=128===r[3];function n(t,i,n){e[0]=t,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3]}function o(t,i,n){e[0]=t,i[n]=r[3],i[n+1]=r[2],i[n+2]=r[1],i[n+3]=r[0]}function u(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],e[0]}function s(t,i){return r[3]=t[i],r[2]=t[i+1],r[1]=t[i+2],r[0]=t[i+3],e[0]}t.writeFloatLE=i?n:o,t.writeFloatBE=i?o:n,t.readFloatLE=i?u:s,t.readFloatBE=i?s:u}():function(){function o(t,e,r,i){var n=e<0?1:0;if(n&&(e=-e),0===e)t(1/e>0?0:2147483648,r,i);else if(isNaN(e))t(2143289344,r,i);else if(e>34028234663852886e22)t((n<<31|2139095040)>>>0,r,i);else if(e<11754943508222875e-54)t((n<<31|Math.round(e/1401298464324817e-60))>>>0,r,i);else{var o=Math.floor(Math.log(e)/Math.LN2);t((n<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,r,i)}}function u(t,e,r){var i=t(e,r),n=2*(i>>31)+1,o=i>>>23&255,u=8388607&i;return 255===o?u?NaN:n*(1/0):0===o?1401298464324817e-60*n*u:n*Math.pow(2,o-150)*(u+8388608)}t.writeFloatLE=o.bind(null,e),t.writeFloatBE=o.bind(null,r),t.readFloatLE=u.bind(null,i),t.readFloatBE=u.bind(null,n)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),i=128===r[7];function n(t,i,n){e[0]=t,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3],i[n+4]=r[4],i[n+5]=r[5],i[n+6]=r[6],i[n+7]=r[7]}function o(t,i,n){e[0]=t,i[n]=r[7],i[n+1]=r[6],i[n+2]=r[5],i[n+3]=r[4],i[n+4]=r[3],i[n+5]=r[2],i[n+6]=r[1],i[n+7]=r[0]}function u(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],r[4]=t[i+4],r[5]=t[i+5],r[6]=t[i+6],r[7]=t[i+7],e[0]}function s(t,i){return r[7]=t[i],r[6]=t[i+1],r[5]=t[i+2],r[4]=t[i+3],r[3]=t[i+4],r[2]=t[i+5],r[1]=t[i+6],r[0]=t[i+7],e[0]}t.writeDoubleLE=i?n:o,t.writeDoubleBE=i?o:n,t.readDoubleLE=i?u:s,t.readDoubleBE=i?s:u}():function(){function o(t,e,r,i,n,o){var u=i<0?1:0;if(u&&(i=-i),0===i)t(0,n,o+e),t(1/i>0?0:2147483648,n,o+r);else if(isNaN(i))t(0,n,o+e),t(2146959360,n,o+r);else if(i>17976931348623157e292)t(0,n,o+e),t((u<<31|2146435072)>>>0,n,o+r);else{var s;if(i<22250738585072014e-324)t((s=i/5e-324)>>>0,n,o+e),t((u<<31|s/4294967296)>>>0,n,o+r);else{var f=Math.floor(Math.log(i)/Math.LN2);1024===f&&(f=1023),t(4503599627370496*(s=i*Math.pow(2,-f))>>>0,n,o+e),t((u<<31|f+1023<<20|1048576*s&1048575)>>>0,n,o+r)}}}function u(t,e,r,i,n){var o=t(i,n+e),u=t(i,n+r),s=2*(u>>31)+1,f=u>>>20&2047,a=4294967296*(1048575&u)+o;return 2047===f?a?NaN:s*(1/0):0===f?5e-324*s*a:s*Math.pow(2,f-1075)*(a+4503599627370496)}t.writeDoubleLE=o.bind(null,e,0,4),t.writeDoubleBE=o.bind(null,r,4,0),t.readDoubleLE=u.bind(null,i,0,4),t.readDoubleBE=u.bind(null,n,4,0)}(),t}function e(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 r(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 i(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function n(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}return hasRequiredFloat=1,float=t(t)}function requireInquire(){if(hasRequiredInquire)return inquire_1;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}return hasRequiredInquire=1,inquire_1=inquire,inquire_1}var utf8={},hasRequiredUtf8,pool_1,hasRequiredPool,longbits,hasRequiredLongbits,hasRequiredMinimal$1,writer,hasRequiredWriter,writer_buffer,hasRequiredWriter_buffer,reader,hasRequiredReader,reader_buffer,hasRequiredReader_buffer;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(t){var e=t;e.length=function(t){for(var e=0,r=0,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e+=1:r<2048?e+=2:55296==(64512&r)&&56320==(64512&t.charCodeAt(i+1))?(++i,e+=4):e+=3;return e},e.read=function(t,e,r){if(r-e<1)return"";for(var i,n=null,o=[],u=0;e<r;)(i=t[e++])<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&t[e++]:i>239&&i<365?(i=((7&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&t[e++])<<6|63&t[e++],u>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,o)),u=0);return n?(u&&n.push(String.fromCharCode.apply(String,o.slice(0,u))),n.join("")):String.fromCharCode.apply(String,o.slice(0,u))},e.write=function(t,e,r){for(var i,n,o=r,u=0;u<t.length;++u)(i=t.charCodeAt(u))<128?e[r++]=i:i<2048?(e[r++]=i>>6|192,e[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=t.charCodeAt(u+1)))?(i=65536+((1023&i)<<10)+(1023&n),++u,e[r++]=i>>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=63&i|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=63&i|128);return r-o}}(utf8)),utf8}function requirePool(){if(hasRequiredPool)return pool_1;return hasRequiredPool=1,pool_1=function(t,e,r){var i=r||8192,n=i>>>1,o=null,u=i;return function(r){if(r<1||r>n)return t(r);u+r>i&&(o=t(i),u=0);var s=e.call(o,u,u+=r);return 7&u&&(u=1+(7|u)),s}}}function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=e;var t=requireMinimal$1();function e(t,e){this.lo=t>>>0,this.hi=e>>>0}var r=e.zero=new e(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=e.zeroHash="\0\0\0\0\0\0\0\0";e.fromNumber=function(t){if(0===t)return r;var i=t<0;i&&(t=-t);var n=t>>>0,o=(t-n)/4294967296>>>0;return i&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new e(n,o)},e.from=function(i){if("number"==typeof i)return e.fromNumber(i);if(t.isString(i)){if(!t.Long)return e.fromNumber(parseInt(i,10));i=t.Long.fromString(i)}return i.low||i.high?new e(i.low>>>0,i.high>>>0):r},e.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},e.prototype.toLong=function(e){return t.Long?new t.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var n=String.prototype.charCodeAt;return e.fromHash=function(t){return t===i?r:new e((n.call(t,0)|n.call(t,1)<<8|n.call(t,2)<<16|n.call(t,3)<<24)>>>0,(n.call(t,4)|n.call(t,5)<<8|n.call(t,6)<<16|n.call(t,7)<<24)>>>0)},e.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)},e.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},e.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},e.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},longbits}function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,function(){var t=minimal$1;function e(t,e,r){for(var i=Object.keys(e),n=0;n<i.length;++n)void 0!==t[i[n]]&&r||(t[i[n]]=e[i[n]]);return t}function r(t){function r(t,i){if(!(this instanceof r))return new r(t,i);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&e(this,i)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}t.asPromise=requireAspromise(),t.base64=requireBase64(),t.EventEmitter=requireEventemitter(),t.float=requireFloat(),t.inquire=requireInquire(),t.utf8=requireUtf8(),t.pool=requirePool(),t.LongBits=requireLongbits(),t.isNode=Boolean(void 0!==commonjsGlobal&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),t.global=t.isNode&&commonjsGlobal||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||minimal$1,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},t.isString=function(t){return"string"==typeof t||t instanceof String},t.isObject=function(t){return t&&"object"==typeof t},t.isset=t.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)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var i=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(i.lo,i.hi,r):i.toNumber(Boolean(r))},t.merge=e,t.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},t.newError=r,t.ProtocolError=r("ProtocolError"),t.oneOfGetter=function(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=1;return function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(1===e[t[r]]&&void 0!==this[t[r]]&&null!==this[t[r]])return t[r]}},t.oneOfSetter=function(t){return function(e){for(var r=0;r<t.length;++r)t[r]!==e&&delete this[t[r]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var e=t.Buffer;e?(t._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},t._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):t._Buffer_from=t._Buffer_allocUnsafe=null}}()),minimal$1}function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=f;var t,e=requireMinimal$1(),r=e.LongBits,i=e.base64,n=e.utf8;function o(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function u(){}function s(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function f(){this.len=0,this.head=new o(u,0,0),this.tail=this.head,this.states=null}var a=function(){return e.Buffer?function(){return(f.create=function(){return new t})()}:function(){return new f}};function h(t,e,r){e[r]=255&t}function l(t,e){this.len=t,this.next=void 0,this.val=e}function c(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}f.create=a(),f.alloc=function(t){return new e.Array(t)},e.Array!==Array&&(f.alloc=e.pool(f.alloc,e.Array.prototype.subarray)),f.prototype._push=function(t,e,r){return this.tail=this.tail.next=new o(t,e,r),this.len+=e,this},l.prototype=Object.create(o.prototype),l.prototype.fn=function(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t},f.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new l((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},f.prototype.int32=function(t){return t<0?this._push(c,10,r.fromNumber(t)):this.uint32(t)},f.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},f.prototype.uint64=function(t){var e=r.from(t);return this._push(c,e.length(),e)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(t){var e=r.from(t).zzEncode();return this._push(c,e.length(),e)},f.prototype.bool=function(t){return this._push(h,1,t?1:0)},f.prototype.fixed32=function(t){return this._push(p,4,t>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(t){var e=r.from(t);return this._push(p,4,e.lo)._push(p,4,e.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(t){return this._push(e.float.writeFloatLE,4,t)},f.prototype.double=function(t){return this._push(e.float.writeDoubleLE,8,t)};var d=e.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var i=0;i<t.length;++i)e[r+i]=t[i]};return f.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(h,1,0);if(e.isString(t)){var n=f.alloc(r=i.length(t));i.decode(t,n,0),t=n}return this.uint32(r)._push(d,r,t)},f.prototype.string=function(t){var e=n.length(t);return e?this.uint32(e)._push(n.write,e,t):this._push(h,1,0)},f.prototype.fork=function(){return this.states=new s(this),this.head=this.tail=new o(u,0,0),this.len=0,this},f.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 o(u,0,0),this.len=0),this},f.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},f.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},f._configure=function(e){t=e,f.create=a(),t._configure()},writer}function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=r;var t=requireWriter();(r.prototype=Object.create(t.prototype)).constructor=r;var e=requireMinimal$1();function r(){t.call(this)}function i(t,r,i){t.length<40?e.utf8.write(t,r,i):r.utf8Write?r.utf8Write(t,i):r.write(t,i)}return r._configure=function(){r.alloc=e._Buffer_allocUnsafe,r.writeBytesBuffer=e.Buffer&&e.Buffer.prototype instanceof Uint8Array&&"set"===e.Buffer.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 i=0;i<t.length;)e[r++]=t[i++]}},r.prototype.bytes=function(t){e.isString(t)&&(t=e._Buffer_from(t,"base64"));var i=t.length>>>0;return this.uint32(i),i&&this._push(r.writeBytesBuffer,i,t),this},r.prototype.string=function(t){var r=e.Buffer.byteLength(t);return this.uint32(r),r&&this._push(i,r,t),this},r._configure(),writer_buffer}function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=o;var t,e=requireMinimal$1(),r=e.LongBits,i=e.utf8;function n(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length}var u,s="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new o(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new o(t);throw Error("illegal buffer")},f=function(){return e.Buffer?function(r){return(o.create=function(r){return e.Buffer.isBuffer(r)?new t(r):s(r)})(r)}:s};function a(){var t=new r(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw n(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 n(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 h(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function l(){if(this.pos+8>this.len)throw n(this,8);return new r(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}return o.create=f(),o.prototype._slice=e.Array.prototype.subarray||e.Array.prototype.slice,o.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return u}),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return h(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw n(this,4);return 0|h(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.bytes=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw n(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(r,i);if(r===i){var o=e.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,i)},o.prototype.string=function(){var t=this.bytes();return i.read(t,0,t.length)},o.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw n(this)}while(128&this.buf[this.pos++]);return this},o.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(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},o._configure=function(r){t=r,o.create=f(),t._configure();var i=e.Long?"toLong":"toNumber";e.merge(o.prototype,{int64:function(){return a.call(this)[i](!1)},uint64:function(){return a.call(this)[i](!0)},sint64:function(){return a.call(this).zzDecode()[i](!1)},fixed64:function(){return l.call(this)[i](!0)},sfixed64:function(){return l.call(this)[i](!1)}})},reader}function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=r;var t=requireReader();(r.prototype=Object.create(t.prototype)).constructor=r;var e=requireMinimal$1();function r(e){t.call(this,e)}return r._configure=function(){e.Buffer&&(r.prototype._slice=e.Buffer.prototype.slice)},r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},r._configure(),reader_buffer}var rpc={},service,hasRequiredService,hasRequiredRpc,roots,hasRequiredRoots,hasRequiredIndexMinimal,minimal,hasRequiredMinimal;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=e;var t=requireMinimal$1();function e(e,r,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");t.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(r),this.responseDelimited=Boolean(i)}return(e.prototype=Object.create(t.EventEmitter.prototype)).constructor=e,e.prototype.rpcCall=function e(r,i,n,o,u){if(!o)throw TypeError("request must be specified");var s=this;if(!u)return t.asPromise(e,s,r,i,n,o);if(s.rpcImpl)try{return s.rpcImpl(r,i[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(t,e){if(t)return s.emit("error",t,r),u(t);if(null!==e){if(!(e instanceof n))try{e=n[s.responseDelimited?"decodeDelimited":"decode"](e)}catch(t){return s.emit("error",t,r),u(t)}return s.emit("data",e,r),u(null,e)}s.end(!0)}))}catch(t){return s.emit("error",t,r),void setTimeout((function(){u(t)}),0)}else setTimeout((function(){u(Error("already ended"))}),0)},e.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service}function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,rpc.Service=requireService()),rpc}function requireRoots(){return hasRequiredRoots?roots:(hasRequiredRoots=1,roots={})}function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,function(){var t=indexMinimal;function e(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=requireWriter(),t.BufferWriter=requireWriter_buffer(),t.Reader=requireReader(),t.BufferReader=requireReader_buffer(),t.util=requireMinimal$1(),t.rpc=requireRpc(),t.roots=requireRoots(),t.configure=e,e()}()),indexMinimal}function requireMinimal(){return hasRequiredMinimal?minimal:(hasRequiredMinimal=1,minimal=requireIndexMinimal())}var minimalExports=requireMinimal();export{getDefaultExportFromNamespaceIfNotNamed as a,commonjsGlobal as c,getDefaultExportFromCjs as g,minimalExports as m};