@openhps/protobuf 1.0.0 → 1.0.2
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/cjs/ProtobufSerializer.js +0 -1
- package/dist/cjs/ProtobufSerializer.js.map +1 -1
- package/dist/cjs/generator/ObjectGenerator.js +2 -1
- package/dist/cjs/generator/ObjectGenerator.js.map +1 -1
- package/dist/cjs/generator/ProjectGenerator.js +38 -7
- package/dist/cjs/generator/ProjectGenerator.js.map +1 -1
- package/dist/cjs/generator/constants.js +1 -1
- package/dist/esm/ProtobufSerializer.js +0 -1
- package/dist/esm/ProtobufSerializer.js.map +1 -1
- package/dist/esm/generator/ObjectGenerator.js +2 -1
- package/dist/esm/generator/ObjectGenerator.js.map +1 -1
- package/dist/esm/generator/ProjectGenerator.js +38 -7
- package/dist/esm/generator/ProjectGenerator.js.map +1 -1
- package/dist/esm/generator/constants.js +1 -1
- package/dist/esm5/ProtobufSerializer.js +0 -1
- package/dist/esm5/ProtobufSerializer.js.map +1 -1
- package/dist/esm5/generator/ObjectGenerator.js +2 -1
- package/dist/esm5/generator/ObjectGenerator.js.map +1 -1
- package/dist/esm5/generator/ProjectGenerator.js +38 -7
- package/dist/esm5/generator/ProjectGenerator.js.map +1 -1
- package/dist/esm5/generator/constants.js +1 -1
- package/dist/types/ProtobufSerializer.d.ts.map +1 -1
- package/dist/types/generator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/generator/ProjectGenerator.d.ts +1 -0
- package/dist/types/generator/ProjectGenerator.d.ts.map +1 -1
- package/dist/types/generator/constants.d.ts +1 -1
- package/dist/web/openhps-protobuf.es.js +41 -10
- package/dist/web/openhps-protobuf.es.js.map +1 -1
- package/dist/web/openhps-protobuf.es.min.js +1 -1
- package/dist/web/openhps-protobuf.es.min.js.map +1 -1
- package/dist/web/openhps-protobuf.js +41 -10
- package/dist/web/openhps-protobuf.js.map +1 -1
- package/dist/web/openhps-protobuf.min.js +1 -1
- package/dist/web/openhps-protobuf.min.js.map +1 -1
- package/package.json +1 -1
- package/src/ProtobufSerializer.ts +0 -1
- package/src/generator/ObjectGenerator.ts +2 -1
- package/src/generator/ProjectGenerator.ts +40 -7
- package/src/generator/constants.ts +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as __WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__ from"./openhps-core.es.min.js";var __webpack_modules__={1521:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=1521,e.exports=t},4727:(e,t,r)=>{r.d(t,{Q:()=>ProtobufSerializer});const n=(e=>{var t={};return r.d(t,e),t})({ConcreteTypeDescriptor:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.ConcreteTypeDescriptor,DataSerializer:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.DataSerializer,DataSerializerUtils:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.DataSerializerUtils,Deserializer:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.Deserializer,NumberType:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.NumberType,SerializationUtils:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.SerializationUtils,Serializer:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.Serializer,TypedJSON:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.TypedJSON,UUID:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.UUID});var o=r(1853),i=r(2549),s=r(4641),a=r(5248),c=r.n(a),l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},l(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var f=function(){function e(e){this.ctor=e}return e.prototype.getTypes=function(){return[this.ctor]},e.prototype.hasFriendlyName=function(){return"Object"!==this.ctor.name},e}(),p=function(e){function t(t){return e.call(this,t)||this}return u(t,e),t}(f),h=function(e){function t(t){return e.call(this,t)||this}return u(t,e),t}(f);!function(e){function t(t){var r=e.call(this,Array)||this;return r.elementType=t,r}u(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.elementType.getTypes())}}(h);!function(e){function t(t){var r=e.call(this,Set)||this;return r.elementType=t,r}u(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.elementType.getTypes())}}(h);!function(e){function t(t,r,n){var o=e.call(this,Map)||this;return o.keyType=t,o.valueType=r,o.options=n,o}u(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.keyType.getTypes(),this.valueType.getTypes())},t.prototype.getCompleteOptions=function(){var e,t;return{shape:null!==(t=null===(e=this.options)||void 0===e?void 0:e.shape)&&void 0!==t?t:0}}}(h);var d=new p((function(){}));const y="/**\n * OpenHPS Protocol Buffer \n * This file was automatically generated with @openhps/protobuf\n * \n * (c) 2019-2023 Maxim Van de Wynckel & Vrije Universiteit Brussel\n **/\n\n",m=y+'syntax = "proto3";\n\nextend google.protobuf.EnumValueOptions {\n\toptional string className = 1;\n\toptional string packageName = 2;\n}\n';class ProtobufGenerator{constructor(e){this.logger=()=>{},this.options=e}static getNumberType(e){switch(e){case n.NumberType.DECIMAL:case n.NumberType.DOUBLE:return"double";case n.NumberType.FLOAT:return"float";case n.NumberType.LONG:return"int64";case n.NumberType.INTEGER:case n.NumberType.SHORT:return"int32";default:return"string"}}}class ObjectGenerator extends ProtobufGenerator{processObject(e,t){throw new Error("Method not implemented.")}generate(e,t){throw new Error("Method not implemented.")}static typeMapping(e,t,r,o){switch(t.ctor){case String:return{syntax:"string"};case Number:{const t=r.options,n=t?this.getNumberType(t.numberType):"int32";return"string"===n&&o.logLevel>1&&console.warn(c().yellow(`${e.classType.name}[${r.name}] defines a number without specifing a type. This will affect performance.`)),{syntax:n}}case Boolean:return{syntax:"bool"};case Array:{const n=this.typeMapping(e,t.elementType,r,o);return{syntax:`repeated ${n.syntax}`,types:[n]}}case Map:{const n=this.typeMapping(e,t.keyType,r,o),i=this.typeMapping(e,t.valueType,r,o);if(void 0===n||void 0===i)return;return{syntax:`map<${n.syntax},${i.syntax}>`,types:[i,n]}}case Set:case Object:case Function:return;case Buffer:case Uint8Array:return{syntax:"bytes"};default:{const i=n.DataSerializerUtils.getOwnMetadata(t.ctor);if(i){if(i.knownTypes.size>1&&i.protobuf.generator.type&&i.protobuf.generator.type!==e.classType)return this.typeMapping(n.DataSerializerUtils.getOwnMetadata(i.protobuf.generator.type),t,r,o);if(i.knownTypes.size>1&&!i.protobuf.generator.type&&r&&(o.useAnyType||!i.protobuf.generator.allowOverride))return{syntax:"google.protobuf.Any"};{const e=t.ctor.prototype._module?t.ctor.prototype._module:"@openhps/core";return{syntax:t.ctor.name,package:e}}}return{syntax:"google.protobuf.Any"}}}}static processObject(e,t){var r,o;e.protobuf=null!==(r=e.protobuf)&&void 0!==r?r:{generator:{subModules:new Set,subTypes:[],allowOverride:!0}};const i=e.dataMembers;if(e.knownTypes.size>1){const r=[],s=new Set,a=n.SerializationUtils.cloneDeep(i);e.knownTypes.forEach((t=>{const o=n.DataSerializerUtils.getOwnMetadata(t).dataMembers;s.add(t.prototype._module),t!==e.classType&&t.prototype instanceof e.classType&&r.push(t),o.forEach(((t,r)=>{var o,s,c,l,u,f,p;if(t.options=null!==(o=t.options)&&void 0!==o?o:{},t.options.protobuf=null!==(s=t.options.protobuf)&&void 0!==s?s:{},i.has(r)){if(i.get(r).type().ctor!==t.type().ctor){const r=a.get(t.key);e.protobuf.generator.allowOverride=!1,r.options=null!==(c=r.options)&&void 0!==c?c:{},r.options.protobuf=null!==(l=r.options.protobuf)&&void 0!==l?l:{subMembers:new Map};const n=null!==(u=r.options.protobuf.subMembers)&&void 0!==u?u:new Map,o=t.name+"_"+t.type().ctor.name.toLowerCase();n.set(o,t),t.options=null!==(f=t.options)&&void 0!==f?f:{},t.options.protobuf=null!==(p=t.options.protobuf)&&void 0!==p?p:{},t.options.protobuf.name=o}}else{const e=n.SerializationUtils.cloneDeep(t);e.options.protobuf={optional:!0,subMembers:new Map},a.set(r,e)}}))})),e.protobuf.generator.subTypes=r,e.protobuf.generator.subModules=s,r.length>0&&(1===s.size||!t.useAnyType)&&(e.protobuf.generator.dataMembers=a,e.protobuf.generator.type=null!==(o=e.protobuf.generator.type)&&void 0!==o?o:e.classType,r.forEach((t=>{var r;const o=n.DataSerializerUtils.getOwnMetadata(t);o.protobuf=null!==(r=o.protobuf)&&void 0!==r?r:{generator:{}},o.protobuf.generator.type=e.classType})))}}static createProtoMessage(e,t){var r;const o=n.DataSerializerUtils.getRootMetadata(e.classType),i=null!==(r=e.protobuf.generator.dataMembers)&&void 0!==r?r:e.dataMembers,s=e.classType.prototype._module?e.classType.prototype._module:"@openhps/core",a=[];let c;if(e.knownTypes.size>1&&e.protobuf.generator.subTypes.length>0&&(1===e.protobuf.generator.subModules.size||!t.useAnyType)&&(a.push('import "../../common.proto";'),c=`\nenum ${e.classType.name}Type {\n\tUNSPECIFIED = 0;\n`+[e.classType,...e.protobuf.generator.subTypes].map((e=>`\t${e.name.replace(/(?:^|\.?)(([A-Z0-9][a-z0-9]|$)|([0-9]+[A-Z]))/g,((e,t)=>"_"+t)).replace(/(^_)|(_$)/g,"").toUpperCase()} = ${Array.from(o.knownTypes.values()).indexOf(e)+1} [\n\t\t(className) = "${e.name}",\n\t\t(packageName) = "${e.prototype._module}"\n\t]`)).join(";\n")+";\n}\n"),o.classType!==e.classType){const e=this.typeMapping(o,new n.ConcreteTypeDescriptor(o.classType),void 0,t);e.package&&e.package===s?a.push(`import "${e.syntax}.proto";`):e.package&&a.push(`import "../../${e.package}/${e.syntax}.proto";`)}let l=1;const u=Array.from(i.values()).map((r=>{var n;const o=r.options&&r.options.protobuf?r.options.protobuf:{};let i;const c=null!==(n=o.name)&&void 0!==n?n:r.name;if("uid"===c)i={syntax:"oneof",types:[{syntax:"string",name:"uid_string"},{syntax:"bytes",name:"uid_bytes"}]};else if(r.type()===d)i=o.subMembers&&o.subMembers.size>0?{syntax:"oneof",types:[...Array.from(o.subMembers.keys()).map((r=>{const n=o.subMembers.get(r),i=this.typeMapping(e,n.type(),n,t);return i.name=r,i})),{syntax:"google.protobuf.Any",name:c+"_any"}]}:{syntax:"google.protobuf.Any"};else{if(r.serializer&&void 0===r.type)return;i=this.typeMapping(e,r.type(),r,t)}if(i)return i.package&&i.package===s?a.push(`import "${i.syntax}.proto";`):i.package?a.push(`import "../../${i.package}/${i.syntax}.proto";`):"google.protobuf.Any"===i.syntax&&a.push('import "google/protobuf/any.proto";'),i.types&&i.types.forEach((e=>{e.package&&e.package===s?a.push(`import "${e.syntax}.proto";`):e.package?a.push(`import "../../${e.package}/${e.syntax}.proto";`):"google.protobuf.Any"===e.syntax&&a.push('import "google/protobuf/any.proto";')})),"oneof"===i.syntax?`\toneof ${c} {\n`+i.types.map((e=>`\t\t${e.syntax} ${e.name} = ${l++}`)).join(";\n")+";\n\t}":`\t${!o.optional||i.syntax.includes("<")||i.syntax.includes("repeated")?"":"optional "}${i.syntax} ${c} = ${l++};`})).filter((e=>void 0!==e));return[s,y+`package ${s.replace("@","").replace("/",".")};\nsyntax = "proto3";\n`+a.filter(((e,t)=>a.indexOf(e)===t)).join("\n")+"\n"+(c||"")+`\nmessage ${e.classType.name} {\n`+(o.protobuf.generator.type?`\t${o.protobuf.generator.type.name}Type _type = 0;\n`:"")+u.join("\n")+"\n}\n"]}}var g=r(1605),v=r(9439);class ProjectGenerator extends n.DataSerializer{static findModule(e){const t=v.join(e,"package.json");if(g.existsSync(t)){return JSON.parse(g.readFileSync(t,{encoding:"utf-8"})).name}{const t=e.split(v.sep);return t.pop(),this.findModule(t.join(v.sep))}}static loadModules(e,t=r.c[r.s]){void 0!==t?(this._modules.add(t.id),Object.keys(t.exports).forEach((n=>{const o=t.exports[n];e.includes(o)&&(o.prototype._module=this.findModule(v.dirname(r(1521).resolve(t.id))),this._packages.add(o.prototype._module))})),t.children.forEach((t=>{this._modules.has(t.id)||this.loadModules(e,t)}))):Object.values(r.c).map((t=>this.loadModules(e,t)))}static getPackages(){return 0===this._packages.size&&this.loadClasses(),Array.from(this._packages.values())}static loadClasses(){const e=[];return this.knownTypes.forEach((t=>{const r=n.DataSerializerUtils.getOwnMetadata(t);r&&e.push(r)})),this.loadModules(e.map((e=>e.classType))),e}static generateProtoMessages(e){return new Promise((t=>{const r=new Map,n=this.loadClasses();n.forEach((t=>{ObjectGenerator.processObject(t,e)})),n.forEach((t=>{e.logLevel>2&&console.log(c().italic(`Generating ${t.classType.name}`,t.classType.prototype._module?`of module ${t.classType.prototype._module}`:""));const n=ObjectGenerator.createProtoMessage(t,e);r.set(t.classType.name,n)})),t(r)}))}static buildProject(e,t={}){return new Promise(((r,n)=>{g.existsSync(e)&&g.rmSync(e,{recursive:!0}),g.mkdirSync(e,{recursive:!0}),t.logLevel>0&&(console.log("Generating protocol buffer messages ..."),console.log("Use of any types = ",t.useAnyType)),ProjectGenerator.generateProtoMessages(t).then((n=>{t.logLevel>0&&console.log("Saving generating protocol buffer messages ..."),n.forEach(((t,r)=>{const n=v.join(e,...t[0].split("."));g.existsSync(n)||g.mkdirsSync(n),g.writeFileSync(v.join(n,r+".proto"),t[1],{encoding:"utf-8"})})),g.writeFileSync(v.join(e,"common.proto"),m,{encoding:"utf-8"}),r(n.size)})).catch(n)}))}}ProjectGenerator._modules=new Set,ProjectGenerator._packages=new Set;"object"==typeof Reflect&&Reflect.getMetadata;function b(e){return"string"==typeof e.name?e.name:"undefined"}var w="__typedJsonJsonObjectMetadataInformation__",k=function(){function e(e){this.dataMembers=new Map,this.knownTypes=new Set,this.knownTypesDeferred=[],this.isExplicitlyMarked=!1,this.isHandledWithoutAnnotation=!1,this.classType=e}return e.getJsonObjectName=function(t){var r=e.getFromConstructor(t);return b(void 0===r?t:r.classType)},e.getFromConstructor=function(t){var r=t.prototype;if(null!=r){var n;if(Object.prototype.hasOwnProperty.call(r,w)&&(n=r[w]),!0===(null==n?void 0:n.isExplicitlyMarked))return n;if(e.doesHandleWithoutAnnotation(t)){var o=new e(t);return o.isExplicitlyMarked=!0,o}}},e.ensurePresentInPrototype=function(t){if(Object.prototype.hasOwnProperty.call(t,w))return t[w];var r=new e(t.constructor),n=t[w];return void 0!==n&&(n.dataMembers.forEach((function(e,t){r.dataMembers.set(t,e)})),n.knownTypes.forEach((function(e){r.knownTypes.add(e)})),r.typeResolver=n.typeResolver,r.typeHintEmitter=n.typeHintEmitter),Object.defineProperty(t,w,{enumerable:!1,configurable:!1,writable:!1,value:r}),r},e.getKnownTypeNameFromType=function(t){var r=e.getFromConstructor(t);return b(void 0===r?t:r.classType)},e.doesHandleWithoutAnnotation=function(e){return-1!==[Date,Number,String,Boolean].indexOf(e)||function(e){return-1!==[Float32Array,Float64Array,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array].indexOf(e)}(e)||e===DataView||e===ArrayBuffer},e.prototype.processDeferredKnownTypes=function(){var e=this;this.knownTypesDeferred.forEach((function(t){t().getTypes().forEach((function(t){return e.knownTypes.add(t)}))})),this.knownTypesDeferred=[]},e}();class InternalProtobufDeserializer extends n.Deserializer{constructor(){super(),InternalProtobufDeserializer.primitiveWrapper=new i.Type("PrimitiveWrapperMessage"),InternalProtobufDeserializer.primitiveWrapper.add(new i.Field("value",1,"string")),this.setDeserializationStrategy(Number,(e=>"number"==typeof e?e:"string"==typeof e?Number(e):e.toNumber?e.toNumber():e)),this.setDeserializationStrategy(Map,((e,t,r,n,o,i,s)=>{const a=new Map;return Object.keys(e).forEach((c=>{a.set(c,o.convertSingleValue(e[c],t.valueType,r,n,i,s))})),a}))}convertSingleValue(e,t,r,o,i,s){if(this.retrievePreserveNull(i)&&null===e)return null;if(!n.TypedJSON.utils.isValueDefined(e))return;const a=this.deserializationStrategy.get(t.ctor);if(void 0!==a)return a(e,t,r,o,this,i,s);if("object"==typeof e)return this.convertAsObject(e,t,r,o,this,i,s);let c=`Could not deserialize '${o}'; don't know how to deserialize type`;t.hasFriendlyName()&&(c+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${c}.`))}convertAsObject(e,t,r,o,i,s,a){let c=t.ctor,l=k.getFromConstructor(c);if(e.hasOwnProperty("_type")&&0!==e._type){const t=l.protobuf.enumMapping.get(e._type);if(t){const e=r.get(t);e!==c&&(c=e,l=k.getFromConstructor(c))}}else if(e.type_url&&e.value){const t=a.types.get(e.type_url).decode(e.value);return this.convertAsObject(t,new n.ConcreteTypeDescriptor(r.get(e.type_url)),r,o,i,s,a)}const u=l,f={};u.dataMembers.forEach(((t,o)=>{var s;const c=`${n.TypedJSON.utils.nameof(u.classType)}.${o}`,l=n.TypedJSON.options.mergeOptions(u.options,t.options),p=null!==(s=l&&l.protobuf?l.protobuf.name:t.name)&&void 0!==s?s:t.name,h=e[p];let y;if("uid"===t.name)if(e.hasOwnProperty("uid_bytes")&&e.uid_bytes.byteLength>0)y=n.UUID.fromBuffer(e.uid_bytes).toString();else{if(!e.hasOwnProperty("uid_string"))return;y=e.uid_string}else{if(!e.hasOwnProperty(p)||!h)return;if(t.type()===d&&h.type_url){const t=a.types.get(e[p].type_url);if(t){const e=t.decode(h.value);y=i.convertSingleValue(e,new n.ConcreteTypeDescriptor(r.get(h.type_url)),r,c,l,a)}else if(h.value){const e=InternalProtobufDeserializer.primitiveWrapper.decode(h.value);switch(h.type_url){case"Boolean":y=Boolean(e.value);break;case"Number":y=Number(e.value);break;default:y=e.value}}}else y=i.convertSingleValue(h,t.type(),r,c,l,a)}n.TypedJSON.utils.isValueDefined(y)&&(f[t.key]=y)}));const p=i.instantiateType(c);Object.assign(p,f);const h=l.onDeserializedMethodName;return null!=h&&("function"==typeof p[h]?p[h]():"function"==typeof p.constructor[h]?p.constructor[h]():i.getErrorHandler()(new TypeError(`onDeserialized callback'${n.TypedJSON.utils.nameof(l.classType)}.${h}' is not a method.`))),p}}class InternalProtobufSerializer extends n.Serializer{constructor(){super(),this.setSerializationStrategy(Map,this.convertAsMap.bind(this)),InternalProtobufSerializer.primitiveWrapper=new i.Type("PrimitiveWrapperMessage"),InternalProtobufSerializer.primitiveWrapper.add(new i.Field("value",1,"string"))}convertSingleValue(e,t,r,o,i){if(!n.TypedJSON.utils.isValueDefined(e))return;if(!n.TypedJSON.utils.isInstanceOf(e,t.ctor)){const o=n.TypedJSON.utils.nameof(t.ctor),i=n.TypedJSON.utils.nameof(e.constructor);return void this.errorHandler(new TypeError(`Could not serialize '${r}': expected '${o}', got '${i}'.`))}const s=this.serializationStrategy.get(t.ctor);if(void 0!==s)return s(e,t,r,this,o,i);if("object"==typeof e)return this.convertAsObject(e,t,r,this,o,i);let a=`Could not serialize '${r}'; don't know how to serialize type`;t.hasFriendlyName()&&(a+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${a}.`))}convertAsObject(e,t,r,o,i,s){const a=k.getFromConstructor(t.ctor);let c,l=k.getFromConstructor(e.constructor);l||(l=a);const u=l;c={};const f=n.TypedJSON.options.mergeOptions(o.options,u.options);u.dataMembers.forEach((t=>{var r;const o=n.TypedJSON.options.mergeOptions(f,t.options);let i,a=null!==(r=o&&o.protobuf?o.protobuf.name:t.name)&&void 0!==r?r:t.name;if(void 0!==e[t.key]){if(null==t.type)throw new TypeError(`Could not serialize ${t.name}, there is no constructor nor serialization function to use.`);if("uid"===t.name){const r=n.UUID.fromString(e[t.key]);r?(i=r.toBuffer(),a+="_bytes"):(i=e[t.key],a+="_string")}else{const r=l.protobuf.messageType.get(t.name);i=this.convertSingleValue(e[t.key],t.type(),`${n.TypedJSON.utils.nameof(u.classType)}.${t.key}`,o,Object.assign(Object.assign({},s),{field:r}))}if(n.TypedJSON.utils.isValueDefined(i)){if(t.type()===d){const r=s.types.get(e[t.key].constructor.name);if(r){const n=r.create(i);i={type_url:e[t.key].constructor.name,value:r.encode(n).finish()}}else{const r=InternalProtobufSerializer.primitiveWrapper.create({value:String(e[t.key])});i={type_url:e[t.key].constructor.name,value:InternalProtobufSerializer.primitiveWrapper.encode(r).finish()}}}c[a]=i}}}));const p=s.field&&"google.protobuf.Any"===s.field.type;if(!p&&a.knownTypes.size>1){const e=l.protobuf.messageType.create(Object.assign(Object.assign({},c),{_type:l.protobuf.messageTypeEnum}));c=e}else if(p){const t=l.protobuf.messageType,r=t.create(c);c={type_url:e.constructor.name,value:t.encode(r).finish()}}return c}convertAsMap(e,t,r,n,o,i){const s={};return e.forEach(((e,a)=>{s[a]=n.convertSingleValue(e,t.valueType,r,o,i)})),s}}class ProtobufSerializer extends n.DataSerializer{static getFiles(e,t=[]){if(!s.statSync(e).isDirectory())return[];const r=s.readdirSync(o.normalize(e));for(const n of r){const r=`${e}/${n}`;s.statSync(r).isDirectory()?this.getFiles(r,t):r.endsWith(".proto")&&t.push(o.normalize(r))}return t}static initialize(e){return new Promise(((t,r)=>{ProtobufSerializer.root=new i.Root,Promise.resolve(e?Promise.resolve():ProjectGenerator.buildProject(o.resolve("tmp"))).then((()=>{const t=this.getFiles(o.resolve(null!=e?e:"tmp")),s=new Promise((e=>{ProtobufSerializer.root.load(t,{keepCase:!0}).then((()=>{t.forEach((e=>{const t=o.parse(e).name;if(this.knownTypes.get(t)){const e=n.DataSerializerUtils.getOwnMetadata(this.knownTypes.get(t)),r=n.DataSerializerUtils.getRootMetadata(this.knownTypes.get(t)),o=ProtobufSerializer.root.lookupType(t);let i;const s=new Map;try{const e=ProtobufSerializer.root.lookupEnum(`${r.classType.name}Type`);Object.keys(e.values).forEach(((r,n)=>{if(0===n)return;e.valuesOptions[r]["(className)"]===t&&(i=e.values[r]),s.set(e.values[r],e.valuesOptions[r]["(className)"])}))}catch(e){}e.protobuf={messageType:o,messageTypeEnum:i,enumMapping:s},this.options.types.set(t,o)}})),e()})).catch((e=>r(e)))}));return this.wrapperMessage=new i.Type("WrapperMessage"),this.wrapperMessage.add(new i.Field("data",1,"google.protobuf.Any")),this.wrapperMessage.addJSON(i.common["google/protobuf/any.proto"].nested),s})).then((()=>{console.log(ProtobufSerializer.root.toJSON()),t()})).catch(r)}))}static serialize(e,t){const r=super.serialize(e,Object.assign(Object.assign({},this.options),t)),n=this.options.types.get(e.constructor.name),o=n.fromObject(r),i=this.wrapperMessage.create({data:{type_url:e.constructor.name,value:n.encode(o).finish()}});return this.wrapperMessage.encode(i).finish()}static deserialize(e,t,r){const o=this.wrapperMessage.decode(e),i=o.data.type_url,s=this.options.types.get(i).decode(o.data.value),a=null!=t?t:this.knownTypes.get(i);return this.options.deserializer.convertSingleValue(s,n.DataSerializerUtils.ensureTypeDescriptor(a),n.DataSerializer.knownTypes,void 0,void 0,Object.assign(Object.assign({},r),this.options))}}ProtobufSerializer.options={serializer:new InternalProtobufSerializer,deserializer:new InternalProtobufDeserializer,types:new Map}},8045:e=>{e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,o=2,i=!0;for(;o<arguments.length;)r[n++]=arguments[o++];return new Promise((function(o,s){r[n]=function(e){if(i)if(i=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];o.apply(null,t)}};try{e.apply(t||null,r)}catch(e){i&&(i=!1,s(e))}}))}},8839:(e,t)=>{var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),o=new Array(123),i=0;i<64;)o[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;r.encode=function(e,t,r){for(var o,i=null,s=[],a=0,c=0;t<r;){var l=e[t++];switch(c){case 0:s[a++]=n[l>>2],o=(3&l)<<4,c=1;break;case 1:s[a++]=n[o|l>>4],o=(15&l)<<2,c=2;break;case 2:s[a++]=n[o|l>>6],s[a++]=n[63&l],c=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return c&&(s[a++]=n[o],s[a++]=61,1===c&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(e,t,r){for(var n,i=r,a=0,c=0;c<e.length;){var l=e.charCodeAt(c++);if(61===l&&a>1)break;if(void 0===(l=o[l]))throw Error(s);switch(a){case 0:n=l,a=1;break;case 1:t[r++]=n<<2|(48&l)>>4,n=l,a=2;break;case 2:t[r++]=(15&n)<<4|(60&l)>>2,n=l,a=3;break;case 3:t[r++]=(3&n)<<6|l,a=0}}if(1===a)throw Error(s);return r-i},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},8561:e=>{function t(e,r){"string"==typeof e&&(r=e,e=void 0);var n=[];function o(e){if("string"!=typeof e){var r=i();if(t.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var s=Object.keys(e),a=new Array(s.length+1),c=new Array(s.length),l=0;l<s.length;)a[l]=s[l],c[l]=e[s[l++]];return a[l]=r,Function.apply(null,a).apply(null,c)}return Function(r)()}for(var u=new Array(arguments.length-1),f=0;f<u.length;)u[f]=arguments[++f];if(f=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=u[f++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),f!==u.length)throw Error("parameter count mismatch");return n.push(e),o}function i(t){return"function "+(t||r||"")+"("+(e&&e.join(",")||"")+"){\n "+n.join("\n ")+"\n}"}return o.toString=i,o}e.exports=t,t.verbose=!1},4358:e=>{function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},5212:(e,t,r)=>{e.exports=i;var n=r(8045),o=r(4153)("fs");function i(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&o&&o.readFile?o.readFile(e,(function(n,o){return n&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,r):n?r(n):r(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,r):n(i,this,e,t)}i.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var o=0;o<n.responseText.length;++o)e.push(255&n.responseText.charCodeAt(o))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},9410:e=>{function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3]}function i(e,n,o){t[0]=e,n[o]=r[3],n[o+1]=r[2],n[o+2]=r[1],n[o+3]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function a(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o,e.readFloatLE=n?s:a,e.readFloatBE=n?a:s}():function(){function t(e,t,r,n){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function s(e,t,r){var n=e(t,r),o=2*(n>>31)+1,i=n>>>23&255,s=8388607&n;return 255===i?s?NaN:o*(1/0):0===i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=s.bind(null,o),e.readFloatBE=s.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3],n[o+4]=r[4],n[o+5]=r[5],n[o+6]=r[6],n[o+7]=r[7]}function i(e,n,o){t[0]=e,n[o]=r[7],n[o+1]=r[6],n[o+2]=r[5],n[o+3]=r[4],n[o+4]=r[3],n[o+5]=r[2],n[o+6]=r[1],n[o+7]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function a(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o,e.readDoubleLE=n?s:a,e.readDoubleBE=n?a:s}():function(){function t(e,t,r,n,o,i){var s=n<0?1:0;if(s&&(n=-n),0===n)e(0,o,i+t),e(1/n>0?0:2147483648,o,i+r);else if(isNaN(n))e(0,o,i+t),e(2146959360,o,i+r);else if(n>17976931348623157e292)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+r);else{var a;if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+r);else{var c=Math.floor(Math.log(n)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(a=n*Math.pow(2,-c))>>>0,o,i+t),e((s<<31|c+1023<<20|1048576*a&1048575)>>>0,o,i+r)}}}function s(e,t,r,n,o){var i=e(n,o+t),s=e(n,o+r),a=2*(s>>31)+1,c=s>>>20&2047,l=4294967296*(1048575&s)+i;return 2047===c?l?NaN:a*(1/0):0===c?5e-324*a*l:a*Math.pow(2,c-1075)*(l+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=s.bind(null,o,0,4),e.readDoubleBE=s.bind(null,i,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},4153:module=>{function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},9207:(e,t)=>{var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),o="";r&&(o=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):r?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return o+t.join("/")};r.resolve=function(e,t,r){return r||(t=o(t)),n(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},9390:e=>{e.exports=function(e,t,r){var n=r||8192,o=n>>>1,i=null,s=n;return function(r){if(r<1||r>o)return e(r);s+r>n&&(i=e(n),s=0);var a=t.call(i,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},1447:(e,t)=>{var r=t;r.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},r.read=function(e,t,r){if(r-t<1)return"";for(var n,o=null,i=[],s=0;t<r;)(n=e[t++])<128?i[s++]=n:n>191&&n<224?i[s++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[s++]=55296+(n>>10),i[s++]=56320+(1023&n)):i[s++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))},r.write=function(e,t,r){for(var n,o,i=r,s=0;s<e.length;++s)(n=e.charCodeAt(s))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(o=e.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&o),++s,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-i}},4083:(e,t,r)=>{e=r.nmd(e);const n=(e,t)=>(...r)=>`[${e(...r)+t}m`,o=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`},i=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`},s=e=>e,a=(e,t,r)=>[e,t,r],c=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let l;const u=(e,t,n,o)=>{void 0===l&&(l=r(248));const i=o?10:0,s={};for(const[r,o]of Object.entries(l)){const a="ansi16"===r?"ansi":r;r===t?s[a]=e(n,i):"object"==typeof o&&(s[a]=e(o[t],i))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,n]of Object.entries(t)){for(const[r,o]of Object.entries(n))t[r]={open:`[${o[0]}m`,close:`[${o[1]}m`},n[r]=t[r],e.set(o[0],o[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="[39m",t.bgColor.close="[49m",c(t.color,"ansi",(()=>u(n,"ansi16",s,!1))),c(t.color,"ansi256",(()=>u(o,"ansi256",s,!1))),c(t.color,"ansi16m",(()=>u(i,"rgb",a,!1))),c(t.bgColor,"ansi",(()=>u(n,"ansi16",s,!0))),c(t.bgColor,"ansi256",(()=>u(o,"ansi256",s,!0))),c(t.bgColor,"ansi16m",(()=>u(i,"rgb",a,!0))),t}})},4389:(e,t,r)=>{const n=r(8156),o={};for(const e of Object.keys(n))o[n[e]]=e;const i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=i;for(const e of Object.keys(i)){if(!("channels"in i[e]))throw new Error("missing channels property: "+e);if(!("labels"in i[e]))throw new Error("missing channel labels property: "+e);if(i[e].labels.length!==i[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:t}),Object.defineProperty(i[e],"labels",{value:r})}i.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),s=i-o;let a,c;i===o?a=0:t===i?a=(r-n)/s:r===i?a=2+(n-t)/s:n===i&&(a=4+(t-r)/s),a=Math.min(60*a,360),a<0&&(a+=360);const l=(o+i)/2;return c=i===o?0:l<=.5?s/(i+o):s/(2-i-o),[a,100*c,100*l]},i.rgb.hsv=function(e){let t,r,n,o,i;const s=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(s,a,c),u=l-Math.min(s,a,c),f=function(e){return(l-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/l,t=f(s),r=f(a),n=f(c),s===l?o=n-r:a===l?o=1/3+t-n:c===l&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*l]},i.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const o=i.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,100*s,100*n]},i.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n);return[100*((1-t-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*o]},i.rgb.keyword=function(e){const t=o[e];if(t)return t;let r,i=1/0;for(const t of Object.keys(n)){const o=n[t],c=(a=o,((s=e)[0]-a[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2);c<i&&(i=c,r=t)}var s,a;return r},i.keyword.rgb=function(e){return n[e]},i.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},i.rgb.lab=function(e){const t=i.rgb.xyz(e);let r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*n-16,500*(r-n),200*(n-o)]},i.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let o,i,s;if(0===r)return s=255*n,[s,s,s];o=n<.5?n*(1+r):n+r-n*r;const a=2*n-o,c=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(o-a)*i:2*i<1?o:3*i<2?a+(o-a)*(2/3-i)*6:a,c[e]=255*s;return c},i.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,o=r;const i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;return[t,100*(0===n?2*o/(i+o):2*r/(n+r)),100*((n+r)/2)]},i.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}},i.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01);let i,s;s=(2-r)*n;const a=(2-r)*o;return i=r*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,100*i,100*s]},i.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const o=r+n;let i;o>1&&(r/=o,n/=o);const s=Math.floor(6*t),a=1-n;i=6*t-s,1&s&&(i=1-i);const c=r+i*(a-r);let l,u,f;switch(s){default:case 6:case 0:l=a,u=c,f=r;break;case 1:l=c,u=a,f=r;break;case 2:l=r,u=a,f=c;break;case 3:l=r,u=c,f=a;break;case 4:l=c,u=r,f=a;break;case 5:l=a,u=r,f=c}return[255*l,255*u,255*f]},i.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},i.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let o,i,s;return o=3.2406*t+-1.5372*r+-.4986*n,i=-.9689*t+1.8758*r+.0415*n,s=.0557*t+-.204*r+1.057*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[255*o,255*i,255*s]},i.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},i.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const o=r**3,i=t**3,s=n**3;return r=o>.008856?o:(r-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},i.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let o;o=360*Math.atan2(n,r)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(r*r+n*n),o]},i.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},i.rgb.ansi16=function(e,t=null){const[r,n,o]=e;let s=null===t?i.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===s&&(a+=60),a},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},i.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},i.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),s=o-i;let a,c;return a=s<1?i/(1-s):0,c=s<=0?0:o===t?(r-n)/s%6:o===r?2+(n-t)/s:4+(t-r)/s,c/=6,c%=1,[360*c,100*s,100*a]},i.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],100*n,100*o]},i.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},i.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const o=[0,0,0],i=t%1*6,s=i%1,a=1-s;let c=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return c=(1-r)*n,[255*(r*o[0]+c),255*(r*o[1]+c),255*(r*o[2]+c)]},i.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},i.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},i.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},i.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},248:(e,t,r)=>{const n=r(4389),o=r(7913),i={};Object.keys(n).forEach((e=>{i[e]={},Object.defineProperty(i[e],"channels",{value:n[e].channels}),Object.defineProperty(i[e],"labels",{value:n[e].labels});const t=o(e);Object.keys(t).forEach((r=>{const n=t[r];i[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(n),i[e][r].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=i},7913:(e,t,r)=>{const n=r(4389);function o(e){const t=function(){const e={},t=Object.keys(n);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),o=Object.keys(n[e]);for(let n=o.length,i=0;i<n;i++){const n=o[i],s=t[n];-1===s.distance&&(s.distance=t[e].distance+1,s.parent=e,r.unshift(n))}}return t}function i(e,t){return function(r){return t(e(r))}}function s(e,t){const r=[t[e].parent,e];let o=n[t[e].parent][e],s=t[e].parent;for(;t[s].parent;)r.unshift(t[s].parent),o=i(n[t[s].parent][s],o),s=t[s].parent;return o.conversion=r,o}e.exports=function(e){const t=o(e),r={},n=Object.keys(t);for(let e=n.length,o=0;o<e;o++){const e=n[o];null!==t[e].parent&&(r[e]=s(e,t))}return r}},5248:(e,t,r)=>{const n=r(4083),{stdout:o,stderr:i}=r(2747),{stringReplaceAll:s,stringEncaseCRLFWithFirstIndex:a}=r(4058),{isArray:c}=Array,l=["ansi","ansi","ansi256","ansi16m"],u=Object.create(null);class ChalkClass{constructor(e){return f(e)}}const f=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=o?o.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>b(t.template,...e),Object.setPrototypeOf(t,p.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=ChalkClass,t.template};function p(e){return f(e)}for(const[e,t]of Object.entries(n))u[e]={get(){const r=m(this,y(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};u.visible={get(){const e=m(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of h)u[e]={get(){const{level:t}=this;return function(...r){const o=y(n.color[l[t]][e](...r),n.color.close,this._styler);return m(this,o,this._isEmpty)}}};for(const e of h){u["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const o=y(n.bgColor[l[t]][e](...r),n.bgColor.close,this._styler);return m(this,o,this._isEmpty)}}}}const d=Object.defineProperties((()=>{}),{...u,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),y=(e,t,r)=>{let n,o;return void 0===r?(n=e,o=t):(n=r.openAll+e,o=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:o,parent:r}},m=(e,t,r)=>{const n=(...e)=>c(e[0])&&c(e[0].raw)?g(n,b(n,...e)):g(n,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(n,d),n._generator=e,n._styler=t,n._isEmpty=r,n},g=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:n,closeAll:o}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=s(t,r.close,r.open),r=r.parent;const i=t.indexOf("\n");return-1!==i&&(t=a(t,o,n,i)),n+t+o};let v;const b=(e,...t)=>{const[n]=t;if(!c(n)||!c(n.raw))return t.join(" ");const o=t.slice(1),i=[n.raw[0]];for(let e=1;e<n.length;e++)i.push(String(o[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===v&&(v=r(2991)),v(e,i.join(""))};Object.defineProperties(p.prototype,u);const w=p();w.supportsColor=o,w.stderr=p({level:i?i.level:0}),w.stderr.supportsColor=i,e.exports=w},2991:e=>{const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,o=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,i=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):i.get(e)||e}function a(e,t){const r=[],i=t.trim().split(/\s*,\s*/g);let a;for(const t of i){const i=Number(t);if(Number.isNaN(i)){if(!(a=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(a[2].replace(o,((e,t,r)=>t?s(t):r)))}else r.push(i)}return r}function c(e){r.lastIndex=0;const t=[];let n;for(;null!==(n=r.exec(e));){const e=n[1];if(n[2]){const r=a(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function l(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in n))throw new Error(`Unknown Chalk style: ${e}`);n=t.length>0?n[e](...t):n[e]}return n}e.exports=(e,r)=>{const n=[],o=[];let i=[];if(r.replace(t,((t,r,a,u,f,p)=>{if(r)i.push(s(r));else if(u){const t=i.join("");i=[],o.push(0===n.length?t:l(e,n)(t)),n.push({inverse:a,styles:c(u)})}else if(f){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");o.push(l(e,n)(i.join(""))),i=[],n.pop()}else i.push(p)})),o.push(i.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return o.join("")}},4058:e=>{e.exports={stringReplaceAll:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return e;const o=t.length;let i=0,s="";do{s+=e.substr(i,n-i)+t+r,i=n+o,n=e.indexOf(t,i)}while(-1!==n);return s+=e.substr(i),s},stringEncaseCRLFWithFirstIndex:(e,t,r,n)=>{let o=0,i="";do{const s="\r"===e[n-1];i+=e.substr(o,(s?n-1:n)-o)+t+(s?"\r\n":"\n")+r,o=n+1,n=e.indexOf("\n",o)}while(-1!==n);return i+=e.substr(o),i}}},8156:e=>{e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},3876:(e,t,r)=>{const n=r(1420),o=r(7356),i=r(3798).mkdirsSync,s=r(7211).utimesMillisSync,a=r(6462);function c(e,t,r,i){const s=(i.dereference?n.statSync:n.lstatSync)(t);if(s.isDirectory())return function(e,t,r,o,i){return t?f(r,o,i):function(e,t,r,o){return n.mkdirSync(r),f(t,r,o),u(r,e)}(e.mode,r,o,i)}(s,e,t,r,i);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return function(e,t,r,o,i){return t?function(e,t,r,o){if(o.overwrite)return n.unlinkSync(r),l(e,t,r,o);if(o.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,o,i):l(e,r,o,i)}(s,e,t,r,i);if(s.isSymbolicLink())return function(e,t,r,i){let s=n.readlinkSync(t);i.dereference&&(s=o.resolve(process.cwd(),s));if(e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(s,r);throw e}if(i.dereference&&(e=o.resolve(process.cwd(),e)),a.isSrcSubdir(s,e))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(a.isSrcSubdir(e,s))throw new Error(`Cannot overwrite '${e}' with '${s}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(s,r)}return n.symlinkSync(s,r)}(e,t,r,i);if(s.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(s.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function l(e,t,r,o){return n.copyFileSync(t,r),o.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){u(e,128|t)}(r,e);(function(e,t){const r=n.statSync(e);s(t,r.atime,r.mtime)})(t,r)}(e.mode,t,r),u(r,e.mode)}function u(e,t){return n.chmodSync(e,t)}function f(e,t,r){n.readdirSync(e).forEach((n=>function(e,t,r,n){const i=o.join(t,e),s=o.join(r,e);if(n.filter&&!n.filter(i,s))return;const{destStat:l}=a.checkPathsSync(i,s,"copy",n);return c(l,i,s,n)}(n,e,t,r)))}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:s,destStat:l}=a.checkPathsSync(e,t,"copy",r);if(a.checkParentPathsSync(e,s,t,"copy"),r.filter&&!r.filter(e,t))return;const u=o.dirname(t);return n.existsSync(u)||i(u),c(l,e,t,r)}},4994:(e,t,r)=>{const n=r(8737),o=r(7356),{mkdirs:i}=r(3798),{pathExists:s}=r(9288),{utimesMillis:a}=r(7211),c=r(6462);async function l(e,t,r){return!r.filter||r.filter(e,t)}async function u(e,t,r,i){const s=i.dereference?n.stat:n.lstat,a=await s(t);if(a.isDirectory())return async function(e,t,r,i,s){t||await n.mkdir(i);const a=await n.readdir(r);await Promise.all(a.map((async e=>{const t=o.join(r,e),n=o.join(i,e);if(!await l(t,n,s))return;const{destStat:a}=await c.checkPaths(t,n,"copy",s);return u(a,t,n,s)}))),t||await n.chmod(i,e.mode)}(a,e,t,r,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return async function(e,t,r,o,i){if(!t)return f(e,r,o,i);if(i.overwrite)return await n.unlink(o),f(e,r,o,i);if(i.errorOnExist)throw new Error(`'${o}' already exists`)}(a,e,t,r,i);if(a.isSymbolicLink())return async function(e,t,r,i){let s=await n.readlink(t);i.dereference&&(s=o.resolve(process.cwd(),s));if(!e)return n.symlink(s,r);let a=null;try{a=await n.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlink(s,r);throw e}i.dereference&&(a=o.resolve(process.cwd(),a));if(c.isSrcSubdir(s,a))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`);if(c.isSrcSubdir(a,s))throw new Error(`Cannot overwrite '${a}' with '${s}'.`);return await n.unlink(r),n.symlink(s,r)}(e,t,r,i);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function f(e,t,r,o){if(await n.copyFile(t,r),o.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const o=await n.stat(t);await a(r,o.atime,o.mtime)}return n.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:n,destStat:a}=await c.checkPaths(e,t,"copy",r);if(await c.checkParentPaths(e,n,t,"copy"),!await l(e,t,r))return;const f=o.dirname(t);await s(f)||await i(f),await u(a,e,t,r)}},4423:(e,t,r)=>{const n=r(1236).fromPromise;e.exports={copy:n(r(4994)),copySync:r(3876)}},2591:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8737),i=r(2336),s=r(3798),a=r(5422),c=n((async function(e){let t;try{t=await o.readdir(e)}catch{return s.mkdirs(e)}return Promise.all(t.map((t=>a.remove(i.join(e,t)))))}));function l(e){let t;try{t=o.readdirSync(e)}catch{return s.mkdirsSync(e)}t.forEach((t=>{t=i.join(e,t),a.removeSync(t)}))}e.exports={emptyDirSync:l,emptydirSync:l,emptyDir:c,emptydir:c}},9616:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8463),i=r(8737),s=r(3798);e.exports={createFile:n((async function(e){let t;try{t=await i.stat(e)}catch{}if(t&&t.isFile())return;const r=o.dirname(e);let n=null;try{n=await i.stat(r)}catch(t){if("ENOENT"===t.code)return await s.mkdirs(r),void await i.writeFile(e,"");throw t}n.isDirectory()?await i.writeFile(e,""):await i.readdir(r)})),createFileSync:function(e){let t;try{t=i.statSync(e)}catch{}if(t&&t.isFile())return;const r=o.dirname(e);try{i.statSync(r).isDirectory()||i.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;s.mkdirsSync(r)}i.writeFileSync(e,"")}}},6288:(e,t,r)=>{const{createFile:n,createFileSync:o}=r(9616),{createLink:i,createLinkSync:s}=r(1522),{createSymlink:a,createSymlinkSync:c}=r(5291);e.exports={createFile:n,createFileSync:o,ensureFile:n,ensureFileSync:o,createLink:i,createLinkSync:s,ensureLink:i,ensureLinkSync:s,createSymlink:a,createSymlinkSync:c,ensureSymlink:a,ensureSymlinkSync:c}},1522:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8463),i=r(8737),s=r(3798),{pathExists:a}=r(9288),{areIdentical:c}=r(6462);e.exports={createLink:n((async function(e,t){let r,n;try{r=await i.lstat(t)}catch{}try{n=await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&c(n,r))return;const l=o.dirname(t);await a(l)||await s.mkdirs(l),await i.link(e,t)})),createLinkSync:function(e,t){let r;try{r=i.lstatSync(t)}catch{}try{const t=i.lstatSync(e);if(r&&c(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=o.dirname(t);return i.existsSync(n)||s.mkdirsSync(n),i.linkSync(e,t)}}},3838:(e,t,r)=>{const n=r(8463),o=r(8737),{pathExists:i}=r(9288),s=r(1236).fromPromise;e.exports={symlinkPaths:s((async function(e,t){if(n.isAbsolute(e)){try{await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=n.dirname(t),s=n.join(r,e);if(await i(s))return{toCwd:s,toDst:e};try{await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:n.relative(r,e)}})),symlinkPathsSync:function(e,t){if(n.isAbsolute(e)){if(!o.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=n.dirname(t),i=n.join(r,e);if(o.existsSync(i))return{toCwd:i,toDst:e};if(!o.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(r,e)}}}},7064:(e,t,r)=>{const n=r(8737),o=r(1236).fromPromise;e.exports={symlinkType:o((async function(e,t){if(t)return t;let r;try{r=await n.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"})),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},5291:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8463),i=r(8737),{mkdirs:s,mkdirsSync:a}=r(3798),{symlinkPaths:c,symlinkPathsSync:l}=r(3838),{symlinkType:u,symlinkTypeSync:f}=r(7064),{pathExists:p}=r(9288),{areIdentical:h}=r(6462);e.exports={createSymlink:n((async function(e,t,r){let n;try{n=await i.lstat(t)}catch{}if(n&&n.isSymbolicLink()){const[r,n]=await Promise.all([i.stat(e),i.stat(t)]);if(h(r,n))return}const a=await c(e,t);e=a.toDst;const l=await u(a.toCwd,r),f=o.dirname(t);return await p(f)||await s(f),i.symlink(e,t,l)})),createSymlinkSync:function(e,t,r){let n;try{n=i.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=i.statSync(e),n=i.statSync(t);if(h(r,n))return}const s=l(e,t);e=s.toDst,r=f(s.toCwd,r);const c=o.dirname(t);return i.existsSync(c)||a(c),i.symlinkSync(e,t,r)}}},8737:(e,t,r)=>{const n=r(1236).fromCallback,o=r(5542),i=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof o[e]));Object.assign(t,o),i.forEach((e=>{t[e]=n(o[e])})),t.exists=function(e,t){return"function"==typeof t?o.exists(e,t):new Promise((t=>o.exists(e,t)))},t.read=function(e,t,r,n,i,s){return"function"==typeof s?o.read(e,t,r,n,i,s):new Promise(((s,a)=>{o.read(e,t,r,n,i,((e,t,r)=>{if(e)return a(e);s({bytesRead:t,buffer:r})}))}))},t.write=function(e,t,...r){return"function"==typeof r[r.length-1]?o.write(e,t,...r):new Promise(((n,i)=>{o.write(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesWritten:t,buffer:r})}))}))},t.readv=function(e,t,...r){return"function"==typeof r[r.length-1]?o.readv(e,t,...r):new Promise(((n,i)=>{o.readv(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesRead:t,buffers:r})}))}))},t.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?o.writev(e,t,...r):new Promise(((n,i)=>{o.writev(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesWritten:t,buffers:r})}))}))},"function"==typeof o.realpath.native?t.realpath.native=n(o.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")},1605:(e,t,r)=>{e.exports={...r(8737),...r(4423),...r(2591),...r(6288),...r(3376),...r(3798),...r(2455),...r(7024),...r(9288),...r(5422)}},3376:(e,t,r)=>{const n=r(1236).fromPromise,o=r(2934);o.outputJson=n(r(6426)),o.outputJsonSync=r(2188),o.outputJSON=o.outputJson,o.outputJSONSync=o.outputJsonSync,o.writeJSON=o.writeJson,o.writeJSONSync=o.writeJsonSync,o.readJSON=o.readJson,o.readJSONSync=o.readJsonSync,e.exports=o},2934:(e,t,r)=>{const n=r(2909);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},2188:(e,t,r)=>{const{stringify:n}=r(1144),{outputFileSync:o}=r(7024);e.exports=function(e,t,r){const i=n(t,r);o(e,i,r)}},6426:(e,t,r)=>{const{stringify:n}=r(1144),{outputFile:o}=r(7024);e.exports=async function(e,t,r={}){const i=n(t,r);await o(e,i,r)}},3798:(e,t,r)=>{const n=r(1236).fromPromise,{makeDir:o,makeDirSync:i}=r(8916),s=n(o);e.exports={mkdirs:s,mkdirsSync:i,mkdirp:s,mkdirpSync:i,ensureDir:s,ensureDirSync:i}},8916:(e,t,r)=>{const n=r(8737),{checkPath:o}=r(7111),i=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(o(e),n.mkdir(e,{mode:i(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(o(e),n.mkdirSync(e,{mode:i(t),recursive:!0}))},7111:(e,t,r)=>{const n=r(3217);e.exports.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(n.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}}},2455:(e,t,r)=>{const n=r(1236).fromPromise;e.exports={move:n(r(3314)),moveSync:r(6244)}},6244:(e,t,r)=>{const n=r(8124),o=r(6876),i=r(4423).copySync,s=r(5422).removeSync,a=r(3798).mkdirpSync,c=r(6462);function l(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return i(e,t,n),s(e)}(e,t,r)}}e.exports=function(e,t,r){const i=(r=r||{}).overwrite||r.clobber||!1,{srcStat:u,isChangingCase:f=!1}=c.checkPathsSync(e,t,"move",r);return c.checkParentPathsSync(e,u,t,"move"),function(e){const t=o.dirname(e);return o.parse(t).root===t}(t)||a(o.dirname(t)),function(e,t,r,o){if(o)return l(e,t,r);if(r)return s(t),l(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return l(e,t,r)}(e,t,i,f)}},3314:(e,t,r)=>{const n=r(8737),o=r(6876),{copy:i}=r(4423),{remove:s}=r(5422),{mkdirp:a}=r(3798),{pathExists:c}=r(9288),l=r(6462);e.exports=async function(e,t,r={}){const u=r.overwrite||r.clobber||!1,{srcStat:f,isChangingCase:p=!1}=await l.checkPaths(e,t,"move",r);await l.checkParentPaths(e,f,t,"move");const h=o.dirname(t);return o.parse(h).root!==h&&await a(h),async function(e,t,r,o){if(!o)if(r)await s(t);else if(await c(t))throw new Error("dest already exists.");try{await n.rename(e,t)}catch(n){if("EXDEV"!==n.code)throw n;await async function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await i(e,t,n),s(e)}(e,t,r)}}(e,t,u,p)}},7024:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8737),i=r(9007),s=r(3798),a=r(9288).pathExists;e.exports={outputFile:n((async function(e,t,r="utf-8"){const n=i.dirname(e);return await a(n)||await s.mkdirs(n),o.writeFile(e,t,r)})),outputFileSync:function(e,...t){const r=i.dirname(e);o.existsSync(r)||s.mkdirsSync(r),o.writeFileSync(e,...t)}}},9288:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8737);e.exports={pathExists:n((function(e){return o.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:o.existsSync}},5422:(e,t,r)=>{const n=r(7091),o=r(1236).fromCallback;e.exports={remove:o((function(e,t){n.rm(e,{recursive:!0,force:!0},t)})),removeSync:function(e){n.rmSync(e,{recursive:!0,force:!0})}}},6462:(e,t,r)=>{const n=r(8737),o=r(8485),i=r(1236).fromPromise;function s(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function a(e,t){const r=o.resolve(e).split(o.sep).filter((e=>e)),n=o.resolve(t).split(o.sep).filter((e=>e));return r.every(((e,t)=>n[t]===e))}function c(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:i((async function(e,t,r,i){const{srcStat:l,destStat:u}=await function(e,t,r){const o=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([o(e),o(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}(e,t,i);if(u){if(s(l,u)){const n=o.basename(e),i=o.basename(t);if("move"===r&&n!==i&&n.toLowerCase()===i.toLowerCase())return{srcStat:l,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!l.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(l.isDirectory()&&a(e,t))throw new Error(c(e,t,r));return{srcStat:l,destStat:u}})),checkPathsSync:function(e,t,r,i){const{srcStat:l,destStat:u}=function(e,t,r){let o;const i=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),s=i(e);try{o=i(t)}catch(e){if("ENOENT"===e.code)return{srcStat:s,destStat:null};throw e}return{srcStat:s,destStat:o}}(e,t,i);if(u){if(s(l,u)){const n=o.basename(e),i=o.basename(t);if("move"===r&&n!==i&&n.toLowerCase()===i.toLowerCase())return{srcStat:l,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!l.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(l.isDirectory()&&a(e,t))throw new Error(c(e,t,r));return{srcStat:l,destStat:u}},checkParentPaths:i((async function e(t,r,i,a){const l=o.resolve(o.dirname(t)),u=o.resolve(o.dirname(i));if(u===l||u===o.parse(u).root)return;let f;try{f=await n.stat(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(s(r,f))throw new Error(c(t,i,a));return e(t,r,u,a)})),checkParentPathsSync:function e(t,r,i,a){const l=o.resolve(o.dirname(t)),u=o.resolve(o.dirname(i));if(u===l||u===o.parse(u).root)return;let f;try{f=n.statSync(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(s(r,f))throw new Error(c(t,i,a));return e(t,r,u,a)},isSrcSubdir:a,areIdentical:s}},7211:(e,t,r)=>{const n=r(8737),o=r(1236).fromPromise;e.exports={utimesMillis:o((async function(e,t,r){const o=await n.open(e,"r+");let i=null;try{await n.futimes(o,t,r)}finally{try{await n.close(o)}catch(e){i=e}}if(i)throw i})),utimesMillisSync:function(e,t,r){const o=n.openSync(e,"r+");return n.futimesSync(o,t,r),n.closeSync(o)}}},2909:(e,t,r)=>{let n;try{n=r(1290)}catch(e){n=r(1006)}const o=r(1236),{stringify:i,stripBom:s}=r(1144);const a={readFile:o.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,i=!("throws"in t)||t.throws;let a,c=await o.fromCallback(r.readFile)(e,t);c=s(c);try{a=JSON.parse(c,t?t.reviver:null)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}return a})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,o=!("throws"in t)||t.throws;try{let n=r.readFileSync(e,t);return n=s(n),JSON.parse(n,t.reviver)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:o.fromPromise((async function(e,t,r={}){const s=r.fs||n,a=i(t,r);await o.fromCallback(s.writeFile)(e,a,r)})),writeFileSync:function(e,t,r={}){const o=r.fs||n,s=i(t,r);return o.writeFileSync(e,s,r)}};e.exports=a},1144:e=>{e.exports={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:n=null,spaces:o}={}){const i=r?t:"";return JSON.stringify(e,n,o).replace(/\n/g,t)+i},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},2549:(e,t,r)=>{e.exports=r(9100)},5095:e=>{e.exports=n;var t,r=/\/|\./;function n(e,t){r.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},744:(e,t,r)=>{var n=t,o=r(5643),i=r(3262);function s(e,t,r,n){var i=!1;if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",n);for(var s=t.resolvedType.values,a=Object.keys(s),c=0;c<a.length;++c)s[a[c]]!==t.typeDefault||i||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),t.repeated||e("break"),i=!0),e("case%j:",a[c])("case %i:",s[a[c]])("m%s=%j",n,s[a[c]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var l=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,l)('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,l?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function a(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,r,n,n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('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":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var a=t[n].resolve(),c=i.safeProp(a.name);a.map?(r("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),s(r,a,n,c+"[ks[i]]")("}")("}")):a.repeated?(r("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),s(r,a,n,c+"[i]")("}")("}")):(a.resolvedType instanceof o||r("if(d%s!=null){",c),s(r,a,n,c),a.resolvedType instanceof o||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var r=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],s=[],c=[],l=0;l<t.length;++l)t[l].partOf||(t[l].resolve().repeated?n:t[l].map?s:c).push(t[l]);if(n.length){for(r("if(o.arrays||o.defaults){"),l=0;l<n.length;++l)r("d%s=[]",i.safeProp(n[l].name));r("}")}if(s.length){for(r("if(o.objects||o.defaults){"),l=0;l<s.length;++l)r("d%s={}",i.safeProp(s[l].name));r("}")}if(c.length){for(r("if(o.defaults){"),l=0;l<c.length;++l){var u=c[l],f=i.safeProp(u.name);if(u.resolvedType instanceof o)r("d%s=o.enums===String?%j:%j",f,u.resolvedType.valuesById[u.typeDefault],u.typeDefault);else if(u.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",u.typeDefault.low,u.typeDefault.high,u.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",f)("}else")("d%s=o.longs===String?%j:%i",f,u.typeDefault.toString(),u.typeDefault.toNumber());else if(u.bytes){var p="["+Array.prototype.slice.call(u.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",f,String.fromCharCode.apply(String,u.typeDefault))("else{")("d%s=%s",f,p)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",f,f)("}")}else r("d%s=%j",f,u.typeDefault)}r("}")}var h=!1;for(l=0;l<t.length;++l){u=t[l];var d=e._fieldsArray.indexOf(u);f=i.safeProp(u.name);u.map?(h||(h=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",f,f)("d%s={}",f)("for(var j=0;j<ks2.length;++j){"),a(r,u,d,f+"[ks2[j]]")("}")):u.repeated?(r("if(m%s&&m%s.length){",f,f)("d%s=[]",f)("for(var j=0;j<m%s.length;++j){",f),a(r,u,d,f+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",f,u.name),a(r,u,d,f),u.partOf&&r("if(o.oneofs)")("d%s=%j",i.safeProp(u.partOf.name),u.name)),r("}")}return r("return d")}},7728:(e,t,r)=>{e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var a=e._fieldsArray[r].resolve(),c=a.resolvedType instanceof n?"int32":a.type,l="m"+i.safeProp(a.name);t("case %i: {",a.id),a.map?(t("if(%s===util.emptyObject)",l)("%s={}",l)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[a.keyType]?t("k=%j",o.defaults[a.keyType]):t("k=null"),void 0!==o.defaults[c]?t("value=%j",o.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===o.basic[c]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',l):t("%s[k]=value",l)):a.repeated?(t("if(!(%s&&%s.length))",l,l)("%s=[]",l),void 0!==o.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,c)("}else"),void 0===o.basic[c]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",l,r):t("%s.push(r.%s())",l,c)):void 0===o.basic[c]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",l,r):t("%s=r.%s()",l,c),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var u=e._fieldsArray[r];u.required&&t("if(!m.hasOwnProperty(%j))",u.name)("throw util.ProtocolError(%j,{instance:m})",s(u))}return t("return m")};var n=r(5643),o=r(361),i=r(3262);function s(e){return"missing required '"+e.name+"'"}},1080:(e,t,r)=>{e.exports=function(e){for(var t,r=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var l=a[c].resolve(),u=e._fieldsArray.indexOf(l),f=l.resolvedType instanceof n?"int32":l.type,p=o.basic[f];t="m"+i.safeProp(l.name),l.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(l.id<<3|2)>>>0,8|o.mapKey[l.keyType],l.keyType),void 0===p?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,f,t),r("}")("}")):l.repeated?(r("if(%s!=null&&%s.length){",t,t),l.packed&&void 0!==o.packed[f]?r("w.uint32(%i).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",f,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===p?s(r,l,u,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(l.id<<3|p)>>>0,f,t)),r("}")):(l.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,l.name),void 0===p?s(r,l,u,t):r("w.uint32(%i).%s(%s)",(l.id<<3|p)>>>0,f,t))}return r("return w")};var n=r(5643),o=r(361),i=r(3262);function s(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},5643:(e,t,r)=>{e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="Enum";var o=r(8923),i=r(3262);function s(e,t,r,o,i,s){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.valuesOptions=s,this.reserved=void 0,t)for(var a=Object.keys(t),c=0;c<a.length;++c)"number"==typeof t[a[c]]&&(this.valuesById[this.values[a[c]]=t[a[c]]]=a[c])}s.fromJSON=function(e,t){var r=new s(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,r,n){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=r||null,this},s.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},s.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},1344:(e,t,r)=>{e.exports=l;var n=r(7209);((l.prototype=Object.create(n.prototype)).constructor=l).className="Field";var o,i=r(5643),s=r(361),a=r(3262),c=/^required|optional|repeated$/;function l(e,t,r,o,i,l,u){if(a.isObject(o)?(u=i,l=o,o=i=void 0):a.isObject(i)&&(u=l,l=i,i=void 0),n.call(this,e,l),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==o&&!c.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=r,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=u}l.fromJSON=function(e,t){return new l(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(l.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),l.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},l.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},l.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},l.d=function(e,t,r,n){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(o,i){a.decorateType(o.constructor).add(new l(i,e,t,r,{default:n}))}},l._configure=function(e){o=e}},5325:(e,t,r)=>{var n=e.exports=r(4394);n.build="light",n.load=function(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(1080),n.decoder=r(7728),n.verifier=r(420),n.converter=r(744),n.ReflectionObject=r(7209),n.Namespace=r(8923),n.Root=r(5330),n.Enum=r(5643),n.Type=r(7882),n.Field=r(1344),n.OneOf=r(1457),n.MapField=r(8252),n.Service=r(9687),n.Method=r(8811),n.Message=r(2551),n.wrappers=r(6434),n.types=r(361),n.util=r(3262),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},4394:(e,t,r)=>{var n=t;function o(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(3449),n.BufferWriter=r(818),n.Reader=r(6237),n.BufferReader=r(3158),n.util=r(3610),n.rpc=r(5047),n.roots=r(4529),n.configure=o,o()},9100:(e,t,r)=>{var n=e.exports=r(5325);n.build="full",n.tokenize=r(527),n.parse=r(4863),n.common=r(5095),n.Root._configure(n.Type,n.parse,n.common)},8252:(e,t,r)=>{e.exports=s;var n=r(1344);((s.prototype=Object.create(n.prototype)).constructor=s).className="MapField";var o=r(361),i=r(3262);function s(e,t,r,o,s,a){if(n.call(this,e,t,o,void 0,void 0,s,a),!i.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},s.d=function(e,t,r){return"function"==typeof r?r=i.decorateType(r).name:r&&"object"==typeof r&&(r=i.decorateEnum(r).name),function(n,o){i.decorateType(n.constructor).add(new s(o,e,t,r))}}},2551:(e,t,r)=>{e.exports=o;var n=r(3610);function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},8811:(e,t,r)=>{e.exports=i;var n=r(7209);((i.prototype=Object.create(n.prototype)).constructor=i).className="Method";var o=r(3262);function i(e,t,r,i,s,a,c,l,u){if(o.isObject(s)?(c=s,s=a=void 0):o.isObject(a)&&(c=a,a=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(r))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");n.call(this,e,c),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=l,this.parsedOptions=u}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},8923:(e,t,r)=>{e.exports=f;var n=r(7209);((f.prototype=Object.create(n.prototype)).constructor=f).className="Namespace";var o,i,s,a=r(1344),c=r(3262),l=r(1457);function u(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function f(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function p(e){return e._nestedArray=null,e}f.fromJSON=function(e,t){return new f(e,t.options).addJSON(t.nested)},f.arrayToJSON=u,f.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},f.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(f.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),f.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},f.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?s.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:f.fromJSON)(r[n],t));return this},f.prototype.get=function(e){return this.nested&&this.nested[e]||null},f.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},f.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof o||e instanceof l||e instanceof s||e instanceof i||e instanceof f))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof f&&e instanceof f)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),p(this)},f.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),p(this)},f.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof f))throw Error("path conflicts with non-namespace objects")}else r.add(r=new f(n))}return t&&r.addJSON(t),r},f.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof f?e[t++].resolveAll():e[t++].resolve();return this.resolve()},f.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof f&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof f&&(n=this._nestedArray[o].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},f.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},f.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},f.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},f.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},f._configure=function(e,t,r){o=e,i=t,s=r}},7209:(e,t,r)=>{e.exports=i,i.className="ReflectionObject";var n,o=r(3262);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var i=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var s=i[e];o.setProperty(s,r,t)}else(i={})[e]=o.setProperty({},r,t),n.push(i)}else{var a={};a[e]=t,n.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){n=e}},1457:(e,t,r)=>{e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="OneOf";var o=r(1344),i=r(3262);function s(e,t,r,o){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}a(this)},s.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){i.decorateType(t.constructor).add(new s(r,e)),Object.defineProperty(t,r,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},4863:(e,t,r)=>{e.exports=O,O.filename=null,O.defaults={keepCase:!1};var n=r(527),o=r(5330),i=r(7882),s=r(1344),a=r(8252),c=r(1457),l=r(5643),u=r(9687),f=r(8811),p=r(361),h=r(3262),d=/^[1-9][0-9]*$/,y=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,g=/^-?0[x][0-9a-fA-F]+$/,v=/^0[0-7]+$/,b=/^-?0[0-7]+$/,w=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,k=/^[a-zA-Z_][a-zA-Z_0-9]*$/,_=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,S=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function O(e,t,r){t instanceof o||(r=t,t=new o),r||(r=O.defaults);var x,j,T,E,A,N=r.preferTrailingComment||!1,P=n(e,r.alternateCommentMode||!1),M=P.next,D=P.push,C=P.peek,$=P.skip,B=P.cmnt,F=!0,z=!1,I=t,L=r.keepCase?function(e){return e}:h.camelCase;function R(e,t,r){var n=O.filename;return r||(O.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+P.line+")")}function J(){var e,t=[];do{if('"'!==(e=M())&&"'"!==e)throw R(e);t.push(M()),$(e),e=C()}while('"'===e||"'"===e);return t.join("")}function U(e){var t=M();switch(t){case"'":case'"':return D(t),J();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var r=1;"-"===e.charAt(0)&&(r=-1,e=e.substring(1));switch(e){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(d.test(e))return r*parseInt(e,10);if(m.test(e))return r*parseInt(e,16);if(v.test(e))return r*parseInt(e,8);if(w.test(e))return r*parseFloat(e);throw R(e,"number",t)}(t,!0)}catch(r){if(e&&_.test(t))return t;throw R(t,"value")}}function q(e,t){var r,n;do{!t||'"'!==(r=C())&&"'"!==r?e.push([n=V(M()),$("to",!0)?V(M()):n]):e.push(J())}while($(",",!0));var o={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};X(o,(function(e){if("option"!==e)throw R(e);ee(o,e),$(";")}),(function(){ne(o)}))}function V(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw R(e,"id");if(y.test(e))return parseInt(e,10);if(g.test(e))return parseInt(e,16);if(b.test(e))return parseInt(e,8);throw R(e,"id")}function W(){if(void 0!==x)throw R("package");if(x=M(),!_.test(x))throw R(x,"name");I=I.define(x),$(";")}function G(){var e,t=C();switch(t){case"weak":e=T||(T=[]),M();break;case"public":M();default:e=j||(j=[])}t=J(),$(";"),e.push(t)}function H(){if($("="),E=J(),!(z="proto3"===E)&&"proto2"!==E)throw R(E,"syntax");$(";")}function K(e,t){switch(t){case"option":return ee(e,t),$(";"),!0;case"message":return Z(e,t),!0;case"enum":return Y(e,t),!0;case"service":return function(e,t){if(!k.test(t=M()))throw R(t,"service name");var r=new u(t);X(r,(function(e){if(!K(r,e)){if("rpc"!==e)throw R(e);!function(e,t){var r=B(),n=t;if(!k.test(t=M()))throw R(t,"name");var o,i,s,a,c=t;$("("),$("stream",!0)&&(i=!0);if(!_.test(t=M()))throw R(t);o=t,$(")"),$("returns"),$("("),$("stream",!0)&&(a=!0);if(!_.test(t=M()))throw R(t);s=t,$(")");var l=new f(c,n,o,s,i,a);l.comment=r,X(l,(function(e){if("option"!==e)throw R(e);ee(l,e),$(";")})),e.add(l)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!_.test(t=M()))throw R(t,"reference");var r=t;X(null,(function(t){switch(t){case"required":case"repeated":Q(e,t,r);break;case"optional":Q(e,z?"proto3_optional":"optional",r);break;default:if(!z||!_.test(t))throw R(t);D(t),Q(e,"optional",r)}}))}(e,t),!0}return!1}function X(e,t,r){var n=P.line;if(e&&("string"!=typeof e.comment&&(e.comment=B()),e.filename=O.filename),$("{",!0)){for(var o;"}"!==(o=M());)t(o);$(";",!0)}else r&&r(),$(";"),e&&("string"!=typeof e.comment||N)&&(e.comment=B(n)||e.comment)}function Z(e,t){if(!k.test(t=M()))throw R(t,"type name");var r=new i(t);X(r,(function(e){if(!K(r,e))switch(e){case"map":!function(e){$("<");var t=M();if(void 0===p.mapKey[t])throw R(t,"type");$(",");var r=M();if(!_.test(r))throw R(r,"type");$(">");var n=M();if(!k.test(n))throw R(n,"name");$("=");var o=new a(L(n),V(M()),t,r);X(o,(function(e){if("option"!==e)throw R(e);ee(o,e),$(";")}),(function(){ne(o)})),e.add(o)}(r);break;case"required":case"repeated":Q(r,e);break;case"optional":Q(r,z?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!k.test(t=M()))throw R(t,"name");var r=new c(L(t));X(r,(function(e){"option"===e?(ee(r,e),$(";")):(D(e),Q(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":q(r.extensions||(r.extensions=[]));break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:if(!z||!_.test(e))throw R(e);D(e),Q(r,"optional")}})),e.add(r)}function Q(e,t,r){var n=M();if("group"!==n){for(;n.endsWith(".")||C().startsWith(".");)n+=M();if(!_.test(n))throw R(n,"type");var o=M();if(!k.test(o))throw R(o,"name");o=L(o),$("=");var a=new s(o,V(M()),n,t,r);if(X(a,(function(e){if("option"!==e)throw R(e);ee(a,e),$(";")}),(function(){ne(a)})),"proto3_optional"===t){var l=new c("_"+o);a.setOption("proto3_optional",!0),l.add(a),e.add(l)}else e.add(a);z||!a.repeated||void 0===p.packed[n]&&void 0!==p.basic[n]||a.setOption("packed",!1,!0)}else!function(e,t){var r=M();if(!k.test(r))throw R(r,"name");var n=h.lcFirst(r);r===n&&(r=h.ucFirst(r));$("=");var o=V(M()),a=new i(r);a.group=!0;var c=new s(n,o,r,t);c.filename=O.filename,X(a,(function(e){switch(e){case"option":ee(a,e),$(";");break;case"required":case"repeated":Q(a,e);break;case"optional":Q(a,z?"proto3_optional":"optional");break;case"message":Z(a,e);break;case"enum":Y(a,e);break;default:throw R(e)}})),e.add(a).add(c)}(e,t)}function Y(e,t){if(!k.test(t=M()))throw R(t,"name");var r=new l(t);X(r,(function(e){switch(e){case"option":ee(r,e),$(";");break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!k.test(t))throw R(t,"name");$("=");var r=V(M(),!0),n={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};X(n,(function(e){if("option"!==e)throw R(e);ee(n,e),$(";")}),(function(){ne(n)})),e.add(t,r,n.comment,n.options)}(r,e)}})),e.add(r)}function ee(e,t){var r=$("(",!0);if(!_.test(t=M()))throw R(t,"name");var n,o=t,i=o;r&&($(")"),i=o="("+o+")",t=C(),S.test(t)&&(n=t.slice(1),o+=t,M())),$("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,i,te(e,o),n)}function te(e,t){if($("{",!0)){for(var r={};!$("}",!0);){if(!k.test(A=M()))throw R(A,"name");if(null===A)throw R(A,"end of input");var n,o=A;if($(":",!0),"{"===C())n=te(e,t+"."+A);else if("["===C()){var i;if(n=[],$("[",!0)){do{i=U(!0),n.push(i)}while($(",",!0));$("]"),void 0!==i&&re(e,t+"."+A,i)}}else n=U(!0),re(e,t+"."+A,n);var s=r[o];s&&(n=[].concat(s).concat(n)),r[o]=n,$(",",!0),$(";",!0)}return r}var a=U(!0);return re(e,t,a),a}function re(e,t,r){e.setOption&&e.setOption(t,r)}function ne(e){if($("[",!0)){do{ee(e,"option")}while($(",",!0));$("]")}return e}for(;null!==(A=M());)switch(A){case"package":if(!F)throw R(A);W();break;case"import":if(!F)throw R(A);G();break;case"syntax":if(!F)throw R(A);H();break;case"option":ee(I,A),$(";");break;default:if(K(I,A)){F=!1;continue}throw R(A)}return O.filename=null,{package:x,imports:j,weakImports:T,syntax:E,root:t}}},6237:(e,t,r)=>{e.exports=c;var n,o=r(3610),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var l,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},f=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function p(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw a(this,8);return new i(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=f(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(l=4294967295,function(){if(l=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return l;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return l}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);if(t===r){var n=o.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=f(),n._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},3158:(e,t,r)=>{e.exports=i;var n=r(6237);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(3610);function i(e){n.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},5330:(e,t,r)=>{e.exports=f;var n=r(8923);((f.prototype=Object.create(n.prototype)).constructor=f).className="Root";var o,i,s,a=r(1344),c=r(5643),l=r(1457),u=r(3262);function f(e){n.call(this,"",e),this.deferred=[],this.files=[]}function p(){}f.fromJSON=function(e,t){return t||(t=new f),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},f.prototype.resolvePath=u.path.resolve,f.prototype.fetch=u.fetch,f.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var o=this;if(!n)return u.asPromise(e,o,t,r);var a=n===p;function c(e,t){if(n){if(a)throw e;var r=n;n=null,r(e,t)}}function l(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in s)return r}return null}function f(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){i.filename=e;var n,s=i(t,o,r),f=0;if(s.imports)for(;f<s.imports.length;++f)(n=l(s.imports[f])||o.resolvePath(e,s.imports[f]))&&h(n);if(s.weakImports)for(f=0;f<s.weakImports.length;++f)(n=l(s.weakImports[f])||o.resolvePath(e,s.weakImports[f]))&&h(n,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}a||d||c(null,o)}function h(e,t){if(e=l(e)||e,!(o.files.indexOf(e)>-1))if(o.files.push(e),e in s)a?f(e,s[e]):(++d,setTimeout((function(){--d,f(e,s[e])})));else if(a){var r;try{r=u.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}f(e,r)}else++d,o.fetch(e,(function(r,i){--d,n&&(r?t?d||c(null,o):c(r):f(e,i))}))}var d=0;u.isString(t)&&(t=[t]);for(var y,m=0;m<t.length;++m)(y=o.resolvePath("",t[m]))&&h(y);if(a)return o;d||c(null,o)},f.prototype.loadSync=function(e,t){if(!u.isNode)throw Error("not supported");return this.load(e,t,p)},f.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function d(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.get(n.name)||(n.declaringField=t,t.extensionField=n,r.add(n)),!0}return!1}f.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||d(0,e)||this.deferred.push(e);else if(e instanceof c)h.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof l)){if(e instanceof o)for(var t=0;t<this.deferred.length;)d(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);h.test(e.name)&&(e.parent[e.name]=e)}},f.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)h.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);h.test(e.name)&&delete e.parent[e.name]}},f._configure=function(e,t,r){o=e,i=t,s=r}},4529:e=>{e.exports={}},5047:(e,t,r)=>{t.Service=r(7595)},7595:(e,t,r)=>{e.exports=o;var n=r(3610);function o(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(o.prototype=Object.create(n.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,r,o,i,s){if(!i)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(e,a,t,r,o,i);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,r){if(e)return a.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof o))try{r=o[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},9687:(e,t,r)=>{e.exports=a;var n=r(8923);((a.prototype=Object.create(n.prototype)).constructor=a).className="Service";var o=r(8811),i=r(3262),s=r(5047);function a(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var r=new a(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),i=0;i<n.length;++i)r.add(o.fromJSON(n[i],t.methods[n[i]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},a.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,c(this)):n.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return n.prototype.remove.call(this,e)},a.prototype.create=function(e,t,r){for(var n,o=new s.Service(e,t,r),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((n=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");o[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return o}},527:e=>{e.exports=f;var t=/[\s{}=;:[\],'"()<>]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,i=/^\s*\*?\/*/,s=/\n/g,a=/\s/,c=/\\(.?)/g,l={0:"\0",r:"\r",n:"\n",t:"\t"};function u(e){return e.replace(c,(function(e,t){switch(t){case"\\":case"":return t;default:return l[t]||""}}))}function f(e,c){e=e.toString();var l=0,f=e.length,p=1,h=0,d={},y=[],m=null;function g(e){return Error("illegal "+e+" (line "+p+")")}function v(t){return e.charAt(t)}function b(t,r,n){var a,l={type:e.charAt(t++),lineEmpty:!1,leading:n},u=t-(c?2:3);do{if(--u<0||"\n"===(a=e.charAt(u))){l.lineEmpty=!0;break}}while(" "===a||"\t"===a);for(var f=e.substring(t,r).split(s),y=0;y<f.length;++y)f[y]=f[y].replace(c?i:o,"").trim();l.text=f.join("\n").trim(),d[p]=l,h=p}function w(t){var r=k(t),n=e.substring(t,r);return/^\s*\/\//.test(n)}function k(e){for(var t=e;t<f&&"\n"!==v(t);)t++;return t}function _(){if(y.length>0)return y.shift();if(m)return function(){var t="'"===m?n:r;t.lastIndex=l-1;var o=t.exec(e);if(!o)throw g("string");return l=t.lastIndex,S(m),m=null,u(o[1])}();var o,i,s,h,d,_=0===l;do{if(l===f)return null;for(o=!1;a.test(s=v(l));)if("\n"===s&&(_=!0,++p),++l===f)return null;if("/"===v(l)){if(++l===f)throw g("comment");if("/"===v(l))if(c){if(h=l,d=!1,w(l-1)){d=!0;do{if((l=k(l))===f)break;if(l++,!_)break}while(w(l))}else l=Math.min(f,k(l)+1);d&&(b(h,l,_),_=!0),p++,o=!0}else{for(d="/"===v(h=l+1);"\n"!==v(++l);)if(l===f)return null;++l,d&&(b(h,l-1,_),_=!0),++p,o=!0}else{if("*"!==(s=v(l)))return"/";h=l+1,d=c||"*"===v(h);do{if("\n"===s&&++p,++l===f)throw g("comment");i=s,s=v(l)}while("*"!==i||"/"!==s);++l,d&&(b(h,l-2,_),_=!0),o=!0}}}while(o);var O=l;if(t.lastIndex=0,!t.test(v(O++)))for(;O<f&&!t.test(v(O));)++O;var x=e.substring(l,l=O);return'"'!==x&&"'"!==x||(m=x),x}function S(e){y.push(e)}function O(){if(!y.length){var e=_();if(null===e)return null;S(e)}return y[0]}return Object.defineProperty({next:_,peek:O,push:S,skip:function(e,t){var r=O();if(r===e)return _(),!0;if(!t)throw g("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var t,r=null;return void 0===e?(t=d[p-1],delete d[p-1],t&&(c||"*"===t.type||t.lineEmpty)&&(r=t.leading?t.text:null)):(h<e&&O(),t=d[e],delete d[e],!t||t.lineEmpty||!c&&"/"!==t.type||(r=t.leading?null:t.text)),r}},"line",{get:function(){return p}})}f.unescape=u},7882:(e,t,r)=>{e.exports=v;var n=r(8923);((v.prototype=Object.create(n.prototype)).constructor=v).className="Type";var o=r(5643),i=r(1457),s=r(1344),a=r(8252),c=r(9687),l=r(2551),u=r(6237),f=r(3449),p=r(3262),h=r(1080),d=r(7728),y=r(420),m=r(744),g=r(6434);function v(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function b(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(v.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=p.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=p.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=v.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof l||((e.prototype=new l).constructor=e,p.merge(e.prototype,t)),e.$type=e.prototype.$type=this,p.merge(e,l,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:p.oneOfGetter(this._oneofsArray[r].oneof),set:p.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),v.generateConstructor=function(e){for(var t,r=p.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",p.safeProp(t.name)):t.repeated&&r("this%s=[]",p.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},v.fromJSON=function(e,t){var r=new v(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var l=Object.keys(t.fields),u=0;u<l.length;++u)r.add((void 0!==t.fields[l[u]].keyType?a.fromJSON:s.fromJSON)(l[u],t.fields[l[u]]));if(t.oneofs)for(l=Object.keys(t.oneofs),u=0;u<l.length;++u)r.add(i.fromJSON(l[u],t.oneofs[l[u]]));if(t.nested)for(l=Object.keys(t.nested),u=0;u<l.length;++u){var f=t.nested[l[u]];r.add((void 0!==f.id?s.fromJSON:void 0!==f.fields?v.fromJSON:void 0!==f.values?o.fromJSON:void 0!==f.methods?c.fromJSON:n.fromJSON)(l[u],f))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},v.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return p.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},v.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},v.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},v.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),b(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),b(this)):n.prototype.add.call(this,e)},v.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),b(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),b(this)}return n.prototype.remove.call(this,e)},v.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},v.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},v.prototype.create=function(e){return new this.ctor(e)},v.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=h(this)({Writer:f,types:t,util:p}),this.decode=d(this)({Reader:u,types:t,util:p}),this.verify=y(this)({types:t,util:p}),this.fromObject=m.fromObject(this)({types:t,util:p}),this.toObject=m.toObject(this)({types:t,util:p});var n=g[e];if(n){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(o),o.toObject=this.toObject,this.toObject=n.toObject.bind(o)}return this},v.prototype.encode=function(e,t){return this.setup().encode(e,t)},v.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},v.prototype.decode=function(e,t){return this.setup().decode(e,t)},v.prototype.decodeDelimited=function(e){return e instanceof u||(e=u.create(e)),this.decode(e,e.uint32())},v.prototype.verify=function(e){return this.setup().verify(e)},v.prototype.fromObject=function(e){return this.setup().fromObject(e)},v.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},v.d=function(e){return function(t){p.decorateType(t,e)}}},361:(e,t,r)=>{var n=t,o=r(3262),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var r=0,n={};for(t|=0;r<e.length;)n[i[r+t]]=e[r++];return n}n.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),n.long=s([0,0,0,1,1],7),n.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},3262:(e,t,r)=>{var n,o,i=e.exports=r(3610),s=r(4529);i.codegen=r(8561),i.fetch=r(5212),i.path=r(9207),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},i.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],o=e[r++];void 0!==o&&(t[n]=o)}return t};var a=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var l=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(l,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;n||(n=r(7882));var o=new n(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var u=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=r(5643));var t=new o("Enum"+u++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o||"prototype"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var i=t[o];i&&(n=[].concat(i).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(i,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(r(5330)))}})},2239:(e,t,r)=>{e.exports=o;var n=r(3610);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new o(r,n)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(n.isString(e)){if(!n.Long)return o.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;o.fromHash=function(e){return e===s?i:new o((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},3610:function(e,t,r){var n=t;function o(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)void 0!==e[n[o]]&&r||(e[n[o]]=t[n[o]]);return e}function i(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&o(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}n.asPromise=r(8045),n.base64=r(8839),n.EventEmitter=r(4358),n.float=r(9410),n.inquire=r(4153),n.utf8=r(1447),n.pool=r(9390),n.LongBits=r(2239),n.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=o,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},420:(e,t,r)=>{e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r=e.oneofsArray,n={};r.length&&t("var p={}");for(var c=0;c<e.fieldsArray.length;++c){var l=e._fieldsArray[c].resolve(),u="m"+o.safeProp(l.name);if(l.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",u,l.name),l.map)t("if(!util.isObject(%s))",u)("return%j",i(l,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),a(t,l,"k[i]"),s(t,l,c,u+"[k[i]]")("}");else if(l.repeated)t("if(!Array.isArray(%s))",u)("return%j",i(l,"array"))("for(var i=0;i<%s.length;++i){",u),s(t,l,c,u+"[i]")("}");else{if(l.partOf){var f=o.safeProp(l.partOf.name);1===n[l.partOf.name]&&t("if(p%s===1)",f)("return%j",l.partOf.name+": multiple values"),n[l.partOf.name]=1,t("p%s=1",f)}s(t,l,c,u)}l.optional&&t("}")}return t("return null")};var n=r(5643),o=r(3262);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,r,o){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function a(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",i(t,"boolean key"))}return e}},6434:(e,t,r)=>{var n=t,o=r(2551);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(n);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var s=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),s["@type"]=n,s}return this.toObject(e,t)}}},3449:(e,t,r)=>{e.exports=f;var n,o=r(3610),i=o.LongBits,s=o.base64,a=o.utf8;function c(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function l(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function f(){this.len=0,this.head=new c(l,0,0),this.tail=this.head,this.states=null}var p=function(){return o.Buffer?function(){return(f.create=function(){return new n})()}:function(){return new f}};function h(e,t,r){t[r]=255&e}function d(e,t){this.len=e,this.next=void 0,this.val=t}function y(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}f.create=p(),f.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(f.alloc=o.pool(f.alloc,o.Array.prototype.subarray)),f.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},d.prototype=Object.create(c.prototype),d.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},f.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new d((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},f.prototype.int32=function(e){return e<0?this._push(y,10,i.fromNumber(e)):this.uint32(e)},f.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},f.prototype.uint64=function(e){var t=i.from(e);return this._push(y,t.length(),t)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(y,t.length(),t)},f.prototype.bool=function(e){return this._push(h,1,e?1:0)},f.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},f.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};f.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(o.isString(e)){var r=f.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(g,t,e)},f.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},f.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(l,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 c(l,0,0),this.len=0),this},f.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},f.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},f._configure=function(e){n=e,f.create=p(),n._configure()}},818:(e,t,r)=>{e.exports=i;var n=r(3449);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(3610);function i(){n.call(this)}function s(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()},2747:e=>{e.exports={stdout:!1,stderr:!1}},1236:(e,t)=>{t.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((r,n)=>{t.push(((e,t)=>null!=e?n(e):r(t))),e.apply(this,t)}));e.apply(this,t)}),"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);t.pop(),e.apply(this,t).then((e=>r(null,e)),r)}),"name",{value:e.name})}},9439:()=>{},4641:()=>{},1853:()=>{},1420:()=>{},7356:()=>{},2336:()=>{},8463:()=>{},5542:()=>{},3217:()=>{},8124:()=>{},6876:()=>{},9007:()=>{},7091:()=>{},8485:()=>{},1006:()=>{},1290:()=>{}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.c=__webpack_module_cache__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__=__webpack_require__(__webpack_require__.s=4727),__webpack_exports__ProtobufSerializer=__webpack_exports__.Q;export{__webpack_exports__ProtobufSerializer as ProtobufSerializer};
|
|
1
|
+
import*as __WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__ from"./openhps-core.es.min.js";var __webpack_modules__={1521:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=1521,e.exports=t},4727:(e,t,r)=>{r.d(t,{Q:()=>ProtobufSerializer});const n=(e=>{var t={};return r.d(t,e),t})({ConcreteTypeDescriptor:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.ConcreteTypeDescriptor,DataSerializer:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.DataSerializer,DataSerializerUtils:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.DataSerializerUtils,Deserializer:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.Deserializer,NumberType:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.NumberType,SerializationUtils:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.SerializationUtils,Serializer:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.Serializer,TypedJSON:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.TypedJSON,UUID:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.UUID});var o=r(1853),i=r(2549),s=r(4641),a=r(5248),c=r.n(a),l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},l(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var f=function(){function e(e){this.ctor=e}return e.prototype.getTypes=function(){return[this.ctor]},e.prototype.hasFriendlyName=function(){return"Object"!==this.ctor.name},e}(),p=function(e){function t(t){return e.call(this,t)||this}return u(t,e),t}(f),h=function(e){function t(t){return e.call(this,t)||this}return u(t,e),t}(f);!function(e){function t(t){var r=e.call(this,Array)||this;return r.elementType=t,r}u(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.elementType.getTypes())}}(h);!function(e){function t(t){var r=e.call(this,Set)||this;return r.elementType=t,r}u(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.elementType.getTypes())}}(h);!function(e){function t(t,r,n){var o=e.call(this,Map)||this;return o.keyType=t,o.valueType=r,o.options=n,o}u(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.keyType.getTypes(),this.valueType.getTypes())},t.prototype.getCompleteOptions=function(){var e,t;return{shape:null!==(t=null===(e=this.options)||void 0===e?void 0:e.shape)&&void 0!==t?t:0}}}(h);var d=new p((function(){}));const y="/**\n * OpenHPS Protocol Buffer \n * This file was automatically generated with @openhps/protobuf\n * \n * (c) 2019-2024 Maxim Van de Wynckel & Vrije Universiteit Brussel\n **/\n\n",m=y+'syntax = "proto3";\n\nextend google.protobuf.EnumValueOptions {\n\toptional string className = 1;\n\toptional string packageName = 2;\n}\n';class ProtobufGenerator{constructor(e){this.logger=()=>{},this.options=e}static getNumberType(e){switch(e){case n.NumberType.DECIMAL:case n.NumberType.DOUBLE:return"double";case n.NumberType.FLOAT:return"float";case n.NumberType.LONG:return"int64";case n.NumberType.INTEGER:case n.NumberType.SHORT:return"int32";default:return"string"}}}class ObjectGenerator extends ProtobufGenerator{processObject(e,t){throw new Error("Method not implemented.")}generate(e,t){throw new Error("Method not implemented.")}static typeMapping(e,t,r,o){switch(t.ctor){case String:case Date:return{syntax:"string"};case Number:{const t=r.options,n=t?this.getNumberType(t.numberType):"int32";return"string"===n&&o.logLevel>1&&console.warn(c().yellow(`${e.classType.name}[${r.name}] defines a number without specifing a type. This will affect performance.`)),{syntax:n}}case Boolean:return{syntax:"bool"};case Array:{const n=this.typeMapping(e,t.elementType,r,o);return{syntax:`repeated ${n.syntax}`,types:[n]}}case Map:{const n=this.typeMapping(e,t.keyType,r,o),i=this.typeMapping(e,t.valueType,r,o);if(void 0===n||void 0===i)return;return{syntax:`map<${n.syntax},${i.syntax}>`,types:[i,n]}}case Set:case Object:case Function:return;case Buffer:case Uint8Array:return{syntax:"bytes"};default:{const i=n.DataSerializerUtils.getOwnMetadata(t.ctor);if(i){if(i.knownTypes.size>1&&i.protobuf.generator.type&&i.protobuf.generator.type!==e.classType)return this.typeMapping(n.DataSerializerUtils.getOwnMetadata(i.protobuf.generator.type),t,r,o);if(i.knownTypes.size>1&&!i.protobuf.generator.type&&r&&(o.useAnyType||!i.protobuf.generator.allowOverride))return{syntax:"google.protobuf.Any"};{const e=t.ctor.prototype._module?t.ctor.prototype._module:"@openhps/core";return{syntax:t.ctor.name,package:e}}}return{syntax:"google.protobuf.Any"}}}}static processObject(e,t){var r,o;e.protobuf=null!==(r=e.protobuf)&&void 0!==r?r:{generator:{subModules:new Set,subTypes:[],allowOverride:!0}};const i=e.dataMembers;if(e.knownTypes.size>1){const r=[],s=new Set,a=n.SerializationUtils.cloneDeep(i);e.knownTypes.forEach((t=>{const o=n.DataSerializerUtils.getOwnMetadata(t).dataMembers;s.add(t.prototype._module),t!==e.classType&&t.prototype instanceof e.classType&&r.push(t),o.forEach(((t,r)=>{var o,s,c,l,u,f,p;if(t.options=null!==(o=t.options)&&void 0!==o?o:{},t.options.protobuf=null!==(s=t.options.protobuf)&&void 0!==s?s:{},i.has(r)){if(i.get(r).type().ctor!==t.type().ctor){const r=a.get(t.key);e.protobuf.generator.allowOverride=!1,r.options=null!==(c=r.options)&&void 0!==c?c:{},r.options.protobuf=null!==(l=r.options.protobuf)&&void 0!==l?l:{subMembers:new Map};const n=null!==(u=r.options.protobuf.subMembers)&&void 0!==u?u:new Map,o=t.name+"_"+t.type().ctor.name.toLowerCase();n.set(o,t),t.options=null!==(f=t.options)&&void 0!==f?f:{},t.options.protobuf=null!==(p=t.options.protobuf)&&void 0!==p?p:{},t.options.protobuf.name=o}}else{const e=n.SerializationUtils.cloneDeep(t);e.options.protobuf={optional:!0,subMembers:new Map},a.set(r,e)}}))})),e.protobuf.generator.subTypes=r,e.protobuf.generator.subModules=s,r.length>0&&(1===s.size||!t.useAnyType)&&(e.protobuf.generator.dataMembers=a,e.protobuf.generator.type=null!==(o=e.protobuf.generator.type)&&void 0!==o?o:e.classType,r.forEach((t=>{var r;const o=n.DataSerializerUtils.getOwnMetadata(t);o.protobuf=null!==(r=o.protobuf)&&void 0!==r?r:{generator:{}},o.protobuf.generator.type=e.classType})))}}static createProtoMessage(e,t){var r;const o=n.DataSerializerUtils.getRootMetadata(e.classType),i=null!==(r=e.protobuf.generator.dataMembers)&&void 0!==r?r:e.dataMembers,s=e.classType.prototype._module?e.classType.prototype._module:"@openhps/core",a=[];let c;if(e.knownTypes.size>1&&e.protobuf.generator.subTypes.length>0&&(1===e.protobuf.generator.subModules.size||!t.useAnyType)&&(a.push('import "../../common.proto";'),c=`\nenum ${e.classType.name}Type {\n\tUNSPECIFIED = 0;\n`+[e.classType,...e.protobuf.generator.subTypes].map((e=>`\t${e.name.replace(/(?:^|\.?)(([A-Z0-9][a-z0-9]|$)|([0-9]+[A-Z]))/g,((e,t)=>"_"+t)).replace(/(^_)|(_$)/g,"").toUpperCase()} = ${Array.from(o.knownTypes.values()).indexOf(e)+1} [\n\t\t(className) = "${e.name}",\n\t\t(packageName) = "${e.prototype._module}"\n\t]`)).join(";\n")+";\n}\n"),o.classType!==e.classType){const e=this.typeMapping(o,new n.ConcreteTypeDescriptor(o.classType),void 0,t);e.package&&e.package===s?a.push(`import "${e.syntax}.proto";`):e.package&&a.push(`import "../../${e.package}/${e.syntax}.proto";`)}let l=1;const u=Array.from(i.values()).map((r=>{var n;const o=r.options&&r.options.protobuf?r.options.protobuf:{};let i;const c=null!==(n=o.name)&&void 0!==n?n:r.name;if("uid"===c)i={syntax:"oneof",types:[{syntax:"string",name:"uid_string"},{syntax:"bytes",name:"uid_bytes"}]};else if(r.type()===d)i=o.subMembers&&o.subMembers.size>0?{syntax:"oneof",types:[...Array.from(o.subMembers.keys()).map((r=>{const n=o.subMembers.get(r),i=this.typeMapping(e,n.type(),n,t);return i.name=r,i})),{syntax:"google.protobuf.Any",name:c+"_any"}]}:{syntax:"google.protobuf.Any"};else{if(r.serializer&&void 0===r.type)return;i=this.typeMapping(e,r.type(),r,t)}if(i)return i.package&&i.package===s?a.push(`import "${i.syntax}.proto";`):i.package?a.push(`import "../../${i.package}/${i.syntax}.proto";`):"google.protobuf.Any"===i.syntax&&a.push('import "google/protobuf/any.proto";'),i.types&&i.types.forEach((e=>{e.package&&e.package===s?a.push(`import "${e.syntax}.proto";`):e.package?a.push(`import "../../${e.package}/${e.syntax}.proto";`):"google.protobuf.Any"===e.syntax&&a.push('import "google/protobuf/any.proto";')})),"oneof"===i.syntax?`\toneof ${c} {\n`+i.types.map((e=>`\t\t${e.syntax} ${e.name} = ${l++}`)).join(";\n")+";\n\t}":`\t${!o.optional||i.syntax.includes("<")||i.syntax.includes("repeated")?"":"optional "}${i.syntax} ${c} = ${l++};`})).filter((e=>void 0!==e));return[s,y+`package ${s.replace(/[@/-]/g,"")};\nsyntax = "proto3";\n`+a.filter(((e,t)=>a.indexOf(e)===t)).join("\n")+"\n"+(c||"")+`\nmessage ${e.classType.name} {\n`+(o.protobuf.generator.type?`\t${o.protobuf.generator.type.name}Type _type = 0;\n`:"")+u.join("\n")+"\n}\n"]}}var g=r(1605),v=r(9439);class ProjectGenerator extends n.DataSerializer{static findAllModules(e){var t;const n=v.resolve(v.join(e,"package.json"));if(n===v.resolve(null===(t=r.c[r.s])||void 0===t?void 0:t.path))return[];if(g.existsSync(n)){const e=JSON.parse(g.readFileSync(n,{encoding:"utf-8"})),t=e.dependencies,o=e.devDependencies,i=Object.assign(Object.assign({},t),o);return Object.keys(i).map((e=>{try{return r(1521)(e),r.c[r(1521).resolve(e)]}catch(e){return null}})).filter(Boolean)}}static findModule(e){const t=v.join(e,"package.json");if(g.existsSync(t)){return JSON.parse(g.readFileSync(t,{encoding:"utf-8"})).name}{const t=e.split(v.sep);return t.pop(),this.findModule(t.join(v.sep))}}static loadModules(e,t=r.c[r.s]){void 0!==t?(this._modules.add(t.id),t.exports&&Object.keys(t.exports).forEach((n=>{const o=t.exports[n];e.includes(o)&&(o.prototype._module=this.findModule(v.dirname(r(1521).resolve(t.id))),this._packages.add(o.prototype._module))})),t.children.forEach((t=>{this._modules.has(t.id)||this.loadModules(e,t)}))):Object.values(r.c).map((t=>this.loadModules(e,t)))}static getPackages(){return 0===this._packages.size&&this.loadClasses(),Array.from(this._packages.values())}static loadClasses(){const e=[];return this.findAllModules("./"),this.knownTypes.forEach((t=>{const r=n.DataSerializerUtils.getOwnMetadata(t);r&&e.push(r)})),this.loadModules(e.map((e=>e.classType))),e}static generateProtoMessages(e){return new Promise((t=>{const r=new Map,n=this.loadClasses();n.forEach((t=>{ObjectGenerator.processObject(t,e)})),n.forEach((t=>{e.logLevel>2&&console.log(c().italic(`Generating ${t.classType.name}`,t.classType.prototype._module?`of module ${t.classType.prototype._module}`:""));const n=ObjectGenerator.createProtoMessage(t,e);r.set(t.classType.name,n)})),t(r)}))}static buildProject(e,t={}){return new Promise(((r,n)=>{g.existsSync(e)&&g.rmSync(e,{recursive:!0}),g.mkdirSync(e,{recursive:!0}),t.logLevel>0&&(console.log("Generating protocol buffer messages ..."),console.log("Use of any types = ",t.useAnyType)),ProjectGenerator.generateProtoMessages(t).then((n=>{t.logLevel>0&&console.log("Saving generating protocol buffer messages ..."),n.forEach(((t,r)=>{const n=v.join(e,...t[0].split("."));g.existsSync(n)||g.mkdirsSync(n),g.writeFileSync(v.join(n,r+".proto"),t[1],{encoding:"utf-8"})})),g.writeFileSync(v.join(e,"common.proto"),m,{encoding:"utf-8"}),r(n.size)})).catch(n)}))}}ProjectGenerator._modules=new Set,ProjectGenerator._packages=new Set;"object"==typeof Reflect&&Reflect.getMetadata;function b(e){return"string"==typeof e.name?e.name:"undefined"}var w="__typedJsonJsonObjectMetadataInformation__",k=function(){function e(e){this.dataMembers=new Map,this.knownTypes=new Set,this.knownTypesDeferred=[],this.isExplicitlyMarked=!1,this.isHandledWithoutAnnotation=!1,this.classType=e}return e.getJsonObjectName=function(t){var r=e.getFromConstructor(t);return b(void 0===r?t:r.classType)},e.getFromConstructor=function(t){var r=t.prototype;if(null!=r){var n;if(Object.prototype.hasOwnProperty.call(r,w)&&(n=r[w]),!0===(null==n?void 0:n.isExplicitlyMarked))return n;if(e.doesHandleWithoutAnnotation(t)){var o=new e(t);return o.isExplicitlyMarked=!0,o}}},e.ensurePresentInPrototype=function(t){if(Object.prototype.hasOwnProperty.call(t,w))return t[w];var r=new e(t.constructor),n=t[w];return void 0!==n&&(n.dataMembers.forEach((function(e,t){r.dataMembers.set(t,e)})),n.knownTypes.forEach((function(e){r.knownTypes.add(e)})),r.typeResolver=n.typeResolver,r.typeHintEmitter=n.typeHintEmitter),Object.defineProperty(t,w,{enumerable:!1,configurable:!1,writable:!1,value:r}),r},e.getKnownTypeNameFromType=function(t){var r=e.getFromConstructor(t);return b(void 0===r?t:r.classType)},e.doesHandleWithoutAnnotation=function(e){return-1!==[Date,Number,String,Boolean].indexOf(e)||function(e){return-1!==[Float32Array,Float64Array,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array].indexOf(e)}(e)||e===DataView||e===ArrayBuffer},e.prototype.processDeferredKnownTypes=function(){var e=this;this.knownTypesDeferred.forEach((function(t){t().getTypes().forEach((function(t){return e.knownTypes.add(t)}))})),this.knownTypesDeferred=[]},e}();class InternalProtobufDeserializer extends n.Deserializer{constructor(){super(),InternalProtobufDeserializer.primitiveWrapper=new i.Type("PrimitiveWrapperMessage"),InternalProtobufDeserializer.primitiveWrapper.add(new i.Field("value",1,"string")),this.setDeserializationStrategy(Number,(e=>"number"==typeof e?e:"string"==typeof e?Number(e):e.toNumber?e.toNumber():e)),this.setDeserializationStrategy(Map,((e,t,r,n,o,i,s)=>{const a=new Map;return Object.keys(e).forEach((c=>{a.set(c,o.convertSingleValue(e[c],t.valueType,r,n,i,s))})),a}))}convertSingleValue(e,t,r,o,i,s){if(this.retrievePreserveNull(i)&&null===e)return null;if(!n.TypedJSON.utils.isValueDefined(e))return;const a=this.deserializationStrategy.get(t.ctor);if(void 0!==a)return a(e,t,r,o,this,i,s);if("object"==typeof e)return this.convertAsObject(e,t,r,o,this,i,s);let c=`Could not deserialize '${o}'; don't know how to deserialize type`;t.hasFriendlyName()&&(c+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${c}.`))}convertAsObject(e,t,r,o,i,s,a){let c=t.ctor,l=k.getFromConstructor(c);if(e.hasOwnProperty("_type")&&0!==e._type){const t=l.protobuf.enumMapping.get(e._type);if(t){const e=r.get(t);e!==c&&(c=e,l=k.getFromConstructor(c))}}else if(e.type_url&&e.value){const t=a.types.get(e.type_url).decode(e.value);return this.convertAsObject(t,new n.ConcreteTypeDescriptor(r.get(e.type_url)),r,o,i,s,a)}const u=l,f={};u.dataMembers.forEach(((t,o)=>{var s;const c=`${n.TypedJSON.utils.nameof(u.classType)}.${o}`,l=n.TypedJSON.options.mergeOptions(u.options,t.options),p=null!==(s=l&&l.protobuf?l.protobuf.name:t.name)&&void 0!==s?s:t.name,h=e[p];let y;if("uid"===t.name)if(e.hasOwnProperty("uid_bytes")&&e.uid_bytes.byteLength>0)y=n.UUID.fromBuffer(e.uid_bytes).toString();else{if(!e.hasOwnProperty("uid_string"))return;y=e.uid_string}else{if(!e.hasOwnProperty(p)||!h)return;if(t.type()===d&&h.type_url){const t=a.types.get(e[p].type_url);if(t){const e=t.decode(h.value);y=i.convertSingleValue(e,new n.ConcreteTypeDescriptor(r.get(h.type_url)),r,c,l,a)}else if(h.value){const e=InternalProtobufDeserializer.primitiveWrapper.decode(h.value);switch(h.type_url){case"Boolean":y=Boolean(e.value);break;case"Number":y=Number(e.value);break;default:y=e.value}}}else y=i.convertSingleValue(h,t.type(),r,c,l,a)}n.TypedJSON.utils.isValueDefined(y)&&(f[t.key]=y)}));const p=i.instantiateType(c);Object.assign(p,f);const h=l.onDeserializedMethodName;return null!=h&&("function"==typeof p[h]?p[h]():"function"==typeof p.constructor[h]?p.constructor[h]():i.getErrorHandler()(new TypeError(`onDeserialized callback'${n.TypedJSON.utils.nameof(l.classType)}.${h}' is not a method.`))),p}}class InternalProtobufSerializer extends n.Serializer{constructor(){super(),this.setSerializationStrategy(Map,this.convertAsMap.bind(this)),InternalProtobufSerializer.primitiveWrapper=new i.Type("PrimitiveWrapperMessage"),InternalProtobufSerializer.primitiveWrapper.add(new i.Field("value",1,"string"))}convertSingleValue(e,t,r,o,i){if(!n.TypedJSON.utils.isValueDefined(e))return;if(!n.TypedJSON.utils.isInstanceOf(e,t.ctor)){const o=n.TypedJSON.utils.nameof(t.ctor),i=n.TypedJSON.utils.nameof(e.constructor);return void this.errorHandler(new TypeError(`Could not serialize '${r}': expected '${o}', got '${i}'.`))}const s=this.serializationStrategy.get(t.ctor);if(void 0!==s)return s(e,t,r,this,o,i);if("object"==typeof e)return this.convertAsObject(e,t,r,this,o,i);let a=`Could not serialize '${r}'; don't know how to serialize type`;t.hasFriendlyName()&&(a+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${a}.`))}convertAsObject(e,t,r,o,i,s){const a=k.getFromConstructor(t.ctor);let c,l=k.getFromConstructor(e.constructor);l||(l=a);const u=l;c={};const f=n.TypedJSON.options.mergeOptions(o.options,u.options);u.dataMembers.forEach((t=>{var r;const o=n.TypedJSON.options.mergeOptions(f,t.options);let i,a=null!==(r=o&&o.protobuf?o.protobuf.name:t.name)&&void 0!==r?r:t.name;if(void 0!==e[t.key]){if(null==t.type)throw new TypeError(`Could not serialize ${t.name}, there is no constructor nor serialization function to use.`);if("uid"===t.name){const r=n.UUID.fromString(e[t.key]);r?(i=r.toBuffer(),a+="_bytes"):(i=e[t.key],a+="_string")}else{const r=l.protobuf.messageType.get(t.name);i=this.convertSingleValue(e[t.key],t.type(),`${n.TypedJSON.utils.nameof(u.classType)}.${t.key}`,o,Object.assign(Object.assign({},s),{field:r}))}if(n.TypedJSON.utils.isValueDefined(i)){if(t.type()===d){const r=s.types.get(e[t.key].constructor.name);if(r){const n=r.create(i);i={type_url:e[t.key].constructor.name,value:r.encode(n).finish()}}else{const r=InternalProtobufSerializer.primitiveWrapper.create({value:String(e[t.key])});i={type_url:e[t.key].constructor.name,value:InternalProtobufSerializer.primitiveWrapper.encode(r).finish()}}}c[a]=i}}}));const p=s.field&&"google.protobuf.Any"===s.field.type;if(!p&&a.knownTypes.size>1){const e=l.protobuf.messageType.create(Object.assign(Object.assign({},c),{_type:l.protobuf.messageTypeEnum}));c=e}else if(p){const t=l.protobuf.messageType,r=t.create(c);c={type_url:e.constructor.name,value:t.encode(r).finish()}}return c}convertAsMap(e,t,r,n,o,i){const s={};return e.forEach(((e,a)=>{s[a]=n.convertSingleValue(e,t.valueType,r,o,i)})),s}}class ProtobufSerializer extends n.DataSerializer{static getFiles(e,t=[]){if(!s.statSync(e).isDirectory())return[];const r=s.readdirSync(o.normalize(e));for(const n of r){const r=`${e}/${n}`;s.statSync(r).isDirectory()?this.getFiles(r,t):r.endsWith(".proto")&&t.push(o.normalize(r))}return t}static initialize(e){return new Promise(((t,r)=>{ProtobufSerializer.root=new i.Root,Promise.resolve(e?Promise.resolve():ProjectGenerator.buildProject(o.resolve("tmp"))).then((()=>{const t=this.getFiles(o.resolve(null!=e?e:"tmp")),s=new Promise((e=>{ProtobufSerializer.root.load(t,{keepCase:!0}).then((()=>{t.forEach((e=>{const t=o.parse(e).name;if(this.knownTypes.get(t)){const e=n.DataSerializerUtils.getOwnMetadata(this.knownTypes.get(t)),r=n.DataSerializerUtils.getRootMetadata(this.knownTypes.get(t)),o=ProtobufSerializer.root.lookupType(t);let i;const s=new Map;try{const e=ProtobufSerializer.root.lookupEnum(`${r.classType.name}Type`);Object.keys(e.values).forEach(((r,n)=>{if(0===n)return;e.valuesOptions[r]["(className)"]===t&&(i=e.values[r]),s.set(e.values[r],e.valuesOptions[r]["(className)"])}))}catch(e){}e.protobuf={messageType:o,messageTypeEnum:i,enumMapping:s},this.options.types.set(t,o)}})),e()})).catch((e=>r(e)))}));return this.wrapperMessage=new i.Type("WrapperMessage"),this.wrapperMessage.add(new i.Field("data",1,"google.protobuf.Any")),this.wrapperMessage.addJSON(i.common["google/protobuf/any.proto"].nested),s})).then((()=>{t()})).catch(r)}))}static serialize(e,t){const r=super.serialize(e,Object.assign(Object.assign({},this.options),t)),n=this.options.types.get(e.constructor.name),o=n.fromObject(r),i=this.wrapperMessage.create({data:{type_url:e.constructor.name,value:n.encode(o).finish()}});return this.wrapperMessage.encode(i).finish()}static deserialize(e,t,r){const o=this.wrapperMessage.decode(e),i=o.data.type_url,s=this.options.types.get(i).decode(o.data.value),a=null!=t?t:this.knownTypes.get(i);return this.options.deserializer.convertSingleValue(s,n.DataSerializerUtils.ensureTypeDescriptor(a),n.DataSerializer.knownTypes,void 0,void 0,Object.assign(Object.assign({},r),this.options))}}ProtobufSerializer.options={serializer:new InternalProtobufSerializer,deserializer:new InternalProtobufDeserializer,types:new Map}},8045:e=>{e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,o=2,i=!0;for(;o<arguments.length;)r[n++]=arguments[o++];return new Promise((function(o,s){r[n]=function(e){if(i)if(i=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];o.apply(null,t)}};try{e.apply(t||null,r)}catch(e){i&&(i=!1,s(e))}}))}},8839:(e,t)=>{var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),o=new Array(123),i=0;i<64;)o[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;r.encode=function(e,t,r){for(var o,i=null,s=[],a=0,c=0;t<r;){var l=e[t++];switch(c){case 0:s[a++]=n[l>>2],o=(3&l)<<4,c=1;break;case 1:s[a++]=n[o|l>>4],o=(15&l)<<2,c=2;break;case 2:s[a++]=n[o|l>>6],s[a++]=n[63&l],c=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return c&&(s[a++]=n[o],s[a++]=61,1===c&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(e,t,r){for(var n,i=r,a=0,c=0;c<e.length;){var l=e.charCodeAt(c++);if(61===l&&a>1)break;if(void 0===(l=o[l]))throw Error(s);switch(a){case 0:n=l,a=1;break;case 1:t[r++]=n<<2|(48&l)>>4,n=l,a=2;break;case 2:t[r++]=(15&n)<<4|(60&l)>>2,n=l,a=3;break;case 3:t[r++]=(3&n)<<6|l,a=0}}if(1===a)throw Error(s);return r-i},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},8561:e=>{function t(e,r){"string"==typeof e&&(r=e,e=void 0);var n=[];function o(e){if("string"!=typeof e){var r=i();if(t.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var s=Object.keys(e),a=new Array(s.length+1),c=new Array(s.length),l=0;l<s.length;)a[l]=s[l],c[l]=e[s[l++]];return a[l]=r,Function.apply(null,a).apply(null,c)}return Function(r)()}for(var u=new Array(arguments.length-1),f=0;f<u.length;)u[f]=arguments[++f];if(f=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=u[f++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),f!==u.length)throw Error("parameter count mismatch");return n.push(e),o}function i(t){return"function "+(t||r||"")+"("+(e&&e.join(",")||"")+"){\n "+n.join("\n ")+"\n}"}return o.toString=i,o}e.exports=t,t.verbose=!1},4358:e=>{function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},5212:(e,t,r)=>{e.exports=i;var n=r(8045),o=r(4153)("fs");function i(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&o&&o.readFile?o.readFile(e,(function(n,o){return n&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,r):n?r(n):r(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,r):n(i,this,e,t)}i.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var o=0;o<n.responseText.length;++o)e.push(255&n.responseText.charCodeAt(o))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},9410:e=>{function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3]}function i(e,n,o){t[0]=e,n[o]=r[3],n[o+1]=r[2],n[o+2]=r[1],n[o+3]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function a(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o,e.readFloatLE=n?s:a,e.readFloatBE=n?a:s}():function(){function t(e,t,r,n){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function s(e,t,r){var n=e(t,r),o=2*(n>>31)+1,i=n>>>23&255,s=8388607&n;return 255===i?s?NaN:o*(1/0):0===i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=s.bind(null,o),e.readFloatBE=s.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3],n[o+4]=r[4],n[o+5]=r[5],n[o+6]=r[6],n[o+7]=r[7]}function i(e,n,o){t[0]=e,n[o]=r[7],n[o+1]=r[6],n[o+2]=r[5],n[o+3]=r[4],n[o+4]=r[3],n[o+5]=r[2],n[o+6]=r[1],n[o+7]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function a(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o,e.readDoubleLE=n?s:a,e.readDoubleBE=n?a:s}():function(){function t(e,t,r,n,o,i){var s=n<0?1:0;if(s&&(n=-n),0===n)e(0,o,i+t),e(1/n>0?0:2147483648,o,i+r);else if(isNaN(n))e(0,o,i+t),e(2146959360,o,i+r);else if(n>17976931348623157e292)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+r);else{var a;if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+r);else{var c=Math.floor(Math.log(n)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(a=n*Math.pow(2,-c))>>>0,o,i+t),e((s<<31|c+1023<<20|1048576*a&1048575)>>>0,o,i+r)}}}function s(e,t,r,n,o){var i=e(n,o+t),s=e(n,o+r),a=2*(s>>31)+1,c=s>>>20&2047,l=4294967296*(1048575&s)+i;return 2047===c?l?NaN:a*(1/0):0===c?5e-324*a*l:a*Math.pow(2,c-1075)*(l+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=s.bind(null,o,0,4),e.readDoubleBE=s.bind(null,i,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},4153:module=>{function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},9207:(e,t)=>{var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),o="";r&&(o=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):r?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return o+t.join("/")};r.resolve=function(e,t,r){return r||(t=o(t)),n(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},9390:e=>{e.exports=function(e,t,r){var n=r||8192,o=n>>>1,i=null,s=n;return function(r){if(r<1||r>o)return e(r);s+r>n&&(i=e(n),s=0);var a=t.call(i,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},1447:(e,t)=>{var r=t;r.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},r.read=function(e,t,r){if(r-t<1)return"";for(var n,o=null,i=[],s=0;t<r;)(n=e[t++])<128?i[s++]=n:n>191&&n<224?i[s++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[s++]=55296+(n>>10),i[s++]=56320+(1023&n)):i[s++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))},r.write=function(e,t,r){for(var n,o,i=r,s=0;s<e.length;++s)(n=e.charCodeAt(s))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(o=e.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&o),++s,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-i}},4083:(e,t,r)=>{e=r.nmd(e);const n=(e,t)=>(...r)=>`[${e(...r)+t}m`,o=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`},i=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`},s=e=>e,a=(e,t,r)=>[e,t,r],c=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let l;const u=(e,t,n,o)=>{void 0===l&&(l=r(248));const i=o?10:0,s={};for(const[r,o]of Object.entries(l)){const a="ansi16"===r?"ansi":r;r===t?s[a]=e(n,i):"object"==typeof o&&(s[a]=e(o[t],i))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,n]of Object.entries(t)){for(const[r,o]of Object.entries(n))t[r]={open:`[${o[0]}m`,close:`[${o[1]}m`},n[r]=t[r],e.set(o[0],o[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="[39m",t.bgColor.close="[49m",c(t.color,"ansi",(()=>u(n,"ansi16",s,!1))),c(t.color,"ansi256",(()=>u(o,"ansi256",s,!1))),c(t.color,"ansi16m",(()=>u(i,"rgb",a,!1))),c(t.bgColor,"ansi",(()=>u(n,"ansi16",s,!0))),c(t.bgColor,"ansi256",(()=>u(o,"ansi256",s,!0))),c(t.bgColor,"ansi16m",(()=>u(i,"rgb",a,!0))),t}})},4389:(e,t,r)=>{const n=r(8156),o={};for(const e of Object.keys(n))o[n[e]]=e;const i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=i;for(const e of Object.keys(i)){if(!("channels"in i[e]))throw new Error("missing channels property: "+e);if(!("labels"in i[e]))throw new Error("missing channel labels property: "+e);if(i[e].labels.length!==i[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:t}),Object.defineProperty(i[e],"labels",{value:r})}i.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),s=i-o;let a,c;i===o?a=0:t===i?a=(r-n)/s:r===i?a=2+(n-t)/s:n===i&&(a=4+(t-r)/s),a=Math.min(60*a,360),a<0&&(a+=360);const l=(o+i)/2;return c=i===o?0:l<=.5?s/(i+o):s/(2-i-o),[a,100*c,100*l]},i.rgb.hsv=function(e){let t,r,n,o,i;const s=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(s,a,c),u=l-Math.min(s,a,c),f=function(e){return(l-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/l,t=f(s),r=f(a),n=f(c),s===l?o=n-r:a===l?o=1/3+t-n:c===l&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*l]},i.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const o=i.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,100*s,100*n]},i.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n);return[100*((1-t-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*o]},i.rgb.keyword=function(e){const t=o[e];if(t)return t;let r,i=1/0;for(const t of Object.keys(n)){const o=n[t],c=(a=o,((s=e)[0]-a[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2);c<i&&(i=c,r=t)}var s,a;return r},i.keyword.rgb=function(e){return n[e]},i.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},i.rgb.lab=function(e){const t=i.rgb.xyz(e);let r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*n-16,500*(r-n),200*(n-o)]},i.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let o,i,s;if(0===r)return s=255*n,[s,s,s];o=n<.5?n*(1+r):n+r-n*r;const a=2*n-o,c=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(o-a)*i:2*i<1?o:3*i<2?a+(o-a)*(2/3-i)*6:a,c[e]=255*s;return c},i.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,o=r;const i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;return[t,100*(0===n?2*o/(i+o):2*r/(n+r)),100*((n+r)/2)]},i.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}},i.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01);let i,s;s=(2-r)*n;const a=(2-r)*o;return i=r*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,100*i,100*s]},i.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const o=r+n;let i;o>1&&(r/=o,n/=o);const s=Math.floor(6*t),a=1-n;i=6*t-s,1&s&&(i=1-i);const c=r+i*(a-r);let l,u,f;switch(s){default:case 6:case 0:l=a,u=c,f=r;break;case 1:l=c,u=a,f=r;break;case 2:l=r,u=a,f=c;break;case 3:l=r,u=c,f=a;break;case 4:l=c,u=r,f=a;break;case 5:l=a,u=r,f=c}return[255*l,255*u,255*f]},i.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},i.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let o,i,s;return o=3.2406*t+-1.5372*r+-.4986*n,i=-.9689*t+1.8758*r+.0415*n,s=.0557*t+-.204*r+1.057*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[255*o,255*i,255*s]},i.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},i.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const o=r**3,i=t**3,s=n**3;return r=o>.008856?o:(r-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},i.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let o;o=360*Math.atan2(n,r)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(r*r+n*n),o]},i.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},i.rgb.ansi16=function(e,t=null){const[r,n,o]=e;let s=null===t?i.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===s&&(a+=60),a},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},i.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},i.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),s=o-i;let a,c;return a=s<1?i/(1-s):0,c=s<=0?0:o===t?(r-n)/s%6:o===r?2+(n-t)/s:4+(t-r)/s,c/=6,c%=1,[360*c,100*s,100*a]},i.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],100*n,100*o]},i.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},i.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const o=[0,0,0],i=t%1*6,s=i%1,a=1-s;let c=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return c=(1-r)*n,[255*(r*o[0]+c),255*(r*o[1]+c),255*(r*o[2]+c)]},i.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},i.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},i.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},i.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},248:(e,t,r)=>{const n=r(4389),o=r(7913),i={};Object.keys(n).forEach((e=>{i[e]={},Object.defineProperty(i[e],"channels",{value:n[e].channels}),Object.defineProperty(i[e],"labels",{value:n[e].labels});const t=o(e);Object.keys(t).forEach((r=>{const n=t[r];i[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(n),i[e][r].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=i},7913:(e,t,r)=>{const n=r(4389);function o(e){const t=function(){const e={},t=Object.keys(n);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),o=Object.keys(n[e]);for(let n=o.length,i=0;i<n;i++){const n=o[i],s=t[n];-1===s.distance&&(s.distance=t[e].distance+1,s.parent=e,r.unshift(n))}}return t}function i(e,t){return function(r){return t(e(r))}}function s(e,t){const r=[t[e].parent,e];let o=n[t[e].parent][e],s=t[e].parent;for(;t[s].parent;)r.unshift(t[s].parent),o=i(n[t[s].parent][s],o),s=t[s].parent;return o.conversion=r,o}e.exports=function(e){const t=o(e),r={},n=Object.keys(t);for(let e=n.length,o=0;o<e;o++){const e=n[o];null!==t[e].parent&&(r[e]=s(e,t))}return r}},5248:(e,t,r)=>{const n=r(4083),{stdout:o,stderr:i}=r(2747),{stringReplaceAll:s,stringEncaseCRLFWithFirstIndex:a}=r(4058),{isArray:c}=Array,l=["ansi","ansi","ansi256","ansi16m"],u=Object.create(null);class ChalkClass{constructor(e){return f(e)}}const f=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=o?o.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>b(t.template,...e),Object.setPrototypeOf(t,p.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=ChalkClass,t.template};function p(e){return f(e)}for(const[e,t]of Object.entries(n))u[e]={get(){const r=m(this,y(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};u.visible={get(){const e=m(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of h)u[e]={get(){const{level:t}=this;return function(...r){const o=y(n.color[l[t]][e](...r),n.color.close,this._styler);return m(this,o,this._isEmpty)}}};for(const e of h){u["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const o=y(n.bgColor[l[t]][e](...r),n.bgColor.close,this._styler);return m(this,o,this._isEmpty)}}}}const d=Object.defineProperties((()=>{}),{...u,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),y=(e,t,r)=>{let n,o;return void 0===r?(n=e,o=t):(n=r.openAll+e,o=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:o,parent:r}},m=(e,t,r)=>{const n=(...e)=>c(e[0])&&c(e[0].raw)?g(n,b(n,...e)):g(n,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(n,d),n._generator=e,n._styler=t,n._isEmpty=r,n},g=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:n,closeAll:o}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=s(t,r.close,r.open),r=r.parent;const i=t.indexOf("\n");return-1!==i&&(t=a(t,o,n,i)),n+t+o};let v;const b=(e,...t)=>{const[n]=t;if(!c(n)||!c(n.raw))return t.join(" ");const o=t.slice(1),i=[n.raw[0]];for(let e=1;e<n.length;e++)i.push(String(o[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===v&&(v=r(2991)),v(e,i.join(""))};Object.defineProperties(p.prototype,u);const w=p();w.supportsColor=o,w.stderr=p({level:i?i.level:0}),w.stderr.supportsColor=i,e.exports=w},2991:e=>{const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,o=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,i=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):i.get(e)||e}function a(e,t){const r=[],i=t.trim().split(/\s*,\s*/g);let a;for(const t of i){const i=Number(t);if(Number.isNaN(i)){if(!(a=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(a[2].replace(o,((e,t,r)=>t?s(t):r)))}else r.push(i)}return r}function c(e){r.lastIndex=0;const t=[];let n;for(;null!==(n=r.exec(e));){const e=n[1];if(n[2]){const r=a(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function l(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in n))throw new Error(`Unknown Chalk style: ${e}`);n=t.length>0?n[e](...t):n[e]}return n}e.exports=(e,r)=>{const n=[],o=[];let i=[];if(r.replace(t,((t,r,a,u,f,p)=>{if(r)i.push(s(r));else if(u){const t=i.join("");i=[],o.push(0===n.length?t:l(e,n)(t)),n.push({inverse:a,styles:c(u)})}else if(f){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");o.push(l(e,n)(i.join(""))),i=[],n.pop()}else i.push(p)})),o.push(i.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return o.join("")}},4058:e=>{e.exports={stringReplaceAll:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return e;const o=t.length;let i=0,s="";do{s+=e.substr(i,n-i)+t+r,i=n+o,n=e.indexOf(t,i)}while(-1!==n);return s+=e.substr(i),s},stringEncaseCRLFWithFirstIndex:(e,t,r,n)=>{let o=0,i="";do{const s="\r"===e[n-1];i+=e.substr(o,(s?n-1:n)-o)+t+(s?"\r\n":"\n")+r,o=n+1,n=e.indexOf("\n",o)}while(-1!==n);return i+=e.substr(o),i}}},8156:e=>{e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},3876:(e,t,r)=>{const n=r(1420),o=r(7356),i=r(3798).mkdirsSync,s=r(7211).utimesMillisSync,a=r(6462);function c(e,t,r,i){const s=(i.dereference?n.statSync:n.lstatSync)(t);if(s.isDirectory())return function(e,t,r,o,i){return t?f(r,o,i):function(e,t,r,o){return n.mkdirSync(r),f(t,r,o),u(r,e)}(e.mode,r,o,i)}(s,e,t,r,i);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return function(e,t,r,o,i){return t?function(e,t,r,o){if(o.overwrite)return n.unlinkSync(r),l(e,t,r,o);if(o.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,o,i):l(e,r,o,i)}(s,e,t,r,i);if(s.isSymbolicLink())return function(e,t,r,i){let s=n.readlinkSync(t);i.dereference&&(s=o.resolve(process.cwd(),s));if(e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(s,r);throw e}if(i.dereference&&(e=o.resolve(process.cwd(),e)),a.isSrcSubdir(s,e))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(a.isSrcSubdir(e,s))throw new Error(`Cannot overwrite '${e}' with '${s}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(s,r)}return n.symlinkSync(s,r)}(e,t,r,i);if(s.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(s.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function l(e,t,r,o){return n.copyFileSync(t,r),o.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){u(e,128|t)}(r,e);(function(e,t){const r=n.statSync(e);s(t,r.atime,r.mtime)})(t,r)}(e.mode,t,r),u(r,e.mode)}function u(e,t){return n.chmodSync(e,t)}function f(e,t,r){n.readdirSync(e).forEach((n=>function(e,t,r,n){const i=o.join(t,e),s=o.join(r,e);if(n.filter&&!n.filter(i,s))return;const{destStat:l}=a.checkPathsSync(i,s,"copy",n);return c(l,i,s,n)}(n,e,t,r)))}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:s,destStat:l}=a.checkPathsSync(e,t,"copy",r);if(a.checkParentPathsSync(e,s,t,"copy"),r.filter&&!r.filter(e,t))return;const u=o.dirname(t);return n.existsSync(u)||i(u),c(l,e,t,r)}},4994:(e,t,r)=>{const n=r(8737),o=r(7356),{mkdirs:i}=r(3798),{pathExists:s}=r(9288),{utimesMillis:a}=r(7211),c=r(6462);async function l(e,t,r){return!r.filter||r.filter(e,t)}async function u(e,t,r,i){const s=i.dereference?n.stat:n.lstat,a=await s(t);if(a.isDirectory())return async function(e,t,r,i,s){t||await n.mkdir(i);const a=await n.readdir(r);await Promise.all(a.map((async e=>{const t=o.join(r,e),n=o.join(i,e);if(!await l(t,n,s))return;const{destStat:a}=await c.checkPaths(t,n,"copy",s);return u(a,t,n,s)}))),t||await n.chmod(i,e.mode)}(a,e,t,r,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return async function(e,t,r,o,i){if(!t)return f(e,r,o,i);if(i.overwrite)return await n.unlink(o),f(e,r,o,i);if(i.errorOnExist)throw new Error(`'${o}' already exists`)}(a,e,t,r,i);if(a.isSymbolicLink())return async function(e,t,r,i){let s=await n.readlink(t);i.dereference&&(s=o.resolve(process.cwd(),s));if(!e)return n.symlink(s,r);let a=null;try{a=await n.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlink(s,r);throw e}i.dereference&&(a=o.resolve(process.cwd(),a));if(c.isSrcSubdir(s,a))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`);if(c.isSrcSubdir(a,s))throw new Error(`Cannot overwrite '${a}' with '${s}'.`);return await n.unlink(r),n.symlink(s,r)}(e,t,r,i);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function f(e,t,r,o){if(await n.copyFile(t,r),o.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const o=await n.stat(t);await a(r,o.atime,o.mtime)}return n.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:n,destStat:a}=await c.checkPaths(e,t,"copy",r);if(await c.checkParentPaths(e,n,t,"copy"),!await l(e,t,r))return;const f=o.dirname(t);await s(f)||await i(f),await u(a,e,t,r)}},4423:(e,t,r)=>{const n=r(1236).fromPromise;e.exports={copy:n(r(4994)),copySync:r(3876)}},2591:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8737),i=r(2336),s=r(3798),a=r(5422),c=n((async function(e){let t;try{t=await o.readdir(e)}catch{return s.mkdirs(e)}return Promise.all(t.map((t=>a.remove(i.join(e,t)))))}));function l(e){let t;try{t=o.readdirSync(e)}catch{return s.mkdirsSync(e)}t.forEach((t=>{t=i.join(e,t),a.removeSync(t)}))}e.exports={emptyDirSync:l,emptydirSync:l,emptyDir:c,emptydir:c}},9616:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8463),i=r(8737),s=r(3798);e.exports={createFile:n((async function(e){let t;try{t=await i.stat(e)}catch{}if(t&&t.isFile())return;const r=o.dirname(e);let n=null;try{n=await i.stat(r)}catch(t){if("ENOENT"===t.code)return await s.mkdirs(r),void await i.writeFile(e,"");throw t}n.isDirectory()?await i.writeFile(e,""):await i.readdir(r)})),createFileSync:function(e){let t;try{t=i.statSync(e)}catch{}if(t&&t.isFile())return;const r=o.dirname(e);try{i.statSync(r).isDirectory()||i.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;s.mkdirsSync(r)}i.writeFileSync(e,"")}}},6288:(e,t,r)=>{const{createFile:n,createFileSync:o}=r(9616),{createLink:i,createLinkSync:s}=r(1522),{createSymlink:a,createSymlinkSync:c}=r(5291);e.exports={createFile:n,createFileSync:o,ensureFile:n,ensureFileSync:o,createLink:i,createLinkSync:s,ensureLink:i,ensureLinkSync:s,createSymlink:a,createSymlinkSync:c,ensureSymlink:a,ensureSymlinkSync:c}},1522:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8463),i=r(8737),s=r(3798),{pathExists:a}=r(9288),{areIdentical:c}=r(6462);e.exports={createLink:n((async function(e,t){let r,n;try{r=await i.lstat(t)}catch{}try{n=await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&c(n,r))return;const l=o.dirname(t);await a(l)||await s.mkdirs(l),await i.link(e,t)})),createLinkSync:function(e,t){let r;try{r=i.lstatSync(t)}catch{}try{const t=i.lstatSync(e);if(r&&c(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=o.dirname(t);return i.existsSync(n)||s.mkdirsSync(n),i.linkSync(e,t)}}},3838:(e,t,r)=>{const n=r(8463),o=r(8737),{pathExists:i}=r(9288),s=r(1236).fromPromise;e.exports={symlinkPaths:s((async function(e,t){if(n.isAbsolute(e)){try{await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=n.dirname(t),s=n.join(r,e);if(await i(s))return{toCwd:s,toDst:e};try{await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:n.relative(r,e)}})),symlinkPathsSync:function(e,t){if(n.isAbsolute(e)){if(!o.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=n.dirname(t),i=n.join(r,e);if(o.existsSync(i))return{toCwd:i,toDst:e};if(!o.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(r,e)}}}},7064:(e,t,r)=>{const n=r(8737),o=r(1236).fromPromise;e.exports={symlinkType:o((async function(e,t){if(t)return t;let r;try{r=await n.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"})),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},5291:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8463),i=r(8737),{mkdirs:s,mkdirsSync:a}=r(3798),{symlinkPaths:c,symlinkPathsSync:l}=r(3838),{symlinkType:u,symlinkTypeSync:f}=r(7064),{pathExists:p}=r(9288),{areIdentical:h}=r(6462);e.exports={createSymlink:n((async function(e,t,r){let n;try{n=await i.lstat(t)}catch{}if(n&&n.isSymbolicLink()){const[r,n]=await Promise.all([i.stat(e),i.stat(t)]);if(h(r,n))return}const a=await c(e,t);e=a.toDst;const l=await u(a.toCwd,r),f=o.dirname(t);return await p(f)||await s(f),i.symlink(e,t,l)})),createSymlinkSync:function(e,t,r){let n;try{n=i.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=i.statSync(e),n=i.statSync(t);if(h(r,n))return}const s=l(e,t);e=s.toDst,r=f(s.toCwd,r);const c=o.dirname(t);return i.existsSync(c)||a(c),i.symlinkSync(e,t,r)}}},8737:(e,t,r)=>{const n=r(1236).fromCallback,o=r(5542),i=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof o[e]));Object.assign(t,o),i.forEach((e=>{t[e]=n(o[e])})),t.exists=function(e,t){return"function"==typeof t?o.exists(e,t):new Promise((t=>o.exists(e,t)))},t.read=function(e,t,r,n,i,s){return"function"==typeof s?o.read(e,t,r,n,i,s):new Promise(((s,a)=>{o.read(e,t,r,n,i,((e,t,r)=>{if(e)return a(e);s({bytesRead:t,buffer:r})}))}))},t.write=function(e,t,...r){return"function"==typeof r[r.length-1]?o.write(e,t,...r):new Promise(((n,i)=>{o.write(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesWritten:t,buffer:r})}))}))},t.readv=function(e,t,...r){return"function"==typeof r[r.length-1]?o.readv(e,t,...r):new Promise(((n,i)=>{o.readv(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesRead:t,buffers:r})}))}))},t.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?o.writev(e,t,...r):new Promise(((n,i)=>{o.writev(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesWritten:t,buffers:r})}))}))},"function"==typeof o.realpath.native?t.realpath.native=n(o.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")},1605:(e,t,r)=>{e.exports={...r(8737),...r(4423),...r(2591),...r(6288),...r(3376),...r(3798),...r(2455),...r(7024),...r(9288),...r(5422)}},3376:(e,t,r)=>{const n=r(1236).fromPromise,o=r(2934);o.outputJson=n(r(6426)),o.outputJsonSync=r(2188),o.outputJSON=o.outputJson,o.outputJSONSync=o.outputJsonSync,o.writeJSON=o.writeJson,o.writeJSONSync=o.writeJsonSync,o.readJSON=o.readJson,o.readJSONSync=o.readJsonSync,e.exports=o},2934:(e,t,r)=>{const n=r(2909);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},2188:(e,t,r)=>{const{stringify:n}=r(1144),{outputFileSync:o}=r(7024);e.exports=function(e,t,r){const i=n(t,r);o(e,i,r)}},6426:(e,t,r)=>{const{stringify:n}=r(1144),{outputFile:o}=r(7024);e.exports=async function(e,t,r={}){const i=n(t,r);await o(e,i,r)}},3798:(e,t,r)=>{const n=r(1236).fromPromise,{makeDir:o,makeDirSync:i}=r(8916),s=n(o);e.exports={mkdirs:s,mkdirsSync:i,mkdirp:s,mkdirpSync:i,ensureDir:s,ensureDirSync:i}},8916:(e,t,r)=>{const n=r(8737),{checkPath:o}=r(7111),i=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(o(e),n.mkdir(e,{mode:i(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(o(e),n.mkdirSync(e,{mode:i(t),recursive:!0}))},7111:(e,t,r)=>{const n=r(3217);e.exports.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(n.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}}},2455:(e,t,r)=>{const n=r(1236).fromPromise;e.exports={move:n(r(3314)),moveSync:r(6244)}},6244:(e,t,r)=>{const n=r(8124),o=r(6876),i=r(4423).copySync,s=r(5422).removeSync,a=r(3798).mkdirpSync,c=r(6462);function l(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return i(e,t,n),s(e)}(e,t,r)}}e.exports=function(e,t,r){const i=(r=r||{}).overwrite||r.clobber||!1,{srcStat:u,isChangingCase:f=!1}=c.checkPathsSync(e,t,"move",r);return c.checkParentPathsSync(e,u,t,"move"),function(e){const t=o.dirname(e);return o.parse(t).root===t}(t)||a(o.dirname(t)),function(e,t,r,o){if(o)return l(e,t,r);if(r)return s(t),l(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return l(e,t,r)}(e,t,i,f)}},3314:(e,t,r)=>{const n=r(8737),o=r(6876),{copy:i}=r(4423),{remove:s}=r(5422),{mkdirp:a}=r(3798),{pathExists:c}=r(9288),l=r(6462);e.exports=async function(e,t,r={}){const u=r.overwrite||r.clobber||!1,{srcStat:f,isChangingCase:p=!1}=await l.checkPaths(e,t,"move",r);await l.checkParentPaths(e,f,t,"move");const h=o.dirname(t);return o.parse(h).root!==h&&await a(h),async function(e,t,r,o){if(!o)if(r)await s(t);else if(await c(t))throw new Error("dest already exists.");try{await n.rename(e,t)}catch(n){if("EXDEV"!==n.code)throw n;await async function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await i(e,t,n),s(e)}(e,t,r)}}(e,t,u,p)}},7024:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8737),i=r(9007),s=r(3798),a=r(9288).pathExists;e.exports={outputFile:n((async function(e,t,r="utf-8"){const n=i.dirname(e);return await a(n)||await s.mkdirs(n),o.writeFile(e,t,r)})),outputFileSync:function(e,...t){const r=i.dirname(e);o.existsSync(r)||s.mkdirsSync(r),o.writeFileSync(e,...t)}}},9288:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8737);e.exports={pathExists:n((function(e){return o.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:o.existsSync}},5422:(e,t,r)=>{const n=r(7091),o=r(1236).fromCallback;e.exports={remove:o((function(e,t){n.rm(e,{recursive:!0,force:!0},t)})),removeSync:function(e){n.rmSync(e,{recursive:!0,force:!0})}}},6462:(e,t,r)=>{const n=r(8737),o=r(8485),i=r(1236).fromPromise;function s(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function a(e,t){const r=o.resolve(e).split(o.sep).filter((e=>e)),n=o.resolve(t).split(o.sep).filter((e=>e));return r.every(((e,t)=>n[t]===e))}function c(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:i((async function(e,t,r,i){const{srcStat:l,destStat:u}=await function(e,t,r){const o=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([o(e),o(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}(e,t,i);if(u){if(s(l,u)){const n=o.basename(e),i=o.basename(t);if("move"===r&&n!==i&&n.toLowerCase()===i.toLowerCase())return{srcStat:l,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!l.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(l.isDirectory()&&a(e,t))throw new Error(c(e,t,r));return{srcStat:l,destStat:u}})),checkPathsSync:function(e,t,r,i){const{srcStat:l,destStat:u}=function(e,t,r){let o;const i=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),s=i(e);try{o=i(t)}catch(e){if("ENOENT"===e.code)return{srcStat:s,destStat:null};throw e}return{srcStat:s,destStat:o}}(e,t,i);if(u){if(s(l,u)){const n=o.basename(e),i=o.basename(t);if("move"===r&&n!==i&&n.toLowerCase()===i.toLowerCase())return{srcStat:l,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!l.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(l.isDirectory()&&a(e,t))throw new Error(c(e,t,r));return{srcStat:l,destStat:u}},checkParentPaths:i((async function e(t,r,i,a){const l=o.resolve(o.dirname(t)),u=o.resolve(o.dirname(i));if(u===l||u===o.parse(u).root)return;let f;try{f=await n.stat(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(s(r,f))throw new Error(c(t,i,a));return e(t,r,u,a)})),checkParentPathsSync:function e(t,r,i,a){const l=o.resolve(o.dirname(t)),u=o.resolve(o.dirname(i));if(u===l||u===o.parse(u).root)return;let f;try{f=n.statSync(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(s(r,f))throw new Error(c(t,i,a));return e(t,r,u,a)},isSrcSubdir:a,areIdentical:s}},7211:(e,t,r)=>{const n=r(8737),o=r(1236).fromPromise;e.exports={utimesMillis:o((async function(e,t,r){const o=await n.open(e,"r+");let i=null;try{await n.futimes(o,t,r)}finally{try{await n.close(o)}catch(e){i=e}}if(i)throw i})),utimesMillisSync:function(e,t,r){const o=n.openSync(e,"r+");return n.futimesSync(o,t,r),n.closeSync(o)}}},2909:(e,t,r)=>{let n;try{n=r(1290)}catch(e){n=r(1006)}const o=r(1236),{stringify:i,stripBom:s}=r(1144);const a={readFile:o.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,i=!("throws"in t)||t.throws;let a,c=await o.fromCallback(r.readFile)(e,t);c=s(c);try{a=JSON.parse(c,t?t.reviver:null)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}return a})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,o=!("throws"in t)||t.throws;try{let n=r.readFileSync(e,t);return n=s(n),JSON.parse(n,t.reviver)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:o.fromPromise((async function(e,t,r={}){const s=r.fs||n,a=i(t,r);await o.fromCallback(s.writeFile)(e,a,r)})),writeFileSync:function(e,t,r={}){const o=r.fs||n,s=i(t,r);return o.writeFileSync(e,s,r)}};e.exports=a},1144:e=>{e.exports={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:n=null,spaces:o}={}){const i=r?t:"";return JSON.stringify(e,n,o).replace(/\n/g,t)+i},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},2549:(e,t,r)=>{e.exports=r(9100)},5095:e=>{e.exports=n;var t,r=/\/|\./;function n(e,t){r.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},744:(e,t,r)=>{var n=t,o=r(5643),i=r(3262);function s(e,t,r,n){var i=!1;if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",n);for(var s=t.resolvedType.values,a=Object.keys(s),c=0;c<a.length;++c)s[a[c]]!==t.typeDefault||i||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),t.repeated||e("break"),i=!0),e("case%j:",a[c])("case %i:",s[a[c]])("m%s=%j",n,s[a[c]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var l=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,l)('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,l?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function a(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,r,n,n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('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":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var a=t[n].resolve(),c=i.safeProp(a.name);a.map?(r("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),s(r,a,n,c+"[ks[i]]")("}")("}")):a.repeated?(r("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),s(r,a,n,c+"[i]")("}")("}")):(a.resolvedType instanceof o||r("if(d%s!=null){",c),s(r,a,n,c),a.resolvedType instanceof o||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var r=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],s=[],c=[],l=0;l<t.length;++l)t[l].partOf||(t[l].resolve().repeated?n:t[l].map?s:c).push(t[l]);if(n.length){for(r("if(o.arrays||o.defaults){"),l=0;l<n.length;++l)r("d%s=[]",i.safeProp(n[l].name));r("}")}if(s.length){for(r("if(o.objects||o.defaults){"),l=0;l<s.length;++l)r("d%s={}",i.safeProp(s[l].name));r("}")}if(c.length){for(r("if(o.defaults){"),l=0;l<c.length;++l){var u=c[l],f=i.safeProp(u.name);if(u.resolvedType instanceof o)r("d%s=o.enums===String?%j:%j",f,u.resolvedType.valuesById[u.typeDefault],u.typeDefault);else if(u.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",u.typeDefault.low,u.typeDefault.high,u.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",f)("}else")("d%s=o.longs===String?%j:%i",f,u.typeDefault.toString(),u.typeDefault.toNumber());else if(u.bytes){var p="["+Array.prototype.slice.call(u.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",f,String.fromCharCode.apply(String,u.typeDefault))("else{")("d%s=%s",f,p)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",f,f)("}")}else r("d%s=%j",f,u.typeDefault)}r("}")}var h=!1;for(l=0;l<t.length;++l){u=t[l];var d=e._fieldsArray.indexOf(u);f=i.safeProp(u.name);u.map?(h||(h=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",f,f)("d%s={}",f)("for(var j=0;j<ks2.length;++j){"),a(r,u,d,f+"[ks2[j]]")("}")):u.repeated?(r("if(m%s&&m%s.length){",f,f)("d%s=[]",f)("for(var j=0;j<m%s.length;++j){",f),a(r,u,d,f+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",f,u.name),a(r,u,d,f),u.partOf&&r("if(o.oneofs)")("d%s=%j",i.safeProp(u.partOf.name),u.name)),r("}")}return r("return d")}},7728:(e,t,r)=>{e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var a=e._fieldsArray[r].resolve(),c=a.resolvedType instanceof n?"int32":a.type,l="m"+i.safeProp(a.name);t("case %i: {",a.id),a.map?(t("if(%s===util.emptyObject)",l)("%s={}",l)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[a.keyType]?t("k=%j",o.defaults[a.keyType]):t("k=null"),void 0!==o.defaults[c]?t("value=%j",o.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===o.basic[c]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',l):t("%s[k]=value",l)):a.repeated?(t("if(!(%s&&%s.length))",l,l)("%s=[]",l),void 0!==o.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,c)("}else"),void 0===o.basic[c]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",l,r):t("%s.push(r.%s())",l,c)):void 0===o.basic[c]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",l,r):t("%s=r.%s()",l,c),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var u=e._fieldsArray[r];u.required&&t("if(!m.hasOwnProperty(%j))",u.name)("throw util.ProtocolError(%j,{instance:m})",s(u))}return t("return m")};var n=r(5643),o=r(361),i=r(3262);function s(e){return"missing required '"+e.name+"'"}},1080:(e,t,r)=>{e.exports=function(e){for(var t,r=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var l=a[c].resolve(),u=e._fieldsArray.indexOf(l),f=l.resolvedType instanceof n?"int32":l.type,p=o.basic[f];t="m"+i.safeProp(l.name),l.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(l.id<<3|2)>>>0,8|o.mapKey[l.keyType],l.keyType),void 0===p?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,f,t),r("}")("}")):l.repeated?(r("if(%s!=null&&%s.length){",t,t),l.packed&&void 0!==o.packed[f]?r("w.uint32(%i).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",f,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===p?s(r,l,u,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(l.id<<3|p)>>>0,f,t)),r("}")):(l.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,l.name),void 0===p?s(r,l,u,t):r("w.uint32(%i).%s(%s)",(l.id<<3|p)>>>0,f,t))}return r("return w")};var n=r(5643),o=r(361),i=r(3262);function s(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},5643:(e,t,r)=>{e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="Enum";var o=r(8923),i=r(3262);function s(e,t,r,o,i,s){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.valuesOptions=s,this.reserved=void 0,t)for(var a=Object.keys(t),c=0;c<a.length;++c)"number"==typeof t[a[c]]&&(this.valuesById[this.values[a[c]]=t[a[c]]]=a[c])}s.fromJSON=function(e,t){var r=new s(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,r,n){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=r||null,this},s.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},s.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},1344:(e,t,r)=>{e.exports=l;var n=r(7209);((l.prototype=Object.create(n.prototype)).constructor=l).className="Field";var o,i=r(5643),s=r(361),a=r(3262),c=/^required|optional|repeated$/;function l(e,t,r,o,i,l,u){if(a.isObject(o)?(u=i,l=o,o=i=void 0):a.isObject(i)&&(u=l,l=i,i=void 0),n.call(this,e,l),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==o&&!c.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=r,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=u}l.fromJSON=function(e,t){return new l(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(l.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),l.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},l.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},l.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},l.d=function(e,t,r,n){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(o,i){a.decorateType(o.constructor).add(new l(i,e,t,r,{default:n}))}},l._configure=function(e){o=e}},5325:(e,t,r)=>{var n=e.exports=r(4394);n.build="light",n.load=function(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(1080),n.decoder=r(7728),n.verifier=r(420),n.converter=r(744),n.ReflectionObject=r(7209),n.Namespace=r(8923),n.Root=r(5330),n.Enum=r(5643),n.Type=r(7882),n.Field=r(1344),n.OneOf=r(1457),n.MapField=r(8252),n.Service=r(9687),n.Method=r(8811),n.Message=r(2551),n.wrappers=r(6434),n.types=r(361),n.util=r(3262),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},4394:(e,t,r)=>{var n=t;function o(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(3449),n.BufferWriter=r(818),n.Reader=r(6237),n.BufferReader=r(3158),n.util=r(3610),n.rpc=r(5047),n.roots=r(4529),n.configure=o,o()},9100:(e,t,r)=>{var n=e.exports=r(5325);n.build="full",n.tokenize=r(527),n.parse=r(4863),n.common=r(5095),n.Root._configure(n.Type,n.parse,n.common)},8252:(e,t,r)=>{e.exports=s;var n=r(1344);((s.prototype=Object.create(n.prototype)).constructor=s).className="MapField";var o=r(361),i=r(3262);function s(e,t,r,o,s,a){if(n.call(this,e,t,o,void 0,void 0,s,a),!i.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},s.d=function(e,t,r){return"function"==typeof r?r=i.decorateType(r).name:r&&"object"==typeof r&&(r=i.decorateEnum(r).name),function(n,o){i.decorateType(n.constructor).add(new s(o,e,t,r))}}},2551:(e,t,r)=>{e.exports=o;var n=r(3610);function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},8811:(e,t,r)=>{e.exports=i;var n=r(7209);((i.prototype=Object.create(n.prototype)).constructor=i).className="Method";var o=r(3262);function i(e,t,r,i,s,a,c,l,u){if(o.isObject(s)?(c=s,s=a=void 0):o.isObject(a)&&(c=a,a=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(r))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");n.call(this,e,c),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=l,this.parsedOptions=u}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},8923:(e,t,r)=>{e.exports=f;var n=r(7209);((f.prototype=Object.create(n.prototype)).constructor=f).className="Namespace";var o,i,s,a=r(1344),c=r(3262),l=r(1457);function u(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function f(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function p(e){return e._nestedArray=null,e}f.fromJSON=function(e,t){return new f(e,t.options).addJSON(t.nested)},f.arrayToJSON=u,f.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},f.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(f.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),f.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},f.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?s.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:f.fromJSON)(r[n],t));return this},f.prototype.get=function(e){return this.nested&&this.nested[e]||null},f.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},f.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof o||e instanceof l||e instanceof s||e instanceof i||e instanceof f))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof f&&e instanceof f)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),p(this)},f.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),p(this)},f.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof f))throw Error("path conflicts with non-namespace objects")}else r.add(r=new f(n))}return t&&r.addJSON(t),r},f.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof f?e[t++].resolveAll():e[t++].resolve();return this.resolve()},f.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof f&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof f&&(n=this._nestedArray[o].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},f.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},f.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},f.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},f.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},f._configure=function(e,t,r){o=e,i=t,s=r}},7209:(e,t,r)=>{e.exports=i,i.className="ReflectionObject";var n,o=r(3262);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var i=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var s=i[e];o.setProperty(s,r,t)}else(i={})[e]=o.setProperty({},r,t),n.push(i)}else{var a={};a[e]=t,n.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){n=e}},1457:(e,t,r)=>{e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="OneOf";var o=r(1344),i=r(3262);function s(e,t,r,o){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}a(this)},s.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){i.decorateType(t.constructor).add(new s(r,e)),Object.defineProperty(t,r,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},4863:(e,t,r)=>{e.exports=O,O.filename=null,O.defaults={keepCase:!1};var n=r(527),o=r(5330),i=r(7882),s=r(1344),a=r(8252),c=r(1457),l=r(5643),u=r(9687),f=r(8811),p=r(361),h=r(3262),d=/^[1-9][0-9]*$/,y=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,g=/^-?0[x][0-9a-fA-F]+$/,v=/^0[0-7]+$/,b=/^-?0[0-7]+$/,w=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,k=/^[a-zA-Z_][a-zA-Z_0-9]*$/,_=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,S=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function O(e,t,r){t instanceof o||(r=t,t=new o),r||(r=O.defaults);var x,j,T,E,A,N=r.preferTrailingComment||!1,P=n(e,r.alternateCommentMode||!1),M=P.next,D=P.push,C=P.peek,$=P.skip,B=P.cmnt,F=!0,z=!1,I=t,L=r.keepCase?function(e){return e}:h.camelCase;function R(e,t,r){var n=O.filename;return r||(O.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+P.line+")")}function J(){var e,t=[];do{if('"'!==(e=M())&&"'"!==e)throw R(e);t.push(M()),$(e),e=C()}while('"'===e||"'"===e);return t.join("")}function U(e){var t=M();switch(t){case"'":case'"':return D(t),J();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var r=1;"-"===e.charAt(0)&&(r=-1,e=e.substring(1));switch(e){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(d.test(e))return r*parseInt(e,10);if(m.test(e))return r*parseInt(e,16);if(v.test(e))return r*parseInt(e,8);if(w.test(e))return r*parseFloat(e);throw R(e,"number",t)}(t,!0)}catch(r){if(e&&_.test(t))return t;throw R(t,"value")}}function q(e,t){var r,n;do{!t||'"'!==(r=C())&&"'"!==r?e.push([n=V(M()),$("to",!0)?V(M()):n]):e.push(J())}while($(",",!0));var o={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};X(o,(function(e){if("option"!==e)throw R(e);ee(o,e),$(";")}),(function(){ne(o)}))}function V(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw R(e,"id");if(y.test(e))return parseInt(e,10);if(g.test(e))return parseInt(e,16);if(b.test(e))return parseInt(e,8);throw R(e,"id")}function W(){if(void 0!==x)throw R("package");if(x=M(),!_.test(x))throw R(x,"name");I=I.define(x),$(";")}function G(){var e,t=C();switch(t){case"weak":e=T||(T=[]),M();break;case"public":M();default:e=j||(j=[])}t=J(),$(";"),e.push(t)}function H(){if($("="),E=J(),!(z="proto3"===E)&&"proto2"!==E)throw R(E,"syntax");$(";")}function K(e,t){switch(t){case"option":return ee(e,t),$(";"),!0;case"message":return Z(e,t),!0;case"enum":return Y(e,t),!0;case"service":return function(e,t){if(!k.test(t=M()))throw R(t,"service name");var r=new u(t);X(r,(function(e){if(!K(r,e)){if("rpc"!==e)throw R(e);!function(e,t){var r=B(),n=t;if(!k.test(t=M()))throw R(t,"name");var o,i,s,a,c=t;$("("),$("stream",!0)&&(i=!0);if(!_.test(t=M()))throw R(t);o=t,$(")"),$("returns"),$("("),$("stream",!0)&&(a=!0);if(!_.test(t=M()))throw R(t);s=t,$(")");var l=new f(c,n,o,s,i,a);l.comment=r,X(l,(function(e){if("option"!==e)throw R(e);ee(l,e),$(";")})),e.add(l)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!_.test(t=M()))throw R(t,"reference");var r=t;X(null,(function(t){switch(t){case"required":case"repeated":Q(e,t,r);break;case"optional":Q(e,z?"proto3_optional":"optional",r);break;default:if(!z||!_.test(t))throw R(t);D(t),Q(e,"optional",r)}}))}(e,t),!0}return!1}function X(e,t,r){var n=P.line;if(e&&("string"!=typeof e.comment&&(e.comment=B()),e.filename=O.filename),$("{",!0)){for(var o;"}"!==(o=M());)t(o);$(";",!0)}else r&&r(),$(";"),e&&("string"!=typeof e.comment||N)&&(e.comment=B(n)||e.comment)}function Z(e,t){if(!k.test(t=M()))throw R(t,"type name");var r=new i(t);X(r,(function(e){if(!K(r,e))switch(e){case"map":!function(e){$("<");var t=M();if(void 0===p.mapKey[t])throw R(t,"type");$(",");var r=M();if(!_.test(r))throw R(r,"type");$(">");var n=M();if(!k.test(n))throw R(n,"name");$("=");var o=new a(L(n),V(M()),t,r);X(o,(function(e){if("option"!==e)throw R(e);ee(o,e),$(";")}),(function(){ne(o)})),e.add(o)}(r);break;case"required":case"repeated":Q(r,e);break;case"optional":Q(r,z?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!k.test(t=M()))throw R(t,"name");var r=new c(L(t));X(r,(function(e){"option"===e?(ee(r,e),$(";")):(D(e),Q(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":q(r.extensions||(r.extensions=[]));break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:if(!z||!_.test(e))throw R(e);D(e),Q(r,"optional")}})),e.add(r)}function Q(e,t,r){var n=M();if("group"!==n){for(;n.endsWith(".")||C().startsWith(".");)n+=M();if(!_.test(n))throw R(n,"type");var o=M();if(!k.test(o))throw R(o,"name");o=L(o),$("=");var a=new s(o,V(M()),n,t,r);if(X(a,(function(e){if("option"!==e)throw R(e);ee(a,e),$(";")}),(function(){ne(a)})),"proto3_optional"===t){var l=new c("_"+o);a.setOption("proto3_optional",!0),l.add(a),e.add(l)}else e.add(a);z||!a.repeated||void 0===p.packed[n]&&void 0!==p.basic[n]||a.setOption("packed",!1,!0)}else!function(e,t){var r=M();if(!k.test(r))throw R(r,"name");var n=h.lcFirst(r);r===n&&(r=h.ucFirst(r));$("=");var o=V(M()),a=new i(r);a.group=!0;var c=new s(n,o,r,t);c.filename=O.filename,X(a,(function(e){switch(e){case"option":ee(a,e),$(";");break;case"required":case"repeated":Q(a,e);break;case"optional":Q(a,z?"proto3_optional":"optional");break;case"message":Z(a,e);break;case"enum":Y(a,e);break;default:throw R(e)}})),e.add(a).add(c)}(e,t)}function Y(e,t){if(!k.test(t=M()))throw R(t,"name");var r=new l(t);X(r,(function(e){switch(e){case"option":ee(r,e),$(";");break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!k.test(t))throw R(t,"name");$("=");var r=V(M(),!0),n={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};X(n,(function(e){if("option"!==e)throw R(e);ee(n,e),$(";")}),(function(){ne(n)})),e.add(t,r,n.comment,n.options)}(r,e)}})),e.add(r)}function ee(e,t){var r=$("(",!0);if(!_.test(t=M()))throw R(t,"name");var n,o=t,i=o;r&&($(")"),i=o="("+o+")",t=C(),S.test(t)&&(n=t.slice(1),o+=t,M())),$("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,i,te(e,o),n)}function te(e,t){if($("{",!0)){for(var r={};!$("}",!0);){if(!k.test(A=M()))throw R(A,"name");if(null===A)throw R(A,"end of input");var n,o=A;if($(":",!0),"{"===C())n=te(e,t+"."+A);else if("["===C()){var i;if(n=[],$("[",!0)){do{i=U(!0),n.push(i)}while($(",",!0));$("]"),void 0!==i&&re(e,t+"."+A,i)}}else n=U(!0),re(e,t+"."+A,n);var s=r[o];s&&(n=[].concat(s).concat(n)),r[o]=n,$(",",!0),$(";",!0)}return r}var a=U(!0);return re(e,t,a),a}function re(e,t,r){e.setOption&&e.setOption(t,r)}function ne(e){if($("[",!0)){do{ee(e,"option")}while($(",",!0));$("]")}return e}for(;null!==(A=M());)switch(A){case"package":if(!F)throw R(A);W();break;case"import":if(!F)throw R(A);G();break;case"syntax":if(!F)throw R(A);H();break;case"option":ee(I,A),$(";");break;default:if(K(I,A)){F=!1;continue}throw R(A)}return O.filename=null,{package:x,imports:j,weakImports:T,syntax:E,root:t}}},6237:(e,t,r)=>{e.exports=c;var n,o=r(3610),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var l,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},f=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function p(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw a(this,8);return new i(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=f(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(l=4294967295,function(){if(l=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return l;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return l}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);if(t===r){var n=o.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=f(),n._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},3158:(e,t,r)=>{e.exports=i;var n=r(6237);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(3610);function i(e){n.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},5330:(e,t,r)=>{e.exports=f;var n=r(8923);((f.prototype=Object.create(n.prototype)).constructor=f).className="Root";var o,i,s,a=r(1344),c=r(5643),l=r(1457),u=r(3262);function f(e){n.call(this,"",e),this.deferred=[],this.files=[]}function p(){}f.fromJSON=function(e,t){return t||(t=new f),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},f.prototype.resolvePath=u.path.resolve,f.prototype.fetch=u.fetch,f.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var o=this;if(!n)return u.asPromise(e,o,t,r);var a=n===p;function c(e,t){if(n){if(a)throw e;var r=n;n=null,r(e,t)}}function l(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in s)return r}return null}function f(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){i.filename=e;var n,s=i(t,o,r),f=0;if(s.imports)for(;f<s.imports.length;++f)(n=l(s.imports[f])||o.resolvePath(e,s.imports[f]))&&h(n);if(s.weakImports)for(f=0;f<s.weakImports.length;++f)(n=l(s.weakImports[f])||o.resolvePath(e,s.weakImports[f]))&&h(n,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}a||d||c(null,o)}function h(e,t){if(e=l(e)||e,!(o.files.indexOf(e)>-1))if(o.files.push(e),e in s)a?f(e,s[e]):(++d,setTimeout((function(){--d,f(e,s[e])})));else if(a){var r;try{r=u.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}f(e,r)}else++d,o.fetch(e,(function(r,i){--d,n&&(r?t?d||c(null,o):c(r):f(e,i))}))}var d=0;u.isString(t)&&(t=[t]);for(var y,m=0;m<t.length;++m)(y=o.resolvePath("",t[m]))&&h(y);if(a)return o;d||c(null,o)},f.prototype.loadSync=function(e,t){if(!u.isNode)throw Error("not supported");return this.load(e,t,p)},f.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function d(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.get(n.name)||(n.declaringField=t,t.extensionField=n,r.add(n)),!0}return!1}f.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||d(0,e)||this.deferred.push(e);else if(e instanceof c)h.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof l)){if(e instanceof o)for(var t=0;t<this.deferred.length;)d(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);h.test(e.name)&&(e.parent[e.name]=e)}},f.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)h.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);h.test(e.name)&&delete e.parent[e.name]}},f._configure=function(e,t,r){o=e,i=t,s=r}},4529:e=>{e.exports={}},5047:(e,t,r)=>{t.Service=r(7595)},7595:(e,t,r)=>{e.exports=o;var n=r(3610);function o(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(o.prototype=Object.create(n.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,r,o,i,s){if(!i)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(e,a,t,r,o,i);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,r){if(e)return a.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof o))try{r=o[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},9687:(e,t,r)=>{e.exports=a;var n=r(8923);((a.prototype=Object.create(n.prototype)).constructor=a).className="Service";var o=r(8811),i=r(3262),s=r(5047);function a(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var r=new a(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),i=0;i<n.length;++i)r.add(o.fromJSON(n[i],t.methods[n[i]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},a.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,c(this)):n.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return n.prototype.remove.call(this,e)},a.prototype.create=function(e,t,r){for(var n,o=new s.Service(e,t,r),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((n=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");o[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return o}},527:e=>{e.exports=f;var t=/[\s{}=;:[\],'"()<>]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,i=/^\s*\*?\/*/,s=/\n/g,a=/\s/,c=/\\(.?)/g,l={0:"\0",r:"\r",n:"\n",t:"\t"};function u(e){return e.replace(c,(function(e,t){switch(t){case"\\":case"":return t;default:return l[t]||""}}))}function f(e,c){e=e.toString();var l=0,f=e.length,p=1,h=0,d={},y=[],m=null;function g(e){return Error("illegal "+e+" (line "+p+")")}function v(t){return e.charAt(t)}function b(t,r,n){var a,l={type:e.charAt(t++),lineEmpty:!1,leading:n},u=t-(c?2:3);do{if(--u<0||"\n"===(a=e.charAt(u))){l.lineEmpty=!0;break}}while(" "===a||"\t"===a);for(var f=e.substring(t,r).split(s),y=0;y<f.length;++y)f[y]=f[y].replace(c?i:o,"").trim();l.text=f.join("\n").trim(),d[p]=l,h=p}function w(t){var r=k(t),n=e.substring(t,r);return/^\s*\/\//.test(n)}function k(e){for(var t=e;t<f&&"\n"!==v(t);)t++;return t}function _(){if(y.length>0)return y.shift();if(m)return function(){var t="'"===m?n:r;t.lastIndex=l-1;var o=t.exec(e);if(!o)throw g("string");return l=t.lastIndex,S(m),m=null,u(o[1])}();var o,i,s,h,d,_=0===l;do{if(l===f)return null;for(o=!1;a.test(s=v(l));)if("\n"===s&&(_=!0,++p),++l===f)return null;if("/"===v(l)){if(++l===f)throw g("comment");if("/"===v(l))if(c){if(h=l,d=!1,w(l-1)){d=!0;do{if((l=k(l))===f)break;if(l++,!_)break}while(w(l))}else l=Math.min(f,k(l)+1);d&&(b(h,l,_),_=!0),p++,o=!0}else{for(d="/"===v(h=l+1);"\n"!==v(++l);)if(l===f)return null;++l,d&&(b(h,l-1,_),_=!0),++p,o=!0}else{if("*"!==(s=v(l)))return"/";h=l+1,d=c||"*"===v(h);do{if("\n"===s&&++p,++l===f)throw g("comment");i=s,s=v(l)}while("*"!==i||"/"!==s);++l,d&&(b(h,l-2,_),_=!0),o=!0}}}while(o);var O=l;if(t.lastIndex=0,!t.test(v(O++)))for(;O<f&&!t.test(v(O));)++O;var x=e.substring(l,l=O);return'"'!==x&&"'"!==x||(m=x),x}function S(e){y.push(e)}function O(){if(!y.length){var e=_();if(null===e)return null;S(e)}return y[0]}return Object.defineProperty({next:_,peek:O,push:S,skip:function(e,t){var r=O();if(r===e)return _(),!0;if(!t)throw g("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var t,r=null;return void 0===e?(t=d[p-1],delete d[p-1],t&&(c||"*"===t.type||t.lineEmpty)&&(r=t.leading?t.text:null)):(h<e&&O(),t=d[e],delete d[e],!t||t.lineEmpty||!c&&"/"!==t.type||(r=t.leading?null:t.text)),r}},"line",{get:function(){return p}})}f.unescape=u},7882:(e,t,r)=>{e.exports=v;var n=r(8923);((v.prototype=Object.create(n.prototype)).constructor=v).className="Type";var o=r(5643),i=r(1457),s=r(1344),a=r(8252),c=r(9687),l=r(2551),u=r(6237),f=r(3449),p=r(3262),h=r(1080),d=r(7728),y=r(420),m=r(744),g=r(6434);function v(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function b(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(v.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=p.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=p.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=v.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof l||((e.prototype=new l).constructor=e,p.merge(e.prototype,t)),e.$type=e.prototype.$type=this,p.merge(e,l,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:p.oneOfGetter(this._oneofsArray[r].oneof),set:p.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),v.generateConstructor=function(e){for(var t,r=p.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",p.safeProp(t.name)):t.repeated&&r("this%s=[]",p.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},v.fromJSON=function(e,t){var r=new v(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var l=Object.keys(t.fields),u=0;u<l.length;++u)r.add((void 0!==t.fields[l[u]].keyType?a.fromJSON:s.fromJSON)(l[u],t.fields[l[u]]));if(t.oneofs)for(l=Object.keys(t.oneofs),u=0;u<l.length;++u)r.add(i.fromJSON(l[u],t.oneofs[l[u]]));if(t.nested)for(l=Object.keys(t.nested),u=0;u<l.length;++u){var f=t.nested[l[u]];r.add((void 0!==f.id?s.fromJSON:void 0!==f.fields?v.fromJSON:void 0!==f.values?o.fromJSON:void 0!==f.methods?c.fromJSON:n.fromJSON)(l[u],f))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},v.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return p.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},v.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},v.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},v.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),b(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),b(this)):n.prototype.add.call(this,e)},v.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),b(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),b(this)}return n.prototype.remove.call(this,e)},v.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},v.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},v.prototype.create=function(e){return new this.ctor(e)},v.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=h(this)({Writer:f,types:t,util:p}),this.decode=d(this)({Reader:u,types:t,util:p}),this.verify=y(this)({types:t,util:p}),this.fromObject=m.fromObject(this)({types:t,util:p}),this.toObject=m.toObject(this)({types:t,util:p});var n=g[e];if(n){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(o),o.toObject=this.toObject,this.toObject=n.toObject.bind(o)}return this},v.prototype.encode=function(e,t){return this.setup().encode(e,t)},v.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},v.prototype.decode=function(e,t){return this.setup().decode(e,t)},v.prototype.decodeDelimited=function(e){return e instanceof u||(e=u.create(e)),this.decode(e,e.uint32())},v.prototype.verify=function(e){return this.setup().verify(e)},v.prototype.fromObject=function(e){return this.setup().fromObject(e)},v.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},v.d=function(e){return function(t){p.decorateType(t,e)}}},361:(e,t,r)=>{var n=t,o=r(3262),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var r=0,n={};for(t|=0;r<e.length;)n[i[r+t]]=e[r++];return n}n.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),n.long=s([0,0,0,1,1],7),n.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},3262:(e,t,r)=>{var n,o,i=e.exports=r(3610),s=r(4529);i.codegen=r(8561),i.fetch=r(5212),i.path=r(9207),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},i.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],o=e[r++];void 0!==o&&(t[n]=o)}return t};var a=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var l=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(l,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;n||(n=r(7882));var o=new n(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var u=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=r(5643));var t=new o("Enum"+u++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o||"prototype"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var i=t[o];i&&(n=[].concat(i).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(i,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(r(5330)))}})},2239:(e,t,r)=>{e.exports=o;var n=r(3610);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new o(r,n)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(n.isString(e)){if(!n.Long)return o.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;o.fromHash=function(e){return e===s?i:new o((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},3610:function(e,t,r){var n=t;function o(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)void 0!==e[n[o]]&&r||(e[n[o]]=t[n[o]]);return e}function i(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&o(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}n.asPromise=r(8045),n.base64=r(8839),n.EventEmitter=r(4358),n.float=r(9410),n.inquire=r(4153),n.utf8=r(1447),n.pool=r(9390),n.LongBits=r(2239),n.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=o,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},420:(e,t,r)=>{e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r=e.oneofsArray,n={};r.length&&t("var p={}");for(var c=0;c<e.fieldsArray.length;++c){var l=e._fieldsArray[c].resolve(),u="m"+o.safeProp(l.name);if(l.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",u,l.name),l.map)t("if(!util.isObject(%s))",u)("return%j",i(l,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),a(t,l,"k[i]"),s(t,l,c,u+"[k[i]]")("}");else if(l.repeated)t("if(!Array.isArray(%s))",u)("return%j",i(l,"array"))("for(var i=0;i<%s.length;++i){",u),s(t,l,c,u+"[i]")("}");else{if(l.partOf){var f=o.safeProp(l.partOf.name);1===n[l.partOf.name]&&t("if(p%s===1)",f)("return%j",l.partOf.name+": multiple values"),n[l.partOf.name]=1,t("p%s=1",f)}s(t,l,c,u)}l.optional&&t("}")}return t("return null")};var n=r(5643),o=r(3262);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,r,o){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function a(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",i(t,"boolean key"))}return e}},6434:(e,t,r)=>{var n=t,o=r(2551);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(n);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var s=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),s["@type"]=n,s}return this.toObject(e,t)}}},3449:(e,t,r)=>{e.exports=f;var n,o=r(3610),i=o.LongBits,s=o.base64,a=o.utf8;function c(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function l(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function f(){this.len=0,this.head=new c(l,0,0),this.tail=this.head,this.states=null}var p=function(){return o.Buffer?function(){return(f.create=function(){return new n})()}:function(){return new f}};function h(e,t,r){t[r]=255&e}function d(e,t){this.len=e,this.next=void 0,this.val=t}function y(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}f.create=p(),f.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(f.alloc=o.pool(f.alloc,o.Array.prototype.subarray)),f.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},d.prototype=Object.create(c.prototype),d.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},f.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new d((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},f.prototype.int32=function(e){return e<0?this._push(y,10,i.fromNumber(e)):this.uint32(e)},f.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},f.prototype.uint64=function(e){var t=i.from(e);return this._push(y,t.length(),t)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(y,t.length(),t)},f.prototype.bool=function(e){return this._push(h,1,e?1:0)},f.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},f.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};f.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(o.isString(e)){var r=f.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(g,t,e)},f.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},f.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(l,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 c(l,0,0),this.len=0),this},f.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},f.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},f._configure=function(e){n=e,f.create=p(),n._configure()}},818:(e,t,r)=>{e.exports=i;var n=r(3449);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(3610);function i(){n.call(this)}function s(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()},2747:e=>{e.exports={stdout:!1,stderr:!1}},1236:(e,t)=>{t.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((r,n)=>{t.push(((e,t)=>null!=e?n(e):r(t))),e.apply(this,t)}));e.apply(this,t)}),"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);t.pop(),e.apply(this,t).then((e=>r(null,e)),r)}),"name",{value:e.name})}},9439:()=>{},4641:()=>{},1853:()=>{},1420:()=>{},7356:()=>{},2336:()=>{},8463:()=>{},5542:()=>{},3217:()=>{},8124:()=>{},6876:()=>{},9007:()=>{},7091:()=>{},8485:()=>{},1006:()=>{},1290:()=>{}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.c=__webpack_module_cache__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__=__webpack_require__(__webpack_require__.s=4727),__webpack_exports__ProtobufSerializer=__webpack_exports__.Q;export{__webpack_exports__ProtobufSerializer as ProtobufSerializer};
|
|
2
2
|
//# sourceMappingURL=openhps-protobuf.es.min.js.map
|