@viamrobotics/sdk 0.72.0 → 0.73.0
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/api-version.d.ts +1 -1
- package/dist/app/data-client.d.ts +86 -6
- package/dist/components/audio-out/audio-out.d.ts +29 -0
- package/dist/components/audio-out/client.d.ts +1 -0
- package/dist/gen/app/build/v1/build_pb.d.ts +15 -0
- package/dist/gen/app/data/v1/data_connect.d.ts +34 -1
- package/dist/gen/app/data/v1/data_pb.d.ts +175 -9
- package/dist/gen/app/dataset/v1/dataset_connect.d.ts +24 -2
- package/dist/gen/app/dataset/v1/dataset_pb.d.ts +227 -1
- package/dist/gen/component/audioout/v1/audioout_connect.d.ts +15 -1
- package/dist/gen/component/audioout/v1/audioout_pb.d.ts +115 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.es.js +5834 -5465
- package/dist/main.umd.js +7 -7
- package/package.json +1 -1
package/dist/main.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(g,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):(g=typeof globalThis<"u"?globalThis:g||self,G(g.sdk={}))})(this,function(g){"use strict";function G(a,e){if(!a)throw new Error(e)}const cR=34028234663852886e22,lR=-34028234663852886e22,dR=4294967295,pR=2147483647,uR=-2147483648;function Xn(a){if(typeof a!="number")throw new Error("invalid int 32: "+typeof a);if(!Number.isInteger(a)||a>pR||a<uR)throw new Error("invalid int 32: "+a)}function it(a){if(typeof a!="number")throw new Error("invalid uint 32: "+typeof a);if(!Number.isInteger(a)||a>dR||a<0)throw new Error("invalid uint 32: "+a)}function Pi(a){if(typeof a!="number")throw new Error("invalid float 32: "+typeof a);if(Number.isFinite(a)&&(a>cR||a<lR))throw new Error("invalid float 32: "+a)}const Di=Symbol("@bufbuild/protobuf/enum-type");function gR(a){const e=a[Di];return G(e,"missing enum type on enum object"),e}function Ai(a,e,n,t){a[Di]=Ui(e,n.map(o=>({no:o.no,name:o.name,localName:a[o.no]})))}function Ui(a,e,n){const t=Object.create(null),o=Object.create(null),i=[];for(const r of e){const c=qi(r);i.push(c),t[r.name]=c,o[r.no]=c}return{typeName:a,values:i,findName(r){return t[r]},findNumber(r){return o[r]}}}function TR(a,e,n){const t={};for(const o of e){const i=qi(o);t[i.localName]=i.no,t[i.no]=i.localName}return Ai(t,a,e),t}function qi(a){return"localName"in a?a:Object.assign(Object.assign({},a),{localName:a.name})}class w{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,n){const t=this.getType(),o=t.runtime.bin,i=o.makeReadOptions(n);return o.readMessage(this,i.readerFactory(e),e.byteLength,i),this}fromJson(e,n){const t=this.getType(),o=t.runtime.json,i=o.makeReadOptions(n);return o.readMessage(t,e,i,this),this}fromJsonString(e,n){let t;try{t=JSON.parse(e)}catch(o){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${o instanceof Error?o.message:String(o)}`)}return this.fromJson(t,n)}toBinary(e){const n=this.getType(),t=n.runtime.bin,o=t.makeWriteOptions(e),i=o.writerFactory();return t.writeMessage(this,i,o),i.finish()}toJson(e){const n=this.getType(),t=n.runtime.json,o=t.makeWriteOptions(e);return t.writeMessage(this,o)}toJsonString(e){var n;const t=this.toJson(e);return JSON.stringify(t,null,(n=e?.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function kR(a,e,n,t){var o;const i=(o=t?.localName)!==null&&o!==void 0?o:e.substring(e.lastIndexOf(".")+1),r={[i]:function(c){a.util.initFields(this),a.util.initPartial(c,this)}}[i];return Object.setPrototypeOf(r.prototype,new w),Object.assign(r,{runtime:a,typeName:e,fields:a.util.newFieldList(n),fromBinary(c,l){return new r().fromBinary(c,l)},fromJson(c,l){return new r().fromJson(c,l)},fromJsonString(c,l){return new r().fromJsonString(c,l)},equals(c,l){return a.util.equals(r,c,l)}}),r}function yR(){let a=0,e=0;for(let t=0;t<28;t+=7){let o=this.buf[this.pos++];if(a|=(o&127)<<t,!(o&128))return this.assertBounds(),[a,e]}let n=this.buf[this.pos++];if(a|=(n&15)<<28,e=(n&112)>>4,!(n&128))return this.assertBounds(),[a,e];for(let t=3;t<=31;t+=7){let o=this.buf[this.pos++];if(e|=(o&127)<<t,!(o&128))return this.assertBounds(),[a,e]}throw new Error("invalid varint")}function rt(a,e,n){for(let i=0;i<28;i=i+7){const r=a>>>i,c=!(!(r>>>7)&&e==0),l=(c?r|128:r)&255;if(n.push(l),!c)return}const t=a>>>28&15|(e&7)<<4,o=!!(e>>3);if(n.push((o?t|128:t)&255),!!o){for(let i=3;i<31;i=i+7){const r=e>>>i,c=!!(r>>>7),l=(c?r|128:r)&255;if(n.push(l),!c)return}n.push(e>>>31&1)}}const Qn=4294967296;function Li(a){const e=a[0]==="-";e&&(a=a.slice(1));const n=1e6;let t=0,o=0;function i(r,c){const l=Number(a.slice(r,c));o*=n,t=t*n+l,t>=Qn&&(o=o+(t/Qn|0),t=t%Qn)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),e?Bi(t,o):mt(t,o)}function vR(a,e){let n=mt(a,e);const t=n.hi&2147483648;t&&(n=Bi(n.lo,n.hi));const o=Gi(n.lo,n.hi);return t?"-"+o:o}function Gi(a,e){if({lo:a,hi:e}=hR(a,e),e<=2097151)return String(Qn*e+a);const n=a&16777215,t=(a>>>24|e<<8)&16777215,o=e>>16&65535;let i=n+t*6777216+o*6710656,r=t+o*8147497,c=o*2;const l=1e7;return i>=l&&(r+=Math.floor(i/l),i%=l),r>=l&&(c+=Math.floor(r/l),r%=l),c.toString()+Fi(r)+Fi(i)}function hR(a,e){return{lo:a>>>0,hi:e>>>0}}function mt(a,e){return{lo:a|0,hi:e|0}}function Bi(a,e){return e=~e,a?a=~a+1:e+=1,mt(a,e)}const Fi=a=>{const e=String(a);return"0000000".slice(e.length)+e};function xi(a,e){if(a>=0){for(;a>127;)e.push(a&127|128),a=a>>>7;e.push(a)}else{for(let n=0;n<9;n++)e.push(a&127|128),a=a>>7;e.push(1)}}function fR(){let a=this.buf[this.pos++],e=a&127;if(!(a&128))return this.assertBounds(),e;if(a=this.buf[this.pos++],e|=(a&127)<<7,!(a&128))return this.assertBounds(),e;if(a=this.buf[this.pos++],e|=(a&127)<<14,!(a&128))return this.assertBounds(),e;if(a=this.buf[this.pos++],e|=(a&127)<<21,!(a&128))return this.assertBounds(),e;a=this.buf[this.pos++],e|=(a&15)<<28;for(let n=5;a&128&&n<10;n++)a=this.buf[this.pos++];if(a&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}function RR(){const a=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof a.getBigInt64=="function"&&typeof a.getBigUint64=="function"&&typeof a.setBigInt64=="function"&&typeof a.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const o=BigInt("-9223372036854775808"),i=BigInt("9223372036854775807"),r=BigInt("0"),c=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){const d=typeof l=="bigint"?l:BigInt(l);if(d>i||d<o)throw new Error(`int64 invalid: ${l}`);return d},uParse(l){const d=typeof l=="bigint"?l:BigInt(l);if(d>c||d<r)throw new Error(`uint64 invalid: ${l}`);return d},enc(l){return a.setBigInt64(0,this.parse(l),!0),{lo:a.getInt32(0,!0),hi:a.getInt32(4,!0)}},uEnc(l){return a.setBigInt64(0,this.uParse(l),!0),{lo:a.getInt32(0,!0),hi:a.getInt32(4,!0)}},dec(l,d){return a.setInt32(0,l,!0),a.setInt32(4,d,!0),a.getBigInt64(0,!0)},uDec(l,d){return a.setInt32(0,l,!0),a.setInt32(4,d,!0),a.getBigUint64(0,!0)}}}const n=o=>G(/^-?[0-9]+$/.test(o),`int64 invalid: ${o}`),t=o=>G(/^[0-9]+$/.test(o),`uint64 invalid: ${o}`);return{zero:"0",supported:!1,parse(o){return typeof o!="string"&&(o=o.toString()),n(o),o},uParse(o){return typeof o!="string"&&(o=o.toString()),t(o),o},enc(o){return typeof o!="string"&&(o=o.toString()),n(o),Li(o)},uEnc(o){return typeof o!="string"&&(o=o.toString()),t(o),Li(o)},dec(o,i){return vR(o,i)},uDec(o,i){return Gi(o,i)}}}const W=RR();var S;(function(a){a[a.DOUBLE=1]="DOUBLE",a[a.FLOAT=2]="FLOAT",a[a.INT64=3]="INT64",a[a.UINT64=4]="UINT64",a[a.INT32=5]="INT32",a[a.FIXED64=6]="FIXED64",a[a.FIXED32=7]="FIXED32",a[a.BOOL=8]="BOOL",a[a.STRING=9]="STRING",a[a.BYTES=12]="BYTES",a[a.UINT32=13]="UINT32",a[a.SFIXED32=15]="SFIXED32",a[a.SFIXED64=16]="SFIXED64",a[a.SINT32=17]="SINT32",a[a.SINT64=18]="SINT64"})(S||(S={}));var ze;(function(a){a[a.BIGINT=0]="BIGINT",a[a.STRING=1]="STRING"})(ze||(ze={}));function Ve(a,e,n){if(e===n)return!0;if(a==S.BYTES){if(!(e instanceof Uint8Array)||!(n instanceof Uint8Array)||e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}switch(a){case S.UINT64:case S.FIXED64:case S.INT64:case S.SFIXED64:case S.SINT64:return e==n}return!1}function dn(a,e){switch(a){case S.BOOL:return!1;case S.UINT64:case S.FIXED64:case S.INT64:case S.SFIXED64:case S.SINT64:return e==0?W.zero:"0";case S.DOUBLE:case S.FLOAT:return 0;case S.BYTES:return new Uint8Array(0);case S.STRING:return"";default:return 0}}function Ji(a,e){switch(a){case S.BOOL:return e===!1;case S.STRING:return e==="";case S.BYTES:return e instanceof Uint8Array&&!e.byteLength;default:return e==0}}var x;(function(a){a[a.Varint=0]="Varint",a[a.Bit64=1]="Bit64",a[a.LengthDelimited=2]="LengthDelimited",a[a.StartGroup=3]="StartGroup",a[a.EndGroup=4]="EndGroup",a[a.Bit32=5]="Bit32"})(x||(x={}));class _R{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let o=0;o<this.chunks.length;o++)e+=this.chunks[o].length;let n=new Uint8Array(e),t=0;for(let o=0;o<this.chunks.length;o++)n.set(this.chunks[o],t),t+=this.chunks[o].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,n){return this.uint32((e<<3|n)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(it(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return Xn(e),xi(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let n=this.textEncoder.encode(e);return this.uint32(n.byteLength),this.raw(n)}float(e){Pi(e);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,e,!0),this.raw(n)}fixed32(e){it(e);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,e,!0),this.raw(n)}sfixed32(e){Xn(e);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)}sint32(e){return Xn(e),e=(e<<1^e>>31)>>>0,xi(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),t=new DataView(n.buffer),o=W.enc(e);return t.setInt32(0,o.lo,!0),t.setInt32(4,o.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),t=new DataView(n.buffer),o=W.uEnc(e);return t.setInt32(0,o.lo,!0),t.setInt32(4,o.hi,!0),this.raw(n)}int64(e){let n=W.enc(e);return rt(n.lo,n.hi,this.buf),this}sint64(e){let n=W.enc(e),t=n.hi>>31,o=n.lo<<1^t,i=(n.hi<<1|n.lo>>>31)^t;return rt(o,i,this.buf),this}uint64(e){let n=W.uEnc(e);return rt(n.lo,n.hi,this.buf),this}}class zi{constructor(e,n){this.varint64=yR,this.uint32=fR,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=n??new TextDecoder}tag(){let e=this.uint32(),n=e>>>3,t=e&7;if(n<=0||t<0||t>5)throw new Error("illegal tag: field no "+n+" wire type "+t);return[n,t]}skip(e,n){let t=this.pos;switch(e){case x.Varint:for(;this.buf[this.pos++]&128;);break;case x.Bit64:this.pos+=4;case x.Bit32:this.pos+=4;break;case x.LengthDelimited:let o=this.uint32();this.pos+=o;break;case x.StartGroup:for(;;){const[i,r]=this.tag();if(r===x.EndGroup){if(n!==void 0&&i!==n)throw new Error("invalid end group tag");break}this.skip(r,i)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return W.dec(...this.varint64())}uint64(){return W.uDec(...this.varint64())}sint64(){let[e,n]=this.varint64(),t=-(e&1);return e=(e>>>1|(n&1)<<31)^t,n=n>>>1^t,W.dec(e,n)}bool(){let[e,n]=this.varint64();return e!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return W.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return W.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),n=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(n,n+e)}string(){return this.textDecoder.decode(this.bytes())}}function SR(a,e,n,t){let o;return{typeName:e,extendee:n,get field(){if(!o){const i=typeof t=="function"?t():t;i.name=e.split(".").pop(),i.jsonName=`[${e}]`,o=a.util.newFieldList([i]).list()[0]}return o},runtime:a}}function Vi(a){const e=a.field.localName,n=Object.create(null);return n[e]=IR(a),[n,()=>n[e]]}function IR(a){const e=a.field;if(e.repeated)return[];if(e.default!==void 0)return e.default;switch(e.kind){case"enum":return e.T.values[0].no;case"scalar":return dn(e.T,e.L);case"message":const n=e.T,t=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(t):t;case"map":throw"map fields are not allowed to be extensions"}}function OR(a,e){if(!e.repeated&&(e.kind=="enum"||e.kind=="scalar")){for(let n=a.length-1;n>=0;--n)if(a[n].no==e.no)return[a[n]];return[]}return a.filter(n=>n.no===e.no)}let ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Zn=[];for(let a=0;a<ve.length;a++)Zn[ve[a].charCodeAt(0)]=a;Zn[45]=ve.indexOf("+"),Zn[95]=ve.indexOf("/");const ct={dec(a){let e=a.length*3/4;a[a.length-2]=="="?e-=2:a[a.length-1]=="="&&(e-=1);let n=new Uint8Array(e),t=0,o=0,i,r=0;for(let c=0;c<a.length;c++){if(i=Zn[a.charCodeAt(c)],i===void 0)switch(a[c]){case"=":o=0;case`
|
|
2
|
-
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(o){case 0:r=i,o=1;break;case 1:n[t++]=r<<2|(i&48)>>4,r=i,o=2;break;case 2:n[t++]=(r&15)<<4|(i&60)>>2,r=i,o=3;break;case 3:n[t++]=(r&3)<<6|i,o=0;break}}if(o==1)throw Error("invalid base64 string.");return n.subarray(0,t)},enc(a){let e="",n=0,t,o=0;for(let i=0;i<a.length;i++)switch(t=a[i],n){case 0:e+=ve[t>>2],o=(t&3)<<4,n=1;break;case 1:e+=ve[o|t>>4],o=(t&15)<<2,n=2;break;case 2:e+=ve[o|t>>6],e+=ve[t&63],n=0;break}return n&&(e+=ve[o],e+="=",n==1&&(e+="=")),e}};function bR(a,e,n){Yi(e,a);const t=e.runtime.bin.makeReadOptions(n),o=OR(a.getType().runtime.bin.listUnknownFields(a),e.field),[i,r]=Vi(e);for(const c of o)e.runtime.bin.readField(i,t.readerFactory(c.data),e.field,c.wireType,t);return r()}function MR(a,e,n,t){Yi(e,a);const o=e.runtime.bin.makeReadOptions(t),i=e.runtime.bin.makeWriteOptions(t);if($i(a,e)){const d=a.getType().runtime.bin.listUnknownFields(a).filter(u=>u.no!=e.field.no);a.getType().runtime.bin.discardUnknownFields(a);for(const u of d)a.getType().runtime.bin.onUnknownField(a,u.no,u.wireType,u.data)}const r=i.writerFactory();let c=e.field;!c.opt&&!c.repeated&&(c.kind=="enum"||c.kind=="scalar")&&(c=Object.assign(Object.assign({},e.field),{opt:!0})),e.runtime.bin.writeField(c,n,r,i);const l=o.readerFactory(r.finish());for(;l.pos<l.len;){const[d,u]=l.tag(),h=l.skip(u,d);a.getType().runtime.bin.onUnknownField(a,d,u,h)}}function $i(a,e){const n=a.getType();return e.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(a).find(t=>t.no==e.field.no)}function Yi(a,e){G(a.extendee.typeName==e.getType().typeName,`extension ${a.typeName} can only be applied to message ${a.extendee.typeName}`)}function Wi(a,e){const n=a.localName;if(a.repeated)return e[n].length>0;if(a.oneof)return e[a.oneof.localName].case===n;switch(a.kind){case"enum":case"scalar":return a.opt||a.req?e[n]!==void 0:a.kind=="enum"?e[n]!==a.T.values[0].no:!Ji(a.T,e[n]);case"message":return e[n]!==void 0;case"map":return Object.keys(e[n]).length>0}}function Hi(a,e){const n=a.localName,t=!a.opt&&!a.req;if(a.repeated)e[n]=[];else if(a.oneof)e[a.oneof.localName]={case:void 0};else switch(a.kind){case"map":e[n]={};break;case"enum":e[n]=t?a.T.values[0].no:void 0;break;case"scalar":e[n]=t?dn(a.T,a.L):void 0;break;case"message":e[n]=void 0;break}}function en(a,e){if(a===null||typeof a!="object"||!Object.getOwnPropertyNames(w.prototype).every(t=>t in a&&typeof a[t]=="function"))return!1;const n=a.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:e===void 0?!0:n.typeName==e.typeName}function ji(a,e){return en(e)||!a.fieldWrapper?e:a.fieldWrapper.wrapField(e)}S.DOUBLE,S.FLOAT,S.INT64,S.UINT64,S.INT32,S.UINT32,S.BOOL,S.STRING,S.BYTES;const Ki={ignoreUnknownFields:!1},Xi={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function ER(a){return a?Object.assign(Object.assign({},Ki),a):Ki}function wR(a){return a?Object.assign(Object.assign({},Xi),a):Xi}const ea=Symbol(),na=Symbol();function CR(){return{makeReadOptions:ER,makeWriteOptions:wR,readMessage(a,e,n,t){if(e==null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message ${a.typeName} from JSON: ${ie(e)}`);t=t??new a;const o=new Map,i=n.typeRegistry;for(const[r,c]of Object.entries(e)){const l=a.fields.findJsonName(r);if(l){if(l.oneof){if(c===null&&l.kind=="scalar")continue;const d=o.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${a.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${r}"`);o.set(l.oneof,r)}Qi(t,c,l,n,a)}else{let d=!1;if(i?.findExtension&&r.startsWith("[")&&r.endsWith("]")){const u=i.findExtension(r.substring(1,r.length-1));if(u&&u.extendee.typeName==a.typeName){d=!0;const[h,I]=Vi(u);Qi(h,c,u.field,n,u),MR(t,u,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${a.typeName} from JSON: key "${r}" is unknown`)}}return t},writeMessage(a,e){const n=a.getType(),t={};let o;try{for(o of n.fields.byNumber()){if(!Wi(o,a)){if(o.req)throw"required field not set";if(!e.emitDefaultValues||!PR(o))continue}const r=o.oneof?a[o.oneof.localName].value:a[o.localName],c=Zi(o,r,e);c!==void 0&&(t[e.useProtoFieldName?o.name:o.jsonName]=c)}const i=e.typeRegistry;if(i?.findExtensionFor)for(const r of n.runtime.bin.listUnknownFields(a)){const c=i.findExtensionFor(n.typeName,r.no);if(c&&$i(a,c)){const l=bR(a,c,e),d=Zi(c.field,l,e);d!==void 0&&(t[c.field.jsonName]=d)}}}catch(i){const r=o?`cannot encode field ${n.typeName}.${o.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,c=i instanceof Error?i.message:String(i);throw new Error(r+(c.length>0?`: ${c}`:""))}return t},readScalar(a,e,n){return Sn(a,e,n??ze.BIGINT,!0)},writeScalar(a,e,n){if(e!==void 0&&(n||Ji(a,e)))return aa(a,e)},debug:ie}}function ie(a){if(a===null)return"null";switch(typeof a){case"object":return Array.isArray(a)?"array":"object";case"string":return a.length>100?"string":`"${a.split('"').join('\\"')}"`;default:return String(a)}}function Qi(a,e,n,t,o){let i=n.localName;if(n.repeated){if(G(n.kind!="map"),e===null)return;if(!Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(e)}`);const r=a[i];for(const c of e){if(c===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(c)}`);switch(n.kind){case"message":r.push(n.T.fromJson(c,t));break;case"enum":const l=lt(n.T,c,t.ignoreUnknownFields,!0);l!==na&&r.push(l);break;case"scalar":try{r.push(Sn(n.T,c,n.L,!0))}catch(d){let u=`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(c)}`;throw d instanceof Error&&d.message.length>0&&(u+=`: ${d.message}`),new Error(u)}break}}}else if(n.kind=="map"){if(e===null)return;if(typeof e!="object"||Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(e)}`);const r=a[i];for(const[c,l]of Object.entries(e)){if(l===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: map value null`);let d;try{d=NR(n.K,c)}catch(u){let h=`cannot decode map key for field ${o.typeName}.${n.name} from JSON: ${ie(e)}`;throw u instanceof Error&&u.message.length>0&&(h+=`: ${u.message}`),new Error(h)}switch(n.V.kind){case"message":r[d]=n.V.T.fromJson(l,t);break;case"enum":const u=lt(n.V.T,l,t.ignoreUnknownFields,!0);u!==na&&(r[d]=u);break;case"scalar":try{r[d]=Sn(n.V.T,l,ze.BIGINT,!0)}catch(h){let I=`cannot decode map value for field ${o.typeName}.${n.name} from JSON: ${ie(e)}`;throw h instanceof Error&&h.message.length>0&&(I+=`: ${h.message}`),new Error(I)}break}}}else switch(n.oneof&&(a=a[n.oneof.localName]={case:i},i="value"),n.kind){case"message":const r=n.T;if(e===null&&r.typeName!="google.protobuf.Value")return;let c=a[i];en(c)?c.fromJson(e,t):(a[i]=c=r.fromJson(e,t),r.fieldWrapper&&!n.oneof&&(a[i]=r.fieldWrapper.unwrapField(c)));break;case"enum":const l=lt(n.T,e,t.ignoreUnknownFields,!1);switch(l){case ea:Hi(n,a);break;case na:break;default:a[i]=l;break}break;case"scalar":try{const d=Sn(n.T,e,n.L,!1);switch(d){case ea:Hi(n,a);break;default:a[i]=d;break}}catch(d){let u=`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(e)}`;throw d instanceof Error&&d.message.length>0&&(u+=`: ${d.message}`),new Error(u)}break}}function NR(a,e){if(a===S.BOOL)switch(e){case"true":e=!0;break;case"false":e=!1;break}return Sn(a,e,ze.BIGINT,!0).toString()}function Sn(a,e,n,t){if(e===null)return t?dn(a,n):ea;switch(a){case S.DOUBLE:case S.FLOAT:if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""||typeof e=="string"&&e.trim().length!==e.length||typeof e!="string"&&typeof e!="number")break;const o=Number(e);if(Number.isNaN(o)||!Number.isFinite(o))break;return a==S.FLOAT&&Pi(o),o;case S.INT32:case S.FIXED32:case S.SFIXED32:case S.SINT32:case S.UINT32:let i;if(typeof e=="number"?i=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(i=Number(e)),i===void 0)break;return a==S.UINT32||a==S.FIXED32?it(i):Xn(i),i;case S.INT64:case S.SFIXED64:case S.SINT64:if(typeof e!="number"&&typeof e!="string")break;const r=W.parse(e);return n?r.toString():r;case S.FIXED64:case S.UINT64:if(typeof e!="number"&&typeof e!="string")break;const c=W.uParse(e);return n?c.toString():c;case S.BOOL:if(typeof e!="boolean")break;return e;case S.STRING:if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case S.BYTES:if(e==="")return new Uint8Array(0);if(typeof e!="string")break;return ct.dec(e)}throw new Error}function lt(a,e,n,t){if(e===null)return a.typeName=="google.protobuf.NullValue"?0:t?a.values[0].no:ea;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":const o=a.findName(e);if(o!==void 0)return o.no;if(n)return na;break}throw new Error(`cannot decode enum ${a.typeName} from JSON: ${ie(e)}`)}function PR(a){return a.repeated||a.kind=="map"?!0:!(a.oneof||a.kind=="message"||a.opt||a.req)}function Zi(a,e,n){if(a.kind=="map"){G(typeof e=="object"&&e!=null);const t={},o=Object.entries(e);switch(a.V.kind){case"scalar":for(const[r,c]of o)t[r.toString()]=aa(a.V.T,c);break;case"message":for(const[r,c]of o)t[r.toString()]=c.toJson(n);break;case"enum":const i=a.V.T;for(const[r,c]of o)t[r.toString()]=dt(i,c,n.enumAsInteger);break}return n.emitDefaultValues||o.length>0?t:void 0}if(a.repeated){G(Array.isArray(e));const t=[];switch(a.kind){case"scalar":for(let o=0;o<e.length;o++)t.push(aa(a.T,e[o]));break;case"enum":for(let o=0;o<e.length;o++)t.push(dt(a.T,e[o],n.enumAsInteger));break;case"message":for(let o=0;o<e.length;o++)t.push(e[o].toJson(n));break}return n.emitDefaultValues||t.length>0?t:void 0}switch(a.kind){case"scalar":return aa(a.T,e);case"enum":return dt(a.T,e,n.enumAsInteger);case"message":return ji(a.T,e).toJson(n)}}function dt(a,e,n){var t;if(G(typeof e=="number"),a.typeName=="google.protobuf.NullValue")return null;if(n)return e;const o=a.findNumber(e);return(t=o?.name)!==null&&t!==void 0?t:e}function aa(a,e){switch(a){case S.INT32:case S.SFIXED32:case S.SINT32:case S.FIXED32:case S.UINT32:return G(typeof e=="number"),e;case S.FLOAT:case S.DOUBLE:return G(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e;case S.STRING:return G(typeof e=="string"),e;case S.BOOL:return G(typeof e=="boolean"),e;case S.UINT64:case S.FIXED64:case S.INT64:case S.SFIXED64:case S.SINT64:return G(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),e.toString();case S.BYTES:return G(e instanceof Uint8Array),ct.enc(e)}}const pn=Symbol("@bufbuild/protobuf/unknown-fields"),er={readUnknownFields:!0,readerFactory:a=>new zi(a)},nr={writeUnknownFields:!0,writerFactory:()=>new _R};function DR(a){return a?Object.assign(Object.assign({},er),a):er}function AR(a){return a?Object.assign(Object.assign({},nr),a):nr}function UR(){return{makeReadOptions:DR,makeWriteOptions:AR,listUnknownFields(a){var e;return(e=a[pn])!==null&&e!==void 0?e:[]},discardUnknownFields(a){delete a[pn]},writeUnknownFields(a,e){const t=a[pn];if(t)for(const o of t)e.tag(o.no,o.wireType).raw(o.data)},onUnknownField(a,e,n,t){const o=a;Array.isArray(o[pn])||(o[pn]=[]),o[pn].push({no:e,wireType:n,data:t})},readMessage(a,e,n,t,o){const i=a.getType(),r=o?e.len:e.pos+n;let c,l;for(;e.pos<r&&([c,l]=e.tag(),!(o===!0&&l==x.EndGroup));){const d=i.fields.find(c);if(!d){const u=e.skip(l,c);t.readUnknownFields&&this.onUnknownField(a,c,l,u);continue}ar(a,e,d,l,t)}if(o&&(l!=x.EndGroup||c!==n))throw new Error("invalid end group tag")},readField:ar,writeMessage(a,e,n){const t=a.getType();for(const o of t.fields.byNumber()){if(!Wi(o,a)){if(o.req)throw new Error(`cannot encode field ${t.typeName}.${o.name} to binary: required field not set`);continue}const i=o.oneof?a[o.oneof.localName].value:a[o.localName];tr(o,i,e,n)}return n.writeUnknownFields&&this.writeUnknownFields(a,e),e},writeField(a,e,n,t){e!==void 0&&tr(a,e,n,t)}}}function ar(a,e,n,t,o){let{repeated:i,localName:r}=n;switch(n.oneof&&(a=a[n.oneof.localName],a.case!=r&&delete a.value,a.case=r,r="value"),n.kind){case"scalar":case"enum":const c=n.kind=="enum"?S.INT32:n.T;let l=sa;if(n.kind=="scalar"&&n.L>0&&(l=LR),i){let I=a[r];if(t==x.LengthDelimited&&c!=S.STRING&&c!=S.BYTES){let O=e.uint32()+e.pos;for(;e.pos<O;)I.push(l(e,c))}else I.push(l(e,c))}else a[r]=l(e,c);break;case"message":const d=n.T;i?a[r].push(ta(e,new d,o,n)):en(a[r])?ta(e,a[r],o,n):(a[r]=ta(e,new d,o,n),d.fieldWrapper&&!n.oneof&&!n.repeated&&(a[r]=d.fieldWrapper.unwrapField(a[r])));break;case"map":let[u,h]=qR(n,e,o);a[r][u]=h;break}}function ta(a,e,n,t){const o=e.getType().runtime.bin,i=t?.delimited;return o.readMessage(e,a,i?t.no:a.uint32(),n,i),e}function qR(a,e,n){const t=e.uint32(),o=e.pos+t;let i,r;for(;e.pos<o;){const[c]=e.tag();switch(c){case 1:i=sa(e,a.K);break;case 2:switch(a.V.kind){case"scalar":r=sa(e,a.V.T);break;case"enum":r=e.int32();break;case"message":r=ta(e,new a.V.T,n,void 0);break}break}}if(i===void 0&&(i=dn(a.K,ze.BIGINT)),typeof i!="string"&&typeof i!="number"&&(i=i.toString()),r===void 0)switch(a.V.kind){case"scalar":r=dn(a.V.T,ze.BIGINT);break;case"enum":r=a.V.T.values[0].no;break;case"message":r=new a.V.T;break}return[i,r]}function LR(a,e){const n=sa(a,e);return typeof n=="bigint"?n.toString():n}function sa(a,e){switch(e){case S.STRING:return a.string();case S.BOOL:return a.bool();case S.DOUBLE:return a.double();case S.FLOAT:return a.float();case S.INT32:return a.int32();case S.INT64:return a.int64();case S.UINT64:return a.uint64();case S.FIXED64:return a.fixed64();case S.BYTES:return a.bytes();case S.FIXED32:return a.fixed32();case S.SFIXED32:return a.sfixed32();case S.SFIXED64:return a.sfixed64();case S.SINT64:return a.sint64();case S.UINT32:return a.uint32();case S.SINT32:return a.sint32()}}function tr(a,e,n,t){G(e!==void 0);const o=a.repeated;switch(a.kind){case"scalar":case"enum":let i=a.kind=="enum"?S.INT32:a.T;if(o)if(G(Array.isArray(e)),a.packed)BR(n,i,a.no,e);else for(const r of e)In(n,i,a.no,r);else In(n,i,a.no,e);break;case"message":if(o){G(Array.isArray(e));for(const r of e)sr(n,t,a,r)}else sr(n,t,a,e);break;case"map":G(typeof e=="object"&&e!=null);for(const[r,c]of Object.entries(e))GR(n,t,a,r,c);break}}function GR(a,e,n,t,o){a.tag(n.no,x.LengthDelimited),a.fork();let i=t;switch(n.K){case S.INT32:case S.FIXED32:case S.UINT32:case S.SFIXED32:case S.SINT32:i=Number.parseInt(t);break;case S.BOOL:G(t=="true"||t=="false"),i=t=="true";break}switch(In(a,n.K,1,i),n.V.kind){case"scalar":In(a,n.V.T,2,o);break;case"enum":In(a,S.INT32,2,o);break;case"message":G(o!==void 0),a.tag(2,x.LengthDelimited).bytes(o.toBinary(e));break}a.join()}function sr(a,e,n,t){const o=ji(n.T,t);n.delimited?a.tag(n.no,x.StartGroup).raw(o.toBinary(e)).tag(n.no,x.EndGroup):a.tag(n.no,x.LengthDelimited).bytes(o.toBinary(e))}function In(a,e,n,t){G(t!==void 0);let[o,i]=or(e);a.tag(n,o)[i](t)}function BR(a,e,n,t){if(!t.length)return;a.tag(n,x.LengthDelimited).fork();let[,o]=or(e);for(let i=0;i<t.length;i++)a[o](t[i]);a.join()}function or(a){let e=x.Varint;switch(a){case S.BYTES:case S.STRING:e=x.LengthDelimited;break;case S.DOUBLE:case S.FIXED64:case S.SFIXED64:e=x.Bit64;break;case S.FIXED32:case S.SFIXED32:case S.FLOAT:e=x.Bit32;break}const n=S[a].toLowerCase();return[e,n]}function FR(){return{setEnumType:Ai,initPartial(a,e){if(a===void 0)return;const n=e.getType();for(const t of n.fields.byMember()){const o=t.localName,i=e,r=a;if(r[o]!=null)switch(t.kind){case"oneof":const c=r[o].case;if(c===void 0)continue;const l=t.findField(c);let d=r[o].value;l&&l.kind=="message"&&!en(d,l.T)?d=new l.T(d):l&&l.kind==="scalar"&&l.T===S.BYTES&&(d=On(d)),i[o]={case:c,value:d};break;case"scalar":case"enum":let u=r[o];t.T===S.BYTES&&(u=t.repeated?u.map(On):On(u)),i[o]=u;break;case"map":switch(t.V.kind){case"scalar":case"enum":if(t.V.T===S.BYTES)for(const[R,O]of Object.entries(r[o]))i[o][R]=On(O);else Object.assign(i[o],r[o]);break;case"message":const I=t.V.T;for(const R of Object.keys(r[o])){let O=r[o][R];I.fieldWrapper||(O=new I(O)),i[o][R]=O}break}break;case"message":const h=t.T;if(t.repeated)i[o]=r[o].map(I=>en(I,h)?I:new h(I));else{const I=r[o];h.fieldWrapper?h.typeName==="google.protobuf.BytesValue"?i[o]=On(I):i[o]=I:i[o]=en(I,h)?I:new h(I)}break}}},equals(a,e,n){return e===n?!0:!e||!n?!1:a.fields.byMember().every(t=>{const o=e[t.localName],i=n[t.localName];if(t.repeated){if(o.length!==i.length)return!1;switch(t.kind){case"message":return o.every((r,c)=>t.T.equals(r,i[c]));case"scalar":return o.every((r,c)=>Ve(t.T,r,i[c]));case"enum":return o.every((r,c)=>Ve(S.INT32,r,i[c]))}throw new Error(`repeated cannot contain ${t.kind}`)}switch(t.kind){case"message":return t.T.equals(o,i);case"enum":return Ve(S.INT32,o,i);case"scalar":return Ve(t.T,o,i);case"oneof":if(o.case!==i.case)return!1;const r=t.findField(o.case);if(r===void 0)return!0;switch(r.kind){case"message":return r.T.equals(o.value,i.value);case"enum":return Ve(S.INT32,o.value,i.value);case"scalar":return Ve(r.T,o.value,i.value)}throw new Error(`oneof cannot contain ${r.kind}`);case"map":const c=Object.keys(o).concat(Object.keys(i));switch(t.V.kind){case"message":const l=t.V.T;return c.every(u=>l.equals(o[u],i[u]));case"enum":return c.every(u=>Ve(S.INT32,o[u],i[u]));case"scalar":const d=t.V.T;return c.every(u=>Ve(d,o[u],i[u]))}break}})},clone(a){const e=a.getType(),n=new e,t=n;for(const o of e.fields.byMember()){const i=a[o.localName];let r;if(o.repeated)r=i.map(oa);else if(o.kind=="map"){r=t[o.localName];for(const[c,l]of Object.entries(i))r[c]=oa(l)}else o.kind=="oneof"?r=o.findField(i.case)?{case:i.case,value:oa(i.value)}:{case:void 0}:r=oa(i);t[o.localName]=r}for(const o of e.runtime.bin.listUnknownFields(a))e.runtime.bin.onUnknownField(t,o.no,o.wireType,o.data);return n}}}function oa(a){if(a===void 0)return a;if(en(a))return a.clone();if(a instanceof Uint8Array){const e=new Uint8Array(a.byteLength);return e.set(a),e}return a}function On(a){return a instanceof Uint8Array?a:new Uint8Array(a)}function ir(a,e,n){return{syntax:a,json:CR(),bin:UR(),util:Object.assign(Object.assign({},FR()),{newFieldList:e,initFields:n}),makeMessageType(t,o,i){return kR(this,t,o,i)},makeEnum:TR,makeEnumType:Ui,getEnumType:gR,makeExtension(t,o,i){return SR(this,t,o,i)}}}class rr{constructor(e,n){this._fields=e,this._normalizer=n}findJsonName(e){if(!this.jsonNames){const n={};for(const t of this.list())n[t.jsonName]=n[t.name]=t;this.jsonNames=n}return this.jsonNames[e]}find(e){if(!this.numbers){const n={};for(const t of this.list())n[t.no]=t;this.numbers=n}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,n)=>e.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let n;for(const t of this.list())t.oneof?t.oneof!==n&&(n=t.oneof,e.push(n)):e.push(t)}return this.members}}function mr(a,e){const n=cr(a);return e?n:YR($R(n))}function xR(a){return mr(a,!1)}const JR=cr;function cr(a){let e=!1;const n=[];for(let t=0;t<a.length;t++){let o=a.charAt(t);switch(o){case"_":e=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(o),e=!1;break;default:e&&(e=!1,o=o.toUpperCase()),n.push(o);break}}return n.join("")}const zR=new Set(["constructor","toString","toJSON","valueOf"]),VR=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),lr=a=>`${a}$`,$R=a=>VR.has(a)?lr(a):a,YR=a=>zR.has(a)?lr(a):a;class WR{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=xR(e)}addField(e){G(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;n<this.fields.length;n++)this._lookup[this.fields[n].localName]=this.fields[n]}return this._lookup[e]}}function dr(a,e){var n,t,o,i,r,c;const l=[];let d;for(const u of typeof a=="function"?a():a){const h=u;if(h.localName=mr(u.name,u.oneof!==void 0),h.jsonName=(n=u.jsonName)!==null&&n!==void 0?n:JR(u.name),h.repeated=(t=u.repeated)!==null&&t!==void 0?t:!1,u.kind=="scalar"&&(h.L=(o=u.L)!==null&&o!==void 0?o:ze.BIGINT),h.delimited=(i=u.delimited)!==null&&i!==void 0?i:!1,h.req=(r=u.req)!==null&&r!==void 0?r:!1,h.opt=(c=u.opt)!==null&&c!==void 0?c:!1,u.packed===void 0&&(e?h.packed=u.kind=="enum"||u.kind=="scalar"&&u.T!=S.BYTES&&u.T!=S.STRING:h.packed=!1),u.oneof!==void 0){const I=typeof u.oneof=="string"?u.oneof:u.oneof.name;(!d||d.name!=I)&&(d=new WR(I)),h.oneof=d,d.addField(h)}l.push(h)}return l}const s=ir("proto3",a=>new rr(a,e=>dr(e,!0)),a=>{for(const e of a.getType().fields.byMember()){if(e.opt)continue;const n=e.localName,t=a;if(e.repeated){t[n]=[];continue}switch(e.kind){case"oneof":t[n]={case:void 0};break;case"enum":t[n]=0;break;case"map":t[n]={};break;case"scalar":t[n]=dn(e.T,e.L);break}}}),T=ir("proto2",a=>new rr(a,e=>dr(e,!1)),a=>{for(const e of a.getType().fields.byMember()){const n=e.localName,t=a;if(e.repeated){t[n]=[];continue}switch(e.kind){case"oneof":t[n]={case:void 0};break;case"map":t[n]={};break}}});var m;(function(a){a[a.Unary=0]="Unary",a[a.ServerStreaming=1]="ServerStreaming",a[a.ClientStreaming=2]="ClientStreaming",a[a.BiDiStreaming=3]="BiDiStreaming"})(m||(m={}));var pr;(function(a){a[a.NoSideEffects=1]="NoSideEffects",a[a.Idempotent=2]="Idempotent"})(pr||(pr={}));var te;(function(a){a[a.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",a[a.EDITION_LEGACY=900]="EDITION_LEGACY",a[a.EDITION_PROTO2=998]="EDITION_PROTO2",a[a.EDITION_PROTO3=999]="EDITION_PROTO3",a[a.EDITION_2023=1e3]="EDITION_2023",a[a.EDITION_2024=1001]="EDITION_2024",a[a.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",a[a.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",a[a.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",a[a.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",a[a.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",a[a.EDITION_MAX=2147483647]="EDITION_MAX"})(te||(te={})),T.util.setEnumType(te,"google.protobuf.Edition",[{no:0,name:"EDITION_UNKNOWN"},{no:900,name:"EDITION_LEGACY"},{no:998,name:"EDITION_PROTO2"},{no:999,name:"EDITION_PROTO3"},{no:1e3,name:"EDITION_2023"},{no:1001,name:"EDITION_2024"},{no:1,name:"EDITION_1_TEST_ONLY"},{no:2,name:"EDITION_2_TEST_ONLY"},{no:99997,name:"EDITION_99997_TEST_ONLY"},{no:99998,name:"EDITION_99998_TEST_ONLY"},{no:99999,name:"EDITION_99999_TEST_ONLY"},{no:2147483647,name:"EDITION_MAX"}]);class $e extends w{constructor(e){super(),this.file=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new $e().fromBinary(e,n)}static fromJson(e,n){return new $e().fromJson(e,n)}static fromJsonString(e,n){return new $e().fromJsonString(e,n)}static equals(e,n){return T.util.equals($e,e,n)}}$e.runtime=T,$e.typeName="google.protobuf.FileDescriptorSet",$e.fields=T.util.newFieldList(()=>[{no:1,name:"file",kind:"message",T:re,repeated:!0}]);class re extends w{constructor(e){super(),this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new re().fromBinary(e,n)}static fromJson(e,n){return new re().fromJson(e,n)}static fromJsonString(e,n){return new re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(re,e,n)}}re.runtime=T,re.typeName="google.protobuf.FileDescriptorProto",re.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"package",kind:"scalar",T:9,opt:!0},{no:3,name:"dependency",kind:"scalar",T:9,repeated:!0},{no:10,name:"public_dependency",kind:"scalar",T:5,repeated:!0},{no:11,name:"weak_dependency",kind:"scalar",T:5,repeated:!0},{no:4,name:"message_type",kind:"message",T:me,repeated:!0},{no:5,name:"enum_type",kind:"message",T:ce,repeated:!0},{no:6,name:"service",kind:"message",T:be,repeated:!0},{no:7,name:"extension",kind:"message",T:se,repeated:!0},{no:8,name:"options",kind:"message",T:Ee,opt:!0},{no:9,name:"source_code_info",kind:"message",T:Ge,opt:!0},{no:12,name:"syntax",kind:"scalar",T:9,opt:!0},{no:14,name:"edition",kind:"enum",T:T.getEnumType(te),opt:!0}]);class me extends w{constructor(e){super(),this.field=[],this.extension=[],this.nestedType=[],this.enumType=[],this.extensionRange=[],this.oneofDecl=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new me().fromBinary(e,n)}static fromJson(e,n){return new me().fromJson(e,n)}static fromJsonString(e,n){return new me().fromJsonString(e,n)}static equals(e,n){return T.util.equals(me,e,n)}}me.runtime=T,me.typeName="google.protobuf.DescriptorProto",me.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"field",kind:"message",T:se,repeated:!0},{no:6,name:"extension",kind:"message",T:se,repeated:!0},{no:3,name:"nested_type",kind:"message",T:me,repeated:!0},{no:4,name:"enum_type",kind:"message",T:ce,repeated:!0},{no:5,name:"extension_range",kind:"message",T:he,repeated:!0},{no:8,name:"oneof_decl",kind:"message",T:Se,repeated:!0},{no:7,name:"options",kind:"message",T:we,opt:!0},{no:9,name:"reserved_range",kind:"message",T:fe,repeated:!0},{no:10,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class he extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new he().fromBinary(e,n)}static fromJson(e,n){return new he().fromJson(e,n)}static fromJsonString(e,n){return new he().fromJsonString(e,n)}static equals(e,n){return T.util.equals(he,e,n)}}he.runtime=T,he.typeName="google.protobuf.DescriptorProto.ExtensionRange",he.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Re,opt:!0}]);class fe extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new fe().fromBinary(e,n)}static fromJson(e,n){return new fe().fromJson(e,n)}static fromJsonString(e,n){return new fe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(fe,e,n)}}fe.runtime=T,fe.typeName="google.protobuf.DescriptorProto.ReservedRange",fe.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class Re extends w{constructor(e){super(),this.uninterpretedOption=[],this.declaration=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Re().fromBinary(e,n)}static fromJson(e,n){return new Re().fromJson(e,n)}static fromJsonString(e,n){return new Re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Re,e,n)}}Re.runtime=T,Re.typeName="google.protobuf.ExtensionRangeOptions",Re.fields=T.util.newFieldList(()=>[{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0},{no:2,name:"declaration",kind:"message",T:_e,repeated:!0},{no:50,name:"features",kind:"message",T:$,opt:!0},{no:3,name:"verification",kind:"enum",T:T.getEnumType(bn),opt:!0,default:bn.UNVERIFIED}]);var bn;(function(a){a[a.DECLARATION=0]="DECLARATION",a[a.UNVERIFIED=1]="UNVERIFIED"})(bn||(bn={})),T.util.setEnumType(bn,"google.protobuf.ExtensionRangeOptions.VerificationState",[{no:0,name:"DECLARATION"},{no:1,name:"UNVERIFIED"}]);class _e extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new _e().fromBinary(e,n)}static fromJson(e,n){return new _e().fromJson(e,n)}static fromJsonString(e,n){return new _e().fromJsonString(e,n)}static equals(e,n){return T.util.equals(_e,e,n)}}_e.runtime=T,_e.typeName="google.protobuf.ExtensionRangeOptions.Declaration",_e.fields=T.util.newFieldList(()=>[{no:1,name:"number",kind:"scalar",T:5,opt:!0},{no:2,name:"full_name",kind:"scalar",T:9,opt:!0},{no:3,name:"type",kind:"scalar",T:9,opt:!0},{no:5,name:"reserved",kind:"scalar",T:8,opt:!0},{no:6,name:"repeated",kind:"scalar",T:8,opt:!0}]);class se extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new se().fromBinary(e,n)}static fromJson(e,n){return new se().fromJson(e,n)}static fromJsonString(e,n){return new se().fromJsonString(e,n)}static equals(e,n){return T.util.equals(se,e,n)}}se.runtime=T,se.typeName="google.protobuf.FieldDescriptorProto",se.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"number",kind:"scalar",T:5,opt:!0},{no:4,name:"label",kind:"enum",T:T.getEnumType(ra),opt:!0},{no:5,name:"type",kind:"enum",T:T.getEnumType(ia),opt:!0},{no:6,name:"type_name",kind:"scalar",T:9,opt:!0},{no:2,name:"extendee",kind:"scalar",T:9,opt:!0},{no:7,name:"default_value",kind:"scalar",T:9,opt:!0},{no:9,name:"oneof_index",kind:"scalar",T:5,opt:!0},{no:10,name:"json_name",kind:"scalar",T:9,opt:!0},{no:8,name:"options",kind:"message",T:Ce,opt:!0},{no:17,name:"proto3_optional",kind:"scalar",T:8,opt:!0}]);var ia;(function(a){a[a.DOUBLE=1]="DOUBLE",a[a.FLOAT=2]="FLOAT",a[a.INT64=3]="INT64",a[a.UINT64=4]="UINT64",a[a.INT32=5]="INT32",a[a.FIXED64=6]="FIXED64",a[a.FIXED32=7]="FIXED32",a[a.BOOL=8]="BOOL",a[a.STRING=9]="STRING",a[a.GROUP=10]="GROUP",a[a.MESSAGE=11]="MESSAGE",a[a.BYTES=12]="BYTES",a[a.UINT32=13]="UINT32",a[a.ENUM=14]="ENUM",a[a.SFIXED32=15]="SFIXED32",a[a.SFIXED64=16]="SFIXED64",a[a.SINT32=17]="SINT32",a[a.SINT64=18]="SINT64"})(ia||(ia={})),T.util.setEnumType(ia,"google.protobuf.FieldDescriptorProto.Type",[{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]);var ra;(function(a){a[a.OPTIONAL=1]="OPTIONAL",a[a.REPEATED=3]="REPEATED",a[a.REQUIRED=2]="REQUIRED"})(ra||(ra={})),T.util.setEnumType(ra,"google.protobuf.FieldDescriptorProto.Label",[{no:1,name:"LABEL_OPTIONAL"},{no:3,name:"LABEL_REPEATED"},{no:2,name:"LABEL_REQUIRED"}]);class Se extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Se().fromBinary(e,n)}static fromJson(e,n){return new Se().fromJson(e,n)}static fromJsonString(e,n){return new Se().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Se,e,n)}}Se.runtime=T,Se.typeName="google.protobuf.OneofDescriptorProto",Se.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"options",kind:"message",T:Pe,opt:!0}]);class ce extends w{constructor(e){super(),this.value=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new ce().fromBinary(e,n)}static fromJson(e,n){return new ce().fromJson(e,n)}static fromJsonString(e,n){return new ce().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ce,e,n)}}ce.runtime=T,ce.typeName="google.protobuf.EnumDescriptorProto",ce.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"value",kind:"message",T:Oe,repeated:!0},{no:3,name:"options",kind:"message",T:De,opt:!0},{no:4,name:"reserved_range",kind:"message",T:Ie,repeated:!0},{no:5,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class Ie extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ie().fromBinary(e,n)}static fromJson(e,n){return new Ie().fromJson(e,n)}static fromJsonString(e,n){return new Ie().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ie,e,n)}}Ie.runtime=T,Ie.typeName="google.protobuf.EnumDescriptorProto.EnumReservedRange",Ie.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class Oe extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Oe().fromBinary(e,n)}static fromJson(e,n){return new Oe().fromJson(e,n)}static fromJsonString(e,n){return new Oe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Oe,e,n)}}Oe.runtime=T,Oe.typeName="google.protobuf.EnumValueDescriptorProto",Oe.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"number",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Ae,opt:!0}]);class be extends w{constructor(e){super(),this.method=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new be().fromBinary(e,n)}static fromJson(e,n){return new be().fromJson(e,n)}static fromJsonString(e,n){return new be().fromJsonString(e,n)}static equals(e,n){return T.util.equals(be,e,n)}}be.runtime=T,be.typeName="google.protobuf.ServiceDescriptorProto",be.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"method",kind:"message",T:Me,repeated:!0},{no:3,name:"options",kind:"message",T:Ue,opt:!0}]);class Me extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Me().fromBinary(e,n)}static fromJson(e,n){return new Me().fromJson(e,n)}static fromJsonString(e,n){return new Me().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Me,e,n)}}Me.runtime=T,Me.typeName="google.protobuf.MethodDescriptorProto",Me.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"input_type",kind:"scalar",T:9,opt:!0},{no:3,name:"output_type",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:de,opt:!0},{no:5,name:"client_streaming",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"server_streaming",kind:"scalar",T:8,opt:!0,default:!1}]);class Ee extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ee().fromBinary(e,n)}static fromJson(e,n){return new Ee().fromJson(e,n)}static fromJsonString(e,n){return new Ee().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ee,e,n)}}Ee.runtime=T,Ee.typeName="google.protobuf.FileOptions",Ee.fields=T.util.newFieldList(()=>[{no:1,name:"java_package",kind:"scalar",T:9,opt:!0},{no:8,name:"java_outer_classname",kind:"scalar",T:9,opt:!0},{no:10,name:"java_multiple_files",kind:"scalar",T:8,opt:!0,default:!1},{no:20,name:"java_generate_equals_and_hash",kind:"scalar",T:8,opt:!0},{no:27,name:"java_string_check_utf8",kind:"scalar",T:8,opt:!0,default:!1},{no:9,name:"optimize_for",kind:"enum",T:T.getEnumType(Mn),opt:!0,default:Mn.SPEED},{no:11,name:"go_package",kind:"scalar",T:9,opt:!0},{no:16,name:"cc_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"java_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:18,name:"py_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:23,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:31,name:"cc_enable_arenas",kind:"scalar",T:8,opt:!0,default:!0},{no:36,name:"objc_class_prefix",kind:"scalar",T:9,opt:!0},{no:37,name:"csharp_namespace",kind:"scalar",T:9,opt:!0},{no:39,name:"swift_prefix",kind:"scalar",T:9,opt:!0},{no:40,name:"php_class_prefix",kind:"scalar",T:9,opt:!0},{no:41,name:"php_namespace",kind:"scalar",T:9,opt:!0},{no:44,name:"php_metadata_namespace",kind:"scalar",T:9,opt:!0},{no:45,name:"ruby_package",kind:"scalar",T:9,opt:!0},{no:50,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);var Mn;(function(a){a[a.SPEED=1]="SPEED",a[a.CODE_SIZE=2]="CODE_SIZE",a[a.LITE_RUNTIME=3]="LITE_RUNTIME"})(Mn||(Mn={})),T.util.setEnumType(Mn,"google.protobuf.FileOptions.OptimizeMode",[{no:1,name:"SPEED"},{no:2,name:"CODE_SIZE"},{no:3,name:"LITE_RUNTIME"}]);class we extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new we().fromBinary(e,n)}static fromJson(e,n){return new we().fromJson(e,n)}static fromJsonString(e,n){return new we().fromJsonString(e,n)}static equals(e,n){return T.util.equals(we,e,n)}}we.runtime=T,we.typeName="google.protobuf.MessageOptions",we.fields=T.util.newFieldList(()=>[{no:1,name:"message_set_wire_format",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"no_standard_descriptor_accessor",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:7,name:"map_entry",kind:"scalar",T:8,opt:!0},{no:11,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:12,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Ce extends w{constructor(e){super(),this.targets=[],this.editionDefaults=[],this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ce().fromBinary(e,n)}static fromJson(e,n){return new Ce().fromJson(e,n)}static fromJsonString(e,n){return new Ce().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ce,e,n)}}Ce.runtime=T,Ce.typeName="google.protobuf.FieldOptions",Ce.fields=T.util.newFieldList(()=>[{no:1,name:"ctype",kind:"enum",T:T.getEnumType(En),opt:!0,default:En.STRING},{no:2,name:"packed",kind:"scalar",T:8,opt:!0},{no:6,name:"jstype",kind:"enum",T:T.getEnumType(wn),opt:!0,default:wn.JS_NORMAL},{no:5,name:"lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:15,name:"unverified_lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:10,name:"weak",kind:"scalar",T:8,opt:!0,default:!1},{no:16,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"retention",kind:"enum",T:T.getEnumType(ma),opt:!0},{no:19,name:"targets",kind:"enum",T:T.getEnumType(ca),repeated:!0},{no:20,name:"edition_defaults",kind:"message",T:Ne,repeated:!0},{no:21,name:"features",kind:"message",T:$,opt:!0},{no:22,name:"feature_support",kind:"message",T:le,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);var En;(function(a){a[a.STRING=0]="STRING",a[a.CORD=1]="CORD",a[a.STRING_PIECE=2]="STRING_PIECE"})(En||(En={})),T.util.setEnumType(En,"google.protobuf.FieldOptions.CType",[{no:0,name:"STRING"},{no:1,name:"CORD"},{no:2,name:"STRING_PIECE"}]);var wn;(function(a){a[a.JS_NORMAL=0]="JS_NORMAL",a[a.JS_STRING=1]="JS_STRING",a[a.JS_NUMBER=2]="JS_NUMBER"})(wn||(wn={})),T.util.setEnumType(wn,"google.protobuf.FieldOptions.JSType",[{no:0,name:"JS_NORMAL"},{no:1,name:"JS_STRING"},{no:2,name:"JS_NUMBER"}]);var ma;(function(a){a[a.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",a[a.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",a[a.RETENTION_SOURCE=2]="RETENTION_SOURCE"})(ma||(ma={})),T.util.setEnumType(ma,"google.protobuf.FieldOptions.OptionRetention",[{no:0,name:"RETENTION_UNKNOWN"},{no:1,name:"RETENTION_RUNTIME"},{no:2,name:"RETENTION_SOURCE"}]);var ca;(function(a){a[a.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",a[a.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",a[a.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",a[a.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",a[a.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",a[a.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",a[a.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",a[a.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",a[a.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",a[a.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD"})(ca||(ca={})),T.util.setEnumType(ca,"google.protobuf.FieldOptions.OptionTargetType",[{no:0,name:"TARGET_TYPE_UNKNOWN"},{no:1,name:"TARGET_TYPE_FILE"},{no:2,name:"TARGET_TYPE_EXTENSION_RANGE"},{no:3,name:"TARGET_TYPE_MESSAGE"},{no:4,name:"TARGET_TYPE_FIELD"},{no:5,name:"TARGET_TYPE_ONEOF"},{no:6,name:"TARGET_TYPE_ENUM"},{no:7,name:"TARGET_TYPE_ENUM_ENTRY"},{no:8,name:"TARGET_TYPE_SERVICE"},{no:9,name:"TARGET_TYPE_METHOD"}]);class Ne extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ne().fromBinary(e,n)}static fromJson(e,n){return new Ne().fromJson(e,n)}static fromJsonString(e,n){return new Ne().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ne,e,n)}}Ne.runtime=T,Ne.typeName="google.protobuf.FieldOptions.EditionDefault",Ne.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(te),opt:!0},{no:2,name:"value",kind:"scalar",T:9,opt:!0}]);class le extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new le().fromBinary(e,n)}static fromJson(e,n){return new le().fromJson(e,n)}static fromJsonString(e,n){return new le().fromJsonString(e,n)}static equals(e,n){return T.util.equals(le,e,n)}}le.runtime=T,le.typeName="google.protobuf.FieldOptions.FeatureSupport",le.fields=T.util.newFieldList(()=>[{no:1,name:"edition_introduced",kind:"enum",T:T.getEnumType(te),opt:!0},{no:2,name:"edition_deprecated",kind:"enum",T:T.getEnumType(te),opt:!0},{no:3,name:"deprecation_warning",kind:"scalar",T:9,opt:!0},{no:4,name:"edition_removed",kind:"enum",T:T.getEnumType(te),opt:!0}]);class Pe extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Pe().fromBinary(e,n)}static fromJson(e,n){return new Pe().fromJson(e,n)}static fromJsonString(e,n){return new Pe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Pe,e,n)}}Pe.runtime=T,Pe.typeName="google.protobuf.OneofOptions",Pe.fields=T.util.newFieldList(()=>[{no:1,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class De extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new De().fromBinary(e,n)}static fromJson(e,n){return new De().fromJson(e,n)}static fromJsonString(e,n){return new De().fromJsonString(e,n)}static equals(e,n){return T.util.equals(De,e,n)}}De.runtime=T,De.typeName="google.protobuf.EnumOptions",De.fields=T.util.newFieldList(()=>[{no:2,name:"allow_alias",kind:"scalar",T:8,opt:!0},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:7,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Ae extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ae().fromBinary(e,n)}static fromJson(e,n){return new Ae().fromJson(e,n)}static fromJsonString(e,n){return new Ae().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ae,e,n)}}Ae.runtime=T,Ae.typeName="google.protobuf.EnumValueOptions",Ae.fields=T.util.newFieldList(()=>[{no:1,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"features",kind:"message",T:$,opt:!0},{no:3,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:4,name:"feature_support",kind:"message",T:le,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Ue extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ue().fromBinary(e,n)}static fromJson(e,n){return new Ue().fromJson(e,n)}static fromJsonString(e,n){return new Ue().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ue,e,n)}}Ue.runtime=T,Ue.typeName="google.protobuf.ServiceOptions",Ue.fields=T.util.newFieldList(()=>[{no:34,name:"features",kind:"message",T:$,opt:!0},{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class de extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new de().fromBinary(e,n)}static fromJson(e,n){return new de().fromJson(e,n)}static fromJsonString(e,n){return new de().fromJsonString(e,n)}static equals(e,n){return T.util.equals(de,e,n)}}de.runtime=T,de.typeName="google.protobuf.MethodOptions",de.fields=T.util.newFieldList(()=>[{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:34,name:"idempotency_level",kind:"enum",T:T.getEnumType(Cn),opt:!0,default:Cn.IDEMPOTENCY_UNKNOWN},{no:35,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);var Cn;(function(a){a[a.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",a[a.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",a[a.IDEMPOTENT=2]="IDEMPOTENT"})(Cn||(Cn={})),T.util.setEnumType(Cn,"google.protobuf.MethodOptions.IdempotencyLevel",[{no:0,name:"IDEMPOTENCY_UNKNOWN"},{no:1,name:"NO_SIDE_EFFECTS"},{no:2,name:"IDEMPOTENT"}]);class H extends w{constructor(e){super(),this.name=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new H().fromBinary(e,n)}static fromJson(e,n){return new H().fromJson(e,n)}static fromJsonString(e,n){return new H().fromJsonString(e,n)}static equals(e,n){return T.util.equals(H,e,n)}}H.runtime=T,H.typeName="google.protobuf.UninterpretedOption",H.fields=T.util.newFieldList(()=>[{no:2,name:"name",kind:"message",T:qe,repeated:!0},{no:3,name:"identifier_value",kind:"scalar",T:9,opt:!0},{no:4,name:"positive_int_value",kind:"scalar",T:4,opt:!0},{no:5,name:"negative_int_value",kind:"scalar",T:3,opt:!0},{no:6,name:"double_value",kind:"scalar",T:1,opt:!0},{no:7,name:"string_value",kind:"scalar",T:12,opt:!0},{no:8,name:"aggregate_value",kind:"scalar",T:9,opt:!0}]);class qe extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new qe().fromBinary(e,n)}static fromJson(e,n){return new qe().fromJson(e,n)}static fromJsonString(e,n){return new qe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(qe,e,n)}}qe.runtime=T,qe.typeName="google.protobuf.UninterpretedOption.NamePart",qe.fields=T.util.newFieldList(()=>[{no:1,name:"name_part",kind:"scalar",T:9,req:!0},{no:2,name:"is_extension",kind:"scalar",T:8,req:!0}]);class $ extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new $().fromBinary(e,n)}static fromJson(e,n){return new $().fromJson(e,n)}static fromJsonString(e,n){return new $().fromJsonString(e,n)}static equals(e,n){return T.util.equals($,e,n)}}$.runtime=T,$.typeName="google.protobuf.FeatureSet",$.fields=T.util.newFieldList(()=>[{no:1,name:"field_presence",kind:"enum",T:T.getEnumType(la),opt:!0},{no:2,name:"enum_type",kind:"enum",T:T.getEnumType(da),opt:!0},{no:3,name:"repeated_field_encoding",kind:"enum",T:T.getEnumType(pa),opt:!0},{no:4,name:"utf8_validation",kind:"enum",T:T.getEnumType(ua),opt:!0},{no:5,name:"message_encoding",kind:"enum",T:T.getEnumType(ga),opt:!0},{no:6,name:"json_format",kind:"enum",T:T.getEnumType(Ta),opt:!0}]);var la;(function(a){a[a.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",a[a.EXPLICIT=1]="EXPLICIT",a[a.IMPLICIT=2]="IMPLICIT",a[a.LEGACY_REQUIRED=3]="LEGACY_REQUIRED"})(la||(la={})),T.util.setEnumType(la,"google.protobuf.FeatureSet.FieldPresence",[{no:0,name:"FIELD_PRESENCE_UNKNOWN"},{no:1,name:"EXPLICIT"},{no:2,name:"IMPLICIT"},{no:3,name:"LEGACY_REQUIRED"}]);var da;(function(a){a[a.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",a[a.OPEN=1]="OPEN",a[a.CLOSED=2]="CLOSED"})(da||(da={})),T.util.setEnumType(da,"google.protobuf.FeatureSet.EnumType",[{no:0,name:"ENUM_TYPE_UNKNOWN"},{no:1,name:"OPEN"},{no:2,name:"CLOSED"}]);var pa;(function(a){a[a.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",a[a.PACKED=1]="PACKED",a[a.EXPANDED=2]="EXPANDED"})(pa||(pa={})),T.util.setEnumType(pa,"google.protobuf.FeatureSet.RepeatedFieldEncoding",[{no:0,name:"REPEATED_FIELD_ENCODING_UNKNOWN"},{no:1,name:"PACKED"},{no:2,name:"EXPANDED"}]);var ua;(function(a){a[a.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",a[a.VERIFY=2]="VERIFY",a[a.NONE=3]="NONE"})(ua||(ua={})),T.util.setEnumType(ua,"google.protobuf.FeatureSet.Utf8Validation",[{no:0,name:"UTF8_VALIDATION_UNKNOWN"},{no:2,name:"VERIFY"},{no:3,name:"NONE"}]);var ga;(function(a){a[a.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",a[a.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",a[a.DELIMITED=2]="DELIMITED"})(ga||(ga={})),T.util.setEnumType(ga,"google.protobuf.FeatureSet.MessageEncoding",[{no:0,name:"MESSAGE_ENCODING_UNKNOWN"},{no:1,name:"LENGTH_PREFIXED"},{no:2,name:"DELIMITED"}]);var Ta;(function(a){a[a.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",a[a.ALLOW=1]="ALLOW",a[a.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT"})(Ta||(Ta={})),T.util.setEnumType(Ta,"google.protobuf.FeatureSet.JsonFormat",[{no:0,name:"JSON_FORMAT_UNKNOWN"},{no:1,name:"ALLOW"},{no:2,name:"LEGACY_BEST_EFFORT"}]);class Ye extends w{constructor(e){super(),this.defaults=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ye().fromBinary(e,n)}static fromJson(e,n){return new Ye().fromJson(e,n)}static fromJsonString(e,n){return new Ye().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ye,e,n)}}Ye.runtime=T,Ye.typeName="google.protobuf.FeatureSetDefaults",Ye.fields=T.util.newFieldList(()=>[{no:1,name:"defaults",kind:"message",T:Le,repeated:!0},{no:4,name:"minimum_edition",kind:"enum",T:T.getEnumType(te),opt:!0},{no:5,name:"maximum_edition",kind:"enum",T:T.getEnumType(te),opt:!0}]);class Le extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Le().fromBinary(e,n)}static fromJson(e,n){return new Le().fromJson(e,n)}static fromJsonString(e,n){return new Le().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Le,e,n)}}Le.runtime=T,Le.typeName="google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault",Le.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(te),opt:!0},{no:4,name:"overridable_features",kind:"message",T:$,opt:!0},{no:5,name:"fixed_features",kind:"message",T:$,opt:!0}]);class Ge extends w{constructor(e){super(),this.location=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ge().fromBinary(e,n)}static fromJson(e,n){return new Ge().fromJson(e,n)}static fromJsonString(e,n){return new Ge().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ge,e,n)}}Ge.runtime=T,Ge.typeName="google.protobuf.SourceCodeInfo",Ge.fields=T.util.newFieldList(()=>[{no:1,name:"location",kind:"message",T:Be,repeated:!0}]);class Be extends w{constructor(e){super(),this.path=[],this.span=[],this.leadingDetachedComments=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Be().fromBinary(e,n)}static fromJson(e,n){return new Be().fromJson(e,n)}static fromJsonString(e,n){return new Be().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Be,e,n)}}Be.runtime=T,Be.typeName="google.protobuf.SourceCodeInfo.Location",Be.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"span",kind:"scalar",T:5,repeated:!0,packed:!0},{no:3,name:"leading_comments",kind:"scalar",T:9,opt:!0},{no:4,name:"trailing_comments",kind:"scalar",T:9,opt:!0},{no:6,name:"leading_detached_comments",kind:"scalar",T:9,repeated:!0}]);class We extends w{constructor(e){super(),this.annotation=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new We().fromBinary(e,n)}static fromJson(e,n){return new We().fromJson(e,n)}static fromJsonString(e,n){return new We().fromJsonString(e,n)}static equals(e,n){return T.util.equals(We,e,n)}}We.runtime=T,We.typeName="google.protobuf.GeneratedCodeInfo",We.fields=T.util.newFieldList(()=>[{no:1,name:"annotation",kind:"message",T:Fe,repeated:!0}]);class Fe extends w{constructor(e){super(),this.path=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Fe().fromBinary(e,n)}static fromJson(e,n){return new Fe().fromJson(e,n)}static fromJsonString(e,n){return new Fe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Fe,e,n)}}Fe.runtime=T,Fe.typeName="google.protobuf.GeneratedCodeInfo.Annotation",Fe.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"source_file",kind:"scalar",T:9,opt:!0},{no:3,name:"begin",kind:"scalar",T:5,opt:!0},{no:4,name:"end",kind:"scalar",T:5,opt:!0},{no:5,name:"semantic",kind:"enum",T:T.getEnumType(ka),opt:!0}]);var ka;(function(a){a[a.NONE=0]="NONE",a[a.SET=1]="SET",a[a.ALIAS=2]="ALIAS"})(ka||(ka={})),T.util.setEnumType(ka,"google.protobuf.GeneratedCodeInfo.Annotation.Semantic",[{no:0,name:"NONE"},{no:1,name:"SET"},{no:2,name:"ALIAS"}]);class _ extends w{constructor(e){super(),this.seconds=W.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${s.json.debug(e)}`);const t=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!t)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const o=Date.parse(t[1]+"-"+t[2]+"-"+t[3]+"T"+t[4]+":"+t[5]+":"+t[6]+(t[8]?t[8]:"Z"));if(Number.isNaN(o))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(o<Date.parse("0001-01-01T00:00:00Z")||o>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=W.parse(o/1e3),this.nanos=0,t[7]&&(this.nanos=parseInt("1"+t[7]+"0".repeat(9-t[7].length))-1e9),this}toJson(e){const n=Number(this.seconds)*1e3;if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let t="Z";if(this.nanos>0){const o=(this.nanos+1e9).toString().substring(1);o.substring(3)==="000000"?t="."+o.substring(0,3)+"Z":o.substring(6)==="000"?t="."+o.substring(0,6)+"Z":t="."+o+"Z"}return new Date(n).toISOString().replace(".000Z",t)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return _.fromDate(new Date)}static fromDate(e){const n=e.getTime();return new _({seconds:W.parse(Math.floor(n/1e3)),nanos:n%1e3*1e6})}static fromBinary(e,n){return new _().fromBinary(e,n)}static fromJson(e,n){return new _().fromJson(e,n)}static fromJsonString(e,n){return new _().fromJsonString(e,n)}static equals(e,n){return s.util.equals(_,e,n)}}_.runtime=s,_.typeName="google.protobuf.Timestamp",_.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class J extends w{constructor(e){super(),this.seconds=W.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const t=e.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);if(t===null)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const o=Number(t[1]);if(o>315576e6||o<-315576e6)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);if(this.seconds=W.parse(o),typeof t[2]=="string"){const i=t[2]+"0".repeat(9-t[2].length);this.nanos=parseInt(i),(o<0||Object.is(o,-0))&&(this.nanos=-this.nanos)}return this}toJson(e){if(Number(this.seconds)>315576e6||Number(this.seconds)<-315576e6)throw new Error("cannot encode google.protobuf.Duration to JSON: value out of range");let n=this.seconds.toString();if(this.nanos!==0){let t=Math.abs(this.nanos).toString();t="0".repeat(9-t.length)+t,t.substring(3)==="000000"?t=t.substring(0,3):t.substring(6)==="000"&&(t=t.substring(0,6)),n+="."+t,this.nanos<0&&Number(this.seconds)==0&&(n="-"+n)}return n+"s"}static fromBinary(e,n){return new J().fromBinary(e,n)}static fromJson(e,n){return new J().fromJson(e,n)}static fromJsonString(e,n){return new J().fromJsonString(e,n)}static equals(e,n){return s.util.equals(J,e,n)}}J.runtime=s,J.typeName="google.protobuf.Duration",J.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class Z extends w{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),s.util.initPartial(e,this)}toJson(e){var n;if(this.typeUrl==="")return{};const t=this.typeUrlToName(this.typeUrl),o=(n=e?.typeRegistry)===null||n===void 0?void 0:n.findMessage(t);if(!o)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let r=o.fromBinary(this.value).toJson(e);return(t.startsWith("google.protobuf.")||r===null||Array.isArray(r)||typeof r!="object")&&(r={value:r}),r["@type"]=this.typeUrl,r}fromJson(e,n){var t;if(e===null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e===null?"null":Array.isArray(e)?"array":typeof e}`);if(Object.keys(e).length==0)return this;const o=e["@type"];if(typeof o!="string"||o=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const i=this.typeUrlToName(o),r=(t=n?.typeRegistry)===null||t===void 0?void 0:t.findMessage(i);if(!r)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${o} is not in the type registry`);let c;if(i.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))c=r.fromJson(e.value,n);else{const l=Object.assign({},e);delete l["@type"],c=r.fromJson(l,n)}return this.packFrom(c),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return this.is(e.getType())?(e.fromBinary(this.value),!0):!1}unpack(e){if(this.typeUrl==="")return;const n=e.findMessage(this.typeUrlToName(this.typeUrl));if(n)return n.fromBinary(this.value)}is(e){if(this.typeUrl==="")return!1;const n=this.typeUrlToName(this.typeUrl);let t="";return typeof e=="string"?t=e:t=e.typeName,n===t}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw new Error(`invalid type url: ${e}`);const n=e.lastIndexOf("/"),t=n>=0?e.substring(n+1):e;if(!t.length)throw new Error(`invalid type url: ${e}`);return t}static pack(e){const n=new Z;return n.packFrom(e),n}static fromBinary(e,n){return new Z().fromBinary(e,n)}static fromJson(e,n){return new Z().fromJson(e,n)}static fromJsonString(e,n){return new Z().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Z,e,n)}}Z.runtime=s,Z.typeName="google.protobuf.Any",Z.fields=s.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);class pe extends w{constructor(e){super(),this.paths=[],s.util.initPartial(e,this)}toJson(e){function n(t){let o=!1;const i=[];for(let r=0;r<t.length;r++){let c=t.charAt(r);switch(c){case"_":o=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i.push(c),o=!1;break;default:o&&(o=!1,c=c.toUpperCase()),i.push(c);break}}return i.join("")}return this.paths.map(t=>{if(t.match(/_[0-9]?_/g)||t.match(/[A-Z]/g))throw new Error('cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name "'+t+'" is irreversible');return n(t)}).join(",")}fromJson(e,n){if(typeof e!="string")throw new Error("cannot decode google.protobuf.FieldMask from JSON: "+s.json.debug(e));if(e==="")return this;function t(o){if(o.includes("_"))throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");const i=o.replace(/[A-Z]/g,r=>"_"+r.toLowerCase());return i[0]==="_"?i.substring(1):i}return this.paths=e.split(",").map(t),this}static fromBinary(e,n){return new pe().fromBinary(e,n)}static fromJson(e,n){return new pe().fromJson(e,n)}static fromJsonString(e,n){return new pe().fromJsonString(e,n)}static equals(e,n){return s.util.equals(pe,e,n)}}pe.runtime=s,pe.typeName="google.protobuf.FieldMask",pe.fields=s.util.newFieldList(()=>[{no:1,name:"paths",kind:"scalar",T:9,repeated:!0}]);var Nn;(function(a){a[a.NULL_VALUE=0]="NULL_VALUE"})(Nn||(Nn={})),s.util.setEnumType(Nn,"google.protobuf.NullValue",[{no:0,name:"NULL_VALUE"}]);class p extends w{constructor(e){super(),this.fields={},s.util.initPartial(e,this)}toJson(e){const n={};for(const[t,o]of Object.entries(this.fields))n[t]=o.toJson(e);return n}fromJson(e,n){if(typeof e!="object"||e==null||Array.isArray(e))throw new Error("cannot decode google.protobuf.Struct from JSON "+s.json.debug(e));for(const[t,o]of Object.entries(e))this.fields[t]=ee.fromJson(o);return this}static fromBinary(e,n){return new p().fromBinary(e,n)}static fromJson(e,n){return new p().fromJson(e,n)}static fromJsonString(e,n){return new p().fromJsonString(e,n)}static equals(e,n){return s.util.equals(p,e,n)}}p.runtime=s,p.typeName="google.protobuf.Struct",p.fields=s.util.newFieldList(()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"message",T:ee}}]);class ee extends w{constructor(e){super(),this.kind={case:void 0},s.util.initPartial(e,this)}toJson(e){switch(this.kind.case){case"nullValue":return null;case"numberValue":if(!Number.isFinite(this.kind.value))throw new Error("google.protobuf.Value cannot be NaN or Infinity");return this.kind.value;case"boolValue":return this.kind.value;case"stringValue":return this.kind.value;case"structValue":case"listValue":return this.kind.value.toJson(Object.assign(Object.assign({},e),{emitDefaultValues:!0}))}throw new Error("google.protobuf.Value must have a value")}fromJson(e,n){switch(typeof e){case"number":this.kind={case:"numberValue",value:e};break;case"string":this.kind={case:"stringValue",value:e};break;case"boolean":this.kind={case:"boolValue",value:e};break;case"object":e===null?this.kind={case:"nullValue",value:Nn.NULL_VALUE}:Array.isArray(e)?this.kind={case:"listValue",value:ue.fromJson(e)}:this.kind={case:"structValue",value:p.fromJson(e)};break;default:throw new Error("cannot decode google.protobuf.Value from JSON "+s.json.debug(e))}return this}static fromBinary(e,n){return new ee().fromBinary(e,n)}static fromJson(e,n){return new ee().fromJson(e,n)}static fromJsonString(e,n){return new ee().fromJsonString(e,n)}static equals(e,n){return s.util.equals(ee,e,n)}}ee.runtime=s,ee.typeName="google.protobuf.Value",ee.fields=s.util.newFieldList(()=>[{no:1,name:"null_value",kind:"enum",T:s.getEnumType(Nn),oneof:"kind"},{no:2,name:"number_value",kind:"scalar",T:1,oneof:"kind"},{no:3,name:"string_value",kind:"scalar",T:9,oneof:"kind"},{no:4,name:"bool_value",kind:"scalar",T:8,oneof:"kind"},{no:5,name:"struct_value",kind:"message",T:p,oneof:"kind"},{no:6,name:"list_value",kind:"message",T:ue,oneof:"kind"}]);class ue extends w{constructor(e){super(),this.values=[],s.util.initPartial(e,this)}toJson(e){return this.values.map(n=>n.toJson())}fromJson(e,n){if(!Array.isArray(e))throw new Error("cannot decode google.protobuf.ListValue from JSON "+s.json.debug(e));for(let t of e)this.values.push(ee.fromJson(t));return this}static fromBinary(e,n){return new ue().fromBinary(e,n)}static fromJson(e,n){return new ue().fromJson(e,n)}static fromJsonString(e,n){return new ue().fromJsonString(e,n)}static equals(e,n){return s.util.equals(ue,e,n)}}ue.runtime=s,ue.typeName="google.protobuf.ListValue",ue.fields=s.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:ee,repeated:!0}]),g.Code=void 0,function(a){a[a.Canceled=1]="Canceled",a[a.Unknown=2]="Unknown",a[a.InvalidArgument=3]="InvalidArgument",a[a.DeadlineExceeded=4]="DeadlineExceeded",a[a.NotFound=5]="NotFound",a[a.AlreadyExists=6]="AlreadyExists",a[a.PermissionDenied=7]="PermissionDenied",a[a.ResourceExhausted=8]="ResourceExhausted",a[a.FailedPrecondition=9]="FailedPrecondition",a[a.Aborted=10]="Aborted",a[a.OutOfRange=11]="OutOfRange",a[a.Unimplemented=12]="Unimplemented",a[a.Internal=13]="Internal",a[a.Unavailable=14]="Unavailable",a[a.DataLoss=15]="DataLoss",a[a.Unauthenticated=16]="Unauthenticated"}(g.Code||(g.Code={}));function ur(a){const e=g.Code[a];return typeof e!="string"?a.toString():e[0].toLowerCase()+e.substring(1).replace(/[A-Z]/g,n=>"_"+n.toLowerCase())}class C extends Error{constructor(e,n=g.Code.Unknown,t,o,i){super(HR(e,n)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=n,this.metadata=new Headers(t??{}),this.details=o??[],this.cause=i}static from(e,n=g.Code.Unknown){return e instanceof C?e:e instanceof Error?e.name=="AbortError"?new C(e.message,g.Code.Canceled):new C(e.message,n,void 0,void 0,e):new C(String(e),n,void 0,void 0,e)}static[Symbol.hasInstance](e){return e instanceof Error?Object.getPrototypeOf(e)===C.prototype?!0:e.name==="ConnectError"&&"code"in e&&typeof e.code=="number"&&"metadata"in e&&"details"in e&&Array.isArray(e.details)&&"rawMessage"in e&&typeof e.rawMessage=="string"&&"cause"in e:!1}findDetails(e){const n="typeName"in e?{findMessage:o=>o===e.typeName?e:void 0}:e,t=[];for(const o of this.details){if("getType"in o){n.findMessage(o.getType().typeName)&&t.push(o);continue}const i=n.findMessage(o.type);if(i)try{t.push(i.fromBinary(o.value))}catch{}}return t}}function HR(a,e){return a.length?`[${ur(e)}] ${a}`:`[${ur(e)}]`}function jR(a,e,n){try{const t=ct.dec(a);return e?e.fromBinary(t,n):t}catch(t){throw C.from(t,g.Code.DataLoss)}}function KR(a,e){const n={};for(const[t,o]of Object.entries(a.methods)){const i=e(Object.assign(Object.assign({},o),{localName:t,service:a}));i!=null&&(n[t]=i)}return n}const gr=1;function Tr(a){let e,n=new Uint8Array(0);function t(o){const i=new Uint8Array(n.length+o.length);i.set(n),i.set(o,n.length),n=i}return new ReadableStream({start(){e=a.getReader()},async pull(o){let i;for(;;){if(i===void 0&&n.byteLength>=5){let l=0;for(let d=1;d<5;d++)l=(l<<8)+n[d];i={flags:n[0],length:l}}if(i!==void 0&&n.byteLength>=i.length+5)break;const c=await e.read();if(c.done)break;t(c.value)}if(i===void 0){if(n.byteLength==0){o.close();return}o.error(new C("premature end of stream",g.Code.DataLoss));return}const r=n.subarray(5,5+i.length);n=n.subarray(5+i.length),o.enqueue({flags:i.flags,data:r})}})}function kr(a,e){const n=new Uint8Array(e.length+5);n.set(e,5);const t=new DataView(n.buffer,n.byteOffset,n.byteLength);return t.setUint8(0,a),t.setUint32(1,e.length),n}var XR=function(a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=a[Symbol.asyncIterator],n;return e?e.call(a):(a=typeof __values=="function"?__values(a):a[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n);function t(i){n[i]=a[i]&&function(r){return new Promise(function(c,l){r=a[i](r),o(c,l,r.done,r.value)})}}function o(i,r,c,l){Promise.resolve(l).then(function(d){i({value:d,done:c})},r)}},Pn=function(a){return this instanceof Pn?(this.v=a,this):new Pn(a)},QR=function(a,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(a,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(O){return Promise.resolve(O).then(R,h)}}function c(R,O){t[R]&&(o[R]=function(b){return new Promise(function(N,V){i.push([R,b,N,V])>1||l(R,b)})},O&&(o[R]=O(o[R])))}function l(R,O){try{d(t[R](O))}catch(b){I(i[0][3],b)}}function d(R){R.value instanceof Pn?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){l("next",R)}function h(R){l("throw",R)}function I(R,O){R(O),i.shift(),i.length&&l(i[0][0],i[0][1])}},ZR=function(a){var e,n;return e={},t("next"),t("throw",function(o){throw o}),t("return"),e[Symbol.iterator]=function(){return this},e;function t(o,i){e[o]=a[o]?function(r){return(n=!n)?{value:Pn(a[o](r)),done:!1}:i?i(r):r}:i}};function e1(){const a=[],e=[];let n,t,o,i=new Promise((l,d)=>{t=l,o=d}),r=!1;function c(){for(const l of a.splice(0,a.length))l({done:!0,value:void 0})}return{close(){r=!0,c()},async write(l){if(r)throw n??new Error("cannot write, WritableIterable already closed");const d=a.shift();if(d===void 0)e.push(l);else if(d({done:!1,value:l}),a.length>0)return;const u=e.length+1;for(let h=0;h<u;h++)await i},[Symbol.asyncIterator](){return{next(){t(),i=new Promise((h,I)=>{t=h,o=I});const l=e.shift();if(l!==void 0)return Promise.resolve({done:!1,value:l});if(r)return Promise.resolve({done:!0,value:void 0});let d;const u=new Promise(h=>d=h);return a.push(d),u},throw(l){return n=l,r=!0,e.splice(0,e.length),i.catch(()=>{}),o(n),c(),Promise.resolve({done:!0,value:void 0})},return(){return r=!0,e.splice(0,e.length),t(),i=Promise.reject(new Error("cannot write, consumer called return")),i.catch(()=>{}),c(),Promise.resolve({done:!0,value:void 0})}}}}}function pt(a){return QR(this,arguments,function*(){yield Pn(yield*ZR(XR(a)))})}var yr=function(a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=a[Symbol.asyncIterator],n;return e?e.call(a):(a=typeof __values=="function"?__values(a):a[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n);function t(i){n[i]=a[i]&&function(r){return new Promise(function(c,l){r=a[i](r),o(c,l,r.done,r.value)})}}function o(i,r,c,l){Promise.resolve(l).then(function(d){i({value:d,done:c})},r)}},un=function(a){return this instanceof un?(this.v=a,this):new un(a)},n1=function(a){var e,n;return e={},t("next"),t("throw",function(o){throw o}),t("return"),e[Symbol.iterator]=function(){return this},e;function t(o,i){e[o]=a[o]?function(r){return(n=!n)?{value:un(a[o](r)),done:!1}:i?i(r):r}:i}},a1=function(a,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(a,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(O){return Promise.resolve(O).then(R,h)}}function c(R,O){t[R]&&(o[R]=function(b){return new Promise(function(N,V){i.push([R,b,N,V])>1||l(R,b)})},O&&(o[R]=O(o[R])))}function l(R,O){try{d(t[R](O))}catch(b){I(i[0][3],b)}}function d(R){R.value instanceof un?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){l("next",R)}function h(R){l("throw",R)}function I(R,O){R(O),i.shift(),i.length&&l(i[0][0],i[0][1])}};function X(a,e){return KR(a,n=>{switch(n.kind){case m.Unary:return t1(e,a,n);case m.ServerStreaming:return s1(e,a,n);case m.ClientStreaming:return o1(e,a,n);case m.BiDiStreaming:return i1(e,a,n);default:return null}})}function t1(a,e,n){return async function(t,o){var i,r;const c=await a.unary(e,n,o?.signal,o?.timeoutMs,o?.headers,t,o?.contextValues);return(i=o?.onHeader)===null||i===void 0||i.call(o,c.header),(r=o?.onTrailer)===null||r===void 0||r.call(o,c.trailer),c.message}}function s1(a,e,n){return function(t,o){return vr(a.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,pt([t]),o?.contextValues),o)}}function o1(a,e,n){return async function(t,o){var i,r,c,l,d,u;const h=await a.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,t,o?.contextValues);(d=o?.onHeader)===null||d===void 0||d.call(o,h.header);let I,R=0;try{for(var O=!0,b=yr(h.message),N;N=await b.next(),i=N.done,!i;O=!0)l=N.value,O=!1,I=l,R++}catch(V){r={error:V}}finally{try{!O&&!i&&(c=b.return)&&await c.call(b)}finally{if(r)throw r.error}}if(!I)throw new C("protocol error: missing response message",g.Code.Unimplemented);if(R>1)throw new C("protocol error: received extra messages for client streaming method",g.Code.Unimplemented);return(u=o?.onTrailer)===null||u===void 0||u.call(o,h.trailer),I}}function i1(a,e,n){return function(t,o){return vr(a.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,t,o?.contextValues),o)}}function vr(a,e){const n=function(){return a1(this,arguments,function*(){var t,o;const i=yield un(a);(t=e?.onHeader)===null||t===void 0||t.call(e,i.header),yield un(yield*n1(yr(i.message))),(o=e?.onTrailer)===null||o===void 0||o.call(e,i.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>n.next()})}}function r1(...a){const e=new AbortController,n=a.filter(o=>o!==void 0).concat(e.signal);for(const o of n){if(o.aborted){t.apply(o);break}o.addEventListener("abort",t)}function t(){e.signal.aborted||e.abort(hr(this));for(const o of n)o.removeEventListener("abort",t)}return e}function m1(a){const e=new AbortController,n=()=>{e.abort(new C("the operation timed out",g.Code.DeadlineExceeded))};let t;return a!==void 0&&(a<=0?n():t=setTimeout(n,a)),{signal:e.signal,cleanup:()=>clearTimeout(t)}}function hr(a){if(!a.aborted)return;if(a.reason!==void 0)return a.reason;const e=new Error("This operation was aborted");return e.name="AbortError",e}function ya(){return{get(a){return a.id in this?this[a.id]:a.defaultValue},set(a,e){return this[a.id]=e,this},delete(a){return delete this[a.id],this}}}const ut=128;function fr(a){const e=new Headers,n=new TextDecoder().decode(a).split(`\r
|
|
3
|
-
`);for(const t of n){if(t==="")continue;const o=t.indexOf(":");if(o>0){const i=t.substring(0,o).trim(),r=t.substring(o+1).trim();e.append(i,r)}}return e}const c1="Content-Type",l1="Grpc-Timeout",gn="Grpc-Status",Rr="Grpc-Message",d1="Grpc-Status-Details-Bin",p1="X-User-Agent",u1="X-Grpc-Web",g1="application/grpc-web+proto",T1="application/grpc-web+json";let va=class Kn extends w{constructor(e){super(),this.code=0,this.message="",this.details=[],s.util.initPartial(e,this)}static fromBinary(e,n){return new Kn().fromBinary(e,n)}static fromJson(e,n){return new Kn().fromJson(e,n)}static fromJsonString(e,n){return new Kn().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Kn,e,n)}};va.runtime=s,va.typeName="google.rpc.Status",va.fields=s.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Z,repeated:!0}]);const k1="0";function _r(a){var e;const n=a.get(d1);if(n!=null){const o=jR(n,va);if(o.code==0)return;const i=new C(o.message,o.code,a);return i.details=o.details.map(r=>({type:r.typeUrl.substring(r.typeUrl.lastIndexOf("/")+1),value:r.value})),i}const t=a.get(gn);if(t!=null){if(t===k1)return;const o=parseInt(t,10);return o in g.Code?new C(decodeURIComponent((e=a.get(Rr))!==null&&e!==void 0?e:""),o,a):new C(`invalid grpc-status: ${t}`,g.Code.Internal,a)}}function Sr(a,e,n){const t=typeof e=="string"?e:e.typeName,o=typeof n=="string"?n:n.name;return a.toString().replace(/\/?$/,`/${t}/${o}`)}function Ir(a,e){return e instanceof a?e:new a(e)}function y1(a,e){function n(t){return t.done===!0?t:{done:t.done,value:Ir(a,t.value)}}return{[Symbol.asyncIterator](){const t=e[Symbol.asyncIterator](),o={next:()=>t.next().then(n)};return t.throw!==void 0&&(o.throw=i=>t.throw(i).then(n)),t.return!==void 0&&(o.return=i=>t.return(i).then(n)),o}}}function Or(a,e){var n;return(n=e?.concat().reverse().reduce((t,o)=>o(t),a))!==null&&n!==void 0?n:a}function v1(a){var e;const n=Object.assign({},a);return(e=n.ignoreUnknownFields)!==null&&e!==void 0||(n.ignoreUnknownFields=!0),n}function gt(a,e,n,t){const o=e?br(a.I,t):Mr(a.I,n);return{parse:(e?br(a.O,t):Mr(a.O,n)).parse,serialize:o.serialize}}function br(a,e){return{parse(n){try{return a.fromBinary(n,e)}catch(t){const o=t instanceof Error?t.message:String(t);throw new C(`parse binary: ${o}`,g.Code.Internal)}},serialize(n){try{return n.toBinary(e)}catch(t){const o=t instanceof Error?t.message:String(t);throw new C(`serialize binary: ${o}`,g.Code.Internal)}}}}function Mr(a,e){var n,t;const o=(n=e?.textEncoder)!==null&&n!==void 0?n:new TextEncoder,i=(t=e?.textDecoder)!==null&&t!==void 0?t:new TextDecoder,r=v1(e);return{parse(c){try{const l=i.decode(c);return a.fromJsonString(l,r)}catch(l){throw C.from(l,g.Code.InvalidArgument)}},serialize(c){try{const l=c.toJsonString(r);return o.encode(l)}catch(l){throw C.from(l,g.Code.Internal)}}}}function Er(a){const e=Or(a.next,a.interceptors),[n,t,o]=Cr(a),i=Object.assign(Object.assign({},a.req),{message:Ir(a.req.method.I,a.req.message),signal:n});return e(i).then(r=>(o(),r),t)}function wr(a){const e=Or(a.next,a.interceptors),[n,t,o]=Cr(a),i=Object.assign(Object.assign({},a.req),{message:y1(a.req.method.I,a.req.message),signal:n});let r=!1;return n.addEventListener("abort",function(){var c,l;const d=a.req.message[Symbol.asyncIterator]();r||(c=d.throw)===null||c===void 0||c.call(d,this.reason).catch(()=>{}),(l=d.return)===null||l===void 0||l.call(d).catch(()=>{})}),e(i).then(c=>Object.assign(Object.assign({},c),{message:{[Symbol.asyncIterator](){const l=c.message[Symbol.asyncIterator]();return{next(){return l.next().then(d=>(d.done==!0&&(r=!0,o()),d),t)}}}}}),t)}function Cr(a){const{signal:e,cleanup:n}=m1(a.timeoutMs),t=r1(a.signal,e);return[t.signal,function(i){const r=C.from(e.aborted?hr(e):i);return t.abort(r),n(),Promise.reject(r)},function(){n(),t.abort()}]}var Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nr={},Tt={},ha=Q&&Q.__assign||function(){return ha=Object.assign||function(a){for(var e,n=1,t=arguments.length;n<t;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(a[o]=e[o])}return a},ha.apply(this,arguments)};Object.defineProperty(Tt,"__esModule",{value:!0});var h1={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function f1(a){var e=ha(ha({},h1),a);return e.numOfAttempts<1&&(e.numOfAttempts=1),e}Tt.getSanitizedOptions=f1;var kt={},yt={},fa={},vt={},ht={};Object.defineProperty(ht,"__esModule",{value:!0});function R1(a){var e=Math.random()*a;return Math.round(e)}ht.fullJitter=R1;var ft={};Object.defineProperty(ft,"__esModule",{value:!0});function _1(a){return a}ft.noJitter=_1,Object.defineProperty(vt,"__esModule",{value:!0});var S1=ht,I1=ft;function O1(a){switch(a.jitter){case"full":return S1.fullJitter;case"none":default:return I1.noJitter}}vt.JitterFactory=O1,Object.defineProperty(fa,"__esModule",{value:!0});var b1=vt,M1=function(){function a(e){this.options=e,this.attempt=0}return a.prototype.apply=function(){var e=this;return new Promise(function(n){return setTimeout(n,e.jitteredDelay)})},a.prototype.setAttemptNumber=function(e){this.attempt=e},Object.defineProperty(a.prototype,"jitteredDelay",{get:function(){var e=b1.JitterFactory(this.options);return e(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"delay",{get:function(){var e=this.options.startingDelay,n=this.options.timeMultiple,t=this.numOfDelayedAttempts,o=e*Math.pow(n,t);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),a}();fa.Delay=M1;var E1=Q&&Q.__extends||function(){var a=function(e,n){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var i in o)o.hasOwnProperty(i)&&(t[i]=o[i])},a(e,n)};return function(e,n){a(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}(),w1=Q&&Q.__awaiter||function(a,e,n,t){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(u){try{d(t.next(u))}catch(h){r(h)}}function l(u){try{d(t.throw(u))}catch(h){r(h)}}function d(u){u.done?i(u.value):o(u.value).then(c,l)}d((t=t.apply(a,e||[])).next())})},C1=Q&&Q.__generator||function(a,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(d){return function(u){return l([d,u])}}function l(d){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){n.label=d[1];break}if(d[0]===6&&n.label<i[1]){n.label=i[1],i=d;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(d);break}i[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(a,n)}catch(u){d=[6,u],o=0}finally{t=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(yt,"__esModule",{value:!0});var N1=fa,P1=function(a){E1(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.apply=function(){return w1(this,void 0,void 0,function(){return C1(this,function(n){return[2,this.isFirstAttempt?!0:a.prototype.apply.call(this)]})})},Object.defineProperty(e.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),e}(N1.Delay);yt.SkipFirstDelay=P1;var Rt={},D1=Q&&Q.__extends||function(){var a=function(e,n){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var i in o)o.hasOwnProperty(i)&&(t[i]=o[i])},a(e,n)};return function(e,n){a(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}();Object.defineProperty(Rt,"__esModule",{value:!0});var A1=fa,U1=function(a){D1(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e}(A1.Delay);Rt.AlwaysDelay=U1,Object.defineProperty(kt,"__esModule",{value:!0});var q1=yt,L1=Rt;function G1(a,e){var n=B1(a);return n.setAttemptNumber(e),n}kt.DelayFactory=G1;function B1(a){return a.delayFirstAttempt?new L1.AlwaysDelay(a):new q1.SkipFirstDelay(a)}var _t=Q&&Q.__awaiter||function(a,e,n,t){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(u){try{d(t.next(u))}catch(h){r(h)}}function l(u){try{d(t.throw(u))}catch(h){r(h)}}function d(u){u.done?i(u.value):o(u.value).then(c,l)}d((t=t.apply(a,e||[])).next())})},St=Q&&Q.__generator||function(a,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(d){return function(u){return l([d,u])}}function l(d){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){n.label=d[1];break}if(d[0]===6&&n.label<i[1]){n.label=i[1],i=d;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(d);break}i[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(a,n)}catch(u){d=[6,u],o=0}finally{t=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(Nr,"__esModule",{value:!0});var F1=Tt,x1=kt;function J1(a,e){return e===void 0&&(e={}),_t(this,void 0,void 0,function(){var n,t;return St(this,function(o){switch(o.label){case 0:return n=F1.getSanitizedOptions(e),t=new z1(a,n),[4,t.execute()];case 1:return[2,o.sent()]}})})}var It=Nr.backOff=J1,z1=function(){function a(e,n){this.request=e,this.options=n,this.attemptNumber=0}return a.prototype.execute=function(){return _t(this,void 0,void 0,function(){var e,n;return St(this,function(t){switch(t.label){case 0:if(this.attemptLimitReached)return[3,7];t.label=1;case 1:return t.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return t.sent(),[4,this.request()];case 3:return[2,t.sent()];case 4:return e=t.sent(),this.attemptNumber++,[4,this.options.retry(e,this.attemptNumber)];case 5:if(n=t.sent(),!n||this.attemptLimitReached)throw e;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(a.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),a.prototype.applyDelay=function(){return _t(this,void 0,void 0,function(){var e;return St(this,function(n){switch(n.label){case 0:return e=x1.DelayFactory(this.options,this.attemptNumber),[4,e.apply()];case 1:return n.sent(),[2]}})})},a}(),Pr={exports:{}};(function(a,e){(function(n,t){a.exports=t()})(Q,function(){return function(n){var t={};function o(i){if(t[i])return t[i].exports;var r=t[i]={i,l:!1,exports:{}};return n[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=n,o.c=t,o.d=function(i,r,c){o.o(i,r)||Object.defineProperty(i,r,{enumerable:!0,get:c})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,r){if(1&r&&(i=o(i)),8&r||4&r&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&r&&typeof i!="string")for(var l in i)o.d(c,l,function(d){return i[d]}.bind(null,l));return c},o.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(r,"a",r),r},o.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)},o.p="",o(o.s=0)}([function(n,t,o){o.r(t),o.d(t,"UuidTool",function(){return c}),o.d(t,"Uuid",function(){return r});var i={uuid:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i},r=function(){function l(d){this.id="",typeof d=="string"?this.fromString(d):Array.isArray(d)?this.fromBytes(d):this.generate()}return l.fromJson=function(d){if(typeof d=="string"&&(d=JSON.parse(d)),!d||!d.id)throw new TypeError("The input cannot be converted to Uuid.");return new l(d.id)},l.prototype.generate=function(){var d=new Array(16).fill(0).map(function(){return 256*Math.random()&255});return d[6]=79&(64|d[6]),this.fromBytes(d),this},l.prototype.fromBytes=function(d){return this.id=d.map(function(u){return("00"+u.toString(16)).slice(-2)}).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5"),this.id=this.toString(),this},l.prototype.toBytes=function(){return(this.id.replace(/-/g,"").match(/.{2}/g)||[]).map(function(d){return parseInt(d,16)})},l.prototype.fromString=function(d){return this.id=d.trim(),this.id=this.toString(),this},l.prototype.toString=function(){switch(l.stringExportFormat){default:case"lowercase":return this.id.toLowerCase();case"uppercase":return this.id.toUpperCase()}},l.prototype.isValid=function(){return typeof this.id=="string"&&this.id.length===36&&i.uuid.test(this.id)},l.prototype.equals=function(d){return typeof d=="string"&&(d=new l(d)),this.toString()===d.toString()},l.stringExportFormat="lowercase",l}(),c=function(){function l(){}return l.toBytes=function(d){return new r().fromString(d).toBytes()},l.toString=function(d){return new r().fromBytes(d).toString()},l.newUuid=function(){return new r().toString()},l.isUuid=function(d){return new r().fromString(d).isValid()},l.compare=function(d,u){return new r(d).equals(new r(u))},l}()}])})})(Pr);var Dn=Pr.exports;const Dr=s.makeMessageType("proto.rpc.v1.Credentials",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:9}]),Ot=s.makeMessageType("proto.rpc.v1.AuthenticateRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9},{no:2,name:"credentials",kind:"message",T:Dr}]),V1=s.makeMessageType("proto.rpc.v1.AuthenticateResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),$1=s.makeMessageType("proto.rpc.v1.AuthenticateToRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9}]),Y1=s.makeMessageType("proto.rpc.v1.AuthenticateToResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),W1={typeName:"proto.rpc.v1.AuthService",methods:{authenticate:{name:"Authenticate",I:Ot,O:V1,kind:m.Unary}}},H1={typeName:"proto.rpc.v1.ExternalAuthService",methods:{authenticateTo:{name:"AuthenticateTo",I:$1,O:Y1,kind:m.Unary}}},Tn=s.makeMessageType("google.rpc.Status",()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Z,repeated:!0}]),An=s.makeMessageType("proto.rpc.webrtc.v1.ICECandidate",()=>[{no:1,name:"candidate",kind:"scalar",T:9},{no:2,name:"sdp_mid",kind:"scalar",T:9,opt:!0},{no:3,name:"sdpm_line_index",kind:"scalar",T:13,opt:!0},{no:4,name:"username_fragment",kind:"scalar",T:9,opt:!0}]),Ar=s.makeMessageType("proto.rpc.webrtc.v1.CallRequest",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),j1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),K1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:An}]),X1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:j1,oneof:"stage"},{no:3,name:"update",kind:"message",T:K1,oneof:"stage"}]),Ra=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"candidate",kind:"message",T:An,oneof:"update"},{no:3,name:"done",kind:"scalar",T:8,oneof:"update"},{no:4,name:"error",kind:"message",T:Tn,oneof:"update"}]),Q1=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateResponse",[]),Z1=s.makeMessageType("proto.rpc.webrtc.v1.ICEServer",()=>[{no:1,name:"urls",kind:"scalar",T:9,repeated:!0},{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"credential",kind:"scalar",T:9}]),_a=s.makeMessageType("proto.rpc.webrtc.v1.WebRTCConfig",()=>[{no:1,name:"additional_ice_servers",kind:"message",T:Z1,repeated:!0},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),e_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"optional_config",kind:"message",T:_a},{no:3,name:"deadline",kind:"message",T:_,opt:!0}]),n_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:An}]),a_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestDoneStage",[]),t_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestErrorStage",()=>[{no:1,name:"status",kind:"message",T:Tn}]),s_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestHeartbeatStage",[]),o_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:e_,oneof:"stage"},{no:3,name:"update",kind:"message",T:n_,oneof:"stage"},{no:4,name:"done",kind:"message",T:a_,oneof:"stage"},{no:5,name:"error",kind:"message",T:t_,oneof:"stage"},{no:6,name:"heartbeat",kind:"message",T:s_,oneof:"stage"}]),i_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),r_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:An}]),m_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseDoneStage",[]),c_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseErrorStage",()=>[{no:1,name:"status",kind:"message",T:Tn}]),l_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:i_,oneof:"stage"},{no:3,name:"update",kind:"message",T:r_,oneof:"stage"},{no:4,name:"done",kind:"message",T:m_,oneof:"stage"},{no:5,name:"error",kind:"message",T:c_,oneof:"stage"}]),d_=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigRequest",[]),p_=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse",()=>[{no:1,name:"config",kind:"message",T:_a}]),u_={typeName:"proto.rpc.webrtc.v1.SignalingService",methods:{call:{name:"Call",I:Ar,O:X1,kind:m.ServerStreaming},callUpdate:{name:"CallUpdate",I:Ra,O:Q1,kind:m.Unary},answer:{name:"Answer",I:l_,O:o_,kind:m.BiDiStreaming},optionalWebRTCConfig:{name:"OptionalWebRTCConfig",I:d_,O:p_,kind:m.Unary}}},Ur="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bt=(a="")=>{const e=a;let n="";for(let t=0,o,i=0,r=Ur;e.charAt(Math.trunc(i))||(r="=",i%1);n+=r.charAt(63&t>>8-i%1*8)){if(o=e.charCodeAt(i+=3/4),o>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return n},qr=(a="")=>{const e=a.replace(/=+$/,"");let n="";if(e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let t=0,o=0,i,r=0;i=e.charAt(r++);~i&&(o=t%4?o*64+i:i,t++%4)?n+=String.fromCharCode(255&o>>(-2*t&6)):0)i=Ur.indexOf(i);return n},Mt=(a,e)=>{const n={sdp:a?.sdp,type:a?.type};if(e)for(const[t,o]of Object.entries(e))n.sdp=[n.sdp,`a=${t}:${o}\r
|
|
4
|
-
`].join("");return n},g_=async(a,e,n)=>{const t=e??{iceServers:[{urls:"stun:global.stun.twilio.com:3478"}]},o=new RTCPeerConnection(t);let i;const r=new Promise(h=>{i=h}),c=o.createDataChannel("data",{id:0,negotiated:!0,ordered:!0});c.binaryType="arraybuffer";const l=o.createDataChannel("negotiation",{id:1,negotiated:!0,ordered:!0});l.binaryType="arraybuffer";let d=!1;if(l.addEventListener("open",()=>{d=!0}),l.addEventListener("message",h=>{(async()=>{const I=new RTCSessionDescription(JSON.parse(qr(h.data)));if(await o.setRemoteDescription(I),I.type==="offer"){await o.setLocalDescription();const R=Mt(o.localDescription,n);l.send(bt(JSON.stringify(R)))}})().catch(console.error)}),o.addEventListener("negotiationneeded",()=>{(async()=>{if(!d)return;await o.setLocalDescription();const h=Mt(o.localDescription,n);l.send(bt(JSON.stringify(h)))})().catch(console.error)}),!a)return{pc:o,dc:c};const u=await o.createOffer({});return await o.setLocalDescription(u),o.addEventListener("icecandidate",h=>{h.candidate===null&&i({pc:o,dc:c})}),r};function T_(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function Lr(a,e){const n=_r(a);if(n)throw e.forEach((t,o)=>{n.metadata.append(o,t)}),n;if(!e.has(gn)&&!a.has(gn))throw new C("protocol error: missing status",g.Code.Internal)}function Gr(a,e,n,t){const o=new Headers(n??{});return o.set(c1,a?g1:T1),o.set(u1,"1"),o.set(p1,"connect-es/1.6.1"),e!==void 0&&o.set(l1,`${e}m`),o}function k_(a){switch(a){case 400:return g.Code.Internal;case 401:return g.Code.Unauthenticated;case 403:return g.Code.PermissionDenied;case 404:return g.Code.Unimplemented;case 429:return g.Code.Unavailable;case 502:return g.Code.Unavailable;case 503:return g.Code.Unavailable;case 504:return g.Code.Unavailable;default:return g.Code.Unknown}}function Br(a,e){var n;if(a>=200&&a<300)return{foundStatus:e.has(gn),headerError:_r(e)};throw new C(decodeURIComponent((n=e.get(Rr))!==null&&n!==void 0?n:`HTTP ${a}`),k_(a),e)}var nn=function(a){return this instanceof nn?(this.v=a,this):new nn(a)},y_=function(a,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(a,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(O){return Promise.resolve(O).then(R,h)}}function c(R,O){t[R]&&(o[R]=function(b){return new Promise(function(N,V){i.push([R,b,N,V])>1||l(R,b)})},O&&(o[R]=O(o[R])))}function l(R,O){try{d(t[R](O))}catch(b){I(i[0][3],b)}}function d(R){R.value instanceof nn?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){l("next",R)}function h(R){l("throw",R)}function I(R,O){R(O),i.shift(),i.length&&l(i[0][0],i[0][1])}};function v_(a){var e;T_();const n=(e=a.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(t,o,i,r,c,l,d){var u;const{serialize:h,parse:I}=gt(o,n,a.jsonOptions,a.binaryOptions);return r=r===void 0?a.defaultTimeoutMs:r<=0?void 0:r,await Er({interceptors:a.interceptors,signal:i,timeoutMs:r,req:{stream:!1,service:t,method:o,url:Sr(a.baseUrl,t,o),init:{method:"POST",credentials:(u=a.credentials)!==null&&u!==void 0?u:"same-origin",redirect:"error",mode:"cors"},header:Gr(n,r,c),contextValues:d??ya(),message:l},next:async R=>{var O;const N=await((O=a.fetch)!==null&&O!==void 0?O:globalThis.fetch)(R.url,Object.assign(Object.assign({},R.init),{headers:R.header,signal:R.signal,body:kr(0,h(R.message))})),{headerError:V}=Br(N.status,N.headers);if(!N.body)throw V!==void 0?V:"missing response body";const y=Tr(N.body).getReader();let f,k;for(;;){const v=await y.read();if(v.done)break;const{flags:E,data:M}=v.value;if((E&gr)===gr)throw new C("protocol error: received unsupported compressed output",g.Code.Internal);if(E===ut){if(f!==void 0)throw"extra trailer";f=fr(M);continue}if(k!==void 0)throw new C("extra message",g.Code.Unimplemented);k=I(M)}if(f===void 0)throw V!==void 0?V:new C("missing trailer",N.headers.has(gn)?g.Code.Unimplemented:g.Code.Unknown);if(Lr(f,N.headers),k===void 0)throw new C("missing message",f.has(gn)?g.Code.Unimplemented:g.Code.Unknown);return{stream:!1,service:t,method:o,header:N.headers,message:k,trailer:f}}})},async stream(t,o,i,r,c,l,d){var u;const{serialize:h,parse:I}=gt(o,n,a.jsonOptions,a.binaryOptions);function R(b,N,V,y,f){return y_(this,arguments,function*(){const v=Tr(b).getReader();if(N){if(!(yield nn(v.read())).done)throw"extra data for trailers-only";return yield nn(void 0)}let E=!1;for(;;){const M=yield nn(v.read());if(M.done)break;const{flags:oe,data:B}=M.value;if((oe&ut)===ut){if(E)throw"extra trailer";E=!0;const Y=fr(B);Lr(Y,y),Y.forEach((Ci,Ni)=>V.set(Ni,Ci));continue}if(E)throw"extra message";yield yield nn(I(B))}if("throwIfAborted"in f&&f.throwIfAborted(),!E)throw"missing trailer"})}async function O(b){if(o.kind!=m.ServerStreaming)throw"The fetch API does not support streaming request bodies";const N=await b[Symbol.asyncIterator]().next();if(N.done==!0)throw"missing request message";return kr(0,h(N.value))}return r=r===void 0?a.defaultTimeoutMs:r<=0?void 0:r,wr({interceptors:a.interceptors,signal:i,timeoutMs:r,req:{stream:!0,service:t,method:o,url:Sr(a.baseUrl,t,o),init:{method:"POST",credentials:(u=a.credentials)!==null&&u!==void 0?u:"same-origin",redirect:"error",mode:"cors"},header:Gr(n,r,c),contextValues:d??ya(),message:l},next:async b=>{var N;const y=await((N=a.fetch)!==null&&N!==void 0?N:globalThis.fetch)(b.url,Object.assign(Object.assign({},b.init),{headers:b.header,signal:b.signal,body:await O(b.message)})),{foundStatus:f,headerError:k}=Br(y.status,y.headers);if(k!=null)throw k;if(!y.body)throw"missing response body";const v=new Headers;return Object.assign(Object.assign({},b),{header:y.headers,trailer:v,message:R(y.body,f,v,y.headers,b.signal)})}})}}}let Sa;const h_=a=>{Sa=a},f_=()=>Sa!==void 0,ne=(a,e={})=>{Sa&&Sa({timestamp:new Date,event:a,...e})},R_=a=>{console.debug("[viam-sdk]",JSON.stringify(a))},__=()=>R_,Ia=s.makeMessageType("proto.rpc.webrtc.v1.PacketMessage",()=>[{no:1,name:"data",kind:"scalar",T:12},{no:2,name:"eom",kind:"scalar",T:8}]),Et=s.makeMessageType("proto.rpc.webrtc.v1.Stream",()=>[{no:1,name:"id",kind:"scalar",T:4}]),wt=s.makeMessageType("proto.rpc.webrtc.v1.Request",()=>[{no:1,name:"stream",kind:"message",T:Et},{no:2,name:"headers",kind:"message",T:Fr,oneof:"type"},{no:3,name:"message",kind:"message",T:Ct,oneof:"type"},{no:4,name:"rst_stream",kind:"scalar",T:8,oneof:"type"}]),Fr=s.makeMessageType("proto.rpc.webrtc.v1.RequestHeaders",()=>[{no:1,name:"method",kind:"scalar",T:9},{no:2,name:"metadata",kind:"message",T:Oa},{no:3,name:"timeout",kind:"message",T:J}]),Ct=s.makeMessageType("proto.rpc.webrtc.v1.RequestMessage",()=>[{no:1,name:"has_message",kind:"scalar",T:8},{no:2,name:"packet_message",kind:"message",T:Ia},{no:3,name:"eos",kind:"scalar",T:8}]),S_=s.makeMessageType("proto.rpc.webrtc.v1.Response",()=>[{no:1,name:"stream",kind:"message",T:Et},{no:2,name:"headers",kind:"message",T:I_,oneof:"type"},{no:3,name:"message",kind:"message",T:O_,oneof:"type"},{no:4,name:"trailers",kind:"message",T:b_,oneof:"type"}]),I_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseHeaders",()=>[{no:1,name:"metadata",kind:"message",T:Oa}]),O_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseMessage",()=>[{no:1,name:"packet_message",kind:"message",T:Ia}]),b_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseTrailers",()=>[{no:1,name:"status",kind:"message",T:Tn},{no:2,name:"metadata",kind:"message",T:Oa}]),xr=s.makeMessageType("proto.rpc.webrtc.v1.Strings",()=>[{no:1,name:"values",kind:"scalar",T:9,repeated:!0}]),Oa=s.makeMessageType("proto.rpc.webrtc.v1.Metadata",()=>[{no:1,name:"md",kind:"map",K:9,V:{kind:"message",T:xr}}]);class ge extends Error{name="ConnectionClosedError";constructor(e){super(e),Object.setPrototypeOf(this,ge.prototype)}static isError(e){return e instanceof ge||e instanceof C&&e.rawMessage==="closed"?!0:typeof e=="string"?e==="Response closed without headers":e instanceof Error?e.message==="Response closed without headers":!1}}class M_{ready;peerConn;dataChannel;pResolve;pReject;closed=!1;closedReason;maxDataChannelSize=65535;constructor(e,n){this.peerConn=e,this.dataChannel=n,this.ready=new Promise((t,o)=>{this.pResolve=t,this.pReject=o}),n.addEventListener("open",()=>this.onChannelOpen()),n.addEventListener("close",()=>this.onChannelClose()),n.addEventListener("error",t=>{this.onChannelError(t)}),e.addEventListener("iceconnectionstatechange",()=>{const t=e.iceConnectionState;(t==="failed"||t==="disconnected"||t==="closed")&&this.pReject?.(new Error(`ICE connection failed with state: ${t}`))})}isClosed(){return this.closed}isClosedReason(){return this.closedReason}closeWithReason(e){this.closed||(this.closed=!0,this.closedReason=e,this.pReject?.(e),this.peerConn.close(),this.dataChannel.close())}onChannelOpen(){this.pResolve?.(void 0)}onChannelClose(){this.closeWithReason(new ge("data channel closed"))}onChannelError(e){console.error("channel error",e),this.closeWithReason(new Error(JSON.stringify(e)))}write(e){this.dataChannel.send(e.toBinary())}}const Jr=33554432;class E_{grpcStream;onDone;closed=!1;packetBuf=[];packetBufSize=0;constructor(e,n){this.grpcStream=e,this.onDone=n}closeWithRecvError(){this.closed||(this.closed=!0,this.onDone(this.grpcStream.id))}processPacketMessage(e){const{data:n}=e;if(n.length+this.packetBufSize>Jr){this.packetBuf.length=0,this.packetBufSize=0,console.error(`message size larger than max ${Jr}; discarding`);return}if(this.packetBuf.push(n),this.packetBufSize+=n.length,e.eom){const t=new Uint8Array(this.packetBufSize);let o=0;for(const i of this.packetBuf)t.set(i,o),o+=i.length;return this.packetBuf.length=0,this.packetBufSize=0,t}}}const w_=16373;class zr extends E_{channel;service;method;parseMessage;requestHeaders;headersReceived=!1;trailersReceived=!1;constructor(e,n,t,o,i,r){super(n,t),this.channel=e,this.service=o,this.method=i;const{parse:c}=gt(i,!0,void 0,void 0);this.parseMessage=c;const l=`/${o.typeName}/${i.name}`;this.requestHeaders=new Fr({method:l});const d=C_(Un(r));d&&(this.requestHeaders.metadata=d)}startRequest(e){e&&e.addEventListener("abort",()=>{this.resetStream()});try{this.channel.writeHeaders(this.grpcStream,this.requestHeaders)}catch(n){console.error("error writing headers",n),this.closeWithRecvError()}}sendMessage(e){if(e){this.writeMessage(!1,e);return}this.writeMessage(!1,void 0)}resetStream(){if(!this.closed)try{this.channel.writeReset(this.grpcStream)}catch(e){console.error("error writing reset",e),this.closeWithRecvError()}}writeMessage(e,n){try{if(!n||n.length===0){const o=new Ia({eom:!0}),i=new Ct({hasMessage:!!n,packetMessage:o,eos:e});this.channel.writeMessage(this.grpcStream,i);return}let t=n;for(;t.length>0;){const o=Math.min(t.length,w_),i=new Ia;i.data=t.slice(0,o),t=t.slice(o),t.length===0&&(i.eom=!0);const r=new Ct({hasMessage:!!t,packetMessage:i,eos:e});this.channel.writeMessage(this.grpcStream,r)}}catch(t){console.error("error writing message",t),this.closeWithRecvError()}}onResponse(e){switch(e.type.case){case"headers":{if(this.headersReceived){console.error(`invariant: headers already received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processHeaders(e.type.value);break}case"message":{if(!this.headersReceived){console.error(`invariant: headers not yet received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processMessage(e.type.value);break}case"trailers":{this.processTrailers(e.type.value);break}default:{console.error("unknown response type",e.type.case);break}}}processHeaders(e){this.headersReceived=!0,this.onHeaders(e)}processMessage(e){if(!e.packetMessage)return;const n=super.processPacketMessage(e.packetMessage);n&&this.onMessage(n)}processTrailers(e){this.trailersReceived=!0;const{status:n}=e,t=n?n.code:0;if(this.onTrailers(e),t===0){this.closeWithRecvError();return}this.closeWithRecvError()}}const C_=a=>{if(!a)return;const e=new Oa({md:Object.fromEntries([...a.entries()].map(([n,t])=>[n,new xr({values:[t]})]))});return Object.keys(e.md).length>0?e:void 0},Nt=a=>{const e=Object.entries(a?.md??{}).flatMap(([n,{values:t}])=>t.map(o=>[n,o]));return new Headers(e)};class N_ extends zr{awaitingHeadersResult;gotHeaders=!1;respStream=e1();trailers=new Headers;respStreamQueue;async run(e,n,t,o){const r={req:{stream:!0,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??ya(),message:t},next:async c=>{const d=await new Promise((u,h)=>{this.awaitingHeadersResult={success:u,failure:h},this.startRequest(e),this.sendMessages(c.message).catch(I=>{console.error("error sending streaming message",I),this.closeWithRecvError()})});return{...c,header:d,trailer:this.trailers,message:this.respStream}}};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),wr(r)}async sendMessages(e){for await(const n of e)this.sendMessage(n.toBinary());this.writeMessage(!0,void 0)}onHeaders(e){this.gotHeaders=!0,this.awaitingHeadersResult?.success(Nt(e.metadata))}onTrailers(e){if(e.metadata?.md){for(const n in e.metadata.md)if(Object.hasOwn(e.metadata.md,n)){const t=e.metadata.md[n];for(const o of t?.values??[])this.trailers.append(n,o)}}if(this.respStream.close(),!e.status||e.status.code===0){if(this.gotHeaders)return;this.awaitingHeadersResult?.success(new Headers);return}this.gotHeaders||this.awaitingHeadersResult?.failure(e.status.message)}onMessage(e){const n=this.parseMessage(e);this.respStreamQueue=this.respStreamQueue?this.respStreamQueue.then(async()=>this.respStream.write(n)):this.respStream.write(n),this.respStreamQueue.catch(t=>{console.error(`error pushing received message into stream; failing: ${t}`),this.resetStream()})}}class P_ extends zr{result;headers;message;async run(e,n,t,o){const r={req:{stream:!1,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??ya(),message:t},next:async c=>new Promise((l,d)=>{this.result={success:l,failure:d},this.startRequest(),this.sendMessage(c.message.toBinary())})};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),Er(r)}onHeaders(e){if(this.headers!==void 0){this.result?.failure(new Error("invariant: received headers more than once"));return}this.headers=Nt(e.metadata)}onTrailers(e){const n=Nt(e.metadata);if(!e.status||e.status.code===0){if(!this.headers){this.result?.failure(new Error("invariant: received trailers for successful unary request without headers"));return}if(this.message===void 0){this.result?.failure(new Error("invariant: received trailers for successful unary request without message"));return}this.result?.success({stream:!1,header:this.headers,message:this.message,trailer:n,service:this.service,method:this.method});return}this.result?.failure(e.status.message)}onMessage(e){if(this.message!==void 0){this.result?.failure(new Error("invariant: received two response messages for unary request"));return}this.message=this.parseMessage(e)}}const D_=256;class A_ extends M_{streamIDCounter=0;streams=new Map;constructor(e,n){super(e,n),n.addEventListener("message",t=>{this.onChannelMessage(t)}),e.addEventListener("iceconnectionstatechange",()=>{const t=e.iceConnectionState;(t==="failed"||t==="disconnected"||t==="closed")&&this.onConnectionTerminated()}),n.addEventListener("close",()=>this.onConnectionTerminated())}onConnectionTerminated(){this.closeWithReason(new ge("data channel closed"));for(const e of this.streams.values())e.cs.closeWithRecvError()}onChannelMessage(e){const n=S_.fromBinary(new Uint8Array(e.data)),{stream:t}=n;if(t===void 0){console.error("no stream id; discarding");return}const{id:o}=t,i=this.streams.get(o.toString());if(i===void 0){console.error("no stream for id; discarding","id",o);return}i.cs.onResponse(n)}nextStreamID(){const e=this.streamIDCounter;return this.streamIDCounter+=1,new Et({id:BigInt(e)})}newStream(e,n,t,o,i){if(this.isClosed())throw new ge("connection closed");let r=this.streams.get(n.id.toString());if(r!==void 0)throw new Error("invariant: stream should not exist yet");if(Object.keys(this.streams).length>D_)throw new Error("stream limit hit");const c=new e(this,n,l=>this.removeStreamByID(l),t,o,i);return r={cs:c},this.streams.set(n.id.toString(),r),c}removeStreamByID(e){this.streams.delete(e.toString())}writeHeaders(e,n){this.write(new wt({stream:e,type:{case:"headers",value:n}}))}writeMessage(e,n){this.write(new wt({stream:e,type:{case:"message",value:n}}))}writeReset(e){this.write(new wt({stream:e,type:{case:"rstStream",value:!0}}))}async unary(e,n,t,o,i,r,c){return this.newStream(P_,this.nextStreamID(),e,n,i).run(t,o,r,c)}async stream(e,n,t,o,i,r,c){return this.newStream(N_,this.nextStreamID(),e,n,i).run(t,o,r,c)}}const ba="invariant: call uuid unset";class U_{constructor(e,n,t,o,i){this.signalingClient=e,this.callOpts=n,this.pc=t,this.dc=o,this.dialOpts=i,this.clientChannel=new A_(this.pc,this.dc)}clientChannel;callUuid;sentDoneOrErrorOnce=!1;exchangeDone=!1;iceComplete=!1;haveInitResponse=!1;awaitingRemoteDescription;remoteDescriptionSet;numCallUpdates=0;maxCallUpdateDuration=0;totalCallUpdateDuration=0;async doExchange(){await this.setup();const e=Mt(this.pc.localDescription,this.dialOpts?.additionalSdpFields),n=bt(JSON.stringify(e)),t=new Ar({sdp:n});this.dialOpts&&this.dialOpts.disableTrickleICE&&(t.disableTrickle=this.dialOpts.disableTrickleICE),this.clientChannel.ready.then(async()=>{this.exchangeDone=!0,await this.sendDone()}).catch(console.error);const o=this.signalingClient.call(t,this.callOpts),i=this.processCallResponses(o);return await Promise.all([this.clientChannel.ready,i]),this.clientChannel}async setup(){if(this.remoteDescriptionSet=new Promise((e,n)=>{this.awaitingRemoteDescription={success:e,failure:n}}),!this.dialOpts?.disableTrickleICE){const e=await this.pc.createOffer({});this.pc.addEventListener("iceconnectionstatechange",()=>{if(this.pc.iceConnectionState!=="completed"||this.numCallUpdates===0)return;const n=this.totalCallUpdateDuration/this.numCallUpdates;console.groupCollapsed("Caller update statistics"),console.table({num_updates:this.numCallUpdates,average_duration:`${n}ms`,max_duration:`${this.maxCallUpdateDuration}ms`}),console.groupEnd()}),this.pc.addEventListener("icecandidate",n=>{this.onLocalICECandidate(n).catch(t=>{console.error(`error processing local ICE candidate ${t}`)})}),await this.pc.setLocalDescription(e)}}terminate(e){this.clientChannel.closeWithReason(e)}async processCallResponses(e){try{for await(const n of e)switch(n.stage.case){case"init":{if(!await this.handleInitResponse(n.uuid,n.stage.value))return;break}case"update":{if(!await this.handleUpdateResponse(n.uuid,n.stage.value))return;break}default:{await this.sendError("unknown CallResponse stage");return}}}catch(n){this.handleInitError(n)}}handleInitError(e){if(!(this.exchangeDone||this.pc.iceConnectionState==="connected")){if(e instanceof C&&e.code===g.Code.Unimplemented){if(e.message==="Response closed without headers")throw new ge("failed to dial");if(this.clientChannel.isClosed())throw new ge("client channel is closed");console.error(e.message)}throw e}}async handleInitResponse(e,n){if(this.haveInitResponse)return await this.sendError("got init stage more than once"),!1;this.haveInitResponse=!0,this.callUuid=e;const t=new RTCSessionDescription(JSON.parse(qr(n.sdp)));return this.clientChannel.isClosed()?(await this.sendError("client channel is closed"),!1):(await this.pc.setRemoteDescription(t),this.awaitingRemoteDescription?.success(!0),this.dialOpts?.disableTrickleICE?(this.exchangeDone=!0,await this.sendDone(),!1):!0)}async handleUpdateResponse(e,n){if(!this.haveInitResponse)return await this.sendError("got update stage before init stage"),!1;if(e!==this.callUuid)return await this.sendError(`uuid mismatch; have=${e} want=${this.callUuid}`),!1;if(n.candidate===void 0)return await this.sendError("no candidate"),!1;const t=q_(n.candidate);t.candidate!==void 0&&console.debug(`received remote ICE ${t.candidate}`);try{await this.pc.addIceCandidate(t)}catch(o){throw console.log("error adding ice candidate",o),await this.sendError(JSON.stringify(o)),o}return!0}async onLocalICECandidate(e){if(await this.remoteDescriptionSet,this.exchangeDone||this.pc.iceConnectionState==="connected"){e.candidate!==null&&console.info("Dropping ICE candidate - exchange done or already connected",{exchangeDone:this.exchangeDone,iceConnectionState:this.pc.iceConnectionState,candidate:e.candidate.candidate});return}if(e.candidate===null){console.info("ICE gathering complete"),this.iceComplete=!0,await this.sendDone();return}if(this.callUuid===void 0||this.callUuid==="")throw console.error(ba),new Error(ba);e.candidate.candidate!==void 0&&console.info(`Gathered local ICE ${e.candidate.candidate}`);const n=L_(e.candidate),t=new Ra({uuid:this.callUuid,update:{case:"candidate",value:n}}),o=new Date;try{await this.signalingClient.callUpdate(t,this.callOpts),this.numCallUpdates+=1;const r=new Date().getTime()-o.getTime();r>this.maxCallUpdateDuration&&(this.maxCallUpdateDuration=r),this.totalCallUpdateDuration+=r}catch(i){if(this.exchangeDone||this.iceComplete||this.pc.iceConnectionState==="connected")return;console.error(i)}}async sendError(e){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(ba);this.sentDoneOrErrorOnce=!0;const n=new Ra({uuid:this.callUuid,update:{case:"error",value:new Tn({code:g.Code.Unknown,message:e})}});try{await this.signalingClient.callUpdate(n,this.callOpts)}catch(t){console.error("failed to send call update; continuing",t)}}async sendDone(){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(ba);this.sentDoneOrErrorOnce=!0;const e=new Ra({uuid:this.callUuid,update:{case:"done",value:!0}});try{await this.signalingClient.callUpdate(e,this.callOpts)}catch(n){console.error(n)}}}const q_=a=>{const e={candidate:a.candidate};return a.sdpMid!==void 0&&(e.sdpMid=a.sdpMid),a.sdpmLineIndex!==void 0&&(e.sdpMLineIndex=a.sdpmLineIndex),a.usernameFragment!==void 0&&(e.usernameFragment=a.usernameFragment),e},L_=a=>{const e=new An;return a.candidate!==void 0&&(e.candidate=a.candidate),a.sdpMid!==void 0&&a.sdpMid!==null&&(e.sdpMid=a.sdpMid),a.sdpMLineIndex!==void 0&&a.sdpMLineIndex!==null&&(e.sdpmLineIndex=a.sdpMLineIndex),a.usernameFragment!==void 0&&a.usernameFragment!==null&&(e.usernameFragment=a.usernameFragment),e},Ma=(a,e)=>globalThis.VIAM?.GRPC_TRACE_LOGGING===!0?{...a,unary:async(o,i,r,c,l,d,u)=>{const h=Dn.UuidTool.newUuid();console.trace(`Unary request ${h} : ${e}/${o.typeName}.${i.name}`);const I=await a.unary(o,i,r,c,l,d,u);return console.debug(`Unary response received: ${h}`),I},stream:async(o,i,r,c,l,d,u)=>{const h=Dn.UuidTool.newUuid();console.trace(`Stream request ${h} : ${e}/${o.typeName}.${i.name}`);const I=await a.stream(o,i,r,c,l,d,u);return console.debug(`Stream response received: ${h}`),I}}:a,Vr=(a,e)=>({...a,unary:async(o,i,r,c,l,d,u)=>{const h=`${o.typeName}/${i.name}`;ne("grpc_request",{connectionId:e,type:"unary",method:h});try{const I=await a.unary(o,i,r,c,l,d,u);return ne("grpc_response",{connectionId:e,type:"unary",method:h}),I}catch(I){throw ne("grpc_response",{connectionId:e,type:"unary",method:h,error:I instanceof Error?I.message:String(I)}),I}},stream:async(o,i,r,c,l,d,u)=>{if(!f_())return a.stream(o,i,r,c,l,d,u);const h=`${o.typeName}/${i.name}`;ne("grpc_request",{connectionId:e,type:"stream",method:h});let I;try{I=await a.stream(o,i,r,c,l,d,u)}catch(O){throw ne("grpc_response",{connectionId:e,type:"stream",method:h,error:O instanceof Error?O.message:String(O)}),O}return{...I,message:async function*(){try{for await(const b of I.message)ne("grpc_response",{connectionId:e,type:"stream",method:h}),yield b}catch(b){throw ne("grpc_response",{connectionId:e,type:"stream",method:h,error:b instanceof Error?b.message:String(b)}),b}}()}}}),Ea=async(a,e,n=!1)=>{Yr(e);const t=globalThis.VIAM?.GRPC_TRANSPORT_FACTORY??v_,o={baseUrl:a,credentials:"same-origin"};if(e?.accessToken!==void 0&&e.accessToken!==""&&!(e.externalAuthAddress!==void 0&&e.externalAuthAddress!==""&&e.externalAuthToEntity!==void 0&&e.externalAuthToEntity!=="")){const r=new Headers(e.extraHeaders);r.set("authorization",`Bearer ${e.accessToken}`);const c=new wa(o,t,r);return Ma(c,a)}if(e===void 0||e.credentials===void 0&&e.accessToken===void 0){n&&(o.credentials="include");const r=new Headers(e?.extraHeaders??{}),c=new wa(o,t,r);return Ma(c,a)}const i=await G_(a,t,e,o);return Ma(i,a)},Pt=/^.*:\/\//u,G_=async(a,e,n,t)=>{const o=new Headers(n.extraHeaders);let i;if(n.accessToken===void 0||n.accessToken===""){const r=new Ot({entity:Fn(n.credentials)&&n.credentials.authEntity?n.credentials.authEntity:a.replace(Pt,"")});n.credentials&&(r.credentials=new Dr({type:n.credentials.type,payload:n.credentials.payload}));const c=n.externalAuthAddress??a,l=e({baseUrl:c});i=(await X(W1,l).authenticate(r)).accessToken}else i=n.accessToken;if(n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""&&n.externalAuthToEntity!==void 0&&n.externalAuthToEntity!==""){const r=new Headers;r.set("authorization",`Bearer ${i}`),i="";const c=new Ot({entity:n.externalAuthToEntity}),l=e({baseUrl:n.externalAuthAddress});i=(await X(H1,l).authenticateTo(c,{headers:r})).accessToken}return o.set("authorization",`Bearer ${i}`),new wa(t,e,o)};class wa{transport;extraHeaders;constructor(e,n,t){this.extraHeaders=t,this.transport=n(e)}unary=async(e,n,t,o,i,r,c)=>{const l=Un(i);for(const[d,u]of this.extraHeaders)l.set(d,u);return this.transport.unary(e,n,t,o,l,r,c)};stream=async(e,n,t,o,i,r,c)=>{const l=Un(i);for(const[d,u]of this.extraHeaders)l.set(d,u);return this.transport.stream(e,n,t,o,l,r,c)}}const Un=a=>{const e=new Headers;if(a!==void 0)if(Array.isArray(a))for(const[n,t]of a)e.append(n,t);else if("forEach"in a)typeof a.forEach=="function"&&a.forEach((n,t)=>{e.append(t,n)});else for(const[n,t]of Object.entries(a))e.append(n,t);return e},B_=async(a,e,n=!1)=>{const t=await Ea(a,e,n);return X(u_,t)},F_=async(a,e)=>{try{return(await e.optionalWebRTCConfig({},a)).config??new _a}catch(n){if(n instanceof C&&n.code===g.Code.Unimplemented)return new _a;throw n}},x_=async(a,e,n,t=!1)=>{let o=a.replace(/\/$/u,"");n?.webrtcOptions?.signalingInsecure&&(o=`http://${o.replace(/^https?:\/\//u,"")}`),Yr(n);const i={headers:{"rpc-host":e}},r=W_(o,n),c=await B_(o,r,t),l=await Y_(c,i,n),{pc:d,dc:u}=await g_(l.disableTrickleICE,l.rtcConfig,l.additionalSdpFields);let h=!1;const I=new U_(c,i,d,u,l);let R;const O=n?.dialTimeoutMs??n?.dialTimeout;O!==void 0&&O>0&&(R=setTimeout(()=>{h||I.terminate(new Error("timed out"))},O));try{const b=await I.doExchange();n?.externalAuthAddress!==void 0&&n.externalAuthAddress!==""||n?.credentials?.type,h=!0;const N=new Headers(n?.extraHeaders??{}),V=new wa({baseUrl:e},()=>b,N);return{transport:Ma(V,e),peerConnection:d,dataChannel:u}}catch(b){throw console.error("error dialing",b),b}finally{R!==void 0&&(clearTimeout(R),R=void 0),h||(d.close(),u.close())}},J_=a=>(typeof a.urls=="string"?[a.urls]:a.urls).some(n=>n.startsWith("turn:")||n.startsWith("turns:")),$r=a=>{const e=a.indexOf(":");if(e<0)return;const n=a.slice(0,e);if(n!=="turn"&&n!=="turns")return;const t=a.slice(e+1),o=t.indexOf("?"),i=o>=0?t.slice(0,o):t,r=o>=0?t.slice(o+1):"",c=i.lastIndexOf(":");if(c<0)return;const l=i.slice(0,c),d=Number.parseInt(i.slice(c+1),10);if(Number.isNaN(d))return;const u=r.split("&").find(h=>h.startsWith("transport="))?.slice(10)??"udp";return{scheme:n,host:l,port:d,transport:u}},z_=(a,e)=>a.scheme===e.scheme&&a.host===e.host&&a.port===e.port&&a.transport===e.transport,V_=a=>`${a.scheme}:${a.host}:${a.port}?transport=${a.transport}`,$_=a=>{let e;return a.turnUri!==void 0&&(e=$r(a.turnUri),e===void 0)?(console.warn(`Failed to parse turnUri, ignoring all TURN URI options: ${a.turnUri}`),a):(a.rtcConfig={...a.rtcConfig,iceServers:(a.rtcConfig?.iceServers??[]).map(n=>{const o=(typeof n.urls=="string"?[n.urls]:n.urls).flatMap(i=>{const r=$r(i);return r===void 0?[i]:e!==void 0&&!z_(r,e)?[]:(a.turnScheme!==void 0&&(r.scheme=a.turnScheme),a.turnPort!==void 0&&(r.port=a.turnPort),a.turnTransport!==void 0&&(r.transport=a.turnTransport),[V_(r)])});return{...n,urls:o}}).filter(n=>(typeof n.urls=="string"?[n.urls]:n.urls).length>0)},console.debug("TURN filter options set",{turnUri:a.turnUri,turnScheme:a.turnScheme,turnPort:a.turnPort,turnTransport:a.turnTransport}),a)},Y_=async(a,e,n)=>{const t=await F_(e,a),o=t.additionalIceServers.map(c=>{const l=[];for(const d of c.urls)d.endsWith("udp")&&l.push(`${d.slice(0,-3)}tcp`),l.push(d);return{urls:l,credential:c.credential,username:c.username}}),i=n??{};let r;return i.webrtcOptions===void 0?r={disableTrickleICE:t.disableTrickle,rtcConfig:{iceServers:o}}:(r=JSON.parse(JSON.stringify(i.webrtcOptions)),r.rtcConfig===void 0?r.rtcConfig={iceServers:o}:r.rtcConfig.iceServers=[...r.rtcConfig.iceServers??[],...o]),r.forceRelay&&r.forceP2P&&console.warn("forceRelay and forceP2P are both set; forceP2P strips TURN servers that forceRelay requires so the connection will fail"),r.forceP2P&&(console.debug("force P2P enabled; stripping TURN servers and ignoring signaling server ICE config"),r.rtcConfig={...r.rtcConfig,iceServers:(r.rtcConfig?.iceServers??[]).filter(c=>!J_(c))}),r.forceRelay&&(console.debug("force relay enabled; using relay-only ICE transport policy"),r.rtcConfig={...r.rtcConfig,iceTransportPolicy:"relay"}),r.forceP2P&&(r.turnUri!==void 0||r.turnScheme!==void 0||r.turnTransport!==void 0||r.turnPort!==void 0)&&console.warn("forceP2P is set alongside TURN options; the TURN filter will have no effect since TURN servers were already stripped"),(r.turnUri!==void 0||r.turnScheme!==void 0||r.turnTransport!==void 0||r.turnPort!==void 0)&&(r=$_(r)),r},W_=(a,e)=>{let n=e;return e&&(n={...e},e.accessToken===void 0&&(Fn(n.credentials)&&!n.credentials.authEntity&&(n.credentials.authEntity=n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""?n.externalAuthAddress.replace(Pt,""):a.replace(Pt,"")),n.credentials=e.webrtcOptions?.signalingCredentials,n.accessToken=e.webrtcOptions?.signalingAccessToken),n.externalAuthAddress=e.webrtcOptions?.signalingExternalAuthAddress,n.externalAuthToEntity=e.webrtcOptions?.signalingExternalAuthToEntity),n},Yr=a=>{if(a){if(a.accessToken!==void 0&&a.accessToken.length>0){if(a.credentials)throw new Error("cannot set credentials with accessToken");if(a.webrtcOptions?.signalingAccessToken!==void 0)throw new Error("cannot set webrtcOptions.signalingAccessToken with accessToken");if(a.webrtcOptions?.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with accessToken")}if(a.webrtcOptions?.signalingAccessToken!==void 0&&a.webrtcOptions.signalingAccessToken.length>0&&a.webrtcOptions.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with webrtcOptions.signalingAccessToken")}},H_="v0.1.548",Wr=s.makeEnum("viam.common.v1.KinematicsFileFormat",[{no:0,name:"KINEMATICS_FILE_FORMAT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"KINEMATICS_FILE_FORMAT_SVA",localName:"SVA"},{no:2,name:"KINEMATICS_FILE_FORMAT_URDF",localName:"URDF"}]),z=s.makeMessageType("viam.common.v1.ResourceName",()=>[{no:1,name:"namespace",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"subtype",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9}]),Te=s.makeMessageType("viam.common.v1.Pose",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),Dt=s.makeMessageType("viam.common.v1.Orientation",()=>[{no:1,name:"o_x",kind:"scalar",T:1},{no:2,name:"o_y",kind:"scalar",T:1},{no:3,name:"o_z",kind:"scalar",T:1},{no:4,name:"theta",kind:"scalar",T:1}]),Hr=s.makeMessageType("viam.common.v1.PoseCloud",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),He=s.makeMessageType("viam.common.v1.PoseInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose",kind:"message",T:Te},{no:3,name:"goal_cloud",kind:"message",T:Hr,opt:!0}]),ke=s.makeMessageType("viam.common.v1.Vector3",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),jr=s.makeMessageType("viam.common.v1.Sphere",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1}]),Kr=s.makeMessageType("viam.common.v1.Capsule",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1},{no:2,name:"length_mm",kind:"scalar",T:1}]),Xr=s.makeMessageType("viam.common.v1.RectangularPrism",()=>[{no:1,name:"dims_mm",kind:"message",T:ke}]),Ca=s.makeMessageType("viam.common.v1.Mesh",()=>[{no:1,name:"content_type",kind:"scalar",T:9},{no:2,name:"mesh",kind:"scalar",T:12}]),Qr=s.makeMessageType("viam.common.v1.PointCloud",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12}]),an=s.makeMessageType("viam.common.v1.Geometry",()=>[{no:1,name:"center",kind:"message",T:Te},{no:2,name:"sphere",kind:"message",T:jr,oneof:"geometry_type"},{no:3,name:"box",kind:"message",T:Xr,oneof:"geometry_type"},{no:5,name:"capsule",kind:"message",T:Kr,oneof:"geometry_type"},{no:6,name:"mesh",kind:"message",T:Ca,oneof:"geometry_type"},{no:7,name:"pointcloud",kind:"message",T:Qr,oneof:"geometry_type"},{no:4,name:"label",kind:"scalar",T:9}]),At=s.makeMessageType("viam.common.v1.GeometriesInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"geometries",kind:"message",T:an,repeated:!0}]),Ut=s.makeMessageType("viam.common.v1.PointCloudObject",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12},{no:2,name:"geometries",kind:"message",T:At}]),je=s.makeMessageType("viam.common.v1.GeoPoint",()=>[{no:1,name:"latitude",kind:"scalar",T:1},{no:2,name:"longitude",kind:"scalar",T:1}]),Na=s.makeMessageType("viam.common.v1.GeoGeometry",()=>[{no:1,name:"location",kind:"message",T:je},{no:2,name:"geometries",kind:"message",T:an,repeated:!0}]),xe=s.makeMessageType("viam.common.v1.Transform",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose_in_observer_frame",kind:"message",T:He},{no:3,name:"physical_object",kind:"message",T:an,opt:!0},{no:4,name:"uuid",kind:"scalar",T:12},{no:5,name:"metadata",kind:"message",T:p,opt:!0}]),Zr=s.makeMessageType("viam.common.v1.WorldState",()=>[{no:1,name:"obstacles",kind:"message",T:At,repeated:!0},{no:3,name:"transforms",kind:"message",T:xe,repeated:!0}]),j_=s.makeMessageType("viam.common.v1.ActuatorStatus",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),em=s.makeMessageType("viam.common.v1.ResponseMetadata",()=>[{no:1,name:"captured_at",kind:"message",T:_,opt:!0}]),D=s.makeMessageType("viam.common.v1.DoCommandRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"command",kind:"message",T:p}]),U=s.makeMessageType("viam.common.v1.DoCommandResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),P=s.makeMessageType("viam.common.v1.GetStatusRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),A=s.makeMessageType("viam.common.v1.GetStatusResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),qn=s.makeMessageType("viam.common.v1.GetKinematicsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pa=s.makeMessageType("viam.common.v1.GetKinematicsResponse",()=>[{no:1,name:"format",kind:"enum",T:s.getEnumType(Wr)},{no:2,name:"kinematics_data",kind:"scalar",T:12},{no:3,name:"meshes_by_urdf_filepath",kind:"map",K:9,V:{kind:"message",T:Ca}}]),F=s.makeMessageType("viam.common.v1.GetGeometriesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),j=s.makeMessageType("viam.common.v1.GetGeometriesResponse",()=>[{no:1,name:"geometries",kind:"message",T:an,repeated:!0}]),qt=s.makeMessageType("viam.common.v1.Get3DModelsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),nm=s.makeMessageType("viam.common.v1.Get3DModelsResponse",()=>[{no:1,name:"models",kind:"map",K:9,V:{kind:"message",T:Ca}}]),K_=s.makeMessageType("viam.common.v1.GetWorldPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:Te}]),tn=s.makeMessageType("viam.common.v1.GetReadingsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Da=s.makeMessageType("viam.common.v1.GetReadingsResponse",()=>[{no:1,name:"readings",kind:"map",K:9,V:{kind:"message",T:ee}}]),Ln=s.makeMessageType("viam.common.v1.LogEntry",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9},{no:3,name:"time",kind:"message",T:_},{no:4,name:"logger_name",kind:"scalar",T:9},{no:5,name:"message",kind:"scalar",T:9},{no:6,name:"caller",kind:"message",T:p},{no:7,name:"stack",kind:"scalar",T:9},{no:8,name:"fields",kind:"message",T:p,repeated:!0}]),Lt=s.makeMessageType("viam.common.v1.AudioInfo",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),Gn=s.makeMessageType("viam.common.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Gt=s.makeMessageType("viam.common.v1.GetPropertiesResponse",()=>[{no:1,name:"supported_codecs",kind:"scalar",T:9,repeated:!0},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),am=s.makeExtension("viam.common.v1.safety_heartbeat_monitored",de,{no:84260,kind:"scalar",T:8,opt:!0}),Bt=Object.freeze(Object.defineProperty({__proto__:null,ActuatorStatus:j_,AudioInfo:Lt,Capsule:Kr,DoCommandRequest:D,DoCommandResponse:U,GeoGeometry:Na,GeoPoint:je,GeometriesInFrame:At,Geometry:an,Get3DModelsRequest:qt,Get3DModelsResponse:nm,GetGeometriesRequest:F,GetGeometriesResponse:j,GetKinematicsRequest:qn,GetKinematicsResponse:Pa,GetPropertiesRequest:Gn,GetPropertiesResponse:Gt,GetReadingsRequest:tn,GetReadingsResponse:Da,GetStatusRequest:P,GetStatusResponse:A,GetWorldPoseResponse:K_,KinematicsFileFormat:Wr,LogEntry:Ln,Mesh:Ca,Orientation:Dt,PointCloud:Qr,PointCloudObject:Ut,Pose:Te,PoseCloud:Hr,PoseInFrame:He,RectangularPrism:Xr,ResourceName:z,ResponseMetadata:em,Sphere:jr,Transform:xe,Vector3:ke,WorldState:Zr,safety_heartbeat_monitored:am},Symbol.toStringTag,{value:"Module"})),Bn=new Headers({viam_client:`typescript;v0.72.0;${H_}`}),q=async function(e,n,t,o={},i={}){const r=new D({name:n,command:t instanceof p?t:p.fromJson(t)});o.requestLogger?.(r);const l=(await e(r,i)).result?.toJson();return l===void 0?{}:l},X_=(a,e)=>{const n=e??{headers:{}};let t="";if(a===void 0){const o="abcdefghijklmnopqrstuvwxyz";for(let i=0;i<6;i+=1)t+=o[Math.floor(Math.random()*26)]}else t=a;return n.headers.dtname=t,n},Q_=a=>{if(a.headers){const{_:e,...n}=a.headers;a.headers=n}},Z_=(a,e,n)=>{const t=n??{headers:{}};return t.headers[a]=e,t},eS=(a,e)=>{const{[e]:n,...t}=a.headers;a.headers=t},tm=async function(e,n,t=p.fromJson({}),o={}){const i=new qn({name:n,extra:t}),r=await e(i,o),l=new TextDecoder("utf8").decode(r.kinematicsData),d=JSON.parse(l);return{...d,kinematicsData:d,meshesByUrdfFilepath:r.meshesByUrdfFilepath}},sm=async function(e,n,t=p.fromJson({}),o={}){const i=new F({name:n,extra:t});return(await e(i,o)).geometries},L=async function(e,n,t={},o={}){const i=new P({name:n});t.requestLogger?.(i);const c=(await e(i,o)).result?.toJson();return c===void 0?{}:c},Fn=a=>a!==void 0&&"authEntity"in a,nS=async(a,e)=>e.type==="access-token"?Ea(a,{accessToken:e.payload,extraHeaders:Bn}):Ea(a,{credentials:e,extraHeaders:Bn}),Ft=1e4;var K=(a=>(a.CONNECTING="connecting",a.CONNECTED="connected",a.DISCONNECTING="disconnecting",a.DISCONNECTED="disconnected",a.DIALING="dialing",a.RECONNECTING="reconnecting",a.RECONNECTION_FAILED="reconnection_failed",a))(K||{});class om{listeners={};on(e,n){const{listeners:t}=this;t[e]??=new Set,t[e]?.add(n)}once(e,n){const t=o=>{n(o),this.off(e,n)};this.on(e,t)}has(e,n){return this.listeners[e]?.has(n)}off(e,n){this.listeners[e]?.delete(n)}emit(e,n){for(const t of this.listeners[e]??[])t(n)}}const xt=s.makeMessageType("viam.component.arm.v1.GetEndPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),im=s.makeMessageType("viam.component.arm.v1.GetEndPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Te}]),kn=s.makeMessageType("viam.component.arm.v1.JointPositions",()=>[{no:1,name:"values",kind:"scalar",T:1,repeated:!0}]),Jt=s.makeMessageType("viam.component.arm.v1.GetJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),rm=s.makeMessageType("viam.component.arm.v1.GetJointPositionsResponse",()=>[{no:1,name:"positions",kind:"message",T:kn}]),zt=s.makeMessageType("viam.component.arm.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"to",kind:"message",T:Te},{no:99,name:"extra",kind:"message",T:p}]),mm=s.makeMessageType("viam.component.arm.v1.MoveToPositionResponse",[]),Vt=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:kn},{no:99,name:"extra",kind:"message",T:p}]),cm=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsResponse",[]),lm=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:kn,repeated:!0},{no:3,name:"options",kind:"message",T:gm,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),dm=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsResponse",[]),$t=s.makeMessageType("viam.component.arm.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),pm=s.makeMessageType("viam.component.arm.v1.StopResponse",[]),aS=s.makeMessageType("viam.component.arm.v1.Status",()=>[{no:1,name:"end_position",kind:"message",T:Te},{no:2,name:"joint_positions",kind:"message",T:kn},{no:3,name:"is_moving",kind:"scalar",T:8}]),Yt=s.makeMessageType("viam.component.arm.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),um=s.makeMessageType("viam.component.arm.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),gm=s.makeMessageType("viam.component.arm.v1.MoveOptions",()=>[{no:1,name:"max_vel_degs_per_sec",kind:"scalar",T:1,opt:!0},{no:2,name:"max_acc_degs_per_sec2",kind:"scalar",T:1,opt:!0},{no:3,name:"max_vel_degs_per_sec_joints",kind:"scalar",T:1,repeated:!0},{no:4,name:"max_acc_degs_per_sec2_joints",kind:"scalar",T:1,repeated:!0},{no:5,name:"max_tcp_speed",kind:"scalar",T:1,opt:!0}]),Tm=Object.freeze(Object.defineProperty({__proto__:null,GetEndPositionRequest:xt,GetEndPositionResponse:im,GetJointPositionsRequest:Jt,GetJointPositionsResponse:rm,IsMovingRequest:Yt,IsMovingResponse:um,JointPositions:kn,MoveOptions:gm,MoveThroughJointPositionsRequest:lm,MoveThroughJointPositionsResponse:dm,MoveToJointPositionsRequest:Vt,MoveToJointPositionsResponse:cm,MoveToPositionRequest:zt,MoveToPositionResponse:mm,Status:aS,StopRequest:$t,StopResponse:pm},Symbol.toStringTag,{value:"Module"})),km={typeName:"viam.component.arm.v1.ArmService",methods:{getEndPosition:{name:"GetEndPosition",I:xt,O:im,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:zt,O:mm,kind:m.Unary},getJointPositions:{name:"GetJointPositions",I:Jt,O:rm,kind:m.Unary},moveToJointPositions:{name:"MoveToJointPositions",I:Vt,O:cm,kind:m.Unary},moveThroughJointPositions:{name:"MoveThroughJointPositions",I:lm,O:dm,kind:m.Unary},stop:{name:"Stop",I:$t,O:pm,kind:m.Unary},isMoving:{name:"IsMoving",I:Yt,O:um,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getKinematics:{name:"GetKinematics",I:qn,O:Pa,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},get3DModels:{name:"Get3DModels",I:qt,O:nm,kind:m.Unary}}},Wt=s.makeMessageType("viam.component.base.v1.MoveStraightRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"distance_mm",kind:"scalar",T:3},{no:3,name:"mm_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),ym=s.makeMessageType("viam.component.base.v1.MoveStraightResponse",[]),Ht=s.makeMessageType("viam.component.base.v1.SpinRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:1},{no:3,name:"degs_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),vm=s.makeMessageType("viam.component.base.v1.SpinResponse",[]),jt=s.makeMessageType("viam.component.base.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),hm=s.makeMessageType("viam.component.base.v1.StopResponse",[]),Kt=s.makeMessageType("viam.component.base.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:ke},{no:3,name:"angular",kind:"message",T:ke},{no:99,name:"extra",kind:"message",T:p}]),fm=s.makeMessageType("viam.component.base.v1.SetPowerResponse",[]),Xt=s.makeMessageType("viam.component.base.v1.SetVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:ke},{no:3,name:"angular",kind:"message",T:ke},{no:99,name:"extra",kind:"message",T:p}]),Rm=s.makeMessageType("viam.component.base.v1.SetVelocityResponse",[]),Qt=s.makeMessageType("viam.component.base.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),_m=s.makeMessageType("viam.component.base.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),Aa=s.makeMessageType("viam.component.base.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Sm=s.makeMessageType("viam.component.base.v1.GetPropertiesResponse",()=>[{no:1,name:"width_meters",kind:"scalar",T:1},{no:2,name:"turning_radius_meters",kind:"scalar",T:1},{no:3,name:"wheel_circumference_meters",kind:"scalar",T:1}]),Im=Object.freeze(Object.defineProperty({__proto__:null,GetPropertiesRequest:Aa,GetPropertiesResponse:Sm,IsMovingRequest:Qt,IsMovingResponse:_m,MoveStraightRequest:Wt,MoveStraightResponse:ym,SetPowerRequest:Kt,SetPowerResponse:fm,SetVelocityRequest:Xt,SetVelocityResponse:Rm,SpinRequest:Ht,SpinResponse:vm,StopRequest:jt,StopResponse:hm},Symbol.toStringTag,{value:"Module"})),Om={typeName:"viam.component.base.v1.BaseService",methods:{moveStraight:{name:"MoveStraight",I:Wt,O:ym,kind:m.Unary},spin:{name:"Spin",I:Ht,O:vm,kind:m.Unary},setPower:{name:"SetPower",I:Kt,O:fm,kind:m.Unary},setVelocity:{name:"SetVelocity",I:Xt,O:Rm,kind:m.Unary},stop:{name:"Stop",I:jt,O:hm,kind:m.Unary},isMoving:{name:"IsMoving",I:Qt,O:_m,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},getProperties:{name:"GetProperties",I:Aa,O:Sm,kind:m.Unary}}},bm=s.makeEnum("viam.component.board.v1.PowerMode",[{no:0,name:"POWER_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POWER_MODE_NORMAL",localName:"NORMAL"},{no:2,name:"POWER_MODE_OFFLINE_DEEP",localName:"OFFLINE_DEEP"}]),tS=s.makeMessageType("viam.component.board.v1.Status",()=>[{no:1,name:"analogs",kind:"map",K:9,V:{kind:"scalar",T:5}},{no:2,name:"digital_interrupts",kind:"map",K:9,V:{kind:"scalar",T:3}}]),Zt=s.makeMessageType("viam.component.board.v1.SetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"high",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Mm=s.makeMessageType("viam.component.board.v1.SetGPIOResponse",[]),es=s.makeMessageType("viam.component.board.v1.GetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Em=s.makeMessageType("viam.component.board.v1.GetGPIOResponse",()=>[{no:1,name:"high",kind:"scalar",T:8}]),ns=s.makeMessageType("viam.component.board.v1.PWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wm=s.makeMessageType("viam.component.board.v1.PWMResponse",()=>[{no:1,name:"duty_cycle_pct",kind:"scalar",T:1}]),as=s.makeMessageType("viam.component.board.v1.SetPWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"duty_cycle_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),Cm=s.makeMessageType("viam.component.board.v1.SetPWMResponse",[]),ts=s.makeMessageType("viam.component.board.v1.PWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Nm=s.makeMessageType("viam.component.board.v1.PWMFrequencyResponse",()=>[{no:1,name:"frequency_hz",kind:"scalar",T:4}]),ss=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"frequency_hz",kind:"scalar",T:4},{no:99,name:"extra",kind:"message",T:p}]),Pm=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyResponse",[]),os=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"analog_reader_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Dm=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderResponse",()=>[{no:1,name:"value",kind:"scalar",T:5},{no:2,name:"min_range",kind:"scalar",T:2},{no:3,name:"max_range",kind:"scalar",T:2},{no:4,name:"step_size",kind:"scalar",T:2}]),is=s.makeMessageType("viam.component.board.v1.WriteAnalogRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"value",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Am=s.makeMessageType("viam.component.board.v1.WriteAnalogResponse",[]),rs=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"digital_interrupt_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Um=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueResponse",()=>[{no:1,name:"value",kind:"scalar",T:3}]),ms=s.makeMessageType("viam.component.board.v1.StreamTicksRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),qm=s.makeMessageType("viam.component.board.v1.StreamTicksResponse",()=>[{no:1,name:"pin_name",kind:"scalar",T:9},{no:2,name:"time",kind:"scalar",T:4},{no:3,name:"high",kind:"scalar",T:8}]),cs=s.makeMessageType("viam.component.board.v1.SetPowerModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_mode",kind:"enum",T:s.getEnumType(bm)},{no:3,name:"duration",kind:"message",T:J,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Lm=s.makeMessageType("viam.component.board.v1.SetPowerModeResponse",[]),Gm=Object.freeze(Object.defineProperty({__proto__:null,GetDigitalInterruptValueRequest:rs,GetDigitalInterruptValueResponse:Um,GetGPIORequest:es,GetGPIOResponse:Em,PWMFrequencyRequest:ts,PWMFrequencyResponse:Nm,PWMRequest:ns,PWMResponse:wm,PowerMode:bm,ReadAnalogReaderRequest:os,ReadAnalogReaderResponse:Dm,SetGPIORequest:Zt,SetGPIOResponse:Mm,SetPWMFrequencyRequest:ss,SetPWMFrequencyResponse:Pm,SetPWMRequest:as,SetPWMResponse:Cm,SetPowerModeRequest:cs,SetPowerModeResponse:Lm,Status:tS,StreamTicksRequest:ms,StreamTicksResponse:qm,WriteAnalogRequest:is,WriteAnalogResponse:Am},Symbol.toStringTag,{value:"Module"})),Bm={typeName:"viam.component.board.v1.BoardService",methods:{setGPIO:{name:"SetGPIO",I:Zt,O:Mm,kind:m.Unary},getGPIO:{name:"GetGPIO",I:es,O:Em,kind:m.Unary},pWM:{name:"PWM",I:ns,O:wm,kind:m.Unary},setPWM:{name:"SetPWM",I:as,O:Cm,kind:m.Unary},pWMFrequency:{name:"PWMFrequency",I:ts,O:Nm,kind:m.Unary},setPWMFrequency:{name:"SetPWMFrequency",I:ss,O:Pm,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},readAnalogReader:{name:"ReadAnalogReader",I:os,O:Dm,kind:m.Unary},writeAnalog:{name:"WriteAnalog",I:is,O:Am,kind:m.Unary},getDigitalInterruptValue:{name:"GetDigitalInterruptValue",I:rs,O:Um,kind:m.Unary},streamTicks:{name:"StreamTicks",I:ms,O:qm,kind:m.ServerStreaming},setPowerMode:{name:"SetPowerMode",I:cs,O:Lm,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},ls=s.makeEnum("viam.component.encoder.v1.PositionType",[{no:0,name:"POSITION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POSITION_TYPE_TICKS_COUNT",localName:"TICKS_COUNT"},{no:2,name:"POSITION_TYPE_ANGLE_DEGREES",localName:"ANGLE_DEGREES"}]),ds=s.makeMessageType("viam.component.encoder.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ls),opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Fm=s.makeMessageType("viam.component.encoder.v1.GetPositionResponse",()=>[{no:1,name:"value",kind:"scalar",T:2},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ls)}]),ps=s.makeMessageType("viam.component.encoder.v1.ResetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xm=s.makeMessageType("viam.component.encoder.v1.ResetPositionResponse",[]),us=s.makeMessageType("viam.component.encoder.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Jm=s.makeMessageType("viam.component.encoder.v1.GetPropertiesResponse",()=>[{no:1,name:"ticks_count_supported",kind:"scalar",T:8},{no:2,name:"angle_degrees_supported",kind:"scalar",T:8}]),zm=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:ds,GetPositionResponse:Fm,GetPropertiesRequest:us,GetPropertiesResponse:Jm,PositionType:ls,ResetPositionRequest:ps,ResetPositionResponse:xm},Symbol.toStringTag,{value:"Module"})),Vm={typeName:"viam.component.encoder.v1.EncoderService",methods:{getPosition:{name:"GetPosition",I:ds,O:Fm,kind:m.Unary},resetPosition:{name:"ResetPosition",I:ps,O:xm,kind:m.Unary},getProperties:{name:"GetProperties",I:us,O:Jm,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},gs=s.makeMessageType("viam.component.gantry.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),$m=s.makeMessageType("viam.component.gantry.v1.GetPositionResponse",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0}]),Ts=s.makeMessageType("viam.component.gantry.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"speeds_mm_per_sec",kind:"scalar",T:1,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Ym=s.makeMessageType("viam.component.gantry.v1.MoveToPositionResponse",[]),ks=s.makeMessageType("viam.component.gantry.v1.HomeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Wm=s.makeMessageType("viam.component.gantry.v1.HomeResponse",()=>[{no:1,name:"homed",kind:"scalar",T:8}]),ys=s.makeMessageType("viam.component.gantry.v1.GetLengthsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Hm=s.makeMessageType("viam.component.gantry.v1.GetLengthsResponse",()=>[{no:1,name:"lengths_mm",kind:"scalar",T:1,repeated:!0}]),vs=s.makeMessageType("viam.component.gantry.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),jm=s.makeMessageType("viam.component.gantry.v1.StopResponse",[]),sS=s.makeMessageType("viam.component.gantry.v1.Status",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:2,name:"lengths_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"is_moving",kind:"scalar",T:8}]),hs=s.makeMessageType("viam.component.gantry.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Km=s.makeMessageType("viam.component.gantry.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),oS=Object.freeze(Object.defineProperty({__proto__:null,GetLengthsRequest:ys,GetLengthsResponse:Hm,GetPositionRequest:gs,GetPositionResponse:$m,HomeRequest:ks,HomeResponse:Wm,IsMovingRequest:hs,IsMovingResponse:Km,MoveToPositionRequest:Ts,MoveToPositionResponse:Ym,Status:sS,StopRequest:vs,StopResponse:jm},Symbol.toStringTag,{value:"Module"})),Xm={typeName:"viam.component.gantry.v1.GantryService",methods:{getPosition:{name:"GetPosition",I:gs,O:$m,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:Ts,O:Ym,kind:m.Unary},home:{name:"Home",I:ks,O:Wm,kind:m.Unary},getLengths:{name:"GetLengths",I:ys,O:Hm,kind:m.Unary},stop:{name:"Stop",I:vs,O:jm,kind:m.Unary},isMoving:{name:"IsMoving",I:hs,O:Km,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getKinematics:{name:"GetKinematics",I:qn,O:Pa,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},fs={typeName:"viam.component.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},iS=Object.freeze(Object.defineProperty({__proto__:null,GenericService:fs},Symbol.toStringTag,{value:"Module"})),Rs=s.makeMessageType("viam.component.gripper.v1.OpenRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Qm=s.makeMessageType("viam.component.gripper.v1.OpenResponse",[]),_s=s.makeMessageType("viam.component.gripper.v1.GrabRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zm=s.makeMessageType("viam.component.gripper.v1.GrabResponse",()=>[{no:1,name:"success",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Ss=s.makeMessageType("viam.component.gripper.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ec=s.makeMessageType("viam.component.gripper.v1.StopResponse",[]),Is=s.makeMessageType("viam.component.gripper.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),nc=s.makeMessageType("viam.component.gripper.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),Os=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ac=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingResponse",()=>[{no:1,name:"is_holding_something",kind:"scalar",T:8},{no:99,name:"meta",kind:"message",T:p}]),bs=s.makeMessageType("viam.component.gripper.v1.GetCurrentInputsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),tc=s.makeMessageType("viam.component.gripper.v1.GetCurrentInputsResponse",()=>[{no:1,name:"values",kind:"scalar",T:1,repeated:!0}]),Ms=s.makeMessageType("viam.component.gripper.v1.GoToInputsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"values",kind:"scalar",T:1,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),sc=s.makeMessageType("viam.component.gripper.v1.GoToInputsResponse",[]),rS=Object.freeze(Object.defineProperty({__proto__:null,GetCurrentInputsRequest:bs,GetCurrentInputsResponse:tc,GoToInputsRequest:Ms,GoToInputsResponse:sc,GrabRequest:_s,GrabResponse:Zm,IsHoldingSomethingRequest:Os,IsHoldingSomethingResponse:ac,IsMovingRequest:Is,IsMovingResponse:nc,OpenRequest:Rs,OpenResponse:Qm,StopRequest:Ss,StopResponse:ec},Symbol.toStringTag,{value:"Module"})),oc={typeName:"viam.component.gripper.v1.GripperService",methods:{open:{name:"Open",I:Rs,O:Qm,kind:m.Unary},grab:{name:"Grab",I:_s,O:Zm,kind:m.Unary},stop:{name:"Stop",I:Ss,O:ec,kind:m.Unary},isMoving:{name:"IsMoving",I:Is,O:nc,kind:m.Unary},isHoldingSomething:{name:"IsHoldingSomething",I:Os,O:ac,kind:m.Unary},getCurrentInputs:{name:"GetCurrentInputs",I:bs,O:tc,kind:m.Unary},goToInputs:{name:"GoToInputs",I:Ms,O:sc,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},getKinematics:{name:"GetKinematics",I:qn,O:Pa,kind:m.Unary}}},ic=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),rc=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsResponse",()=>[{no:1,name:"controls",kind:"scalar",T:9,repeated:!0}]),Es=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),mc=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsResponse",()=>[{no:1,name:"events",kind:"message",T:xn,repeated:!0}]),ws=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"event",kind:"message",T:xn},{no:99,name:"extra",kind:"message",T:p}]),cc=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventResponse",[]),xn=s.makeMessageType("viam.component.inputcontroller.v1.Event",()=>[{no:1,name:"time",kind:"message",T:_},{no:2,name:"event",kind:"scalar",T:9},{no:3,name:"control",kind:"scalar",T:9},{no:4,name:"value",kind:"scalar",T:1}]),lc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"events",kind:"message",T:dc,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),dc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest.Events",()=>[{no:1,name:"control",kind:"scalar",T:9},{no:2,name:"events",kind:"scalar",T:9,repeated:!0},{no:3,name:"cancelled_events",kind:"scalar",T:9,repeated:!0}],{localName:"StreamEventsRequest_Events"}),pc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsResponse",()=>[{no:1,name:"event",kind:"message",T:xn}]),uc=Object.freeze(Object.defineProperty({__proto__:null,Event:xn,GetControlsRequest:ic,GetControlsResponse:rc,GetEventsRequest:Es,GetEventsResponse:mc,Status:s.makeMessageType("viam.component.inputcontroller.v1.Status",()=>[{no:1,name:"events",kind:"message",T:xn,repeated:!0}]),StreamEventsRequest:lc,StreamEventsRequest_Events:dc,StreamEventsResponse:pc,TriggerEventRequest:ws,TriggerEventResponse:cc},Symbol.toStringTag,{value:"Module"})),gc={typeName:"viam.component.inputcontroller.v1.InputControllerService",methods:{getControls:{name:"GetControls",I:ic,O:rc,kind:m.Unary},getEvents:{name:"GetEvents",I:Es,O:mc,kind:m.Unary},streamEvents:{name:"StreamEvents",I:lc,O:pc,kind:m.ServerStreaming},triggerEvent:{name:"TriggerEvent",I:ws,O:cc,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},Cs=s.makeMessageType("viam.component.motor.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),Tc=s.makeMessageType("viam.component.motor.v1.SetPowerResponse",[]),Ns=s.makeMessageType("viam.component.motor.v1.GoForRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),kc=s.makeMessageType("viam.component.motor.v1.GoForResponse",[]),Ps=s.makeMessageType("viam.component.motor.v1.GoToRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"position_revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),yc=s.makeMessageType("viam.component.motor.v1.GoToResponse",[]),Ds=s.makeMessageType("viam.component.motor.v1.SetRPMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),vc=s.makeMessageType("viam.component.motor.v1.SetRPMResponse",[]),As=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"offset",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),hc=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionResponse",[]),Us=s.makeMessageType("viam.component.motor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),fc=s.makeMessageType("viam.component.motor.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:1}]),qs=s.makeMessageType("viam.component.motor.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Rc=s.makeMessageType("viam.component.motor.v1.StopResponse",[]),Ls=s.makeMessageType("viam.component.motor.v1.IsPoweredRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_c=s.makeMessageType("viam.component.motor.v1.IsPoweredResponse",()=>[{no:1,name:"is_on",kind:"scalar",T:8},{no:2,name:"power_pct",kind:"scalar",T:1}]),Gs=s.makeMessageType("viam.component.motor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Sc=s.makeMessageType("viam.component.motor.v1.GetPropertiesResponse",()=>[{no:1,name:"position_reporting",kind:"scalar",T:8}]),mS=s.makeMessageType("viam.component.motor.v1.Status",()=>[{no:1,name:"is_powered",kind:"scalar",T:8},{no:3,name:"position",kind:"scalar",T:1},{no:4,name:"is_moving",kind:"scalar",T:8}]),Bs=s.makeMessageType("viam.component.motor.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Ic=s.makeMessageType("viam.component.motor.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),cS=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Us,GetPositionResponse:fc,GetPropertiesRequest:Gs,GetPropertiesResponse:Sc,GoForRequest:Ns,GoForResponse:kc,GoToRequest:Ps,GoToResponse:yc,IsMovingRequest:Bs,IsMovingResponse:Ic,IsPoweredRequest:Ls,IsPoweredResponse:_c,ResetZeroPositionRequest:As,ResetZeroPositionResponse:hc,SetPowerRequest:Cs,SetPowerResponse:Tc,SetRPMRequest:Ds,SetRPMResponse:vc,Status:mS,StopRequest:qs,StopResponse:Rc},Symbol.toStringTag,{value:"Module"})),Oc={typeName:"viam.component.motor.v1.MotorService",methods:{setPower:{name:"SetPower",I:Cs,O:Tc,kind:m.Unary},goFor:{name:"GoFor",I:Ns,O:kc,kind:m.Unary},goTo:{name:"GoTo",I:Ps,O:yc,kind:m.Unary},setRPM:{name:"SetRPM",I:Ds,O:vc,kind:m.Unary},resetZeroPosition:{name:"ResetZeroPosition",I:As,O:hc,kind:m.Unary},getPosition:{name:"GetPosition",I:Us,O:fc,kind:m.Unary},getProperties:{name:"GetProperties",I:Gs,O:Sc,kind:m.Unary},stop:{name:"Stop",I:qs,O:Rc,kind:m.Unary},isPowered:{name:"IsPowered",I:Ls,O:_c,kind:m.Unary},isMoving:{name:"IsMoving",I:Bs,O:Ic,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},Fs=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),bc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityResponse",()=>[{no:1,name:"linear_velocity",kind:"message",T:ke}]),xs=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Mc=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityResponse",()=>[{no:1,name:"angular_velocity",kind:"message",T:ke}]),Js=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ec=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingResponse",()=>[{no:1,name:"value",kind:"scalar",T:1}]),zs=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wc=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationResponse",()=>[{no:1,name:"orientation",kind:"message",T:Dt}]),Vs=s.makeMessageType("viam.component.movementsensor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Cc=s.makeMessageType("viam.component.movementsensor.v1.GetPositionResponse",()=>[{no:1,name:"coordinate",kind:"message",T:je},{no:2,name:"altitude_m",kind:"scalar",T:2}]),$s=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Nc=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesResponse",()=>[{no:1,name:"linear_velocity_supported",kind:"scalar",T:8},{no:2,name:"angular_velocity_supported",kind:"scalar",T:8},{no:3,name:"orientation_supported",kind:"scalar",T:8},{no:4,name:"position_supported",kind:"scalar",T:8},{no:5,name:"compass_heading_supported",kind:"scalar",T:8},{no:6,name:"linear_acceleration_supported",kind:"scalar",T:8}]),Ys=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pc=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyResponse",()=>[{no:1,name:"accuracy",kind:"map",K:9,V:{kind:"scalar",T:2}},{no:2,name:"position_hdop",kind:"scalar",T:2,opt:!0},{no:3,name:"position_vdop",kind:"scalar",T:2,opt:!0},{no:4,name:"position_nmea_gga_fix",kind:"scalar",T:5,opt:!0},{no:5,name:"compass_degrees_error",kind:"scalar",T:2,opt:!0}]),Ws=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Dc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationResponse",()=>[{no:1,name:"linear_acceleration",kind:"message",T:ke}]),Ac=Object.freeze(Object.defineProperty({__proto__:null,GetAccuracyRequest:Ys,GetAccuracyResponse:Pc,GetAngularVelocityRequest:xs,GetAngularVelocityResponse:Mc,GetCompassHeadingRequest:Js,GetCompassHeadingResponse:Ec,GetLinearAccelerationRequest:Ws,GetLinearAccelerationResponse:Dc,GetLinearVelocityRequest:Fs,GetLinearVelocityResponse:bc,GetOrientationRequest:zs,GetOrientationResponse:wc,GetPositionRequest:Vs,GetPositionResponse:Cc,GetPropertiesRequest:$s,GetPropertiesResponse:Nc},Symbol.toStringTag,{value:"Module"})),Uc={typeName:"viam.component.movementsensor.v1.MovementSensorService",methods:{getLinearVelocity:{name:"GetLinearVelocity",I:Fs,O:bc,kind:m.Unary},getAngularVelocity:{name:"GetAngularVelocity",I:xs,O:Mc,kind:m.Unary},getCompassHeading:{name:"GetCompassHeading",I:Js,O:Ec,kind:m.Unary},getOrientation:{name:"GetOrientation",I:zs,O:wc,kind:m.Unary},getPosition:{name:"GetPosition",I:Vs,O:Cc,kind:m.Unary},getProperties:{name:"GetProperties",I:$s,O:Nc,kind:m.Unary},getAccuracy:{name:"GetAccuracy",I:Ys,O:Pc,kind:m.Unary},getLinearAcceleration:{name:"GetLinearAcceleration",I:Ws,O:Dc,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},getReadings:{name:"GetReadings",I:tn,O:Da,kind:m.Unary}}},Hs=s.makeMessageType("viam.component.powersensor.v1.GetVoltageRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),qc=s.makeMessageType("viam.component.powersensor.v1.GetVoltageResponse",()=>[{no:1,name:"volts",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),js=s.makeMessageType("viam.component.powersensor.v1.GetCurrentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Lc=s.makeMessageType("viam.component.powersensor.v1.GetCurrentResponse",()=>[{no:1,name:"amperes",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),Ks=s.makeMessageType("viam.component.powersensor.v1.GetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Gc=s.makeMessageType("viam.component.powersensor.v1.GetPowerResponse",()=>[{no:1,name:"watts",kind:"scalar",T:1}]),lS=Object.freeze(Object.defineProperty({__proto__:null,GetCurrentRequest:js,GetCurrentResponse:Lc,GetPowerRequest:Ks,GetPowerResponse:Gc,GetVoltageRequest:Hs,GetVoltageResponse:qc},Symbol.toStringTag,{value:"Module"})),Bc={typeName:"viam.component.powersensor.v1.PowerSensorService",methods:{getVoltage:{name:"GetVoltage",I:Hs,O:qc,kind:m.Unary},getCurrent:{name:"GetCurrent",I:js,O:Lc,kind:m.Unary},getPower:{name:"GetPower",I:Ks,O:Gc,kind:m.Unary},getReadings:{name:"GetReadings",I:tn,O:Da,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},Xs=s.makeMessageType("viam.component.servo.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),Fc=s.makeMessageType("viam.component.servo.v1.MoveResponse",[]),Qs=s.makeMessageType("viam.component.servo.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xc=s.makeMessageType("viam.component.servo.v1.GetPositionResponse",()=>[{no:1,name:"position_deg",kind:"scalar",T:13}]),Zs=s.makeMessageType("viam.component.servo.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Jc=s.makeMessageType("viam.component.servo.v1.StopResponse",[]),dS=s.makeMessageType("viam.component.servo.v1.Status",()=>[{no:1,name:"position_deg",kind:"scalar",T:13},{no:2,name:"is_moving",kind:"scalar",T:8}]),eo=s.makeMessageType("viam.component.servo.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),zc=s.makeMessageType("viam.component.servo.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),pS=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Qs,GetPositionResponse:xc,IsMovingRequest:eo,IsMovingResponse:zc,MoveRequest:Xs,MoveResponse:Fc,Status:dS,StopRequest:Zs,StopResponse:Jc},Symbol.toStringTag,{value:"Module"})),Vc={typeName:"viam.component.servo.v1.ServoService",methods:{move:{name:"Move",I:Xs,O:Fc,kind:m.Unary},getPosition:{name:"GetPosition",I:Qs,O:xc,kind:m.Unary},stop:{name:"Stop",I:Zs,O:Jc,kind:m.Unary},isMoving:{name:"IsMoving",I:eo,O:zc,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},$c=s.makeMessageType("opentelemetry.proto.common.v1.AnyValue",()=>[{no:1,name:"string_value",kind:"scalar",T:9,oneof:"value"},{no:2,name:"bool_value",kind:"scalar",T:8,oneof:"value"},{no:3,name:"int_value",kind:"scalar",T:3,oneof:"value"},{no:4,name:"double_value",kind:"scalar",T:1,oneof:"value"},{no:5,name:"array_value",kind:"message",T:uS,oneof:"value"},{no:6,name:"kvlist_value",kind:"message",T:gS,oneof:"value"},{no:7,name:"bytes_value",kind:"scalar",T:12,oneof:"value"},{no:8,name:"string_value_strindex",kind:"scalar",T:5,oneof:"value"}]),uS=s.makeMessageType("opentelemetry.proto.common.v1.ArrayValue",()=>[{no:1,name:"values",kind:"message",T:$c,repeated:!0}]),gS=s.makeMessageType("opentelemetry.proto.common.v1.KeyValueList",()=>[{no:1,name:"values",kind:"message",T:yn,repeated:!0}]),yn=s.makeMessageType("opentelemetry.proto.common.v1.KeyValue",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:$c},{no:3,name:"key_strindex",kind:"scalar",T:5}]),TS=s.makeMessageType("opentelemetry.proto.common.v1.InstrumentationScope",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yn,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}]),kS=s.makeMessageType("opentelemetry.proto.common.v1.EntityRef",()=>[{no:1,name:"schema_url",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id_keys",kind:"scalar",T:9,repeated:!0},{no:4,name:"description_keys",kind:"scalar",T:9,repeated:!0}]),yS=s.makeMessageType("opentelemetry.proto.resource.v1.Resource",()=>[{no:1,name:"attributes",kind:"message",T:yn,repeated:!0},{no:2,name:"dropped_attributes_count",kind:"scalar",T:13},{no:3,name:"entity_refs",kind:"message",T:kS,repeated:!0}]),vS=s.makeMessageType("opentelemetry.proto.trace.v1.ResourceSpans",()=>[{no:1,name:"resource",kind:"message",T:yS},{no:2,name:"scope_spans",kind:"message",T:hS,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),hS=s.makeMessageType("opentelemetry.proto.trace.v1.ScopeSpans",()=>[{no:1,name:"scope",kind:"message",T:TS},{no:2,name:"spans",kind:"message",T:fS,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),fS=s.makeMessageType("opentelemetry.proto.trace.v1.Span",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"parent_span_id",kind:"scalar",T:12},{no:16,name:"flags",kind:"scalar",T:7},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"kind",kind:"enum",T:s.getEnumType(RS)},{no:7,name:"start_time_unix_nano",kind:"scalar",T:6},{no:8,name:"end_time_unix_nano",kind:"scalar",T:6},{no:9,name:"attributes",kind:"message",T:yn,repeated:!0},{no:10,name:"dropped_attributes_count",kind:"scalar",T:13},{no:11,name:"events",kind:"message",T:_S,repeated:!0},{no:12,name:"dropped_events_count",kind:"scalar",T:13},{no:13,name:"links",kind:"message",T:SS,repeated:!0},{no:14,name:"dropped_links_count",kind:"scalar",T:13},{no:15,name:"status",kind:"message",T:IS}]),RS=s.makeEnum("opentelemetry.proto.trace.v1.Span.SpanKind",[{no:0,name:"SPAN_KIND_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SPAN_KIND_INTERNAL",localName:"INTERNAL"},{no:2,name:"SPAN_KIND_SERVER",localName:"SERVER"},{no:3,name:"SPAN_KIND_CLIENT",localName:"CLIENT"},{no:4,name:"SPAN_KIND_PRODUCER",localName:"PRODUCER"},{no:5,name:"SPAN_KIND_CONSUMER",localName:"CONSUMER"}]),_S=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Event",()=>[{no:1,name:"time_unix_nano",kind:"scalar",T:6},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yn,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}],{localName:"Span_Event"}),SS=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Link",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:yn,repeated:!0},{no:5,name:"dropped_attributes_count",kind:"scalar",T:13},{no:6,name:"flags",kind:"scalar",T:7}],{localName:"Span_Link"}),IS=s.makeMessageType("opentelemetry.proto.trace.v1.Status",()=>[{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"code",kind:"enum",T:s.getEnumType(OS)}]),OS=s.makeEnum("opentelemetry.proto.trace.v1.Status.StatusCode",[{no:0,name:"STATUS_CODE_UNSET",localName:"UNSET"},{no:1,name:"STATUS_CODE_OK",localName:"OK"},{no:2,name:"STATUS_CODE_ERROR",localName:"ERROR"}]),Yc=s.makeEnum("viam.robot.v1.PeerConnectionType",[{no:0,name:"PEER_CONNECTION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PEER_CONNECTION_TYPE_GRPC",localName:"GRPC"},{no:2,name:"PEER_CONNECTION_TYPE_WEBRTC",localName:"WEBRTC"}]),Wc=s.makeMessageType("viam.robot.v1.SendTracesRequest",()=>[{no:1,name:"resource_spans",kind:"message",T:vS,repeated:!0}]),Hc=s.makeMessageType("viam.robot.v1.SendTracesResponse",[]),jc=s.makeMessageType("viam.robot.v1.TunnelRequest",()=>[{no:1,name:"destination_port",kind:"scalar",T:13},{no:2,name:"data",kind:"scalar",T:12}]),Kc=s.makeMessageType("viam.robot.v1.TunnelResponse",()=>[{no:1,name:"data",kind:"scalar",T:12}]),Xc=s.makeMessageType("viam.robot.v1.ListTunnelsRequest",[]),Qc=s.makeMessageType("viam.robot.v1.ListTunnelsResponse",()=>[{no:1,name:"tunnels",kind:"message",T:Zc,repeated:!0}]),Zc=s.makeMessageType("viam.robot.v1.Tunnel",()=>[{no:1,name:"port",kind:"scalar",T:13},{no:2,name:"connection_timeout",kind:"message",T:J}]),el=s.makeMessageType("viam.robot.v1.FrameSystemConfig",()=>[{no:1,name:"frame",kind:"message",T:xe},{no:2,name:"kinematics",kind:"message",T:p}]),nl=s.makeMessageType("viam.robot.v1.FrameSystemConfigRequest",()=>[{no:1,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0}]),al=s.makeMessageType("viam.robot.v1.FrameSystemConfigResponse",()=>[{no:1,name:"frame_system_configs",kind:"message",T:el,repeated:!0}]),no=s.makeMessageType("viam.robot.v1.TransformPoseRequest",()=>[{no:1,name:"source",kind:"message",T:He},{no:2,name:"destination",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0}]),tl=s.makeMessageType("viam.robot.v1.TransformPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:He}]),ao=s.makeMessageType("viam.robot.v1.TransformPCDRequest",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12},{no:2,name:"source",kind:"scalar",T:9},{no:3,name:"destination",kind:"scalar",T:9}]),sl=s.makeMessageType("viam.robot.v1.TransformPCDResponse",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12}]),ol=s.makeMessageType("viam.robot.v1.ResourceNamesRequest",[]),il=s.makeMessageType("viam.robot.v1.ResourceNamesResponse",()=>[{no:1,name:"resources",kind:"message",T:z,repeated:!0}]),rl=s.makeMessageType("viam.robot.v1.ResourceRPCSubtype",()=>[{no:1,name:"subtype",kind:"message",T:z},{no:2,name:"proto_service",kind:"scalar",T:9}]),ml=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesRequest",[]),cl=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesResponse",()=>[{no:1,name:"resource_rpc_subtypes",kind:"message",T:rl,repeated:!0}]),ll=s.makeMessageType("viam.robot.v1.Operation",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"method",kind:"scalar",T:9},{no:3,name:"arguments",kind:"message",T:p},{no:4,name:"started",kind:"message",T:_},{no:5,name:"session_id",kind:"scalar",T:9,opt:!0}]),dl=s.makeMessageType("viam.robot.v1.GetOperationsRequest",[]),pl=s.makeMessageType("viam.robot.v1.GetOperationsResponse",()=>[{no:1,name:"operations",kind:"message",T:ll,repeated:!0}]),ul=s.makeMessageType("viam.robot.v1.CancelOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),gl=s.makeMessageType("viam.robot.v1.CancelOperationResponse",[]),Tl=s.makeMessageType("viam.robot.v1.BlockForOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),kl=s.makeMessageType("viam.robot.v1.BlockForOperationResponse",[]),yl=s.makeMessageType("viam.robot.v1.PeerConnectionInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Yc)},{no:2,name:"remote_address",kind:"scalar",T:9,opt:!0},{no:3,name:"local_address",kind:"scalar",T:9,opt:!0}]),vl=s.makeMessageType("viam.robot.v1.Session",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"peer_connection_info",kind:"message",T:yl,opt:!0}]),hl=s.makeMessageType("viam.robot.v1.GetSessionsRequest",[]),fl=s.makeMessageType("viam.robot.v1.GetSessionsResponse",()=>[{no:1,name:"sessions",kind:"message",T:vl,repeated:!0}]),Rl=s.makeMessageType("viam.robot.v1.ModuleModel",()=>[{no:1,name:"module_name",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"api",kind:"scalar",T:9},{no:4,name:"from_local_module",kind:"scalar",T:8}]),to=s.makeMessageType("viam.robot.v1.GetModelsFromModulesRequest",[]),_l=s.makeMessageType("viam.robot.v1.GetModelsFromModulesResponse",()=>[{no:1,name:"models",kind:"message",T:Rl,repeated:!0}]),so=s.makeMessageType("viam.robot.v1.Status",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"status",kind:"message",T:p},{no:3,name:"last_reconfigured",kind:"message",T:_}]),Sl=s.makeMessageType("viam.robot.v1.GetStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:z,repeated:!0}]),Il=s.makeMessageType("viam.robot.v1.GetStatusResponse",()=>[{no:1,name:"status",kind:"message",T:so,repeated:!0}]),Ol=s.makeMessageType("viam.robot.v1.StreamStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:z,repeated:!0},{no:2,name:"every",kind:"message",T:J}]),bl=s.makeMessageType("viam.robot.v1.StreamStatusResponse",()=>[{no:1,name:"status",kind:"message",T:so,repeated:!0}]),Ml=s.makeMessageType("viam.robot.v1.StopExtraParameters",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"params",kind:"message",T:p}]),El=s.makeMessageType("viam.robot.v1.StopAllRequest",()=>[{no:99,name:"extra",kind:"message",T:Ml,repeated:!0}]),wl=s.makeMessageType("viam.robot.v1.StopAllResponse",[]),oo=s.makeMessageType("viam.robot.v1.StartSessionRequest",()=>[{no:1,name:"resume",kind:"scalar",T:9}]),Cl=s.makeMessageType("viam.robot.v1.StartSessionResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"heartbeat_window",kind:"message",T:J}]),io=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Nl=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatResponse",[]),Pl=s.makeMessageType("viam.robot.v1.LogRequest",()=>[{no:1,name:"logs",kind:"message",T:Ln,repeated:!0}]),Dl=s.makeMessageType("viam.robot.v1.LogResponse",[]),Al=s.makeMessageType("viam.robot.v1.GetCloudMetadataRequest",[]),ro=s.makeMessageType("viam.robot.v1.GetCloudMetadataResponse",()=>[{no:2,name:"primary_org_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9},{no:4,name:"machine_id",kind:"scalar",T:9},{no:5,name:"machine_part_id",kind:"scalar",T:9}]),mo=s.makeMessageType("viam.robot.v1.RestartModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9,oneof:"id_or_name"},{no:2,name:"module_name",kind:"scalar",T:9,oneof:"id_or_name"}]),Ul=s.makeMessageType("viam.robot.v1.RestartModuleResponse",[]),ql=s.makeMessageType("viam.robot.v1.ShutdownRequest",[]),Ll=s.makeMessageType("viam.robot.v1.ShutdownResponse",[]),Gl=s.makeMessageType("viam.robot.v1.GetMachineStatusRequest",[]),Bl=s.makeMessageType("viam.robot.v1.GetMachineStatusResponse",()=>[{no:1,name:"resources",kind:"message",T:Jl,repeated:!0},{no:2,name:"config",kind:"message",T:Vl},{no:3,name:"state",kind:"enum",T:s.getEnumType(Fl)},{no:4,name:"job_statuses",kind:"message",T:xl,repeated:!0}]),Fl=s.makeEnum("viam.robot.v1.GetMachineStatusResponse.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_INITIALIZING",localName:"INITIALIZING"},{no:2,name:"STATE_RUNNING",localName:"RUNNING"}]),xl=s.makeMessageType("viam.robot.v1.JobStatus",()=>[{no:1,name:"job_name",kind:"scalar",T:9},{no:2,name:"recent_successful_runs",kind:"message",T:_,repeated:!0},{no:3,name:"recent_failed_runs",kind:"message",T:_,repeated:!0}]),Jl=s.makeMessageType("viam.robot.v1.ResourceStatus",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"state",kind:"enum",T:s.getEnumType(zl)},{no:3,name:"last_updated",kind:"message",T:_},{no:4,name:"revision",kind:"scalar",T:9},{no:5,name:"error",kind:"scalar",T:9},{no:6,name:"cloud_metadata",kind:"message",T:ro,opt:!0}]),zl=s.makeEnum("viam.robot.v1.ResourceStatus.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_UNCONFIGURED",localName:"UNCONFIGURED"},{no:2,name:"STATE_CONFIGURING",localName:"CONFIGURING"},{no:3,name:"STATE_READY",localName:"READY"},{no:4,name:"STATE_REMOVING",localName:"REMOVING"},{no:5,name:"STATE_UNHEALTHY",localName:"UNHEALTHY"}]),Vl=s.makeMessageType("viam.robot.v1.ConfigStatus",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"last_updated",kind:"message",T:_}]),$l=s.makeMessageType("viam.robot.v1.GetVersionRequest",[]),Yl=s.makeMessageType("viam.robot.v1.GetVersionResponse",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"api_version",kind:"scalar",T:9}]),co=s.makeMessageType("viam.robot.v1.GetPoseRequest",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"destination_frame",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Wl=s.makeMessageType("viam.robot.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:He}]),bS=Object.freeze(Object.defineProperty({__proto__:null,BlockForOperationRequest:Tl,BlockForOperationResponse:kl,CancelOperationRequest:ul,CancelOperationResponse:gl,ConfigStatus:Vl,FrameSystemConfig:el,FrameSystemConfigRequest:nl,FrameSystemConfigResponse:al,GetCloudMetadataRequest:Al,GetCloudMetadataResponse:ro,GetMachineStatusRequest:Gl,GetMachineStatusResponse:Bl,GetMachineStatusResponse_State:Fl,GetModelsFromModulesRequest:to,GetModelsFromModulesResponse:_l,GetOperationsRequest:dl,GetOperationsResponse:pl,GetPoseRequest:co,GetPoseResponse:Wl,GetSessionsRequest:hl,GetSessionsResponse:fl,GetStatusRequest:Sl,GetStatusResponse:Il,GetVersionRequest:$l,GetVersionResponse:Yl,JobStatus:xl,ListTunnelsRequest:Xc,ListTunnelsResponse:Qc,LogRequest:Pl,LogResponse:Dl,ModuleModel:Rl,Operation:ll,PeerConnectionInfo:yl,PeerConnectionType:Yc,ResourceNamesRequest:ol,ResourceNamesResponse:il,ResourceRPCSubtype:rl,ResourceRPCSubtypesRequest:ml,ResourceRPCSubtypesResponse:cl,ResourceStatus:Jl,ResourceStatus_State:zl,RestartModuleRequest:mo,RestartModuleResponse:Ul,SendSessionHeartbeatRequest:io,SendSessionHeartbeatResponse:Nl,SendTracesRequest:Wc,SendTracesResponse:Hc,Session:vl,ShutdownRequest:ql,ShutdownResponse:Ll,StartSessionRequest:oo,StartSessionResponse:Cl,Status:so,StopAllRequest:El,StopAllResponse:wl,StopExtraParameters:Ml,StreamStatusRequest:Ol,StreamStatusResponse:bl,TransformPCDRequest:ao,TransformPCDResponse:sl,TransformPoseRequest:no,TransformPoseResponse:tl,Tunnel:Zc,TunnelRequest:jc,TunnelResponse:Kc},Symbol.toStringTag,{value:"Module"})),lo={typeName:"viam.robot.v1.RobotService",methods:{getOperations:{name:"GetOperations",I:dl,O:pl,kind:m.Unary},getSessions:{name:"GetSessions",I:hl,O:fl,kind:m.Unary},resourceNames:{name:"ResourceNames",I:ol,O:il,kind:m.Unary},resourceRPCSubtypes:{name:"ResourceRPCSubtypes",I:ml,O:cl,kind:m.Unary},cancelOperation:{name:"CancelOperation",I:ul,O:gl,kind:m.Unary},blockForOperation:{name:"BlockForOperation",I:Tl,O:kl,kind:m.Unary},getModelsFromModules:{name:"GetModelsFromModules",I:to,O:_l,kind:m.Unary},getStatus:{name:"GetStatus",I:Sl,O:Il,kind:m.Unary},streamStatus:{name:"StreamStatus",I:Ol,O:bl,kind:m.ServerStreaming},stopAll:{name:"StopAll",I:El,O:wl,kind:m.Unary},startSession:{name:"StartSession",I:oo,O:Cl,kind:m.Unary},sendSessionHeartbeat:{name:"SendSessionHeartbeat",I:io,O:Nl,kind:m.Unary},log:{name:"Log",I:Pl,O:Dl,kind:m.Unary},getCloudMetadata:{name:"GetCloudMetadata",I:Al,O:ro,kind:m.Unary},restartModule:{name:"RestartModule",I:mo,O:Ul,kind:m.Unary},shutdown:{name:"Shutdown",I:ql,O:Ll,kind:m.Unary},getMachineStatus:{name:"GetMachineStatus",I:Gl,O:Bl,kind:m.Unary},getVersion:{name:"GetVersion",I:$l,O:Yl,kind:m.Unary},tunnel:{name:"Tunnel",I:jc,O:Kc,kind:m.BiDiStreaming},listTunnels:{name:"ListTunnels",I:Xc,O:Qc,kind:m.Unary},frameSystemConfig:{name:"FrameSystemConfig",I:nl,O:al,kind:m.Unary},getPose:{name:"GetPose",I:co,O:Wl,kind:m.Unary},transformPose:{name:"TransformPose",I:no,O:tl,kind:m.Unary},transformPCD:{name:"TransformPCD",I:ao,O:sl,kind:m.Unary},sendTraces:{name:"SendTraces",I:Wc,O:Hc,kind:m.Unary}}},po=s.makeEnum("viam.app.v1.CredentialsType",[{no:0,name:"CREDENTIALS_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CREDENTIALS_TYPE_INTERNAL",localName:"INTERNAL"},{no:2,name:"CREDENTIALS_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"CREDENTIALS_TYPE_ROBOT_SECRET",localName:"ROBOT_SECRET"},{no:4,name:"CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET",localName:"ROBOT_LOCATION_SECRET"}]),Hl=s.makeMessageType("viam.app.v1.RobotConfig",()=>[{no:1,name:"cloud",kind:"message",T:Zl},{no:2,name:"remotes",kind:"message",T:yd,repeated:!0},{no:3,name:"components",kind:"message",T:uo,repeated:!0},{no:4,name:"processes",kind:"message",T:ed,repeated:!0},{no:5,name:"services",kind:"message",T:nd,repeated:!0},{no:6,name:"network",kind:"message",T:ad,opt:!0},{no:7,name:"auth",kind:"message",T:od,opt:!0},{no:8,name:"debug",kind:"scalar",T:8,opt:!0},{no:9,name:"modules",kind:"message",T:Rd,repeated:!0},{no:10,name:"disable_partial_start",kind:"scalar",T:8,opt:!0},{no:11,name:"packages",kind:"message",T:_d,repeated:!0},{no:12,name:"overwrite_fragment_status",kind:"message",T:Ua,repeated:!0},{no:13,name:"enable_web_profile",kind:"scalar",T:8},{no:14,name:"log",kind:"message",T:jl,repeated:!0},{no:15,name:"revision",kind:"scalar",T:9},{no:16,name:"maintenance",kind:"message",T:Sd,opt:!0},{no:17,name:"disable_log_deduplication",kind:"scalar",T:8},{no:18,name:"jobs",kind:"message",T:Kl,repeated:!0},{no:19,name:"tracing",kind:"message",T:Xl,opt:!0}]),jl=s.makeMessageType("viam.app.v1.LogPatternConfig",()=>[{no:1,name:"pattern",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9}]),Kl=s.makeMessageType("viam.app.v1.JobConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"schedule",kind:"scalar",T:9},{no:3,name:"resource",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:5,name:"command",kind:"message",T:p},{no:6,name:"log_configuration",kind:"message",T:La}]),Xl=s.makeMessageType("viam.app.v1.TracingConfig",()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"disk",kind:"scalar",T:8},{no:3,name:"console",kind:"scalar",T:8},{no:4,name:"otlp_endpoint",kind:"scalar",T:9}]),Ql=s.makeMessageType("viam.app.v1.LocationSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9}]),Ua=s.makeMessageType("viam.app.v1.AppValidationStatus",()=>[{no:1,name:"error",kind:"scalar",T:9}]),Zl=s.makeMessageType("viam.app.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"fqdn",kind:"scalar",T:9},{no:3,name:"local_fqdn",kind:"scalar",T:9},{no:4,name:"managed_by",kind:"scalar",T:9},{no:5,name:"signaling_address",kind:"scalar",T:9},{no:6,name:"signaling_insecure",kind:"scalar",T:8},{no:7,name:"location_secret",kind:"scalar",T:9},{no:8,name:"secret",kind:"scalar",T:9},{no:9,name:"location_secrets",kind:"message",T:Ql,repeated:!0},{no:10,name:"primary_org_id",kind:"scalar",T:9},{no:11,name:"location_id",kind:"scalar",T:9},{no:12,name:"machine_id",kind:"scalar",T:9}]),uo=s.makeMessageType("viam.app.v1.ComponentConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"model",kind:"scalar",T:9},{no:5,name:"frame",kind:"message",T:go},{no:6,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:7,name:"service_configs",kind:"message",T:qa,repeated:!0},{no:8,name:"attributes",kind:"message",T:p},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"log_configuration",kind:"message",T:La}]),qa=s.makeMessageType("viam.app.v1.ResourceLevelServiceConfig",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:p}]),ed=s.makeMessageType("viam.app.v1.ProcessConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"args",kind:"scalar",T:9,repeated:!0},{no:4,name:"cwd",kind:"scalar",T:9},{no:5,name:"one_shot",kind:"scalar",T:8},{no:6,name:"log",kind:"scalar",T:8},{no:7,name:"stop_signal",kind:"scalar",T:5},{no:8,name:"stop_timeout",kind:"message",T:J},{no:9,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:10,name:"username",kind:"scalar",T:9}]),nd=s.makeMessageType("viam.app.v1.ServiceConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:p},{no:5,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:6,name:"model",kind:"scalar",T:9},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"service_configs",kind:"message",T:qa,repeated:!0},{no:11,name:"log_configuration",kind:"message",T:La}]),ad=s.makeMessageType("viam.app.v1.NetworkConfig",()=>[{no:1,name:"fqdn",kind:"scalar",T:9},{no:2,name:"bind_address",kind:"scalar",T:9},{no:3,name:"tls_cert_file",kind:"scalar",T:9},{no:4,name:"tls_key_file",kind:"scalar",T:9},{no:5,name:"sessions",kind:"message",T:td},{no:6,name:"traffic_tunnel_endpoints",kind:"message",T:sd,repeated:!0},{no:7,name:"no_tls",kind:"scalar",T:8}]),td=s.makeMessageType("viam.app.v1.SessionsConfig",()=>[{no:1,name:"heartbeat_window",kind:"message",T:J}]),sd=s.makeMessageType("viam.app.v1.TrafficTunnelEndpoint",()=>[{no:1,name:"port",kind:"scalar",T:5},{no:2,name:"connection_timeout",kind:"message",T:J}]),od=s.makeMessageType("viam.app.v1.AuthConfig",()=>[{no:1,name:"handlers",kind:"message",T:md,repeated:!0},{no:2,name:"tls_auth_entities",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_auth_config",kind:"message",T:rd,opt:!0}]),id=s.makeMessageType("viam.app.v1.JWKSFile",()=>[{no:1,name:"json",kind:"message",T:p}]),rd=s.makeMessageType("viam.app.v1.ExternalAuthConfig",()=>[{no:1,name:"jwks",kind:"message",T:id}]),md=s.makeMessageType("viam.app.v1.AuthHandlerConfig",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(po)},{no:5,name:"config",kind:"message",T:p}]),go=s.makeMessageType("viam.app.v1.Frame",()=>[{no:1,name:"parent",kind:"scalar",T:9},{no:2,name:"translation",kind:"message",T:cd},{no:3,name:"orientation",kind:"message",T:ld},{no:4,name:"geometry",kind:"message",T:an}]),La=s.makeMessageType("viam.app.v1.LogConfiguration",()=>[{no:1,name:"level",kind:"scalar",T:9}]),cd=s.makeMessageType("viam.app.v1.Translation",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),ld=s.makeMessageType("viam.app.v1.Orientation",()=>[{no:1,name:"no_orientation",kind:"message",T:dd,oneof:"type"},{no:2,name:"vector_radians",kind:"message",T:pd,oneof:"type"},{no:3,name:"vector_degrees",kind:"message",T:ud,oneof:"type"},{no:4,name:"euler_angles",kind:"message",T:gd,oneof:"type"},{no:5,name:"axis_angles",kind:"message",T:Td,oneof:"type"},{no:6,name:"quaternion",kind:"message",T:kd,oneof:"type"}]),dd=s.makeMessageType("viam.app.v1.Orientation.NoOrientation",[],{localName:"Orientation_NoOrientation"}),pd=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorRadians",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorRadians"}),ud=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorDegrees",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorDegrees"}),gd=s.makeMessageType("viam.app.v1.Orientation.EulerAngles",()=>[{no:1,name:"roll",kind:"scalar",T:1},{no:2,name:"pitch",kind:"scalar",T:1},{no:3,name:"yaw",kind:"scalar",T:1}],{localName:"Orientation_EulerAngles"}),Td=s.makeMessageType("viam.app.v1.Orientation.AxisAngles",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_AxisAngles"}),kd=s.makeMessageType("viam.app.v1.Orientation.Quaternion",()=>[{no:1,name:"w",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_Quaternion"}),yd=s.makeMessageType("viam.app.v1.RemoteConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"address",kind:"scalar",T:9},{no:3,name:"frame",kind:"message",T:go},{no:4,name:"auth",kind:"message",T:vd},{no:5,name:"managed_by",kind:"scalar",T:9},{no:6,name:"insecure",kind:"scalar",T:8},{no:7,name:"connection_check_interval",kind:"message",T:J},{no:8,name:"reconnect_interval",kind:"message",T:J},{no:9,name:"service_configs",kind:"message",T:qa,repeated:!0},{no:10,name:"secret",kind:"scalar",T:9},{no:11,name:"prefix",kind:"scalar",T:9}]),vd=s.makeMessageType("viam.app.v1.RemoteAuth",()=>[{no:1,name:"credentials",kind:"message",T:hd},{no:2,name:"entity",kind:"scalar",T:9}]),hd=s.makeMessageType("viam.app.v1.RemoteAuth.Credentials",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(po)},{no:2,name:"payload",kind:"scalar",T:9}],{localName:"RemoteAuth_Credentials"}),fd=s.makeMessageType("viam.app.v1.AgentInfo",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"os",kind:"scalar",T:9},{no:3,name:"ips",kind:"scalar",T:9,repeated:!0},{no:4,name:"version",kind:"scalar",T:9},{no:5,name:"git_revision",kind:"scalar",T:9},{no:6,name:"platform",kind:"scalar",T:9,opt:!0},{no:7,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),MS=s.makeMessageType("viam.app.v1.ConfigRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"agent_info",kind:"message",T:fd,opt:!0}]),ES=s.makeMessageType("viam.app.v1.ConfigResponse",()=>[{no:1,name:"config",kind:"message",T:Hl}]),wS=s.makeMessageType("viam.app.v1.CertificateRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),CS=s.makeMessageType("viam.app.v1.CertificateResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"tls_certificate",kind:"scalar",T:9},{no:3,name:"tls_private_key",kind:"scalar",T:9}]),NS=s.makeMessageType("viam.app.v1.LogRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"logs",kind:"message",T:Ln,repeated:!0}]),PS=s.makeMessageType("viam.app.v1.LogResponse",[]),DS=s.makeMessageType("viam.app.v1.NeedsRestartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),AS=s.makeMessageType("viam.app.v1.NeedsRestartResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"must_restart",kind:"scalar",T:8},{no:3,name:"restart_check_interval",kind:"message",T:J}]),Rd=s.makeMessageType("viam.app.v1.ModuleConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"path",kind:"scalar",T:9},{no:3,name:"log_level",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"module_id",kind:"scalar",T:9},{no:6,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"status",kind:"message",T:Ua},{no:8,name:"first_run_timeout",kind:"message",T:J},{no:9,name:"tcp_mode",kind:"scalar",T:8}]),_d=s.makeMessageType("viam.app.v1.PackageConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"package",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"status",kind:"message",T:Ua}]),Sd=s.makeMessageType("viam.app.v1.MaintenanceConfig",()=>[{no:1,name:"sensor_name",kind:"message",T:z},{no:2,name:"maintenance_allowed_key",kind:"scalar",T:9}]),US=Object.freeze(Object.defineProperty({__proto__:null,AgentInfo:fd,AppValidationStatus:Ua,AuthConfig:od,AuthHandlerConfig:md,CertificateRequest:wS,CertificateResponse:CS,CloudConfig:Zl,ComponentConfig:uo,ConfigRequest:MS,ConfigResponse:ES,CredentialsType:po,ExternalAuthConfig:rd,Frame:go,JWKSFile:id,JobConfig:Kl,LocationSecret:Ql,LogConfiguration:La,LogPatternConfig:jl,LogRequest:NS,LogResponse:PS,MaintenanceConfig:Sd,ModuleConfig:Rd,NeedsRestartRequest:DS,NeedsRestartResponse:AS,NetworkConfig:ad,Orientation:ld,Orientation_AxisAngles:Td,Orientation_EulerAngles:gd,Orientation_NoOrientation:dd,Orientation_OrientationVectorDegrees:ud,Orientation_OrientationVectorRadians:pd,Orientation_Quaternion:kd,PackageConfig:_d,ProcessConfig:ed,RemoteAuth:vd,RemoteAuth_Credentials:hd,RemoteConfig:yd,ResourceLevelServiceConfig:qa,RobotConfig:Hl,ServiceConfig:nd,SessionsConfig:td,TracingConfig:Xl,TrafficTunnelEndpoint:sd,Translation:cd},Symbol.toStringTag,{value:"Module"})),To=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Id=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesResponse",()=>[{no:1,name:"discoveries",kind:"message",T:uo,repeated:!0}]),qS=Object.freeze(Object.defineProperty({__proto__:null,DiscoverResourcesRequest:To,DiscoverResourcesResponse:Id},Symbol.toStringTag,{value:"Module"})),Od={typeName:"viam.service.discovery.v1.DiscoveryService",methods:{discoverResources:{name:"DiscoverResources",I:To,O:Id,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},bd=s.makeEnum("viam.service.motion.v1.PlanState",[{no:0,name:"PLAN_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PLAN_STATE_IN_PROGRESS",localName:"IN_PROGRESS"},{no:2,name:"PLAN_STATE_STOPPED",localName:"STOPPED"},{no:3,name:"PLAN_STATE_SUCCEEDED",localName:"SUCCEEDED"},{no:4,name:"PLAN_STATE_FAILED",localName:"FAILED"}]),ko=s.makeMessageType("viam.service.motion.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:He},{no:3,name:"component_name_deprecated",kind:"message",T:z},{no:4,name:"world_state",kind:"message",T:Zr,opt:!0},{no:5,name:"constraints",kind:"message",T:Ud,opt:!0},{no:6,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Md=s.makeMessageType("viam.service.motion.v1.MoveResponse",()=>[{no:1,name:"success",kind:"scalar",T:8}]),yo=s.makeMessageType("viam.service.motion.v1.MoveOnMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:Te},{no:3,name:"component_name_deprecated",kind:"message",T:z},{no:4,name:"slam_service_name_deprecated",kind:"message",T:z},{no:5,name:"motion_configuration",kind:"message",T:vo,opt:!0},{no:6,name:"obstacles",kind:"message",T:an,repeated:!0},{no:7,name:"component_name",kind:"scalar",T:9},{no:8,name:"slam_service_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ed=s.makeMessageType("viam.service.motion.v1.MoveOnMapResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),wd=s.makeMessageType("viam.service.motion.v1.ObstacleDetector",()=>[{no:1,name:"vision_service_deprecated",kind:"message",T:z},{no:2,name:"camera_deprecated",kind:"message",T:z},{no:3,name:"vision_service",kind:"scalar",T:9},{no:4,name:"camera",kind:"scalar",T:9}]),vo=s.makeMessageType("viam.service.motion.v1.MotionConfiguration",()=>[{no:1,name:"obstacle_detectors",kind:"message",T:wd,repeated:!0},{no:2,name:"position_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:3,name:"obstacle_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:4,name:"plan_deviation_m",kind:"scalar",T:1,opt:!0},{no:5,name:"linear_m_per_sec",kind:"scalar",T:1,opt:!0},{no:6,name:"angular_degs_per_sec",kind:"scalar",T:1,opt:!0}]),ho=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:je},{no:3,name:"heading",kind:"scalar",T:1,opt:!0},{no:4,name:"component_name_deprecated",kind:"message",T:z},{no:5,name:"movement_sensor_name_deprecated",kind:"message",T:z},{no:6,name:"obstacles",kind:"message",T:Na,repeated:!0},{no:7,name:"motion_configuration",kind:"message",T:vo,opt:!0},{no:8,name:"bounding_regions",kind:"message",T:Na,repeated:!0},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"movement_sensor_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Cd=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),fo=s.makeMessageType("viam.service.motion.v1.GetPoseRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"destination_frame",kind:"scalar",T:9},{no:4,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Nd=s.makeMessageType("viam.service.motion.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:He}]),Ro=s.makeMessageType("viam.service.motion.v1.StopPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pd=s.makeMessageType("viam.service.motion.v1.StopPlanResponse",[]),_o=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"only_active_plans",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Dd=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesResponse",()=>[{no:1,name:"plan_statuses_with_ids",kind:"message",T:xd,repeated:!0}]),So=s.makeMessageType("viam.service.motion.v1.GetPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"last_plan_only",kind:"scalar",T:8},{no:4,name:"execution_id",kind:"scalar",T:9,opt:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ad=s.makeMessageType("viam.service.motion.v1.GetPlanResponse",()=>[{no:1,name:"current_plan_with_status",kind:"message",T:Io},{no:2,name:"replan_history",kind:"message",T:Io,repeated:!0}]),Ud=s.makeMessageType("viam.service.motion.v1.Constraints",()=>[{no:1,name:"linear_constraint",kind:"message",T:qd,repeated:!0},{no:2,name:"orientation_constraint",kind:"message",T:Gd,repeated:!0},{no:3,name:"collision_specification",kind:"message",T:Bd,repeated:!0},{no:4,name:"pseudolinear_constraint",kind:"message",T:Ld,repeated:!0}]),qd=s.makeMessageType("viam.service.motion.v1.LinearConstraint",()=>[{no:1,name:"line_tolerance_mm",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),Ld=s.makeMessageType("viam.service.motion.v1.PseudolinearConstraint",()=>[{no:1,name:"line_tolerance_factor",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_factor",kind:"scalar",T:2,opt:!0}]),Gd=s.makeMessageType("viam.service.motion.v1.OrientationConstraint",()=>[{no:1,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),Bd=s.makeMessageType("viam.service.motion.v1.CollisionSpecification",()=>[{no:1,name:"allows",kind:"message",T:Fd,repeated:!0}]),Fd=s.makeMessageType("viam.service.motion.v1.CollisionSpecification.AllowedFrameCollisions",()=>[{no:1,name:"frame1",kind:"scalar",T:9},{no:2,name:"frame2",kind:"scalar",T:9}],{localName:"CollisionSpecification_AllowedFrameCollisions"}),Io=s.makeMessageType("viam.service.motion.v1.PlanWithStatus",()=>[{no:1,name:"plan",kind:"message",T:Jd},{no:2,name:"status",kind:"message",T:Ga},{no:3,name:"status_history",kind:"message",T:Ga,repeated:!0}]),xd=s.makeMessageType("viam.service.motion.v1.PlanStatusWithID",()=>[{no:1,name:"plan_id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"status",kind:"message",T:Ga},{no:5,name:"component_name",kind:"scalar",T:9}]),Ga=s.makeMessageType("viam.service.motion.v1.PlanStatus",()=>[{no:1,name:"state",kind:"enum",T:s.getEnumType(bd)},{no:2,name:"timestamp",kind:"message",T:_},{no:3,name:"reason",kind:"scalar",T:9,opt:!0}]),Jd=s.makeMessageType("viam.service.motion.v1.Plan",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"steps",kind:"message",T:zd,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9}]),zd=s.makeMessageType("viam.service.motion.v1.PlanStep",()=>[{no:1,name:"step",kind:"map",K:9,V:{kind:"message",T:Vd}}]),Vd=s.makeMessageType("viam.service.motion.v1.ComponentState",()=>[{no:1,name:"pose",kind:"message",T:Te}]),$d=Object.freeze(Object.defineProperty({__proto__:null,CollisionSpecification:Bd,CollisionSpecification_AllowedFrameCollisions:Fd,ComponentState:Vd,Constraints:Ud,GetPlanRequest:So,GetPlanResponse:Ad,GetPoseRequest:fo,GetPoseResponse:Nd,LinearConstraint:qd,ListPlanStatusesRequest:_o,ListPlanStatusesResponse:Dd,MotionConfiguration:vo,MoveOnGlobeRequest:ho,MoveOnGlobeResponse:Cd,MoveOnMapRequest:yo,MoveOnMapResponse:Ed,MoveRequest:ko,MoveResponse:Md,ObstacleDetector:wd,OrientationConstraint:Gd,Plan:Jd,PlanState:bd,PlanStatus:Ga,PlanStatusWithID:xd,PlanStep:zd,PlanWithStatus:Io,PseudolinearConstraint:Ld,StopPlanRequest:Ro,StopPlanResponse:Pd},Symbol.toStringTag,{value:"Module"})),Yd={typeName:"viam.service.motion.v1.MotionService",methods:{move:{name:"Move",I:ko,O:Md,kind:m.Unary},moveOnMap:{name:"MoveOnMap",I:yo,O:Ed,kind:m.Unary},moveOnGlobe:{name:"MoveOnGlobe",I:ho,O:Cd,kind:m.Unary},getPose:{name:"GetPose",I:fo,O:Nd,kind:m.Unary},stopPlan:{name:"StopPlan",I:Ro,O:Pd,kind:m.Unary},listPlanStatuses:{name:"ListPlanStatuses",I:_o,O:Dd,kind:m.Unary},getPlan:{name:"GetPlan",I:So,O:Ad,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},Wd=s.makeEnum("viam.service.navigation.v1.MapType",[{no:0,name:"MAP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAP_TYPE_NONE",localName:"NONE"},{no:2,name:"MAP_TYPE_GPS",localName:"GPS"}]),Oo=s.makeEnum("viam.service.navigation.v1.Mode",[{no:0,name:"MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODE_MANUAL",localName:"MANUAL"},{no:2,name:"MODE_WAYPOINT",localName:"WAYPOINT"},{no:3,name:"MODE_EXPLORE",localName:"EXPLORE"}]),bo=s.makeMessageType("viam.service.navigation.v1.GetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Hd=s.makeMessageType("viam.service.navigation.v1.GetModeResponse",()=>[{no:1,name:"mode",kind:"enum",T:s.getEnumType(Oo)}]),Mo=s.makeMessageType("viam.service.navigation.v1.SetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mode",kind:"enum",T:s.getEnumType(Oo)},{no:99,name:"extra",kind:"message",T:p}]),jd=s.makeMessageType("viam.service.navigation.v1.SetModeResponse",[]),Kd=s.makeMessageType("viam.service.navigation.v1.Waypoint",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:je}]),Eo=s.makeMessageType("viam.service.navigation.v1.GetLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Xd=s.makeMessageType("viam.service.navigation.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:je},{no:2,name:"compass_heading",kind:"scalar",T:1}]),wo=s.makeMessageType("viam.service.navigation.v1.GetWaypointsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Qd=s.makeMessageType("viam.service.navigation.v1.GetWaypointsResponse",()=>[{no:1,name:"waypoints",kind:"message",T:Kd,repeated:!0}]),Co=s.makeMessageType("viam.service.navigation.v1.AddWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:je},{no:99,name:"extra",kind:"message",T:p}]),Zd=s.makeMessageType("viam.service.navigation.v1.AddWaypointResponse",[]),No=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ep=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointResponse",[]),Po=s.makeMessageType("viam.service.navigation.v1.GetObstaclesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),np=s.makeMessageType("viam.service.navigation.v1.GetObstaclesResponse",()=>[{no:1,name:"obstacles",kind:"message",T:Na,repeated:!0}]),ap=s.makeMessageType("viam.service.navigation.v1.Path",()=>[{no:1,name:"destination_waypoint_id",kind:"scalar",T:9},{no:2,name:"geopoints",kind:"message",T:je,repeated:!0}]),Do=s.makeMessageType("viam.service.navigation.v1.GetPathsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),tp=s.makeMessageType("viam.service.navigation.v1.GetPathsResponse",()=>[{no:1,name:"paths",kind:"message",T:ap,repeated:!0}]),Ao=s.makeMessageType("viam.service.navigation.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),sp=s.makeMessageType("viam.service.navigation.v1.GetPropertiesResponse",()=>[{no:1,name:"map_type",kind:"enum",T:s.getEnumType(Wd)}]),op=Object.freeze(Object.defineProperty({__proto__:null,AddWaypointRequest:Co,AddWaypointResponse:Zd,GetLocationRequest:Eo,GetLocationResponse:Xd,GetModeRequest:bo,GetModeResponse:Hd,GetObstaclesRequest:Po,GetObstaclesResponse:np,GetPathsRequest:Do,GetPathsResponse:tp,GetPropertiesRequest:Ao,GetPropertiesResponse:sp,GetWaypointsRequest:wo,GetWaypointsResponse:Qd,MapType:Wd,Mode:Oo,Path:ap,RemoveWaypointRequest:No,RemoveWaypointResponse:ep,SetModeRequest:Mo,SetModeResponse:jd,Waypoint:Kd},Symbol.toStringTag,{value:"Module"})),ip={typeName:"viam.service.navigation.v1.NavigationService",methods:{getMode:{name:"GetMode",I:bo,O:Hd,kind:m.Unary},setMode:{name:"SetMode",I:Mo,O:jd,kind:m.Unary},getLocation:{name:"GetLocation",I:Eo,O:Xd,kind:m.Unary},getWaypoints:{name:"GetWaypoints",I:wo,O:Qd,kind:m.Unary},addWaypoint:{name:"AddWaypoint",I:Co,O:Zd,kind:m.Unary},removeWaypoint:{name:"RemoveWaypoint",I:No,O:ep,kind:m.Unary},getObstacles:{name:"GetObstacles",I:Po,O:np,kind:m.Unary},getPaths:{name:"GetPaths",I:Do,O:tp,kind:m.Unary},getProperties:{name:"GetProperties",I:Ao,O:sp,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},rp=s.makeEnum("viam.service.slam.v1.MappingMode",[{no:0,name:"MAPPING_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAPPING_MODE_CREATE_NEW_MAP",localName:"CREATE_NEW_MAP"},{no:2,name:"MAPPING_MODE_LOCALIZE_ONLY",localName:"LOCALIZE_ONLY"},{no:3,name:"MAPPING_MODE_UPDATE_EXISTING_MAP",localName:"UPDATE_EXISTING_MAP"}]),mp=s.makeEnum("viam.service.slam.v1.SensorType",[{no:0,name:"SENSOR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SENSOR_TYPE_CAMERA",localName:"CAMERA"},{no:2,name:"SENSOR_TYPE_MOVEMENT_SENSOR",localName:"MOVEMENT_SENSOR"}]),Uo=s.makeMessageType("viam.service.slam.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),cp=s.makeMessageType("viam.service.slam.v1.GetPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Te}]),qo=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"return_edited_map",kind:"scalar",T:8,opt:!0}]),lp=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapResponse",()=>[{no:1,name:"point_cloud_pcd_chunk",kind:"scalar",T:12}]),Lo=s.makeMessageType("viam.service.slam.v1.GetInternalStateRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),dp=s.makeMessageType("viam.service.slam.v1.GetInternalStateResponse",()=>[{no:1,name:"internal_state_chunk",kind:"scalar",T:12}]),Go=s.makeMessageType("viam.service.slam.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),pp=s.makeMessageType("viam.service.slam.v1.GetPropertiesResponse",()=>[{no:1,name:"cloud_slam",kind:"scalar",T:8},{no:2,name:"mapping_mode",kind:"enum",T:s.getEnumType(rp)},{no:3,name:"internal_state_file_type",kind:"scalar",T:9,opt:!0},{no:4,name:"sensor_info",kind:"message",T:up,repeated:!0}]),up=s.makeMessageType("viam.service.slam.v1.SensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(mp)}]),gp=Object.freeze(Object.defineProperty({__proto__:null,GetInternalStateRequest:Lo,GetInternalStateResponse:dp,GetPointCloudMapRequest:qo,GetPointCloudMapResponse:lp,GetPositionRequest:Uo,GetPositionResponse:cp,GetPropertiesRequest:Go,GetPropertiesResponse:pp,MappingMode:rp,SensorInfo:up,SensorType:mp},Symbol.toStringTag,{value:"Module"})),Tp={typeName:"viam.service.slam.v1.SLAMService",methods:{getPosition:{name:"GetPosition",I:Uo,O:cp,kind:m.Unary},getPointCloudMap:{name:"GetPointCloudMap",I:qo,O:lp,kind:m.ServerStreaming},getInternalState:{name:"GetInternalState",I:Lo,O:dp,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Go,O:pp,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},kp=s.makeEnum("viam.app.data.v1.Order",[{no:0,name:"ORDER_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ORDER_DESCENDING",localName:"DESCENDING"},{no:2,name:"ORDER_ASCENDING",localName:"ASCENDING"}]),yp=s.makeEnum("viam.app.data.v1.TagsFilterType",[{no:0,name:"TAGS_FILTER_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TAGS_FILTER_TYPE_MATCH_BY_OR",localName:"MATCH_BY_OR"},{no:2,name:"TAGS_FILTER_TYPE_TAGGED",localName:"TAGGED"},{no:3,name:"TAGS_FILTER_TYPE_UNTAGGED",localName:"UNTAGGED"}]),sn=s.makeEnum("viam.app.data.v1.TabularDataSourceType",[{no:0,name:"TABULAR_DATA_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TABULAR_DATA_SOURCE_TYPE_STANDARD",localName:"STANDARD"},{no:2,name:"TABULAR_DATA_SOURCE_TYPE_HOT_STORAGE",localName:"HOT_STORAGE"},{no:3,name:"TABULAR_DATA_SOURCE_TYPE_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),Jn=s.makeEnum("viam.app.data.v1.IndexableCollection",[{no:0,name:"INDEXABLE_COLLECTION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEXABLE_COLLECTION_HOT_STORE",localName:"HOT_STORE"},{no:2,name:"INDEXABLE_COLLECTION_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),vp=s.makeEnum("viam.app.data.v1.IndexCreator",[{no:0,name:"INDEX_CREATOR_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEX_CREATOR_VIAM",localName:"VIAM"},{no:2,name:"INDEX_CREATOR_CUSTOMER",localName:"CUSTOMER"}]),Bo=s.makeMessageType("viam.app.data.v1.DataRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"limit",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"sort_order",kind:"enum",T:s.getEnumType(kp)}]),Ke=s.makeMessageType("viam.app.data.v1.Filter",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:6,name:"robot_name",kind:"scalar",T:9},{no:7,name:"robot_id",kind:"scalar",T:9},{no:8,name:"part_name",kind:"scalar",T:9},{no:9,name:"part_id",kind:"scalar",T:9},{no:10,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:11,name:"organization_ids",kind:"scalar",T:9,repeated:!0},{no:12,name:"mime_type",kind:"scalar",T:9,repeated:!0},{no:13,name:"interval",kind:"message",T:zn},{no:14,name:"tags_filter",kind:"message",T:Ba},{no:15,name:"bbox_labels",kind:"scalar",T:9,repeated:!0},{no:16,name:"dataset_id",kind:"scalar",T:9}]),Ba=s.makeMessageType("viam.app.data.v1.TagsFilter",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(yp)},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Fa=s.makeMessageType("viam.app.data.v1.CaptureMetadata",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_id",kind:"scalar",T:9},{no:5,name:"part_name",kind:"scalar",T:9},{no:6,name:"part_id",kind:"scalar",T:9},{no:7,name:"component_type",kind:"scalar",T:9},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"method_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:Z}},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),zn=s.makeMessageType("viam.app.data.v1.CaptureInterval",()=>[{no:1,name:"start",kind:"message",T:_},{no:2,name:"end",kind:"message",T:_}]),hp=s.makeMessageType("viam.app.data.v1.TabularDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:Bo},{no:2,name:"count_only",kind:"scalar",T:8},{no:3,name:"include_internal_data",kind:"scalar",T:8}]),fp=s.makeMessageType("viam.app.data.v1.TabularDataByFilterResponse",()=>[{no:1,name:"metadata",kind:"message",T:Fa,repeated:!0},{no:2,name:"data",kind:"message",T:Rp,repeated:!0},{no:3,name:"count",kind:"scalar",T:4},{no:4,name:"last",kind:"scalar",T:9},{no:5,name:"total_size_bytes",kind:"scalar",T:4}]),Rp=s.makeMessageType("viam.app.data.v1.TabularData",()=>[{no:1,name:"data",kind:"message",T:p},{no:2,name:"metadata_index",kind:"scalar",T:13},{no:3,name:"time_requested",kind:"message",T:_},{no:4,name:"time_received",kind:"message",T:_}]),_p=s.makeMessageType("viam.app.data.v1.TabularDataBySQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"sql_query",kind:"scalar",T:9}]),Sp=s.makeMessageType("viam.app.data.v1.TabularDataBySQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),Fo=s.makeMessageType("viam.app.data.v1.TabularDataSource",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(sn)},{no:2,name:"pipeline_id",kind:"scalar",T:9,opt:!0}]),Ip=s.makeMessageType("viam.app.data.v1.TabularDataByMQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"use_recent_data",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source",kind:"message",T:Fo,opt:!0},{no:7,name:"query_prefix_name",kind:"scalar",T:9,opt:!0}]),Op=s.makeMessageType("viam.app.data.v1.TabularDataByMQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),bp=s.makeMessageType("viam.app.data.v1.ExportTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"interval",kind:"message",T:zn},{no:6,name:"additional_parameters",kind:"message",T:p,opt:!0}]),Mp=s.makeMessageType("viam.app.data.v1.ExportTabularDataResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"time_captured",kind:"message",T:_},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"location_id",kind:"scalar",T:9},{no:8,name:"robot_name",kind:"scalar",T:9},{no:9,name:"robot_id",kind:"scalar",T:9},{no:10,name:"part_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"message",T:p},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"payload",kind:"message",T:p}]),Ep=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"method_name",kind:"scalar",T:9},{no:4,name:"resource_subtype",kind:"scalar",T:9},{no:5,name:"additional_parameters",kind:"message",T:p,opt:!0}]),wp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataResponse",()=>[{no:1,name:"time_captured",kind:"message",T:_},{no:2,name:"time_synced",kind:"message",T:_},{no:3,name:"payload",kind:"message",T:p}]),xo=s.makeMessageType("viam.app.data.v1.BinaryData",()=>[{no:1,name:"binary",kind:"scalar",T:12},{no:2,name:"metadata",kind:"message",T:qp}]),Cp=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:Bo},{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"count_only",kind:"scalar",T:8},{no:4,name:"include_internal_data",kind:"scalar",T:8}]),Np=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterResponse",()=>[{no:1,name:"data",kind:"message",T:xo,repeated:!0},{no:2,name:"count",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"total_size_bytes",kind:"scalar",T:4}]),ye=s.makeMessageType("viam.app.data.v1.BinaryID",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9}]),Pp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsRequest",()=>[{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),Dp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsResponse",()=>[{no:1,name:"data",kind:"message",T:xo,repeated:!0},{no:2,name:"count",kind:"scalar",T:4}]),Ap=s.makeMessageType("viam.app.data.v1.BoundingBox",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:7,name:"confidence",kind:"scalar",T:1,opt:!0}]),Up=s.makeMessageType("viam.app.data.v1.Classification",()=>[{no:3,name:"id",kind:"scalar",T:9},{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1,opt:!0}]),xa=s.makeMessageType("viam.app.data.v1.Annotations",()=>[{no:1,name:"bboxes",kind:"message",T:Ap,repeated:!0},{no:2,name:"classifications",kind:"message",T:Up,repeated:!0}]),qp=s.makeMessageType("viam.app.data.v1.BinaryMetadata",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"capture_metadata",kind:"message",T:Fa},{no:3,name:"time_requested",kind:"message",T:_},{no:4,name:"time_received",kind:"message",T:_},{no:5,name:"file_name",kind:"scalar",T:9},{no:6,name:"file_ext",kind:"scalar",T:9},{no:7,name:"uri",kind:"scalar",T:9},{no:8,name:"annotations",kind:"message",T:xa},{no:9,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:10,name:"binary_data_id",kind:"scalar",T:9},{no:11,name:"file_size_bytes",kind:"scalar",T:4}]),Lp=s.makeMessageType("viam.app.data.v1.DeleteTabularFilter",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"robot_id",kind:"scalar",T:9},{no:3,name:"part_id",kind:"scalar",T:9},{no:4,name:"component_type",kind:"scalar",T:9},{no:5,name:"component_name",kind:"scalar",T:9},{no:6,name:"method",kind:"scalar",T:9},{no:7,name:"tags_filter",kind:"message",T:Ba}]),Gp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"delete_older_than_days",kind:"scalar",T:13},{no:3,name:"filter",kind:"message",T:Lp,opt:!0}]),Bp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Fp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"include_internal_data",kind:"scalar",T:8}]),xp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Jp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsRequest",()=>[{no:2,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),zp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Vp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),$p=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsResponse",[]),Yp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Wp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterResponse",[]),Hp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),jp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Kp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Xp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Qp=s.makeMessageType("viam.app.data.v1.TagsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke}]),Zp=s.makeMessageType("viam.app.data.v1.TagsByFilterResponse",()=>[{no:1,name:"tags",kind:"scalar",T:9,repeated:!0}]),eu=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDRequest",()=>[{no:7,name:"binary_id",kind:"message",T:ye},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),nu=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDResponse",()=>[{no:1,name:"bbox_id",kind:"scalar",T:9}]),au=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDRequest",()=>[{no:3,name:"binary_id",kind:"message",T:ye},{no:4,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9}]),tu=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDResponse",[]),su=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxRequest",()=>[{no:1,name:"binary_id",kind:"message",T:ye},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9},{no:3,name:"label",kind:"scalar",T:9,opt:!0},{no:4,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:5,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:6,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:7,name:"y_max_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),ou=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxResponse",[]),iu=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke}]),ru=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterResponse",()=>[{no:1,name:"labels",kind:"scalar",T:9,repeated:!0}]),mu=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),cu=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserResponse",[]),lu=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),du=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionResponse",()=>[{no:1,name:"hostname",kind:"scalar",T:9},{no:2,name:"mongodb_uri",kind:"scalar",T:9},{no:3,name:"has_database_user",kind:"scalar",T:8}]),pu=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),uu=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsResponse",[]),gu=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),Tu=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsResponse",[]),ku=s.makeMessageType("viam.app.data.v1.CreateIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0}]),yu=s.makeMessageType("viam.app.data.v1.CreateIndexResponse",[]),vu=s.makeMessageType("viam.app.data.v1.DeleteIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_name",kind:"scalar",T:9}]),hu=s.makeMessageType("viam.app.data.v1.DeleteIndexResponse",[]),fu=s.makeMessageType("viam.app.data.v1.ListIndexesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0}]),Ru=s.makeMessageType("viam.app.data.v1.ListIndexesResponse",()=>[{no:1,name:"indexes",kind:"message",T:_u,repeated:!0}]),_u=s.makeMessageType("viam.app.data.v1.Index",()=>[{no:1,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:2,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:3,name:"index_name",kind:"scalar",T:9},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_by",kind:"enum",T:s.getEnumType(vp)}]),Su=s.makeMessageType("viam.app.data.v1.CreateSavedQueryRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Iu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Jo=s.makeMessageType("viam.app.data.v1.Query",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_on",kind:"message",T:_},{no:6,name:"updated_at",kind:"message",T:_}]),Ou=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),bu=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryResponse",[]),Mu=s.makeMessageType("viam.app.data.v1.GetSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Eu=s.makeMessageType("viam.app.data.v1.GetSavedQueryResponse",()=>[{no:1,name:"saved_query",kind:"message",T:Jo}]),wu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Cu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryResponse",[]),Nu=s.makeMessageType("viam.app.data.v1.ListSavedQueriesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"limit",kind:"scalar",T:3}]),Pu=s.makeMessageType("viam.app.data.v1.ListSavedQueriesResponse",()=>[{no:1,name:"queries",kind:"message",T:Jo,repeated:!0}]),Du=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLRequest",()=>[{no:1,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"expiration_minutes",kind:"scalar",T:13,opt:!0}]),Au=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLResponse",()=>[{no:1,name:"signed_url",kind:"scalar",T:9},{no:2,name:"expires_at",kind:"message",T:_}]),Ja=s.makeMessageType("viam.app.data.v1.SequenceResourceFilter",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"method_name",kind:"scalar",T:9}]),zo=s.makeMessageType("viam.app.data.v1.Sequence",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"sequence_tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"created_at",kind:"message",T:_},{no:5,name:"updated_at",kind:"message",T:_},{no:6,name:"start_time",kind:"message",T:_},{no:7,name:"end_time",kind:"message",T:_},{no:8,name:"resources",kind:"message",T:Ja,repeated:!0}]),Uu=s.makeMessageType("viam.app.data.v1.CreateSequenceRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"resources",kind:"message",T:Ja,repeated:!0},{no:3,name:"sequence_tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"start_time",kind:"message",T:_},{no:5,name:"end_time",kind:"message",T:_}]),qu=s.makeMessageType("viam.app.data.v1.CreateSequenceResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Lu=s.makeMessageType("viam.app.data.v1.GetSequenceRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Gu=s.makeMessageType("viam.app.data.v1.GetSequenceResponse",()=>[{no:1,name:"sequence",kind:"message",T:zo}]),Bu=s.makeMessageType("viam.app.data.v1.UpdateSequenceRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"resources",kind:"message",T:Ja,repeated:!0},{no:3,name:"sequence_tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"start_time",kind:"message",T:_},{no:5,name:"end_time",kind:"message",T:_},{no:6,name:"field_mask",kind:"message",T:pe}]),Fu=s.makeMessageType("viam.app.data.v1.UpdateSequenceResponse",[]),xu=s.makeMessageType("viam.app.data.v1.DeleteSequenceRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ju=s.makeMessageType("viam.app.data.v1.DeleteSequenceResponse",[]),zu=s.makeMessageType("viam.app.data.v1.ListSequencesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9},{no:3,name:"page_size",kind:"scalar",T:13}]),Vu=s.makeMessageType("viam.app.data.v1.ListSequencesResponse",()=>[{no:1,name:"sequences",kind:"message",T:zo,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),LS=Object.freeze(Object.defineProperty({__proto__:null,AddBinaryDataToDatasetByIDsRequest:pu,AddBinaryDataToDatasetByIDsResponse:uu,AddBoundingBoxToImageByIDRequest:eu,AddBoundingBoxToImageByIDResponse:nu,AddTagsToBinaryDataByFilterRequest:Yp,AddTagsToBinaryDataByFilterResponse:Wp,AddTagsToBinaryDataByIDsRequest:Vp,AddTagsToBinaryDataByIDsResponse:$p,Annotations:xa,BinaryData:xo,BinaryDataByFilterRequest:Cp,BinaryDataByFilterResponse:Np,BinaryDataByIDsRequest:Pp,BinaryDataByIDsResponse:Dp,BinaryID:ye,BinaryMetadata:qp,BoundingBox:Ap,BoundingBoxLabelsByFilterRequest:iu,BoundingBoxLabelsByFilterResponse:ru,CaptureInterval:zn,CaptureMetadata:Fa,Classification:Up,ConfigureDatabaseUserRequest:mu,ConfigureDatabaseUserResponse:cu,CreateBinaryDataSignedURLRequest:Du,CreateBinaryDataSignedURLResponse:Au,CreateIndexRequest:ku,CreateIndexResponse:yu,CreateSavedQueryRequest:Su,CreateSavedQueryResponse:Iu,CreateSequenceRequest:Uu,CreateSequenceResponse:qu,DataRequest:Bo,DeleteBinaryDataByFilterRequest:Fp,DeleteBinaryDataByFilterResponse:xp,DeleteBinaryDataByIDsRequest:Jp,DeleteBinaryDataByIDsResponse:zp,DeleteIndexRequest:vu,DeleteIndexResponse:hu,DeleteSavedQueryRequest:Ou,DeleteSavedQueryResponse:bu,DeleteSequenceRequest:xu,DeleteSequenceResponse:Ju,DeleteTabularDataRequest:Gp,DeleteTabularDataResponse:Bp,DeleteTabularFilter:Lp,ExportTabularDataRequest:bp,ExportTabularDataResponse:Mp,Filter:Ke,GetDatabaseConnectionRequest:lu,GetDatabaseConnectionResponse:du,GetLatestTabularDataRequest:Ep,GetLatestTabularDataResponse:wp,GetSavedQueryRequest:Mu,GetSavedQueryResponse:Eu,GetSequenceRequest:Lu,GetSequenceResponse:Gu,Index:_u,IndexCreator:vp,IndexableCollection:Jn,ListIndexesRequest:fu,ListIndexesResponse:Ru,ListSavedQueriesRequest:Nu,ListSavedQueriesResponse:Pu,ListSequencesRequest:zu,ListSequencesResponse:Vu,Order:kp,Query:Jo,RemoveBinaryDataFromDatasetByIDsRequest:gu,RemoveBinaryDataFromDatasetByIDsResponse:Tu,RemoveBoundingBoxFromImageByIDRequest:au,RemoveBoundingBoxFromImageByIDResponse:tu,RemoveTagsFromBinaryDataByFilterRequest:Kp,RemoveTagsFromBinaryDataByFilterResponse:Xp,RemoveTagsFromBinaryDataByIDsRequest:Hp,RemoveTagsFromBinaryDataByIDsResponse:jp,Sequence:zo,SequenceResourceFilter:Ja,TabularData:Rp,TabularDataByFilterRequest:hp,TabularDataByFilterResponse:fp,TabularDataByMQLRequest:Ip,TabularDataByMQLResponse:Op,TabularDataBySQLRequest:_p,TabularDataBySQLResponse:Sp,TabularDataSource:Fo,TabularDataSourceType:sn,TagsByFilterRequest:Qp,TagsByFilterResponse:Zp,TagsFilter:Ba,TagsFilterType:yp,UpdateBoundingBoxRequest:su,UpdateBoundingBoxResponse:ou,UpdateSavedQueryRequest:wu,UpdateSavedQueryResponse:Cu,UpdateSequenceRequest:Bu,UpdateSequenceResponse:Fu},Symbol.toStringTag,{value:"Module"})),Vo=s.makeMessageType("viam.component.camera.v1.GetImagesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"filter_source_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),$u=s.makeMessageType("viam.component.camera.v1.GetImagesResponse",()=>[{no:1,name:"images",kind:"message",T:$o,repeated:!0},{no:84260,name:"response_metadata",kind:"message",T:em}]),$o=s.makeMessageType("viam.component.camera.v1.Image",()=>[{no:1,name:"source_name",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:12},{no:4,name:"mime_type",kind:"scalar",T:9},{no:5,name:"annotations",kind:"message",T:xa}]),Yo=s.makeMessageType("viam.component.camera.v1.GetPointCloudRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Yu=s.makeMessageType("viam.component.camera.v1.GetPointCloudResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"point_cloud",kind:"scalar",T:12}]),Wu=s.makeMessageType("viam.component.camera.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Hu=s.makeMessageType("viam.component.camera.v1.GetPropertiesResponse",()=>[{no:1,name:"supports_pcd",kind:"scalar",T:8},{no:2,name:"intrinsic_parameters",kind:"message",T:Xu},{no:3,name:"distortion_parameters",kind:"message",T:Qu},{no:4,name:"mime_types",kind:"scalar",T:9,repeated:!0},{no:5,name:"frame_rate",kind:"scalar",T:2,opt:!0},{no:6,name:"extrinsic_parameters",kind:"message",T:Zu}]),GS=s.makeMessageType("viam.component.camera.v1.Webcams",()=>[{no:1,name:"webcams",kind:"message",T:ju,repeated:!0}]),ju=s.makeMessageType("viam.component.camera.v1.Webcam",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"status",kind:"scalar",T:9},{no:3,name:"properties",kind:"message",T:Ku,repeated:!0},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"id",kind:"scalar",T:9}]),Ku=s.makeMessageType("viam.component.camera.v1.Property",()=>[{no:1,name:"width_px",kind:"scalar",T:5},{no:2,name:"height_px",kind:"scalar",T:5},{no:3,name:"frame_format",kind:"scalar",T:9},{no:4,name:"frame_rate",kind:"scalar",T:2}]),Xu=s.makeMessageType("viam.component.camera.v1.IntrinsicParameters",()=>[{no:1,name:"width_px",kind:"scalar",T:13},{no:2,name:"height_px",kind:"scalar",T:13},{no:3,name:"focal_x_px",kind:"scalar",T:1},{no:4,name:"focal_y_px",kind:"scalar",T:1},{no:5,name:"center_x_px",kind:"scalar",T:1},{no:6,name:"center_y_px",kind:"scalar",T:1}]),Qu=s.makeMessageType("viam.component.camera.v1.DistortionParameters",()=>[{no:1,name:"model",kind:"scalar",T:9},{no:2,name:"parameters",kind:"scalar",T:1,repeated:!0}]),Zu=s.makeMessageType("viam.component.camera.v1.ExtrinsicParameters",()=>[{no:1,name:"translation",kind:"message",T:ke},{no:2,name:"orientation",kind:"message",T:Dt}]),BS=Object.freeze(Object.defineProperty({__proto__:null,DistortionParameters:Qu,ExtrinsicParameters:Zu,GetImagesRequest:Vo,GetImagesResponse:$u,GetPointCloudRequest:Yo,GetPointCloudResponse:Yu,GetPropertiesRequest:Wu,GetPropertiesResponse:Hu,Image:$o,IntrinsicParameters:Xu,Property:Ku,Webcam:ju,Webcams:GS},Symbol.toStringTag,{value:"Module"})),Wo=s.makeMessageType("viam.service.vision.v1.GetDetectionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:3},{no:4,name:"height",kind:"scalar",T:3},{no:5,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),eg=s.makeMessageType("viam.service.vision.v1.GetDetectionsResponse",()=>[{no:1,name:"detections",kind:"message",T:za,repeated:!0}]),Ho=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ng=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraResponse",()=>[{no:1,name:"detections",kind:"message",T:za,repeated:!0}]),za=s.makeMessageType("viam.service.vision.v1.Detection",()=>[{no:1,name:"x_min",kind:"scalar",T:3,opt:!0},{no:2,name:"y_min",kind:"scalar",T:3,opt:!0},{no:3,name:"x_max",kind:"scalar",T:3,opt:!0},{no:4,name:"y_max",kind:"scalar",T:3,opt:!0},{no:5,name:"confidence",kind:"scalar",T:1},{no:6,name:"class_name",kind:"scalar",T:9},{no:7,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:8,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:10,name:"y_max_normalized",kind:"scalar",T:1,opt:!0}]),jo=s.makeMessageType("viam.service.vision.v1.GetClassificationsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:5},{no:4,name:"height",kind:"scalar",T:5},{no:5,name:"mime_type",kind:"scalar",T:9},{no:6,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),ag=s.makeMessageType("viam.service.vision.v1.GetClassificationsResponse",()=>[{no:1,name:"classifications",kind:"message",T:Va,repeated:!0}]),Ko=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),tg=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraResponse",()=>[{no:1,name:"classifications",kind:"message",T:Va,repeated:!0}]),Va=s.makeMessageType("viam.service.vision.v1.Classification",()=>[{no:1,name:"class_name",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1}]),Xo=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),sg=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"objects",kind:"message",T:Ut,repeated:!0}]),Qo=s.makeMessageType("viam.service.vision.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zo=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"return_image",kind:"scalar",T:8},{no:4,name:"return_classifications",kind:"scalar",T:8},{no:5,name:"return_detections",kind:"scalar",T:8},{no:6,name:"return_object_point_clouds",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),og=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraResponse",()=>[{no:1,name:"image",kind:"message",T:$o},{no:2,name:"detections",kind:"message",T:za,repeated:!0},{no:3,name:"classifications",kind:"message",T:Va,repeated:!0},{no:4,name:"objects",kind:"message",T:Ut,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),ig=s.makeMessageType("viam.service.vision.v1.GetPropertiesResponse",()=>[{no:1,name:"classifications_supported",kind:"scalar",T:8},{no:2,name:"detections_supported",kind:"scalar",T:8},{no:3,name:"object_point_clouds_supported",kind:"scalar",T:8}]),rg=Object.freeze(Object.defineProperty({__proto__:null,CaptureAllFromCameraRequest:Zo,CaptureAllFromCameraResponse:og,Classification:Va,Detection:za,GetClassificationsFromCameraRequest:Ko,GetClassificationsFromCameraResponse:tg,GetClassificationsRequest:jo,GetClassificationsResponse:ag,GetDetectionsFromCameraRequest:Ho,GetDetectionsFromCameraResponse:ng,GetDetectionsRequest:Wo,GetDetectionsResponse:eg,GetObjectPointCloudsRequest:Xo,GetObjectPointCloudsResponse:sg,GetPropertiesRequest:Qo,GetPropertiesResponse:ig},Symbol.toStringTag,{value:"Module"})),mg={typeName:"viam.service.vision.v1.VisionService",methods:{getDetectionsFromCamera:{name:"GetDetectionsFromCamera",I:Ho,O:ng,kind:m.Unary},getDetections:{name:"GetDetections",I:Wo,O:eg,kind:m.Unary},getClassificationsFromCamera:{name:"GetClassificationsFromCamera",I:Ko,O:tg,kind:m.Unary},getClassifications:{name:"GetClassifications",I:jo,O:ag,kind:m.Unary},getObjectPointClouds:{name:"GetObjectPointClouds",I:Xo,O:sg,kind:m.Unary},getProperties:{name:"GetProperties",I:Qo,O:ig,kind:m.Unary},captureAllFromCamera:{name:"CaptureAllFromCamera",I:Zo,O:og,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},FS=new Blob([`self.onmessage = function(e) {
|
|
1
|
+
(function(g,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):(g=typeof globalThis<"u"?globalThis:g||self,G(g.sdk={}))})(this,function(g){"use strict";function G(t,e){if(!t)throw new Error(e)}const fR=34028234663852886e22,RR=-34028234663852886e22,_R=4294967295,SR=2147483647,IR=-2147483648;function Xn(t){if(typeof t!="number")throw new Error("invalid int 32: "+typeof t);if(!Number.isInteger(t)||t>SR||t<IR)throw new Error("invalid int 32: "+t)}function ct(t){if(typeof t!="number")throw new Error("invalid uint 32: "+typeof t);if(!Number.isInteger(t)||t>_R||t<0)throw new Error("invalid uint 32: "+t)}function Ai(t){if(typeof t!="number")throw new Error("invalid float 32: "+typeof t);if(Number.isFinite(t)&&(t>fR||t<RR))throw new Error("invalid float 32: "+t)}const qi=Symbol("@bufbuild/protobuf/enum-type");function ER(t){const e=t[qi];return G(e,"missing enum type on enum object"),e}function Ui(t,e,n,a){t[qi]=Li(e,n.map(o=>({no:o.no,name:o.name,localName:t[o.no]})))}function Li(t,e,n){const a=Object.create(null),o=Object.create(null),i=[];for(const r of e){const c=Gi(r);i.push(c),a[r.name]=c,o[r.no]=c}return{typeName:t,values:i,findName(r){return a[r]},findNumber(r){return o[r]}}}function OR(t,e,n){const a={};for(const o of e){const i=Gi(o);a[i.localName]=i.no,a[i.no]=i.localName}return Ui(a,t,e),a}function Gi(t){return"localName"in t?t:Object.assign(Object.assign({},t),{localName:t.name})}class w{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,n){const a=this.getType(),o=a.runtime.bin,i=o.makeReadOptions(n);return o.readMessage(this,i.readerFactory(e),e.byteLength,i),this}fromJson(e,n){const a=this.getType(),o=a.runtime.json,i=o.makeReadOptions(n);return o.readMessage(a,e,i,this),this}fromJsonString(e,n){let a;try{a=JSON.parse(e)}catch(o){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${o instanceof Error?o.message:String(o)}`)}return this.fromJson(a,n)}toBinary(e){const n=this.getType(),a=n.runtime.bin,o=a.makeWriteOptions(e),i=o.writerFactory();return a.writeMessage(this,i,o),i.finish()}toJson(e){const n=this.getType(),a=n.runtime.json,o=a.makeWriteOptions(e);return a.writeMessage(this,o)}toJsonString(e){var n;const a=this.toJson(e);return JSON.stringify(a,null,(n=e?.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function MR(t,e,n,a){var o;const i=(o=a?.localName)!==null&&o!==void 0?o:e.substring(e.lastIndexOf(".")+1),r={[i]:function(c){t.util.initFields(this),t.util.initPartial(c,this)}}[i];return Object.setPrototypeOf(r.prototype,new w),Object.assign(r,{runtime:t,typeName:e,fields:t.util.newFieldList(n),fromBinary(c,l){return new r().fromBinary(c,l)},fromJson(c,l){return new r().fromJson(c,l)},fromJsonString(c,l){return new r().fromJsonString(c,l)},equals(c,l){return t.util.equals(r,c,l)}}),r}function bR(){let t=0,e=0;for(let a=0;a<28;a+=7){let o=this.buf[this.pos++];if(t|=(o&127)<<a,!(o&128))return this.assertBounds(),[t,e]}let n=this.buf[this.pos++];if(t|=(n&15)<<28,e=(n&112)>>4,!(n&128))return this.assertBounds(),[t,e];for(let a=3;a<=31;a+=7){let o=this.buf[this.pos++];if(e|=(o&127)<<a,!(o&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}function lt(t,e,n){for(let i=0;i<28;i=i+7){const r=t>>>i,c=!(!(r>>>7)&&e==0),l=(c?r|128:r)&255;if(n.push(l),!c)return}const a=t>>>28&15|(e&7)<<4,o=!!(e>>3);if(n.push((o?a|128:a)&255),!!o){for(let i=3;i<31;i=i+7){const r=e>>>i,c=!!(r>>>7),l=(c?r|128:r)&255;if(n.push(l),!c)return}n.push(e>>>31&1)}}const Qn=4294967296;function Bi(t){const e=t[0]==="-";e&&(t=t.slice(1));const n=1e6;let a=0,o=0;function i(r,c){const l=Number(t.slice(r,c));o*=n,a=a*n+l,a>=Qn&&(o=o+(a/Qn|0),a=a%Qn)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),e?xi(a,o):dt(a,o)}function wR(t,e){let n=dt(t,e);const a=n.hi&2147483648;a&&(n=xi(n.lo,n.hi));const o=Fi(n.lo,n.hi);return a?"-"+o:o}function Fi(t,e){if({lo:t,hi:e}=CR(t,e),e<=2097151)return String(Qn*e+t);const n=t&16777215,a=(t>>>24|e<<8)&16777215,o=e>>16&65535;let i=n+a*6777216+o*6710656,r=a+o*8147497,c=o*2;const l=1e7;return i>=l&&(r+=Math.floor(i/l),i%=l),r>=l&&(c+=Math.floor(r/l),r%=l),c.toString()+Ji(r)+Ji(i)}function CR(t,e){return{lo:t>>>0,hi:e>>>0}}function dt(t,e){return{lo:t|0,hi:e|0}}function xi(t,e){return e=~e,t?t=~t+1:e+=1,dt(t,e)}const Ji=t=>{const e=String(t);return"0000000".slice(e.length)+e};function zi(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let n=0;n<9;n++)e.push(t&127|128),t=t>>7;e.push(1)}}function DR(){let t=this.buf[this.pos++],e=t&127;if(!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,!(t&128))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let n=5;t&128&&n<10;n++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}function NR(){const t=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const o=BigInt("-9223372036854775808"),i=BigInt("9223372036854775807"),r=BigInt("0"),c=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){const d=typeof l=="bigint"?l:BigInt(l);if(d>i||d<o)throw new Error(`int64 invalid: ${l}`);return d},uParse(l){const d=typeof l=="bigint"?l:BigInt(l);if(d>c||d<r)throw new Error(`uint64 invalid: ${l}`);return d},enc(l){return t.setBigInt64(0,this.parse(l),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},uEnc(l){return t.setBigInt64(0,this.uParse(l),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},dec(l,d){return t.setInt32(0,l,!0),t.setInt32(4,d,!0),t.getBigInt64(0,!0)},uDec(l,d){return t.setInt32(0,l,!0),t.setInt32(4,d,!0),t.getBigUint64(0,!0)}}}const n=o=>G(/^-?[0-9]+$/.test(o),`int64 invalid: ${o}`),a=o=>G(/^[0-9]+$/.test(o),`uint64 invalid: ${o}`);return{zero:"0",supported:!1,parse(o){return typeof o!="string"&&(o=o.toString()),n(o),o},uParse(o){return typeof o!="string"&&(o=o.toString()),a(o),o},enc(o){return typeof o!="string"&&(o=o.toString()),n(o),Bi(o)},uEnc(o){return typeof o!="string"&&(o=o.toString()),a(o),Bi(o)},dec(o,i){return wR(o,i)},uDec(o,i){return Fi(o,i)}}}const W=NR();var S;(function(t){t[t.DOUBLE=1]="DOUBLE",t[t.FLOAT=2]="FLOAT",t[t.INT64=3]="INT64",t[t.UINT64=4]="UINT64",t[t.INT32=5]="INT32",t[t.FIXED64=6]="FIXED64",t[t.FIXED32=7]="FIXED32",t[t.BOOL=8]="BOOL",t[t.STRING=9]="STRING",t[t.BYTES=12]="BYTES",t[t.UINT32=13]="UINT32",t[t.SFIXED32=15]="SFIXED32",t[t.SFIXED64=16]="SFIXED64",t[t.SINT32=17]="SINT32",t[t.SINT64=18]="SINT64"})(S||(S={}));var ze;(function(t){t[t.BIGINT=0]="BIGINT",t[t.STRING=1]="STRING"})(ze||(ze={}));function Ve(t,e,n){if(e===n)return!0;if(t==S.BYTES){if(!(e instanceof Uint8Array)||!(n instanceof Uint8Array)||e.length!==n.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==n[a])return!1;return!0}switch(t){case S.UINT64:case S.FIXED64:case S.INT64:case S.SFIXED64:case S.SINT64:return e==n}return!1}function dn(t,e){switch(t){case S.BOOL:return!1;case S.UINT64:case S.FIXED64:case S.INT64:case S.SFIXED64:case S.SINT64:return e==0?W.zero:"0";case S.DOUBLE:case S.FLOAT:return 0;case S.BYTES:return new Uint8Array(0);case S.STRING:return"";default:return 0}}function Vi(t,e){switch(t){case S.BOOL:return e===!1;case S.STRING:return e==="";case S.BYTES:return e instanceof Uint8Array&&!e.byteLength;default:return e==0}}var x;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(x||(x={}));class PR{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let o=0;o<this.chunks.length;o++)e+=this.chunks[o].length;let n=new Uint8Array(e),a=0;for(let o=0;o<this.chunks.length;o++)n.set(this.chunks[o],a),a+=this.chunks[o].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,n){return this.uint32((e<<3|n)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(ct(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return Xn(e),zi(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let n=this.textEncoder.encode(e);return this.uint32(n.byteLength),this.raw(n)}float(e){Ai(e);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,e,!0),this.raw(n)}fixed32(e){ct(e);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,e,!0),this.raw(n)}sfixed32(e){Xn(e);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)}sint32(e){return Xn(e),e=(e<<1^e>>31)>>>0,zi(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),a=new DataView(n.buffer),o=W.enc(e);return a.setInt32(0,o.lo,!0),a.setInt32(4,o.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),a=new DataView(n.buffer),o=W.uEnc(e);return a.setInt32(0,o.lo,!0),a.setInt32(4,o.hi,!0),this.raw(n)}int64(e){let n=W.enc(e);return lt(n.lo,n.hi,this.buf),this}sint64(e){let n=W.enc(e),a=n.hi>>31,o=n.lo<<1^a,i=(n.hi<<1|n.lo>>>31)^a;return lt(o,i,this.buf),this}uint64(e){let n=W.uEnc(e);return lt(n.lo,n.hi,this.buf),this}}class $i{constructor(e,n){this.varint64=bR,this.uint32=DR,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=n??new TextDecoder}tag(){let e=this.uint32(),n=e>>>3,a=e&7;if(n<=0||a<0||a>5)throw new Error("illegal tag: field no "+n+" wire type "+a);return[n,a]}skip(e,n){let a=this.pos;switch(e){case x.Varint:for(;this.buf[this.pos++]&128;);break;case x.Bit64:this.pos+=4;case x.Bit32:this.pos+=4;break;case x.LengthDelimited:let o=this.uint32();this.pos+=o;break;case x.StartGroup:for(;;){const[i,r]=this.tag();if(r===x.EndGroup){if(n!==void 0&&i!==n)throw new Error("invalid end group tag");break}this.skip(r,i)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(a,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return W.dec(...this.varint64())}uint64(){return W.uDec(...this.varint64())}sint64(){let[e,n]=this.varint64(),a=-(e&1);return e=(e>>>1|(n&1)<<31)^a,n=n>>>1^a,W.dec(e,n)}bool(){let[e,n]=this.varint64();return e!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return W.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return W.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),n=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(n,n+e)}string(){return this.textDecoder.decode(this.bytes())}}function AR(t,e,n,a){let o;return{typeName:e,extendee:n,get field(){if(!o){const i=typeof a=="function"?a():a;i.name=e.split(".").pop(),i.jsonName=`[${e}]`,o=t.util.newFieldList([i]).list()[0]}return o},runtime:t}}function Yi(t){const e=t.field.localName,n=Object.create(null);return n[e]=qR(t),[n,()=>n[e]]}function qR(t){const e=t.field;if(e.repeated)return[];if(e.default!==void 0)return e.default;switch(e.kind){case"enum":return e.T.values[0].no;case"scalar":return dn(e.T,e.L);case"message":const n=e.T,a=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(a):a;case"map":throw"map fields are not allowed to be extensions"}}function UR(t,e){if(!e.repeated&&(e.kind=="enum"||e.kind=="scalar")){for(let n=t.length-1;n>=0;--n)if(t[n].no==e.no)return[t[n]];return[]}return t.filter(n=>n.no===e.no)}let ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Zn=[];for(let t=0;t<ve.length;t++)Zn[ve[t].charCodeAt(0)]=t;Zn[45]=ve.indexOf("+"),Zn[95]=ve.indexOf("/");const pt={dec(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let n=new Uint8Array(e),a=0,o=0,i,r=0;for(let c=0;c<t.length;c++){if(i=Zn[t.charCodeAt(c)],i===void 0)switch(t[c]){case"=":o=0;case`
|
|
2
|
+
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(o){case 0:r=i,o=1;break;case 1:n[a++]=r<<2|(i&48)>>4,r=i,o=2;break;case 2:n[a++]=(r&15)<<4|(i&60)>>2,r=i,o=3;break;case 3:n[a++]=(r&3)<<6|i,o=0;break}}if(o==1)throw Error("invalid base64 string.");return n.subarray(0,a)},enc(t){let e="",n=0,a,o=0;for(let i=0;i<t.length;i++)switch(a=t[i],n){case 0:e+=ve[a>>2],o=(a&3)<<4,n=1;break;case 1:e+=ve[o|a>>4],o=(a&15)<<2,n=2;break;case 2:e+=ve[o|a>>6],e+=ve[a&63],n=0;break}return n&&(e+=ve[o],e+="=",n==1&&(e+="=")),e}};function LR(t,e,n){ji(e,t);const a=e.runtime.bin.makeReadOptions(n),o=UR(t.getType().runtime.bin.listUnknownFields(t),e.field),[i,r]=Yi(e);for(const c of o)e.runtime.bin.readField(i,a.readerFactory(c.data),e.field,c.wireType,a);return r()}function GR(t,e,n,a){ji(e,t);const o=e.runtime.bin.makeReadOptions(a),i=e.runtime.bin.makeWriteOptions(a);if(Wi(t,e)){const d=t.getType().runtime.bin.listUnknownFields(t).filter(u=>u.no!=e.field.no);t.getType().runtime.bin.discardUnknownFields(t);for(const u of d)t.getType().runtime.bin.onUnknownField(t,u.no,u.wireType,u.data)}const r=i.writerFactory();let c=e.field;!c.opt&&!c.repeated&&(c.kind=="enum"||c.kind=="scalar")&&(c=Object.assign(Object.assign({},e.field),{opt:!0})),e.runtime.bin.writeField(c,n,r,i);const l=o.readerFactory(r.finish());for(;l.pos<l.len;){const[d,u]=l.tag(),h=l.skip(u,d);t.getType().runtime.bin.onUnknownField(t,d,u,h)}}function Wi(t,e){const n=t.getType();return e.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(t).find(a=>a.no==e.field.no)}function ji(t,e){G(t.extendee.typeName==e.getType().typeName,`extension ${t.typeName} can only be applied to message ${t.extendee.typeName}`)}function Hi(t,e){const n=t.localName;if(t.repeated)return e[n].length>0;if(t.oneof)return e[t.oneof.localName].case===n;switch(t.kind){case"enum":case"scalar":return t.opt||t.req?e[n]!==void 0:t.kind=="enum"?e[n]!==t.T.values[0].no:!Vi(t.T,e[n]);case"message":return e[n]!==void 0;case"map":return Object.keys(e[n]).length>0}}function Ki(t,e){const n=t.localName,a=!t.opt&&!t.req;if(t.repeated)e[n]=[];else if(t.oneof)e[t.oneof.localName]={case:void 0};else switch(t.kind){case"map":e[n]={};break;case"enum":e[n]=a?t.T.values[0].no:void 0;break;case"scalar":e[n]=a?dn(t.T,t.L):void 0;break;case"message":e[n]=void 0;break}}function en(t,e){if(t===null||typeof t!="object"||!Object.getOwnPropertyNames(w.prototype).every(a=>a in t&&typeof t[a]=="function"))return!1;const n=t.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:e===void 0?!0:n.typeName==e.typeName}function Xi(t,e){return en(e)||!t.fieldWrapper?e:t.fieldWrapper.wrapField(e)}S.DOUBLE,S.FLOAT,S.INT64,S.UINT64,S.INT32,S.UINT32,S.BOOL,S.STRING,S.BYTES;const Qi={ignoreUnknownFields:!1},Zi={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function BR(t){return t?Object.assign(Object.assign({},Qi),t):Qi}function FR(t){return t?Object.assign(Object.assign({},Zi),t):Zi}const ea=Symbol(),na=Symbol();function xR(){return{makeReadOptions:BR,makeWriteOptions:FR,readMessage(t,e,n,a){if(e==null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message ${t.typeName} from JSON: ${ie(e)}`);a=a??new t;const o=new Map,i=n.typeRegistry;for(const[r,c]of Object.entries(e)){const l=t.fields.findJsonName(r);if(l){if(l.oneof){if(c===null&&l.kind=="scalar")continue;const d=o.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${r}"`);o.set(l.oneof,r)}er(a,c,l,n,t)}else{let d=!1;if(i?.findExtension&&r.startsWith("[")&&r.endsWith("]")){const u=i.findExtension(r.substring(1,r.length-1));if(u&&u.extendee.typeName==t.typeName){d=!0;const[h,I]=Yi(u);er(h,c,u.field,n,u),GR(a,u,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${t.typeName} from JSON: key "${r}" is unknown`)}}return a},writeMessage(t,e){const n=t.getType(),a={};let o;try{for(o of n.fields.byNumber()){if(!Hi(o,t)){if(o.req)throw"required field not set";if(!e.emitDefaultValues||!zR(o))continue}const r=o.oneof?t[o.oneof.localName].value:t[o.localName],c=nr(o,r,e);c!==void 0&&(a[e.useProtoFieldName?o.name:o.jsonName]=c)}const i=e.typeRegistry;if(i?.findExtensionFor)for(const r of n.runtime.bin.listUnknownFields(t)){const c=i.findExtensionFor(n.typeName,r.no);if(c&&Wi(t,c)){const l=LR(t,c,e),d=nr(c.field,l,e);d!==void 0&&(a[c.field.jsonName]=d)}}}catch(i){const r=o?`cannot encode field ${n.typeName}.${o.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,c=i instanceof Error?i.message:String(i);throw new Error(r+(c.length>0?`: ${c}`:""))}return a},readScalar(t,e,n){return Sn(t,e,n??ze.BIGINT,!0)},writeScalar(t,e,n){if(e!==void 0&&(n||Vi(t,e)))return aa(t,e)},debug:ie}}function ie(t){if(t===null)return"null";switch(typeof t){case"object":return Array.isArray(t)?"array":"object";case"string":return t.length>100?"string":`"${t.split('"').join('\\"')}"`;default:return String(t)}}function er(t,e,n,a,o){let i=n.localName;if(n.repeated){if(G(n.kind!="map"),e===null)return;if(!Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(e)}`);const r=t[i];for(const c of e){if(c===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(c)}`);switch(n.kind){case"message":r.push(n.T.fromJson(c,a));break;case"enum":const l=ut(n.T,c,a.ignoreUnknownFields,!0);l!==na&&r.push(l);break;case"scalar":try{r.push(Sn(n.T,c,n.L,!0))}catch(d){let u=`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(c)}`;throw d instanceof Error&&d.message.length>0&&(u+=`: ${d.message}`),new Error(u)}break}}}else if(n.kind=="map"){if(e===null)return;if(typeof e!="object"||Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(e)}`);const r=t[i];for(const[c,l]of Object.entries(e)){if(l===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: map value null`);let d;try{d=JR(n.K,c)}catch(u){let h=`cannot decode map key for field ${o.typeName}.${n.name} from JSON: ${ie(e)}`;throw u instanceof Error&&u.message.length>0&&(h+=`: ${u.message}`),new Error(h)}switch(n.V.kind){case"message":r[d]=n.V.T.fromJson(l,a);break;case"enum":const u=ut(n.V.T,l,a.ignoreUnknownFields,!0);u!==na&&(r[d]=u);break;case"scalar":try{r[d]=Sn(n.V.T,l,ze.BIGINT,!0)}catch(h){let I=`cannot decode map value for field ${o.typeName}.${n.name} from JSON: ${ie(e)}`;throw h instanceof Error&&h.message.length>0&&(I+=`: ${h.message}`),new Error(I)}break}}}else switch(n.oneof&&(t=t[n.oneof.localName]={case:i},i="value"),n.kind){case"message":const r=n.T;if(e===null&&r.typeName!="google.protobuf.Value")return;let c=t[i];en(c)?c.fromJson(e,a):(t[i]=c=r.fromJson(e,a),r.fieldWrapper&&!n.oneof&&(t[i]=r.fieldWrapper.unwrapField(c)));break;case"enum":const l=ut(n.T,e,a.ignoreUnknownFields,!1);switch(l){case ea:Ki(n,t);break;case na:break;default:t[i]=l;break}break;case"scalar":try{const d=Sn(n.T,e,n.L,!1);switch(d){case ea:Ki(n,t);break;default:t[i]=d;break}}catch(d){let u=`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(e)}`;throw d instanceof Error&&d.message.length>0&&(u+=`: ${d.message}`),new Error(u)}break}}function JR(t,e){if(t===S.BOOL)switch(e){case"true":e=!0;break;case"false":e=!1;break}return Sn(t,e,ze.BIGINT,!0).toString()}function Sn(t,e,n,a){if(e===null)return a?dn(t,n):ea;switch(t){case S.DOUBLE:case S.FLOAT:if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""||typeof e=="string"&&e.trim().length!==e.length||typeof e!="string"&&typeof e!="number")break;const o=Number(e);if(Number.isNaN(o)||!Number.isFinite(o))break;return t==S.FLOAT&&Ai(o),o;case S.INT32:case S.FIXED32:case S.SFIXED32:case S.SINT32:case S.UINT32:let i;if(typeof e=="number"?i=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(i=Number(e)),i===void 0)break;return t==S.UINT32||t==S.FIXED32?ct(i):Xn(i),i;case S.INT64:case S.SFIXED64:case S.SINT64:if(typeof e!="number"&&typeof e!="string")break;const r=W.parse(e);return n?r.toString():r;case S.FIXED64:case S.UINT64:if(typeof e!="number"&&typeof e!="string")break;const c=W.uParse(e);return n?c.toString():c;case S.BOOL:if(typeof e!="boolean")break;return e;case S.STRING:if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case S.BYTES:if(e==="")return new Uint8Array(0);if(typeof e!="string")break;return pt.dec(e)}throw new Error}function ut(t,e,n,a){if(e===null)return t.typeName=="google.protobuf.NullValue"?0:a?t.values[0].no:ea;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":const o=t.findName(e);if(o!==void 0)return o.no;if(n)return na;break}throw new Error(`cannot decode enum ${t.typeName} from JSON: ${ie(e)}`)}function zR(t){return t.repeated||t.kind=="map"?!0:!(t.oneof||t.kind=="message"||t.opt||t.req)}function nr(t,e,n){if(t.kind=="map"){G(typeof e=="object"&&e!=null);const a={},o=Object.entries(e);switch(t.V.kind){case"scalar":for(const[r,c]of o)a[r.toString()]=aa(t.V.T,c);break;case"message":for(const[r,c]of o)a[r.toString()]=c.toJson(n);break;case"enum":const i=t.V.T;for(const[r,c]of o)a[r.toString()]=gt(i,c,n.enumAsInteger);break}return n.emitDefaultValues||o.length>0?a:void 0}if(t.repeated){G(Array.isArray(e));const a=[];switch(t.kind){case"scalar":for(let o=0;o<e.length;o++)a.push(aa(t.T,e[o]));break;case"enum":for(let o=0;o<e.length;o++)a.push(gt(t.T,e[o],n.enumAsInteger));break;case"message":for(let o=0;o<e.length;o++)a.push(e[o].toJson(n));break}return n.emitDefaultValues||a.length>0?a:void 0}switch(t.kind){case"scalar":return aa(t.T,e);case"enum":return gt(t.T,e,n.enumAsInteger);case"message":return Xi(t.T,e).toJson(n)}}function gt(t,e,n){var a;if(G(typeof e=="number"),t.typeName=="google.protobuf.NullValue")return null;if(n)return e;const o=t.findNumber(e);return(a=o?.name)!==null&&a!==void 0?a:e}function aa(t,e){switch(t){case S.INT32:case S.SFIXED32:case S.SINT32:case S.FIXED32:case S.UINT32:return G(typeof e=="number"),e;case S.FLOAT:case S.DOUBLE:return G(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e;case S.STRING:return G(typeof e=="string"),e;case S.BOOL:return G(typeof e=="boolean"),e;case S.UINT64:case S.FIXED64:case S.INT64:case S.SFIXED64:case S.SINT64:return G(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),e.toString();case S.BYTES:return G(e instanceof Uint8Array),pt.enc(e)}}const pn=Symbol("@bufbuild/protobuf/unknown-fields"),ar={readUnknownFields:!0,readerFactory:t=>new $i(t)},tr={writeUnknownFields:!0,writerFactory:()=>new PR};function VR(t){return t?Object.assign(Object.assign({},ar),t):ar}function $R(t){return t?Object.assign(Object.assign({},tr),t):tr}function YR(){return{makeReadOptions:VR,makeWriteOptions:$R,listUnknownFields(t){var e;return(e=t[pn])!==null&&e!==void 0?e:[]},discardUnknownFields(t){delete t[pn]},writeUnknownFields(t,e){const a=t[pn];if(a)for(const o of a)e.tag(o.no,o.wireType).raw(o.data)},onUnknownField(t,e,n,a){const o=t;Array.isArray(o[pn])||(o[pn]=[]),o[pn].push({no:e,wireType:n,data:a})},readMessage(t,e,n,a,o){const i=t.getType(),r=o?e.len:e.pos+n;let c,l;for(;e.pos<r&&([c,l]=e.tag(),!(o===!0&&l==x.EndGroup));){const d=i.fields.find(c);if(!d){const u=e.skip(l,c);a.readUnknownFields&&this.onUnknownField(t,c,l,u);continue}sr(t,e,d,l,a)}if(o&&(l!=x.EndGroup||c!==n))throw new Error("invalid end group tag")},readField:sr,writeMessage(t,e,n){const a=t.getType();for(const o of a.fields.byNumber()){if(!Hi(o,t)){if(o.req)throw new Error(`cannot encode field ${a.typeName}.${o.name} to binary: required field not set`);continue}const i=o.oneof?t[o.oneof.localName].value:t[o.localName];or(o,i,e,n)}return n.writeUnknownFields&&this.writeUnknownFields(t,e),e},writeField(t,e,n,a){e!==void 0&&or(t,e,n,a)}}}function sr(t,e,n,a,o){let{repeated:i,localName:r}=n;switch(n.oneof&&(t=t[n.oneof.localName],t.case!=r&&delete t.value,t.case=r,r="value"),n.kind){case"scalar":case"enum":const c=n.kind=="enum"?S.INT32:n.T;let l=sa;if(n.kind=="scalar"&&n.L>0&&(l=jR),i){let I=t[r];if(a==x.LengthDelimited&&c!=S.STRING&&c!=S.BYTES){let E=e.uint32()+e.pos;for(;e.pos<E;)I.push(l(e,c))}else I.push(l(e,c))}else t[r]=l(e,c);break;case"message":const d=n.T;i?t[r].push(ta(e,new d,o,n)):en(t[r])?ta(e,t[r],o,n):(t[r]=ta(e,new d,o,n),d.fieldWrapper&&!n.oneof&&!n.repeated&&(t[r]=d.fieldWrapper.unwrapField(t[r])));break;case"map":let[u,h]=WR(n,e,o);t[r][u]=h;break}}function ta(t,e,n,a){const o=e.getType().runtime.bin,i=a?.delimited;return o.readMessage(e,t,i?a.no:t.uint32(),n,i),e}function WR(t,e,n){const a=e.uint32(),o=e.pos+a;let i,r;for(;e.pos<o;){const[c]=e.tag();switch(c){case 1:i=sa(e,t.K);break;case 2:switch(t.V.kind){case"scalar":r=sa(e,t.V.T);break;case"enum":r=e.int32();break;case"message":r=ta(e,new t.V.T,n,void 0);break}break}}if(i===void 0&&(i=dn(t.K,ze.BIGINT)),typeof i!="string"&&typeof i!="number"&&(i=i.toString()),r===void 0)switch(t.V.kind){case"scalar":r=dn(t.V.T,ze.BIGINT);break;case"enum":r=t.V.T.values[0].no;break;case"message":r=new t.V.T;break}return[i,r]}function jR(t,e){const n=sa(t,e);return typeof n=="bigint"?n.toString():n}function sa(t,e){switch(e){case S.STRING:return t.string();case S.BOOL:return t.bool();case S.DOUBLE:return t.double();case S.FLOAT:return t.float();case S.INT32:return t.int32();case S.INT64:return t.int64();case S.UINT64:return t.uint64();case S.FIXED64:return t.fixed64();case S.BYTES:return t.bytes();case S.FIXED32:return t.fixed32();case S.SFIXED32:return t.sfixed32();case S.SFIXED64:return t.sfixed64();case S.SINT64:return t.sint64();case S.UINT32:return t.uint32();case S.SINT32:return t.sint32()}}function or(t,e,n,a){G(e!==void 0);const o=t.repeated;switch(t.kind){case"scalar":case"enum":let i=t.kind=="enum"?S.INT32:t.T;if(o)if(G(Array.isArray(e)),t.packed)KR(n,i,t.no,e);else for(const r of e)In(n,i,t.no,r);else In(n,i,t.no,e);break;case"message":if(o){G(Array.isArray(e));for(const r of e)ir(n,a,t,r)}else ir(n,a,t,e);break;case"map":G(typeof e=="object"&&e!=null);for(const[r,c]of Object.entries(e))HR(n,a,t,r,c);break}}function HR(t,e,n,a,o){t.tag(n.no,x.LengthDelimited),t.fork();let i=a;switch(n.K){case S.INT32:case S.FIXED32:case S.UINT32:case S.SFIXED32:case S.SINT32:i=Number.parseInt(a);break;case S.BOOL:G(a=="true"||a=="false"),i=a=="true";break}switch(In(t,n.K,1,i),n.V.kind){case"scalar":In(t,n.V.T,2,o);break;case"enum":In(t,S.INT32,2,o);break;case"message":G(o!==void 0),t.tag(2,x.LengthDelimited).bytes(o.toBinary(e));break}t.join()}function ir(t,e,n,a){const o=Xi(n.T,a);n.delimited?t.tag(n.no,x.StartGroup).raw(o.toBinary(e)).tag(n.no,x.EndGroup):t.tag(n.no,x.LengthDelimited).bytes(o.toBinary(e))}function In(t,e,n,a){G(a!==void 0);let[o,i]=rr(e);t.tag(n,o)[i](a)}function KR(t,e,n,a){if(!a.length)return;t.tag(n,x.LengthDelimited).fork();let[,o]=rr(e);for(let i=0;i<a.length;i++)t[o](a[i]);t.join()}function rr(t){let e=x.Varint;switch(t){case S.BYTES:case S.STRING:e=x.LengthDelimited;break;case S.DOUBLE:case S.FIXED64:case S.SFIXED64:e=x.Bit64;break;case S.FIXED32:case S.SFIXED32:case S.FLOAT:e=x.Bit32;break}const n=S[t].toLowerCase();return[e,n]}function XR(){return{setEnumType:Ui,initPartial(t,e){if(t===void 0)return;const n=e.getType();for(const a of n.fields.byMember()){const o=a.localName,i=e,r=t;if(r[o]!=null)switch(a.kind){case"oneof":const c=r[o].case;if(c===void 0)continue;const l=a.findField(c);let d=r[o].value;l&&l.kind=="message"&&!en(d,l.T)?d=new l.T(d):l&&l.kind==="scalar"&&l.T===S.BYTES&&(d=En(d)),i[o]={case:c,value:d};break;case"scalar":case"enum":let u=r[o];a.T===S.BYTES&&(u=a.repeated?u.map(En):En(u)),i[o]=u;break;case"map":switch(a.V.kind){case"scalar":case"enum":if(a.V.T===S.BYTES)for(const[R,E]of Object.entries(r[o]))i[o][R]=En(E);else Object.assign(i[o],r[o]);break;case"message":const I=a.V.T;for(const R of Object.keys(r[o])){let E=r[o][R];I.fieldWrapper||(E=new I(E)),i[o][R]=E}break}break;case"message":const h=a.T;if(a.repeated)i[o]=r[o].map(I=>en(I,h)?I:new h(I));else{const I=r[o];h.fieldWrapper?h.typeName==="google.protobuf.BytesValue"?i[o]=En(I):i[o]=I:i[o]=en(I,h)?I:new h(I)}break}}},equals(t,e,n){return e===n?!0:!e||!n?!1:t.fields.byMember().every(a=>{const o=e[a.localName],i=n[a.localName];if(a.repeated){if(o.length!==i.length)return!1;switch(a.kind){case"message":return o.every((r,c)=>a.T.equals(r,i[c]));case"scalar":return o.every((r,c)=>Ve(a.T,r,i[c]));case"enum":return o.every((r,c)=>Ve(S.INT32,r,i[c]))}throw new Error(`repeated cannot contain ${a.kind}`)}switch(a.kind){case"message":return a.T.equals(o,i);case"enum":return Ve(S.INT32,o,i);case"scalar":return Ve(a.T,o,i);case"oneof":if(o.case!==i.case)return!1;const r=a.findField(o.case);if(r===void 0)return!0;switch(r.kind){case"message":return r.T.equals(o.value,i.value);case"enum":return Ve(S.INT32,o.value,i.value);case"scalar":return Ve(r.T,o.value,i.value)}throw new Error(`oneof cannot contain ${r.kind}`);case"map":const c=Object.keys(o).concat(Object.keys(i));switch(a.V.kind){case"message":const l=a.V.T;return c.every(u=>l.equals(o[u],i[u]));case"enum":return c.every(u=>Ve(S.INT32,o[u],i[u]));case"scalar":const d=a.V.T;return c.every(u=>Ve(d,o[u],i[u]))}break}})},clone(t){const e=t.getType(),n=new e,a=n;for(const o of e.fields.byMember()){const i=t[o.localName];let r;if(o.repeated)r=i.map(oa);else if(o.kind=="map"){r=a[o.localName];for(const[c,l]of Object.entries(i))r[c]=oa(l)}else o.kind=="oneof"?r=o.findField(i.case)?{case:i.case,value:oa(i.value)}:{case:void 0}:r=oa(i);a[o.localName]=r}for(const o of e.runtime.bin.listUnknownFields(t))e.runtime.bin.onUnknownField(a,o.no,o.wireType,o.data);return n}}}function oa(t){if(t===void 0)return t;if(en(t))return t.clone();if(t instanceof Uint8Array){const e=new Uint8Array(t.byteLength);return e.set(t),e}return t}function En(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function mr(t,e,n){return{syntax:t,json:xR(),bin:YR(),util:Object.assign(Object.assign({},XR()),{newFieldList:e,initFields:n}),makeMessageType(a,o,i){return MR(this,a,o,i)},makeEnum:OR,makeEnumType:Li,getEnumType:ER,makeExtension(a,o,i){return AR(this,a,o,i)}}}class cr{constructor(e,n){this._fields=e,this._normalizer=n}findJsonName(e){if(!this.jsonNames){const n={};for(const a of this.list())n[a.jsonName]=n[a.name]=a;this.jsonNames=n}return this.jsonNames[e]}find(e){if(!this.numbers){const n={};for(const a of this.list())n[a.no]=a;this.numbers=n}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,n)=>e.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let n;for(const a of this.list())a.oneof?a.oneof!==n&&(n=a.oneof,e.push(n)):e.push(a)}return this.members}}function lr(t,e){const n=dr(t);return e?n:t1(a1(n))}function QR(t){return lr(t,!1)}const ZR=dr;function dr(t){let e=!1;const n=[];for(let a=0;a<t.length;a++){let o=t.charAt(a);switch(o){case"_":e=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(o),e=!1;break;default:e&&(e=!1,o=o.toUpperCase()),n.push(o);break}}return n.join("")}const e1=new Set(["constructor","toString","toJSON","valueOf"]),n1=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),pr=t=>`${t}$`,a1=t=>n1.has(t)?pr(t):t,t1=t=>e1.has(t)?pr(t):t;class s1{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=QR(e)}addField(e){G(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;n<this.fields.length;n++)this._lookup[this.fields[n].localName]=this.fields[n]}return this._lookup[e]}}function ur(t,e){var n,a,o,i,r,c;const l=[];let d;for(const u of typeof t=="function"?t():t){const h=u;if(h.localName=lr(u.name,u.oneof!==void 0),h.jsonName=(n=u.jsonName)!==null&&n!==void 0?n:ZR(u.name),h.repeated=(a=u.repeated)!==null&&a!==void 0?a:!1,u.kind=="scalar"&&(h.L=(o=u.L)!==null&&o!==void 0?o:ze.BIGINT),h.delimited=(i=u.delimited)!==null&&i!==void 0?i:!1,h.req=(r=u.req)!==null&&r!==void 0?r:!1,h.opt=(c=u.opt)!==null&&c!==void 0?c:!1,u.packed===void 0&&(e?h.packed=u.kind=="enum"||u.kind=="scalar"&&u.T!=S.BYTES&&u.T!=S.STRING:h.packed=!1),u.oneof!==void 0){const I=typeof u.oneof=="string"?u.oneof:u.oneof.name;(!d||d.name!=I)&&(d=new s1(I)),h.oneof=d,d.addField(h)}l.push(h)}return l}const s=mr("proto3",t=>new cr(t,e=>ur(e,!0)),t=>{for(const e of t.getType().fields.byMember()){if(e.opt)continue;const n=e.localName,a=t;if(e.repeated){a[n]=[];continue}switch(e.kind){case"oneof":a[n]={case:void 0};break;case"enum":a[n]=0;break;case"map":a[n]={};break;case"scalar":a[n]=dn(e.T,e.L);break}}}),T=mr("proto2",t=>new cr(t,e=>ur(e,!1)),t=>{for(const e of t.getType().fields.byMember()){const n=e.localName,a=t;if(e.repeated){a[n]=[];continue}switch(e.kind){case"oneof":a[n]={case:void 0};break;case"map":a[n]={};break}}});var m;(function(t){t[t.Unary=0]="Unary",t[t.ServerStreaming=1]="ServerStreaming",t[t.ClientStreaming=2]="ClientStreaming",t[t.BiDiStreaming=3]="BiDiStreaming"})(m||(m={}));var gr;(function(t){t[t.NoSideEffects=1]="NoSideEffects",t[t.Idempotent=2]="Idempotent"})(gr||(gr={}));var te;(function(t){t[t.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",t[t.EDITION_LEGACY=900]="EDITION_LEGACY",t[t.EDITION_PROTO2=998]="EDITION_PROTO2",t[t.EDITION_PROTO3=999]="EDITION_PROTO3",t[t.EDITION_2023=1e3]="EDITION_2023",t[t.EDITION_2024=1001]="EDITION_2024",t[t.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",t[t.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",t[t.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",t[t.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",t[t.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",t[t.EDITION_MAX=2147483647]="EDITION_MAX"})(te||(te={})),T.util.setEnumType(te,"google.protobuf.Edition",[{no:0,name:"EDITION_UNKNOWN"},{no:900,name:"EDITION_LEGACY"},{no:998,name:"EDITION_PROTO2"},{no:999,name:"EDITION_PROTO3"},{no:1e3,name:"EDITION_2023"},{no:1001,name:"EDITION_2024"},{no:1,name:"EDITION_1_TEST_ONLY"},{no:2,name:"EDITION_2_TEST_ONLY"},{no:99997,name:"EDITION_99997_TEST_ONLY"},{no:99998,name:"EDITION_99998_TEST_ONLY"},{no:99999,name:"EDITION_99999_TEST_ONLY"},{no:2147483647,name:"EDITION_MAX"}]);class $e extends w{constructor(e){super(),this.file=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new $e().fromBinary(e,n)}static fromJson(e,n){return new $e().fromJson(e,n)}static fromJsonString(e,n){return new $e().fromJsonString(e,n)}static equals(e,n){return T.util.equals($e,e,n)}}$e.runtime=T,$e.typeName="google.protobuf.FileDescriptorSet",$e.fields=T.util.newFieldList(()=>[{no:1,name:"file",kind:"message",T:re,repeated:!0}]);class re extends w{constructor(e){super(),this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new re().fromBinary(e,n)}static fromJson(e,n){return new re().fromJson(e,n)}static fromJsonString(e,n){return new re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(re,e,n)}}re.runtime=T,re.typeName="google.protobuf.FileDescriptorProto",re.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"package",kind:"scalar",T:9,opt:!0},{no:3,name:"dependency",kind:"scalar",T:9,repeated:!0},{no:10,name:"public_dependency",kind:"scalar",T:5,repeated:!0},{no:11,name:"weak_dependency",kind:"scalar",T:5,repeated:!0},{no:4,name:"message_type",kind:"message",T:me,repeated:!0},{no:5,name:"enum_type",kind:"message",T:ce,repeated:!0},{no:6,name:"service",kind:"message",T:Oe,repeated:!0},{no:7,name:"extension",kind:"message",T:se,repeated:!0},{no:8,name:"options",kind:"message",T:be,opt:!0},{no:9,name:"source_code_info",kind:"message",T:Ge,opt:!0},{no:12,name:"syntax",kind:"scalar",T:9,opt:!0},{no:14,name:"edition",kind:"enum",T:T.getEnumType(te),opt:!0}]);class me extends w{constructor(e){super(),this.field=[],this.extension=[],this.nestedType=[],this.enumType=[],this.extensionRange=[],this.oneofDecl=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new me().fromBinary(e,n)}static fromJson(e,n){return new me().fromJson(e,n)}static fromJsonString(e,n){return new me().fromJsonString(e,n)}static equals(e,n){return T.util.equals(me,e,n)}}me.runtime=T,me.typeName="google.protobuf.DescriptorProto",me.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"field",kind:"message",T:se,repeated:!0},{no:6,name:"extension",kind:"message",T:se,repeated:!0},{no:3,name:"nested_type",kind:"message",T:me,repeated:!0},{no:4,name:"enum_type",kind:"message",T:ce,repeated:!0},{no:5,name:"extension_range",kind:"message",T:he,repeated:!0},{no:8,name:"oneof_decl",kind:"message",T:Se,repeated:!0},{no:7,name:"options",kind:"message",T:we,opt:!0},{no:9,name:"reserved_range",kind:"message",T:fe,repeated:!0},{no:10,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class he extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new he().fromBinary(e,n)}static fromJson(e,n){return new he().fromJson(e,n)}static fromJsonString(e,n){return new he().fromJsonString(e,n)}static equals(e,n){return T.util.equals(he,e,n)}}he.runtime=T,he.typeName="google.protobuf.DescriptorProto.ExtensionRange",he.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Re,opt:!0}]);class fe extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new fe().fromBinary(e,n)}static fromJson(e,n){return new fe().fromJson(e,n)}static fromJsonString(e,n){return new fe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(fe,e,n)}}fe.runtime=T,fe.typeName="google.protobuf.DescriptorProto.ReservedRange",fe.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class Re extends w{constructor(e){super(),this.uninterpretedOption=[],this.declaration=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Re().fromBinary(e,n)}static fromJson(e,n){return new Re().fromJson(e,n)}static fromJsonString(e,n){return new Re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Re,e,n)}}Re.runtime=T,Re.typeName="google.protobuf.ExtensionRangeOptions",Re.fields=T.util.newFieldList(()=>[{no:999,name:"uninterpreted_option",kind:"message",T:j,repeated:!0},{no:2,name:"declaration",kind:"message",T:_e,repeated:!0},{no:50,name:"features",kind:"message",T:$,opt:!0},{no:3,name:"verification",kind:"enum",T:T.getEnumType(On),opt:!0,default:On.UNVERIFIED}]);var On;(function(t){t[t.DECLARATION=0]="DECLARATION",t[t.UNVERIFIED=1]="UNVERIFIED"})(On||(On={})),T.util.setEnumType(On,"google.protobuf.ExtensionRangeOptions.VerificationState",[{no:0,name:"DECLARATION"},{no:1,name:"UNVERIFIED"}]);class _e extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new _e().fromBinary(e,n)}static fromJson(e,n){return new _e().fromJson(e,n)}static fromJsonString(e,n){return new _e().fromJsonString(e,n)}static equals(e,n){return T.util.equals(_e,e,n)}}_e.runtime=T,_e.typeName="google.protobuf.ExtensionRangeOptions.Declaration",_e.fields=T.util.newFieldList(()=>[{no:1,name:"number",kind:"scalar",T:5,opt:!0},{no:2,name:"full_name",kind:"scalar",T:9,opt:!0},{no:3,name:"type",kind:"scalar",T:9,opt:!0},{no:5,name:"reserved",kind:"scalar",T:8,opt:!0},{no:6,name:"repeated",kind:"scalar",T:8,opt:!0}]);class se extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new se().fromBinary(e,n)}static fromJson(e,n){return new se().fromJson(e,n)}static fromJsonString(e,n){return new se().fromJsonString(e,n)}static equals(e,n){return T.util.equals(se,e,n)}}se.runtime=T,se.typeName="google.protobuf.FieldDescriptorProto",se.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"number",kind:"scalar",T:5,opt:!0},{no:4,name:"label",kind:"enum",T:T.getEnumType(ra),opt:!0},{no:5,name:"type",kind:"enum",T:T.getEnumType(ia),opt:!0},{no:6,name:"type_name",kind:"scalar",T:9,opt:!0},{no:2,name:"extendee",kind:"scalar",T:9,opt:!0},{no:7,name:"default_value",kind:"scalar",T:9,opt:!0},{no:9,name:"oneof_index",kind:"scalar",T:5,opt:!0},{no:10,name:"json_name",kind:"scalar",T:9,opt:!0},{no:8,name:"options",kind:"message",T:Ce,opt:!0},{no:17,name:"proto3_optional",kind:"scalar",T:8,opt:!0}]);var ia;(function(t){t[t.DOUBLE=1]="DOUBLE",t[t.FLOAT=2]="FLOAT",t[t.INT64=3]="INT64",t[t.UINT64=4]="UINT64",t[t.INT32=5]="INT32",t[t.FIXED64=6]="FIXED64",t[t.FIXED32=7]="FIXED32",t[t.BOOL=8]="BOOL",t[t.STRING=9]="STRING",t[t.GROUP=10]="GROUP",t[t.MESSAGE=11]="MESSAGE",t[t.BYTES=12]="BYTES",t[t.UINT32=13]="UINT32",t[t.ENUM=14]="ENUM",t[t.SFIXED32=15]="SFIXED32",t[t.SFIXED64=16]="SFIXED64",t[t.SINT32=17]="SINT32",t[t.SINT64=18]="SINT64"})(ia||(ia={})),T.util.setEnumType(ia,"google.protobuf.FieldDescriptorProto.Type",[{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]);var ra;(function(t){t[t.OPTIONAL=1]="OPTIONAL",t[t.REPEATED=3]="REPEATED",t[t.REQUIRED=2]="REQUIRED"})(ra||(ra={})),T.util.setEnumType(ra,"google.protobuf.FieldDescriptorProto.Label",[{no:1,name:"LABEL_OPTIONAL"},{no:3,name:"LABEL_REPEATED"},{no:2,name:"LABEL_REQUIRED"}]);class Se extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Se().fromBinary(e,n)}static fromJson(e,n){return new Se().fromJson(e,n)}static fromJsonString(e,n){return new Se().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Se,e,n)}}Se.runtime=T,Se.typeName="google.protobuf.OneofDescriptorProto",Se.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"options",kind:"message",T:Ne,opt:!0}]);class ce extends w{constructor(e){super(),this.value=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new ce().fromBinary(e,n)}static fromJson(e,n){return new ce().fromJson(e,n)}static fromJsonString(e,n){return new ce().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ce,e,n)}}ce.runtime=T,ce.typeName="google.protobuf.EnumDescriptorProto",ce.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"value",kind:"message",T:Ee,repeated:!0},{no:3,name:"options",kind:"message",T:Pe,opt:!0},{no:4,name:"reserved_range",kind:"message",T:Ie,repeated:!0},{no:5,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class Ie extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ie().fromBinary(e,n)}static fromJson(e,n){return new Ie().fromJson(e,n)}static fromJsonString(e,n){return new Ie().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ie,e,n)}}Ie.runtime=T,Ie.typeName="google.protobuf.EnumDescriptorProto.EnumReservedRange",Ie.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class Ee extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ee().fromBinary(e,n)}static fromJson(e,n){return new Ee().fromJson(e,n)}static fromJsonString(e,n){return new Ee().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ee,e,n)}}Ee.runtime=T,Ee.typeName="google.protobuf.EnumValueDescriptorProto",Ee.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"number",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Ae,opt:!0}]);class Oe extends w{constructor(e){super(),this.method=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Oe().fromBinary(e,n)}static fromJson(e,n){return new Oe().fromJson(e,n)}static fromJsonString(e,n){return new Oe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Oe,e,n)}}Oe.runtime=T,Oe.typeName="google.protobuf.ServiceDescriptorProto",Oe.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"method",kind:"message",T:Me,repeated:!0},{no:3,name:"options",kind:"message",T:qe,opt:!0}]);class Me extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Me().fromBinary(e,n)}static fromJson(e,n){return new Me().fromJson(e,n)}static fromJsonString(e,n){return new Me().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Me,e,n)}}Me.runtime=T,Me.typeName="google.protobuf.MethodDescriptorProto",Me.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"input_type",kind:"scalar",T:9,opt:!0},{no:3,name:"output_type",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:de,opt:!0},{no:5,name:"client_streaming",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"server_streaming",kind:"scalar",T:8,opt:!0,default:!1}]);class be extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new be().fromBinary(e,n)}static fromJson(e,n){return new be().fromJson(e,n)}static fromJsonString(e,n){return new be().fromJsonString(e,n)}static equals(e,n){return T.util.equals(be,e,n)}}be.runtime=T,be.typeName="google.protobuf.FileOptions",be.fields=T.util.newFieldList(()=>[{no:1,name:"java_package",kind:"scalar",T:9,opt:!0},{no:8,name:"java_outer_classname",kind:"scalar",T:9,opt:!0},{no:10,name:"java_multiple_files",kind:"scalar",T:8,opt:!0,default:!1},{no:20,name:"java_generate_equals_and_hash",kind:"scalar",T:8,opt:!0},{no:27,name:"java_string_check_utf8",kind:"scalar",T:8,opt:!0,default:!1},{no:9,name:"optimize_for",kind:"enum",T:T.getEnumType(Mn),opt:!0,default:Mn.SPEED},{no:11,name:"go_package",kind:"scalar",T:9,opt:!0},{no:16,name:"cc_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"java_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:18,name:"py_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:23,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:31,name:"cc_enable_arenas",kind:"scalar",T:8,opt:!0,default:!0},{no:36,name:"objc_class_prefix",kind:"scalar",T:9,opt:!0},{no:37,name:"csharp_namespace",kind:"scalar",T:9,opt:!0},{no:39,name:"swift_prefix",kind:"scalar",T:9,opt:!0},{no:40,name:"php_class_prefix",kind:"scalar",T:9,opt:!0},{no:41,name:"php_namespace",kind:"scalar",T:9,opt:!0},{no:44,name:"php_metadata_namespace",kind:"scalar",T:9,opt:!0},{no:45,name:"ruby_package",kind:"scalar",T:9,opt:!0},{no:50,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:j,repeated:!0}]);var Mn;(function(t){t[t.SPEED=1]="SPEED",t[t.CODE_SIZE=2]="CODE_SIZE",t[t.LITE_RUNTIME=3]="LITE_RUNTIME"})(Mn||(Mn={})),T.util.setEnumType(Mn,"google.protobuf.FileOptions.OptimizeMode",[{no:1,name:"SPEED"},{no:2,name:"CODE_SIZE"},{no:3,name:"LITE_RUNTIME"}]);class we extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new we().fromBinary(e,n)}static fromJson(e,n){return new we().fromJson(e,n)}static fromJsonString(e,n){return new we().fromJsonString(e,n)}static equals(e,n){return T.util.equals(we,e,n)}}we.runtime=T,we.typeName="google.protobuf.MessageOptions",we.fields=T.util.newFieldList(()=>[{no:1,name:"message_set_wire_format",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"no_standard_descriptor_accessor",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:7,name:"map_entry",kind:"scalar",T:8,opt:!0},{no:11,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:12,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:j,repeated:!0}]);class Ce extends w{constructor(e){super(),this.targets=[],this.editionDefaults=[],this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ce().fromBinary(e,n)}static fromJson(e,n){return new Ce().fromJson(e,n)}static fromJsonString(e,n){return new Ce().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ce,e,n)}}Ce.runtime=T,Ce.typeName="google.protobuf.FieldOptions",Ce.fields=T.util.newFieldList(()=>[{no:1,name:"ctype",kind:"enum",T:T.getEnumType(bn),opt:!0,default:bn.STRING},{no:2,name:"packed",kind:"scalar",T:8,opt:!0},{no:6,name:"jstype",kind:"enum",T:T.getEnumType(wn),opt:!0,default:wn.JS_NORMAL},{no:5,name:"lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:15,name:"unverified_lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:10,name:"weak",kind:"scalar",T:8,opt:!0,default:!1},{no:16,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"retention",kind:"enum",T:T.getEnumType(ma),opt:!0},{no:19,name:"targets",kind:"enum",T:T.getEnumType(ca),repeated:!0},{no:20,name:"edition_defaults",kind:"message",T:De,repeated:!0},{no:21,name:"features",kind:"message",T:$,opt:!0},{no:22,name:"feature_support",kind:"message",T:le,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:j,repeated:!0}]);var bn;(function(t){t[t.STRING=0]="STRING",t[t.CORD=1]="CORD",t[t.STRING_PIECE=2]="STRING_PIECE"})(bn||(bn={})),T.util.setEnumType(bn,"google.protobuf.FieldOptions.CType",[{no:0,name:"STRING"},{no:1,name:"CORD"},{no:2,name:"STRING_PIECE"}]);var wn;(function(t){t[t.JS_NORMAL=0]="JS_NORMAL",t[t.JS_STRING=1]="JS_STRING",t[t.JS_NUMBER=2]="JS_NUMBER"})(wn||(wn={})),T.util.setEnumType(wn,"google.protobuf.FieldOptions.JSType",[{no:0,name:"JS_NORMAL"},{no:1,name:"JS_STRING"},{no:2,name:"JS_NUMBER"}]);var ma;(function(t){t[t.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",t[t.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",t[t.RETENTION_SOURCE=2]="RETENTION_SOURCE"})(ma||(ma={})),T.util.setEnumType(ma,"google.protobuf.FieldOptions.OptionRetention",[{no:0,name:"RETENTION_UNKNOWN"},{no:1,name:"RETENTION_RUNTIME"},{no:2,name:"RETENTION_SOURCE"}]);var ca;(function(t){t[t.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",t[t.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",t[t.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",t[t.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",t[t.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",t[t.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",t[t.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",t[t.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",t[t.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",t[t.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD"})(ca||(ca={})),T.util.setEnumType(ca,"google.protobuf.FieldOptions.OptionTargetType",[{no:0,name:"TARGET_TYPE_UNKNOWN"},{no:1,name:"TARGET_TYPE_FILE"},{no:2,name:"TARGET_TYPE_EXTENSION_RANGE"},{no:3,name:"TARGET_TYPE_MESSAGE"},{no:4,name:"TARGET_TYPE_FIELD"},{no:5,name:"TARGET_TYPE_ONEOF"},{no:6,name:"TARGET_TYPE_ENUM"},{no:7,name:"TARGET_TYPE_ENUM_ENTRY"},{no:8,name:"TARGET_TYPE_SERVICE"},{no:9,name:"TARGET_TYPE_METHOD"}]);class De extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new De().fromBinary(e,n)}static fromJson(e,n){return new De().fromJson(e,n)}static fromJsonString(e,n){return new De().fromJsonString(e,n)}static equals(e,n){return T.util.equals(De,e,n)}}De.runtime=T,De.typeName="google.protobuf.FieldOptions.EditionDefault",De.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(te),opt:!0},{no:2,name:"value",kind:"scalar",T:9,opt:!0}]);class le extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new le().fromBinary(e,n)}static fromJson(e,n){return new le().fromJson(e,n)}static fromJsonString(e,n){return new le().fromJsonString(e,n)}static equals(e,n){return T.util.equals(le,e,n)}}le.runtime=T,le.typeName="google.protobuf.FieldOptions.FeatureSupport",le.fields=T.util.newFieldList(()=>[{no:1,name:"edition_introduced",kind:"enum",T:T.getEnumType(te),opt:!0},{no:2,name:"edition_deprecated",kind:"enum",T:T.getEnumType(te),opt:!0},{no:3,name:"deprecation_warning",kind:"scalar",T:9,opt:!0},{no:4,name:"edition_removed",kind:"enum",T:T.getEnumType(te),opt:!0}]);class Ne extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ne().fromBinary(e,n)}static fromJson(e,n){return new Ne().fromJson(e,n)}static fromJsonString(e,n){return new Ne().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ne,e,n)}}Ne.runtime=T,Ne.typeName="google.protobuf.OneofOptions",Ne.fields=T.util.newFieldList(()=>[{no:1,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:j,repeated:!0}]);class Pe extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Pe().fromBinary(e,n)}static fromJson(e,n){return new Pe().fromJson(e,n)}static fromJsonString(e,n){return new Pe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Pe,e,n)}}Pe.runtime=T,Pe.typeName="google.protobuf.EnumOptions",Pe.fields=T.util.newFieldList(()=>[{no:2,name:"allow_alias",kind:"scalar",T:8,opt:!0},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:7,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:j,repeated:!0}]);class Ae extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ae().fromBinary(e,n)}static fromJson(e,n){return new Ae().fromJson(e,n)}static fromJsonString(e,n){return new Ae().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ae,e,n)}}Ae.runtime=T,Ae.typeName="google.protobuf.EnumValueOptions",Ae.fields=T.util.newFieldList(()=>[{no:1,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"features",kind:"message",T:$,opt:!0},{no:3,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:4,name:"feature_support",kind:"message",T:le,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:j,repeated:!0}]);class qe extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new qe().fromBinary(e,n)}static fromJson(e,n){return new qe().fromJson(e,n)}static fromJsonString(e,n){return new qe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(qe,e,n)}}qe.runtime=T,qe.typeName="google.protobuf.ServiceOptions",qe.fields=T.util.newFieldList(()=>[{no:34,name:"features",kind:"message",T:$,opt:!0},{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:j,repeated:!0}]);class de extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new de().fromBinary(e,n)}static fromJson(e,n){return new de().fromJson(e,n)}static fromJsonString(e,n){return new de().fromJsonString(e,n)}static equals(e,n){return T.util.equals(de,e,n)}}de.runtime=T,de.typeName="google.protobuf.MethodOptions",de.fields=T.util.newFieldList(()=>[{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:34,name:"idempotency_level",kind:"enum",T:T.getEnumType(Cn),opt:!0,default:Cn.IDEMPOTENCY_UNKNOWN},{no:35,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:j,repeated:!0}]);var Cn;(function(t){t[t.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",t[t.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",t[t.IDEMPOTENT=2]="IDEMPOTENT"})(Cn||(Cn={})),T.util.setEnumType(Cn,"google.protobuf.MethodOptions.IdempotencyLevel",[{no:0,name:"IDEMPOTENCY_UNKNOWN"},{no:1,name:"NO_SIDE_EFFECTS"},{no:2,name:"IDEMPOTENT"}]);class j extends w{constructor(e){super(),this.name=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new j().fromBinary(e,n)}static fromJson(e,n){return new j().fromJson(e,n)}static fromJsonString(e,n){return new j().fromJsonString(e,n)}static equals(e,n){return T.util.equals(j,e,n)}}j.runtime=T,j.typeName="google.protobuf.UninterpretedOption",j.fields=T.util.newFieldList(()=>[{no:2,name:"name",kind:"message",T:Ue,repeated:!0},{no:3,name:"identifier_value",kind:"scalar",T:9,opt:!0},{no:4,name:"positive_int_value",kind:"scalar",T:4,opt:!0},{no:5,name:"negative_int_value",kind:"scalar",T:3,opt:!0},{no:6,name:"double_value",kind:"scalar",T:1,opt:!0},{no:7,name:"string_value",kind:"scalar",T:12,opt:!0},{no:8,name:"aggregate_value",kind:"scalar",T:9,opt:!0}]);class Ue extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ue().fromBinary(e,n)}static fromJson(e,n){return new Ue().fromJson(e,n)}static fromJsonString(e,n){return new Ue().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ue,e,n)}}Ue.runtime=T,Ue.typeName="google.protobuf.UninterpretedOption.NamePart",Ue.fields=T.util.newFieldList(()=>[{no:1,name:"name_part",kind:"scalar",T:9,req:!0},{no:2,name:"is_extension",kind:"scalar",T:8,req:!0}]);class $ extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new $().fromBinary(e,n)}static fromJson(e,n){return new $().fromJson(e,n)}static fromJsonString(e,n){return new $().fromJsonString(e,n)}static equals(e,n){return T.util.equals($,e,n)}}$.runtime=T,$.typeName="google.protobuf.FeatureSet",$.fields=T.util.newFieldList(()=>[{no:1,name:"field_presence",kind:"enum",T:T.getEnumType(la),opt:!0},{no:2,name:"enum_type",kind:"enum",T:T.getEnumType(da),opt:!0},{no:3,name:"repeated_field_encoding",kind:"enum",T:T.getEnumType(pa),opt:!0},{no:4,name:"utf8_validation",kind:"enum",T:T.getEnumType(ua),opt:!0},{no:5,name:"message_encoding",kind:"enum",T:T.getEnumType(ga),opt:!0},{no:6,name:"json_format",kind:"enum",T:T.getEnumType(Ta),opt:!0}]);var la;(function(t){t[t.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",t[t.EXPLICIT=1]="EXPLICIT",t[t.IMPLICIT=2]="IMPLICIT",t[t.LEGACY_REQUIRED=3]="LEGACY_REQUIRED"})(la||(la={})),T.util.setEnumType(la,"google.protobuf.FeatureSet.FieldPresence",[{no:0,name:"FIELD_PRESENCE_UNKNOWN"},{no:1,name:"EXPLICIT"},{no:2,name:"IMPLICIT"},{no:3,name:"LEGACY_REQUIRED"}]);var da;(function(t){t[t.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",t[t.OPEN=1]="OPEN",t[t.CLOSED=2]="CLOSED"})(da||(da={})),T.util.setEnumType(da,"google.protobuf.FeatureSet.EnumType",[{no:0,name:"ENUM_TYPE_UNKNOWN"},{no:1,name:"OPEN"},{no:2,name:"CLOSED"}]);var pa;(function(t){t[t.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",t[t.PACKED=1]="PACKED",t[t.EXPANDED=2]="EXPANDED"})(pa||(pa={})),T.util.setEnumType(pa,"google.protobuf.FeatureSet.RepeatedFieldEncoding",[{no:0,name:"REPEATED_FIELD_ENCODING_UNKNOWN"},{no:1,name:"PACKED"},{no:2,name:"EXPANDED"}]);var ua;(function(t){t[t.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",t[t.VERIFY=2]="VERIFY",t[t.NONE=3]="NONE"})(ua||(ua={})),T.util.setEnumType(ua,"google.protobuf.FeatureSet.Utf8Validation",[{no:0,name:"UTF8_VALIDATION_UNKNOWN"},{no:2,name:"VERIFY"},{no:3,name:"NONE"}]);var ga;(function(t){t[t.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",t[t.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",t[t.DELIMITED=2]="DELIMITED"})(ga||(ga={})),T.util.setEnumType(ga,"google.protobuf.FeatureSet.MessageEncoding",[{no:0,name:"MESSAGE_ENCODING_UNKNOWN"},{no:1,name:"LENGTH_PREFIXED"},{no:2,name:"DELIMITED"}]);var Ta;(function(t){t[t.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",t[t.ALLOW=1]="ALLOW",t[t.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT"})(Ta||(Ta={})),T.util.setEnumType(Ta,"google.protobuf.FeatureSet.JsonFormat",[{no:0,name:"JSON_FORMAT_UNKNOWN"},{no:1,name:"ALLOW"},{no:2,name:"LEGACY_BEST_EFFORT"}]);class Ye extends w{constructor(e){super(),this.defaults=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ye().fromBinary(e,n)}static fromJson(e,n){return new Ye().fromJson(e,n)}static fromJsonString(e,n){return new Ye().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ye,e,n)}}Ye.runtime=T,Ye.typeName="google.protobuf.FeatureSetDefaults",Ye.fields=T.util.newFieldList(()=>[{no:1,name:"defaults",kind:"message",T:Le,repeated:!0},{no:4,name:"minimum_edition",kind:"enum",T:T.getEnumType(te),opt:!0},{no:5,name:"maximum_edition",kind:"enum",T:T.getEnumType(te),opt:!0}]);class Le extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Le().fromBinary(e,n)}static fromJson(e,n){return new Le().fromJson(e,n)}static fromJsonString(e,n){return new Le().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Le,e,n)}}Le.runtime=T,Le.typeName="google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault",Le.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(te),opt:!0},{no:4,name:"overridable_features",kind:"message",T:$,opt:!0},{no:5,name:"fixed_features",kind:"message",T:$,opt:!0}]);class Ge extends w{constructor(e){super(),this.location=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ge().fromBinary(e,n)}static fromJson(e,n){return new Ge().fromJson(e,n)}static fromJsonString(e,n){return new Ge().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ge,e,n)}}Ge.runtime=T,Ge.typeName="google.protobuf.SourceCodeInfo",Ge.fields=T.util.newFieldList(()=>[{no:1,name:"location",kind:"message",T:Be,repeated:!0}]);class Be extends w{constructor(e){super(),this.path=[],this.span=[],this.leadingDetachedComments=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Be().fromBinary(e,n)}static fromJson(e,n){return new Be().fromJson(e,n)}static fromJsonString(e,n){return new Be().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Be,e,n)}}Be.runtime=T,Be.typeName="google.protobuf.SourceCodeInfo.Location",Be.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"span",kind:"scalar",T:5,repeated:!0,packed:!0},{no:3,name:"leading_comments",kind:"scalar",T:9,opt:!0},{no:4,name:"trailing_comments",kind:"scalar",T:9,opt:!0},{no:6,name:"leading_detached_comments",kind:"scalar",T:9,repeated:!0}]);class We extends w{constructor(e){super(),this.annotation=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new We().fromBinary(e,n)}static fromJson(e,n){return new We().fromJson(e,n)}static fromJsonString(e,n){return new We().fromJsonString(e,n)}static equals(e,n){return T.util.equals(We,e,n)}}We.runtime=T,We.typeName="google.protobuf.GeneratedCodeInfo",We.fields=T.util.newFieldList(()=>[{no:1,name:"annotation",kind:"message",T:Fe,repeated:!0}]);class Fe extends w{constructor(e){super(),this.path=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Fe().fromBinary(e,n)}static fromJson(e,n){return new Fe().fromJson(e,n)}static fromJsonString(e,n){return new Fe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Fe,e,n)}}Fe.runtime=T,Fe.typeName="google.protobuf.GeneratedCodeInfo.Annotation",Fe.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"source_file",kind:"scalar",T:9,opt:!0},{no:3,name:"begin",kind:"scalar",T:5,opt:!0},{no:4,name:"end",kind:"scalar",T:5,opt:!0},{no:5,name:"semantic",kind:"enum",T:T.getEnumType(ka),opt:!0}]);var ka;(function(t){t[t.NONE=0]="NONE",t[t.SET=1]="SET",t[t.ALIAS=2]="ALIAS"})(ka||(ka={})),T.util.setEnumType(ka,"google.protobuf.GeneratedCodeInfo.Annotation.Semantic",[{no:0,name:"NONE"},{no:1,name:"SET"},{no:2,name:"ALIAS"}]);class _ extends w{constructor(e){super(),this.seconds=W.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${s.json.debug(e)}`);const a=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!a)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const o=Date.parse(a[1]+"-"+a[2]+"-"+a[3]+"T"+a[4]+":"+a[5]+":"+a[6]+(a[8]?a[8]:"Z"));if(Number.isNaN(o))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(o<Date.parse("0001-01-01T00:00:00Z")||o>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=W.parse(o/1e3),this.nanos=0,a[7]&&(this.nanos=parseInt("1"+a[7]+"0".repeat(9-a[7].length))-1e9),this}toJson(e){const n=Number(this.seconds)*1e3;if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let a="Z";if(this.nanos>0){const o=(this.nanos+1e9).toString().substring(1);o.substring(3)==="000000"?a="."+o.substring(0,3)+"Z":o.substring(6)==="000"?a="."+o.substring(0,6)+"Z":a="."+o+"Z"}return new Date(n).toISOString().replace(".000Z",a)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return _.fromDate(new Date)}static fromDate(e){const n=e.getTime();return new _({seconds:W.parse(Math.floor(n/1e3)),nanos:n%1e3*1e6})}static fromBinary(e,n){return new _().fromBinary(e,n)}static fromJson(e,n){return new _().fromJson(e,n)}static fromJsonString(e,n){return new _().fromJsonString(e,n)}static equals(e,n){return s.util.equals(_,e,n)}}_.runtime=s,_.typeName="google.protobuf.Timestamp",_.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class J extends w{constructor(e){super(),this.seconds=W.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const a=e.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);if(a===null)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const o=Number(a[1]);if(o>315576e6||o<-315576e6)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);if(this.seconds=W.parse(o),typeof a[2]=="string"){const i=a[2]+"0".repeat(9-a[2].length);this.nanos=parseInt(i),(o<0||Object.is(o,-0))&&(this.nanos=-this.nanos)}return this}toJson(e){if(Number(this.seconds)>315576e6||Number(this.seconds)<-315576e6)throw new Error("cannot encode google.protobuf.Duration to JSON: value out of range");let n=this.seconds.toString();if(this.nanos!==0){let a=Math.abs(this.nanos).toString();a="0".repeat(9-a.length)+a,a.substring(3)==="000000"?a=a.substring(0,3):a.substring(6)==="000"&&(a=a.substring(0,6)),n+="."+a,this.nanos<0&&Number(this.seconds)==0&&(n="-"+n)}return n+"s"}static fromBinary(e,n){return new J().fromBinary(e,n)}static fromJson(e,n){return new J().fromJson(e,n)}static fromJsonString(e,n){return new J().fromJsonString(e,n)}static equals(e,n){return s.util.equals(J,e,n)}}J.runtime=s,J.typeName="google.protobuf.Duration",J.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class Z extends w{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),s.util.initPartial(e,this)}toJson(e){var n;if(this.typeUrl==="")return{};const a=this.typeUrlToName(this.typeUrl),o=(n=e?.typeRegistry)===null||n===void 0?void 0:n.findMessage(a);if(!o)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let r=o.fromBinary(this.value).toJson(e);return(a.startsWith("google.protobuf.")||r===null||Array.isArray(r)||typeof r!="object")&&(r={value:r}),r["@type"]=this.typeUrl,r}fromJson(e,n){var a;if(e===null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e===null?"null":Array.isArray(e)?"array":typeof e}`);if(Object.keys(e).length==0)return this;const o=e["@type"];if(typeof o!="string"||o=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const i=this.typeUrlToName(o),r=(a=n?.typeRegistry)===null||a===void 0?void 0:a.findMessage(i);if(!r)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${o} is not in the type registry`);let c;if(i.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))c=r.fromJson(e.value,n);else{const l=Object.assign({},e);delete l["@type"],c=r.fromJson(l,n)}return this.packFrom(c),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return this.is(e.getType())?(e.fromBinary(this.value),!0):!1}unpack(e){if(this.typeUrl==="")return;const n=e.findMessage(this.typeUrlToName(this.typeUrl));if(n)return n.fromBinary(this.value)}is(e){if(this.typeUrl==="")return!1;const n=this.typeUrlToName(this.typeUrl);let a="";return typeof e=="string"?a=e:a=e.typeName,n===a}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw new Error(`invalid type url: ${e}`);const n=e.lastIndexOf("/"),a=n>=0?e.substring(n+1):e;if(!a.length)throw new Error(`invalid type url: ${e}`);return a}static pack(e){const n=new Z;return n.packFrom(e),n}static fromBinary(e,n){return new Z().fromBinary(e,n)}static fromJson(e,n){return new Z().fromJson(e,n)}static fromJsonString(e,n){return new Z().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Z,e,n)}}Z.runtime=s,Z.typeName="google.protobuf.Any",Z.fields=s.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);class pe extends w{constructor(e){super(),this.paths=[],s.util.initPartial(e,this)}toJson(e){function n(a){let o=!1;const i=[];for(let r=0;r<a.length;r++){let c=a.charAt(r);switch(c){case"_":o=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i.push(c),o=!1;break;default:o&&(o=!1,c=c.toUpperCase()),i.push(c);break}}return i.join("")}return this.paths.map(a=>{if(a.match(/_[0-9]?_/g)||a.match(/[A-Z]/g))throw new Error('cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name "'+a+'" is irreversible');return n(a)}).join(",")}fromJson(e,n){if(typeof e!="string")throw new Error("cannot decode google.protobuf.FieldMask from JSON: "+s.json.debug(e));if(e==="")return this;function a(o){if(o.includes("_"))throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");const i=o.replace(/[A-Z]/g,r=>"_"+r.toLowerCase());return i[0]==="_"?i.substring(1):i}return this.paths=e.split(",").map(a),this}static fromBinary(e,n){return new pe().fromBinary(e,n)}static fromJson(e,n){return new pe().fromJson(e,n)}static fromJsonString(e,n){return new pe().fromJsonString(e,n)}static equals(e,n){return s.util.equals(pe,e,n)}}pe.runtime=s,pe.typeName="google.protobuf.FieldMask",pe.fields=s.util.newFieldList(()=>[{no:1,name:"paths",kind:"scalar",T:9,repeated:!0}]);var Dn;(function(t){t[t.NULL_VALUE=0]="NULL_VALUE"})(Dn||(Dn={})),s.util.setEnumType(Dn,"google.protobuf.NullValue",[{no:0,name:"NULL_VALUE"}]);class p extends w{constructor(e){super(),this.fields={},s.util.initPartial(e,this)}toJson(e){const n={};for(const[a,o]of Object.entries(this.fields))n[a]=o.toJson(e);return n}fromJson(e,n){if(typeof e!="object"||e==null||Array.isArray(e))throw new Error("cannot decode google.protobuf.Struct from JSON "+s.json.debug(e));for(const[a,o]of Object.entries(e))this.fields[a]=ee.fromJson(o);return this}static fromBinary(e,n){return new p().fromBinary(e,n)}static fromJson(e,n){return new p().fromJson(e,n)}static fromJsonString(e,n){return new p().fromJsonString(e,n)}static equals(e,n){return s.util.equals(p,e,n)}}p.runtime=s,p.typeName="google.protobuf.Struct",p.fields=s.util.newFieldList(()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"message",T:ee}}]);class ee extends w{constructor(e){super(),this.kind={case:void 0},s.util.initPartial(e,this)}toJson(e){switch(this.kind.case){case"nullValue":return null;case"numberValue":if(!Number.isFinite(this.kind.value))throw new Error("google.protobuf.Value cannot be NaN or Infinity");return this.kind.value;case"boolValue":return this.kind.value;case"stringValue":return this.kind.value;case"structValue":case"listValue":return this.kind.value.toJson(Object.assign(Object.assign({},e),{emitDefaultValues:!0}))}throw new Error("google.protobuf.Value must have a value")}fromJson(e,n){switch(typeof e){case"number":this.kind={case:"numberValue",value:e};break;case"string":this.kind={case:"stringValue",value:e};break;case"boolean":this.kind={case:"boolValue",value:e};break;case"object":e===null?this.kind={case:"nullValue",value:Dn.NULL_VALUE}:Array.isArray(e)?this.kind={case:"listValue",value:ue.fromJson(e)}:this.kind={case:"structValue",value:p.fromJson(e)};break;default:throw new Error("cannot decode google.protobuf.Value from JSON "+s.json.debug(e))}return this}static fromBinary(e,n){return new ee().fromBinary(e,n)}static fromJson(e,n){return new ee().fromJson(e,n)}static fromJsonString(e,n){return new ee().fromJsonString(e,n)}static equals(e,n){return s.util.equals(ee,e,n)}}ee.runtime=s,ee.typeName="google.protobuf.Value",ee.fields=s.util.newFieldList(()=>[{no:1,name:"null_value",kind:"enum",T:s.getEnumType(Dn),oneof:"kind"},{no:2,name:"number_value",kind:"scalar",T:1,oneof:"kind"},{no:3,name:"string_value",kind:"scalar",T:9,oneof:"kind"},{no:4,name:"bool_value",kind:"scalar",T:8,oneof:"kind"},{no:5,name:"struct_value",kind:"message",T:p,oneof:"kind"},{no:6,name:"list_value",kind:"message",T:ue,oneof:"kind"}]);class ue extends w{constructor(e){super(),this.values=[],s.util.initPartial(e,this)}toJson(e){return this.values.map(n=>n.toJson())}fromJson(e,n){if(!Array.isArray(e))throw new Error("cannot decode google.protobuf.ListValue from JSON "+s.json.debug(e));for(let a of e)this.values.push(ee.fromJson(a));return this}static fromBinary(e,n){return new ue().fromBinary(e,n)}static fromJson(e,n){return new ue().fromJson(e,n)}static fromJsonString(e,n){return new ue().fromJsonString(e,n)}static equals(e,n){return s.util.equals(ue,e,n)}}ue.runtime=s,ue.typeName="google.protobuf.ListValue",ue.fields=s.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:ee,repeated:!0}]),g.Code=void 0,function(t){t[t.Canceled=1]="Canceled",t[t.Unknown=2]="Unknown",t[t.InvalidArgument=3]="InvalidArgument",t[t.DeadlineExceeded=4]="DeadlineExceeded",t[t.NotFound=5]="NotFound",t[t.AlreadyExists=6]="AlreadyExists",t[t.PermissionDenied=7]="PermissionDenied",t[t.ResourceExhausted=8]="ResourceExhausted",t[t.FailedPrecondition=9]="FailedPrecondition",t[t.Aborted=10]="Aborted",t[t.OutOfRange=11]="OutOfRange",t[t.Unimplemented=12]="Unimplemented",t[t.Internal=13]="Internal",t[t.Unavailable=14]="Unavailable",t[t.DataLoss=15]="DataLoss",t[t.Unauthenticated=16]="Unauthenticated"}(g.Code||(g.Code={}));function Tr(t){const e=g.Code[t];return typeof e!="string"?t.toString():e[0].toLowerCase()+e.substring(1).replace(/[A-Z]/g,n=>"_"+n.toLowerCase())}class C extends Error{constructor(e,n=g.Code.Unknown,a,o,i){super(o1(e,n)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=n,this.metadata=new Headers(a??{}),this.details=o??[],this.cause=i}static from(e,n=g.Code.Unknown){return e instanceof C?e:e instanceof Error?e.name=="AbortError"?new C(e.message,g.Code.Canceled):new C(e.message,n,void 0,void 0,e):new C(String(e),n,void 0,void 0,e)}static[Symbol.hasInstance](e){return e instanceof Error?Object.getPrototypeOf(e)===C.prototype?!0:e.name==="ConnectError"&&"code"in e&&typeof e.code=="number"&&"metadata"in e&&"details"in e&&Array.isArray(e.details)&&"rawMessage"in e&&typeof e.rawMessage=="string"&&"cause"in e:!1}findDetails(e){const n="typeName"in e?{findMessage:o=>o===e.typeName?e:void 0}:e,a=[];for(const o of this.details){if("getType"in o){n.findMessage(o.getType().typeName)&&a.push(o);continue}const i=n.findMessage(o.type);if(i)try{a.push(i.fromBinary(o.value))}catch{}}return a}}function o1(t,e){return t.length?`[${Tr(e)}] ${t}`:`[${Tr(e)}]`}function i1(t,e,n){try{const a=pt.dec(t);return e?e.fromBinary(a,n):a}catch(a){throw C.from(a,g.Code.DataLoss)}}function r1(t,e){const n={};for(const[a,o]of Object.entries(t.methods)){const i=e(Object.assign(Object.assign({},o),{localName:a,service:t}));i!=null&&(n[a]=i)}return n}const kr=1;function yr(t){let e,n=new Uint8Array(0);function a(o){const i=new Uint8Array(n.length+o.length);i.set(n),i.set(o,n.length),n=i}return new ReadableStream({start(){e=t.getReader()},async pull(o){let i;for(;;){if(i===void 0&&n.byteLength>=5){let l=0;for(let d=1;d<5;d++)l=(l<<8)+n[d];i={flags:n[0],length:l}}if(i!==void 0&&n.byteLength>=i.length+5)break;const c=await e.read();if(c.done)break;a(c.value)}if(i===void 0){if(n.byteLength==0){o.close();return}o.error(new C("premature end of stream",g.Code.DataLoss));return}const r=n.subarray(5,5+i.length);n=n.subarray(5+i.length),o.enqueue({flags:i.flags,data:r})}})}function vr(t,e){const n=new Uint8Array(e.length+5);n.set(e,5);const a=new DataView(n.buffer,n.byteOffset,n.byteLength);return a.setUint8(0,t),a.setUint32(1,e.length),n}var m1=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n);function a(i){n[i]=t[i]&&function(r){return new Promise(function(c,l){r=t[i](r),o(c,l,r.done,r.value)})}}function o(i,r,c,l){Promise.resolve(l).then(function(d){i({value:d,done:c})},r)}},Nn=function(t){return this instanceof Nn?(this.v=t,this):new Nn(t)},c1=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(t,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(E){return Promise.resolve(E).then(R,h)}}function c(R,E){a[R]&&(o[R]=function(O){return new Promise(function(D,V){i.push([R,O,D,V])>1||l(R,O)})},E&&(o[R]=E(o[R])))}function l(R,E){try{d(a[R](E))}catch(O){I(i[0][3],O)}}function d(R){R.value instanceof Nn?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){l("next",R)}function h(R){l("throw",R)}function I(R,E){R(E),i.shift(),i.length&&l(i[0][0],i[0][1])}},l1=function(t){var e,n;return e={},a("next"),a("throw",function(o){throw o}),a("return"),e[Symbol.iterator]=function(){return this},e;function a(o,i){e[o]=t[o]?function(r){return(n=!n)?{value:Nn(t[o](r)),done:!1}:i?i(r):r}:i}};function d1(){const t=[],e=[];let n,a,o,i=new Promise((l,d)=>{a=l,o=d}),r=!1;function c(){for(const l of t.splice(0,t.length))l({done:!0,value:void 0})}return{close(){r=!0,c()},async write(l){if(r)throw n??new Error("cannot write, WritableIterable already closed");const d=t.shift();if(d===void 0)e.push(l);else if(d({done:!1,value:l}),t.length>0)return;const u=e.length+1;for(let h=0;h<u;h++)await i},[Symbol.asyncIterator](){return{next(){a(),i=new Promise((h,I)=>{a=h,o=I});const l=e.shift();if(l!==void 0)return Promise.resolve({done:!1,value:l});if(r)return Promise.resolve({done:!0,value:void 0});let d;const u=new Promise(h=>d=h);return t.push(d),u},throw(l){return n=l,r=!0,e.splice(0,e.length),i.catch(()=>{}),o(n),c(),Promise.resolve({done:!0,value:void 0})},return(){return r=!0,e.splice(0,e.length),a(),i=Promise.reject(new Error("cannot write, consumer called return")),i.catch(()=>{}),c(),Promise.resolve({done:!0,value:void 0})}}}}}function Tt(t){return c1(this,arguments,function*(){yield Nn(yield*l1(m1(t)))})}var hr=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n);function a(i){n[i]=t[i]&&function(r){return new Promise(function(c,l){r=t[i](r),o(c,l,r.done,r.value)})}}function o(i,r,c,l){Promise.resolve(l).then(function(d){i({value:d,done:c})},r)}},un=function(t){return this instanceof un?(this.v=t,this):new un(t)},p1=function(t){var e,n;return e={},a("next"),a("throw",function(o){throw o}),a("return"),e[Symbol.iterator]=function(){return this},e;function a(o,i){e[o]=t[o]?function(r){return(n=!n)?{value:un(t[o](r)),done:!1}:i?i(r):r}:i}},u1=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(t,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(E){return Promise.resolve(E).then(R,h)}}function c(R,E){a[R]&&(o[R]=function(O){return new Promise(function(D,V){i.push([R,O,D,V])>1||l(R,O)})},E&&(o[R]=E(o[R])))}function l(R,E){try{d(a[R](E))}catch(O){I(i[0][3],O)}}function d(R){R.value instanceof un?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){l("next",R)}function h(R){l("throw",R)}function I(R,E){R(E),i.shift(),i.length&&l(i[0][0],i[0][1])}};function X(t,e){return r1(t,n=>{switch(n.kind){case m.Unary:return g1(e,t,n);case m.ServerStreaming:return T1(e,t,n);case m.ClientStreaming:return k1(e,t,n);case m.BiDiStreaming:return y1(e,t,n);default:return null}})}function g1(t,e,n){return async function(a,o){var i,r;const c=await t.unary(e,n,o?.signal,o?.timeoutMs,o?.headers,a,o?.contextValues);return(i=o?.onHeader)===null||i===void 0||i.call(o,c.header),(r=o?.onTrailer)===null||r===void 0||r.call(o,c.trailer),c.message}}function T1(t,e,n){return function(a,o){return fr(t.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,Tt([a]),o?.contextValues),o)}}function k1(t,e,n){return async function(a,o){var i,r,c,l,d,u;const h=await t.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,a,o?.contextValues);(d=o?.onHeader)===null||d===void 0||d.call(o,h.header);let I,R=0;try{for(var E=!0,O=hr(h.message),D;D=await O.next(),i=D.done,!i;E=!0)l=D.value,E=!1,I=l,R++}catch(V){r={error:V}}finally{try{!E&&!i&&(c=O.return)&&await c.call(O)}finally{if(r)throw r.error}}if(!I)throw new C("protocol error: missing response message",g.Code.Unimplemented);if(R>1)throw new C("protocol error: received extra messages for client streaming method",g.Code.Unimplemented);return(u=o?.onTrailer)===null||u===void 0||u.call(o,h.trailer),I}}function y1(t,e,n){return function(a,o){return fr(t.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,a,o?.contextValues),o)}}function fr(t,e){const n=function(){return u1(this,arguments,function*(){var a,o;const i=yield un(t);(a=e?.onHeader)===null||a===void 0||a.call(e,i.header),yield un(yield*p1(hr(i.message))),(o=e?.onTrailer)===null||o===void 0||o.call(e,i.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>n.next()})}}function v1(...t){const e=new AbortController,n=t.filter(o=>o!==void 0).concat(e.signal);for(const o of n){if(o.aborted){a.apply(o);break}o.addEventListener("abort",a)}function a(){e.signal.aborted||e.abort(Rr(this));for(const o of n)o.removeEventListener("abort",a)}return e}function h1(t){const e=new AbortController,n=()=>{e.abort(new C("the operation timed out",g.Code.DeadlineExceeded))};let a;return t!==void 0&&(t<=0?n():a=setTimeout(n,t)),{signal:e.signal,cleanup:()=>clearTimeout(a)}}function Rr(t){if(!t.aborted)return;if(t.reason!==void 0)return t.reason;const e=new Error("This operation was aborted");return e.name="AbortError",e}function ya(){return{get(t){return t.id in this?this[t.id]:t.defaultValue},set(t,e){return this[t.id]=e,this},delete(t){return delete this[t.id],this}}}const kt=128;function _r(t){const e=new Headers,n=new TextDecoder().decode(t).split(`\r
|
|
3
|
+
`);for(const a of n){if(a==="")continue;const o=a.indexOf(":");if(o>0){const i=a.substring(0,o).trim(),r=a.substring(o+1).trim();e.append(i,r)}}return e}const f1="Content-Type",R1="Grpc-Timeout",gn="Grpc-Status",Sr="Grpc-Message",_1="Grpc-Status-Details-Bin",S1="X-User-Agent",I1="X-Grpc-Web",E1="application/grpc-web+proto",O1="application/grpc-web+json";let va=class Kn extends w{constructor(e){super(),this.code=0,this.message="",this.details=[],s.util.initPartial(e,this)}static fromBinary(e,n){return new Kn().fromBinary(e,n)}static fromJson(e,n){return new Kn().fromJson(e,n)}static fromJsonString(e,n){return new Kn().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Kn,e,n)}};va.runtime=s,va.typeName="google.rpc.Status",va.fields=s.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Z,repeated:!0}]);const M1="0";function Ir(t){var e;const n=t.get(_1);if(n!=null){const o=i1(n,va);if(o.code==0)return;const i=new C(o.message,o.code,t);return i.details=o.details.map(r=>({type:r.typeUrl.substring(r.typeUrl.lastIndexOf("/")+1),value:r.value})),i}const a=t.get(gn);if(a!=null){if(a===M1)return;const o=parseInt(a,10);return o in g.Code?new C(decodeURIComponent((e=t.get(Sr))!==null&&e!==void 0?e:""),o,t):new C(`invalid grpc-status: ${a}`,g.Code.Internal,t)}}function Er(t,e,n){const a=typeof e=="string"?e:e.typeName,o=typeof n=="string"?n:n.name;return t.toString().replace(/\/?$/,`/${a}/${o}`)}function Or(t,e){return e instanceof t?e:new t(e)}function b1(t,e){function n(a){return a.done===!0?a:{done:a.done,value:Or(t,a.value)}}return{[Symbol.asyncIterator](){const a=e[Symbol.asyncIterator](),o={next:()=>a.next().then(n)};return a.throw!==void 0&&(o.throw=i=>a.throw(i).then(n)),a.return!==void 0&&(o.return=i=>a.return(i).then(n)),o}}}function Mr(t,e){var n;return(n=e?.concat().reverse().reduce((a,o)=>o(a),t))!==null&&n!==void 0?n:t}function w1(t){var e;const n=Object.assign({},t);return(e=n.ignoreUnknownFields)!==null&&e!==void 0||(n.ignoreUnknownFields=!0),n}function yt(t,e,n,a){const o=e?br(t.I,a):wr(t.I,n);return{parse:(e?br(t.O,a):wr(t.O,n)).parse,serialize:o.serialize}}function br(t,e){return{parse(n){try{return t.fromBinary(n,e)}catch(a){const o=a instanceof Error?a.message:String(a);throw new C(`parse binary: ${o}`,g.Code.Internal)}},serialize(n){try{return n.toBinary(e)}catch(a){const o=a instanceof Error?a.message:String(a);throw new C(`serialize binary: ${o}`,g.Code.Internal)}}}}function wr(t,e){var n,a;const o=(n=e?.textEncoder)!==null&&n!==void 0?n:new TextEncoder,i=(a=e?.textDecoder)!==null&&a!==void 0?a:new TextDecoder,r=w1(e);return{parse(c){try{const l=i.decode(c);return t.fromJsonString(l,r)}catch(l){throw C.from(l,g.Code.InvalidArgument)}},serialize(c){try{const l=c.toJsonString(r);return o.encode(l)}catch(l){throw C.from(l,g.Code.Internal)}}}}function Cr(t){const e=Mr(t.next,t.interceptors),[n,a,o]=Nr(t),i=Object.assign(Object.assign({},t.req),{message:Or(t.req.method.I,t.req.message),signal:n});return e(i).then(r=>(o(),r),a)}function Dr(t){const e=Mr(t.next,t.interceptors),[n,a,o]=Nr(t),i=Object.assign(Object.assign({},t.req),{message:b1(t.req.method.I,t.req.message),signal:n});let r=!1;return n.addEventListener("abort",function(){var c,l;const d=t.req.message[Symbol.asyncIterator]();r||(c=d.throw)===null||c===void 0||c.call(d,this.reason).catch(()=>{}),(l=d.return)===null||l===void 0||l.call(d).catch(()=>{})}),e(i).then(c=>Object.assign(Object.assign({},c),{message:{[Symbol.asyncIterator](){const l=c.message[Symbol.asyncIterator]();return{next(){return l.next().then(d=>(d.done==!0&&(r=!0,o()),d),a)}}}}}),a)}function Nr(t){const{signal:e,cleanup:n}=h1(t.timeoutMs),a=v1(t.signal,e);return[a.signal,function(i){const r=C.from(e.aborted?Rr(e):i);return a.abort(r),n(),Promise.reject(r)},function(){n(),a.abort()}]}var Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Pr={},vt={},ha=Q&&Q.__assign||function(){return ha=Object.assign||function(t){for(var e,n=1,a=arguments.length;n<a;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},ha.apply(this,arguments)};Object.defineProperty(vt,"__esModule",{value:!0});var C1={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function D1(t){var e=ha(ha({},C1),t);return e.numOfAttempts<1&&(e.numOfAttempts=1),e}vt.getSanitizedOptions=D1;var ht={},ft={},fa={},Rt={},_t={};Object.defineProperty(_t,"__esModule",{value:!0});function N1(t){var e=Math.random()*t;return Math.round(e)}_t.fullJitter=N1;var St={};Object.defineProperty(St,"__esModule",{value:!0});function P1(t){return t}St.noJitter=P1,Object.defineProperty(Rt,"__esModule",{value:!0});var A1=_t,q1=St;function U1(t){switch(t.jitter){case"full":return A1.fullJitter;case"none":default:return q1.noJitter}}Rt.JitterFactory=U1,Object.defineProperty(fa,"__esModule",{value:!0});var L1=Rt,G1=function(){function t(e){this.options=e,this.attempt=0}return t.prototype.apply=function(){var e=this;return new Promise(function(n){return setTimeout(n,e.jitteredDelay)})},t.prototype.setAttemptNumber=function(e){this.attempt=e},Object.defineProperty(t.prototype,"jitteredDelay",{get:function(){var e=L1.JitterFactory(this.options);return e(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"delay",{get:function(){var e=this.options.startingDelay,n=this.options.timeMultiple,a=this.numOfDelayedAttempts,o=e*Math.pow(n,a);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),t}();fa.Delay=G1;var B1=Q&&Q.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var i in o)o.hasOwnProperty(i)&&(a[i]=o[i])},t(e,n)};return function(e,n){t(e,n);function a(){this.constructor=e}e.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),F1=Q&&Q.__awaiter||function(t,e,n,a){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(u){try{d(a.next(u))}catch(h){r(h)}}function l(u){try{d(a.throw(u))}catch(h){r(h)}}function d(u){u.done?i(u.value):o(u.value).then(c,l)}d((a=a.apply(t,e||[])).next())})},x1=Q&&Q.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(d){return function(u){return l([d,u])}}function l(d){if(a)throw new TypeError("Generator is already executing.");for(;n;)try{if(a=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){n.label=d[1];break}if(d[0]===6&&n.label<i[1]){n.label=i[1],i=d;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(d);break}i[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(u){d=[6,u],o=0}finally{a=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(ft,"__esModule",{value:!0});var J1=fa,z1=function(t){B1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.apply=function(){return F1(this,void 0,void 0,function(){return x1(this,function(n){return[2,this.isFirstAttempt?!0:t.prototype.apply.call(this)]})})},Object.defineProperty(e.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),e}(J1.Delay);ft.SkipFirstDelay=z1;var It={},V1=Q&&Q.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var i in o)o.hasOwnProperty(i)&&(a[i]=o[i])},t(e,n)};return function(e,n){t(e,n);function a(){this.constructor=e}e.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(It,"__esModule",{value:!0});var $1=fa,Y1=function(t){V1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}($1.Delay);It.AlwaysDelay=Y1,Object.defineProperty(ht,"__esModule",{value:!0});var W1=ft,j1=It;function H1(t,e){var n=K1(t);return n.setAttemptNumber(e),n}ht.DelayFactory=H1;function K1(t){return t.delayFirstAttempt?new j1.AlwaysDelay(t):new W1.SkipFirstDelay(t)}var Et=Q&&Q.__awaiter||function(t,e,n,a){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(u){try{d(a.next(u))}catch(h){r(h)}}function l(u){try{d(a.throw(u))}catch(h){r(h)}}function d(u){u.done?i(u.value):o(u.value).then(c,l)}d((a=a.apply(t,e||[])).next())})},Ot=Q&&Q.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(d){return function(u){return l([d,u])}}function l(d){if(a)throw new TypeError("Generator is already executing.");for(;n;)try{if(a=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){n.label=d[1];break}if(d[0]===6&&n.label<i[1]){n.label=i[1],i=d;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(d);break}i[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(u){d=[6,u],o=0}finally{a=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(Pr,"__esModule",{value:!0});var X1=vt,Q1=ht;function Z1(t,e){return e===void 0&&(e={}),Et(this,void 0,void 0,function(){var n,a;return Ot(this,function(o){switch(o.label){case 0:return n=X1.getSanitizedOptions(e),a=new e_(t,n),[4,a.execute()];case 1:return[2,o.sent()]}})})}var Mt=Pr.backOff=Z1,e_=function(){function t(e,n){this.request=e,this.options=n,this.attemptNumber=0}return t.prototype.execute=function(){return Et(this,void 0,void 0,function(){var e,n;return Ot(this,function(a){switch(a.label){case 0:if(this.attemptLimitReached)return[3,7];a.label=1;case 1:return a.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return a.sent(),[4,this.request()];case 3:return[2,a.sent()];case 4:return e=a.sent(),this.attemptNumber++,[4,this.options.retry(e,this.attemptNumber)];case 5:if(n=a.sent(),!n||this.attemptLimitReached)throw e;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(t.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),t.prototype.applyDelay=function(){return Et(this,void 0,void 0,function(){var e;return Ot(this,function(n){switch(n.label){case 0:return e=Q1.DelayFactory(this.options,this.attemptNumber),[4,e.apply()];case 1:return n.sent(),[2]}})})},t}(),Ar={exports:{}};(function(t,e){(function(n,a){t.exports=a()})(Q,function(){return function(n){var a={};function o(i){if(a[i])return a[i].exports;var r=a[i]={i,l:!1,exports:{}};return n[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=n,o.c=a,o.d=function(i,r,c){o.o(i,r)||Object.defineProperty(i,r,{enumerable:!0,get:c})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,r){if(1&r&&(i=o(i)),8&r||4&r&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&r&&typeof i!="string")for(var l in i)o.d(c,l,function(d){return i[d]}.bind(null,l));return c},o.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(r,"a",r),r},o.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)},o.p="",o(o.s=0)}([function(n,a,o){o.r(a),o.d(a,"UuidTool",function(){return c}),o.d(a,"Uuid",function(){return r});var i={uuid:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i},r=function(){function l(d){this.id="",typeof d=="string"?this.fromString(d):Array.isArray(d)?this.fromBytes(d):this.generate()}return l.fromJson=function(d){if(typeof d=="string"&&(d=JSON.parse(d)),!d||!d.id)throw new TypeError("The input cannot be converted to Uuid.");return new l(d.id)},l.prototype.generate=function(){var d=new Array(16).fill(0).map(function(){return 256*Math.random()&255});return d[6]=79&(64|d[6]),this.fromBytes(d),this},l.prototype.fromBytes=function(d){return this.id=d.map(function(u){return("00"+u.toString(16)).slice(-2)}).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5"),this.id=this.toString(),this},l.prototype.toBytes=function(){return(this.id.replace(/-/g,"").match(/.{2}/g)||[]).map(function(d){return parseInt(d,16)})},l.prototype.fromString=function(d){return this.id=d.trim(),this.id=this.toString(),this},l.prototype.toString=function(){switch(l.stringExportFormat){default:case"lowercase":return this.id.toLowerCase();case"uppercase":return this.id.toUpperCase()}},l.prototype.isValid=function(){return typeof this.id=="string"&&this.id.length===36&&i.uuid.test(this.id)},l.prototype.equals=function(d){return typeof d=="string"&&(d=new l(d)),this.toString()===d.toString()},l.stringExportFormat="lowercase",l}(),c=function(){function l(){}return l.toBytes=function(d){return new r().fromString(d).toBytes()},l.toString=function(d){return new r().fromBytes(d).toString()},l.newUuid=function(){return new r().toString()},l.isUuid=function(d){return new r().fromString(d).isValid()},l.compare=function(d,u){return new r(d).equals(new r(u))},l}()}])})})(Ar);var Pn=Ar.exports;const qr=s.makeMessageType("proto.rpc.v1.Credentials",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:9}]),bt=s.makeMessageType("proto.rpc.v1.AuthenticateRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9},{no:2,name:"credentials",kind:"message",T:qr}]),n_=s.makeMessageType("proto.rpc.v1.AuthenticateResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),a_=s.makeMessageType("proto.rpc.v1.AuthenticateToRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9}]),t_=s.makeMessageType("proto.rpc.v1.AuthenticateToResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),s_={typeName:"proto.rpc.v1.AuthService",methods:{authenticate:{name:"Authenticate",I:bt,O:n_,kind:m.Unary}}},o_={typeName:"proto.rpc.v1.ExternalAuthService",methods:{authenticateTo:{name:"AuthenticateTo",I:a_,O:t_,kind:m.Unary}}},Tn=s.makeMessageType("google.rpc.Status",()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Z,repeated:!0}]),An=s.makeMessageType("proto.rpc.webrtc.v1.ICECandidate",()=>[{no:1,name:"candidate",kind:"scalar",T:9},{no:2,name:"sdp_mid",kind:"scalar",T:9,opt:!0},{no:3,name:"sdpm_line_index",kind:"scalar",T:13,opt:!0},{no:4,name:"username_fragment",kind:"scalar",T:9,opt:!0}]),Ur=s.makeMessageType("proto.rpc.webrtc.v1.CallRequest",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),i_=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),r_=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:An}]),m_=s.makeMessageType("proto.rpc.webrtc.v1.CallResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:i_,oneof:"stage"},{no:3,name:"update",kind:"message",T:r_,oneof:"stage"}]),Ra=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"candidate",kind:"message",T:An,oneof:"update"},{no:3,name:"done",kind:"scalar",T:8,oneof:"update"},{no:4,name:"error",kind:"message",T:Tn,oneof:"update"}]),c_=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateResponse",[]),l_=s.makeMessageType("proto.rpc.webrtc.v1.ICEServer",()=>[{no:1,name:"urls",kind:"scalar",T:9,repeated:!0},{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"credential",kind:"scalar",T:9}]),_a=s.makeMessageType("proto.rpc.webrtc.v1.WebRTCConfig",()=>[{no:1,name:"additional_ice_servers",kind:"message",T:l_,repeated:!0},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),d_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"optional_config",kind:"message",T:_a},{no:3,name:"deadline",kind:"message",T:_,opt:!0}]),p_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:An}]),u_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestDoneStage",[]),g_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestErrorStage",()=>[{no:1,name:"status",kind:"message",T:Tn}]),T_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestHeartbeatStage",[]),k_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:d_,oneof:"stage"},{no:3,name:"update",kind:"message",T:p_,oneof:"stage"},{no:4,name:"done",kind:"message",T:u_,oneof:"stage"},{no:5,name:"error",kind:"message",T:g_,oneof:"stage"},{no:6,name:"heartbeat",kind:"message",T:T_,oneof:"stage"}]),y_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),v_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:An}]),h_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseDoneStage",[]),f_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseErrorStage",()=>[{no:1,name:"status",kind:"message",T:Tn}]),R_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:y_,oneof:"stage"},{no:3,name:"update",kind:"message",T:v_,oneof:"stage"},{no:4,name:"done",kind:"message",T:h_,oneof:"stage"},{no:5,name:"error",kind:"message",T:f_,oneof:"stage"}]),__=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigRequest",[]),S_=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse",()=>[{no:1,name:"config",kind:"message",T:_a}]),I_={typeName:"proto.rpc.webrtc.v1.SignalingService",methods:{call:{name:"Call",I:Ur,O:m_,kind:m.ServerStreaming},callUpdate:{name:"CallUpdate",I:Ra,O:c_,kind:m.Unary},answer:{name:"Answer",I:R_,O:k_,kind:m.BiDiStreaming},optionalWebRTCConfig:{name:"OptionalWebRTCConfig",I:__,O:S_,kind:m.Unary}}},Lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",wt=(t="")=>{const e=t;let n="";for(let a=0,o,i=0,r=Lr;e.charAt(Math.trunc(i))||(r="=",i%1);n+=r.charAt(63&a>>8-i%1*8)){if(o=e.charCodeAt(i+=3/4),o>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");a=a<<8|o}return n},Gr=(t="")=>{const e=t.replace(/=+$/,"");let n="";if(e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let a=0,o=0,i,r=0;i=e.charAt(r++);~i&&(o=a%4?o*64+i:i,a++%4)?n+=String.fromCharCode(255&o>>(-2*a&6)):0)i=Lr.indexOf(i);return n},Ct=(t,e)=>{const n={sdp:t?.sdp,type:t?.type};if(e)for(const[a,o]of Object.entries(e))n.sdp=[n.sdp,`a=${a}:${o}\r
|
|
4
|
+
`].join("");return n},E_=async(t,e,n)=>{const a=e??{iceServers:[{urls:"stun:global.stun.twilio.com:3478"}]},o=new RTCPeerConnection(a);let i;const r=new Promise(h=>{i=h}),c=o.createDataChannel("data",{id:0,negotiated:!0,ordered:!0});c.binaryType="arraybuffer";const l=o.createDataChannel("negotiation",{id:1,negotiated:!0,ordered:!0});l.binaryType="arraybuffer";let d=!1;if(l.addEventListener("open",()=>{d=!0}),l.addEventListener("message",h=>{(async()=>{const I=new RTCSessionDescription(JSON.parse(Gr(h.data)));if(await o.setRemoteDescription(I),I.type==="offer"){await o.setLocalDescription();const R=Ct(o.localDescription,n);l.send(wt(JSON.stringify(R)))}})().catch(console.error)}),o.addEventListener("negotiationneeded",()=>{(async()=>{if(!d)return;await o.setLocalDescription();const h=Ct(o.localDescription,n);l.send(wt(JSON.stringify(h)))})().catch(console.error)}),!t)return{pc:o,dc:c};const u=await o.createOffer({});return await o.setLocalDescription(u),o.addEventListener("icecandidate",h=>{h.candidate===null&&i({pc:o,dc:c})}),r};function O_(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function Br(t,e){const n=Ir(t);if(n)throw e.forEach((a,o)=>{n.metadata.append(o,a)}),n;if(!e.has(gn)&&!t.has(gn))throw new C("protocol error: missing status",g.Code.Internal)}function Fr(t,e,n,a){const o=new Headers(n??{});return o.set(f1,t?E1:O1),o.set(I1,"1"),o.set(S1,"connect-es/1.6.1"),e!==void 0&&o.set(R1,`${e}m`),o}function M_(t){switch(t){case 400:return g.Code.Internal;case 401:return g.Code.Unauthenticated;case 403:return g.Code.PermissionDenied;case 404:return g.Code.Unimplemented;case 429:return g.Code.Unavailable;case 502:return g.Code.Unavailable;case 503:return g.Code.Unavailable;case 504:return g.Code.Unavailable;default:return g.Code.Unknown}}function xr(t,e){var n;if(t>=200&&t<300)return{foundStatus:e.has(gn),headerError:Ir(e)};throw new C(decodeURIComponent((n=e.get(Sr))!==null&&n!==void 0?n:`HTTP ${t}`),M_(t),e)}var nn=function(t){return this instanceof nn?(this.v=t,this):new nn(t)},b_=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(t,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(E){return Promise.resolve(E).then(R,h)}}function c(R,E){a[R]&&(o[R]=function(O){return new Promise(function(D,V){i.push([R,O,D,V])>1||l(R,O)})},E&&(o[R]=E(o[R])))}function l(R,E){try{d(a[R](E))}catch(O){I(i[0][3],O)}}function d(R){R.value instanceof nn?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){l("next",R)}function h(R){l("throw",R)}function I(R,E){R(E),i.shift(),i.length&&l(i[0][0],i[0][1])}};function w_(t){var e;O_();const n=(e=t.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(a,o,i,r,c,l,d){var u;const{serialize:h,parse:I}=yt(o,n,t.jsonOptions,t.binaryOptions);return r=r===void 0?t.defaultTimeoutMs:r<=0?void 0:r,await Cr({interceptors:t.interceptors,signal:i,timeoutMs:r,req:{stream:!1,service:a,method:o,url:Er(t.baseUrl,a,o),init:{method:"POST",credentials:(u=t.credentials)!==null&&u!==void 0?u:"same-origin",redirect:"error",mode:"cors"},header:Fr(n,r,c),contextValues:d??ya(),message:l},next:async R=>{var E;const D=await((E=t.fetch)!==null&&E!==void 0?E:globalThis.fetch)(R.url,Object.assign(Object.assign({},R.init),{headers:R.header,signal:R.signal,body:vr(0,h(R.message))})),{headerError:V}=xr(D.status,D.headers);if(!D.body)throw V!==void 0?V:"missing response body";const y=yr(D.body).getReader();let f,k;for(;;){const v=await y.read();if(v.done)break;const{flags:b,data:M}=v.value;if((b&kr)===kr)throw new C("protocol error: received unsupported compressed output",g.Code.Internal);if(b===kt){if(f!==void 0)throw"extra trailer";f=_r(M);continue}if(k!==void 0)throw new C("extra message",g.Code.Unimplemented);k=I(M)}if(f===void 0)throw V!==void 0?V:new C("missing trailer",D.headers.has(gn)?g.Code.Unimplemented:g.Code.Unknown);if(Br(f,D.headers),k===void 0)throw new C("missing message",f.has(gn)?g.Code.Unimplemented:g.Code.Unknown);return{stream:!1,service:a,method:o,header:D.headers,message:k,trailer:f}}})},async stream(a,o,i,r,c,l,d){var u;const{serialize:h,parse:I}=yt(o,n,t.jsonOptions,t.binaryOptions);function R(O,D,V,y,f){return b_(this,arguments,function*(){const v=yr(O).getReader();if(D){if(!(yield nn(v.read())).done)throw"extra data for trailers-only";return yield nn(void 0)}let b=!1;for(;;){const M=yield nn(v.read());if(M.done)break;const{flags:oe,data:B}=M.value;if((oe&kt)===kt){if(b)throw"extra trailer";b=!0;const Y=_r(B);Br(Y,y),Y.forEach((Ni,Pi)=>V.set(Pi,Ni));continue}if(b)throw"extra message";yield yield nn(I(B))}if("throwIfAborted"in f&&f.throwIfAborted(),!b)throw"missing trailer"})}async function E(O){if(o.kind!=m.ServerStreaming)throw"The fetch API does not support streaming request bodies";const D=await O[Symbol.asyncIterator]().next();if(D.done==!0)throw"missing request message";return vr(0,h(D.value))}return r=r===void 0?t.defaultTimeoutMs:r<=0?void 0:r,Dr({interceptors:t.interceptors,signal:i,timeoutMs:r,req:{stream:!0,service:a,method:o,url:Er(t.baseUrl,a,o),init:{method:"POST",credentials:(u=t.credentials)!==null&&u!==void 0?u:"same-origin",redirect:"error",mode:"cors"},header:Fr(n,r,c),contextValues:d??ya(),message:l},next:async O=>{var D;const y=await((D=t.fetch)!==null&&D!==void 0?D:globalThis.fetch)(O.url,Object.assign(Object.assign({},O.init),{headers:O.header,signal:O.signal,body:await E(O.message)})),{foundStatus:f,headerError:k}=xr(y.status,y.headers);if(k!=null)throw k;if(!y.body)throw"missing response body";const v=new Headers;return Object.assign(Object.assign({},O),{header:y.headers,trailer:v,message:R(y.body,f,v,y.headers,O.signal)})}})}}}let Sa;const C_=t=>{Sa=t},D_=()=>Sa!==void 0,ne=(t,e={})=>{Sa&&Sa({timestamp:new Date,event:t,...e})},N_=t=>{console.debug("[viam-sdk]",JSON.stringify(t))},P_=()=>N_,Ia=s.makeMessageType("proto.rpc.webrtc.v1.PacketMessage",()=>[{no:1,name:"data",kind:"scalar",T:12},{no:2,name:"eom",kind:"scalar",T:8}]),Dt=s.makeMessageType("proto.rpc.webrtc.v1.Stream",()=>[{no:1,name:"id",kind:"scalar",T:4}]),Nt=s.makeMessageType("proto.rpc.webrtc.v1.Request",()=>[{no:1,name:"stream",kind:"message",T:Dt},{no:2,name:"headers",kind:"message",T:Jr,oneof:"type"},{no:3,name:"message",kind:"message",T:Pt,oneof:"type"},{no:4,name:"rst_stream",kind:"scalar",T:8,oneof:"type"}]),Jr=s.makeMessageType("proto.rpc.webrtc.v1.RequestHeaders",()=>[{no:1,name:"method",kind:"scalar",T:9},{no:2,name:"metadata",kind:"message",T:Ea},{no:3,name:"timeout",kind:"message",T:J}]),Pt=s.makeMessageType("proto.rpc.webrtc.v1.RequestMessage",()=>[{no:1,name:"has_message",kind:"scalar",T:8},{no:2,name:"packet_message",kind:"message",T:Ia},{no:3,name:"eos",kind:"scalar",T:8}]),A_=s.makeMessageType("proto.rpc.webrtc.v1.Response",()=>[{no:1,name:"stream",kind:"message",T:Dt},{no:2,name:"headers",kind:"message",T:q_,oneof:"type"},{no:3,name:"message",kind:"message",T:U_,oneof:"type"},{no:4,name:"trailers",kind:"message",T:L_,oneof:"type"}]),q_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseHeaders",()=>[{no:1,name:"metadata",kind:"message",T:Ea}]),U_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseMessage",()=>[{no:1,name:"packet_message",kind:"message",T:Ia}]),L_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseTrailers",()=>[{no:1,name:"status",kind:"message",T:Tn},{no:2,name:"metadata",kind:"message",T:Ea}]),zr=s.makeMessageType("proto.rpc.webrtc.v1.Strings",()=>[{no:1,name:"values",kind:"scalar",T:9,repeated:!0}]),Ea=s.makeMessageType("proto.rpc.webrtc.v1.Metadata",()=>[{no:1,name:"md",kind:"map",K:9,V:{kind:"message",T:zr}}]);class ge extends Error{name="ConnectionClosedError";constructor(e){super(e),Object.setPrototypeOf(this,ge.prototype)}static isError(e){return e instanceof ge||e instanceof C&&e.rawMessage==="closed"?!0:typeof e=="string"?e==="Response closed without headers":e instanceof Error?e.message==="Response closed without headers":!1}}class G_{ready;peerConn;dataChannel;pResolve;pReject;closed=!1;closedReason;maxDataChannelSize=65535;constructor(e,n){this.peerConn=e,this.dataChannel=n,this.ready=new Promise((a,o)=>{this.pResolve=a,this.pReject=o}),n.addEventListener("open",()=>this.onChannelOpen()),n.addEventListener("close",()=>this.onChannelClose()),n.addEventListener("error",a=>{this.onChannelError(a)}),e.addEventListener("iceconnectionstatechange",()=>{const a=e.iceConnectionState;(a==="failed"||a==="disconnected"||a==="closed")&&this.pReject?.(new Error(`ICE connection failed with state: ${a}`))})}isClosed(){return this.closed}isClosedReason(){return this.closedReason}closeWithReason(e){this.closed||(this.closed=!0,this.closedReason=e,this.pReject?.(e),this.peerConn.close(),this.dataChannel.close())}onChannelOpen(){this.pResolve?.(void 0)}onChannelClose(){this.closeWithReason(new ge("data channel closed"))}onChannelError(e){console.error("channel error",e),this.closeWithReason(new Error(JSON.stringify(e)))}write(e){this.dataChannel.send(e.toBinary())}}const Vr=33554432;class B_{grpcStream;onDone;closed=!1;packetBuf=[];packetBufSize=0;constructor(e,n){this.grpcStream=e,this.onDone=n}closeWithRecvError(){this.closed||(this.closed=!0,this.onDone(this.grpcStream.id))}processPacketMessage(e){const{data:n}=e;if(n.length+this.packetBufSize>Vr){this.packetBuf.length=0,this.packetBufSize=0,console.error(`message size larger than max ${Vr}; discarding`);return}if(this.packetBuf.push(n),this.packetBufSize+=n.length,e.eom){const a=new Uint8Array(this.packetBufSize);let o=0;for(const i of this.packetBuf)a.set(i,o),o+=i.length;return this.packetBuf.length=0,this.packetBufSize=0,a}}}const F_=16373;class $r extends B_{channel;service;method;parseMessage;requestHeaders;headersReceived=!1;trailersReceived=!1;constructor(e,n,a,o,i,r){super(n,a),this.channel=e,this.service=o,this.method=i;const{parse:c}=yt(i,!0,void 0,void 0);this.parseMessage=c;const l=`/${o.typeName}/${i.name}`;this.requestHeaders=new Jr({method:l});const d=x_(qn(r));d&&(this.requestHeaders.metadata=d)}startRequest(e){e&&e.addEventListener("abort",()=>{this.resetStream()});try{this.channel.writeHeaders(this.grpcStream,this.requestHeaders)}catch(n){console.error("error writing headers",n),this.closeWithRecvError()}}sendMessage(e){if(e){this.writeMessage(!1,e);return}this.writeMessage(!1,void 0)}resetStream(){if(!this.closed)try{this.channel.writeReset(this.grpcStream)}catch(e){console.error("error writing reset",e),this.closeWithRecvError()}}writeMessage(e,n){try{if(!n||n.length===0){const o=new Ia({eom:!0}),i=new Pt({hasMessage:!!n,packetMessage:o,eos:e});this.channel.writeMessage(this.grpcStream,i);return}let a=n;for(;a.length>0;){const o=Math.min(a.length,F_),i=new Ia;i.data=a.slice(0,o),a=a.slice(o),a.length===0&&(i.eom=!0);const r=new Pt({hasMessage:!!a,packetMessage:i,eos:e});this.channel.writeMessage(this.grpcStream,r)}}catch(a){console.error("error writing message",a),this.closeWithRecvError()}}onResponse(e){switch(e.type.case){case"headers":{if(this.headersReceived){console.error(`invariant: headers already received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processHeaders(e.type.value);break}case"message":{if(!this.headersReceived){console.error(`invariant: headers not yet received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processMessage(e.type.value);break}case"trailers":{this.processTrailers(e.type.value);break}default:{console.error("unknown response type",e.type.case);break}}}processHeaders(e){this.headersReceived=!0,this.onHeaders(e)}processMessage(e){if(!e.packetMessage)return;const n=super.processPacketMessage(e.packetMessage);n&&this.onMessage(n)}processTrailers(e){this.trailersReceived=!0;const{status:n}=e,a=n?n.code:0;if(this.onTrailers(e),a===0){this.closeWithRecvError();return}this.closeWithRecvError()}}const x_=t=>{if(!t)return;const e=new Ea({md:Object.fromEntries([...t.entries()].map(([n,a])=>[n,new zr({values:[a]})]))});return Object.keys(e.md).length>0?e:void 0},At=t=>{const e=Object.entries(t?.md??{}).flatMap(([n,{values:a}])=>a.map(o=>[n,o]));return new Headers(e)};class J_ extends $r{awaitingHeadersResult;gotHeaders=!1;respStream=d1();trailers=new Headers;respStreamQueue;async run(e,n,a,o){const r={req:{stream:!0,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??ya(),message:a},next:async c=>{const d=await new Promise((u,h)=>{this.awaitingHeadersResult={success:u,failure:h},this.startRequest(e),this.sendMessages(c.message).catch(I=>{console.error("error sending streaming message",I),this.closeWithRecvError()})});return{...c,header:d,trailer:this.trailers,message:this.respStream}}};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),Dr(r)}async sendMessages(e){for await(const n of e)this.sendMessage(n.toBinary());this.writeMessage(!0,void 0)}onHeaders(e){this.gotHeaders=!0,this.awaitingHeadersResult?.success(At(e.metadata))}onTrailers(e){if(e.metadata?.md){for(const n in e.metadata.md)if(Object.hasOwn(e.metadata.md,n)){const a=e.metadata.md[n];for(const o of a?.values??[])this.trailers.append(n,o)}}if(this.respStream.close(),!e.status||e.status.code===0){if(this.gotHeaders)return;this.awaitingHeadersResult?.success(new Headers);return}this.gotHeaders||this.awaitingHeadersResult?.failure(e.status.message)}onMessage(e){const n=this.parseMessage(e);this.respStreamQueue=this.respStreamQueue?this.respStreamQueue.then(async()=>this.respStream.write(n)):this.respStream.write(n),this.respStreamQueue.catch(a=>{console.error(`error pushing received message into stream; failing: ${a}`),this.resetStream()})}}class z_ extends $r{result;headers;message;async run(e,n,a,o){const r={req:{stream:!1,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??ya(),message:a},next:async c=>new Promise((l,d)=>{this.result={success:l,failure:d},this.startRequest(),this.sendMessage(c.message.toBinary())})};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),Cr(r)}onHeaders(e){if(this.headers!==void 0){this.result?.failure(new Error("invariant: received headers more than once"));return}this.headers=At(e.metadata)}onTrailers(e){const n=At(e.metadata);if(!e.status||e.status.code===0){if(!this.headers){this.result?.failure(new Error("invariant: received trailers for successful unary request without headers"));return}if(this.message===void 0){this.result?.failure(new Error("invariant: received trailers for successful unary request without message"));return}this.result?.success({stream:!1,header:this.headers,message:this.message,trailer:n,service:this.service,method:this.method});return}this.result?.failure(e.status.message)}onMessage(e){if(this.message!==void 0){this.result?.failure(new Error("invariant: received two response messages for unary request"));return}this.message=this.parseMessage(e)}}const V_=256;class $_ extends G_{streamIDCounter=0;streams=new Map;constructor(e,n){super(e,n),n.addEventListener("message",a=>{this.onChannelMessage(a)}),e.addEventListener("iceconnectionstatechange",()=>{const a=e.iceConnectionState;(a==="failed"||a==="disconnected"||a==="closed")&&this.onConnectionTerminated()}),n.addEventListener("close",()=>this.onConnectionTerminated())}onConnectionTerminated(){this.closeWithReason(new ge("data channel closed"));for(const e of this.streams.values())e.cs.closeWithRecvError()}onChannelMessage(e){const n=A_.fromBinary(new Uint8Array(e.data)),{stream:a}=n;if(a===void 0){console.error("no stream id; discarding");return}const{id:o}=a,i=this.streams.get(o.toString());if(i===void 0){console.error("no stream for id; discarding","id",o);return}i.cs.onResponse(n)}nextStreamID(){const e=this.streamIDCounter;return this.streamIDCounter+=1,new Dt({id:BigInt(e)})}newStream(e,n,a,o,i){if(this.isClosed())throw new ge("connection closed");let r=this.streams.get(n.id.toString());if(r!==void 0)throw new Error("invariant: stream should not exist yet");if(Object.keys(this.streams).length>V_)throw new Error("stream limit hit");const c=new e(this,n,l=>this.removeStreamByID(l),a,o,i);return r={cs:c},this.streams.set(n.id.toString(),r),c}removeStreamByID(e){this.streams.delete(e.toString())}writeHeaders(e,n){this.write(new Nt({stream:e,type:{case:"headers",value:n}}))}writeMessage(e,n){this.write(new Nt({stream:e,type:{case:"message",value:n}}))}writeReset(e){this.write(new Nt({stream:e,type:{case:"rstStream",value:!0}}))}async unary(e,n,a,o,i,r,c){return this.newStream(z_,this.nextStreamID(),e,n,i).run(a,o,r,c)}async stream(e,n,a,o,i,r,c){return this.newStream(J_,this.nextStreamID(),e,n,i).run(a,o,r,c)}}const Oa="invariant: call uuid unset";class Y_{constructor(e,n,a,o,i){this.signalingClient=e,this.callOpts=n,this.pc=a,this.dc=o,this.dialOpts=i,this.clientChannel=new $_(this.pc,this.dc)}clientChannel;callUuid;sentDoneOrErrorOnce=!1;exchangeDone=!1;iceComplete=!1;haveInitResponse=!1;awaitingRemoteDescription;remoteDescriptionSet;numCallUpdates=0;maxCallUpdateDuration=0;totalCallUpdateDuration=0;async doExchange(){await this.setup();const e=Ct(this.pc.localDescription,this.dialOpts?.additionalSdpFields),n=wt(JSON.stringify(e)),a=new Ur({sdp:n});this.dialOpts&&this.dialOpts.disableTrickleICE&&(a.disableTrickle=this.dialOpts.disableTrickleICE),this.clientChannel.ready.then(async()=>{this.exchangeDone=!0,await this.sendDone()}).catch(console.error);const o=this.signalingClient.call(a,this.callOpts),i=this.processCallResponses(o);return await Promise.all([this.clientChannel.ready,i]),this.clientChannel}async setup(){if(this.remoteDescriptionSet=new Promise((e,n)=>{this.awaitingRemoteDescription={success:e,failure:n}}),!this.dialOpts?.disableTrickleICE){const e=await this.pc.createOffer({});this.pc.addEventListener("iceconnectionstatechange",()=>{if(this.pc.iceConnectionState!=="completed"||this.numCallUpdates===0)return;const n=this.totalCallUpdateDuration/this.numCallUpdates;console.groupCollapsed("Caller update statistics"),console.table({num_updates:this.numCallUpdates,average_duration:`${n}ms`,max_duration:`${this.maxCallUpdateDuration}ms`}),console.groupEnd()}),this.pc.addEventListener("icecandidate",n=>{this.onLocalICECandidate(n).catch(a=>{console.error(`error processing local ICE candidate ${a}`)})}),await this.pc.setLocalDescription(e)}}terminate(e){this.clientChannel.closeWithReason(e)}async processCallResponses(e){try{for await(const n of e)switch(n.stage.case){case"init":{if(!await this.handleInitResponse(n.uuid,n.stage.value))return;break}case"update":{if(!await this.handleUpdateResponse(n.uuid,n.stage.value))return;break}default:{await this.sendError("unknown CallResponse stage");return}}}catch(n){this.handleInitError(n)}}handleInitError(e){if(!(this.exchangeDone||this.pc.iceConnectionState==="connected")){if(e instanceof C&&e.code===g.Code.Unimplemented){if(e.message==="Response closed without headers")throw new ge("failed to dial");if(this.clientChannel.isClosed())throw new ge("client channel is closed");console.error(e.message)}throw e}}async handleInitResponse(e,n){if(this.haveInitResponse)return await this.sendError("got init stage more than once"),!1;this.haveInitResponse=!0,this.callUuid=e;const a=new RTCSessionDescription(JSON.parse(Gr(n.sdp)));return this.clientChannel.isClosed()?(await this.sendError("client channel is closed"),!1):(await this.pc.setRemoteDescription(a),this.awaitingRemoteDescription?.success(!0),this.dialOpts?.disableTrickleICE?(this.exchangeDone=!0,await this.sendDone(),!1):!0)}async handleUpdateResponse(e,n){if(!this.haveInitResponse)return await this.sendError("got update stage before init stage"),!1;if(e!==this.callUuid)return await this.sendError(`uuid mismatch; have=${e} want=${this.callUuid}`),!1;if(n.candidate===void 0)return await this.sendError("no candidate"),!1;const a=W_(n.candidate);a.candidate!==void 0&&console.debug(`received remote ICE ${a.candidate}`);try{await this.pc.addIceCandidate(a)}catch(o){throw console.log("error adding ice candidate",o),await this.sendError(JSON.stringify(o)),o}return!0}async onLocalICECandidate(e){if(await this.remoteDescriptionSet,this.exchangeDone||this.pc.iceConnectionState==="connected"){e.candidate!==null&&console.info("Dropping ICE candidate - exchange done or already connected",{exchangeDone:this.exchangeDone,iceConnectionState:this.pc.iceConnectionState,candidate:e.candidate.candidate});return}if(e.candidate===null){console.info("ICE gathering complete"),this.iceComplete=!0,await this.sendDone();return}if(this.callUuid===void 0||this.callUuid==="")throw console.error(Oa),new Error(Oa);e.candidate.candidate!==void 0&&console.info(`Gathered local ICE ${e.candidate.candidate}`);const n=j_(e.candidate),a=new Ra({uuid:this.callUuid,update:{case:"candidate",value:n}}),o=new Date;try{await this.signalingClient.callUpdate(a,this.callOpts),this.numCallUpdates+=1;const r=new Date().getTime()-o.getTime();r>this.maxCallUpdateDuration&&(this.maxCallUpdateDuration=r),this.totalCallUpdateDuration+=r}catch(i){if(this.exchangeDone||this.iceComplete||this.pc.iceConnectionState==="connected")return;console.error(i)}}async sendError(e){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(Oa);this.sentDoneOrErrorOnce=!0;const n=new Ra({uuid:this.callUuid,update:{case:"error",value:new Tn({code:g.Code.Unknown,message:e})}});try{await this.signalingClient.callUpdate(n,this.callOpts)}catch(a){console.error("failed to send call update; continuing",a)}}async sendDone(){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(Oa);this.sentDoneOrErrorOnce=!0;const e=new Ra({uuid:this.callUuid,update:{case:"done",value:!0}});try{await this.signalingClient.callUpdate(e,this.callOpts)}catch(n){console.error(n)}}}const W_=t=>{const e={candidate:t.candidate};return t.sdpMid!==void 0&&(e.sdpMid=t.sdpMid),t.sdpmLineIndex!==void 0&&(e.sdpMLineIndex=t.sdpmLineIndex),t.usernameFragment!==void 0&&(e.usernameFragment=t.usernameFragment),e},j_=t=>{const e=new An;return t.candidate!==void 0&&(e.candidate=t.candidate),t.sdpMid!==void 0&&t.sdpMid!==null&&(e.sdpMid=t.sdpMid),t.sdpMLineIndex!==void 0&&t.sdpMLineIndex!==null&&(e.sdpmLineIndex=t.sdpMLineIndex),t.usernameFragment!==void 0&&t.usernameFragment!==null&&(e.usernameFragment=t.usernameFragment),e},Ma=(t,e)=>globalThis.VIAM?.GRPC_TRACE_LOGGING===!0?{...t,unary:async(o,i,r,c,l,d,u)=>{const h=Pn.UuidTool.newUuid();console.trace(`Unary request ${h} : ${e}/${o.typeName}.${i.name}`);const I=await t.unary(o,i,r,c,l,d,u);return console.debug(`Unary response received: ${h}`),I},stream:async(o,i,r,c,l,d,u)=>{const h=Pn.UuidTool.newUuid();console.trace(`Stream request ${h} : ${e}/${o.typeName}.${i.name}`);const I=await t.stream(o,i,r,c,l,d,u);return console.debug(`Stream response received: ${h}`),I}}:t,Yr=(t,e)=>({...t,unary:async(o,i,r,c,l,d,u)=>{const h=`${o.typeName}/${i.name}`;ne("grpc_request",{connectionId:e,type:"unary",method:h});try{const I=await t.unary(o,i,r,c,l,d,u);return ne("grpc_response",{connectionId:e,type:"unary",method:h}),I}catch(I){throw ne("grpc_response",{connectionId:e,type:"unary",method:h,error:I instanceof Error?I.message:String(I)}),I}},stream:async(o,i,r,c,l,d,u)=>{if(!D_())return t.stream(o,i,r,c,l,d,u);const h=`${o.typeName}/${i.name}`;ne("grpc_request",{connectionId:e,type:"stream",method:h});let I;try{I=await t.stream(o,i,r,c,l,d,u)}catch(E){throw ne("grpc_response",{connectionId:e,type:"stream",method:h,error:E instanceof Error?E.message:String(E)}),E}return{...I,message:async function*(){try{for await(const O of I.message)ne("grpc_response",{connectionId:e,type:"stream",method:h}),yield O}catch(O){throw ne("grpc_response",{connectionId:e,type:"stream",method:h,error:O instanceof Error?O.message:String(O)}),O}}()}}}),ba=async(t,e,n=!1)=>{jr(e);const a=globalThis.VIAM?.GRPC_TRANSPORT_FACTORY??w_,o={baseUrl:t,credentials:"same-origin"};if(e?.accessToken!==void 0&&e.accessToken!==""&&!(e.externalAuthAddress!==void 0&&e.externalAuthAddress!==""&&e.externalAuthToEntity!==void 0&&e.externalAuthToEntity!=="")){const r=new Headers(e.extraHeaders);r.set("authorization",`Bearer ${e.accessToken}`);const c=new wa(o,a,r);return Ma(c,t)}if(e===void 0||e.credentials===void 0&&e.accessToken===void 0){n&&(o.credentials="include");const r=new Headers(e?.extraHeaders??{}),c=new wa(o,a,r);return Ma(c,t)}const i=await H_(t,a,e,o);return Ma(i,t)},qt=/^.*:\/\//u,H_=async(t,e,n,a)=>{const o=new Headers(n.extraHeaders);let i;if(n.accessToken===void 0||n.accessToken===""){const r=new bt({entity:Fn(n.credentials)&&n.credentials.authEntity?n.credentials.authEntity:t.replace(qt,"")});n.credentials&&(r.credentials=new qr({type:n.credentials.type,payload:n.credentials.payload}));const c=n.externalAuthAddress??t,l=e({baseUrl:c});i=(await X(s_,l).authenticate(r)).accessToken}else i=n.accessToken;if(n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""&&n.externalAuthToEntity!==void 0&&n.externalAuthToEntity!==""){const r=new Headers;r.set("authorization",`Bearer ${i}`),i="";const c=new bt({entity:n.externalAuthToEntity}),l=e({baseUrl:n.externalAuthAddress});i=(await X(o_,l).authenticateTo(c,{headers:r})).accessToken}return o.set("authorization",`Bearer ${i}`),new wa(a,e,o)};class wa{transport;extraHeaders;constructor(e,n,a){this.extraHeaders=a,this.transport=n(e)}unary=async(e,n,a,o,i,r,c)=>{const l=qn(i);for(const[d,u]of this.extraHeaders)l.set(d,u);return this.transport.unary(e,n,a,o,l,r,c)};stream=async(e,n,a,o,i,r,c)=>{const l=qn(i);for(const[d,u]of this.extraHeaders)l.set(d,u);return this.transport.stream(e,n,a,o,l,r,c)}}const qn=t=>{const e=new Headers;if(t!==void 0)if(Array.isArray(t))for(const[n,a]of t)e.append(n,a);else if("forEach"in t)typeof t.forEach=="function"&&t.forEach((n,a)=>{e.append(a,n)});else for(const[n,a]of Object.entries(t))e.append(n,a);return e},K_=async(t,e,n=!1)=>{const a=await ba(t,e,n);return X(I_,a)},X_=async(t,e)=>{try{return(await e.optionalWebRTCConfig({},t)).config??new _a}catch(n){if(n instanceof C&&n.code===g.Code.Unimplemented)return new _a;throw n}},Q_=async(t,e,n,a=!1)=>{let o=t.replace(/\/$/u,"");n?.webrtcOptions?.signalingInsecure&&(o=`http://${o.replace(/^https?:\/\//u,"")}`),jr(n);const i={headers:{"rpc-host":e}},r=sS(o,n),c=await K_(o,r,a),l=await tS(c,i,n),{pc:d,dc:u}=await E_(l.disableTrickleICE,l.rtcConfig,l.additionalSdpFields);let h=!1;const I=new Y_(c,i,d,u,l);let R;const E=n?.dialTimeoutMs??n?.dialTimeout;E!==void 0&&E>0&&(R=setTimeout(()=>{h||I.terminate(new Error("timed out"))},E));try{const O=await I.doExchange();n?.externalAuthAddress!==void 0&&n.externalAuthAddress!==""||n?.credentials?.type,h=!0;const D=new Headers(n?.extraHeaders??{}),V=new wa({baseUrl:e},()=>O,D);return{transport:Ma(V,e),peerConnection:d,dataChannel:u}}catch(O){throw console.error("error dialing",O),O}finally{R!==void 0&&(clearTimeout(R),R=void 0),h||(d.close(),u.close())}},Z_=t=>(typeof t.urls=="string"?[t.urls]:t.urls).some(n=>n.startsWith("turn:")||n.startsWith("turns:")),Wr=t=>{const e=t.indexOf(":");if(e<0)return;const n=t.slice(0,e);if(n!=="turn"&&n!=="turns")return;const a=t.slice(e+1),o=a.indexOf("?"),i=o>=0?a.slice(0,o):a,r=o>=0?a.slice(o+1):"",c=i.lastIndexOf(":");if(c<0)return;const l=i.slice(0,c),d=Number.parseInt(i.slice(c+1),10);if(Number.isNaN(d))return;const u=r.split("&").find(h=>h.startsWith("transport="))?.slice(10)??"udp";return{scheme:n,host:l,port:d,transport:u}},eS=(t,e)=>t.scheme===e.scheme&&t.host===e.host&&t.port===e.port&&t.transport===e.transport,nS=t=>`${t.scheme}:${t.host}:${t.port}?transport=${t.transport}`,aS=t=>{let e;return t.turnUri!==void 0&&(e=Wr(t.turnUri),e===void 0)?(console.warn(`Failed to parse turnUri, ignoring all TURN URI options: ${t.turnUri}`),t):(t.rtcConfig={...t.rtcConfig,iceServers:(t.rtcConfig?.iceServers??[]).map(n=>{const o=(typeof n.urls=="string"?[n.urls]:n.urls).flatMap(i=>{const r=Wr(i);return r===void 0?[i]:e!==void 0&&!eS(r,e)?[]:(t.turnScheme!==void 0&&(r.scheme=t.turnScheme),t.turnPort!==void 0&&(r.port=t.turnPort),t.turnTransport!==void 0&&(r.transport=t.turnTransport),[nS(r)])});return{...n,urls:o}}).filter(n=>(typeof n.urls=="string"?[n.urls]:n.urls).length>0)},console.debug("TURN filter options set",{turnUri:t.turnUri,turnScheme:t.turnScheme,turnPort:t.turnPort,turnTransport:t.turnTransport}),t)},tS=async(t,e,n)=>{const a=await X_(e,t),o=a.additionalIceServers.map(c=>{const l=[];for(const d of c.urls)d.endsWith("udp")&&l.push(`${d.slice(0,-3)}tcp`),l.push(d);return{urls:l,credential:c.credential,username:c.username}}),i=n??{};let r;return i.webrtcOptions===void 0?r={disableTrickleICE:a.disableTrickle,rtcConfig:{iceServers:o}}:(r=JSON.parse(JSON.stringify(i.webrtcOptions)),r.rtcConfig===void 0?r.rtcConfig={iceServers:o}:r.rtcConfig.iceServers=[...r.rtcConfig.iceServers??[],...o]),r.forceRelay&&r.forceP2P&&console.warn("forceRelay and forceP2P are both set; forceP2P strips TURN servers that forceRelay requires so the connection will fail"),r.forceP2P&&(console.debug("force P2P enabled; stripping TURN servers and ignoring signaling server ICE config"),r.rtcConfig={...r.rtcConfig,iceServers:(r.rtcConfig?.iceServers??[]).filter(c=>!Z_(c))}),r.forceRelay&&(console.debug("force relay enabled; using relay-only ICE transport policy"),r.rtcConfig={...r.rtcConfig,iceTransportPolicy:"relay"}),r.forceP2P&&(r.turnUri!==void 0||r.turnScheme!==void 0||r.turnTransport!==void 0||r.turnPort!==void 0)&&console.warn("forceP2P is set alongside TURN options; the TURN filter will have no effect since TURN servers were already stripped"),(r.turnUri!==void 0||r.turnScheme!==void 0||r.turnTransport!==void 0||r.turnPort!==void 0)&&(r=aS(r)),r},sS=(t,e)=>{let n=e;return e&&(n={...e},e.accessToken===void 0&&(Fn(n.credentials)&&!n.credentials.authEntity&&(n.credentials.authEntity=n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""?n.externalAuthAddress.replace(qt,""):t.replace(qt,"")),n.credentials=e.webrtcOptions?.signalingCredentials,n.accessToken=e.webrtcOptions?.signalingAccessToken),n.externalAuthAddress=e.webrtcOptions?.signalingExternalAuthAddress,n.externalAuthToEntity=e.webrtcOptions?.signalingExternalAuthToEntity),n},jr=t=>{if(t){if(t.accessToken!==void 0&&t.accessToken.length>0){if(t.credentials)throw new Error("cannot set credentials with accessToken");if(t.webrtcOptions?.signalingAccessToken!==void 0)throw new Error("cannot set webrtcOptions.signalingAccessToken with accessToken");if(t.webrtcOptions?.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with accessToken")}if(t.webrtcOptions?.signalingAccessToken!==void 0&&t.webrtcOptions.signalingAccessToken.length>0&&t.webrtcOptions.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with webrtcOptions.signalingAccessToken")}},oS="v0.1.558",Hr=s.makeEnum("viam.common.v1.KinematicsFileFormat",[{no:0,name:"KINEMATICS_FILE_FORMAT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"KINEMATICS_FILE_FORMAT_SVA",localName:"SVA"},{no:2,name:"KINEMATICS_FILE_FORMAT_URDF",localName:"URDF"}]),z=s.makeMessageType("viam.common.v1.ResourceName",()=>[{no:1,name:"namespace",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"subtype",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9}]),Te=s.makeMessageType("viam.common.v1.Pose",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),Ut=s.makeMessageType("viam.common.v1.Orientation",()=>[{no:1,name:"o_x",kind:"scalar",T:1},{no:2,name:"o_y",kind:"scalar",T:1},{no:3,name:"o_z",kind:"scalar",T:1},{no:4,name:"theta",kind:"scalar",T:1}]),Kr=s.makeMessageType("viam.common.v1.PoseCloud",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),je=s.makeMessageType("viam.common.v1.PoseInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose",kind:"message",T:Te},{no:3,name:"goal_cloud",kind:"message",T:Kr,opt:!0}]),ke=s.makeMessageType("viam.common.v1.Vector3",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),Xr=s.makeMessageType("viam.common.v1.Sphere",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1}]),Qr=s.makeMessageType("viam.common.v1.Capsule",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1},{no:2,name:"length_mm",kind:"scalar",T:1}]),Zr=s.makeMessageType("viam.common.v1.RectangularPrism",()=>[{no:1,name:"dims_mm",kind:"message",T:ke}]),Ca=s.makeMessageType("viam.common.v1.Mesh",()=>[{no:1,name:"content_type",kind:"scalar",T:9},{no:2,name:"mesh",kind:"scalar",T:12}]),em=s.makeMessageType("viam.common.v1.PointCloud",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12}]),an=s.makeMessageType("viam.common.v1.Geometry",()=>[{no:1,name:"center",kind:"message",T:Te},{no:2,name:"sphere",kind:"message",T:Xr,oneof:"geometry_type"},{no:3,name:"box",kind:"message",T:Zr,oneof:"geometry_type"},{no:5,name:"capsule",kind:"message",T:Qr,oneof:"geometry_type"},{no:6,name:"mesh",kind:"message",T:Ca,oneof:"geometry_type"},{no:7,name:"pointcloud",kind:"message",T:em,oneof:"geometry_type"},{no:4,name:"label",kind:"scalar",T:9}]),Lt=s.makeMessageType("viam.common.v1.GeometriesInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"geometries",kind:"message",T:an,repeated:!0}]),Gt=s.makeMessageType("viam.common.v1.PointCloudObject",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12},{no:2,name:"geometries",kind:"message",T:Lt}]),He=s.makeMessageType("viam.common.v1.GeoPoint",()=>[{no:1,name:"latitude",kind:"scalar",T:1},{no:2,name:"longitude",kind:"scalar",T:1}]),Da=s.makeMessageType("viam.common.v1.GeoGeometry",()=>[{no:1,name:"location",kind:"message",T:He},{no:2,name:"geometries",kind:"message",T:an,repeated:!0}]),xe=s.makeMessageType("viam.common.v1.Transform",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose_in_observer_frame",kind:"message",T:je},{no:3,name:"physical_object",kind:"message",T:an,opt:!0},{no:4,name:"uuid",kind:"scalar",T:12},{no:5,name:"metadata",kind:"message",T:p,opt:!0}]),nm=s.makeMessageType("viam.common.v1.WorldState",()=>[{no:1,name:"obstacles",kind:"message",T:Lt,repeated:!0},{no:3,name:"transforms",kind:"message",T:xe,repeated:!0}]),iS=s.makeMessageType("viam.common.v1.ActuatorStatus",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),am=s.makeMessageType("viam.common.v1.ResponseMetadata",()=>[{no:1,name:"captured_at",kind:"message",T:_,opt:!0}]),P=s.makeMessageType("viam.common.v1.DoCommandRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"command",kind:"message",T:p}]),q=s.makeMessageType("viam.common.v1.DoCommandResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),N=s.makeMessageType("viam.common.v1.GetStatusRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),A=s.makeMessageType("viam.common.v1.GetStatusResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),Un=s.makeMessageType("viam.common.v1.GetKinematicsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Na=s.makeMessageType("viam.common.v1.GetKinematicsResponse",()=>[{no:1,name:"format",kind:"enum",T:s.getEnumType(Hr)},{no:2,name:"kinematics_data",kind:"scalar",T:12},{no:3,name:"meshes_by_urdf_filepath",kind:"map",K:9,V:{kind:"message",T:Ca}}]),F=s.makeMessageType("viam.common.v1.GetGeometriesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),H=s.makeMessageType("viam.common.v1.GetGeometriesResponse",()=>[{no:1,name:"geometries",kind:"message",T:an,repeated:!0}]),Bt=s.makeMessageType("viam.common.v1.Get3DModelsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),tm=s.makeMessageType("viam.common.v1.Get3DModelsResponse",()=>[{no:1,name:"models",kind:"map",K:9,V:{kind:"message",T:Ca}}]),rS=s.makeMessageType("viam.common.v1.GetWorldPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:Te}]),tn=s.makeMessageType("viam.common.v1.GetReadingsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pa=s.makeMessageType("viam.common.v1.GetReadingsResponse",()=>[{no:1,name:"readings",kind:"map",K:9,V:{kind:"message",T:ee}}]),Ln=s.makeMessageType("viam.common.v1.LogEntry",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9},{no:3,name:"time",kind:"message",T:_},{no:4,name:"logger_name",kind:"scalar",T:9},{no:5,name:"message",kind:"scalar",T:9},{no:6,name:"caller",kind:"message",T:p},{no:7,name:"stack",kind:"scalar",T:9},{no:8,name:"fields",kind:"message",T:p,repeated:!0}]),Aa=s.makeMessageType("viam.common.v1.AudioInfo",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),Gn=s.makeMessageType("viam.common.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ft=s.makeMessageType("viam.common.v1.GetPropertiesResponse",()=>[{no:1,name:"supported_codecs",kind:"scalar",T:9,repeated:!0},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),sm=s.makeExtension("viam.common.v1.safety_heartbeat_monitored",de,{no:84260,kind:"scalar",T:8,opt:!0}),xt=Object.freeze(Object.defineProperty({__proto__:null,ActuatorStatus:iS,AudioInfo:Aa,Capsule:Qr,DoCommandRequest:P,DoCommandResponse:q,GeoGeometry:Da,GeoPoint:He,GeometriesInFrame:Lt,Geometry:an,Get3DModelsRequest:Bt,Get3DModelsResponse:tm,GetGeometriesRequest:F,GetGeometriesResponse:H,GetKinematicsRequest:Un,GetKinematicsResponse:Na,GetPropertiesRequest:Gn,GetPropertiesResponse:Ft,GetReadingsRequest:tn,GetReadingsResponse:Pa,GetStatusRequest:N,GetStatusResponse:A,GetWorldPoseResponse:rS,KinematicsFileFormat:Hr,LogEntry:Ln,Mesh:Ca,Orientation:Ut,PointCloud:em,PointCloudObject:Gt,Pose:Te,PoseCloud:Kr,PoseInFrame:je,RectangularPrism:Zr,ResourceName:z,ResponseMetadata:am,Sphere:Xr,Transform:xe,Vector3:ke,WorldState:nm,safety_heartbeat_monitored:sm},Symbol.toStringTag,{value:"Module"})),Bn=new Headers({viam_client:`typescript;v0.73.0;${oS}`}),U=async function(e,n,a,o={},i={}){const r=new P({name:n,command:a instanceof p?a:p.fromJson(a)});o.requestLogger?.(r);const l=(await e(r,i)).result?.toJson();return l===void 0?{}:l},mS=(t,e)=>{const n=e??{headers:{}};let a="";if(t===void 0){const o="abcdefghijklmnopqrstuvwxyz";for(let i=0;i<6;i+=1)a+=o[Math.floor(Math.random()*26)]}else a=t;return n.headers.dtname=a,n},cS=t=>{if(t.headers){const{_:e,...n}=t.headers;t.headers=n}},lS=(t,e,n)=>{const a=n??{headers:{}};return a.headers[t]=e,a},dS=(t,e)=>{const{[e]:n,...a}=t.headers;t.headers=a},om=async function(e,n,a=p.fromJson({}),o={}){const i=new Un({name:n,extra:a}),r=await e(i,o),l=new TextDecoder("utf8").decode(r.kinematicsData),d=JSON.parse(l);return{...d,kinematicsData:d,meshesByUrdfFilepath:r.meshesByUrdfFilepath}},im=async function(e,n,a=p.fromJson({}),o={}){const i=new F({name:n,extra:a});return(await e(i,o)).geometries},L=async function(e,n,a={},o={}){const i=new N({name:n});a.requestLogger?.(i);const c=(await e(i,o)).result?.toJson();return c===void 0?{}:c},Fn=t=>t!==void 0&&"authEntity"in t,pS=async(t,e)=>e.type==="access-token"?ba(t,{accessToken:e.payload,extraHeaders:Bn}):ba(t,{credentials:e,extraHeaders:Bn}),Jt=1e4;var K=(t=>(t.CONNECTING="connecting",t.CONNECTED="connected",t.DISCONNECTING="disconnecting",t.DISCONNECTED="disconnected",t.DIALING="dialing",t.RECONNECTING="reconnecting",t.RECONNECTION_FAILED="reconnection_failed",t))(K||{});class rm{listeners={};on(e,n){const{listeners:a}=this;a[e]??=new Set,a[e]?.add(n)}once(e,n){const a=o=>{n(o),this.off(e,n)};this.on(e,a)}has(e,n){return this.listeners[e]?.has(n)}off(e,n){this.listeners[e]?.delete(n)}emit(e,n){for(const a of this.listeners[e]??[])a(n)}}const zt=s.makeMessageType("viam.component.arm.v1.GetEndPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),mm=s.makeMessageType("viam.component.arm.v1.GetEndPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Te}]),kn=s.makeMessageType("viam.component.arm.v1.JointPositions",()=>[{no:1,name:"values",kind:"scalar",T:1,repeated:!0}]),Vt=s.makeMessageType("viam.component.arm.v1.GetJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),cm=s.makeMessageType("viam.component.arm.v1.GetJointPositionsResponse",()=>[{no:1,name:"positions",kind:"message",T:kn}]),$t=s.makeMessageType("viam.component.arm.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"to",kind:"message",T:Te},{no:99,name:"extra",kind:"message",T:p}]),lm=s.makeMessageType("viam.component.arm.v1.MoveToPositionResponse",[]),Yt=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:kn},{no:99,name:"extra",kind:"message",T:p}]),dm=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsResponse",[]),pm=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:kn,repeated:!0},{no:3,name:"options",kind:"message",T:km,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),um=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsResponse",[]),Wt=s.makeMessageType("viam.component.arm.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),gm=s.makeMessageType("viam.component.arm.v1.StopResponse",[]),uS=s.makeMessageType("viam.component.arm.v1.Status",()=>[{no:1,name:"end_position",kind:"message",T:Te},{no:2,name:"joint_positions",kind:"message",T:kn},{no:3,name:"is_moving",kind:"scalar",T:8}]),jt=s.makeMessageType("viam.component.arm.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Tm=s.makeMessageType("viam.component.arm.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),km=s.makeMessageType("viam.component.arm.v1.MoveOptions",()=>[{no:1,name:"max_vel_degs_per_sec",kind:"scalar",T:1,opt:!0},{no:2,name:"max_acc_degs_per_sec2",kind:"scalar",T:1,opt:!0},{no:3,name:"max_vel_degs_per_sec_joints",kind:"scalar",T:1,repeated:!0},{no:4,name:"max_acc_degs_per_sec2_joints",kind:"scalar",T:1,repeated:!0},{no:5,name:"max_tcp_speed",kind:"scalar",T:1,opt:!0}]),ym=Object.freeze(Object.defineProperty({__proto__:null,GetEndPositionRequest:zt,GetEndPositionResponse:mm,GetJointPositionsRequest:Vt,GetJointPositionsResponse:cm,IsMovingRequest:jt,IsMovingResponse:Tm,JointPositions:kn,MoveOptions:km,MoveThroughJointPositionsRequest:pm,MoveThroughJointPositionsResponse:um,MoveToJointPositionsRequest:Yt,MoveToJointPositionsResponse:dm,MoveToPositionRequest:$t,MoveToPositionResponse:lm,Status:uS,StopRequest:Wt,StopResponse:gm},Symbol.toStringTag,{value:"Module"})),vm={typeName:"viam.component.arm.v1.ArmService",methods:{getEndPosition:{name:"GetEndPosition",I:zt,O:mm,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:$t,O:lm,kind:m.Unary},getJointPositions:{name:"GetJointPositions",I:Vt,O:cm,kind:m.Unary},moveToJointPositions:{name:"MoveToJointPositions",I:Yt,O:dm,kind:m.Unary},moveThroughJointPositions:{name:"MoveThroughJointPositions",I:pm,O:um,kind:m.Unary},stop:{name:"Stop",I:Wt,O:gm,kind:m.Unary},isMoving:{name:"IsMoving",I:jt,O:Tm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getKinematics:{name:"GetKinematics",I:Un,O:Na,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary},get3DModels:{name:"Get3DModels",I:Bt,O:tm,kind:m.Unary}}},Ht=s.makeMessageType("viam.component.base.v1.MoveStraightRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"distance_mm",kind:"scalar",T:3},{no:3,name:"mm_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),hm=s.makeMessageType("viam.component.base.v1.MoveStraightResponse",[]),Kt=s.makeMessageType("viam.component.base.v1.SpinRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:1},{no:3,name:"degs_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),fm=s.makeMessageType("viam.component.base.v1.SpinResponse",[]),Xt=s.makeMessageType("viam.component.base.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Rm=s.makeMessageType("viam.component.base.v1.StopResponse",[]),Qt=s.makeMessageType("viam.component.base.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:ke},{no:3,name:"angular",kind:"message",T:ke},{no:99,name:"extra",kind:"message",T:p}]),_m=s.makeMessageType("viam.component.base.v1.SetPowerResponse",[]),Zt=s.makeMessageType("viam.component.base.v1.SetVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:ke},{no:3,name:"angular",kind:"message",T:ke},{no:99,name:"extra",kind:"message",T:p}]),Sm=s.makeMessageType("viam.component.base.v1.SetVelocityResponse",[]),es=s.makeMessageType("viam.component.base.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Im=s.makeMessageType("viam.component.base.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),qa=s.makeMessageType("viam.component.base.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Em=s.makeMessageType("viam.component.base.v1.GetPropertiesResponse",()=>[{no:1,name:"width_meters",kind:"scalar",T:1},{no:2,name:"turning_radius_meters",kind:"scalar",T:1},{no:3,name:"wheel_circumference_meters",kind:"scalar",T:1}]),Om=Object.freeze(Object.defineProperty({__proto__:null,GetPropertiesRequest:qa,GetPropertiesResponse:Em,IsMovingRequest:es,IsMovingResponse:Im,MoveStraightRequest:Ht,MoveStraightResponse:hm,SetPowerRequest:Qt,SetPowerResponse:_m,SetVelocityRequest:Zt,SetVelocityResponse:Sm,SpinRequest:Kt,SpinResponse:fm,StopRequest:Xt,StopResponse:Rm},Symbol.toStringTag,{value:"Module"})),Mm={typeName:"viam.component.base.v1.BaseService",methods:{moveStraight:{name:"MoveStraight",I:Ht,O:hm,kind:m.Unary},spin:{name:"Spin",I:Kt,O:fm,kind:m.Unary},setPower:{name:"SetPower",I:Qt,O:_m,kind:m.Unary},setVelocity:{name:"SetVelocity",I:Zt,O:Sm,kind:m.Unary},stop:{name:"Stop",I:Xt,O:Rm,kind:m.Unary},isMoving:{name:"IsMoving",I:es,O:Im,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary},getProperties:{name:"GetProperties",I:qa,O:Em,kind:m.Unary}}},bm=s.makeEnum("viam.component.board.v1.PowerMode",[{no:0,name:"POWER_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POWER_MODE_NORMAL",localName:"NORMAL"},{no:2,name:"POWER_MODE_OFFLINE_DEEP",localName:"OFFLINE_DEEP"}]),gS=s.makeMessageType("viam.component.board.v1.Status",()=>[{no:1,name:"analogs",kind:"map",K:9,V:{kind:"scalar",T:5}},{no:2,name:"digital_interrupts",kind:"map",K:9,V:{kind:"scalar",T:3}}]),ns=s.makeMessageType("viam.component.board.v1.SetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"high",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),wm=s.makeMessageType("viam.component.board.v1.SetGPIOResponse",[]),as=s.makeMessageType("viam.component.board.v1.GetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Cm=s.makeMessageType("viam.component.board.v1.GetGPIOResponse",()=>[{no:1,name:"high",kind:"scalar",T:8}]),ts=s.makeMessageType("viam.component.board.v1.PWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Dm=s.makeMessageType("viam.component.board.v1.PWMResponse",()=>[{no:1,name:"duty_cycle_pct",kind:"scalar",T:1}]),ss=s.makeMessageType("viam.component.board.v1.SetPWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"duty_cycle_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),Nm=s.makeMessageType("viam.component.board.v1.SetPWMResponse",[]),os=s.makeMessageType("viam.component.board.v1.PWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pm=s.makeMessageType("viam.component.board.v1.PWMFrequencyResponse",()=>[{no:1,name:"frequency_hz",kind:"scalar",T:4}]),is=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"frequency_hz",kind:"scalar",T:4},{no:99,name:"extra",kind:"message",T:p}]),Am=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyResponse",[]),rs=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"analog_reader_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),qm=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderResponse",()=>[{no:1,name:"value",kind:"scalar",T:5},{no:2,name:"min_range",kind:"scalar",T:2},{no:3,name:"max_range",kind:"scalar",T:2},{no:4,name:"step_size",kind:"scalar",T:2}]),ms=s.makeMessageType("viam.component.board.v1.WriteAnalogRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"value",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Um=s.makeMessageType("viam.component.board.v1.WriteAnalogResponse",[]),cs=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"digital_interrupt_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Lm=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueResponse",()=>[{no:1,name:"value",kind:"scalar",T:3}]),ls=s.makeMessageType("viam.component.board.v1.StreamTicksRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Gm=s.makeMessageType("viam.component.board.v1.StreamTicksResponse",()=>[{no:1,name:"pin_name",kind:"scalar",T:9},{no:2,name:"time",kind:"scalar",T:4},{no:3,name:"high",kind:"scalar",T:8}]),ds=s.makeMessageType("viam.component.board.v1.SetPowerModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_mode",kind:"enum",T:s.getEnumType(bm)},{no:3,name:"duration",kind:"message",T:J,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Bm=s.makeMessageType("viam.component.board.v1.SetPowerModeResponse",[]),Fm=Object.freeze(Object.defineProperty({__proto__:null,GetDigitalInterruptValueRequest:cs,GetDigitalInterruptValueResponse:Lm,GetGPIORequest:as,GetGPIOResponse:Cm,PWMFrequencyRequest:os,PWMFrequencyResponse:Pm,PWMRequest:ts,PWMResponse:Dm,PowerMode:bm,ReadAnalogReaderRequest:rs,ReadAnalogReaderResponse:qm,SetGPIORequest:ns,SetGPIOResponse:wm,SetPWMFrequencyRequest:is,SetPWMFrequencyResponse:Am,SetPWMRequest:ss,SetPWMResponse:Nm,SetPowerModeRequest:ds,SetPowerModeResponse:Bm,Status:gS,StreamTicksRequest:ls,StreamTicksResponse:Gm,WriteAnalogRequest:ms,WriteAnalogResponse:Um},Symbol.toStringTag,{value:"Module"})),xm={typeName:"viam.component.board.v1.BoardService",methods:{setGPIO:{name:"SetGPIO",I:ns,O:wm,kind:m.Unary},getGPIO:{name:"GetGPIO",I:as,O:Cm,kind:m.Unary},pWM:{name:"PWM",I:ts,O:Dm,kind:m.Unary},setPWM:{name:"SetPWM",I:ss,O:Nm,kind:m.Unary},pWMFrequency:{name:"PWMFrequency",I:os,O:Pm,kind:m.Unary},setPWMFrequency:{name:"SetPWMFrequency",I:is,O:Am,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},readAnalogReader:{name:"ReadAnalogReader",I:rs,O:qm,kind:m.Unary},writeAnalog:{name:"WriteAnalog",I:ms,O:Um,kind:m.Unary},getDigitalInterruptValue:{name:"GetDigitalInterruptValue",I:cs,O:Lm,kind:m.Unary},streamTicks:{name:"StreamTicks",I:ls,O:Gm,kind:m.ServerStreaming},setPowerMode:{name:"SetPowerMode",I:ds,O:Bm,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}},ps=s.makeEnum("viam.component.encoder.v1.PositionType",[{no:0,name:"POSITION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POSITION_TYPE_TICKS_COUNT",localName:"TICKS_COUNT"},{no:2,name:"POSITION_TYPE_ANGLE_DEGREES",localName:"ANGLE_DEGREES"}]),us=s.makeMessageType("viam.component.encoder.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ps),opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Jm=s.makeMessageType("viam.component.encoder.v1.GetPositionResponse",()=>[{no:1,name:"value",kind:"scalar",T:2},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ps)}]),gs=s.makeMessageType("viam.component.encoder.v1.ResetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),zm=s.makeMessageType("viam.component.encoder.v1.ResetPositionResponse",[]),Ts=s.makeMessageType("viam.component.encoder.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Vm=s.makeMessageType("viam.component.encoder.v1.GetPropertiesResponse",()=>[{no:1,name:"ticks_count_supported",kind:"scalar",T:8},{no:2,name:"angle_degrees_supported",kind:"scalar",T:8}]),$m=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:us,GetPositionResponse:Jm,GetPropertiesRequest:Ts,GetPropertiesResponse:Vm,PositionType:ps,ResetPositionRequest:gs,ResetPositionResponse:zm},Symbol.toStringTag,{value:"Module"})),Ym={typeName:"viam.component.encoder.v1.EncoderService",methods:{getPosition:{name:"GetPosition",I:us,O:Jm,kind:m.Unary},resetPosition:{name:"ResetPosition",I:gs,O:zm,kind:m.Unary},getProperties:{name:"GetProperties",I:Ts,O:Vm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}},ks=s.makeMessageType("viam.component.gantry.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Wm=s.makeMessageType("viam.component.gantry.v1.GetPositionResponse",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0}]),ys=s.makeMessageType("viam.component.gantry.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"speeds_mm_per_sec",kind:"scalar",T:1,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),jm=s.makeMessageType("viam.component.gantry.v1.MoveToPositionResponse",[]),vs=s.makeMessageType("viam.component.gantry.v1.HomeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Hm=s.makeMessageType("viam.component.gantry.v1.HomeResponse",()=>[{no:1,name:"homed",kind:"scalar",T:8}]),hs=s.makeMessageType("viam.component.gantry.v1.GetLengthsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Km=s.makeMessageType("viam.component.gantry.v1.GetLengthsResponse",()=>[{no:1,name:"lengths_mm",kind:"scalar",T:1,repeated:!0}]),fs=s.makeMessageType("viam.component.gantry.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Xm=s.makeMessageType("viam.component.gantry.v1.StopResponse",[]),TS=s.makeMessageType("viam.component.gantry.v1.Status",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:2,name:"lengths_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"is_moving",kind:"scalar",T:8}]),Rs=s.makeMessageType("viam.component.gantry.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Qm=s.makeMessageType("viam.component.gantry.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),kS=Object.freeze(Object.defineProperty({__proto__:null,GetLengthsRequest:hs,GetLengthsResponse:Km,GetPositionRequest:ks,GetPositionResponse:Wm,HomeRequest:vs,HomeResponse:Hm,IsMovingRequest:Rs,IsMovingResponse:Qm,MoveToPositionRequest:ys,MoveToPositionResponse:jm,Status:TS,StopRequest:fs,StopResponse:Xm},Symbol.toStringTag,{value:"Module"})),Zm={typeName:"viam.component.gantry.v1.GantryService",methods:{getPosition:{name:"GetPosition",I:ks,O:Wm,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:ys,O:jm,kind:m.Unary},home:{name:"Home",I:vs,O:Hm,kind:m.Unary},getLengths:{name:"GetLengths",I:hs,O:Km,kind:m.Unary},stop:{name:"Stop",I:fs,O:Xm,kind:m.Unary},isMoving:{name:"IsMoving",I:Rs,O:Qm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getKinematics:{name:"GetKinematics",I:Un,O:Na,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}},_s={typeName:"viam.component.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}},yS=Object.freeze(Object.defineProperty({__proto__:null,GenericService:_s},Symbol.toStringTag,{value:"Module"})),Ss=s.makeMessageType("viam.component.gripper.v1.OpenRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ec=s.makeMessageType("viam.component.gripper.v1.OpenResponse",[]),Is=s.makeMessageType("viam.component.gripper.v1.GrabRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),nc=s.makeMessageType("viam.component.gripper.v1.GrabResponse",()=>[{no:1,name:"success",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Es=s.makeMessageType("viam.component.gripper.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ac=s.makeMessageType("viam.component.gripper.v1.StopResponse",[]),Os=s.makeMessageType("viam.component.gripper.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),tc=s.makeMessageType("viam.component.gripper.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),Ms=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),sc=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingResponse",()=>[{no:1,name:"is_holding_something",kind:"scalar",T:8},{no:99,name:"meta",kind:"message",T:p}]),bs=s.makeMessageType("viam.component.gripper.v1.GetCurrentInputsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),oc=s.makeMessageType("viam.component.gripper.v1.GetCurrentInputsResponse",()=>[{no:1,name:"values",kind:"scalar",T:1,repeated:!0}]),ws=s.makeMessageType("viam.component.gripper.v1.GoToInputsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"values",kind:"scalar",T:1,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),ic=s.makeMessageType("viam.component.gripper.v1.GoToInputsResponse",[]),vS=Object.freeze(Object.defineProperty({__proto__:null,GetCurrentInputsRequest:bs,GetCurrentInputsResponse:oc,GoToInputsRequest:ws,GoToInputsResponse:ic,GrabRequest:Is,GrabResponse:nc,IsHoldingSomethingRequest:Ms,IsHoldingSomethingResponse:sc,IsMovingRequest:Os,IsMovingResponse:tc,OpenRequest:Ss,OpenResponse:ec,StopRequest:Es,StopResponse:ac},Symbol.toStringTag,{value:"Module"})),rc={typeName:"viam.component.gripper.v1.GripperService",methods:{open:{name:"Open",I:Ss,O:ec,kind:m.Unary},grab:{name:"Grab",I:Is,O:nc,kind:m.Unary},stop:{name:"Stop",I:Es,O:ac,kind:m.Unary},isMoving:{name:"IsMoving",I:Os,O:tc,kind:m.Unary},isHoldingSomething:{name:"IsHoldingSomething",I:Ms,O:sc,kind:m.Unary},getCurrentInputs:{name:"GetCurrentInputs",I:bs,O:oc,kind:m.Unary},goToInputs:{name:"GoToInputs",I:ws,O:ic,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary},getKinematics:{name:"GetKinematics",I:Un,O:Na,kind:m.Unary}}},mc=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),cc=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsResponse",()=>[{no:1,name:"controls",kind:"scalar",T:9,repeated:!0}]),Cs=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),lc=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsResponse",()=>[{no:1,name:"events",kind:"message",T:xn,repeated:!0}]),Ds=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"event",kind:"message",T:xn},{no:99,name:"extra",kind:"message",T:p}]),dc=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventResponse",[]),xn=s.makeMessageType("viam.component.inputcontroller.v1.Event",()=>[{no:1,name:"time",kind:"message",T:_},{no:2,name:"event",kind:"scalar",T:9},{no:3,name:"control",kind:"scalar",T:9},{no:4,name:"value",kind:"scalar",T:1}]),pc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"events",kind:"message",T:uc,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),uc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest.Events",()=>[{no:1,name:"control",kind:"scalar",T:9},{no:2,name:"events",kind:"scalar",T:9,repeated:!0},{no:3,name:"cancelled_events",kind:"scalar",T:9,repeated:!0}],{localName:"StreamEventsRequest_Events"}),gc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsResponse",()=>[{no:1,name:"event",kind:"message",T:xn}]),Tc=Object.freeze(Object.defineProperty({__proto__:null,Event:xn,GetControlsRequest:mc,GetControlsResponse:cc,GetEventsRequest:Cs,GetEventsResponse:lc,Status:s.makeMessageType("viam.component.inputcontroller.v1.Status",()=>[{no:1,name:"events",kind:"message",T:xn,repeated:!0}]),StreamEventsRequest:pc,StreamEventsRequest_Events:uc,StreamEventsResponse:gc,TriggerEventRequest:Ds,TriggerEventResponse:dc},Symbol.toStringTag,{value:"Module"})),kc={typeName:"viam.component.inputcontroller.v1.InputControllerService",methods:{getControls:{name:"GetControls",I:mc,O:cc,kind:m.Unary},getEvents:{name:"GetEvents",I:Cs,O:lc,kind:m.Unary},streamEvents:{name:"StreamEvents",I:pc,O:gc,kind:m.ServerStreaming},triggerEvent:{name:"TriggerEvent",I:Ds,O:dc,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}},Ns=s.makeMessageType("viam.component.motor.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),yc=s.makeMessageType("viam.component.motor.v1.SetPowerResponse",[]),Ps=s.makeMessageType("viam.component.motor.v1.GoForRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),vc=s.makeMessageType("viam.component.motor.v1.GoForResponse",[]),As=s.makeMessageType("viam.component.motor.v1.GoToRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"position_revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),hc=s.makeMessageType("viam.component.motor.v1.GoToResponse",[]),qs=s.makeMessageType("viam.component.motor.v1.SetRPMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),fc=s.makeMessageType("viam.component.motor.v1.SetRPMResponse",[]),Us=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"offset",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),Rc=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionResponse",[]),Ls=s.makeMessageType("viam.component.motor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_c=s.makeMessageType("viam.component.motor.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:1}]),Gs=s.makeMessageType("viam.component.motor.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Sc=s.makeMessageType("viam.component.motor.v1.StopResponse",[]),Bs=s.makeMessageType("viam.component.motor.v1.IsPoweredRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ic=s.makeMessageType("viam.component.motor.v1.IsPoweredResponse",()=>[{no:1,name:"is_on",kind:"scalar",T:8},{no:2,name:"power_pct",kind:"scalar",T:1}]),Fs=s.makeMessageType("viam.component.motor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ec=s.makeMessageType("viam.component.motor.v1.GetPropertiesResponse",()=>[{no:1,name:"position_reporting",kind:"scalar",T:8}]),hS=s.makeMessageType("viam.component.motor.v1.Status",()=>[{no:1,name:"is_powered",kind:"scalar",T:8},{no:3,name:"position",kind:"scalar",T:1},{no:4,name:"is_moving",kind:"scalar",T:8}]),xs=s.makeMessageType("viam.component.motor.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Oc=s.makeMessageType("viam.component.motor.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),fS=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Ls,GetPositionResponse:_c,GetPropertiesRequest:Fs,GetPropertiesResponse:Ec,GoForRequest:Ps,GoForResponse:vc,GoToRequest:As,GoToResponse:hc,IsMovingRequest:xs,IsMovingResponse:Oc,IsPoweredRequest:Bs,IsPoweredResponse:Ic,ResetZeroPositionRequest:Us,ResetZeroPositionResponse:Rc,SetPowerRequest:Ns,SetPowerResponse:yc,SetRPMRequest:qs,SetRPMResponse:fc,Status:hS,StopRequest:Gs,StopResponse:Sc},Symbol.toStringTag,{value:"Module"})),Mc={typeName:"viam.component.motor.v1.MotorService",methods:{setPower:{name:"SetPower",I:Ns,O:yc,kind:m.Unary},goFor:{name:"GoFor",I:Ps,O:vc,kind:m.Unary},goTo:{name:"GoTo",I:As,O:hc,kind:m.Unary},setRPM:{name:"SetRPM",I:qs,O:fc,kind:m.Unary},resetZeroPosition:{name:"ResetZeroPosition",I:Us,O:Rc,kind:m.Unary},getPosition:{name:"GetPosition",I:Ls,O:_c,kind:m.Unary},getProperties:{name:"GetProperties",I:Fs,O:Ec,kind:m.Unary},stop:{name:"Stop",I:Gs,O:Sc,kind:m.Unary},isPowered:{name:"IsPowered",I:Bs,O:Ic,kind:m.Unary},isMoving:{name:"IsMoving",I:xs,O:Oc,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}},Js=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),bc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityResponse",()=>[{no:1,name:"linear_velocity",kind:"message",T:ke}]),zs=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wc=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityResponse",()=>[{no:1,name:"angular_velocity",kind:"message",T:ke}]),Vs=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Cc=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingResponse",()=>[{no:1,name:"value",kind:"scalar",T:1}]),$s=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Dc=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationResponse",()=>[{no:1,name:"orientation",kind:"message",T:Ut}]),Ys=s.makeMessageType("viam.component.movementsensor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Nc=s.makeMessageType("viam.component.movementsensor.v1.GetPositionResponse",()=>[{no:1,name:"coordinate",kind:"message",T:He},{no:2,name:"altitude_m",kind:"scalar",T:2}]),Ws=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pc=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesResponse",()=>[{no:1,name:"linear_velocity_supported",kind:"scalar",T:8},{no:2,name:"angular_velocity_supported",kind:"scalar",T:8},{no:3,name:"orientation_supported",kind:"scalar",T:8},{no:4,name:"position_supported",kind:"scalar",T:8},{no:5,name:"compass_heading_supported",kind:"scalar",T:8},{no:6,name:"linear_acceleration_supported",kind:"scalar",T:8}]),js=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ac=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyResponse",()=>[{no:1,name:"accuracy",kind:"map",K:9,V:{kind:"scalar",T:2}},{no:2,name:"position_hdop",kind:"scalar",T:2,opt:!0},{no:3,name:"position_vdop",kind:"scalar",T:2,opt:!0},{no:4,name:"position_nmea_gga_fix",kind:"scalar",T:5,opt:!0},{no:5,name:"compass_degrees_error",kind:"scalar",T:2,opt:!0}]),Hs=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),qc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationResponse",()=>[{no:1,name:"linear_acceleration",kind:"message",T:ke}]),Uc=Object.freeze(Object.defineProperty({__proto__:null,GetAccuracyRequest:js,GetAccuracyResponse:Ac,GetAngularVelocityRequest:zs,GetAngularVelocityResponse:wc,GetCompassHeadingRequest:Vs,GetCompassHeadingResponse:Cc,GetLinearAccelerationRequest:Hs,GetLinearAccelerationResponse:qc,GetLinearVelocityRequest:Js,GetLinearVelocityResponse:bc,GetOrientationRequest:$s,GetOrientationResponse:Dc,GetPositionRequest:Ys,GetPositionResponse:Nc,GetPropertiesRequest:Ws,GetPropertiesResponse:Pc},Symbol.toStringTag,{value:"Module"})),Lc={typeName:"viam.component.movementsensor.v1.MovementSensorService",methods:{getLinearVelocity:{name:"GetLinearVelocity",I:Js,O:bc,kind:m.Unary},getAngularVelocity:{name:"GetAngularVelocity",I:zs,O:wc,kind:m.Unary},getCompassHeading:{name:"GetCompassHeading",I:Vs,O:Cc,kind:m.Unary},getOrientation:{name:"GetOrientation",I:$s,O:Dc,kind:m.Unary},getPosition:{name:"GetPosition",I:Ys,O:Nc,kind:m.Unary},getProperties:{name:"GetProperties",I:Ws,O:Pc,kind:m.Unary},getAccuracy:{name:"GetAccuracy",I:js,O:Ac,kind:m.Unary},getLinearAcceleration:{name:"GetLinearAcceleration",I:Hs,O:qc,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary},getReadings:{name:"GetReadings",I:tn,O:Pa,kind:m.Unary}}},Ks=s.makeMessageType("viam.component.powersensor.v1.GetVoltageRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Gc=s.makeMessageType("viam.component.powersensor.v1.GetVoltageResponse",()=>[{no:1,name:"volts",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),Xs=s.makeMessageType("viam.component.powersensor.v1.GetCurrentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Bc=s.makeMessageType("viam.component.powersensor.v1.GetCurrentResponse",()=>[{no:1,name:"amperes",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),Qs=s.makeMessageType("viam.component.powersensor.v1.GetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Fc=s.makeMessageType("viam.component.powersensor.v1.GetPowerResponse",()=>[{no:1,name:"watts",kind:"scalar",T:1}]),RS=Object.freeze(Object.defineProperty({__proto__:null,GetCurrentRequest:Xs,GetCurrentResponse:Bc,GetPowerRequest:Qs,GetPowerResponse:Fc,GetVoltageRequest:Ks,GetVoltageResponse:Gc},Symbol.toStringTag,{value:"Module"})),xc={typeName:"viam.component.powersensor.v1.PowerSensorService",methods:{getVoltage:{name:"GetVoltage",I:Ks,O:Gc,kind:m.Unary},getCurrent:{name:"GetCurrent",I:Xs,O:Bc,kind:m.Unary},getPower:{name:"GetPower",I:Qs,O:Fc,kind:m.Unary},getReadings:{name:"GetReadings",I:tn,O:Pa,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},Zs=s.makeMessageType("viam.component.servo.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),Jc=s.makeMessageType("viam.component.servo.v1.MoveResponse",[]),eo=s.makeMessageType("viam.component.servo.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),zc=s.makeMessageType("viam.component.servo.v1.GetPositionResponse",()=>[{no:1,name:"position_deg",kind:"scalar",T:13}]),no=s.makeMessageType("viam.component.servo.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Vc=s.makeMessageType("viam.component.servo.v1.StopResponse",[]),_S=s.makeMessageType("viam.component.servo.v1.Status",()=>[{no:1,name:"position_deg",kind:"scalar",T:13},{no:2,name:"is_moving",kind:"scalar",T:8}]),ao=s.makeMessageType("viam.component.servo.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),$c=s.makeMessageType("viam.component.servo.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),SS=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:eo,GetPositionResponse:zc,IsMovingRequest:ao,IsMovingResponse:$c,MoveRequest:Zs,MoveResponse:Jc,Status:_S,StopRequest:no,StopResponse:Vc},Symbol.toStringTag,{value:"Module"})),Yc={typeName:"viam.component.servo.v1.ServoService",methods:{move:{name:"Move",I:Zs,O:Jc,kind:m.Unary},getPosition:{name:"GetPosition",I:eo,O:zc,kind:m.Unary},stop:{name:"Stop",I:no,O:Vc,kind:m.Unary},isMoving:{name:"IsMoving",I:ao,O:$c,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}},Wc=s.makeMessageType("opentelemetry.proto.common.v1.AnyValue",()=>[{no:1,name:"string_value",kind:"scalar",T:9,oneof:"value"},{no:2,name:"bool_value",kind:"scalar",T:8,oneof:"value"},{no:3,name:"int_value",kind:"scalar",T:3,oneof:"value"},{no:4,name:"double_value",kind:"scalar",T:1,oneof:"value"},{no:5,name:"array_value",kind:"message",T:IS,oneof:"value"},{no:6,name:"kvlist_value",kind:"message",T:ES,oneof:"value"},{no:7,name:"bytes_value",kind:"scalar",T:12,oneof:"value"},{no:8,name:"string_value_strindex",kind:"scalar",T:5,oneof:"value"}]),IS=s.makeMessageType("opentelemetry.proto.common.v1.ArrayValue",()=>[{no:1,name:"values",kind:"message",T:Wc,repeated:!0}]),ES=s.makeMessageType("opentelemetry.proto.common.v1.KeyValueList",()=>[{no:1,name:"values",kind:"message",T:yn,repeated:!0}]),yn=s.makeMessageType("opentelemetry.proto.common.v1.KeyValue",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:Wc},{no:3,name:"key_strindex",kind:"scalar",T:5}]),OS=s.makeMessageType("opentelemetry.proto.common.v1.InstrumentationScope",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yn,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}]),MS=s.makeMessageType("opentelemetry.proto.common.v1.EntityRef",()=>[{no:1,name:"schema_url",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id_keys",kind:"scalar",T:9,repeated:!0},{no:4,name:"description_keys",kind:"scalar",T:9,repeated:!0}]),bS=s.makeMessageType("opentelemetry.proto.resource.v1.Resource",()=>[{no:1,name:"attributes",kind:"message",T:yn,repeated:!0},{no:2,name:"dropped_attributes_count",kind:"scalar",T:13},{no:3,name:"entity_refs",kind:"message",T:MS,repeated:!0}]),wS=s.makeMessageType("opentelemetry.proto.trace.v1.ResourceSpans",()=>[{no:1,name:"resource",kind:"message",T:bS},{no:2,name:"scope_spans",kind:"message",T:CS,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),CS=s.makeMessageType("opentelemetry.proto.trace.v1.ScopeSpans",()=>[{no:1,name:"scope",kind:"message",T:OS},{no:2,name:"spans",kind:"message",T:DS,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),DS=s.makeMessageType("opentelemetry.proto.trace.v1.Span",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"parent_span_id",kind:"scalar",T:12},{no:16,name:"flags",kind:"scalar",T:7},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"kind",kind:"enum",T:s.getEnumType(NS)},{no:7,name:"start_time_unix_nano",kind:"scalar",T:6},{no:8,name:"end_time_unix_nano",kind:"scalar",T:6},{no:9,name:"attributes",kind:"message",T:yn,repeated:!0},{no:10,name:"dropped_attributes_count",kind:"scalar",T:13},{no:11,name:"events",kind:"message",T:PS,repeated:!0},{no:12,name:"dropped_events_count",kind:"scalar",T:13},{no:13,name:"links",kind:"message",T:AS,repeated:!0},{no:14,name:"dropped_links_count",kind:"scalar",T:13},{no:15,name:"status",kind:"message",T:qS}]),NS=s.makeEnum("opentelemetry.proto.trace.v1.Span.SpanKind",[{no:0,name:"SPAN_KIND_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SPAN_KIND_INTERNAL",localName:"INTERNAL"},{no:2,name:"SPAN_KIND_SERVER",localName:"SERVER"},{no:3,name:"SPAN_KIND_CLIENT",localName:"CLIENT"},{no:4,name:"SPAN_KIND_PRODUCER",localName:"PRODUCER"},{no:5,name:"SPAN_KIND_CONSUMER",localName:"CONSUMER"}]),PS=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Event",()=>[{no:1,name:"time_unix_nano",kind:"scalar",T:6},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yn,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}],{localName:"Span_Event"}),AS=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Link",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:yn,repeated:!0},{no:5,name:"dropped_attributes_count",kind:"scalar",T:13},{no:6,name:"flags",kind:"scalar",T:7}],{localName:"Span_Link"}),qS=s.makeMessageType("opentelemetry.proto.trace.v1.Status",()=>[{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"code",kind:"enum",T:s.getEnumType(US)}]),US=s.makeEnum("opentelemetry.proto.trace.v1.Status.StatusCode",[{no:0,name:"STATUS_CODE_UNSET",localName:"UNSET"},{no:1,name:"STATUS_CODE_OK",localName:"OK"},{no:2,name:"STATUS_CODE_ERROR",localName:"ERROR"}]),jc=s.makeEnum("viam.robot.v1.PeerConnectionType",[{no:0,name:"PEER_CONNECTION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PEER_CONNECTION_TYPE_GRPC",localName:"GRPC"},{no:2,name:"PEER_CONNECTION_TYPE_WEBRTC",localName:"WEBRTC"}]),Hc=s.makeMessageType("viam.robot.v1.SendTracesRequest",()=>[{no:1,name:"resource_spans",kind:"message",T:wS,repeated:!0}]),Kc=s.makeMessageType("viam.robot.v1.SendTracesResponse",[]),Xc=s.makeMessageType("viam.robot.v1.TunnelRequest",()=>[{no:1,name:"destination_port",kind:"scalar",T:13},{no:2,name:"data",kind:"scalar",T:12}]),Qc=s.makeMessageType("viam.robot.v1.TunnelResponse",()=>[{no:1,name:"data",kind:"scalar",T:12}]),Zc=s.makeMessageType("viam.robot.v1.ListTunnelsRequest",[]),el=s.makeMessageType("viam.robot.v1.ListTunnelsResponse",()=>[{no:1,name:"tunnels",kind:"message",T:nl,repeated:!0}]),nl=s.makeMessageType("viam.robot.v1.Tunnel",()=>[{no:1,name:"port",kind:"scalar",T:13},{no:2,name:"connection_timeout",kind:"message",T:J}]),al=s.makeMessageType("viam.robot.v1.FrameSystemConfig",()=>[{no:1,name:"frame",kind:"message",T:xe},{no:2,name:"kinematics",kind:"message",T:p}]),tl=s.makeMessageType("viam.robot.v1.FrameSystemConfigRequest",()=>[{no:1,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0}]),sl=s.makeMessageType("viam.robot.v1.FrameSystemConfigResponse",()=>[{no:1,name:"frame_system_configs",kind:"message",T:al,repeated:!0}]),to=s.makeMessageType("viam.robot.v1.TransformPoseRequest",()=>[{no:1,name:"source",kind:"message",T:je},{no:2,name:"destination",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0}]),ol=s.makeMessageType("viam.robot.v1.TransformPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:je}]),so=s.makeMessageType("viam.robot.v1.TransformPCDRequest",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12},{no:2,name:"source",kind:"scalar",T:9},{no:3,name:"destination",kind:"scalar",T:9}]),il=s.makeMessageType("viam.robot.v1.TransformPCDResponse",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12}]),rl=s.makeMessageType("viam.robot.v1.ResourceNamesRequest",[]),ml=s.makeMessageType("viam.robot.v1.ResourceNamesResponse",()=>[{no:1,name:"resources",kind:"message",T:z,repeated:!0}]),cl=s.makeMessageType("viam.robot.v1.ResourceRPCSubtype",()=>[{no:1,name:"subtype",kind:"message",T:z},{no:2,name:"proto_service",kind:"scalar",T:9}]),ll=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesRequest",[]),dl=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesResponse",()=>[{no:1,name:"resource_rpc_subtypes",kind:"message",T:cl,repeated:!0}]),pl=s.makeMessageType("viam.robot.v1.Operation",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"method",kind:"scalar",T:9},{no:3,name:"arguments",kind:"message",T:p},{no:4,name:"started",kind:"message",T:_},{no:5,name:"session_id",kind:"scalar",T:9,opt:!0}]),ul=s.makeMessageType("viam.robot.v1.GetOperationsRequest",[]),gl=s.makeMessageType("viam.robot.v1.GetOperationsResponse",()=>[{no:1,name:"operations",kind:"message",T:pl,repeated:!0}]),Tl=s.makeMessageType("viam.robot.v1.CancelOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),kl=s.makeMessageType("viam.robot.v1.CancelOperationResponse",[]),yl=s.makeMessageType("viam.robot.v1.BlockForOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),vl=s.makeMessageType("viam.robot.v1.BlockForOperationResponse",[]),hl=s.makeMessageType("viam.robot.v1.PeerConnectionInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(jc)},{no:2,name:"remote_address",kind:"scalar",T:9,opt:!0},{no:3,name:"local_address",kind:"scalar",T:9,opt:!0}]),fl=s.makeMessageType("viam.robot.v1.Session",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"peer_connection_info",kind:"message",T:hl,opt:!0}]),Rl=s.makeMessageType("viam.robot.v1.GetSessionsRequest",[]),_l=s.makeMessageType("viam.robot.v1.GetSessionsResponse",()=>[{no:1,name:"sessions",kind:"message",T:fl,repeated:!0}]),Sl=s.makeMessageType("viam.robot.v1.ModuleModel",()=>[{no:1,name:"module_name",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"api",kind:"scalar",T:9},{no:4,name:"from_local_module",kind:"scalar",T:8}]),oo=s.makeMessageType("viam.robot.v1.GetModelsFromModulesRequest",[]),Il=s.makeMessageType("viam.robot.v1.GetModelsFromModulesResponse",()=>[{no:1,name:"models",kind:"message",T:Sl,repeated:!0}]),io=s.makeMessageType("viam.robot.v1.Status",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"status",kind:"message",T:p},{no:3,name:"last_reconfigured",kind:"message",T:_}]),El=s.makeMessageType("viam.robot.v1.GetStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:z,repeated:!0}]),Ol=s.makeMessageType("viam.robot.v1.GetStatusResponse",()=>[{no:1,name:"status",kind:"message",T:io,repeated:!0}]),Ml=s.makeMessageType("viam.robot.v1.StreamStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:z,repeated:!0},{no:2,name:"every",kind:"message",T:J}]),bl=s.makeMessageType("viam.robot.v1.StreamStatusResponse",()=>[{no:1,name:"status",kind:"message",T:io,repeated:!0}]),wl=s.makeMessageType("viam.robot.v1.StopExtraParameters",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"params",kind:"message",T:p}]),Cl=s.makeMessageType("viam.robot.v1.StopAllRequest",()=>[{no:99,name:"extra",kind:"message",T:wl,repeated:!0}]),Dl=s.makeMessageType("viam.robot.v1.StopAllResponse",[]),ro=s.makeMessageType("viam.robot.v1.StartSessionRequest",()=>[{no:1,name:"resume",kind:"scalar",T:9}]),Nl=s.makeMessageType("viam.robot.v1.StartSessionResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"heartbeat_window",kind:"message",T:J}]),mo=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Pl=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatResponse",[]),Al=s.makeMessageType("viam.robot.v1.LogRequest",()=>[{no:1,name:"logs",kind:"message",T:Ln,repeated:!0}]),ql=s.makeMessageType("viam.robot.v1.LogResponse",[]),Ul=s.makeMessageType("viam.robot.v1.GetCloudMetadataRequest",[]),co=s.makeMessageType("viam.robot.v1.GetCloudMetadataResponse",()=>[{no:2,name:"primary_org_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9},{no:4,name:"machine_id",kind:"scalar",T:9},{no:5,name:"machine_part_id",kind:"scalar",T:9}]),lo=s.makeMessageType("viam.robot.v1.RestartModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9,oneof:"id_or_name"},{no:2,name:"module_name",kind:"scalar",T:9,oneof:"id_or_name"}]),Ll=s.makeMessageType("viam.robot.v1.RestartModuleResponse",[]),Gl=s.makeMessageType("viam.robot.v1.ShutdownRequest",[]),Bl=s.makeMessageType("viam.robot.v1.ShutdownResponse",[]),Fl=s.makeMessageType("viam.robot.v1.GetMachineStatusRequest",[]),xl=s.makeMessageType("viam.robot.v1.GetMachineStatusResponse",()=>[{no:1,name:"resources",kind:"message",T:Vl,repeated:!0},{no:2,name:"config",kind:"message",T:Yl},{no:3,name:"state",kind:"enum",T:s.getEnumType(Jl)},{no:4,name:"job_statuses",kind:"message",T:zl,repeated:!0}]),Jl=s.makeEnum("viam.robot.v1.GetMachineStatusResponse.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_INITIALIZING",localName:"INITIALIZING"},{no:2,name:"STATE_RUNNING",localName:"RUNNING"}]),zl=s.makeMessageType("viam.robot.v1.JobStatus",()=>[{no:1,name:"job_name",kind:"scalar",T:9},{no:2,name:"recent_successful_runs",kind:"message",T:_,repeated:!0},{no:3,name:"recent_failed_runs",kind:"message",T:_,repeated:!0}]),Vl=s.makeMessageType("viam.robot.v1.ResourceStatus",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"state",kind:"enum",T:s.getEnumType($l)},{no:3,name:"last_updated",kind:"message",T:_},{no:4,name:"revision",kind:"scalar",T:9},{no:5,name:"error",kind:"scalar",T:9},{no:6,name:"cloud_metadata",kind:"message",T:co,opt:!0}]),$l=s.makeEnum("viam.robot.v1.ResourceStatus.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_UNCONFIGURED",localName:"UNCONFIGURED"},{no:2,name:"STATE_CONFIGURING",localName:"CONFIGURING"},{no:3,name:"STATE_READY",localName:"READY"},{no:4,name:"STATE_REMOVING",localName:"REMOVING"},{no:5,name:"STATE_UNHEALTHY",localName:"UNHEALTHY"}]),Yl=s.makeMessageType("viam.robot.v1.ConfigStatus",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"last_updated",kind:"message",T:_}]),Wl=s.makeMessageType("viam.robot.v1.GetVersionRequest",[]),jl=s.makeMessageType("viam.robot.v1.GetVersionResponse",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"api_version",kind:"scalar",T:9}]),po=s.makeMessageType("viam.robot.v1.GetPoseRequest",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"destination_frame",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Hl=s.makeMessageType("viam.robot.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:je}]),LS=Object.freeze(Object.defineProperty({__proto__:null,BlockForOperationRequest:yl,BlockForOperationResponse:vl,CancelOperationRequest:Tl,CancelOperationResponse:kl,ConfigStatus:Yl,FrameSystemConfig:al,FrameSystemConfigRequest:tl,FrameSystemConfigResponse:sl,GetCloudMetadataRequest:Ul,GetCloudMetadataResponse:co,GetMachineStatusRequest:Fl,GetMachineStatusResponse:xl,GetMachineStatusResponse_State:Jl,GetModelsFromModulesRequest:oo,GetModelsFromModulesResponse:Il,GetOperationsRequest:ul,GetOperationsResponse:gl,GetPoseRequest:po,GetPoseResponse:Hl,GetSessionsRequest:Rl,GetSessionsResponse:_l,GetStatusRequest:El,GetStatusResponse:Ol,GetVersionRequest:Wl,GetVersionResponse:jl,JobStatus:zl,ListTunnelsRequest:Zc,ListTunnelsResponse:el,LogRequest:Al,LogResponse:ql,ModuleModel:Sl,Operation:pl,PeerConnectionInfo:hl,PeerConnectionType:jc,ResourceNamesRequest:rl,ResourceNamesResponse:ml,ResourceRPCSubtype:cl,ResourceRPCSubtypesRequest:ll,ResourceRPCSubtypesResponse:dl,ResourceStatus:Vl,ResourceStatus_State:$l,RestartModuleRequest:lo,RestartModuleResponse:Ll,SendSessionHeartbeatRequest:mo,SendSessionHeartbeatResponse:Pl,SendTracesRequest:Hc,SendTracesResponse:Kc,Session:fl,ShutdownRequest:Gl,ShutdownResponse:Bl,StartSessionRequest:ro,StartSessionResponse:Nl,Status:io,StopAllRequest:Cl,StopAllResponse:Dl,StopExtraParameters:wl,StreamStatusRequest:Ml,StreamStatusResponse:bl,TransformPCDRequest:so,TransformPCDResponse:il,TransformPoseRequest:to,TransformPoseResponse:ol,Tunnel:nl,TunnelRequest:Xc,TunnelResponse:Qc},Symbol.toStringTag,{value:"Module"})),uo={typeName:"viam.robot.v1.RobotService",methods:{getOperations:{name:"GetOperations",I:ul,O:gl,kind:m.Unary},getSessions:{name:"GetSessions",I:Rl,O:_l,kind:m.Unary},resourceNames:{name:"ResourceNames",I:rl,O:ml,kind:m.Unary},resourceRPCSubtypes:{name:"ResourceRPCSubtypes",I:ll,O:dl,kind:m.Unary},cancelOperation:{name:"CancelOperation",I:Tl,O:kl,kind:m.Unary},blockForOperation:{name:"BlockForOperation",I:yl,O:vl,kind:m.Unary},getModelsFromModules:{name:"GetModelsFromModules",I:oo,O:Il,kind:m.Unary},getStatus:{name:"GetStatus",I:El,O:Ol,kind:m.Unary},streamStatus:{name:"StreamStatus",I:Ml,O:bl,kind:m.ServerStreaming},stopAll:{name:"StopAll",I:Cl,O:Dl,kind:m.Unary},startSession:{name:"StartSession",I:ro,O:Nl,kind:m.Unary},sendSessionHeartbeat:{name:"SendSessionHeartbeat",I:mo,O:Pl,kind:m.Unary},log:{name:"Log",I:Al,O:ql,kind:m.Unary},getCloudMetadata:{name:"GetCloudMetadata",I:Ul,O:co,kind:m.Unary},restartModule:{name:"RestartModule",I:lo,O:Ll,kind:m.Unary},shutdown:{name:"Shutdown",I:Gl,O:Bl,kind:m.Unary},getMachineStatus:{name:"GetMachineStatus",I:Fl,O:xl,kind:m.Unary},getVersion:{name:"GetVersion",I:Wl,O:jl,kind:m.Unary},tunnel:{name:"Tunnel",I:Xc,O:Qc,kind:m.BiDiStreaming},listTunnels:{name:"ListTunnels",I:Zc,O:el,kind:m.Unary},frameSystemConfig:{name:"FrameSystemConfig",I:tl,O:sl,kind:m.Unary},getPose:{name:"GetPose",I:po,O:Hl,kind:m.Unary},transformPose:{name:"TransformPose",I:to,O:ol,kind:m.Unary},transformPCD:{name:"TransformPCD",I:so,O:il,kind:m.Unary},sendTraces:{name:"SendTraces",I:Hc,O:Kc,kind:m.Unary}}},go=s.makeEnum("viam.app.v1.CredentialsType",[{no:0,name:"CREDENTIALS_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CREDENTIALS_TYPE_INTERNAL",localName:"INTERNAL"},{no:2,name:"CREDENTIALS_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"CREDENTIALS_TYPE_ROBOT_SECRET",localName:"ROBOT_SECRET"},{no:4,name:"CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET",localName:"ROBOT_LOCATION_SECRET"}]),Kl=s.makeMessageType("viam.app.v1.RobotConfig",()=>[{no:1,name:"cloud",kind:"message",T:nd},{no:2,name:"remotes",kind:"message",T:hd,repeated:!0},{no:3,name:"components",kind:"message",T:To,repeated:!0},{no:4,name:"processes",kind:"message",T:ad,repeated:!0},{no:5,name:"services",kind:"message",T:td,repeated:!0},{no:6,name:"network",kind:"message",T:sd,opt:!0},{no:7,name:"auth",kind:"message",T:rd,opt:!0},{no:8,name:"debug",kind:"scalar",T:8,opt:!0},{no:9,name:"modules",kind:"message",T:Sd,repeated:!0},{no:10,name:"disable_partial_start",kind:"scalar",T:8,opt:!0},{no:11,name:"packages",kind:"message",T:Id,repeated:!0},{no:12,name:"overwrite_fragment_status",kind:"message",T:Ua,repeated:!0},{no:13,name:"enable_web_profile",kind:"scalar",T:8},{no:14,name:"log",kind:"message",T:Xl,repeated:!0},{no:15,name:"revision",kind:"scalar",T:9},{no:16,name:"maintenance",kind:"message",T:Ed,opt:!0},{no:17,name:"disable_log_deduplication",kind:"scalar",T:8},{no:18,name:"jobs",kind:"message",T:Ql,repeated:!0},{no:19,name:"tracing",kind:"message",T:Zl,opt:!0}]),Xl=s.makeMessageType("viam.app.v1.LogPatternConfig",()=>[{no:1,name:"pattern",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9}]),Ql=s.makeMessageType("viam.app.v1.JobConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"schedule",kind:"scalar",T:9},{no:3,name:"resource",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:5,name:"command",kind:"message",T:p},{no:6,name:"log_configuration",kind:"message",T:Ga}]),Zl=s.makeMessageType("viam.app.v1.TracingConfig",()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"disk",kind:"scalar",T:8},{no:3,name:"console",kind:"scalar",T:8},{no:4,name:"otlp_endpoint",kind:"scalar",T:9}]),ed=s.makeMessageType("viam.app.v1.LocationSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9}]),Ua=s.makeMessageType("viam.app.v1.AppValidationStatus",()=>[{no:1,name:"error",kind:"scalar",T:9}]),nd=s.makeMessageType("viam.app.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"fqdn",kind:"scalar",T:9},{no:3,name:"local_fqdn",kind:"scalar",T:9},{no:4,name:"managed_by",kind:"scalar",T:9},{no:5,name:"signaling_address",kind:"scalar",T:9},{no:6,name:"signaling_insecure",kind:"scalar",T:8},{no:7,name:"location_secret",kind:"scalar",T:9},{no:8,name:"secret",kind:"scalar",T:9},{no:9,name:"location_secrets",kind:"message",T:ed,repeated:!0},{no:10,name:"primary_org_id",kind:"scalar",T:9},{no:11,name:"location_id",kind:"scalar",T:9},{no:12,name:"machine_id",kind:"scalar",T:9}]),To=s.makeMessageType("viam.app.v1.ComponentConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"model",kind:"scalar",T:9},{no:5,name:"frame",kind:"message",T:ko},{no:6,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:7,name:"service_configs",kind:"message",T:La,repeated:!0},{no:8,name:"attributes",kind:"message",T:p},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"log_configuration",kind:"message",T:Ga}]),La=s.makeMessageType("viam.app.v1.ResourceLevelServiceConfig",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:p}]),ad=s.makeMessageType("viam.app.v1.ProcessConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"args",kind:"scalar",T:9,repeated:!0},{no:4,name:"cwd",kind:"scalar",T:9},{no:5,name:"one_shot",kind:"scalar",T:8},{no:6,name:"log",kind:"scalar",T:8},{no:7,name:"stop_signal",kind:"scalar",T:5},{no:8,name:"stop_timeout",kind:"message",T:J},{no:9,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:10,name:"username",kind:"scalar",T:9}]),td=s.makeMessageType("viam.app.v1.ServiceConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:p},{no:5,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:6,name:"model",kind:"scalar",T:9},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"service_configs",kind:"message",T:La,repeated:!0},{no:11,name:"log_configuration",kind:"message",T:Ga}]),sd=s.makeMessageType("viam.app.v1.NetworkConfig",()=>[{no:1,name:"fqdn",kind:"scalar",T:9},{no:2,name:"bind_address",kind:"scalar",T:9},{no:3,name:"tls_cert_file",kind:"scalar",T:9},{no:4,name:"tls_key_file",kind:"scalar",T:9},{no:5,name:"sessions",kind:"message",T:od},{no:6,name:"traffic_tunnel_endpoints",kind:"message",T:id,repeated:!0},{no:7,name:"no_tls",kind:"scalar",T:8}]),od=s.makeMessageType("viam.app.v1.SessionsConfig",()=>[{no:1,name:"heartbeat_window",kind:"message",T:J}]),id=s.makeMessageType("viam.app.v1.TrafficTunnelEndpoint",()=>[{no:1,name:"port",kind:"scalar",T:5},{no:2,name:"connection_timeout",kind:"message",T:J}]),rd=s.makeMessageType("viam.app.v1.AuthConfig",()=>[{no:1,name:"handlers",kind:"message",T:ld,repeated:!0},{no:2,name:"tls_auth_entities",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_auth_config",kind:"message",T:cd,opt:!0}]),md=s.makeMessageType("viam.app.v1.JWKSFile",()=>[{no:1,name:"json",kind:"message",T:p}]),cd=s.makeMessageType("viam.app.v1.ExternalAuthConfig",()=>[{no:1,name:"jwks",kind:"message",T:md}]),ld=s.makeMessageType("viam.app.v1.AuthHandlerConfig",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(go)},{no:5,name:"config",kind:"message",T:p}]),ko=s.makeMessageType("viam.app.v1.Frame",()=>[{no:1,name:"parent",kind:"scalar",T:9},{no:2,name:"translation",kind:"message",T:dd},{no:3,name:"orientation",kind:"message",T:pd},{no:4,name:"geometry",kind:"message",T:an}]),Ga=s.makeMessageType("viam.app.v1.LogConfiguration",()=>[{no:1,name:"level",kind:"scalar",T:9}]),dd=s.makeMessageType("viam.app.v1.Translation",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),pd=s.makeMessageType("viam.app.v1.Orientation",()=>[{no:1,name:"no_orientation",kind:"message",T:ud,oneof:"type"},{no:2,name:"vector_radians",kind:"message",T:gd,oneof:"type"},{no:3,name:"vector_degrees",kind:"message",T:Td,oneof:"type"},{no:4,name:"euler_angles",kind:"message",T:kd,oneof:"type"},{no:5,name:"axis_angles",kind:"message",T:yd,oneof:"type"},{no:6,name:"quaternion",kind:"message",T:vd,oneof:"type"}]),ud=s.makeMessageType("viam.app.v1.Orientation.NoOrientation",[],{localName:"Orientation_NoOrientation"}),gd=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorRadians",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorRadians"}),Td=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorDegrees",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorDegrees"}),kd=s.makeMessageType("viam.app.v1.Orientation.EulerAngles",()=>[{no:1,name:"roll",kind:"scalar",T:1},{no:2,name:"pitch",kind:"scalar",T:1},{no:3,name:"yaw",kind:"scalar",T:1}],{localName:"Orientation_EulerAngles"}),yd=s.makeMessageType("viam.app.v1.Orientation.AxisAngles",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_AxisAngles"}),vd=s.makeMessageType("viam.app.v1.Orientation.Quaternion",()=>[{no:1,name:"w",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_Quaternion"}),hd=s.makeMessageType("viam.app.v1.RemoteConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"address",kind:"scalar",T:9},{no:3,name:"frame",kind:"message",T:ko},{no:4,name:"auth",kind:"message",T:fd},{no:5,name:"managed_by",kind:"scalar",T:9},{no:6,name:"insecure",kind:"scalar",T:8},{no:7,name:"connection_check_interval",kind:"message",T:J},{no:8,name:"reconnect_interval",kind:"message",T:J},{no:9,name:"service_configs",kind:"message",T:La,repeated:!0},{no:10,name:"secret",kind:"scalar",T:9},{no:11,name:"prefix",kind:"scalar",T:9}]),fd=s.makeMessageType("viam.app.v1.RemoteAuth",()=>[{no:1,name:"credentials",kind:"message",T:Rd},{no:2,name:"entity",kind:"scalar",T:9}]),Rd=s.makeMessageType("viam.app.v1.RemoteAuth.Credentials",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(go)},{no:2,name:"payload",kind:"scalar",T:9}],{localName:"RemoteAuth_Credentials"}),_d=s.makeMessageType("viam.app.v1.AgentInfo",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"os",kind:"scalar",T:9},{no:3,name:"ips",kind:"scalar",T:9,repeated:!0},{no:4,name:"version",kind:"scalar",T:9},{no:5,name:"git_revision",kind:"scalar",T:9},{no:6,name:"platform",kind:"scalar",T:9,opt:!0},{no:7,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),GS=s.makeMessageType("viam.app.v1.ConfigRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"agent_info",kind:"message",T:_d,opt:!0}]),BS=s.makeMessageType("viam.app.v1.ConfigResponse",()=>[{no:1,name:"config",kind:"message",T:Kl}]),FS=s.makeMessageType("viam.app.v1.CertificateRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),xS=s.makeMessageType("viam.app.v1.CertificateResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"tls_certificate",kind:"scalar",T:9},{no:3,name:"tls_private_key",kind:"scalar",T:9}]),JS=s.makeMessageType("viam.app.v1.LogRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"logs",kind:"message",T:Ln,repeated:!0}]),zS=s.makeMessageType("viam.app.v1.LogResponse",[]),VS=s.makeMessageType("viam.app.v1.NeedsRestartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),$S=s.makeMessageType("viam.app.v1.NeedsRestartResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"must_restart",kind:"scalar",T:8},{no:3,name:"restart_check_interval",kind:"message",T:J}]),Sd=s.makeMessageType("viam.app.v1.ModuleConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"path",kind:"scalar",T:9},{no:3,name:"log_level",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"module_id",kind:"scalar",T:9},{no:6,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"status",kind:"message",T:Ua},{no:8,name:"first_run_timeout",kind:"message",T:J},{no:9,name:"tcp_mode",kind:"scalar",T:8}]),Id=s.makeMessageType("viam.app.v1.PackageConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"package",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"status",kind:"message",T:Ua}]),Ed=s.makeMessageType("viam.app.v1.MaintenanceConfig",()=>[{no:1,name:"sensor_name",kind:"message",T:z},{no:2,name:"maintenance_allowed_key",kind:"scalar",T:9}]),YS=Object.freeze(Object.defineProperty({__proto__:null,AgentInfo:_d,AppValidationStatus:Ua,AuthConfig:rd,AuthHandlerConfig:ld,CertificateRequest:FS,CertificateResponse:xS,CloudConfig:nd,ComponentConfig:To,ConfigRequest:GS,ConfigResponse:BS,CredentialsType:go,ExternalAuthConfig:cd,Frame:ko,JWKSFile:md,JobConfig:Ql,LocationSecret:ed,LogConfiguration:Ga,LogPatternConfig:Xl,LogRequest:JS,LogResponse:zS,MaintenanceConfig:Ed,ModuleConfig:Sd,NeedsRestartRequest:VS,NeedsRestartResponse:$S,NetworkConfig:sd,Orientation:pd,Orientation_AxisAngles:yd,Orientation_EulerAngles:kd,Orientation_NoOrientation:ud,Orientation_OrientationVectorDegrees:Td,Orientation_OrientationVectorRadians:gd,Orientation_Quaternion:vd,PackageConfig:Id,ProcessConfig:ad,RemoteAuth:fd,RemoteAuth_Credentials:Rd,RemoteConfig:hd,ResourceLevelServiceConfig:La,RobotConfig:Kl,ServiceConfig:td,SessionsConfig:od,TracingConfig:Zl,TrafficTunnelEndpoint:id,Translation:dd},Symbol.toStringTag,{value:"Module"})),yo=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Od=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesResponse",()=>[{no:1,name:"discoveries",kind:"message",T:To,repeated:!0}]),WS=Object.freeze(Object.defineProperty({__proto__:null,DiscoverResourcesRequest:yo,DiscoverResourcesResponse:Od},Symbol.toStringTag,{value:"Module"})),Md={typeName:"viam.service.discovery.v1.DiscoveryService",methods:{discoverResources:{name:"DiscoverResources",I:yo,O:Od,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},bd=s.makeEnum("viam.service.motion.v1.PlanState",[{no:0,name:"PLAN_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PLAN_STATE_IN_PROGRESS",localName:"IN_PROGRESS"},{no:2,name:"PLAN_STATE_STOPPED",localName:"STOPPED"},{no:3,name:"PLAN_STATE_SUCCEEDED",localName:"SUCCEEDED"},{no:4,name:"PLAN_STATE_FAILED",localName:"FAILED"}]),vo=s.makeMessageType("viam.service.motion.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:je},{no:3,name:"component_name_deprecated",kind:"message",T:z},{no:4,name:"world_state",kind:"message",T:nm,opt:!0},{no:5,name:"constraints",kind:"message",T:Ld,opt:!0},{no:6,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wd=s.makeMessageType("viam.service.motion.v1.MoveResponse",()=>[{no:1,name:"success",kind:"scalar",T:8}]),ho=s.makeMessageType("viam.service.motion.v1.MoveOnMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:Te},{no:3,name:"component_name_deprecated",kind:"message",T:z},{no:4,name:"slam_service_name_deprecated",kind:"message",T:z},{no:5,name:"motion_configuration",kind:"message",T:fo,opt:!0},{no:6,name:"obstacles",kind:"message",T:an,repeated:!0},{no:7,name:"component_name",kind:"scalar",T:9},{no:8,name:"slam_service_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Cd=s.makeMessageType("viam.service.motion.v1.MoveOnMapResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),Dd=s.makeMessageType("viam.service.motion.v1.ObstacleDetector",()=>[{no:1,name:"vision_service_deprecated",kind:"message",T:z},{no:2,name:"camera_deprecated",kind:"message",T:z},{no:3,name:"vision_service",kind:"scalar",T:9},{no:4,name:"camera",kind:"scalar",T:9}]),fo=s.makeMessageType("viam.service.motion.v1.MotionConfiguration",()=>[{no:1,name:"obstacle_detectors",kind:"message",T:Dd,repeated:!0},{no:2,name:"position_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:3,name:"obstacle_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:4,name:"plan_deviation_m",kind:"scalar",T:1,opt:!0},{no:5,name:"linear_m_per_sec",kind:"scalar",T:1,opt:!0},{no:6,name:"angular_degs_per_sec",kind:"scalar",T:1,opt:!0}]),Ro=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:He},{no:3,name:"heading",kind:"scalar",T:1,opt:!0},{no:4,name:"component_name_deprecated",kind:"message",T:z},{no:5,name:"movement_sensor_name_deprecated",kind:"message",T:z},{no:6,name:"obstacles",kind:"message",T:Da,repeated:!0},{no:7,name:"motion_configuration",kind:"message",T:fo,opt:!0},{no:8,name:"bounding_regions",kind:"message",T:Da,repeated:!0},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"movement_sensor_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Nd=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),_o=s.makeMessageType("viam.service.motion.v1.GetPoseRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"destination_frame",kind:"scalar",T:9},{no:4,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pd=s.makeMessageType("viam.service.motion.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:je}]),So=s.makeMessageType("viam.service.motion.v1.StopPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ad=s.makeMessageType("viam.service.motion.v1.StopPlanResponse",[]),Io=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"only_active_plans",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),qd=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesResponse",()=>[{no:1,name:"plan_statuses_with_ids",kind:"message",T:zd,repeated:!0}]),Eo=s.makeMessageType("viam.service.motion.v1.GetPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"last_plan_only",kind:"scalar",T:8},{no:4,name:"execution_id",kind:"scalar",T:9,opt:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ud=s.makeMessageType("viam.service.motion.v1.GetPlanResponse",()=>[{no:1,name:"current_plan_with_status",kind:"message",T:Oo},{no:2,name:"replan_history",kind:"message",T:Oo,repeated:!0}]),Ld=s.makeMessageType("viam.service.motion.v1.Constraints",()=>[{no:1,name:"linear_constraint",kind:"message",T:Gd,repeated:!0},{no:2,name:"orientation_constraint",kind:"message",T:Fd,repeated:!0},{no:3,name:"collision_specification",kind:"message",T:xd,repeated:!0},{no:4,name:"pseudolinear_constraint",kind:"message",T:Bd,repeated:!0}]),Gd=s.makeMessageType("viam.service.motion.v1.LinearConstraint",()=>[{no:1,name:"line_tolerance_mm",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),Bd=s.makeMessageType("viam.service.motion.v1.PseudolinearConstraint",()=>[{no:1,name:"line_tolerance_factor",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_factor",kind:"scalar",T:2,opt:!0}]),Fd=s.makeMessageType("viam.service.motion.v1.OrientationConstraint",()=>[{no:1,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),xd=s.makeMessageType("viam.service.motion.v1.CollisionSpecification",()=>[{no:1,name:"allows",kind:"message",T:Jd,repeated:!0}]),Jd=s.makeMessageType("viam.service.motion.v1.CollisionSpecification.AllowedFrameCollisions",()=>[{no:1,name:"frame1",kind:"scalar",T:9},{no:2,name:"frame2",kind:"scalar",T:9}],{localName:"CollisionSpecification_AllowedFrameCollisions"}),Oo=s.makeMessageType("viam.service.motion.v1.PlanWithStatus",()=>[{no:1,name:"plan",kind:"message",T:Vd},{no:2,name:"status",kind:"message",T:Ba},{no:3,name:"status_history",kind:"message",T:Ba,repeated:!0}]),zd=s.makeMessageType("viam.service.motion.v1.PlanStatusWithID",()=>[{no:1,name:"plan_id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"status",kind:"message",T:Ba},{no:5,name:"component_name",kind:"scalar",T:9}]),Ba=s.makeMessageType("viam.service.motion.v1.PlanStatus",()=>[{no:1,name:"state",kind:"enum",T:s.getEnumType(bd)},{no:2,name:"timestamp",kind:"message",T:_},{no:3,name:"reason",kind:"scalar",T:9,opt:!0}]),Vd=s.makeMessageType("viam.service.motion.v1.Plan",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"steps",kind:"message",T:$d,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9}]),$d=s.makeMessageType("viam.service.motion.v1.PlanStep",()=>[{no:1,name:"step",kind:"map",K:9,V:{kind:"message",T:Yd}}]),Yd=s.makeMessageType("viam.service.motion.v1.ComponentState",()=>[{no:1,name:"pose",kind:"message",T:Te}]),Wd=Object.freeze(Object.defineProperty({__proto__:null,CollisionSpecification:xd,CollisionSpecification_AllowedFrameCollisions:Jd,ComponentState:Yd,Constraints:Ld,GetPlanRequest:Eo,GetPlanResponse:Ud,GetPoseRequest:_o,GetPoseResponse:Pd,LinearConstraint:Gd,ListPlanStatusesRequest:Io,ListPlanStatusesResponse:qd,MotionConfiguration:fo,MoveOnGlobeRequest:Ro,MoveOnGlobeResponse:Nd,MoveOnMapRequest:ho,MoveOnMapResponse:Cd,MoveRequest:vo,MoveResponse:wd,ObstacleDetector:Dd,OrientationConstraint:Fd,Plan:Vd,PlanState:bd,PlanStatus:Ba,PlanStatusWithID:zd,PlanStep:$d,PlanWithStatus:Oo,PseudolinearConstraint:Bd,StopPlanRequest:So,StopPlanResponse:Ad},Symbol.toStringTag,{value:"Module"})),jd={typeName:"viam.service.motion.v1.MotionService",methods:{move:{name:"Move",I:vo,O:wd,kind:m.Unary},moveOnMap:{name:"MoveOnMap",I:ho,O:Cd,kind:m.Unary},moveOnGlobe:{name:"MoveOnGlobe",I:Ro,O:Nd,kind:m.Unary},getPose:{name:"GetPose",I:_o,O:Pd,kind:m.Unary},stopPlan:{name:"StopPlan",I:So,O:Ad,kind:m.Unary},listPlanStatuses:{name:"ListPlanStatuses",I:Io,O:qd,kind:m.Unary},getPlan:{name:"GetPlan",I:Eo,O:Ud,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},Hd=s.makeEnum("viam.service.navigation.v1.MapType",[{no:0,name:"MAP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAP_TYPE_NONE",localName:"NONE"},{no:2,name:"MAP_TYPE_GPS",localName:"GPS"}]),Mo=s.makeEnum("viam.service.navigation.v1.Mode",[{no:0,name:"MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODE_MANUAL",localName:"MANUAL"},{no:2,name:"MODE_WAYPOINT",localName:"WAYPOINT"},{no:3,name:"MODE_EXPLORE",localName:"EXPLORE"}]),bo=s.makeMessageType("viam.service.navigation.v1.GetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Kd=s.makeMessageType("viam.service.navigation.v1.GetModeResponse",()=>[{no:1,name:"mode",kind:"enum",T:s.getEnumType(Mo)}]),wo=s.makeMessageType("viam.service.navigation.v1.SetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mode",kind:"enum",T:s.getEnumType(Mo)},{no:99,name:"extra",kind:"message",T:p}]),Xd=s.makeMessageType("viam.service.navigation.v1.SetModeResponse",[]),Qd=s.makeMessageType("viam.service.navigation.v1.Waypoint",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:He}]),Co=s.makeMessageType("viam.service.navigation.v1.GetLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zd=s.makeMessageType("viam.service.navigation.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:He},{no:2,name:"compass_heading",kind:"scalar",T:1}]),Do=s.makeMessageType("viam.service.navigation.v1.GetWaypointsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ep=s.makeMessageType("viam.service.navigation.v1.GetWaypointsResponse",()=>[{no:1,name:"waypoints",kind:"message",T:Qd,repeated:!0}]),No=s.makeMessageType("viam.service.navigation.v1.AddWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:He},{no:99,name:"extra",kind:"message",T:p}]),np=s.makeMessageType("viam.service.navigation.v1.AddWaypointResponse",[]),Po=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ap=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointResponse",[]),Ao=s.makeMessageType("viam.service.navigation.v1.GetObstaclesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),tp=s.makeMessageType("viam.service.navigation.v1.GetObstaclesResponse",()=>[{no:1,name:"obstacles",kind:"message",T:Da,repeated:!0}]),sp=s.makeMessageType("viam.service.navigation.v1.Path",()=>[{no:1,name:"destination_waypoint_id",kind:"scalar",T:9},{no:2,name:"geopoints",kind:"message",T:He,repeated:!0}]),qo=s.makeMessageType("viam.service.navigation.v1.GetPathsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),op=s.makeMessageType("viam.service.navigation.v1.GetPathsResponse",()=>[{no:1,name:"paths",kind:"message",T:sp,repeated:!0}]),Uo=s.makeMessageType("viam.service.navigation.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),ip=s.makeMessageType("viam.service.navigation.v1.GetPropertiesResponse",()=>[{no:1,name:"map_type",kind:"enum",T:s.getEnumType(Hd)}]),rp=Object.freeze(Object.defineProperty({__proto__:null,AddWaypointRequest:No,AddWaypointResponse:np,GetLocationRequest:Co,GetLocationResponse:Zd,GetModeRequest:bo,GetModeResponse:Kd,GetObstaclesRequest:Ao,GetObstaclesResponse:tp,GetPathsRequest:qo,GetPathsResponse:op,GetPropertiesRequest:Uo,GetPropertiesResponse:ip,GetWaypointsRequest:Do,GetWaypointsResponse:ep,MapType:Hd,Mode:Mo,Path:sp,RemoveWaypointRequest:Po,RemoveWaypointResponse:ap,SetModeRequest:wo,SetModeResponse:Xd,Waypoint:Qd},Symbol.toStringTag,{value:"Module"})),mp={typeName:"viam.service.navigation.v1.NavigationService",methods:{getMode:{name:"GetMode",I:bo,O:Kd,kind:m.Unary},setMode:{name:"SetMode",I:wo,O:Xd,kind:m.Unary},getLocation:{name:"GetLocation",I:Co,O:Zd,kind:m.Unary},getWaypoints:{name:"GetWaypoints",I:Do,O:ep,kind:m.Unary},addWaypoint:{name:"AddWaypoint",I:No,O:np,kind:m.Unary},removeWaypoint:{name:"RemoveWaypoint",I:Po,O:ap,kind:m.Unary},getObstacles:{name:"GetObstacles",I:Ao,O:tp,kind:m.Unary},getPaths:{name:"GetPaths",I:qo,O:op,kind:m.Unary},getProperties:{name:"GetProperties",I:Uo,O:ip,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},cp=s.makeEnum("viam.service.slam.v1.MappingMode",[{no:0,name:"MAPPING_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAPPING_MODE_CREATE_NEW_MAP",localName:"CREATE_NEW_MAP"},{no:2,name:"MAPPING_MODE_LOCALIZE_ONLY",localName:"LOCALIZE_ONLY"},{no:3,name:"MAPPING_MODE_UPDATE_EXISTING_MAP",localName:"UPDATE_EXISTING_MAP"}]),lp=s.makeEnum("viam.service.slam.v1.SensorType",[{no:0,name:"SENSOR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SENSOR_TYPE_CAMERA",localName:"CAMERA"},{no:2,name:"SENSOR_TYPE_MOVEMENT_SENSOR",localName:"MOVEMENT_SENSOR"}]),Lo=s.makeMessageType("viam.service.slam.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),dp=s.makeMessageType("viam.service.slam.v1.GetPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Te}]),Go=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"return_edited_map",kind:"scalar",T:8,opt:!0}]),pp=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapResponse",()=>[{no:1,name:"point_cloud_pcd_chunk",kind:"scalar",T:12}]),Bo=s.makeMessageType("viam.service.slam.v1.GetInternalStateRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),up=s.makeMessageType("viam.service.slam.v1.GetInternalStateResponse",()=>[{no:1,name:"internal_state_chunk",kind:"scalar",T:12}]),Fo=s.makeMessageType("viam.service.slam.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),gp=s.makeMessageType("viam.service.slam.v1.GetPropertiesResponse",()=>[{no:1,name:"cloud_slam",kind:"scalar",T:8},{no:2,name:"mapping_mode",kind:"enum",T:s.getEnumType(cp)},{no:3,name:"internal_state_file_type",kind:"scalar",T:9,opt:!0},{no:4,name:"sensor_info",kind:"message",T:Tp,repeated:!0}]),Tp=s.makeMessageType("viam.service.slam.v1.SensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(lp)}]),kp=Object.freeze(Object.defineProperty({__proto__:null,GetInternalStateRequest:Bo,GetInternalStateResponse:up,GetPointCloudMapRequest:Go,GetPointCloudMapResponse:pp,GetPositionRequest:Lo,GetPositionResponse:dp,GetPropertiesRequest:Fo,GetPropertiesResponse:gp,MappingMode:cp,SensorInfo:Tp,SensorType:lp},Symbol.toStringTag,{value:"Module"})),yp={typeName:"viam.service.slam.v1.SLAMService",methods:{getPosition:{name:"GetPosition",I:Lo,O:dp,kind:m.Unary},getPointCloudMap:{name:"GetPointCloudMap",I:Go,O:pp,kind:m.ServerStreaming},getInternalState:{name:"GetInternalState",I:Bo,O:up,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Fo,O:gp,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},vp=s.makeEnum("viam.app.data.v1.Order",[{no:0,name:"ORDER_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ORDER_DESCENDING",localName:"DESCENDING"},{no:2,name:"ORDER_ASCENDING",localName:"ASCENDING"}]),hp=s.makeEnum("viam.app.data.v1.TagsFilterType",[{no:0,name:"TAGS_FILTER_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TAGS_FILTER_TYPE_MATCH_BY_OR",localName:"MATCH_BY_OR"},{no:2,name:"TAGS_FILTER_TYPE_TAGGED",localName:"TAGGED"},{no:3,name:"TAGS_FILTER_TYPE_UNTAGGED",localName:"UNTAGGED"}]),sn=s.makeEnum("viam.app.data.v1.TabularDataSourceType",[{no:0,name:"TABULAR_DATA_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TABULAR_DATA_SOURCE_TYPE_STANDARD",localName:"STANDARD"},{no:2,name:"TABULAR_DATA_SOURCE_TYPE_HOT_STORAGE",localName:"HOT_STORAGE"},{no:3,name:"TABULAR_DATA_SOURCE_TYPE_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),Jn=s.makeEnum("viam.app.data.v1.IndexableCollection",[{no:0,name:"INDEXABLE_COLLECTION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEXABLE_COLLECTION_HOT_STORE",localName:"HOT_STORE"},{no:2,name:"INDEXABLE_COLLECTION_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),fp=s.makeEnum("viam.app.data.v1.IndexCreator",[{no:0,name:"INDEX_CREATOR_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEX_CREATOR_VIAM",localName:"VIAM"},{no:2,name:"INDEX_CREATOR_CUSTOMER",localName:"CUSTOMER"}]),xo=s.makeMessageType("viam.app.data.v1.DataRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"limit",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"sort_order",kind:"enum",T:s.getEnumType(vp)}]),Ke=s.makeMessageType("viam.app.data.v1.Filter",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:6,name:"robot_name",kind:"scalar",T:9},{no:7,name:"robot_id",kind:"scalar",T:9},{no:8,name:"part_name",kind:"scalar",T:9},{no:9,name:"part_id",kind:"scalar",T:9},{no:10,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:11,name:"organization_ids",kind:"scalar",T:9,repeated:!0},{no:12,name:"mime_type",kind:"scalar",T:9,repeated:!0},{no:13,name:"interval",kind:"message",T:zn},{no:14,name:"tags_filter",kind:"message",T:Fa},{no:15,name:"bbox_labels",kind:"scalar",T:9,repeated:!0},{no:16,name:"dataset_id",kind:"scalar",T:9}]),Fa=s.makeMessageType("viam.app.data.v1.TagsFilter",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(hp)},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),xa=s.makeMessageType("viam.app.data.v1.CaptureMetadata",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_id",kind:"scalar",T:9},{no:5,name:"part_name",kind:"scalar",T:9},{no:6,name:"part_id",kind:"scalar",T:9},{no:7,name:"component_type",kind:"scalar",T:9},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"method_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:Z}},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),zn=s.makeMessageType("viam.app.data.v1.CaptureInterval",()=>[{no:1,name:"start",kind:"message",T:_},{no:2,name:"end",kind:"message",T:_}]),Rp=s.makeMessageType("viam.app.data.v1.TabularDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:xo},{no:2,name:"count_only",kind:"scalar",T:8},{no:3,name:"include_internal_data",kind:"scalar",T:8}]),_p=s.makeMessageType("viam.app.data.v1.TabularDataByFilterResponse",()=>[{no:1,name:"metadata",kind:"message",T:xa,repeated:!0},{no:2,name:"data",kind:"message",T:Sp,repeated:!0},{no:3,name:"count",kind:"scalar",T:4},{no:4,name:"last",kind:"scalar",T:9},{no:5,name:"total_size_bytes",kind:"scalar",T:4}]),Sp=s.makeMessageType("viam.app.data.v1.TabularData",()=>[{no:1,name:"data",kind:"message",T:p},{no:2,name:"metadata_index",kind:"scalar",T:13},{no:3,name:"time_requested",kind:"message",T:_},{no:4,name:"time_received",kind:"message",T:_}]),Ip=s.makeMessageType("viam.app.data.v1.TabularDataBySQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"sql_query",kind:"scalar",T:9}]),Ep=s.makeMessageType("viam.app.data.v1.TabularDataBySQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),Jo=s.makeMessageType("viam.app.data.v1.TabularDataSource",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(sn)},{no:2,name:"pipeline_id",kind:"scalar",T:9,opt:!0}]),Op=s.makeMessageType("viam.app.data.v1.TabularDataByMQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"use_recent_data",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source",kind:"message",T:Jo,opt:!0},{no:7,name:"query_prefix_name",kind:"scalar",T:9,opt:!0}]),Mp=s.makeMessageType("viam.app.data.v1.TabularDataByMQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),bp=s.makeMessageType("viam.app.data.v1.ExportTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"interval",kind:"message",T:zn},{no:6,name:"additional_parameters",kind:"message",T:p,opt:!0}]),wp=s.makeMessageType("viam.app.data.v1.ExportTabularDataResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"time_captured",kind:"message",T:_},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"location_id",kind:"scalar",T:9},{no:8,name:"robot_name",kind:"scalar",T:9},{no:9,name:"robot_id",kind:"scalar",T:9},{no:10,name:"part_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"message",T:p},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"payload",kind:"message",T:p}]),Cp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"method_name",kind:"scalar",T:9},{no:4,name:"resource_subtype",kind:"scalar",T:9},{no:5,name:"additional_parameters",kind:"message",T:p,opt:!0}]),Dp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataResponse",()=>[{no:1,name:"time_captured",kind:"message",T:_},{no:2,name:"time_synced",kind:"message",T:_},{no:3,name:"payload",kind:"message",T:p}]),zo=s.makeMessageType("viam.app.data.v1.BinaryData",()=>[{no:1,name:"binary",kind:"scalar",T:12},{no:2,name:"metadata",kind:"message",T:Gp}]),Np=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:xo},{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"count_only",kind:"scalar",T:8},{no:4,name:"include_internal_data",kind:"scalar",T:8}]),Pp=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterResponse",()=>[{no:1,name:"data",kind:"message",T:zo,repeated:!0},{no:2,name:"count",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"total_size_bytes",kind:"scalar",T:4}]),ye=s.makeMessageType("viam.app.data.v1.BinaryID",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9}]),Ap=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsRequest",()=>[{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),qp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsResponse",()=>[{no:1,name:"data",kind:"message",T:zo,repeated:!0},{no:2,name:"count",kind:"scalar",T:4}]),Up=s.makeMessageType("viam.app.data.v1.BoundingBox",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:7,name:"confidence",kind:"scalar",T:1,opt:!0}]),Lp=s.makeMessageType("viam.app.data.v1.Classification",()=>[{no:3,name:"id",kind:"scalar",T:9},{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1,opt:!0}]),Ja=s.makeMessageType("viam.app.data.v1.Annotations",()=>[{no:1,name:"bboxes",kind:"message",T:Up,repeated:!0},{no:2,name:"classifications",kind:"message",T:Lp,repeated:!0}]),Gp=s.makeMessageType("viam.app.data.v1.BinaryMetadata",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"capture_metadata",kind:"message",T:xa},{no:3,name:"time_requested",kind:"message",T:_},{no:4,name:"time_received",kind:"message",T:_},{no:5,name:"file_name",kind:"scalar",T:9},{no:6,name:"file_ext",kind:"scalar",T:9},{no:7,name:"uri",kind:"scalar",T:9},{no:8,name:"annotations",kind:"message",T:Ja},{no:9,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:10,name:"binary_data_id",kind:"scalar",T:9},{no:11,name:"file_size_bytes",kind:"scalar",T:4}]),Bp=s.makeMessageType("viam.app.data.v1.DeleteTabularFilter",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"robot_id",kind:"scalar",T:9},{no:3,name:"part_id",kind:"scalar",T:9},{no:4,name:"component_type",kind:"scalar",T:9},{no:5,name:"component_name",kind:"scalar",T:9},{no:6,name:"method",kind:"scalar",T:9},{no:7,name:"tags_filter",kind:"message",T:Fa}]),Fp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"delete_older_than_days",kind:"scalar",T:13},{no:3,name:"filter",kind:"message",T:Bp,opt:!0}]),xp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Jp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"include_internal_data",kind:"scalar",T:8}]),zp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Vp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsRequest",()=>[{no:2,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),$p=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Yp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Wp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsResponse",[]),jp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Hp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterResponse",[]),Kp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Xp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Qp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Zp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),eu=s.makeMessageType("viam.app.data.v1.TagsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke}]),nu=s.makeMessageType("viam.app.data.v1.TagsByFilterResponse",()=>[{no:1,name:"tags",kind:"scalar",T:9,repeated:!0}]),au=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDRequest",()=>[{no:7,name:"binary_id",kind:"message",T:ye},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),tu=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDResponse",()=>[{no:1,name:"bbox_id",kind:"scalar",T:9}]),su=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDRequest",()=>[{no:3,name:"binary_id",kind:"message",T:ye},{no:4,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9}]),ou=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDResponse",[]),iu=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxRequest",()=>[{no:1,name:"binary_id",kind:"message",T:ye},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9},{no:3,name:"label",kind:"scalar",T:9,opt:!0},{no:4,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:5,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:6,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:7,name:"y_max_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),ru=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxResponse",[]),mu=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke}]),cu=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterResponse",()=>[{no:1,name:"labels",kind:"scalar",T:9,repeated:!0}]),lu=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),du=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserResponse",[]),pu=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),uu=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionResponse",()=>[{no:1,name:"hostname",kind:"scalar",T:9},{no:2,name:"mongodb_uri",kind:"scalar",T:9},{no:3,name:"has_database_user",kind:"scalar",T:8}]),gu=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),Tu=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsResponse",[]),ku=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),yu=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsResponse",[]),vu=s.makeMessageType("viam.app.data.v1.AddSequencesToDatasetRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"sequence_ids",kind:"scalar",T:9,repeated:!0}]),hu=s.makeMessageType("viam.app.data.v1.AddSequencesToDatasetResponse",[]),fu=s.makeMessageType("viam.app.data.v1.RemoveSequencesFromDatasetRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"sequence_ids",kind:"scalar",T:9,repeated:!0}]),Ru=s.makeMessageType("viam.app.data.v1.RemoveSequencesFromDatasetResponse",[]),_u=s.makeMessageType("viam.app.data.v1.CreateIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0}]),Su=s.makeMessageType("viam.app.data.v1.CreateIndexResponse",[]),Iu=s.makeMessageType("viam.app.data.v1.DeleteIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_name",kind:"scalar",T:9}]),Eu=s.makeMessageType("viam.app.data.v1.DeleteIndexResponse",[]),Ou=s.makeMessageType("viam.app.data.v1.ListIndexesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0}]),Mu=s.makeMessageType("viam.app.data.v1.ListIndexesResponse",()=>[{no:1,name:"indexes",kind:"message",T:bu,repeated:!0}]),bu=s.makeMessageType("viam.app.data.v1.Index",()=>[{no:1,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:2,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:3,name:"index_name",kind:"scalar",T:9},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_by",kind:"enum",T:s.getEnumType(fp)}]),wu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Cu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Vo=s.makeMessageType("viam.app.data.v1.Query",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_on",kind:"message",T:_},{no:6,name:"updated_at",kind:"message",T:_}]),Du=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Nu=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryResponse",[]),Pu=s.makeMessageType("viam.app.data.v1.GetSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Au=s.makeMessageType("viam.app.data.v1.GetSavedQueryResponse",()=>[{no:1,name:"saved_query",kind:"message",T:Vo}]),qu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Uu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryResponse",[]),Lu=s.makeMessageType("viam.app.data.v1.ListSavedQueriesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"limit",kind:"scalar",T:3}]),Gu=s.makeMessageType("viam.app.data.v1.ListSavedQueriesResponse",()=>[{no:1,name:"queries",kind:"message",T:Vo,repeated:!0}]),Bu=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLRequest",()=>[{no:1,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"expiration_minutes",kind:"scalar",T:13,opt:!0}]),Fu=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLResponse",()=>[{no:1,name:"signed_url",kind:"scalar",T:9},{no:2,name:"expires_at",kind:"message",T:_}]),za=s.makeMessageType("viam.app.data.v1.SequenceResourceFilter",()=>[{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"method_name",kind:"scalar",T:9}]),Va=s.makeMessageType("viam.app.data.v1.Sequence",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:9,name:"part_id",kind:"scalar",T:9},{no:3,name:"sequence_tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"created_at",kind:"message",T:_},{no:5,name:"updated_at",kind:"message",T:_},{no:6,name:"start_time",kind:"message",T:_},{no:7,name:"end_time",kind:"message",T:_},{no:8,name:"resources",kind:"message",T:za,repeated:!0},{no:10,name:"dataset_ids",kind:"scalar",T:9,repeated:!0}]),xu=s.makeMessageType("viam.app.data.v1.CreateSequenceRequest",()=>[{no:6,name:"part_id",kind:"scalar",T:9},{no:2,name:"resources",kind:"message",T:za,repeated:!0},{no:3,name:"sequence_tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"start_time",kind:"message",T:_},{no:5,name:"end_time",kind:"message",T:_}]),Ju=s.makeMessageType("viam.app.data.v1.CreateSequenceResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),zu=s.makeMessageType("viam.app.data.v1.GetSequenceRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Vu=s.makeMessageType("viam.app.data.v1.GetSequenceResponse",()=>[{no:1,name:"sequence",kind:"message",T:Va}]),$u=s.makeMessageType("viam.app.data.v1.UpdateSequenceRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"resources",kind:"message",T:za,repeated:!0},{no:3,name:"sequence_tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"start_time",kind:"message",T:_},{no:5,name:"end_time",kind:"message",T:_},{no:6,name:"field_mask",kind:"message",T:pe}]),Yu=s.makeMessageType("viam.app.data.v1.UpdateSequenceResponse",[]),Wu=s.makeMessageType("viam.app.data.v1.DeleteSequenceRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ju=s.makeMessageType("viam.app.data.v1.DeleteSequenceResponse",[]),Hu=s.makeMessageType("viam.app.data.v1.ListSequencesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9},{no:3,name:"page_size",kind:"scalar",T:13}]),Ku=s.makeMessageType("viam.app.data.v1.ListSequencesResponse",()=>[{no:1,name:"sequences",kind:"message",T:Va,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Xu=s.makeMessageType("viam.app.data.v1.SequencesByDatasetIDRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9},{no:3,name:"page_size",kind:"scalar",T:13}]),Qu=s.makeMessageType("viam.app.data.v1.SequencesByDatasetIDResponse",()=>[{no:1,name:"sequences",kind:"message",T:Va,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),jS=Object.freeze(Object.defineProperty({__proto__:null,AddBinaryDataToDatasetByIDsRequest:gu,AddBinaryDataToDatasetByIDsResponse:Tu,AddBoundingBoxToImageByIDRequest:au,AddBoundingBoxToImageByIDResponse:tu,AddSequencesToDatasetRequest:vu,AddSequencesToDatasetResponse:hu,AddTagsToBinaryDataByFilterRequest:jp,AddTagsToBinaryDataByFilterResponse:Hp,AddTagsToBinaryDataByIDsRequest:Yp,AddTagsToBinaryDataByIDsResponse:Wp,Annotations:Ja,BinaryData:zo,BinaryDataByFilterRequest:Np,BinaryDataByFilterResponse:Pp,BinaryDataByIDsRequest:Ap,BinaryDataByIDsResponse:qp,BinaryID:ye,BinaryMetadata:Gp,BoundingBox:Up,BoundingBoxLabelsByFilterRequest:mu,BoundingBoxLabelsByFilterResponse:cu,CaptureInterval:zn,CaptureMetadata:xa,Classification:Lp,ConfigureDatabaseUserRequest:lu,ConfigureDatabaseUserResponse:du,CreateBinaryDataSignedURLRequest:Bu,CreateBinaryDataSignedURLResponse:Fu,CreateIndexRequest:_u,CreateIndexResponse:Su,CreateSavedQueryRequest:wu,CreateSavedQueryResponse:Cu,CreateSequenceRequest:xu,CreateSequenceResponse:Ju,DataRequest:xo,DeleteBinaryDataByFilterRequest:Jp,DeleteBinaryDataByFilterResponse:zp,DeleteBinaryDataByIDsRequest:Vp,DeleteBinaryDataByIDsResponse:$p,DeleteIndexRequest:Iu,DeleteIndexResponse:Eu,DeleteSavedQueryRequest:Du,DeleteSavedQueryResponse:Nu,DeleteSequenceRequest:Wu,DeleteSequenceResponse:ju,DeleteTabularDataRequest:Fp,DeleteTabularDataResponse:xp,DeleteTabularFilter:Bp,ExportTabularDataRequest:bp,ExportTabularDataResponse:wp,Filter:Ke,GetDatabaseConnectionRequest:pu,GetDatabaseConnectionResponse:uu,GetLatestTabularDataRequest:Cp,GetLatestTabularDataResponse:Dp,GetSavedQueryRequest:Pu,GetSavedQueryResponse:Au,GetSequenceRequest:zu,GetSequenceResponse:Vu,Index:bu,IndexCreator:fp,IndexableCollection:Jn,ListIndexesRequest:Ou,ListIndexesResponse:Mu,ListSavedQueriesRequest:Lu,ListSavedQueriesResponse:Gu,ListSequencesRequest:Hu,ListSequencesResponse:Ku,Order:vp,Query:Vo,RemoveBinaryDataFromDatasetByIDsRequest:ku,RemoveBinaryDataFromDatasetByIDsResponse:yu,RemoveBoundingBoxFromImageByIDRequest:su,RemoveBoundingBoxFromImageByIDResponse:ou,RemoveSequencesFromDatasetRequest:fu,RemoveSequencesFromDatasetResponse:Ru,RemoveTagsFromBinaryDataByFilterRequest:Qp,RemoveTagsFromBinaryDataByFilterResponse:Zp,RemoveTagsFromBinaryDataByIDsRequest:Kp,RemoveTagsFromBinaryDataByIDsResponse:Xp,Sequence:Va,SequenceResourceFilter:za,SequencesByDatasetIDRequest:Xu,SequencesByDatasetIDResponse:Qu,TabularData:Sp,TabularDataByFilterRequest:Rp,TabularDataByFilterResponse:_p,TabularDataByMQLRequest:Op,TabularDataByMQLResponse:Mp,TabularDataBySQLRequest:Ip,TabularDataBySQLResponse:Ep,TabularDataSource:Jo,TabularDataSourceType:sn,TagsByFilterRequest:eu,TagsByFilterResponse:nu,TagsFilter:Fa,TagsFilterType:hp,UpdateBoundingBoxRequest:iu,UpdateBoundingBoxResponse:ru,UpdateSavedQueryRequest:qu,UpdateSavedQueryResponse:Uu,UpdateSequenceRequest:$u,UpdateSequenceResponse:Yu},Symbol.toStringTag,{value:"Module"})),$o=s.makeMessageType("viam.component.camera.v1.GetImagesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"filter_source_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Zu=s.makeMessageType("viam.component.camera.v1.GetImagesResponse",()=>[{no:1,name:"images",kind:"message",T:Yo,repeated:!0},{no:84260,name:"response_metadata",kind:"message",T:am}]),Yo=s.makeMessageType("viam.component.camera.v1.Image",()=>[{no:1,name:"source_name",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:12},{no:4,name:"mime_type",kind:"scalar",T:9},{no:5,name:"annotations",kind:"message",T:Ja}]),Wo=s.makeMessageType("viam.component.camera.v1.GetPointCloudRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),eg=s.makeMessageType("viam.component.camera.v1.GetPointCloudResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"point_cloud",kind:"scalar",T:12}]),ng=s.makeMessageType("viam.component.camera.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),ag=s.makeMessageType("viam.component.camera.v1.GetPropertiesResponse",()=>[{no:1,name:"supports_pcd",kind:"scalar",T:8},{no:2,name:"intrinsic_parameters",kind:"message",T:og},{no:3,name:"distortion_parameters",kind:"message",T:ig},{no:4,name:"mime_types",kind:"scalar",T:9,repeated:!0},{no:5,name:"frame_rate",kind:"scalar",T:2,opt:!0},{no:6,name:"extrinsic_parameters",kind:"message",T:rg}]),HS=s.makeMessageType("viam.component.camera.v1.Webcams",()=>[{no:1,name:"webcams",kind:"message",T:tg,repeated:!0}]),tg=s.makeMessageType("viam.component.camera.v1.Webcam",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"status",kind:"scalar",T:9},{no:3,name:"properties",kind:"message",T:sg,repeated:!0},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"id",kind:"scalar",T:9}]),sg=s.makeMessageType("viam.component.camera.v1.Property",()=>[{no:1,name:"width_px",kind:"scalar",T:5},{no:2,name:"height_px",kind:"scalar",T:5},{no:3,name:"frame_format",kind:"scalar",T:9},{no:4,name:"frame_rate",kind:"scalar",T:2}]),og=s.makeMessageType("viam.component.camera.v1.IntrinsicParameters",()=>[{no:1,name:"width_px",kind:"scalar",T:13},{no:2,name:"height_px",kind:"scalar",T:13},{no:3,name:"focal_x_px",kind:"scalar",T:1},{no:4,name:"focal_y_px",kind:"scalar",T:1},{no:5,name:"center_x_px",kind:"scalar",T:1},{no:6,name:"center_y_px",kind:"scalar",T:1}]),ig=s.makeMessageType("viam.component.camera.v1.DistortionParameters",()=>[{no:1,name:"model",kind:"scalar",T:9},{no:2,name:"parameters",kind:"scalar",T:1,repeated:!0}]),rg=s.makeMessageType("viam.component.camera.v1.ExtrinsicParameters",()=>[{no:1,name:"translation",kind:"message",T:ke},{no:2,name:"orientation",kind:"message",T:Ut}]),KS=Object.freeze(Object.defineProperty({__proto__:null,DistortionParameters:ig,ExtrinsicParameters:rg,GetImagesRequest:$o,GetImagesResponse:Zu,GetPointCloudRequest:Wo,GetPointCloudResponse:eg,GetPropertiesRequest:ng,GetPropertiesResponse:ag,Image:Yo,IntrinsicParameters:og,Property:sg,Webcam:tg,Webcams:HS},Symbol.toStringTag,{value:"Module"})),jo=s.makeMessageType("viam.service.vision.v1.GetDetectionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:3},{no:4,name:"height",kind:"scalar",T:3},{no:5,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),mg=s.makeMessageType("viam.service.vision.v1.GetDetectionsResponse",()=>[{no:1,name:"detections",kind:"message",T:$a,repeated:!0}]),Ho=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),cg=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraResponse",()=>[{no:1,name:"detections",kind:"message",T:$a,repeated:!0}]),$a=s.makeMessageType("viam.service.vision.v1.Detection",()=>[{no:1,name:"x_min",kind:"scalar",T:3,opt:!0},{no:2,name:"y_min",kind:"scalar",T:3,opt:!0},{no:3,name:"x_max",kind:"scalar",T:3,opt:!0},{no:4,name:"y_max",kind:"scalar",T:3,opt:!0},{no:5,name:"confidence",kind:"scalar",T:1},{no:6,name:"class_name",kind:"scalar",T:9},{no:7,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:8,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:10,name:"y_max_normalized",kind:"scalar",T:1,opt:!0}]),Ko=s.makeMessageType("viam.service.vision.v1.GetClassificationsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:5},{no:4,name:"height",kind:"scalar",T:5},{no:5,name:"mime_type",kind:"scalar",T:9},{no:6,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),lg=s.makeMessageType("viam.service.vision.v1.GetClassificationsResponse",()=>[{no:1,name:"classifications",kind:"message",T:Ya,repeated:!0}]),Xo=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),dg=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraResponse",()=>[{no:1,name:"classifications",kind:"message",T:Ya,repeated:!0}]),Ya=s.makeMessageType("viam.service.vision.v1.Classification",()=>[{no:1,name:"class_name",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1}]),Qo=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),pg=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"objects",kind:"message",T:Gt,repeated:!0}]),Zo=s.makeMessageType("viam.service.vision.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ei=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"return_image",kind:"scalar",T:8},{no:4,name:"return_classifications",kind:"scalar",T:8},{no:5,name:"return_detections",kind:"scalar",T:8},{no:6,name:"return_object_point_clouds",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),ug=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraResponse",()=>[{no:1,name:"image",kind:"message",T:Yo},{no:2,name:"detections",kind:"message",T:$a,repeated:!0},{no:3,name:"classifications",kind:"message",T:Ya,repeated:!0},{no:4,name:"objects",kind:"message",T:Gt,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),gg=s.makeMessageType("viam.service.vision.v1.GetPropertiesResponse",()=>[{no:1,name:"classifications_supported",kind:"scalar",T:8},{no:2,name:"detections_supported",kind:"scalar",T:8},{no:3,name:"object_point_clouds_supported",kind:"scalar",T:8}]),Tg=Object.freeze(Object.defineProperty({__proto__:null,CaptureAllFromCameraRequest:ei,CaptureAllFromCameraResponse:ug,Classification:Ya,Detection:$a,GetClassificationsFromCameraRequest:Xo,GetClassificationsFromCameraResponse:dg,GetClassificationsRequest:Ko,GetClassificationsResponse:lg,GetDetectionsFromCameraRequest:Ho,GetDetectionsFromCameraResponse:cg,GetDetectionsRequest:jo,GetDetectionsResponse:mg,GetObjectPointCloudsRequest:Qo,GetObjectPointCloudsResponse:pg,GetPropertiesRequest:Zo,GetPropertiesResponse:gg},Symbol.toStringTag,{value:"Module"})),kg={typeName:"viam.service.vision.v1.VisionService",methods:{getDetectionsFromCamera:{name:"GetDetectionsFromCamera",I:Ho,O:cg,kind:m.Unary},getDetections:{name:"GetDetections",I:jo,O:mg,kind:m.Unary},getClassificationsFromCamera:{name:"GetClassificationsFromCamera",I:Xo,O:dg,kind:m.Unary},getClassifications:{name:"GetClassifications",I:Ko,O:lg,kind:m.Unary},getObjectPointClouds:{name:"GetObjectPointClouds",I:Qo,O:pg,kind:m.Unary},getProperties:{name:"GetProperties",I:Zo,O:gg,kind:m.Unary},captureAllFromCamera:{name:"CaptureAllFromCamera",I:ei,O:ug,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},XS=new Blob([`self.onmessage = function(e) {
|
|
5
5
|
setTimeout(() => self.postMessage(""), e.data);
|
|
6
|
-
};`],{type:"text/javascript"});class
|
|
6
|
+
};`],{type:"text/javascript"});class QS{constructor(e,n,a=1e4){this.deferredTransport=e,this.onDisconnect=n,this.heartbeatIntervalMs=a}connecting;get client(){const e=this.deferredTransport();return X(uo,e)}heartbeat(){let e;const n=async()=>{try{await this.client.getOperations({})}catch{this.onDisconnect();return}e?e.postMessage(this.heartbeatIntervalMs):setTimeout(()=>{n().catch(console.error)},this.heartbeatIntervalMs)};if(globalThis.Worker!==void 0){const a=window.URL.createObjectURL(XS);e=new Worker(a),URL.revokeObjectURL(a),e.addEventListener("message",()=>{n().catch(console.error)})}n().catch(console.error)}async start(){this.connecting&&await this.connecting,this.connecting=new Promise((e,n)=>{(async()=>{await this.client.getOperations({})})().then(e).catch(n).finally(()=>{this.connecting=void 0})});try{await this.connecting}finally{this.connecting=void 0}this.heartbeat()}}const Wa=s.makeMessageType("grpc.reflection.v1.ServerReflectionRequest",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:3,name:"file_by_filename",kind:"scalar",T:9,oneof:"message_request"},{no:4,name:"file_containing_symbol",kind:"scalar",T:9,oneof:"message_request"},{no:5,name:"file_containing_extension",kind:"message",T:ZS,oneof:"message_request"},{no:6,name:"all_extension_numbers_of_type",kind:"scalar",T:9,oneof:"message_request"},{no:7,name:"list_services",kind:"scalar",T:9,oneof:"message_request"}]),ZS=s.makeMessageType("grpc.reflection.v1.ExtensionRequest",()=>[{no:1,name:"containing_type",kind:"scalar",T:9},{no:2,name:"extension_number",kind:"scalar",T:5}]),eI=s.makeMessageType("grpc.reflection.v1.ServerReflectionResponse",()=>[{no:1,name:"valid_host",kind:"scalar",T:9},{no:2,name:"original_request",kind:"message",T:Wa},{no:4,name:"file_descriptor_response",kind:"message",T:nI,oneof:"message_response"},{no:5,name:"all_extension_numbers_response",kind:"message",T:aI,oneof:"message_response"},{no:6,name:"list_services_response",kind:"message",T:tI,oneof:"message_response"},{no:7,name:"error_response",kind:"message",T:oI,oneof:"message_response"}]),nI=s.makeMessageType("grpc.reflection.v1.FileDescriptorResponse",()=>[{no:1,name:"file_descriptor_proto",kind:"scalar",T:12,repeated:!0}]),aI=s.makeMessageType("grpc.reflection.v1.ExtensionNumberResponse",()=>[{no:1,name:"base_type_name",kind:"scalar",T:9},{no:2,name:"extension_number",kind:"scalar",T:5,repeated:!0}]),tI=s.makeMessageType("grpc.reflection.v1.ListServiceResponse",()=>[{no:1,name:"service",kind:"message",T:sI,repeated:!0}]),sI=s.makeMessageType("grpc.reflection.v1.ServiceResponse",()=>[{no:1,name:"name",kind:"scalar",T:9}]),oI=s.makeMessageType("grpc.reflection.v1.ErrorResponse",()=>[{no:1,name:"error_code",kind:"scalar",T:5},{no:2,name:"error_message",kind:"scalar",T:9}]),iI={typeName:"grpc.reflection.v1.ServerReflection",methods:{serverReflectionInfo:{name:"ServerReflectionInfo",I:Wa,O:eI,kind:m.BiDiStreaming}}};class rI{constructor(e,n){this.deferredTransport=e,this.sessionManager=n}async getSessionMetadata(){try{return await this.sessionManager.getSessionMetadata()}catch(e){throw e instanceof C&&e.code===g.Code.InvalidArgument&&e.message==="SESSION_EXPIRED"&&this.sessionManager.reset(),e}}async unary(e,n,a,o,i,r,c){const l=qn(i),d=`/${e.typeName}/${n.name}`;for(const[u,h]of Bn)l.set(u,h);if(on.heartbeatMonitoredMethods[d]??!1){const u=await this.getSessionMetadata();for(const[h,I]of u)l.set(h,I)}return this.deferredTransport().unary(e,n,a,o,l,r,c)}async stream(e,n,a,o,i,r,c){const l=qn(i),d=`/${e.typeName}/${n.name}`;for(const[u,h]of Bn)l.set(u,h);if(on.heartbeatMonitoredMethods[d]??!1){const u=await this.getSessionMetadata();for(const[h,I]of u)l.set(h,I)}return this.deferredTransport().stream(e,n,a,o,l,r,c)}}const mI=new Blob([`self.onmessage = function(e) {
|
|
7
7
|
setTimeout(() => self.postMessage(""), e.data);
|
|
8
|
-
};`],{type:"text/javascript"});class on{constructor(e,n){this.deferredTransport=n,this.host=e??"",this.transport=new KS(this.deferredTransport,this)}static heartbeatMonitoredMethods={};transport;currentSessionID="";sessionsSupported;heartbeatIntervalMs;host="";starting;get client(){const e=this.deferredTransport();return X(lo,e)}get sessionID(){return this.currentSessionID}setHost(e){this.host=e}getSessionMetadataInner(){const e=new Headers;return this.sessionsSupported&&this.currentSessionID!==""&&e.set("viam-sid",this.currentSessionID),e}reset(){this.starting||(this.sessionsSupported=void 0)}backgroundHeartbeat=!0;async heartbeat(){if(!this.sessionsSupported||this.currentSessionID==="")return;for(;this.starting;)await this.starting;let e;const n=async()=>{const t=new io({id:this.currentSessionID});try{await this.client.sendSessionHeartbeat(t)}catch(o){if(o instanceof C&&o.code===g.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}if(o instanceof ge||o instanceof C&&o.rawMessage==="closed"){this.reset();return}}e?e.postMessage(this.heartbeatIntervalMs):setTimeout(()=>{n().catch(console.error)},this.heartbeatIntervalMs)};if(this.backgroundHeartbeat&&globalThis.Worker!==void 0){const t=window.URL.createObjectURL(XS);e=new Worker(t),URL.revokeObjectURL(t),e.addEventListener("message",()=>{n().catch(console.error)})}n().catch(console.error)}async getSessionMetadata(){for(;this.starting;)await this.starting;return this.sessionsSupported!==void 0?this.getSessionMetadataInner():(this.starting=new Promise((e,n)=>{(async()=>{const t=new oo;this.currentSessionID!==""&&(t.resume=this.currentSessionID);let o;try{o=await this.client.startSession(t)}catch(r){if(r instanceof C&&r.code===g.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}throw r}const{heartbeatWindow:i}=o;if(!i)throw new Error("expected heartbeat window in response to start session");this.sessionsSupported=!0,this.currentSessionID=o.id,this.heartbeatIntervalMs=(Number(i.seconds)*1e3+i.nanos/1e6)/5,await this.applyHeartbeatMonitoredMethods(),e(),this.heartbeat().catch(console.error)})().then(e).catch(n).finally(()=>{this.starting=void 0})}),await this.starting,this.getSessionMetadataInner())}async applyHeartbeatMonitoredMethods(){try{const e=X(jS,this.transport),n=new $a({host:this.host,messageRequest:{case:"listServices",value:""}}),t=e.serverReflectionInfo(pt([n]),{timeoutMs:1e4});for await(const o of t){const i=o.messageResponse.value.service.map(c=>new $a({messageRequest:{case:"fileContainingSymbol",value:c.name}})),r=e.serverReflectionInfo(pt(i),{timeoutMs:1e4});for await(const c of r)for(const l of c.messageResponse.value.fileDescriptorProto){const d=re.fromBinary(l);for(const u of d.service)for(const h of u.method)on.heartbeatMonitoredMethods[`/${d.package}.${u.name}/${h.name}`]=on.hasHeartbeatOption(h.options)}}}catch{on.heartbeatMonitoredMethods={"/viam.component.arm.v1.ArmService/MoveToPosition":!0,"/viam.component.arm.v1.ArmService/MoveToJointPositions":!0,"/viam.component.arm.v1.ArmService/MoveThroughJointPositions":!0,"/viam.component.base.v1.BaseService/MoveStraight":!0,"/viam.component.base.v1.BaseService/Spin":!0,"/viam.component.base.v1.BaseService/SetPower":!0,"/viam.component.base.v1.BaseService/SetVelocity":!0,"/viam.component.gantry.v1.GantryService/MoveToPosition":!0,"/viam.component.gripper.v1.GripperService/Open":!0,"/viam.component.gripper.v1.GripperService/Grab":!0,"/viam.component.motor.v1.MotorService/SetPower":!0,"/viam.component.motor.v1.MotorService/GoFor":!0,"/viam.component.motor.v1.MotorService/GoTo":!0,"/viam.component.motor.v1.MotorService/SetRPM":!0,"/viam.component.servo.v1.ServoService/Move":!0}}}static hasHeartbeatOption(e){if(!e)return!1;const n=new zi(e.toBinary());for(;n.pos<n.len;){const t=n.tag(),[o]=t;if(o===am.field.no)return!0;n.string()}return!1}}const QS=s.makeEnum("viam.service.mlmodel.v1.LabelType",[{no:0,name:"LABEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"LABEL_TYPE_TENSOR_VALUE",localName:"TENSOR_VALUE"},{no:2,name:"LABEL_TYPE_TENSOR_AXIS",localName:"TENSOR_AXIS"}]),cg=s.makeMessageType("viam.service.mlmodel.v1.InferRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:3,name:"input_tensors",kind:"message",T:pg},{no:99,name:"extra",kind:"message",T:p}]),ZS=s.makeMessageType("viam.service.mlmodel.v1.InferResponse",()=>[{no:3,name:"output_tensors",kind:"message",T:pg}]),lg=s.makeMessageType("viam.service.mlmodel.v1.MetadataRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),eI=s.makeMessageType("viam.service.mlmodel.v1.MetadataResponse",()=>[{no:1,name:"metadata",kind:"message",T:nI}]),nI=s.makeMessageType("viam.service.mlmodel.v1.Metadata",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"input_info",kind:"message",T:dg,repeated:!0},{no:5,name:"output_info",kind:"message",T:dg,repeated:!0}]),dg=s.makeMessageType("viam.service.mlmodel.v1.TensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"data_type",kind:"scalar",T:9},{no:4,name:"shape",kind:"scalar",T:5,repeated:!0},{no:5,name:"associated_files",kind:"message",T:aI,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),aI=s.makeMessageType("viam.service.mlmodel.v1.File",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"label_type",kind:"enum",T:s.getEnumType(QS)}]),tI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),sI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),oI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),iI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),rI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt32",()=>[{no:1,name:"data",kind:"scalar",T:15,repeated:!0}]),mI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt32",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),cI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt64",()=>[{no:1,name:"data",kind:"scalar",T:16,repeated:!0}]),lI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt64",()=>[{no:1,name:"data",kind:"scalar",T:6,repeated:!0}]),dI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataFloat",()=>[{no:1,name:"data",kind:"scalar",T:2,repeated:!0}]),pI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataDouble",()=>[{no:1,name:"data",kind:"scalar",T:1,repeated:!0}]),uI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensor",()=>[{no:1,name:"shape",kind:"scalar",T:6,repeated:!0},{no:2,name:"int8_tensor",kind:"message",T:tI,oneof:"tensor"},{no:3,name:"uint8_tensor",kind:"message",T:sI,oneof:"tensor"},{no:4,name:"int16_tensor",kind:"message",T:oI,oneof:"tensor"},{no:5,name:"uint16_tensor",kind:"message",T:iI,oneof:"tensor"},{no:6,name:"int32_tensor",kind:"message",T:rI,oneof:"tensor"},{no:7,name:"uint32_tensor",kind:"message",T:mI,oneof:"tensor"},{no:8,name:"int64_tensor",kind:"message",T:cI,oneof:"tensor"},{no:9,name:"uint64_tensor",kind:"message",T:lI,oneof:"tensor"},{no:10,name:"float_tensor",kind:"message",T:dI,oneof:"tensor"},{no:11,name:"double_tensor",kind:"message",T:pI,oneof:"tensor"}]),pg=s.makeMessageType("viam.service.mlmodel.v1.FlatTensors",()=>[{no:1,name:"tensors",kind:"map",K:9,V:{kind:"message",T:uI}}]),ug={typeName:"viam.service.mlmodel.v1.MLModelService",methods:{infer:{name:"Infer",I:cg,O:ZS,kind:m.Unary},metadata:{name:"Metadata",I:lg,O:eI,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},gg=s.makeEnum("viam.service.worldstatestore.v1.TransformChangeType",[{no:0,name:"TRANSFORM_CHANGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRANSFORM_CHANGE_TYPE_ADDED",localName:"ADDED"},{no:2,name:"TRANSFORM_CHANGE_TYPE_REMOVED",localName:"REMOVED"},{no:3,name:"TRANSFORM_CHANGE_TYPE_UPDATED",localName:"UPDATED"}]),Tg=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),gI=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsResponse",()=>[{no:1,name:"uuids",kind:"scalar",T:12,repeated:!0}]),kg=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"uuid",kind:"scalar",T:12},{no:99,name:"extra",kind:"message",T:p}]),TI=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformResponse",()=>[{no:2,name:"transform",kind:"message",T:xe}]),yg=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),kI=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesResponse",()=>[{no:1,name:"change_type",kind:"enum",T:s.getEnumType(gg)},{no:2,name:"transform",kind:"message",T:xe},{no:3,name:"updated_fields",kind:"message",T:pe}]),vg={typeName:"viam.service.worldstatestore.v1.WorldStateStoreService",methods:{listUUIDs:{name:"ListUUIDs",I:Tg,O:gI,kind:m.Unary},getTransform:{name:"GetTransform",I:kg,O:TI,kind:m.Unary},streamTransformChanges:{name:"StreamTransformChanges",I:yg,O:kI,kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},yI=(a,e)=>{if(a==null)throw new Error(e)},vn="Dial operation aborted",vI=a=>{const e=a;return typeof e.signalingAddress!="string"?!1:!e.iceServers||Array.isArray(e.iceServers)},hg=a=>a>0&&Number.isInteger(a),fg=a=>{if(a instanceof C&&[g.Code.Canceled,g.Code.InvalidArgument,g.Code.NotFound,g.Code.AlreadyExists,g.Code.PermissionDenied,g.Code.FailedPrecondition,g.Code.OutOfRange,g.Code.Unimplemented,g.Code.Unauthenticated].includes(a.code))return!1;if(a instanceof Error){const e=a.message.toLowerCase();if(e.includes("invalid")||e.includes("configuration")||e.includes("cannot dial"))return!1}return!0},hI=a=>{if(a.credentials&&Fn(a.credentials))try{a.credentials.authEntity=new URL(a.credentials.authEntity).host}catch(e){if(!(e instanceof TypeError))throw e}if(a.reconnectMaxAttempts!==void 0&&!hg(a.reconnectMaxAttempts))throw new Error(`Value of max reconnect attempts (${a.reconnectMaxAttempts}) should be a positive integer`);if(a.reconnectMaxWait!==void 0&&!hg(a.reconnectMaxWait))throw new Error(`Value of max reconnect wait (${a.reconnectMaxWait}) should be a positive integer`)},Rg=a=>{if(a instanceof Error&&a.message===vn)throw a};class Xe extends om{serviceHost="";webrtcOptions={enabled:!1,host:"",signalingAddress:"",rtcConfig:{}};directOptions={};sessionOptions={disabled:!1};gRPCConnectionManager;sessionManager;peerConn;dataChannel;transport;connecting;connectResolve;dialing;currentDialAbortSignal;savedCreds;closed;robotServiceClient;armServiceClient;baseServiceClient;boardServiceClient;encoderServiceClient;gantryServiceClient;genericServiceClient;gripperServiceClient;mlModelServiceClient;movementSensorServiceClient;powerSensorServiceClient;inputControllerServiceClient;motorServiceClient;navigationServiceClient;discoveryServiceClient;motionServiceClient;visionServiceClient;servoServiceClient;slamServiceClient;worldStateStoreServiceClient;currentRetryAttempt=0;isReconnecting=!1;connectionId;onICEConnectionStateChange;onDataChannelClose;onTrack;constructor(e,n,t,o){super(),e!==void 0&&(this.serviceHost=e),n&&(this.webrtcOptions=n),o&&(this.directOptions=o),t&&(this.sessionOptions=t),this.gRPCConnectionManager=new xS(()=>{if(!this.transport)throw new Error(Xe.notConnectedYetStr);return this.transport},()=>{this.onDisconnect()}),this.sessionManager=new on(this.serviceHost,()=>{if(!this.transport)throw new Error(Xe.notConnectedYetStr);return this.transport});for(const i of Object.values(K))this.on(i,()=>{this.emit("connectionstatechange",{eventType:i})});this.closed=!1}cleanupEventListeners(){this.peerConn&&this.onICEConnectionStateChange&&(this.peerConn.removeEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onICEConnectionStateChange=void 0),this.peerConn&&this.onTrack&&(this.peerConn.removeEventListener("track",this.onTrack),this.onTrack=void 0),this.dataChannel&&this.onDataChannelClose&&(this.dataChannel.removeEventListener("close",this.onDataChannelClose),this.onDataChannelClose=void 0)}onDisconnect(e){if(this.noReconnect!==void 0&&this.noReconnect){this.emit(K.DISCONNECTED,e??{});return}if(this.closed){this.emit(K.DISCONNECTED,e??{});return}this.isReconnecting=!0,this.emit(K.RECONNECTING,{event:e??{}}),console.debug("Connection closed, will try to reconnect");const n={retry:(t,o)=>(console.debug(`Failed to connect, attempt ${o} with backoff`,t),this.currentRetryAttempt=o,this.closed?!1:fg(t)?!0:this.shouldRetryOnError?.()?(console.debug("Non-retryable error encountered, but shouldRetryOnError returned true",t),!0):(console.debug("Non-retryable error encountered, stopping reconnection attempts",t),!1))};this.reconnectMaxWait!==void 0&&(n.maxDelay=this.reconnectMaxWait),this.reconnectMaxAttempts!==void 0&&(n.numOfAttempts=this.reconnectMaxAttempts),this.currentRetryAttempt=0,It(async()=>this.connect(),n).then(()=>{this.isReconnecting=!1,console.debug("Reconnected successfully!")}).catch(t=>{this.isReconnecting=!1,console.debug(`Reconnection failed after ${this.currentRetryAttempt} attempt(s)`,t),this.emit(K.RECONNECTION_FAILED,{error:t,attempts:this.currentRetryAttempt})})}get noReconnect(){return this.webrtcOptions.noReconnect??this.directOptions.noReconnect}get reconnectMaxAttempts(){return this.webrtcOptions.reconnectMaxAttempts??this.directOptions.reconnectMaxAttempts}get reconnectMaxWait(){return this.webrtcOptions.reconnectMaxWait??this.directOptions.reconnectMaxWait}get shouldRetryOnError(){return this.webrtcOptions.shouldRetryOnError??this.directOptions.shouldRetryOnError}get sessionId(){return this.sessionManager.sessionID}static notConnectedYetStr="not connected yet";get robotService(){if(!this.robotServiceClient)throw new Error(Xe.notConnectedYetStr);return this.robotServiceClient}get armService(){return this.armServiceClient??=this.createServiceClient(km),this.armServiceClient}get baseService(){return this.baseServiceClient??=this.createServiceClient(Om),this.baseServiceClient}get boardService(){return this.boardServiceClient??=this.createServiceClient(Bm),this.boardServiceClient}get encoderService(){return this.encoderServiceClient??=this.createServiceClient(Vm),this.encoderServiceClient}get gantryService(){return this.gantryServiceClient??=this.createServiceClient(Xm),this.gantryServiceClient}get genericService(){return this.genericServiceClient??=this.createServiceClient(fs),this.genericServiceClient}get gripperService(){return this.gripperServiceClient??=this.createServiceClient(oc),this.gripperServiceClient}get mlModelService(){return this.mlModelServiceClient??=this.createServiceClient(ug),this.mlModelServiceClient}get movementSensorService(){return this.movementSensorServiceClient??=this.createServiceClient(Uc),this.movementSensorServiceClient}get powerSensorService(){return this.powerSensorServiceClient??=this.createServiceClient(Bc),this.powerSensorServiceClient}get inputControllerService(){return this.inputControllerServiceClient??=this.createServiceClient(gc),this.inputControllerServiceClient}get motorService(){return this.motorServiceClient??=this.createServiceClient(Oc),this.motorServiceClient}get navigationService(){return this.navigationServiceClient??=this.createServiceClient(ip),this.navigationServiceClient}get discoveryService(){return this.discoveryServiceClient??=this.createServiceClient(Od),this.discoveryServiceClient}get motionService(){return this.motionServiceClient??=this.createServiceClient(Yd),this.motionServiceClient}get visionService(){return this.visionServiceClient??=this.createServiceClient(mg),this.visionServiceClient}get servoService(){return this.servoServiceClient??=this.createServiceClient(Vc),this.servoServiceClient}get slamService(){return this.slamServiceClient??=this.createServiceClient(Tp),this.slamServiceClient}get worldStateStoreService(){return this.worldStateStoreServiceClient??=this.createServiceClient(vg),this.worldStateStoreServiceClient}createServiceClient(e){return yI(this.clientTransport,Xe.notConnectedYetStr),X(e,this.clientTransport)}get peerConnection(){return this.peerConn}get clientTransport(){return this.sessionOptions.disabled?this.transport:this.sessionManager.transport}async dialWebRTC(e,n){if(n?.abort===!0)throw new Error(vn);return this.emit(K.DIALING,{method:"webrtc",attempt:this.currentRetryAttempt}),this.serviceHost=e.serviceHost??e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!0,this.webrtcOptions.host=e.host,this.webrtcOptions.signalingAddress=e.signalingAddress,this.webrtcOptions.rtcConfig.iceServers=e.iceServers??[],this.webrtcOptions.noReconnect=e.noReconnect,this.webrtcOptions.reconnectMaxWait=e.reconnectMaxWait,this.webrtcOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.webrtcOptions.shouldRetryOnError=e.shouldRetryOnError,this.webrtcOptions.forceRelay=e.forceRelay,this.webrtcOptions.forceP2P=e.forceP2P,this.webrtcOptions.turnUri=e.turnUri,this.webrtcOptions.turnScheme=e.turnScheme,this.webrtcOptions.turnTransport=e.turnTransport,this.webrtcOptions.turnPort=e.turnPort,this.webrtcOptions.signalingInsecure=e.signalingInsecure,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({priority:e.priority,dialTimeoutMs:e.dialTimeoutMs??e.dialTimeout??Ft,creds:e.credentials,extraHeaders:e.extraHeaders}),this}async dialDirect(e,n){if(n?.abort===!0)throw new Error(vn);if(this.emit(K.DIALING,{method:"grpc",attempt:this.currentRetryAttempt}),!e.host.includes("local"))throw new Error(`cannot dial "${e.host}" directly, please use a local url instead.`);return this.serviceHost=e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!1,this.directOptions.noReconnect=e.noReconnect,this.directOptions.reconnectMaxWait=e.reconnectMaxWait,this.directOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.directOptions.shouldRetryOnError=e.shouldRetryOnError,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({creds:e.credentials,dialTimeoutMs:e.dialTimeoutMs??e.dialTimeout??Ft,extraHeaders:e.extraHeaders}),this}resetDialing(e){this.dialing===e&&(this.dialing=void 0,this.currentDialAbortSignal=void 0)}async dial(e){hI(e),this.dialing&&this.currentDialAbortSignal&&(console.debug("Aborting previous dial attempt due to new dial call"),this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")})),this.currentDialAbortSignal={abort:!1};const n=this.performDial(e,this.currentDialAbortSignal,e.reconnectAbortSignal??{abort:!1});this.dialing=n;try{const t=await n;return this.resetDialing(n),t}catch(t){if(this.resetDialing(n),t instanceof Error&&t.message===vn)return console.debug(vn),this;throw t}}createBackOffOpts({abort:e},{abort:n}){return{retry:(t,o)=>{if(e||n)throw new Error(vn);return console.debug(`Failed to connect, attempt ${o} with backoff`,t),this.currentRetryAttempt=o,this.closed?!1:fg(t)?!0:(console.debug("Non-retryable error encountered, stopping connection attempts",t),!1)}}}async tryWebRTCDial(e,n,t){try{return{dialer:await It(async()=>this.dialWebRTC(e,n),t)}}catch(o){Rg(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via WebRTC",i),this.emit(K.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async tryDirectDial(e,n,t){try{return{dialer:await It(async()=>this.dialDirect(e,n),t)}}catch(o){Rg(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via gRPC",i),this.emit(K.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async performDial(e,n,t){const o=this.createBackOffOpts(n,t??{abort:!1});e.reconnectMaxWait!==void 0&&(o.maxDelay=e.reconnectMaxWait),o.numOfAttempts=e.noReconnect?1:e.reconnectMaxAttempts,this.currentRetryAttempt=0;const i=[],r=vI(e),c=r?2:1,l=n.abort||t?.abort===!0;if(r&&!l){const{dialer:u,error:h}=await this.tryWebRTCDial(e,n,o);if(!h)return u;i.push(h)}if(this.currentRetryAttempt=0,!(n.abort||t?.abort===!0)){const{dialer:u,error:h}=await this.tryDirectDial(e,n,o);if(!h)return u;i.push(h)}if(i.length===c)throw new Error("Failed to connect via all methods",{cause:i});return this}async disconnect(){for(ne("client_closed",{connectionId:this.connectionId}),this.emit(K.DISCONNECTING,{}),this.currentDialAbortSignal&&this.dialing&&(this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")}),this.resetDialing(this.dialing));this.connecting;)await this.connecting;this.cleanupEventListeners(),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),this.sessionManager.reset(),this.closed=!0,this.emit(K.DISCONNECTED,{})}isConnected(){return this.peerConn?.iceConnectionState==="connected"}async connect({creds:e=this.savedCreds,priority:n,dialTimeout:t,dialTimeoutMs:o,extraHeaders:i}={}){if(this.isReconnecting||this.emit(K.CONNECTING,{}),this.closed=!1,this.connecting){for(;this.connecting!==void 0;)await this.connecting;return}const r=Dn.UuidTool.newUuid();this.connecting=new Promise(c=>{this.connectResolve=c}),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),(!e||e!==this.savedCreds||this.sessionOptions.disabled)&&this.sessionManager.reset();try{ne("dial_started",{connectionId:r,method:this.webrtcOptions.enabled?"webrtc":"grpc",host:this.serviceHost,attempt:this.currentRetryAttempt});const c=new Headers(Bn);if(i)for(const[u,h]of Object.entries(i))if(u==="viam_client"&&c.has("viam_client")){const R=c.get("viam_client").replace("typescript;",`typescript(${h});`);c.set("viam_client",R)}else c.set(u,h);const l={webrtcOptions:{disableTrickleICE:!1,rtcConfig:this.webrtcOptions.rtcConfig,forceRelay:this.webrtcOptions.forceRelay,forceP2P:this.webrtcOptions.forceP2P,turnUri:this.webrtcOptions.turnUri,turnScheme:this.webrtcOptions.turnScheme,turnTransport:this.webrtcOptions.turnTransport,turnPort:this.webrtcOptions.turnPort,signalingInsecure:this.webrtcOptions.signalingInsecure},dialTimeoutMs:o??t??Ft,extraHeaders:c};if(e&&(Fn(e)?l.credentials=e:l.accessToken=e.payload),n!==void 0&&l.webrtcOptions&&(l.webrtcOptions.additionalSdpFields={"x-priority":n}),this.savedCreds=e,this.webrtcOptions.enabled){l.webrtcOptions&&(l.webrtcOptions.signalingCredentials=l.credentials);const u=this.webrtcOptions.signalingAddress||this.serviceHost,h=await x_(u,this.webrtcOptions.host,l,this.serviceHost!==""&&u!==this.serviceHost);this.peerConn=h.peerConnection,this.dataChannel=h.dataChannel,this.connectionId=r,this.cleanupEventListeners(),this.onICEConnectionStateChange=()=>{const I=this.peerConn?.iceConnectionState;I==="disconnected"&&ne("ice_disconnected",{connectionId:this.connectionId}),I==="closed"&&this.onDisconnect()},this.peerConn.addEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onDataChannelClose=I=>this.onDisconnect(I),this.dataChannel.addEventListener("close",this.onDataChannelClose),this.transport=Vr(h.transport,r),this.onTrack=I=>{const[R]=I.streams;if(!R)throw this.emit("track",I),new Error("expected event stream to exist");const O=R.id.replaceAll("+",":");Object.defineProperty(R,"id",{value:O}),this.emit("track",I)},this.peerConn.addEventListener("track",this.onTrack)}else this.connectionId=r,this.transport=Vr(await Ea(this.serviceHost,l),r),await this.gRPCConnectionManager.start();const d=this.sessionOptions.disabled?this.transport:this.sessionManager.transport;this.robotServiceClient=X(lo,d),ne("dial_success",{connectionId:r,method:this.webrtcOptions.enabled?"webrtc":"grpc",host:this.serviceHost}),this.emit(K.CONNECTED,{})}catch(c){throw ne("dial_failed",{connectionId:r,method:this.webrtcOptions.enabled?"webrtc":"grpc",host:this.serviceHost,error:c instanceof Error?c.message:String(c)}),this.isReconnecting||this.emit(K.DISCONNECTED,{}),c}finally{this.connectResolve?.(),this.connectResolve=void 0,this.connecting=void 0}}async getSessions(){return(await this.robotService.getSessions({})).sessions}async getOperations(){return(await this.robotService.getOperations({})).operations}async cancelOperation(e){await this.robotService.cancelOperation({id:e})}async blockForOperation(e){await this.robotService.blockForOperation({id:e})}async stopAll(){await this.robotService.stopAll({})}async frameSystemConfig(e){return(await this.robotService.frameSystemConfig({supplementalTransforms:e})).frameSystemConfigs}async transformPose(e,n,t,o){const i=new no({source:e,destination:n,supplementalTransforms:t}),c=(await this.robotService.transformPose(i,o)).pose;if(!c)throw new Error("no pose");return c}async transformPCD(e,n,t){const o=new ao({pointCloudPcd:e,source:n,destination:t});return(await this.robotService.transformPCD(o)).pointCloudPcd}async getModelsFromModules(){const e=new to({});return(await this.robotService.getModelsFromModules(e)).models}async getCloudMetadata(){return this.robotService.getCloudMetadata({})}async resourceNames(){return(await this.robotService.resourceNames({})).resources}async resourceRPCSubtypes(){return(await this.robotService.resourceRPCSubtypes({})).resourceRpcSubtypes}async getMachineStatus(){return this.robotService.getMachineStatus({})}async getVersion(){return this.robotService.getVersion({})}async restartModule(e,n){const t=new mo;e!==void 0&&(t.idOrName.case="moduleId",t.idOrName.value=e),n!==void 0&&(t.idOrName.case="moduleName",t.idOrName.value=n),await this.robotService.restartModule(t)}async getPose(e,n,t){const o=new co({componentName:e,destinationFrame:n,supplementalTransforms:t}),r=(await this.robotService.getPose(o)).pose;if(!r)throw new Error("no pose");return r}}const _g=async a=>{const e=await new Xe().dial(a);if(e.isConnected())return e;throw new Error("Failed to connect to robot")},Ya=s.makeEnum("viam.app.packages.v1.PackageType",[{no:0,name:"PACKAGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PACKAGE_TYPE_ARCHIVE",localName:"ARCHIVE"},{no:2,name:"PACKAGE_TYPE_ML_MODEL",localName:"ML_MODEL"},{no:3,name:"PACKAGE_TYPE_MODULE",localName:"MODULE"},{no:4,name:"PACKAGE_TYPE_SLAM_MAP",localName:"SLAM_MAP"},{no:5,name:"PACKAGE_TYPE_ML_TRAINING",localName:"ML_TRAINING"}]),Qe=s.makeEnum("viam.app.mltraining.v1.ModelType",[{no:0,name:"MODEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_TYPE_SINGLE_LABEL_CLASSIFICATION",localName:"SINGLE_LABEL_CLASSIFICATION"},{no:2,name:"MODEL_TYPE_MULTI_LABEL_CLASSIFICATION",localName:"MULTI_LABEL_CLASSIFICATION"},{no:3,name:"MODEL_TYPE_OBJECT_DETECTION",localName:"OBJECT_DETECTION"}]),rn=s.makeEnum("viam.app.mltraining.v1.ModelFramework",[{no:0,name:"MODEL_FRAMEWORK_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_FRAMEWORK_TFLITE",localName:"TFLITE"},{no:2,name:"MODEL_FRAMEWORK_TENSORFLOW",localName:"TENSORFLOW"},{no:3,name:"MODEL_FRAMEWORK_PYTORCH",localName:"PYTORCH"},{no:4,name:"MODEL_FRAMEWORK_ONNX",localName:"ONNX"}]),Wa=s.makeEnum("viam.app.mltraining.v1.TrainingStatus",[{no:0,name:"TRAINING_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRAINING_STATUS_PENDING",localName:"PENDING"},{no:2,name:"TRAINING_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"TRAINING_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"TRAINING_STATUS_FAILED",localName:"FAILED"},{no:5,name:"TRAINING_STATUS_CANCELED",localName:"CANCELED"},{no:6,name:"TRAINING_STATUS_CANCELING",localName:"CANCELING"}]),Sg=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobRequest",()=>[{no:7,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"model_name",kind:"scalar",T:9},{no:4,name:"model_version",kind:"scalar",T:9},{no:5,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:8,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:6,name:"tags",kind:"scalar",T:9,repeated:!0}]),Ig=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Og=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"registry_item_id",kind:"scalar",T:9},{no:6,name:"registry_item_version",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"model_name",kind:"scalar",T:9},{no:5,name:"model_version",kind:"scalar",T:9},{no:7,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:8,name:"container_version",kind:"scalar",T:9}]),bg=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Mg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Eg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobResponse",()=>[{no:1,name:"metadata",kind:"message",T:ei}]),wg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Wa)}]),Cg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsResponse",()=>[{no:1,name:"jobs",kind:"message",T:ei,repeated:!0}]),ei=s.makeMessageType("viam.app.mltraining.v1.TrainingJobMetadata",()=>[{no:7,name:"id",kind:"scalar",T:9},{no:11,name:"dataset_id",kind:"scalar",T:9},{no:12,name:"organization_id",kind:"scalar",T:9},{no:13,name:"model_name",kind:"scalar",T:9},{no:14,name:"model_version",kind:"scalar",T:9},{no:15,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:17,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:18,name:"is_custom_job",kind:"scalar",T:8},{no:19,name:"registry_item_id",kind:"scalar",T:9},{no:20,name:"registry_item_version",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Wa)},{no:8,name:"error_status",kind:"message",T:Tn},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"last_modified",kind:"message",T:_},{no:9,name:"training_started",kind:"message",T:_},{no:10,name:"training_ended",kind:"message",T:_},{no:5,name:"synced_model_id",kind:"scalar",T:9},{no:16,name:"tags",kind:"scalar",T:9,repeated:!0},{no:21,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:22,name:"container_version",kind:"scalar",T:9}]),Ng=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Pg=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobResponse",[]),Dg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ag=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobResponse",[]),Ug=s.makeMessageType("viam.app.mltraining.v1.TrainingJobLogEntry",()=>[{no:1,name:"level",kind:"scalar",T:9},{no:2,name:"time",kind:"message",T:_},{no:3,name:"message",kind:"scalar",T:9}]),qg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0}]),Lg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Ug,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Gg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersRequest",[]),Bg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersResponse",()=>[{no:1,name:"container_map",kind:"map",K:9,V:{kind:"message",T:Fg}}]),Fg=s.makeMessageType("viam.app.mltraining.v1.Container",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"uri",kind:"scalar",T:9},{no:3,name:"framework",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"eol",kind:"message",T:_}]),fI=Object.freeze(Object.defineProperty({__proto__:null,CancelTrainingJobRequest:Ng,CancelTrainingJobResponse:Pg,Container:Fg,DeleteCompletedTrainingJobRequest:Dg,DeleteCompletedTrainingJobResponse:Ag,GetTrainingJobLogsRequest:qg,GetTrainingJobLogsResponse:Lg,GetTrainingJobRequest:Mg,GetTrainingJobResponse:Eg,ListSupportedContainersRequest:Gg,ListSupportedContainersResponse:Bg,ListTrainingJobsRequest:wg,ListTrainingJobsResponse:Cg,ModelFramework:rn,ModelType:Qe,SubmitCustomTrainingJobRequest:Og,SubmitCustomTrainingJobResponse:bg,SubmitTrainingJobRequest:Sg,SubmitTrainingJobResponse:Ig,TrainingJobLogEntry:Ug,TrainingJobMetadata:ei,TrainingStatus:Wa},Symbol.toStringTag,{value:"Module"})),Ha=s.makeEnum("viam.app.v1.OnlineState",[{no:0,name:"ONLINE_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ONLINE_STATE_ONLINE",localName:"ONLINE"},{no:2,name:"ONLINE_STATE_OFFLINE",localName:"OFFLINE"},{no:3,name:"ONLINE_STATE_AWAITING_SETUP",localName:"AWAITING_SETUP"}]),xg=s.makeEnum("viam.app.v1.AuthenticationType",[{no:0,name:"AUTHENTICATION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"AUTHENTICATION_TYPE_WEB_OAUTH",localName:"WEB_OAUTH"},{no:2,name:"AUTHENTICATION_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"AUTHENTICATION_TYPE_ROBOT_PART_SECRET",localName:"ROBOT_PART_SECRET"},{no:4,name:"AUTHENTICATION_TYPE_LOCATION_SECRET",localName:"LOCATION_SECRET"}]),Vn=s.makeEnum("viam.app.v1.FragmentVisibility",[{no:0,name:"FRAGMENT_VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"FRAGMENT_VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"FRAGMENT_VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),Jg=s.makeEnum("viam.app.v1.FragmentErrorType",[{no:0,name:"FRAGMENT_ERROR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_ERROR_TYPE_NO_ACCESS",localName:"NO_ACCESS"},{no:2,name:"FRAGMENT_ERROR_TYPE_NESTING_LIMIT_EXCEEDED",localName:"NESTING_LIMIT_EXCEEDED"},{no:3,name:"FRAGMENT_ERROR_TYPE_CHILD_ID_INVALID",localName:"CHILD_ID_INVALID"},{no:4,name:"FRAGMENT_ERROR_TYPE_CYCLE_DETECTED",localName:"CYCLE_DETECTED"}]),ja=s.makeEnum("viam.app.v1.ModuleSourceType",[{no:0,name:"MODULE_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_SOURCE_TYPE_EXTERNAL",localName:"EXTERNAL"},{no:2,name:"MODULE_SOURCE_TYPE_VIAM_HOSTED",localName:"VIAM_HOSTED"}]),Ka=s.makeEnum("viam.app.v1.ModuleLanguage",[{no:0,name:"MODULE_LANGUAGE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_LANGUAGE_GOLANG",localName:"GOLANG"},{no:2,name:"MODULE_LANGUAGE_PYTHON",localName:"PYTHON"},{no:3,name:"MODULE_LANGUAGE_CPP",localName:"CPP"}]),zg=s.makeEnum("viam.app.v1.RegistryItemStatus",[{no:0,name:"REGISTRY_ITEM_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"REGISTRY_ITEM_STATUS_PUBLISHED",localName:"PUBLISHED"},{no:2,name:"REGISTRY_ITEM_STATUS_IN_DEVELOPMENT",localName:"IN_DEVELOPMENT"}]),hn=s.makeEnum("viam.app.v1.Visibility",[{no:0,name:"VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),Vg=s.makeEnum("viam.app.v1.AppType",[{no:0,name:"APP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"APP_TYPE_SINGLE_MACHINE",localName:"SINGLE_MACHINE"},{no:2,name:"APP_TYPE_MULTI_MACHINE",localName:"MULTI_MACHINE"}]),$g=s.makeEnum("viam.app.v1.ClientAuthentication",[{no:0,name:"CLIENT_AUTHENTICATION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CLIENT_AUTHENTICATION_REQUIRED",localName:"REQUIRED"},{no:2,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED",localName:"NOT_REQUIRED"},{no:3,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED_WHEN_USING_PKCE",localName:"NOT_REQUIRED_WHEN_USING_PKCE"}]),Yg=s.makeEnum("viam.app.v1.PKCE",[{no:0,name:"PKCE_UNSPECIFIED"},{no:1,name:"PKCE_REQUIRED"},{no:2,name:"PKCE_NOT_REQUIRED"},{no:3,name:"PKCE_NOT_REQUIRED_WHEN_USING_CLIENT_AUTHENTICATION"}]),Wg=s.makeEnum("viam.app.v1.URLValidation",[{no:0,name:"URL_VALIDATION_UNSPECIFIED"},{no:1,name:"URL_VALIDATION_EXACT_MATCH"},{no:2,name:"URL_VALIDATION_ALLOW_WILDCARDS"}]),Hg=s.makeEnum("viam.app.v1.EnabledGrant",[{no:0,name:"ENABLED_GRANT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ENABLED_GRANT_AUTHORIZATION_CODE",localName:"AUTHORIZATION_CODE"},{no:2,name:"ENABLED_GRANT_IMPLICIT",localName:"IMPLICIT"},{no:3,name:"ENABLED_GRANT_PASSWORD",localName:"PASSWORD"},{no:4,name:"ENABLED_GRANT_REFRESH_TOKEN",localName:"REFRESH_TOKEN"},{no:5,name:"ENABLED_GRANT_DEVICE_CODE",localName:"DEVICE_CODE"}]),fn=s.makeMessageType("viam.app.v1.Robot",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9},{no:4,name:"last_access",kind:"message",T:_},{no:5,name:"created_on",kind:"message",T:_},{no:6,name:"online_state",kind:"enum",T:s.getEnumType(Ha)},{no:7,name:"seconds_since_online",kind:"scalar",T:3}]),mn=s.makeMessageType("viam.app.v1.RobotPart",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:10,name:"dns_name",kind:"scalar",T:9},{no:3,name:"secret",kind:"scalar",T:9},{no:4,name:"robot",kind:"scalar",T:9},{no:12,name:"location_id",kind:"scalar",T:9},{no:5,name:"robot_config",kind:"message",T:p},{no:6,name:"last_access",kind:"message",T:_},{no:7,name:"user_supplied_info",kind:"message",T:p},{no:8,name:"main_part",kind:"scalar",T:8},{no:9,name:"fqdn",kind:"scalar",T:9},{no:11,name:"local_fqdn",kind:"scalar",T:9},{no:13,name:"created_on",kind:"message",T:_},{no:14,name:"secrets",kind:"message",T:si,repeated:!0},{no:15,name:"last_updated",kind:"message",T:_},{no:16,name:"online_state",kind:"enum",T:s.getEnumType(Ha)},{no:17,name:"seconds_since_online",kind:"scalar",T:3},{no:18,name:"robot_config_json",kind:"scalar",T:9,opt:!0}]),jg=s.makeMessageType("viam.app.v1.RobotPartHistoryEntry",()=>[{no:1,name:"part",kind:"scalar",T:9},{no:2,name:"robot",kind:"scalar",T:9},{no:3,name:"when",kind:"message",T:_},{no:4,name:"old",kind:"message",T:mn},{no:5,name:"edited_by",kind:"message",T:ni}]),ni=s.makeMessageType("viam.app.v1.AuthenticatorInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(xg)},{no:2,name:"value",kind:"scalar",T:9},{no:3,name:"is_deactivated",kind:"scalar",T:8}]),Kg=s.makeMessageType("viam.app.v1.ListOrganizationsRequest",[]),Rn=s.makeMessageType("viam.app.v1.Organization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"public_namespace",kind:"scalar",T:9},{no:5,name:"default_region",kind:"scalar",T:9},{no:6,name:"cid",kind:"scalar",T:9,opt:!0},{no:7,name:"default_fragments",kind:"message",T:ai,opt:!0}]),Xg=s.makeMessageType("viam.app.v1.OrganizationMember",()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"emails",kind:"scalar",T:9,repeated:!0},{no:3,name:"date_added",kind:"message",T:_},{no:4,name:"last_login",kind:"message",T:_,opt:!0},{no:5,name:"last_access",kind:"message",T:_,opt:!0}]),Qg=s.makeMessageType("viam.app.v1.ListOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:Rn,repeated:!0}]),$n=s.makeMessageType("viam.app.v1.OrganizationInvite",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"authorizations",kind:"message",T:ae,repeated:!0}]),Zg=s.makeMessageType("viam.app.v1.CreateOrganizationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),eT=s.makeMessageType("viam.app.v1.CreateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),nT=s.makeMessageType("viam.app.v1.GetOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),aT=s.makeMessageType("viam.app.v1.GetOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),tT=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),sT=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityResponse",()=>[{no:1,name:"available",kind:"scalar",T:8}]),ai=s.makeMessageType("viam.app.v1.FragmentImportList",()=>[{no:1,name:"fragments",kind:"message",T:Wk,repeated:!0}]),oT=s.makeMessageType("viam.app.v1.UpdateOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0},{no:5,name:"cid",kind:"scalar",T:9,opt:!0},{no:6,name:"default_fragments",kind:"message",T:ai,opt:!0}]),iT=s.makeMessageType("viam.app.v1.UpdateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),rT=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),mT=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),cT=s.makeMessageType("viam.app.v1.DeleteOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),lT=s.makeMessageType("viam.app.v1.DeleteOrganizationResponse",[]),dT=s.makeMessageType("viam.app.v1.GetOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),pT=s.makeMessageType("viam.app.v1.GetOrganizationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),uT=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),gT=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataResponse",[]),TT=s.makeMessageType("viam.app.v1.ListOrganizationMembersRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),kT=s.makeMessageType("viam.app.v1.ListOrganizationMembersResponse",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"members",kind:"message",T:Xg,repeated:!0},{no:3,name:"invites",kind:"message",T:$n,repeated:!0}]),yT=s.makeMessageType("viam.app.v1.CreateOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"authorizations",kind:"message",T:ae,repeated:!0},{no:4,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),vT=s.makeMessageType("viam.app.v1.CreateOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:$n}]),hT=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"add_authorizations",kind:"message",T:ae,repeated:!0},{no:4,name:"remove_authorizations",kind:"message",T:ae,repeated:!0}]),fT=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsResponse",()=>[{no:1,name:"invite",kind:"message",T:$n}]),RT=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),_T=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteResponse",[]),ST=s.makeMessageType("viam.app.v1.ResendOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),IT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:$n}]),OT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9}]),bT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberResponse",[]),Xa=s.makeMessageType("viam.app.v1.BillingAddress",()=>[{no:1,name:"address_line_1",kind:"scalar",T:9},{no:2,name:"address_line_2",kind:"scalar",T:9,opt:!0},{no:3,name:"city",kind:"scalar",T:9},{no:4,name:"state",kind:"scalar",T:9},{no:5,name:"zipcode",kind:"scalar",T:9},{no:6,name:"country",kind:"scalar",T:9}]),MT=s.makeMessageType("viam.app.v1.EnableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:Xa}]),ET=s.makeMessageType("viam.app.v1.EnableBillingServiceResponse",[]),wT=s.makeMessageType("viam.app.v1.UpdateBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:Xa}]),CT=s.makeMessageType("viam.app.v1.UpdateBillingServiceResponse",[]),NT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),PT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigResponse",()=>[{no:1,name:"billing_address",kind:"message",T:Xa},{no:2,name:"support_email",kind:"scalar",T:9},{no:3,name:"logo_url",kind:"scalar",T:9},{no:4,name:"billing_dashboard_url",kind:"scalar",T:9}]),DT=s.makeMessageType("viam.app.v1.DisableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),AT=s.makeMessageType("viam.app.v1.DisableBillingServiceResponse",[]),UT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),qT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailResponse",[]),LT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),GT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailResponse",()=>[{no:1,name:"email",kind:"scalar",T:9}]),ti=s.makeMessageType("viam.app.v1.OrganizationIdentity",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),BT=s.makeMessageType("viam.app.v1.LocationOrganization",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"primary",kind:"scalar",T:8}]),Qa=s.makeMessageType("viam.app.v1.LocationAuth",()=>[{no:1,name:"secret",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"secrets",kind:"message",T:si,repeated:!0}]),FT=s.makeMessageType("viam.app.v1.StorageConfig",()=>[{no:1,name:"region",kind:"scalar",T:9}]),Yn=s.makeMessageType("viam.app.v1.Location",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:4,name:"parent_location_id",kind:"scalar",T:9},{no:5,name:"auth",kind:"message",T:Qa},{no:6,name:"organizations",kind:"message",T:BT,repeated:!0},{no:3,name:"created_on",kind:"message",T:_},{no:7,name:"robot_count",kind:"scalar",T:5},{no:8,name:"config",kind:"message",T:FT},{no:9,name:"primary_org_identity",kind:"message",T:ti,opt:!0}]),si=s.makeMessageType("viam.app.v1.SharedSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"state",kind:"enum",T:s.getEnumType(xT)}]),xT=s.makeEnum("viam.app.v1.SharedSecret.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_ENABLED",localName:"ENABLED"},{no:2,name:"STATE_DISABLED",localName:"DISABLED"}]),JT=s.makeMessageType("viam.app.v1.CreateLocationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0}]),zT=s.makeMessageType("viam.app.v1.CreateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Yn}]),VT=s.makeMessageType("viam.app.v1.GetLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),$T=s.makeMessageType("viam.app.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Yn}]),YT=s.makeMessageType("viam.app.v1.UpdateLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0}]),WT=s.makeMessageType("viam.app.v1.UpdateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Yn}]),HT=s.makeMessageType("viam.app.v1.DeleteLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),jT=s.makeMessageType("viam.app.v1.DeleteLocationResponse",[]),KT=s.makeMessageType("viam.app.v1.GetLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),XT=s.makeMessageType("viam.app.v1.GetLocationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),QT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),ZT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataResponse",[]),ek=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),nk=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationResponse",()=>[{no:1,name:"organization_identities",kind:"message",T:ti,repeated:!0}]),ak=s.makeMessageType("viam.app.v1.ListLocationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),tk=s.makeMessageType("viam.app.v1.ShareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),sk=s.makeMessageType("viam.app.v1.ShareLocationResponse",[]),ok=s.makeMessageType("viam.app.v1.UnshareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),ik=s.makeMessageType("viam.app.v1.UnshareLocationResponse",[]),rk=s.makeMessageType("viam.app.v1.ListLocationsResponse",()=>[{no:1,name:"locations",kind:"message",T:Yn,repeated:!0}]),mk=s.makeMessageType("viam.app.v1.CreateLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),ck=s.makeMessageType("viam.app.v1.CreateLocationSecretResponse",()=>[{no:1,name:"auth",kind:"message",T:Qa}]),lk=s.makeMessageType("viam.app.v1.DeleteLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),dk=s.makeMessageType("viam.app.v1.DeleteLocationSecretResponse",[]),pk=s.makeMessageType("viam.app.v1.LocationAuthRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),uk=s.makeMessageType("viam.app.v1.LocationAuthResponse",()=>[{no:1,name:"auth",kind:"message",T:Qa}]),gk=s.makeMessageType("viam.app.v1.GetRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Tk=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),kk=s.makeMessageType("viam.app.v1.RoverRentalRobot",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_main_part_id",kind:"scalar",T:9}]),yk=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:kk,repeated:!0}]),vk=s.makeMessageType("viam.app.v1.GetRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:fn}]),hk=s.makeMessageType("viam.app.v1.GetRobotPartsRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),fk=s.makeMessageType("viam.app.v1.GetRobotPartsResponse",()=>[{no:1,name:"parts",kind:"message",T:mn,repeated:!0}]),Rk=s.makeMessageType("viam.app.v1.GetRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),_k=s.makeMessageType("viam.app.v1.GetRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:mn},{no:2,name:"config_json",kind:"scalar",T:9}]),Sk=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9}]),Ik=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationResponse",()=>[{no:1,name:"part",kind:"message",T:mn}]),Ok=s.makeMessageType("viam.app.v1.GetRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0},{no:4,name:"page_token",kind:"scalar",T:9,opt:!0},{no:5,name:"levels",kind:"scalar",T:9,repeated:!0},{no:6,name:"start",kind:"message",T:_,opt:!0},{no:7,name:"end",kind:"message",T:_,opt:!0},{no:8,name:"limit",kind:"scalar",T:3,opt:!0},{no:9,name:"source",kind:"scalar",T:9,opt:!0},{no:10,name:"user_facing_only",kind:"scalar",T:8,opt:!0}]),bk=s.makeMessageType("viam.app.v1.GetRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Ln,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Mk=s.makeMessageType("viam.app.v1.TailRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0}]),Ek=s.makeMessageType("viam.app.v1.TailRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Ln,repeated:!0}]),wk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0},{no:4,name:"start",kind:"message",T:_,opt:!0},{no:5,name:"end",kind:"message",T:_,opt:!0}]),Ck=s.makeMessageType("viam.app.v1.GetRobotPartHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:jg,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Nk=s.makeMessageType("viam.app.v1.UpdateRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"robot_config",kind:"message",T:p},{no:4,name:"last_known_update",kind:"message",T:_,opt:!0},{no:5,name:"robot_config_json",kind:"scalar",T:9,opt:!0}]),Pk=s.makeMessageType("viam.app.v1.UpdateRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:mn}]),Dk=s.makeMessageType("viam.app.v1.NewRobotPartRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9}]),Ak=s.makeMessageType("viam.app.v1.NewRobotPartResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Uk=s.makeMessageType("viam.app.v1.DeleteRobotPartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),qk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Lk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),Gk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),Bk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataResponse",[]),Fk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),xk=s.makeMessageType("viam.app.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"created_on",kind:"message",T:_}]),Jk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:pi,repeated:!0}]),zk=s.makeMessageType("viam.app.v1.DeleteRobotPartResponse",[]),Ze=s.makeMessageType("viam.app.v1.Fragment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"fragment",kind:"message",T:p},{no:4,name:"organization_owner",kind:"scalar",T:9},{no:5,name:"public",kind:"scalar",T:8},{no:6,name:"created_on",kind:"message",T:_},{no:7,name:"organization_name",kind:"scalar",T:9},{no:9,name:"robot_part_count",kind:"scalar",T:5},{no:10,name:"organization_count",kind:"scalar",T:5},{no:11,name:"only_used_by_owner",kind:"scalar",T:8},{no:12,name:"visibility",kind:"enum",T:s.getEnumType(Vn)},{no:13,name:"last_updated",kind:"message",T:_},{no:14,name:"revision",kind:"scalar",T:9}]),Vk=s.makeMessageType("viam.app.v1.FragmentHistoryEntry",()=>[{no:1,name:"fragment",kind:"scalar",T:9},{no:2,name:"edited_on",kind:"message",T:_},{no:3,name:"old",kind:"message",T:Ze},{no:4,name:"edited_by",kind:"message",T:ni},{no:5,name:"revision",kind:"scalar",T:9},{no:6,name:"config",kind:"message",T:p}]),$k=s.makeMessageType("viam.app.v1.FragmentRevision",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"created_at",kind:"message",T:_}]),Za=s.makeMessageType("viam.app.v1.FragmentTag",()=>[{no:1,name:"tag",kind:"scalar",T:9},{no:2,name:"revision",kind:"scalar",T:9}]),Yk=s.makeMessageType("viam.app.v1.FragmentError",()=>[{no:1,name:"error_type",kind:"enum",T:s.getEnumType(Jg)},{no:2,name:"fragment_id",kind:"scalar",T:9},{no:3,name:"detail",kind:"scalar",T:9}]),et=s.makeMessageType("viam.app.v1.FragmentUsage",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"organizations",kind:"scalar",T:5},{no:3,name:"machines",kind:"scalar",T:5},{no:4,name:"machines_in_current_org",kind:"scalar",T:5},{no:5,name:"version",kind:"scalar",T:9,opt:!0}]),Wk=s.makeMessageType("viam.app.v1.FragmentImport",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"prefix",kind:"scalar",T:9,opt:!0},{no:4,name:"variables",kind:"map",K:9,V:{kind:"scalar",T:9}}]),oi=s.makeMessageType("viam.app.v1.ResolvedFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"resolved_config",kind:"message",T:p},{no:3,name:"error",kind:"message",T:Yk},{no:4,name:"revision",kind:"scalar",T:9}]),Hk=s.makeMessageType("viam.app.v1.ListFragmentsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"show_public",kind:"scalar",T:8},{no:3,name:"fragment_visibility",kind:"enum",T:s.getEnumType(Vn),repeated:!0}]),jk=s.makeMessageType("viam.app.v1.ListFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Ze,repeated:!0},{no:2,name:"fragment_usages",kind:"message",T:et,repeated:!0}]),Kk=s.makeMessageType("viam.app.v1.GetFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"current_organization_id",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9,opt:!0}]),Xk=s.makeMessageType("viam.app.v1.GetFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Ze},{no:2,name:"fragment_usage",kind:"message",T:et},{no:3,name:"revisions",kind:"message",T:$k,repeated:!0},{no:4,name:"tags",kind:"message",T:Za,repeated:!0}]),Qk=s.makeMessageType("viam.app.v1.CreateFragmentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"config",kind:"message",T:p},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(Vn),opt:!0}]),Zk=s.makeMessageType("viam.app.v1.CreateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Ze}]),ey=s.makeMessageType("viam.app.v1.UpdateFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"config",kind:"message",T:p},{no:4,name:"public",kind:"scalar",T:8,opt:!0},{no:5,name:"visibility",kind:"enum",T:s.getEnumType(Vn),opt:!0},{no:6,name:"last_known_update",kind:"message",T:_,opt:!0}]),ny=s.makeMessageType("viam.app.v1.UpdateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Ze}]),ay=s.makeMessageType("viam.app.v1.DeleteFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ty=s.makeMessageType("viam.app.v1.DeleteFragmentResponse",[]),sy=s.makeMessageType("viam.app.v1.GetFragmentHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0}]),oy=s.makeMessageType("viam.app.v1.GetFragmentHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:Vk,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),iy=s.makeMessageType("viam.app.v1.GetFragmentUsageRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9}]),ry=s.makeMessageType("viam.app.v1.GetFragmentUsageResponse",()=>[{no:1,name:"version_usages",kind:"message",T:et,repeated:!0}]),my=s.makeMessageType("viam.app.v1.SetFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9},{no:3,name:"revision",kind:"scalar",T:9}]),cy=s.makeMessageType("viam.app.v1.SetFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:Za,repeated:!0}]),ly=s.makeMessageType("viam.app.v1.DeleteFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9}]),dy=s.makeMessageType("viam.app.v1.DeleteFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:Za,repeated:!0}]),py=s.makeMessageType("viam.app.v1.ListRobotsRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),uy=s.makeMessageType("viam.app.v1.ListRobotsForLocationsRequest",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0}]),gy=s.makeMessageType("viam.app.v1.ListRobotsForOrgRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),ii=s.makeMessageType("viam.app.v1.AdditionalFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9,opt:!0}]),Ty=s.makeMessageType("viam.app.v1.ListNestedFragmentsRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9,opt:!0},{no:2,name:"additional_fragments",kind:"message",T:ii,repeated:!0}]),ky=s.makeMessageType("viam.app.v1.ListNestedFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Ze,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:oi,repeated:!0}]),yy=s.makeMessageType("viam.app.v1.ListMachineFragmentsRequest",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"additional_fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"additional_fragments",kind:"message",T:ii,repeated:!0}]),vy=s.makeMessageType("viam.app.v1.ListMachineFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Ze,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:oi,repeated:!0}]),ri=s.makeMessageType("viam.app.v1.ListMachineSummariesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"limit",kind:"scalar",T:5,opt:!0}]),hy=s.makeMessageType("viam.app.v1.ListMachineSummariesResponse",()=>[{no:1,name:"location_summaries",kind:"message",T:fy,repeated:!0}]),fy=s.makeMessageType("viam.app.v1.LocationSummary",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"location_name",kind:"scalar",T:9},{no:3,name:"machine_summaries",kind:"message",T:Ry,repeated:!0}]),Ry=s.makeMessageType("viam.app.v1.MachineSummary",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"machine_name",kind:"scalar",T:9},{no:3,name:"part_summaries",kind:"message",T:Oy,repeated:!0}]),_y=s.makeMessageType("viam.app.v1.FragmentSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9}]),Sy=s.makeMessageType("viam.app.v1.ViamServerVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),Iy=s.makeMessageType("viam.app.v1.ViamAgentVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),Oy=s.makeMessageType("viam.app.v1.PartSummary",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9},{no:11,name:"is_main_part",kind:"scalar",T:8},{no:12,name:"online_state",kind:"enum",T:s.getEnumType(Ha)},{no:13,name:"seconds_since_online",kind:"scalar",T:3},{no:14,name:"last_access",kind:"message",T:_,opt:!0},{no:3,name:"last_online",kind:"message",T:_,opt:!0},{no:4,name:"viam_server_version",kind:"message",T:Sy,opt:!0},{no:5,name:"viam_agent_version",kind:"message",T:Iy,opt:!0},{no:6,name:"os",kind:"scalar",T:9,opt:!0},{no:7,name:"platform",kind:"scalar",T:9,opt:!0},{no:8,name:"public_ip_address",kind:"scalar",T:9,opt:!0},{no:10,name:"dns_name",kind:"scalar",T:9,opt:!0},{no:9,name:"fragments",kind:"message",T:_y,repeated:!0}]),by=s.makeMessageType("viam.app.v1.ListRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:fn,repeated:!0}]),My=s.makeMessageType("viam.app.v1.ListRobotsForLocationsResponse",()=>[{no:1,name:"robots",kind:"message",T:fn,repeated:!0}]),Ey=s.makeMessageType("viam.app.v1.ListRobotsForOrgResponse",()=>[{no:1,name:"robots",kind:"message",T:fn,repeated:!0}]),wy=s.makeMessageType("viam.app.v1.NewRobotRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"scalar",T:9}]),Cy=s.makeMessageType("viam.app.v1.NewRobotResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ny=s.makeMessageType("viam.app.v1.UpdateRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9}]),Py=s.makeMessageType("viam.app.v1.UpdateRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:fn}]),Dy=s.makeMessageType("viam.app.v1.DeleteRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ay=s.makeMessageType("viam.app.v1.DeleteRobotResponse",[]),Uy=s.makeMessageType("viam.app.v1.GetRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),qy=s.makeMessageType("viam.app.v1.GetRobotMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),Ly=s.makeMessageType("viam.app.v1.UpdateRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),Gy=s.makeMessageType("viam.app.v1.UpdateRobotMetadataResponse",[]),By=s.makeMessageType("viam.app.v1.MarkPartAsMainRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Fy=s.makeMessageType("viam.app.v1.MarkPartAsMainResponse",[]),xy=s.makeMessageType("viam.app.v1.MarkPartForRestartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Jy=s.makeMessageType("viam.app.v1.MarkPartForRestartResponse",[]),zy=s.makeMessageType("viam.app.v1.CreateRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Vy=s.makeMessageType("viam.app.v1.CreateRobotPartSecretResponse",()=>[{no:1,name:"part",kind:"message",T:mn}]),$y=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),Yy=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretResponse",[]),ae=s.makeMessageType("viam.app.v1.Authorization",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"identity_id",kind:"scalar",T:9},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"identity_type",kind:"scalar",T:9}]),Wy=s.makeMessageType("viam.app.v1.AddRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:ae}]),Hy=s.makeMessageType("viam.app.v1.AddRoleResponse",[]),jy=s.makeMessageType("viam.app.v1.RemoveRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:ae}]),Ky=s.makeMessageType("viam.app.v1.RemoveRoleResponse",[]),Xy=s.makeMessageType("viam.app.v1.ChangeRoleRequest",()=>[{no:1,name:"old_authorization",kind:"message",T:ae},{no:2,name:"new_authorization",kind:"message",T:ae}]),Qy=s.makeMessageType("viam.app.v1.ChangeRoleResponse",[]),Zy=s.makeMessageType("viam.app.v1.ListAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"resource_ids",kind:"scalar",T:9,repeated:!0}]),ev=s.makeMessageType("viam.app.v1.ListAuthorizationsResponse",()=>[{no:1,name:"authorizations",kind:"message",T:ae,repeated:!0}]),nv=s.makeMessageType("viam.app.v1.CheckPermissionsRequest",()=>[{no:1,name:"permissions",kind:"message",T:mi,repeated:!0}]),mi=s.makeMessageType("viam.app.v1.AuthorizedPermissions",()=>[{no:1,name:"resource_type",kind:"scalar",T:9},{no:2,name:"resource_id",kind:"scalar",T:9},{no:3,name:"permissions",kind:"scalar",T:9,repeated:!0}]),av=s.makeMessageType("viam.app.v1.CheckPermissionsResponse",()=>[{no:1,name:"authorized_permissions",kind:"message",T:mi,repeated:!0}]),tv=s.makeMessageType("viam.app.v1.ModuleVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:li,repeated:!0},{no:3,name:"models",kind:"message",T:ln,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:cn,repeated:!0}]),sv=s.makeMessageType("viam.app.v1.ModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:ln,repeated:!0},{no:2,name:"versions",kind:"message",T:tv,repeated:!0},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"first_run",kind:"scalar",T:9,opt:!0},{no:5,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:6,name:"apps",kind:"message",T:cn,repeated:!0},{no:7,name:"source_type",kind:"enum",T:s.getEnumType(ja),opt:!0},{no:8,name:"language",kind:"enum",T:s.getEnumType(Ka),opt:!0}]),ov=s.makeMessageType("viam.app.v1.MLModelVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:_}]),iv=s.makeMessageType("viam.app.v1.MLModelMetadata",()=>[{no:1,name:"versions",kind:"scalar",T:9,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:4,name:"detailed_versions",kind:"message",T:ov,repeated:!0}]),rv=s.makeMessageType("viam.app.v1.MLTrainingVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:_}]),mv=s.makeMessageType("viam.app.v1.MLTrainingMetadata",()=>[{no:5,name:"versions",kind:"message",T:rv,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:4,name:"draft",kind:"scalar",T:8}]),nt=s.makeMessageType("viam.app.v1.RegistryItem",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"public_namespace",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"enum",T:s.getEnumType(Ya)},{no:6,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:7,name:"url",kind:"scalar",T:9},{no:8,name:"description",kind:"scalar",T:9},{no:9,name:"total_robot_usage",kind:"scalar",T:3},{no:13,name:"total_external_robot_usage",kind:"scalar",T:3},{no:10,name:"total_organization_usage",kind:"scalar",T:3},{no:14,name:"total_external_organization_usage",kind:"scalar",T:3},{no:11,name:"module_metadata",kind:"message",T:sv,oneof:"metadata"},{no:12,name:"ml_model_metadata",kind:"message",T:iv,oneof:"metadata"},{no:18,name:"ml_training_metadata",kind:"message",T:mv,oneof:"metadata"},{no:15,name:"created_at",kind:"message",T:_},{no:16,name:"updated_at",kind:"message",T:_}]),cv=s.makeMessageType("viam.app.v1.GetRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),lv=s.makeMessageType("viam.app.v1.GetRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:nt}]),dv=s.makeMessageType("viam.app.v1.CreateRegistryItemRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:s.getEnumType(Ya)}]),pv=s.makeMessageType("viam.app.v1.CreateRegistryItemResponse",[]),uv=s.makeMessageType("viam.app.v1.UpdateRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(Ya)},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:5,name:"url",kind:"scalar",T:9,opt:!0},{no:6,name:"update_module_metadata",kind:"message",T:Ev,oneof:"metadata"},{no:7,name:"update_ml_model_metadata",kind:"message",T:wv,oneof:"metadata"},{no:8,name:"update_ml_training_metadata",kind:"message",T:Cv,oneof:"metadata"},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),gv=s.makeMessageType("viam.app.v1.UpdateRegistryItemResponse",[]),Tv=s.makeMessageType("viam.app.v1.ListRegistryItemsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"types",kind:"enum",T:s.getEnumType(Ya),repeated:!0},{no:3,name:"visibilities",kind:"enum",T:s.getEnumType(hn),repeated:!0},{no:4,name:"platforms",kind:"scalar",T:9,repeated:!0},{no:5,name:"statuses",kind:"enum",T:s.getEnumType(zg),repeated:!0},{no:6,name:"search_term",kind:"scalar",T:9,opt:!0},{no:7,name:"page_token",kind:"scalar",T:9,opt:!0},{no:8,name:"public_namespaces",kind:"scalar",T:9,repeated:!0},{no:9,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0},{no:10,name:"module_source_types",kind:"enum",T:s.getEnumType(ja),repeated:!0},{no:11,name:"module_languages",kind:"enum",T:s.getEnumType(Ka),repeated:!0}]),kv=s.makeMessageType("viam.app.v1.ListRegistryItemsResponse",()=>[{no:1,name:"items",kind:"message",T:nt,repeated:!0}]),yv=s.makeMessageType("viam.app.v1.DeleteRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9}]),vv=s.makeMessageType("viam.app.v1.DeleteRegistryItemResponse",[]),hv=s.makeMessageType("viam.app.v1.RenameRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_name",kind:"scalar",T:9}]),fv=s.makeMessageType("viam.app.v1.RenameRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:nt}]),Rv=s.makeMessageType("viam.app.v1.TransferRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),_v=s.makeMessageType("viam.app.v1.TransferRegistryItemResponse",[]),Sv=s.makeMessageType("viam.app.v1.CreateModuleRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Iv=s.makeMessageType("viam.app.v1.CreateModuleResponse",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),Ov=s.makeMessageType("viam.app.v1.UpdateModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:3,name:"url",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"models",kind:"message",T:ln,repeated:!0},{no:6,name:"entrypoint",kind:"scalar",T:9},{no:7,name:"first_run",kind:"scalar",T:9,opt:!0},{no:8,name:"apps",kind:"message",T:cn,repeated:!0},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),bv=s.makeMessageType("viam.app.v1.AllowedOrgIDs",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),cn=s.makeMessageType("viam.app.v1.App",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:6,name:"customizations",kind:"message",T:wh},{no:7,name:"allowed_org_ids",kind:"message",T:bv,opt:!0}]),Mv=s.makeMessageType("viam.app.v1.UpdateModuleResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),Ev=s.makeMessageType("viam.app.v1.UpdateModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:ln,repeated:!0},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"apps",kind:"message",T:cn,repeated:!0},{no:4,name:"source_type",kind:"enum",T:s.getEnumType(ja),opt:!0},{no:5,name:"language",kind:"enum",T:s.getEnumType(Ka),opt:!0}]),wv=s.makeMessageType("viam.app.v1.UpdateMLModelMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(rn)}]),Cv=s.makeMessageType("viam.app.v1.UpdateMLTrainingMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:3,name:"draft",kind:"scalar",T:8}]),ln=s.makeMessageType("viam.app.v1.Model",()=>[{no:1,name:"api",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"markdown_documentation",kind:"scalar",T:9,opt:!0},{no:4,name:"description",kind:"scalar",T:9,opt:!0},{no:5,name:"supported_hardware",kind:"scalar",T:9,repeated:!0}]),Nv=s.makeMessageType("viam.app.v1.ModuleFileInfo",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"platform",kind:"scalar",T:9},{no:5,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),Pv=s.makeMessageType("viam.app.v1.UploadModuleFileRequest",()=>[{no:1,name:"module_file_info",kind:"message",T:Nv,oneof:"module_file"},{no:2,name:"file",kind:"scalar",T:12,oneof:"module_file"}]),Dv=s.makeMessageType("viam.app.v1.UploadModuleFileResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),Av=s.makeMessageType("viam.app.v1.GetModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),Uv=s.makeMessageType("viam.app.v1.GetModuleResponse",()=>[{no:1,name:"module",kind:"message",T:ci}]),ci=s.makeMessageType("viam.app.v1.Module",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:4,name:"versions",kind:"message",T:qv,repeated:!0},{no:5,name:"url",kind:"scalar",T:9},{no:6,name:"description",kind:"scalar",T:9},{no:7,name:"models",kind:"message",T:ln,repeated:!0},{no:8,name:"total_robot_usage",kind:"scalar",T:3},{no:9,name:"total_organization_usage",kind:"scalar",T:3},{no:10,name:"organization_id",kind:"scalar",T:9},{no:11,name:"entrypoint",kind:"scalar",T:9},{no:12,name:"public_namespace",kind:"scalar",T:9},{no:13,name:"first_run",kind:"scalar",T:9,opt:!0},{no:14,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:15,name:"apps",kind:"message",T:cn,repeated:!0}]),qv=s.makeMessageType("viam.app.v1.VersionHistory",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:li,repeated:!0},{no:3,name:"models",kind:"message",T:ln,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:cn,repeated:!0}]),li=s.makeMessageType("viam.app.v1.Uploads",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"uploaded_at",kind:"message",T:_}]),Lv=s.makeMessageType("viam.app.v1.ListModulesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),Gv=s.makeMessageType("viam.app.v1.ListModulesResponse",()=>[{no:1,name:"modules",kind:"message",T:ci,repeated:!0}]),Bv=s.makeMessageType("viam.app.v1.GetUserIDByEmailRequest",()=>[{no:1,name:"email",kind:"scalar",T:9}]),Fv=s.makeMessageType("viam.app.v1.GetUserIDByEmailResponse",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),xv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserRequest",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),di=s.makeMessageType("viam.app.v1.OrgDetails",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"org_name",kind:"scalar",T:9},{no:3,name:"org_cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:5,name:"billing_tier",kind:"scalar",T:9,opt:!0}]),Jv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserResponse",()=>[{no:1,name:"orgs",kind:"message",T:di,repeated:!0}]),zv=s.makeMessageType("viam.app.v1.SearchOrganizationsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9,opt:!0},{no:2,name:"org_name",kind:"scalar",T:9,opt:!0},{no:3,name:"cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0}]),Vv=s.makeMessageType("viam.app.v1.SearchOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:di,repeated:!0}]),$v=s.makeMessageType("viam.app.v1.CreateKeyRequest",()=>[{no:1,name:"authorizations",kind:"message",T:ae,repeated:!0},{no:2,name:"name",kind:"scalar",T:9}]),Yv=s.makeMessageType("viam.app.v1.CreateKeyResponse",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9}]),Wv=s.makeMessageType("viam.app.v1.DeleteKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Hv=s.makeMessageType("viam.app.v1.DeleteKeyResponse",[]),jv=s.makeMessageType("viam.app.v1.RenameKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Kv=s.makeMessageType("viam.app.v1.RenameKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Xv=s.makeMessageType("viam.app.v1.AuthorizationDetails",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"org_id",kind:"scalar",T:9}]),pi=s.makeMessageType("viam.app.v1.APIKeyWithAuthorizations",()=>[{no:1,name:"api_key",kind:"message",T:xk},{no:2,name:"authorizations",kind:"message",T:Xv,repeated:!0}]),Qv=s.makeMessageType("viam.app.v1.ListKeysRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Zv=s.makeMessageType("viam.app.v1.ListKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:pi,repeated:!0}]),eh=s.makeMessageType("viam.app.v1.RotateKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),nh=s.makeMessageType("viam.app.v1.RotateKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),ah=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),th=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),sh=s.makeMessageType("viam.app.v1.GetAppContentRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),oh=s.makeMessageType("viam.app.v1.GetAppContentResponse",()=>[{no:1,name:"blob_path",kind:"scalar",T:9},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"app_type",kind:"enum",T:s.getEnumType(Vg)},{no:4,name:"public",kind:"scalar",T:8}]),ih=s.makeMessageType("viam.app.v1.OrganizationSetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"logo",kind:"scalar",T:12}]),rh=s.makeMessageType("viam.app.v1.OrganizationSetLogoResponse",[]),mh=s.makeMessageType("viam.app.v1.OrganizationGetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),ch=s.makeMessageType("viam.app.v1.OrganizationGetLogoResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),lh=s.makeMessageType("viam.app.v1.EnableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),dh=s.makeMessageType("viam.app.v1.EnableAuthServiceResponse",[]),ph=s.makeMessageType("viam.app.v1.DisableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),uh=s.makeMessageType("viam.app.v1.DisableAuthServiceResponse",[]),gh=s.makeMessageType("viam.app.v1.CreateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_name",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:at}]),Th=s.makeMessageType("viam.app.v1.CreateOAuthAppResponse",()=>[{no:1,name:"client_id",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9}]),kh=s.makeMessageType("viam.app.v1.ReadOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),yh=s.makeMessageType("viam.app.v1.ReadOAuthAppResponse",()=>[{no:1,name:"client_name",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:at}]),vh=s.makeMessageType("viam.app.v1.UpdateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9},{no:3,name:"client_name",kind:"scalar",T:9},{no:4,name:"oauth_config",kind:"message",T:at}]),hh=s.makeMessageType("viam.app.v1.UpdateOAuthAppResponse",[]),fh=s.makeMessageType("viam.app.v1.DeleteOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),Rh=s.makeMessageType("viam.app.v1.DeleteOAuthAppResponse",[]),_h=s.makeMessageType("viam.app.v1.ListOAuthAppsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Sh=s.makeMessageType("viam.app.v1.ListOAuthAppsResponse",()=>[{no:1,name:"client_ids",kind:"scalar",T:9,repeated:!0}]),Ih=s.makeMessageType("viam.app.v1.CreateOAuthAppUserRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"application_id",kind:"scalar",T:9},{no:3,name:"email",kind:"scalar",T:9},{no:4,name:"first_name",kind:"scalar",T:9},{no:5,name:"last_name",kind:"scalar",T:9},{no:6,name:"password",kind:"scalar",T:9}]),Oh=s.makeMessageType("viam.app.v1.CreateOAuthAppUserResponse",()=>[{no:1,name:"auth_token",kind:"scalar",T:9},{no:2,name:"registration_id",kind:"scalar",T:9},{no:3,name:"user_id",kind:"scalar",T:9},{no:4,name:"refresh_token",kind:"scalar",T:9}]),at=s.makeMessageType("viam.app.v1.OAuthConfig",()=>[{no:1,name:"client_authentication",kind:"enum",T:s.getEnumType($g)},{no:2,name:"pkce",kind:"enum",T:s.getEnumType(Yg)},{no:3,name:"url_validation",kind:"enum",T:s.getEnumType(Wg)},{no:4,name:"origin_uris",kind:"scalar",T:9,repeated:!0},{no:5,name:"redirect_uris",kind:"scalar",T:9,repeated:!0},{no:6,name:"logout_uri",kind:"scalar",T:9},{no:7,name:"enabled_grants",kind:"enum",T:s.getEnumType(Hg),repeated:!0},{no:8,name:"invite_redirect_uri",kind:"scalar",T:9}]),bh=s.makeMessageType("viam.app.v1.GetAppBrandingRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Mh=s.makeMessageType("viam.app.v1.TextOverrides",()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"scalar",T:9}}]),Eh=s.makeMessageType("viam.app.v1.GetAppBrandingResponse",()=>[{no:1,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:2,name:"text_customizations",kind:"map",K:9,V:{kind:"message",T:Mh}},{no:3,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"allowed_org_ids",kind:"scalar",T:9,repeated:!0}]),wh=s.makeMessageType("viam.app.v1.AppCustomizations",()=>[{no:1,name:"machine_picker",kind:"message",T:Ch}]),Ch=s.makeMessageType("viam.app.v1.MachinePickerCustomizations",()=>[{no:1,name:"heading",kind:"scalar",T:9,opt:!0},{no:2,name:"subheading",kind:"scalar",T:9,opt:!0}]),Nh=s.makeMessageType("viam.app.v1.UploadDevicePushTokenRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9},{no:2,name:"device_token",kind:"scalar",T:9},{no:3,name:"device_uuid",kind:"scalar",T:9}]),Ph=s.makeMessageType("viam.app.v1.UploadDevicePushTokenResponse",[]),Dh=s.makeMessageType("viam.app.v1.DeleteDevicePushTokenRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9},{no:2,name:"device_uuid",kind:"scalar",T:9}]),Ah=s.makeMessageType("viam.app.v1.DeleteDevicePushTokenResponse",[]),Uh=s.makeMessageType("viam.app.v1.GetDevicePushTokensRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9}]),qh=s.makeMessageType("viam.app.v1.GetDevicePushTokensResponse",()=>[{no:1,name:"device_tokens",kind:"scalar",T:9,repeated:!0}]),Lh=s.makeMessageType("viam.app.v1.SetFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"app_id",kind:"scalar",T:9},{no:3,name:"config_json",kind:"scalar",T:9}]),Gh=s.makeMessageType("viam.app.v1.SetFirebaseConfigResponse",[]),Bh=s.makeMessageType("viam.app.v1.GetFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Fh=s.makeMessageType("viam.app.v1.GetFirebaseConfigResponse",()=>[{no:1,name:"app_id",kind:"scalar",T:9}]),xh=s.makeMessageType("viam.app.v1.DeleteFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"app_id",kind:"scalar",T:9}]),Jh=s.makeMessageType("viam.app.v1.DeleteFirebaseConfigResponse",[]),RI=Object.freeze(Object.defineProperty({__proto__:null,APIKey:xk,APIKeyWithAuthorizations:pi,AddRoleRequest:Wy,AddRoleResponse:Hy,AdditionalFragment:ii,AllowedOrgIDs:bv,App:cn,AppCustomizations:wh,AppType:Vg,AuthenticationType:xg,AuthenticatorInfo:ni,Authorization:ae,AuthorizationDetails:Xv,AuthorizedPermissions:mi,BillingAddress:Xa,ChangeRoleRequest:Xy,ChangeRoleResponse:Qy,CheckPermissionsRequest:nv,CheckPermissionsResponse:av,ClientAuthentication:$g,CreateFragmentRequest:Qk,CreateFragmentResponse:Zk,CreateKeyFromExistingKeyAuthorizationsRequest:ah,CreateKeyFromExistingKeyAuthorizationsResponse:th,CreateKeyRequest:$v,CreateKeyResponse:Yv,CreateLocationRequest:JT,CreateLocationResponse:zT,CreateLocationSecretRequest:mk,CreateLocationSecretResponse:ck,CreateModuleRequest:Sv,CreateModuleResponse:Iv,CreateOAuthAppRequest:gh,CreateOAuthAppResponse:Th,CreateOAuthAppUserRequest:Ih,CreateOAuthAppUserResponse:Oh,CreateOrganizationInviteRequest:yT,CreateOrganizationInviteResponse:vT,CreateOrganizationRequest:Zg,CreateOrganizationResponse:eT,CreateRegistryItemRequest:dv,CreateRegistryItemResponse:pv,CreateRobotPartSecretRequest:zy,CreateRobotPartSecretResponse:Vy,DeleteDevicePushTokenRequest:Dh,DeleteDevicePushTokenResponse:Ah,DeleteFirebaseConfigRequest:xh,DeleteFirebaseConfigResponse:Jh,DeleteFragmentRequest:ay,DeleteFragmentResponse:ty,DeleteFragmentTagRequest:ly,DeleteFragmentTagResponse:dy,DeleteKeyRequest:Wv,DeleteKeyResponse:Hv,DeleteLocationRequest:HT,DeleteLocationResponse:jT,DeleteLocationSecretRequest:lk,DeleteLocationSecretResponse:dk,DeleteOAuthAppRequest:fh,DeleteOAuthAppResponse:Rh,DeleteOrganizationInviteRequest:RT,DeleteOrganizationInviteResponse:_T,DeleteOrganizationMemberRequest:OT,DeleteOrganizationMemberResponse:bT,DeleteOrganizationRequest:cT,DeleteOrganizationResponse:lT,DeleteRegistryItemRequest:yv,DeleteRegistryItemResponse:vv,DeleteRobotPartRequest:Uk,DeleteRobotPartResponse:zk,DeleteRobotPartSecretRequest:$y,DeleteRobotPartSecretResponse:Yy,DeleteRobotRequest:Dy,DeleteRobotResponse:Ay,DisableAuthServiceRequest:ph,DisableAuthServiceResponse:uh,DisableBillingServiceRequest:DT,DisableBillingServiceResponse:AT,EnableAuthServiceRequest:lh,EnableAuthServiceResponse:dh,EnableBillingServiceRequest:MT,EnableBillingServiceResponse:ET,EnabledGrant:Hg,Fragment:Ze,FragmentError:Yk,FragmentErrorType:Jg,FragmentHistoryEntry:Vk,FragmentImport:Wk,FragmentImportList:ai,FragmentRevision:$k,FragmentSummary:_y,FragmentTag:Za,FragmentUsage:et,FragmentVisibility:Vn,GetAppBrandingRequest:bh,GetAppBrandingResponse:Eh,GetAppContentRequest:sh,GetAppContentResponse:oh,GetBillingServiceConfigRequest:NT,GetBillingServiceConfigResponse:PT,GetDevicePushTokensRequest:Uh,GetDevicePushTokensResponse:qh,GetFirebaseConfigRequest:Bh,GetFirebaseConfigResponse:Fh,GetFragmentHistoryRequest:sy,GetFragmentHistoryResponse:oy,GetFragmentRequest:Kk,GetFragmentResponse:Xk,GetFragmentUsageRequest:iy,GetFragmentUsageResponse:ry,GetLocationMetadataRequest:KT,GetLocationMetadataResponse:XT,GetLocationRequest:VT,GetLocationResponse:$T,GetModuleRequest:Av,GetModuleResponse:Uv,GetOrganizationMetadataRequest:dT,GetOrganizationMetadataResponse:pT,GetOrganizationNamespaceAvailabilityRequest:tT,GetOrganizationNamespaceAvailabilityResponse:sT,GetOrganizationRequest:nT,GetOrganizationResponse:aT,GetOrganizationsWithAccessToLocationRequest:ek,GetOrganizationsWithAccessToLocationResponse:nk,GetRegistryItemRequest:cv,GetRegistryItemResponse:lv,GetRobotAPIKeysRequest:Fk,GetRobotAPIKeysResponse:Jk,GetRobotMetadataRequest:Uy,GetRobotMetadataResponse:qy,GetRobotPartByNameAndLocationRequest:Sk,GetRobotPartByNameAndLocationResponse:Ik,GetRobotPartHistoryRequest:wk,GetRobotPartHistoryResponse:Ck,GetRobotPartLogsRequest:Ok,GetRobotPartLogsResponse:bk,GetRobotPartMetadataRequest:qk,GetRobotPartMetadataResponse:Lk,GetRobotPartRequest:Rk,GetRobotPartResponse:_k,GetRobotPartsRequest:hk,GetRobotPartsResponse:fk,GetRobotRequest:gk,GetRobotResponse:vk,GetRoverRentalRobotsRequest:Tk,GetRoverRentalRobotsResponse:yk,GetUserIDByEmailRequest:Bv,GetUserIDByEmailResponse:Fv,ListAuthorizationsRequest:Zy,ListAuthorizationsResponse:ev,ListFragmentsRequest:Hk,ListFragmentsResponse:jk,ListKeysRequest:Qv,ListKeysResponse:Zv,ListLocationsRequest:ak,ListLocationsResponse:rk,ListMachineFragmentsRequest:yy,ListMachineFragmentsResponse:vy,ListMachineSummariesRequest:ri,ListMachineSummariesResponse:hy,ListModulesRequest:Lv,ListModulesResponse:Gv,ListNestedFragmentsRequest:Ty,ListNestedFragmentsResponse:ky,ListOAuthAppsRequest:_h,ListOAuthAppsResponse:Sh,ListOrganizationMembersRequest:TT,ListOrganizationMembersResponse:kT,ListOrganizationsByUserRequest:xv,ListOrganizationsByUserResponse:Jv,ListOrganizationsRequest:Kg,ListOrganizationsResponse:Qg,ListRegistryItemsRequest:Tv,ListRegistryItemsResponse:kv,ListRobotsForLocationsRequest:uy,ListRobotsForLocationsResponse:My,ListRobotsForOrgRequest:gy,ListRobotsForOrgResponse:Ey,ListRobotsRequest:py,ListRobotsResponse:by,Location:Yn,LocationAuth:Qa,LocationAuthRequest:pk,LocationAuthResponse:uk,LocationOrganization:BT,LocationSummary:fy,MLModelMetadata:iv,MLModelVersion:ov,MLTrainingMetadata:mv,MLTrainingVersion:rv,MachinePickerCustomizations:Ch,MachineSummary:Ry,MarkPartAsMainRequest:By,MarkPartAsMainResponse:Fy,MarkPartForRestartRequest:xy,MarkPartForRestartResponse:Jy,Model:ln,Module:ci,ModuleFileInfo:Nv,ModuleLanguage:Ka,ModuleMetadata:sv,ModuleSourceType:ja,ModuleVersion:tv,NewRobotPartRequest:Dk,NewRobotPartResponse:Ak,NewRobotRequest:wy,NewRobotResponse:Cy,OAuthConfig:at,OnlineState:Ha,OrgDetails:di,Organization:Rn,OrganizationGetLogoRequest:mh,OrganizationGetLogoResponse:ch,OrganizationGetSupportEmailRequest:LT,OrganizationGetSupportEmailResponse:GT,OrganizationIdentity:ti,OrganizationInvite:$n,OrganizationMember:Xg,OrganizationSetLogoRequest:ih,OrganizationSetLogoResponse:rh,OrganizationSetSupportEmailRequest:UT,OrganizationSetSupportEmailResponse:qT,PKCE:Yg,PartSummary:Oy,ReadOAuthAppRequest:kh,ReadOAuthAppResponse:yh,RegistryItem:nt,RegistryItemStatus:zg,RemoveRoleRequest:jy,RemoveRoleResponse:Ky,RenameKeyRequest:jv,RenameKeyResponse:Kv,RenameRegistryItemRequest:hv,RenameRegistryItemResponse:fv,ResendOrganizationInviteRequest:ST,ResendOrganizationInviteResponse:IT,ResolvedFragment:oi,Robot:fn,RobotPart:mn,RobotPartHistoryEntry:jg,RotateKeyRequest:eh,RotateKeyResponse:nh,RoverRentalRobot:kk,SearchOrganizationsRequest:zv,SearchOrganizationsResponse:Vv,SetFirebaseConfigRequest:Lh,SetFirebaseConfigResponse:Gh,SetFragmentTagRequest:my,SetFragmentTagResponse:cy,ShareLocationRequest:tk,ShareLocationResponse:sk,SharedSecret:si,SharedSecret_State:xT,StorageConfig:FT,TailRobotPartLogsRequest:Mk,TailRobotPartLogsResponse:Ek,TextOverrides:Mh,TransferRegistryItemRequest:Rv,TransferRegistryItemResponse:_v,URLValidation:Wg,UnshareLocationRequest:ok,UnshareLocationResponse:ik,UpdateBillingServiceRequest:wT,UpdateBillingServiceResponse:CT,UpdateFragmentRequest:ey,UpdateFragmentResponse:ny,UpdateLocationMetadataRequest:QT,UpdateLocationMetadataResponse:ZT,UpdateLocationRequest:YT,UpdateLocationResponse:WT,UpdateMLModelMetadata:wv,UpdateMLTrainingMetadata:Cv,UpdateModuleMetadata:Ev,UpdateModuleRequest:Ov,UpdateModuleResponse:Mv,UpdateOAuthAppRequest:vh,UpdateOAuthAppResponse:hh,UpdateOrganizationInviteAuthorizationsRequest:hT,UpdateOrganizationInviteAuthorizationsResponse:fT,UpdateOrganizationMetadataRequest:uT,UpdateOrganizationMetadataResponse:gT,UpdateOrganizationNamespaceRequest:rT,UpdateOrganizationNamespaceResponse:mT,UpdateOrganizationRequest:oT,UpdateOrganizationResponse:iT,UpdateRegistryItemRequest:uv,UpdateRegistryItemResponse:gv,UpdateRobotMetadataRequest:Ly,UpdateRobotMetadataResponse:Gy,UpdateRobotPartMetadataRequest:Gk,UpdateRobotPartMetadataResponse:Bk,UpdateRobotPartRequest:Nk,UpdateRobotPartResponse:Pk,UpdateRobotRequest:Ny,UpdateRobotResponse:Py,UploadDevicePushTokenRequest:Nh,UploadDevicePushTokenResponse:Ph,UploadModuleFileRequest:Pv,UploadModuleFileResponse:Dv,Uploads:li,VersionHistory:qv,ViamAgentVersion:Iy,ViamServerVersion:Sy,Visibility:hn},Symbol.toStringTag,{value:"Module"})),_I={typeName:"viam.app.v1.AppService",methods:{getUserIDByEmail:{name:"GetUserIDByEmail",I:Bv,O:Fv,kind:m.Unary},createOrganization:{name:"CreateOrganization",I:Zg,O:eT,kind:m.Unary},listOrganizations:{name:"ListOrganizations",I:Kg,O:Qg,kind:m.Unary},getOrganizationsWithAccessToLocation:{name:"GetOrganizationsWithAccessToLocation",I:ek,O:nk,kind:m.Unary},listOrganizationsByUser:{name:"ListOrganizationsByUser",I:xv,O:Jv,kind:m.Unary},searchOrganizations:{name:"SearchOrganizations",I:zv,O:Vv,kind:m.Unary},getOrganization:{name:"GetOrganization",I:nT,O:aT,kind:m.Unary},getOrganizationNamespaceAvailability:{name:"GetOrganizationNamespaceAvailability",I:tT,O:sT,kind:m.Unary},updateOrganization:{name:"UpdateOrganization",I:oT,O:iT,kind:m.Unary},updateOrganizationNamespace:{name:"UpdateOrganizationNamespace",I:rT,O:mT,kind:m.Unary},deleteOrganization:{name:"DeleteOrganization",I:cT,O:lT,kind:m.Unary},getOrganizationMetadata:{name:"GetOrganizationMetadata",I:dT,O:pT,kind:m.Unary},updateOrganizationMetadata:{name:"UpdateOrganizationMetadata",I:uT,O:gT,kind:m.Unary},listOrganizationMembers:{name:"ListOrganizationMembers",I:TT,O:kT,kind:m.Unary},createOrganizationInvite:{name:"CreateOrganizationInvite",I:yT,O:vT,kind:m.Unary},updateOrganizationInviteAuthorizations:{name:"UpdateOrganizationInviteAuthorizations",I:hT,O:fT,kind:m.Unary},deleteOrganizationMember:{name:"DeleteOrganizationMember",I:OT,O:bT,kind:m.Unary},deleteOrganizationInvite:{name:"DeleteOrganizationInvite",I:RT,O:_T,kind:m.Unary},resendOrganizationInvite:{name:"ResendOrganizationInvite",I:ST,O:IT,kind:m.Unary},enableBillingService:{name:"EnableBillingService",I:MT,O:ET,kind:m.Unary},disableBillingService:{name:"DisableBillingService",I:DT,O:AT,kind:m.Unary},updateBillingService:{name:"UpdateBillingService",I:wT,O:CT,kind:m.Unary},getBillingServiceConfig:{name:"GetBillingServiceConfig",I:NT,O:PT,kind:m.Unary},organizationSetSupportEmail:{name:"OrganizationSetSupportEmail",I:UT,O:qT,kind:m.Unary},organizationGetSupportEmail:{name:"OrganizationGetSupportEmail",I:LT,O:GT,kind:m.Unary},organizationSetLogo:{name:"OrganizationSetLogo",I:ih,O:rh,kind:m.Unary},organizationGetLogo:{name:"OrganizationGetLogo",I:mh,O:ch,kind:m.Unary},enableAuthService:{name:"EnableAuthService",I:lh,O:dh,kind:m.Unary},disableAuthService:{name:"DisableAuthService",I:ph,O:uh,kind:m.Unary},createOAuthApp:{name:"CreateOAuthApp",I:gh,O:Th,kind:m.Unary},readOAuthApp:{name:"ReadOAuthApp",I:kh,O:yh,kind:m.Unary},updateOAuthApp:{name:"UpdateOAuthApp",I:vh,O:hh,kind:m.Unary},deleteOAuthApp:{name:"DeleteOAuthApp",I:fh,O:Rh,kind:m.Unary},listOAuthApps:{name:"ListOAuthApps",I:_h,O:Sh,kind:m.Unary},createOAuthAppUser:{name:"CreateOAuthAppUser",I:Ih,O:Oh,kind:m.Unary},createLocation:{name:"CreateLocation",I:JT,O:zT,kind:m.Unary},getLocation:{name:"GetLocation",I:VT,O:$T,kind:m.Unary},updateLocation:{name:"UpdateLocation",I:YT,O:WT,kind:m.Unary},deleteLocation:{name:"DeleteLocation",I:HT,O:jT,kind:m.Unary},getLocationMetadata:{name:"GetLocationMetadata",I:KT,O:XT,kind:m.Unary},updateLocationMetadata:{name:"UpdateLocationMetadata",I:QT,O:ZT,kind:m.Unary},listLocations:{name:"ListLocations",I:ak,O:rk,kind:m.Unary},shareLocation:{name:"ShareLocation",I:tk,O:sk,kind:m.Unary},unshareLocation:{name:"UnshareLocation",I:ok,O:ik,kind:m.Unary},locationAuth:{name:"LocationAuth",I:pk,O:uk,kind:m.Unary},createLocationSecret:{name:"CreateLocationSecret",I:mk,O:ck,kind:m.Unary},deleteLocationSecret:{name:"DeleteLocationSecret",I:lk,O:dk,kind:m.Unary},getRobot:{name:"GetRobot",I:gk,O:vk,kind:m.Unary},getRobotMetadata:{name:"GetRobotMetadata",I:Uy,O:qy,kind:m.Unary},updateRobotMetadata:{name:"UpdateRobotMetadata",I:Ly,O:Gy,kind:m.Unary},getRoverRentalRobots:{name:"GetRoverRentalRobots",I:Tk,O:yk,kind:m.Unary},getRobotParts:{name:"GetRobotParts",I:hk,O:fk,kind:m.Unary},getRobotPart:{name:"GetRobotPart",I:Rk,O:_k,kind:m.Unary},getRobotPartByNameAndLocation:{name:"GetRobotPartByNameAndLocation",I:Sk,O:Ik,kind:m.Unary},getRobotPartLogs:{name:"GetRobotPartLogs",I:Ok,O:bk,kind:m.Unary},tailRobotPartLogs:{name:"TailRobotPartLogs",I:Mk,O:Ek,kind:m.ServerStreaming},getRobotPartHistory:{name:"GetRobotPartHistory",I:wk,O:Ck,kind:m.Unary},updateRobotPart:{name:"UpdateRobotPart",I:Nk,O:Pk,kind:m.Unary},newRobotPart:{name:"NewRobotPart",I:Dk,O:Ak,kind:m.Unary},deleteRobotPart:{name:"DeleteRobotPart",I:Uk,O:zk,kind:m.Unary},getRobotPartMetadata:{name:"GetRobotPartMetadata",I:qk,O:Lk,kind:m.Unary},updateRobotPartMetadata:{name:"UpdateRobotPartMetadata",I:Gk,O:Bk,kind:m.Unary},getRobotAPIKeys:{name:"GetRobotAPIKeys",I:Fk,O:Jk,kind:m.Unary},markPartAsMain:{name:"MarkPartAsMain",I:By,O:Fy,kind:m.Unary},markPartForRestart:{name:"MarkPartForRestart",I:xy,O:Jy,kind:m.Unary},createRobotPartSecret:{name:"CreateRobotPartSecret",I:zy,O:Vy,kind:m.Unary},deleteRobotPartSecret:{name:"DeleteRobotPartSecret",I:$y,O:Yy,kind:m.Unary},listRobots:{name:"ListRobots",I:py,O:by,kind:m.Unary},listRobotsForLocations:{name:"ListRobotsForLocations",I:uy,O:My,kind:m.Unary},listRobotsForOrg:{name:"ListRobotsForOrg",I:gy,O:Ey,kind:m.Unary},newRobot:{name:"NewRobot",I:wy,O:Cy,kind:m.Unary},updateRobot:{name:"UpdateRobot",I:Ny,O:Py,kind:m.Unary},deleteRobot:{name:"DeleteRobot",I:Dy,O:Ay,kind:m.Unary},listFragments:{name:"ListFragments",I:Hk,O:jk,kind:m.Unary},getFragment:{name:"GetFragment",I:Kk,O:Xk,kind:m.Unary},createFragment:{name:"CreateFragment",I:Qk,O:Zk,kind:m.Unary},updateFragment:{name:"UpdateFragment",I:ey,O:ny,kind:m.Unary},deleteFragment:{name:"DeleteFragment",I:ay,O:ty,kind:m.Unary},listNestedFragments:{name:"ListNestedFragments",I:Ty,O:ky,kind:m.Unary},listMachineFragments:{name:"ListMachineFragments",I:yy,O:vy,kind:m.Unary},listMachineSummaries:{name:"ListMachineSummaries",I:ri,O:hy,kind:m.Unary},getFragmentHistory:{name:"GetFragmentHistory",I:sy,O:oy,kind:m.Unary},getFragmentUsage:{name:"GetFragmentUsage",I:iy,O:ry,kind:m.Unary},setFragmentTag:{name:"SetFragmentTag",I:my,O:cy,kind:m.Unary},deleteFragmentTag:{name:"DeleteFragmentTag",I:ly,O:dy,kind:m.Unary},addRole:{name:"AddRole",I:Wy,O:Hy,kind:m.Unary},removeRole:{name:"RemoveRole",I:jy,O:Ky,kind:m.Unary},changeRole:{name:"ChangeRole",I:Xy,O:Qy,kind:m.Unary},listAuthorizations:{name:"ListAuthorizations",I:Zy,O:ev,kind:m.Unary},checkPermissions:{name:"CheckPermissions",I:nv,O:av,kind:m.Unary},getRegistryItem:{name:"GetRegistryItem",I:cv,O:lv,kind:m.Unary},createRegistryItem:{name:"CreateRegistryItem",I:dv,O:pv,kind:m.Unary},updateRegistryItem:{name:"UpdateRegistryItem",I:uv,O:gv,kind:m.Unary},listRegistryItems:{name:"ListRegistryItems",I:Tv,O:kv,kind:m.Unary},deleteRegistryItem:{name:"DeleteRegistryItem",I:yv,O:vv,kind:m.Unary},renameRegistryItem:{name:"RenameRegistryItem",I:hv,O:fv,kind:m.Unary},transferRegistryItem:{name:"TransferRegistryItem",I:Rv,O:_v,kind:m.Unary},createModule:{name:"CreateModule",I:Sv,O:Iv,kind:m.Unary},updateModule:{name:"UpdateModule",I:Ov,O:Mv,kind:m.Unary},uploadModuleFile:{name:"UploadModuleFile",I:Pv,O:Dv,kind:m.ClientStreaming},getModule:{name:"GetModule",I:Av,O:Uv,kind:m.Unary},listModules:{name:"ListModules",I:Lv,O:Gv,kind:m.Unary},createKey:{name:"CreateKey",I:$v,O:Yv,kind:m.Unary},deleteKey:{name:"DeleteKey",I:Wv,O:Hv,kind:m.Unary},listKeys:{name:"ListKeys",I:Qv,O:Zv,kind:m.Unary},renameKey:{name:"RenameKey",I:jv,O:Kv,kind:m.Unary},rotateKey:{name:"RotateKey",I:eh,O:nh,kind:m.Unary},createKeyFromExistingKeyAuthorizations:{name:"CreateKeyFromExistingKeyAuthorizations",I:ah,O:th,kind:m.Unary},getAppContent:{name:"GetAppContent",I:sh,O:oh,kind:m.Unary},getAppBranding:{name:"GetAppBranding",I:bh,O:Eh,kind:m.Unary},uploadDevicePushToken:{name:"UploadDevicePushToken",I:Nh,O:Ph,kind:m.Unary},deleteDevicePushToken:{name:"DeleteDevicePushToken",I:Dh,O:Ah,kind:m.Unary},getDevicePushTokens:{name:"GetDevicePushTokens",I:Uh,O:qh,kind:m.Unary},setFirebaseConfig:{name:"SetFirebaseConfig",I:Lh,O:Gh,kind:m.Unary},getFirebaseConfig:{name:"GetFirebaseConfig",I:Bh,O:Fh,kind:m.Unary},deleteFirebaseConfig:{name:"DeleteFirebaseConfig",I:xh,O:Jh,kind:m.Unary}}},zh=(a,e,n,t,o,i)=>new ae({authorizationType:"role",identityId:e,identityType:o,authorizationId:`${t}_${n}`,resourceType:t,organizationId:a,resourceId:i});class SI{client;constructor(e){this.client=X(_I,e)}async getUserIDByEmail(e){return(await this.client.getUserIDByEmail({email:e})).userId}async createOrganization(e){return(await this.client.createOrganization({name:e})).organization}async listOrganizations(){return(await this.client.listOrganizations({})).organizations}async getOrganizationsWithAccessToLocation(e){return(await this.client.getOrganizationsWithAccessToLocation({locationId:e})).organizationIdentities}async listOrganizationsByUser(e){return(await this.client.listOrganizationsByUser({userId:e})).orgs}async getOrganization(e){return(await this.client.getOrganization({organizationId:e})).organization}async getOrganizationNamespaceAvailability(e){return(await this.client.getOrganizationNamespaceAvailability({publicNamespace:e})).available}async updateOrganization(e,n,t,o,i,r){return(await this.client.updateOrganization({organizationId:e,name:n,publicNamespace:t,region:o,cid:i,defaultFragments:r})).organization}async deleteOrganization(e){await this.client.deleteOrganization({organizationId:e})}async listOrganizationMembers(e){return this.client.listOrganizationMembers({organizationId:e})}async createOrganizationInvite(e,n,t,o=!0){return(await this.client.createOrganizationInvite({organizationId:e,email:n,authorizations:t,sendEmailInvite:o})).invite}async updateOrganizationInviteAuthorizations(e,n,t,o){return(await this.client.updateOrganizationInviteAuthorizations({organizationId:e,email:n,addAuthorizations:t,removeAuthorizations:o})).invite}async deleteOrganizationMember(e,n){await this.client.deleteOrganizationMember({organizationId:e,userId:n})}async deleteOrganizationInvite(e,n){await this.client.deleteOrganizationInvite({organizationId:e,email:n})}async resendOrganizationInvite(e,n){return(await this.client.resendOrganizationInvite({organizationId:e,email:n})).invite}async createLocation(e,n,t){return(await this.client.createLocation({organizationId:e,name:n,parentLocationId:t})).location}async getLocation(e){return(await this.client.getLocation({locationId:e})).location}async updateLocation(e,n,t,o){return(await this.client.updateLocation({locationId:e,name:n,parentLocationId:t,region:o})).location}async deleteLocation(e){await this.client.deleteLocation({locationId:e})}async listLocations(e){return(await this.client.listLocations({organizationId:e})).locations}async shareLocation(e,n){await this.client.shareLocation({organizationId:e,locationId:n})}async unshareLocation(e,n){await this.client.unshareLocation({organizationId:e,locationId:n})}async locationAuth(e){return(await this.client.locationAuth({locationId:e})).auth}async createLocationSecret(e){return(await this.client.createLocationSecret({locationId:e})).auth}async deleteLocationSecret(e,n){await this.client.deleteLocationSecret({locationId:e,secretId:n})}async getRobot(e){return(await this.client.getRobot({id:e})).robot}async getRoverRentalRobots(e){return(await this.client.getRoverRentalRobots({orgId:e})).robots}async getRobotParts(e){return(await this.client.getRobotParts({robotId:e})).parts}async getRobotPart(e){return this.client.getRobotPart({id:e})}async getRobotPartByNameAndLocation(e,n){return this.client.getRobotPartByNameAndLocation({name:e,locationId:n})}async getRobotPartLogs(e,n,t,o,i,r=""){return this.client.getRobotPartLogs({id:e,filter:n,levels:t,pageToken:r,start:o?_.fromDate(o):void 0,end:i?_.fromDate(i):void 0})}async tailRobotPartLogs(e,n,t,o=!0){const i=this.client.tailRobotPartLogs({id:e,errorsOnly:o,filter:t});for await(const r of i)for(const c of r.logs)n.push(c)}async getRobotPartHistory(e){return(await this.client.getRobotPartHistory({id:e})).history}async updateRobotPart(e,n,t){return(await this.client.updateRobotPart({id:e,name:n,robotConfig:t})).part}async newRobotPart(e,n){return(await this.client.newRobotPart({robotId:e,partName:n})).partId}async deleteRobotPart(e){await this.client.deleteRobotPart({partId:e})}async getRobotAPIKeys(e){return(await this.client.getRobotAPIKeys({robotId:e})).apiKeys}async markPartAsMain(e){await this.client.markPartAsMain({partId:e})}async markPartForRestart(e){await this.client.markPartForRestart({partId:e})}async createRobotPartSecret(e){return(await this.client.createRobotPartSecret({partId:e})).part}async deleteRobotPartSecret(e,n){await this.client.deleteRobotPartSecret({partId:e,secretId:n})}async listRobots(e){return(await this.client.listRobots({locationId:e})).robots}async newRobot(e,n){return(await this.client.newRobot({name:n,location:e})).id}async updateRobot(e,n,t){return(await this.client.updateRobot({id:e,location:n,name:t})).robot}async deleteRobot(e){await this.client.deleteRobot({id:e})}async listFragments(e,n=!0,t=[]){return(await this.client.listFragments({organizationId:e,showPublic:n,fragmentVisibility:t})).fragments}async getFragment(e){return(await this.client.getFragment({id:e})).fragment}async createFragment(e,n,t){return(await this.client.createFragment({organizationId:e,name:n,config:t})).fragment}async updateFragment(e,n,t,o,i){return(await this.client.updateFragment({id:e,name:n,config:t,public:o,visibility:i})).fragment}async deleteFragment(e){await this.client.deleteFragment({id:e})}async listMachineFragments(e,n){return(await this.client.listMachineFragments({machineId:e,additionalFragmentIds:n})).fragments}async addRole(e,n,t,o,i){await this.client.addRole({authorization:zh(e,n,t,o,"",i)})}async removeRole(e,n,t,o,i){await this.client.removeRole({authorization:zh(e,n,t,o,"",i)})}async changeRole(e,n){await this.client.changeRole({oldAuthorization:e,newAuthorization:n})}async listAuthorizations(e,n){return(await this.client.listAuthorizations({organizationId:e,resourceIds:n})).authorizations}async checkPermissions(e){return(await this.client.checkPermissions({permissions:e})).authorizedPermissions}async getRegistryItem(e){return(await this.client.getRegistryItem({itemId:e})).item}async createRegistryItem(e,n,t){await this.client.createRegistryItem({organizationId:e,name:n,type:t})}async updateRegistryItem(e,n,t,o){await this.client.updateRegistryItem({itemId:e,type:n,description:t,visibility:o})}async listRegistryItems(e,n,t,o,i,r,c){const l={organizationId:e,types:n,visibilities:t,platforms:o,statuses:i,searchTerm:r,pageToken:c};return(await this.client.listRegistryItems(l)).items}async deleteRegistryItem(e){await this.client.deleteRegistryItem({itemId:e})}async createModule(e,n){return this.client.createModule({organizationId:e,name:n})}async updateModule(e,n,t,o,i,r){return(await this.client.updateModule({moduleId:e,visibility:n,url:t,description:o,models:i,entrypoint:r})).url}async getModule(e){return(await this.client.getModule({moduleId:e})).module}async listModules(e){return(await this.client.listModules({organizationId:e})).modules}async createKey(e,n){return this.client.createKey({name:n,authorizations:e})}async deleteKey(e){return this.client.deleteKey({id:e})}async listKeys(e){return(await this.client.listKeys({orgId:e})).apiKeys}async rotateKey(e){return this.client.rotateKey({id:e})}async createKeyFromExistingKeyAuthorizations(e){return this.client.createKeyFromExistingKeyAuthorizations({id:e})}async getAppContent(e,n){return this.client.getAppContent({publicNamespace:e,name:n})}async getOrganizationMetadata(e){return(await this.client.getOrganizationMetadata({organizationId:e})).toJson().data??{}}async updateOrganizationMetadata(e,n){await this.client.updateOrganizationMetadata({organizationId:e,data:p.fromJson(n)})}async getLocationMetadata(e){return(await this.client.getLocationMetadata({locationId:e})).toJson().data??{}}async updateLocationMetadata(e,n){await this.client.updateLocationMetadata({locationId:e,data:p.fromJson(n)})}async getRobotMetadata(e){return(await this.client.getRobotMetadata({id:e})).toJson().data??{}}async updateRobotMetadata(e,n){await this.client.updateRobotMetadata({id:e,data:p.fromJson(n)})}async getRobotPartMetadata(e){return(await this.client.getRobotPartMetadata({id:e})).toJson().data??{}}async updateRobotPartMetadata(e,n){await this.client.updateRobotPartMetadata({id:e,data:p.fromJson(n)})}async getAppBranding(e,n){return this.client.getAppBranding({publicNamespace:e,name:n})}async listMachineSummaries(e,n,t,o){const i=new ri({organizationId:e,fragmentIds:n,locationIds:t,limit:o});return(await this.client.listMachineSummaries(i)).locationSummaries}async createOAuthAppUser(e,n,t,o,i,r){return this.client.createOAuthAppUser({orgId:e,applicationId:n,email:t,firstName:o,lastName:i,password:r})}}const Vh=s.makeEnum("viam.app.v1.PaymentMethodType",[{no:0,name:"PAYMENT_METHOD_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PAYMENT_METHOD_TYPE_CARD",localName:"CARD"},{no:2,name:"PAYMENT_METHOD_TYPE_USBANKACCOUNT",localName:"USBANKACCOUNT"}]),$h=s.makeEnum("viam.app.v1.UsageCostType",[{no:0,name:"USAGE_COST_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"USAGE_COST_TYPE_DATA_UPLOAD",localName:"DATA_UPLOAD"},{no:2,name:"USAGE_COST_TYPE_DATA_EGRESS",localName:"DATA_EGRESS"},{no:3,name:"USAGE_COST_TYPE_REMOTE_CONTROL",localName:"REMOTE_CONTROL"},{no:4,name:"USAGE_COST_TYPE_STANDARD_COMPUTE",localName:"STANDARD_COMPUTE"},{no:5,name:"USAGE_COST_TYPE_CLOUD_STORAGE",localName:"CLOUD_STORAGE"},{no:6,name:"USAGE_COST_TYPE_BINARY_DATA_CLOUD_STORAGE",localName:"BINARY_DATA_CLOUD_STORAGE"},{no:7,name:"USAGE_COST_TYPE_OTHER_CLOUD_STORAGE",localName:"OTHER_CLOUD_STORAGE"},{no:8,name:"USAGE_COST_TYPE_PER_MACHINE",localName:"PER_MACHINE"},{no:9,name:"USAGE_COST_TYPE_TRIGGER_NOTIFICATION",localName:"TRIGGER_NOTIFICATION"},{no:10,name:"USAGE_COST_TYPE_TABULAR_DATA_CLOUD_STORAGE",localName:"TABULAR_DATA_CLOUD_STORAGE"},{no:11,name:"USAGE_COST_TYPE_CONFIG_HISTORY_CLOUD_STORAGE",localName:"CONFIG_HISTORY_CLOUD_STORAGE"},{no:12,name:"USAGE_COST_TYPE_LOGS_CLOUD_STORAGE",localName:"LOGS_CLOUD_STORAGE"},{no:13,name:"USAGE_COST_TYPE_TRAINING_LOGS_CLOUD_STORAGE",localName:"TRAINING_LOGS_CLOUD_STORAGE"},{no:14,name:"USAGE_COST_TYPE_PACKAGES_CLOUD_STORAGE",localName:"PACKAGES_CLOUD_STORAGE"},{no:15,name:"USAGE_COST_TYPE_BINARY_DATA_UPLOAD",localName:"BINARY_DATA_UPLOAD"},{no:16,name:"USAGE_COST_TYPE_TABULAR_DATA_UPLOAD",localName:"TABULAR_DATA_UPLOAD"},{no:17,name:"USAGE_COST_TYPE_LOGS_UPLOAD",localName:"LOGS_UPLOAD"},{no:18,name:"USAGE_COST_TYPE_BINARY_DATA_EGRESS",localName:"BINARY_DATA_EGRESS"},{no:19,name:"USAGE_COST_TYPE_TABULAR_DATA_EGRESS",localName:"TABULAR_DATA_EGRESS"},{no:20,name:"USAGE_COST_TYPE_LOGS_EGRESS",localName:"LOGS_EGRESS"},{no:21,name:"USAGE_COST_TYPE_TRAINING_LOGS_EGRESS",localName:"TRAINING_LOGS_EGRESS"},{no:22,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_CLOUD_STORAGE",localName:"TABULAR_DATA_DATABASE_CLOUD_STORAGE"},{no:23,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_COMPUTE",localName:"TABULAR_DATA_DATABASE_COMPUTE"},{no:24,name:"USAGE_COST_TYPE_BINARY_DATA_CROSS_REGION_EGRESS",localName:"BINARY_DATA_CROSS_REGION_EGRESS"},{no:25,name:"USAGE_COST_TYPE_PIPELINE_SINK_CLOUD_STORAGE",localName:"PIPELINE_SINK_CLOUD_STORAGE"},{no:26,name:"USAGE_COST_TYPE_PIPELINE_SINK_COMPUTE",localName:"PIPELINE_SINK_COMPUTE"}]),Yh=s.makeEnum("viam.app.v1.SourceType",[{no:0,name:"SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SOURCE_TYPE_ORG",localName:"ORG"},{no:2,name:"SOURCE_TYPE_FRAGMENT",localName:"FRAGMENT"}]),Wh=s.makeMessageType("viam.app.v1.InvoiceSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"invoice_date",kind:"message",T:_},{no:3,name:"invoice_amount",kind:"scalar",T:1},{no:4,name:"status",kind:"scalar",T:9},{no:5,name:"due_date",kind:"message",T:_},{no:6,name:"paid_date",kind:"message",T:_},{no:7,name:"last_payment_failure_reason",kind:"scalar",T:9},{no:8,name:"last_payment_failure_at",kind:"message",T:_}]),Hh=s.makeMessageType("viam.app.v1.PaymentMethodCard",()=>[{no:1,name:"brand",kind:"scalar",T:9},{no:2,name:"last_four_digits",kind:"scalar",T:9}]),jh=s.makeMessageType("viam.app.v1.VerificationInfo",()=>[{no:1,name:"arrival_date",kind:"scalar",T:3},{no:2,name:"hosted_verification_page_url",kind:"scalar",T:9}]),Kh=s.makeMessageType("viam.app.v1.PaymentMethodUSBankAccount",()=>[{no:1,name:"bank_name",kind:"scalar",T:9},{no:2,name:"last_four_digits_account_number",kind:"scalar",T:9},{no:3,name:"routing_number",kind:"scalar",T:9},{no:4,name:"account_type",kind:"scalar",T:9},{no:5,name:"verification_info",kind:"message",T:jh,opt:!0}]),Xh=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Qh=s.makeMessageType("viam.app.v1.UsageCost",()=>[{no:1,name:"resource_type",kind:"enum",T:s.getEnumType($h)},{no:2,name:"cost",kind:"scalar",T:1}]),Zh=s.makeMessageType("viam.app.v1.ResourceUsageCostsBySource",()=>[{no:1,name:"source_type",kind:"enum",T:s.getEnumType(Yh)},{no:2,name:"resource_usage_costs",kind:"message",T:ef},{no:3,name:"tier_name",kind:"scalar",T:9}]),ef=s.makeMessageType("viam.app.v1.ResourceUsageCosts",()=>[{no:1,name:"usage_costs",kind:"message",T:Qh,repeated:!0},{no:2,name:"discount",kind:"scalar",T:1},{no:3,name:"total_with_discount",kind:"scalar",T:1},{no:4,name:"total_without_discount",kind:"scalar",T:1}]),nf=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageResponse",()=>[{no:1,name:"start_date",kind:"message",T:_},{no:2,name:"end_date",kind:"message",T:_},{no:14,name:"resource_usage_costs_by_source",kind:"message",T:Zh,repeated:!0},{no:15,name:"subtotal",kind:"scalar",T:1},{no:3,name:"cloud_storage_usage_cost",kind:"scalar",T:1},{no:4,name:"data_upload_usage_cost",kind:"scalar",T:1},{no:5,name:"data_egres_usage_cost",kind:"scalar",T:1},{no:6,name:"remote_control_usage_cost",kind:"scalar",T:1},{no:7,name:"standard_compute_usage_cost",kind:"scalar",T:1},{no:8,name:"discount_amount",kind:"scalar",T:1},{no:9,name:"total_usage_with_discount",kind:"scalar",T:1},{no:10,name:"total_usage_without_discount",kind:"scalar",T:1},{no:11,name:"per_machine_usage_cost",kind:"scalar",T:1},{no:12,name:"binary_data_cloud_storage_usage_cost",kind:"scalar",T:1},{no:13,name:"other_cloud_storage_usage_cost",kind:"scalar",T:1}]),af=s.makeMessageType("viam.app.v1.GetOrgBillingInformationRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),tf=s.makeMessageType("viam.app.v1.GetOrgBillingInformationResponse",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Vh)},{no:2,name:"billing_email",kind:"scalar",T:9},{no:3,name:"method",kind:"message",T:Hh,opt:!0},{no:4,name:"billing_tier",kind:"scalar",T:9,opt:!0},{no:5,name:"method_us_bank_account",kind:"message",T:Kh,opt:!0}]),sf=s.makeMessageType("viam.app.v1.GetInvoicesSummaryRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),of=s.makeMessageType("viam.app.v1.GetInvoicesSummaryResponse",()=>[{no:1,name:"outstanding_balance",kind:"scalar",T:1},{no:2,name:"invoices",kind:"message",T:Wh,repeated:!0}]),rf=s.makeMessageType("viam.app.v1.GetInvoicePdfRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"org_id",kind:"scalar",T:9}]),mf=s.makeMessageType("viam.app.v1.GetInvoicePdfResponse",()=>[{no:1,name:"chunk",kind:"scalar",T:12}]),cf=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailRequest",()=>[{no:1,name:"customer_org_id",kind:"scalar",T:9},{no:2,name:"billing_owner_org_id",kind:"scalar",T:9}]),lf=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailResponse",[]),df=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersRequest",[]),pf=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersResponse",()=>[{no:1,name:"tiers",kind:"scalar",T:9,repeated:!0}]),uf=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"billing_tier",kind:"scalar",T:9}]),gf=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierResponse",[]),Tf=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),kf=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationResponse",()=>[{no:1,name:"billing_organization_id",kind:"scalar",T:9}]),yf=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"billing_organization_id",kind:"scalar",T:9}]),vf=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationResponse",[]),hf=s.makeMessageType("viam.app.v1.ChargeOrganizationRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9,opt:!0},{no:3,name:"subtotal",kind:"scalar",T:1},{no:4,name:"tax",kind:"scalar",T:1},{no:5,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:6,name:"disable_confirmation_email",kind:"scalar",T:8}]),ff=s.makeMessageType("viam.app.v1.ChargeOrganizationResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),Rf=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"amount",kind:"scalar",T:1},{no:3,name:"description",kind:"scalar",T:9,opt:!0},{no:4,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:5,name:"disable_email",kind:"scalar",T:8}]),_f=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),II=Object.freeze(Object.defineProperty({__proto__:null,ChargeOrganizationRequest:hf,ChargeOrganizationResponse:ff,CreateInvoiceAndChargeImmediatelyRequest:Rf,CreateInvoiceAndChargeImmediatelyResponse:_f,GetAvailableBillingTiersRequest:df,GetAvailableBillingTiersResponse:pf,GetCurrentMonthUsageRequest:Xh,GetCurrentMonthUsageResponse:nf,GetInvoicePdfRequest:rf,GetInvoicePdfResponse:mf,GetInvoicesSummaryRequest:sf,GetInvoicesSummaryResponse:of,GetLocationBillingOrganizationRequest:Tf,GetLocationBillingOrganizationResponse:kf,GetOrgBillingInformationRequest:af,GetOrgBillingInformationResponse:tf,InvoiceSummary:Wh,PaymentMethodCard:Hh,PaymentMethodType:Vh,PaymentMethodUSBankAccount:Kh,ResourceUsageCosts:ef,ResourceUsageCostsBySource:Zh,SendPaymentRequiredEmailRequest:cf,SendPaymentRequiredEmailResponse:lf,SourceType:Yh,UpdateLocationBillingOrganizationRequest:yf,UpdateLocationBillingOrganizationResponse:vf,UpdateOrganizationBillingTierRequest:uf,UpdateOrganizationBillingTierResponse:gf,UsageCost:Qh,UsageCostType:$h,VerificationInfo:jh},Symbol.toStringTag,{value:"Module"})),OI={typeName:"viam.app.v1.BillingService",methods:{getCurrentMonthUsage:{name:"GetCurrentMonthUsage",I:Xh,O:nf,kind:m.Unary},getOrgBillingInformation:{name:"GetOrgBillingInformation",I:af,O:tf,kind:m.Unary},getInvoicesSummary:{name:"GetInvoicesSummary",I:sf,O:of,kind:m.Unary},getInvoicePdf:{name:"GetInvoicePdf",I:rf,O:mf,kind:m.ServerStreaming},sendPaymentRequiredEmail:{name:"SendPaymentRequiredEmail",I:cf,O:lf,kind:m.Unary},getAvailableBillingTiers:{name:"GetAvailableBillingTiers",I:df,O:pf,kind:m.Unary},updateOrganizationBillingTier:{name:"UpdateOrganizationBillingTier",I:uf,O:gf,kind:m.Unary},getLocationBillingOrganization:{name:"GetLocationBillingOrganization",I:Tf,O:kf,kind:m.Unary},updateLocationBillingOrganization:{name:"UpdateLocationBillingOrganization",I:yf,O:vf,kind:m.Unary},chargeOrganization:{name:"ChargeOrganization",I:hf,O:ff,kind:m.Unary},createInvoiceAndChargeImmediately:{name:"CreateInvoiceAndChargeImmediately",I:Rf,O:_f,kind:m.Unary}}};class bI{client;constructor(e){this.client=X(OI,e)}async getCurrentMonthUsage(e){const n=await this.client.getCurrentMonthUsage({orgId:e});return n.start=n.startDate?.toDate(),n.end=n.endDate?.toDate(),n}async getOrgBillingInformation(e){return this.client.getOrgBillingInformation({orgId:e})}async getInvoicesSummary(e){return this.client.getInvoicesSummary({orgId:e})}async getInvoicePdf(e,n){const t=this.client.getInvoicePdf({id:e,orgId:n}),o=[];for await(const i of t)o.push(i.chunk);return MI(o)}}const MI=a=>{const e=a.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let t=0;for(const o of a)n.set(o,t),t+=o.length;return n};var Sf={},If={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),function(e){var n=function(){function y(f){this._id=new Uint8Array(f)}return y.prototype.buffer=function(){return this._id},y}();e.UUID=n;var t=function(){function y(f){this._id=new Uint8Array(f)}return y.prototype.buffer=function(){return this._id},y}();e.ObjectId=t;var o=function(){function y(f){this._time=typeof f!="string"?new Uint8Array(f||R(Date.now())):R(+new Date(f))}return y.prototype.buffer=function(){return this._time},y.prototype.fromString=function(f){this._time=R(+new Date(f))},y.prototype.toNumber=function(){return O(this._time)},y.prototype.toDate=function(){return new Date(O(this._time))},y}();e.UTC=o;function i(y){var f=5;for(var k in y)f+=r(k,y[k]);return f}function r(y,f){var k=1;if(y&&(k+=V(y)+1),f==null)return k;switch(f.constructor){case String:return k+4+V(f)+1;case Number:return Math.floor(f)===f&&f<=2147483647&&f>=-2147483647?k+4:k+8;case Boolean:return k+1;case Array:case Object:return k+i(f);case Int8Array:case Uint8Array:return k+5+f.byteLength;case Date:case o:return k+8;case n:return k+5+16;case t:return k+12;default:return 0}}function c(y){var f=new Uint8Array(i(y));return l(y,f),f}e.serialize=c;function l(y,f,k){if(k===void 0&&(k=0),k+=u(f.length,f,k),y.constructor===Array)for(var v=0,E=y.length;v<E;v++)k=h(v.toString(),y[v],f,k);else for(var M in y)k=h(M,y[M],f,k);return f[k++]=0,k}function d(y,f,k){var v=b(y),E=v.length;return f.set(v,k),f[k+E++]=0,E}function u(y,f,k){return f[k++]=y&255,f[k++]=y>>>8&255,f[k++]=y>>>16&255,f[k++]=y>>>24&255,4}function h(y,f,k,v){if(f==null)return k[v++]=10,v+=d(y,k,v),v;switch(f.constructor){case String:k[v++]=2,v+=d(y,k,v);var E=d(f,k,v+4);return v+=u(E,k,v),v+E;case Number:if(Math.floor(f)===f)f<=2147483647&&f>=-2147483647?(k[v++]=16,v+=d(y,k,v),v+=u(f,k,v)):(k[v++]=18,v+=d(y,k,v),k.set(R(f),v),v+=8);else{k[v++]=1,v+=d(y,k,v);var M=new Float64Array([f]),oe=new Uint8Array(M.buffer);k.set(oe,v),v+=8}return v;case Boolean:return k[v++]=8,v+=d(y,k,v),k[v++]=f?1:0,v;case Array:case Object:k[v++]=f.constructor===Array?4:3,v+=d(y,k,v);var B=l(f,k,v);return u(B-v,k,v),B;case Int8Array:case Uint8Array:return k[v++]=5,v+=d(y,k,v),v+=u(f.byteLength,k,v),k[v++]=0,k.set(f,v),v+=f.byteLength,v;case Date:return k[v++]=9,v+=d(y,k,v),k.set(R(f.getTime()),v),v+=8,v;case o:return k[v++]=9,v+=d(y,k,v),k.set(f.buffer(),v),v+=8,v;case n:return k[v++]=5,v+=d(y,k,v),v+=u(16,k,v),k[v++]=4,k.set(f.buffer(),v),v+=16,v;case t:return k[v++]=7,v+=d(y,k,v),k.set(f.buffer(),v),v+=12,v;case RegExp:return k[v++]=11,v+=d(y,k,v),v+=d(f.source,k,v),f.global&&(k[v++]=115),f.ignoreCase&&(k[v++]=105),f.multiline&&(k[v++]=109),k[v++]=0,v;default:return v}}function I(y,f,k,v){if(f===void 0&&(f=!1),k===void 0&&(k=0),v===void 0&&(v=!1),!(y.length<5)){var E=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;if(!(E<5||E>y.length)&&y[y.length-1]===0){for(var M=v?[]:{};;){var oe=y[k++];if(oe===0)break;for(var B=k;y[B]!==0&&B<y.length;B++);if(B>=y.length-1)return;var Y=N(y.subarray(k,B));switch(v&&(Y=parseInt(Y)),k=++B,oe){case 1:M[Y]=new Float64Array(y.slice(k,k+=8).buffer)[0];break;case 2:E=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,M[Y]=N(y.subarray(k,k+=E-1)),k++;break;case 3:E=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[Y]=I(y,f,k,!1),k+=E;break;case 4:E=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[Y]=I(y,f,k,!0),k+=E;break;case 5:if(E=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,y[k++]===4){if(E!==16)return;M[Y]=new n(y.subarray(k,k+=E))}else M[Y]=y.slice(k,k+=E);break;case 6:M[Y]=null;break;case 7:M[Y]=new t(y.subarray(k,k+=12));break;case 8:M[Y]=y[k++]===1;break;case 9:M[Y]=f?new o(y.subarray(k,k+=8)):new Date(O(y.subarray(k,k+=8)));break;case 10:M[Y]=null;break;case 11:for(B=k;B<y.length&&y[B++]!==0;);if(B>=y.length)return;var Ci=N(y.subarray(k,B));for(k=B;B<y.length&&y[B++]!==0;);if(B>=y.length)return;var Ni=N(y.subarray(k,B));k=B,M[Y]=new RegExp(Ci,Ni);break;case 16:M[Y]=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;break;case 18:M[Y]=O(y.subarray(k,k+=8));break;default:return}}return M}}}e.deserialize=I;function R(y){var f=new Uint8Array(8);if(Math.floor(y)===y){var k=4294967296,v=y%k|0,E=y/k|0;y<0&&(v=~(-y%k)|0,E=~(-y/k)|0,v=v+1&4294967295,v||E++);var M=0;f[M++]=v&255,f[M++]=v>>>8&255,f[M++]=v>>>16&255,f[M++]=v>>>24&255,f[M++]=E&255,f[M++]=E>>>8&255,f[M++]=E>>>16&255,f[M]=E>>>24&255}else{var oe=new Float64Array([y]),B=new Uint8Array(oe.buffer);f.set(B)}return f}function O(y,f){f===void 0&&(f=0);var k=4294967296,v=y[f++]|y[f++]<<8|y[f++]<<16|y[f++]<<24,E=y[f++]|y[f++]<<8|y[f++]<<16|y[f]<<24;return E*k+(v>=0?v:k+v)}function b(y){y=y.replace(/\r\n/g,`
|
|
9
|
-
`);for(var f=[],k=0,v=0,E=y.length;v<E;v++){var M=y.charCodeAt(v);M<128?f[k++]=M:M<2048?(f[k++]=M>>>6|192,f[k++]=M&63|128):(f[k++]=M>>>12|224,f[k++]=M>>>6&63|128,f[k++]=M&63|128)}return new Uint8Array(f)}function N(y){for(var f="",k=y.length,v=0,E,M,oe;v<k;)E=y[v],E<128?(f+=String.fromCharCode(E),v++):E>191&&E<224?(M=y[v+1],f+=String.fromCharCode((E&31)<<6|M&63),v+=2):(M=y[v+1],oe=y[v+2],f+=String.fromCharCode((E&15)<<12|(M&63)<<6|oe&63),v+=3);return f}function V(y){return encodeURI(y).split(/%..|./).length-1}}(a.BSON||(a.BSON={}))})(If),Object.defineProperty(Sf,"__esModule",{value:!0});var EI=If,Wn=Sf.BSON=EI.BSON;const wI={typeName:"viam.app.data.v1.DataService",methods:{tabularDataByFilter:{name:"TabularDataByFilter",I:hp,O:fp,kind:m.Unary},tabularDataBySQL:{name:"TabularDataBySQL",I:_p,O:Sp,kind:m.Unary},tabularDataByMQL:{name:"TabularDataByMQL",I:Ip,O:Op,kind:m.Unary},exportTabularData:{name:"ExportTabularData",I:bp,O:Mp,kind:m.ServerStreaming},getLatestTabularData:{name:"GetLatestTabularData",I:Ep,O:wp,kind:m.Unary},binaryDataByFilter:{name:"BinaryDataByFilter",I:Cp,O:Np,kind:m.Unary},binaryDataByIDs:{name:"BinaryDataByIDs",I:Pp,O:Dp,kind:m.Unary},deleteTabularData:{name:"DeleteTabularData",I:Gp,O:Bp,kind:m.Unary},deleteBinaryDataByFilter:{name:"DeleteBinaryDataByFilter",I:Fp,O:xp,kind:m.Unary},deleteBinaryDataByIDs:{name:"DeleteBinaryDataByIDs",I:Jp,O:zp,kind:m.Unary},addTagsToBinaryDataByIDs:{name:"AddTagsToBinaryDataByIDs",I:Vp,O:$p,kind:m.Unary},addTagsToBinaryDataByFilter:{name:"AddTagsToBinaryDataByFilter",I:Yp,O:Wp,kind:m.Unary},removeTagsFromBinaryDataByIDs:{name:"RemoveTagsFromBinaryDataByIDs",I:Hp,O:jp,kind:m.Unary},removeTagsFromBinaryDataByFilter:{name:"RemoveTagsFromBinaryDataByFilter",I:Kp,O:Xp,kind:m.Unary},tagsByFilter:{name:"TagsByFilter",I:Qp,O:Zp,kind:m.Unary},addBoundingBoxToImageByID:{name:"AddBoundingBoxToImageByID",I:eu,O:nu,kind:m.Unary},removeBoundingBoxFromImageByID:{name:"RemoveBoundingBoxFromImageByID",I:au,O:tu,kind:m.Unary},boundingBoxLabelsByFilter:{name:"BoundingBoxLabelsByFilter",I:iu,O:ru,kind:m.Unary},updateBoundingBox:{name:"UpdateBoundingBox",I:su,O:ou,kind:m.Unary},getDatabaseConnection:{name:"GetDatabaseConnection",I:lu,O:du,kind:m.Unary},configureDatabaseUser:{name:"ConfigureDatabaseUser",I:mu,O:cu,kind:m.Unary},addBinaryDataToDatasetByIDs:{name:"AddBinaryDataToDatasetByIDs",I:pu,O:uu,kind:m.Unary},removeBinaryDataFromDatasetByIDs:{name:"RemoveBinaryDataFromDatasetByIDs",I:gu,O:Tu,kind:m.Unary},createIndex:{name:"CreateIndex",I:ku,O:yu,kind:m.Unary},listIndexes:{name:"ListIndexes",I:fu,O:Ru,kind:m.Unary},deleteIndex:{name:"DeleteIndex",I:vu,O:hu,kind:m.Unary},createSavedQuery:{name:"CreateSavedQuery",I:Su,O:Iu,kind:m.Unary},updateSavedQuery:{name:"UpdateSavedQuery",I:wu,O:Cu,kind:m.Unary},getSavedQuery:{name:"GetSavedQuery",I:Mu,O:Eu,kind:m.Unary},deleteSavedQuery:{name:"DeleteSavedQuery",I:Ou,O:bu,kind:m.Unary},listSavedQueries:{name:"ListSavedQueries",I:Nu,O:Pu,kind:m.Unary},createBinaryDataSignedURL:{name:"CreateBinaryDataSignedURL",I:Du,O:Au,kind:m.Unary},createSequence:{name:"CreateSequence",I:Uu,O:qu,kind:m.Unary},getSequence:{name:"GetSequence",I:Lu,O:Gu,kind:m.Unary},updateSequence:{name:"UpdateSequence",I:Bu,O:Fu,kind:m.Unary},deleteSequence:{name:"DeleteSequence",I:xu,O:Ju,kind:m.Unary},listSequences:{name:"ListSequences",I:zu,O:Vu,kind:m.Unary}}},CI=s.makeEnum("viam.app.datapipelines.v1.DataPipelineRunStatus",[{no:0,name:"DATA_PIPELINE_RUN_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_PIPELINE_RUN_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"DATA_PIPELINE_RUN_STATUS_STARTED",localName:"STARTED"},{no:3,name:"DATA_PIPELINE_RUN_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"DATA_PIPELINE_RUN_STATUS_FAILED",localName:"FAILED"}]),Of=s.makeMessageType("viam.app.datapipelines.v1.DataPipeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"schedule",kind:"scalar",T:9},{no:6,name:"enabled",kind:"scalar",T:8},{no:7,name:"created_on",kind:"message",T:_},{no:8,name:"updated_at",kind:"message",T:_},{no:9,name:"data_source_type",kind:"enum",T:s.getEnumType(sn),opt:!0}]),NI=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),PI=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineResponse",()=>[{no:1,name:"data_pipeline",kind:"message",T:Of}]),DI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),AI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesResponse",()=>[{no:1,name:"data_pipelines",kind:"message",T:Of,repeated:!0}]),UI=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"schedule",kind:"scalar",T:9},{no:5,name:"enable_backfill",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source_type",kind:"enum",T:s.getEnumType(sn),opt:!0}]),qI=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),LI=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),GI=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineResponse",[]),BI=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),FI=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineResponse",[]),xI=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),JI=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineResponse",[]),zI=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),VI=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineResponse",[]),$I=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_size",kind:"scalar",T:13},{no:3,name:"page_token",kind:"scalar",T:9}]),YI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsResponse",()=>[{no:1,name:"pipeline_id",kind:"scalar",T:9},{no:2,name:"runs",kind:"message",T:WI,repeated:!0},{no:3,name:"next_page_token",kind:"scalar",T:9}]),WI=s.makeMessageType("viam.app.datapipelines.v1.DataPipelineRun",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"start_time",kind:"message",T:_},{no:3,name:"end_time",kind:"message",T:_},{no:4,name:"data_start_time",kind:"message",T:_},{no:5,name:"data_end_time",kind:"message",T:_},{no:6,name:"status",kind:"enum",T:s.getEnumType(CI)},{no:7,name:"error_message",kind:"scalar",T:9}]),HI={typeName:"viam.app.datapipelines.v1.DataPipelinesService",methods:{getDataPipeline:{name:"GetDataPipeline",I:NI,O:PI,kind:m.Unary},listDataPipelines:{name:"ListDataPipelines",I:DI,O:AI,kind:m.Unary},createDataPipeline:{name:"CreateDataPipeline",I:UI,O:qI,kind:m.Unary},renameDataPipeline:{name:"RenameDataPipeline",I:LI,O:GI,kind:m.Unary},deleteDataPipeline:{name:"DeleteDataPipeline",I:BI,O:FI,kind:m.Unary},enableDataPipeline:{name:"EnableDataPipeline",I:xI,O:JI,kind:m.Unary},disableDataPipeline:{name:"DisableDataPipeline",I:zI,O:VI,kind:m.Unary},listDataPipelineRuns:{name:"ListDataPipelineRuns",I:$I,O:YI,kind:m.Unary}}},bf=s.makeMessageType("viam.app.dataset.v1.Dataset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"time_created",kind:"message",T:_}]),jI=s.makeMessageType("viam.app.dataset.v1.CreateDatasetRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),KI=s.makeMessageType("viam.app.dataset.v1.CreateDatasetResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),XI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),QI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetResponse",[]),ZI=s.makeMessageType("viam.app.dataset.v1.RenameDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),eO=s.makeMessageType("viam.app.dataset.v1.RenameDatasetResponse",[]),nO=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),aO=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDResponse",()=>[{no:1,name:"datasets",kind:"message",T:bf,repeated:!0}]),tO=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsRequest",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),sO=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsResponse",()=>[{no:1,name:"datasets",kind:"message",T:bf,repeated:!0}]),oO=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsRequest",()=>[{no:1,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9}]),iO=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsResponse",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9}]),rO={typeName:"viam.app.dataset.v1.DatasetService",methods:{createDataset:{name:"CreateDataset",I:jI,O:KI,kind:m.Unary},deleteDataset:{name:"DeleteDataset",I:XI,O:QI,kind:m.Unary},renameDataset:{name:"RenameDataset",I:ZI,O:eO,kind:m.Unary},listDatasetsByOrganizationID:{name:"ListDatasetsByOrganizationID",I:nO,O:aO,kind:m.Unary},listDatasetsByIDs:{name:"ListDatasetsByIDs",I:tO,O:sO,kind:m.Unary},mergeDatasets:{name:"MergeDatasets",I:oO,O:iO,kind:m.Unary}}},Mf=s.makeEnum("viam.app.datasync.v1.MimeType",[{no:0,name:"MIME_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MIME_TYPE_IMAGE_JPEG",localName:"IMAGE_JPEG"},{no:2,name:"MIME_TYPE_IMAGE_PNG",localName:"IMAGE_PNG"},{no:3,name:"MIME_TYPE_APPLICATION_PCD",localName:"APPLICATION_PCD"},{no:4,name:"MIME_TYPE_VIDEO_MP4",localName:"VIDEO_MP4"}]),tt=s.makeEnum("viam.app.datasync.v1.DataType",[{no:0,name:"DATA_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_TYPE_BINARY_SENSOR",localName:"BINARY_SENSOR"},{no:2,name:"DATA_TYPE_TABULAR_SENSOR",localName:"TABULAR_SENSOR"},{no:3,name:"DATA_TYPE_FILE",localName:"FILE"}]),ui=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:_n},{no:2,name:"sensor_contents",kind:"message",T:ki,repeated:!0}]),mO=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),gi=s.makeMessageType("viam.app.datasync.v1.FileUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:_n,oneof:"upload_packet"},{no:2,name:"file_contents",kind:"message",T:Ef,oneof:"upload_packet"}]),cO=s.makeMessageType("viam.app.datasync.v1.FileUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),lO=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:pO,oneof:"upload_packet"},{no:2,name:"data",kind:"scalar",T:12,oneof:"upload_packet"}]),dO=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),Ti=s.makeMessageType("viam.app.datasync.v1.SensorMetadata",()=>[{no:1,name:"time_requested",kind:"message",T:_},{no:2,name:"time_received",kind:"message",T:_},{no:3,name:"mime_type",kind:"enum",T:s.getEnumType(Mf)},{no:4,name:"annotations",kind:"message",T:xa}]),ki=s.makeMessageType("viam.app.datasync.v1.SensorData",()=>[{no:1,name:"metadata",kind:"message",T:Ti},{no:2,name:"struct",kind:"message",T:p,oneof:"data"},{no:3,name:"binary",kind:"scalar",T:12,oneof:"data"}]),Ef=s.makeMessageType("viam.app.datasync.v1.FileData",()=>[{no:1,name:"data",kind:"scalar",T:12}]),_n=s.makeMessageType("viam.app.datasync.v1.UploadMetadata",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:3,name:"component_name",kind:"scalar",T:9},{no:5,name:"method_name",kind:"scalar",T:9},{no:6,name:"type",kind:"enum",T:s.getEnumType(tt)},{no:8,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:Z}},{no:7,name:"file_name",kind:"scalar",T:9},{no:9,name:"file_extension",kind:"scalar",T:9},{no:14,name:"file_create_time",kind:"message",T:_},{no:15,name:"file_modify_time",kind:"message",T:_},{no:10,name:"tags",kind:"scalar",T:9,repeated:!0},{no:12,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),pO=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadMetadata",()=>[{no:1,name:"upload_metadata",kind:"message",T:_n},{no:2,name:"sensor_metadata",kind:"message",T:Ti}]),uO={typeName:"viam.app.datasync.v1.DataSyncService",methods:{dataCaptureUpload:{name:"DataCaptureUpload",I:ui,O:mO,kind:m.Unary},fileUpload:{name:"FileUpload",I:gi,O:cO,kind:m.ClientStreaming},streamingDataCaptureUpload:{name:"StreamingDataCaptureUpload",I:lO,O:dO,kind:m.ClientStreaming}}},Je=()=>{console.warn("The BinaryID type is deprecated and will be removed in a future release. Please migrate to the BinaryDataId field instead.")};class Hn{dataClient;datasetClient;dataSyncClient;dataPipelinesClient;static UPLOAD_CHUNK_SIZE=1024*64;constructor(e){this.dataClient=X(wI,e),this.datasetClient=X(rO,e),this.dataSyncClient=X(uO,e),this.dataPipelinesClient=X(HI,e)}async exportTabularData(e,n,t,o,i,r,c){const l=new zn;i&&(l.start=_.fromDate(i)),r&&(l.end=_.fromDate(r));let d;c&&(d=p.fromJson(c));const u={partId:e,resourceName:n,resourceSubtype:t,methodName:o,interval:l,additionalParameters:d},h=this.dataClient.exportTabularData(u),I=[];for await(const R of h)I.push({partId:R.partId,resourceName:R.resourceName,resourceSubtype:R.resourceSubtype,methodName:R.methodName,timeCaptured:R.timeCaptured.toDate(),organizationId:R.organizationId,locationId:R.locationId,robotName:R.robotName,robotId:R.robotId,partName:R.partName,methodParameters:R.methodParameters.toJson(),tags:R.tags,payload:R.payload.toJson()});return I}async tabularDataBySQL(e,n){return(await this.dataClient.tabularDataBySQL({organizationId:e,sqlQuery:n})).rawData.map(o=>Wn.deserialize(o))}async tabularDataByMQL(e,n,t,o,i){const r=n[0]instanceof Uint8Array?n:n.map(d=>Wn.serialize(d));let c=o;return t&&(!c||c.type===sn.UNSPECIFIED)&&(c=new Fo({type:sn.HOT_STORAGE})),(await this.dataClient.tabularDataByMQL({organizationId:e,mqlBinary:r,dataSource:c,queryPrefixName:i})).rawData.map(d=>Wn.deserialize(d))}async tabularDataByFilter(e,n,t,o="",i=!1,r=!1){const l={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:t,last:o},countOnly:i,includeInternalData:r},d=await this.dataClient.tabularDataByFilter(l),u=d.metadata.length,h=[];return h.push(...d.data.map(I=>{const R=I.metadataIndex,O=u!==0&&R>=u?new Fa:d.metadata[R];return{data:I.data?.toJson(),metadata:O,timeRequested:I.timeRequested?.toDate(),timeReceived:I.timeRequested?.toDate()}})),{data:h,count:d.count,last:d.last}}async binaryDataByFilter(e,n,t,o="",i=!0,r=!1,c=!1){const d={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:t,last:o},includeBinary:i,countOnly:r,includeInternalData:c},u=await this.dataClient.binaryDataByFilter(d);return{data:u.data,count:u.count,last:u.last}}async binaryDataByIds(e,n=!0){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.binaryDataByIDs({binaryDataIds:e,includeBinary:n})).data:(Je(),(await this.dataClient.binaryDataByIDs({binaryIds:e,includeBinary:n})).data)}async createBinaryDataSignedURL(e,n){return(await this.dataClient.createBinaryDataSignedURL({binaryDataId:e,expirationMinutes:n})).signedUrl}async deleteTabularData(e,n,t){return(await this.dataClient.deleteTabularData({organizationId:e,deleteOlderThanDays:n,filter:t})).deletedCount}async deleteBinaryDataByFilter(e,n=!0){return(await this.dataClient.deleteBinaryDataByFilter({filter:e,includeInternalData:n})).deletedCount}async deleteBinaryDataByIds(e){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.deleteBinaryDataByIDs({binaryDataIds:e})).deletedCount:(Je(),(await this.dataClient.deleteBinaryDataByIDs({binaryIds:e})).deletedCount)}async addTagsToBinaryDataByIds(e,n){if(Array.isArray(n)&&typeof n[0]=="string"){await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryDataIds:n});return}Je(),await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryIds:n})}async addTagsToBinaryDataByFilter(e,n){await this.dataClient.addTagsToBinaryDataByFilter({tags:e,filter:n})}async removeTagsFromBinaryDataByIds(e,n){return Array.isArray(n)&&typeof n[0]=="string"?(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryDataIds:n})).deletedCount:(Je(),(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryIds:n})).deletedCount)}async removeTagsFromBinaryDataByFilter(e,n){return(await this.dataClient.removeTagsFromBinaryDataByFilter({tags:e,filter:n})).deletedCount}async tagsByFilter(e){return(await this.dataClient.tagsByFilter({filter:e})).tags}async addBoundingBoxToImageById(e,n,t,o,i,r,c){return typeof e=="string"?(await this.dataClient.addBoundingBoxToImageByID({binaryDataId:e,label:n,xMinNormalized:t,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId:(Je(),(await this.dataClient.addBoundingBoxToImageByID({binaryId:e,label:n,xMinNormalized:t,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId)}async removeBoundingBoxFromImageById(e,n){if(typeof e=="string"){await this.dataClient.removeBoundingBoxFromImageByID({binaryDataId:e,bboxId:n});return}Je(),await this.dataClient.removeBoundingBoxFromImageByID({binaryId:e,bboxId:n})}async updateBoundingBox(e,n,t,o,i,r,c,l){if(typeof e=="string"){await this.dataClient.updateBoundingBox({binaryDataId:e,bboxId:n,label:t,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l});return}Je(),await this.dataClient.updateBoundingBox({binaryId:e,bboxId:n,label:t,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l})}async boundingBoxLabelsByFilter(e){return(await this.dataClient.boundingBoxLabelsByFilter({filter:e})).labels}async configureDatabaseUser(e,n){await this.dataClient.configureDatabaseUser({organizationId:e,password:n})}async getDatabaseConnection(e){return(await this.dataClient.getDatabaseConnection({organizationId:e})).hostname}async addBinaryDataToDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.addBinaryDataToDatasetByIDs({binaryDataIds:e,datasetId:n});return}Je(),await this.dataClient.addBinaryDataToDatasetByIDs({binaryIds:e,datasetId:n})}async removeBinaryDataFromDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryDataIds:e,datasetId:n});return}Je(),await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryIds:e,datasetId:n})}async createDataset(e,n){return(await this.datasetClient.createDataset({name:e,organizationId:n})).id}async deleteDataset(e){await this.datasetClient.deleteDataset({id:e})}async renameDataset(e,n){await this.datasetClient.renameDataset({id:e,name:n})}async listDatasetsByOrganizationID(e){return(await this.datasetClient.listDatasetsByOrganizationID({organizationId:e})).datasets.map(t=>({created:t.timeCreated?.toDate(),...t}))}async listDatasetsByIds(e){return(await this.datasetClient.listDatasetsByIDs({ids:e})).datasets.map(t=>({created:t.timeCreated?.toDate(),...t}))}async tabularDataCaptureUpload(e,n,t,o,i,r,c){if(r.length!==e.length)throw new Error("dataRequestTimes and data lengths must be equal.");const l=new _n({partId:n,componentType:t,componentName:o,methodName:i,type:tt.TABULAR_SENSOR,tags:c}),d=[];for(const[I,R]of e.entries()){const O=new Ti,b=r[I];b&&(O.timeRequested=_.fromDate(b[0]),O.timeReceived=_.fromDate(b[1])),d.push(new ki({metadata:O,data:{case:"struct",value:p.fromJson(R)}}))}const u=new ui({metadata:l,sensorContents:d});return(await this.dataSyncClient.dataCaptureUpload(u)).fileId}async binaryDataCaptureUpload(e,n,t,o,i,r,c){const l=new _n({partId:n,componentType:t,componentName:o,methodName:i,type:tt.BINARY_SENSOR,tags:c?.tags,fileExtension:c?.fileExtension??"",datasetIds:c?.datasetIds,mimeType:c?.mimeType??""}),d=new ki({metadata:{timeRequested:_.fromDate(r[0]),timeReceived:_.fromDate(r[1])},data:{case:"binary",value:e}}),u=new ui({metadata:l,sensorContents:[d]});return(await this.dataSyncClient.dataCaptureUpload(u)).binaryDataId}async fileUpload(e,n,t){const o=new _n({partId:n,type:tt.FILE,...t});return(await this.dataSyncClient.fileUpload(Hn.fileUploadRequests(o,e))).binaryDataId}static async*fileUploadRequests(e,n){yield new gi({uploadPacket:{case:"metadata",value:e}});for(let t=0;t<n.length;t+=Hn.UPLOAD_CHUNK_SIZE){let o=t+Hn.UPLOAD_CHUNK_SIZE;o>n.length&&(o=n.length),yield new gi({uploadPacket:{case:"fileContents",value:new Ef({data:n.slice(t,o)})}})}}static createFilter(e){const n=new Ke(e);if(e.startTime??e.endTime){const o=new zn;e.startTime&&(o.start=_.fromDate(e.startTime)),e.endTime&&(o.end=_.fromDate(e.endTime)),n.interval=o}const t=new Ba;return e.tags&&(t.tags=e.tags,n.tagsFilter=t),n}async getLatestTabularData(e,n,t,o,i){let r;i&&(r=p.fromJson(i));const c=await this.dataClient.getLatestTabularData({partId:e,resourceName:n,resourceSubtype:t,methodName:o,additionalParameters:r});return!c.payload||!c.timeCaptured||!c.timeSynced?null:[c.timeCaptured.toDate(),c.timeSynced.toDate(),c.payload.toJson()]}async listDataPipelines(e){return(await this.dataPipelinesClient.listDataPipelines({organizationId:e})).dataPipelines}async getDataPipeline(e){return(await this.dataPipelinesClient.getDataPipeline({id:e})).dataPipeline??null}async createDataPipeline(e,n,t,o,i,r){const c=t[0]instanceof Uint8Array?t:t.map(u=>Wn.serialize(u)),l=r??sn.STANDARD;return(await this.dataPipelinesClient.createDataPipeline({organizationId:e,name:n,mqlBinary:c,schedule:o,enableBackfill:i,dataSourceType:l})).id}async deleteDataPipeline(e){await this.dataPipelinesClient.deleteDataPipeline({id:e})}async listDataPipelineRuns(e,n){const t=await this.dataPipelinesClient.listDataPipelineRuns({id:e,pageSize:n});return new st(this.dataPipelinesClient,e,t.runs,n,t.nextPageToken)}async createIndex(e,n,t,o){await this.dataClient.createIndex({organizationId:e,collectionType:n,indexSpec:[Wn.serialize(t)],pipelineName:o})}async listIndexes(e,n,t){return(await this.dataClient.listIndexes({organizationId:e,collectionType:n,pipelineName:t})).indexes}async deleteIndex(e,n,t,o){await this.dataClient.deleteIndex({organizationId:e,collectionType:n,indexName:t,pipelineName:o})}async createSequence(e,n,t,o,i){return(await this.dataClient.createSequence({organizationId:e,resources:n,sequenceTags:t,startTime:o?_.fromDate(o):void 0,endTime:i?_.fromDate(i):void 0})).id}async getSequence(e){const n=await this.dataClient.getSequence({id:e});if(!n.sequence)throw new Error("no sequence returned");return n.sequence}async updateSequence(e,n,t,o,i,r){await this.dataClient.updateSequence({id:e,resources:n,sequenceTags:t,startTime:o?_.fromDate(o):void 0,endTime:i?_.fromDate(i):void 0,fieldMask:r})}async deleteSequence(e){await this.dataClient.deleteSequence({id:e})}async listSequences(e,n,t){const o=await this.dataClient.listSequences({organizationId:e,pageToken:n,pageSize:t});return{sequences:o.sequences,nextPageToken:o.nextPageToken}}}class st{constructor(e,n,t=[],o,i){this.dataPipelinesClient=e,this.pipelineId=n,this.runs=t,this.pageSize=o,this.nextPageToken=i}async nextPage(){if(this.nextPageToken===void 0||this.nextPageToken==="")return new st(this.dataPipelinesClient,this.pipelineId,[],this.pageSize,"");const e=await this.dataPipelinesClient.listDataPipelineRuns({id:this.pipelineId,pageSize:this.pageSize,pageToken:this.nextPageToken});return new st(this.dataPipelinesClient,this.pipelineId,e.runs,this.pageSize,e.nextPageToken)}}const gO={typeName:"viam.app.mltraining.v1.MLTrainingService",methods:{submitTrainingJob:{name:"SubmitTrainingJob",I:Sg,O:Ig,kind:m.Unary},submitCustomTrainingJob:{name:"SubmitCustomTrainingJob",I:Og,O:bg,kind:m.Unary},getTrainingJob:{name:"GetTrainingJob",I:Mg,O:Eg,kind:m.Unary},listTrainingJobs:{name:"ListTrainingJobs",I:wg,O:Cg,kind:m.Unary},cancelTrainingJob:{name:"CancelTrainingJob",I:Ng,O:Pg,kind:m.Unary},deleteCompletedTrainingJob:{name:"DeleteCompletedTrainingJob",I:Dg,O:Ag,kind:m.Unary},getTrainingJobLogs:{name:"GetTrainingJobLogs",I:qg,O:Lg,kind:m.Unary},listSupportedContainers:{name:"ListSupportedContainers",I:Gg,O:Bg,kind:m.Unary}}};class TO{client;constructor(e){this.client=X(gO,e)}async submitTrainingJob(e,n,t,o,i,r){return(await this.client.submitTrainingJob({organizationId:e,datasetId:n,modelName:t,modelVersion:o,modelType:i,tags:r})).id}async submitCustomTrainingJob(e,n,t,o,i,r){return(await this.client.submitCustomTrainingJob({organizationId:e,datasetId:n,registryItemId:t,registryItemVersion:o,modelName:i,modelVersion:r})).id}async getTrainingJob(e){return(await this.client.getTrainingJob({id:e})).metadata}async listTrainingJobs(e,n){return(await this.client.listTrainingJobs({organizationId:e,status:n})).jobs}async cancelTrainingJob(e){return await this.client.cancelTrainingJob({id:e}),null}async deleteCompletedTrainingJob(e){return await this.client.deleteCompletedTrainingJob({id:e}),null}}const wf=s.makeMessageType("viam.provisioning.v1.ExitProvisioningRequest",[]),Cf=s.makeMessageType("viam.provisioning.v1.ExitProvisioningResponse",[]),Nf=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusRequest",[]),Pf=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusResponse",()=>[{no:1,name:"provisioning_info",kind:"message",T:Bf},{no:2,name:"has_smart_machine_credentials",kind:"scalar",T:8},{no:3,name:"is_online",kind:"scalar",T:8},{no:4,name:"latest_connection_attempt",kind:"message",T:yi},{no:5,name:"errors",kind:"scalar",T:9,repeated:!0},{no:6,name:"agent_version",kind:"scalar",T:9}]),Df=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsRequest",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"psk",kind:"scalar",T:9}]),Af=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsResponse",[]),Uf=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsRequest",()=>[{no:1,name:"cloud",kind:"message",T:vi}]),qf=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsResponse",[]),Lf=s.makeMessageType("viam.provisioning.v1.GetNetworkListRequest",[]),Gf=s.makeMessageType("viam.provisioning.v1.GetNetworkListResponse",()=>[{no:1,name:"networks",kind:"message",T:yi,repeated:!0}]),Bf=s.makeMessageType("viam.provisioning.v1.ProvisioningInfo",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"manufacturer",kind:"scalar",T:9}]),yi=s.makeMessageType("viam.provisioning.v1.NetworkInfo",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"security",kind:"scalar",T:9},{no:4,name:"signal",kind:"scalar",T:5},{no:5,name:"connected",kind:"scalar",T:8},{no:6,name:"last_error",kind:"scalar",T:9}]),vi=s.makeMessageType("viam.provisioning.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"app_address",kind:"scalar",T:9},{no:4,name:"api_key",kind:"message",T:Ff}]),Ff=s.makeMessageType("viam.provisioning.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),kO=Object.freeze(Object.defineProperty({__proto__:null,APIKey:Ff,CloudConfig:vi,ExitProvisioningRequest:wf,ExitProvisioningResponse:Cf,GetNetworkListRequest:Lf,GetNetworkListResponse:Gf,GetSmartMachineStatusRequest:Nf,GetSmartMachineStatusResponse:Pf,NetworkInfo:yi,ProvisioningInfo:Bf,SetNetworkCredentialsRequest:Df,SetNetworkCredentialsResponse:Af,SetSmartMachineCredentialsRequest:Uf,SetSmartMachineCredentialsResponse:qf},Symbol.toStringTag,{value:"Module"})),yO={typeName:"viam.provisioning.v1.ProvisioningService",methods:{getSmartMachineStatus:{name:"GetSmartMachineStatus",I:Nf,O:Pf,kind:m.Unary},setNetworkCredentials:{name:"SetNetworkCredentials",I:Df,O:Af,kind:m.Unary},setSmartMachineCredentials:{name:"SetSmartMachineCredentials",I:Uf,O:qf,kind:m.Unary},getNetworkList:{name:"GetNetworkList",I:Lf,O:Gf,kind:m.Unary},exitProvisioning:{name:"ExitProvisioning",I:wf,O:Cf,kind:m.Unary}}};class vO{client;constructor(e){this.client=X(yO,e)}async getSmartMachineStatus(){return this.client.getSmartMachineStatus({})}async setNetworkCredentials(e,n,t){await this.client.setNetworkCredentials({type:e,ssid:n,psk:t})}async setSmartMachineCredentials(e){await this.client.setSmartMachineCredentials({cloud:e})}async getNetworkList(){return(await this.client.getNetworkList({})).networks}}const hO=async({serviceHost:a="https://app.viam.com",credentials:e})=>{const n=await nS(a,e);return new fO(n,e)};class fO{transport;credentials;dataClient;appClient;mlTrainingClient;provisioningClient;billingClient;constructor(e,n){this.transport=e,this.credentials=n,this.dataClient=new Hn(this.transport),this.appClient=new SI(this.transport),this.mlTrainingClient=new TO(this.transport),this.provisioningClient=new vO(this.transport),this.billingClient=new bI(this.transport)}async getRobotSecretFromHost(e){const t=e.split(".viam.")[0]?.split(".");if(t!==void 0){const o=t.at(-1);if(o===void 0)return;const i=e.split(".").at(0);if(i!==void 0)return(await this.appClient.getRobotPartByNameAndLocation(i,o)).part?.secret}}async connectToMachine({host:e=void 0,id:n=void 0}){if(e===void 0&&n===void 0)throw new Error("Either a machine address or ID must be provided");let t=e,o;if(n!==void 0&&e===void 0){const c=(await this.appClient.getRobotParts(n)).find(l=>l.mainPart);if(!c)throw new Error(`Could not find a main part for the machine with UUID: ${n}`);t=c.fqdn,o=c.secret}if(t===void 0||t==="")throw new Error("Host was not provided and could not be obtained from the machine ID");let i=this.credentials;return Fn(i)||(o===void 0&&(o=await this.getRobotSecretFromHost(t)),i=o===void 0?i:{type:"robot-secret",payload:o,authEntity:t}),_g({host:t,credentials:i,signalingAddress:"https://app.viam.com:443",reconnectMaxAttempts:1})}}const{JointPositions:RO}=Tm;class _O{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(km),this.name=n,this.options=t}async getEndPosition(e={},n=this.callOptions){const t=new xt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getEndPosition(t,n)).pose;if(!i)throw new Error("no pose");return i}async getGeometries(e={},n=this.callOptions){return sm(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return tm(this.client.getKinematics,this.name,p.fromJson(e),n)}async get3DModels(e={},n=this.callOptions){const t=new qt({name:this.name,extra:p.fromJson(e)});return(await this.client.get3DModels(t,n)).models}async moveToPosition(e,n={},t=this.callOptions){const o=new zt({name:this.name,to:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.moveToPosition(o,t)}async moveToJointPositions(e,n={},t=this.callOptions){const o=new kn({values:e}),i=new Vt({name:this.name,positions:o,extra:p.fromJson(n)});this.options.requestLogger?.(i),await this.client.moveToJointPositions(i,t)}async getJointPositions(e={},n=this.callOptions){const t=new Jt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getJointPositions(t,n)).positions;if(!i)throw new Error("no pose");return i}async stop(e={},n=this.callOptions){const t=new $t({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new Yt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const xf=s.makeMessageType("viam.component.audioin.v1.GetAudioRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"duration_seconds",kind:"scalar",T:2},{no:3,name:"codec",kind:"scalar",T:9},{no:4,name:"request_id",kind:"scalar",T:9},{no:5,name:"previous_timestamp_nanoseconds",kind:"scalar",T:3},{no:99,name:"extra",kind:"message",T:p}]),SO=s.makeMessageType("viam.component.audioin.v1.GetAudioResponse",()=>[{no:1,name:"audio",kind:"message",T:IO},{no:2,name:"request_id",kind:"scalar",T:9}]),IO=s.makeMessageType("viam.component.audioin.v1.AudioChunk",()=>[{no:1,name:"audio_data",kind:"scalar",T:12},{no:2,name:"audio_info",kind:"message",T:Lt},{no:3,name:"start_timestamp_nanoseconds",kind:"scalar",T:3},{no:4,name:"end_timestamp_nanoseconds",kind:"scalar",T:3},{no:5,name:"sequence",kind:"scalar",T:5}]),OO={typeName:"viam.component.audioin.v1.AudioInService",methods:{getAudio:{name:"GetAudio",I:xf,O:SO,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Gn,O:Gt,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}};class bO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(OO),this.name=n,this.options=t}async*getAudio(e,n,t=0n,o={},i=this.callOptions){const r=new xf({name:this.name,codec:e,durationSeconds:n,previousTimestampNanoseconds:t,extra:p.fromJson(o)});this.options.requestLogger?.(r);const c=this.client.getAudio(r,i);for await(const l of c)l.audio&&(yield{audioData:l.audio.audioData,audioInfo:l.audio.audioInfo,startTimeNs:l.audio.startTimestampNanoseconds,endTimeNs:l.audio.endTimestampNanoseconds,sequence:l.audio.sequence,requestID:l.requestId})}async getProperties(e={},n=this.callOptions){const t=new Gn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getProperties(t,n);return{supportedCodecs:o.supportedCodecs,sampleRateHz:o.sampleRateHz,numChannels:o.numChannels}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const MO={MP3:"mp3",PCM16:"pcm16",PCM32:"pcm32",PCM32_FLOAT:"pcm32_float",AAC:"aac",OPUS:"opus",FLAC:"flac",WAV:"wav"},Jf=s.makeMessageType("viam.component.audioout.v1.PlayRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"audio_data",kind:"scalar",T:12},{no:3,name:"audio_info",kind:"message",T:Lt},{no:99,name:"extra",kind:"message",T:p}]),EO={typeName:"viam.component.audioout.v1.AudioOutService",methods:{play:{name:"Play",I:Jf,O:s.makeMessageType("viam.component.audioout.v1.PlayResponse",[]),kind:m.Unary},getProperties:{name:"GetProperties",I:Gn,O:Gt,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}};class wO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(EO),this.name=n,this.options=t}async play(e,n,t={},o=this.callOptions){const i=new Jf({name:this.name,audioData:e,audioInfo:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.play(i,o)}async getProperties(e={},n=this.callOptions){const t=new Gn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getProperties(t,n);return{supportedCodecs:o.supportedCodecs,sampleRateHz:o.sampleRateHz,numChannels:o.numChannels}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:CO}=Im;class NO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Om),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async moveStraight(e,n,t={},o=this.callOptions){const i=new Wt({name:this.name,mmPerSec:n,distanceMm:e?BigInt(e):void 0,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.moveStraight(i,o)}async spin(e,n,t={},o=this.callOptions){const i=new Ht({name:this.name,angleDeg:e,degsPerSec:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.spin(i,o)}async setPower(e,n,t={},o=this.callOptions){const i=new Kt({name:this.name,linear:e,angular:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPower(i,o)}async setVelocity(e,n,t={},o=this.callOptions){const i=new Xt({name:this.name,linear:e,angular:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setVelocity(i,o)}async stop(e={},n=this.callOptions){const t=new jt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new Qt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}async getProperties(e={},n=this.callOptions){const t=new Aa({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getProperties(t,n)}}const{ReadAnalogReaderResponse:PO,PowerMode:DO}=Gm;class AO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Bm),this.name=n,this.options=t}async setGPIO(e,n,t={},o=this.callOptions){const i=new Zt({name:this.name,pin:e,high:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setGPIO(i,o)}async getGPIO(e,n={},t=this.callOptions){const o=new es({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getGPIO(o,t)).high}async getPWM(e,n={},t=this.callOptions){const o=new ns({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.pWM(o,t)).dutyCyclePct}async setPWM(e,n,t={},o=this.callOptions){const i=new as({name:this.name,pin:e,dutyCyclePct:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPWM(i,o)}async getPWMFrequency(e,n={},t=this.callOptions){const o=new ts({name:this.name,pin:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.pWMFrequency(o,t);return Number(i.frequencyHz)}async setPWMFrequency(e,n,t={},o=this.callOptions){const i=new ss({name:this.name,pin:e,frequencyHz:n?BigInt(n):void 0,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPWMFrequency(i,o)}async readAnalogReader(e,n={},t=this.callOptions){const o=new os({boardName:this.name,analogReaderName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.readAnalogReader(o,t)}async writeAnalog(e,n,t={},o=this.callOptions){const i=new is({name:this.name,pin:e,value:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.writeAnalog(i,o)}async getDigitalInterruptValue(e,n={},t=this.callOptions){const o=new rs({boardName:this.name,digitalInterruptName:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getDigitalInterruptValue(o,t);return Number(i.value)}async streamTicks(e,n,t={},o=this.callOptions){const i=new ms({name:this.name,pinNames:e,extra:p.fromJson(t)});this.options.requestLogger?.(i);const r=this.client.streamTicks(i,o);for await(const c of r)n.push({pinName:c.pinName,high:c.high,time:c.time?Number(c.time):0})}async setPowerMode(e,n,t={},o=this.callOptions){const i=new cs({name:this.name,powerMode:e,duration:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPowerMode(i,o)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const hi=s.makeMessageType("viam.component.button.v1.PushRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),zf=s.makeMessageType("viam.component.button.v1.PushResponse",[]),UO=Object.freeze(Object.defineProperty({__proto__:null,PushRequest:hi,PushResponse:zf},Symbol.toStringTag,{value:"Module"})),qO={typeName:"viam.component.button.v1.ButtonService",methods:{push:{name:"Push",I:hi,O:zf,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}};class LO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(qO),this.name=n,this.options=t}async push(e={},n=this.callOptions){const t=new hi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.push(t,n)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const GO={typeName:"viam.component.camera.v1.CameraService",methods:{getImages:{name:"GetImages",I:Vo,O:$u,kind:m.Unary},getPointCloud:{name:"GetPointCloud",I:Yo,O:Yu,kind:m.Unary},getProperties:{name:"GetProperties",I:Wu,O:Hu,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},BO="pointcloud/pcd";class FO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(GO),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async getImages(e=[],n={},t=this.callOptions){const o=new Vo({name:this.name,filterSourceNames:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getImages(o,t),r=i.images.map(l=>({sourceName:l.sourceName,image:l.image,mimeType:l.mimeType})),c={capturedAt:i.responseMetadata?.capturedAt??new _};return{images:r,metadata:c}}async getPointCloud(e={},n=this.callOptions){const t=new Yo({name:this.name,mimeType:BO,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPointCloud(t,n)).pointCloud}async getProperties(e=this.callOptions){const n=new Aa({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class xO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Od),this.name=n,this.options=t}async discoverResources(e={},n=this.callOptions){const t=new To({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.discoverResources(t,n)).discoveries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:JO,PositionType:Vf}=zm;class zO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Vm),this.name=n,this.options=t}async resetPosition(e={},n=this.callOptions){const t=new ps({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.resetPosition(t,n)}async getProperties(e={},n=this.callOptions){const t=new us({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getProperties(t,n)}async getPosition(e=Vf.UNSPECIFIED,n={},t=this.callOptions){const o=new ds({name:this.name,positionType:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getPosition(o,t);return[i.value,i.positionType]}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class VO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Xm),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){return sm(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return tm(this.client.getKinematics,this.name,p.fromJson(e),n)}async getPosition(e={},n=this.callOptions){const t=new gs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).positionsMm}async moveToPosition(e,n,t={},o=this.callOptions){const i=new Ts({name:this.name,positionsMm:e,speedsMmPerSec:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.moveToPosition(i,o)}async home(e={},n=this.callOptions){const t=new ks({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.home(t,n)).homed}async getLengths(e={},n=this.callOptions){const t=new ys({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getLengths(t,n)).lengthsMm}async stop(e={},n=this.callOptions){const t=new vs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new hs({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{Capsule:$O,GeoGeometry:YO,GeoPoint:WO,GeometriesInFrame:HO,Geometry:jO,Orientation:KO,PointCloud:XO,Pose:QO,PoseInFrame:ZO,RectangularPrism:eb,ResourceName:nb,Sphere:ab,Transform:tb,Vector3:sb,WorldState:ob}=Bt,$f=a=>{const{latitude:e,longitude:n}=a;return!(typeof e!="number"||typeof n!="number"||Number.isNaN(e)||Number.isNaN(n))};class ib{client;options;name;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(ug),this.name=n,this.options=t}async metadata(e={},n=this.callOptions){const t=new lg({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.metadata(t,n)}async infer(e,n={},t=this.callOptions){const o=new cg({name:this.name,inputTensors:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.infer(o,t)}}class rb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Oc),this.name=n,this.options=t}async setPower(e,n={},t=this.callOptions){const o=new Cs({name:this.name,powerPct:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPower(o,t)}async goFor(e,n,t={},o=this.callOptions){const i=new Ns({name:this.name,rpm:e,revolutions:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.goFor(i,o)}async goTo(e,n,t={},o=this.callOptions){const i=new Ps({name:this.name,rpm:e,positionRevolutions:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.goTo(i,o)}async setRPM(e,n={},t=this.callOptions){const o=new Ds({name:this.name,rpm:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setRPM(o,t)}async resetZeroPosition(e,n={},t=this.callOptions){const o=new As({name:this.name,offset:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.resetZeroPosition(o,t)}async stop(e={},n=this.callOptions){const t=new qs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async getProperties(e={},n=this.callOptions){const t=new Gs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),{positionReporting:(await this.client.getProperties(t,n)).positionReporting}}async getPosition(e={},n=this.callOptions){const t=new Us({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).position}async isPowered(e={},n=this.callOptions){const t=new Ls({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.isPowered(t,n);return[o.isOn,o.powerPct]}async isMoving(e=this.callOptions){const n=new Bs({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class mb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Uc),this.name=n,this.options=t}async getLinearVelocity(e={},n=this.callOptions){const t=new Fs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getLinearVelocity(t,n)).linearVelocity;if(!i)throw new Error("no linear velocity");return i}async getAngularVelocity(e={},n=this.callOptions){const t=new xs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getAngularVelocity(t,n)).angularVelocity;if(!i)throw new Error("no angular velocity");return i}async getCompassHeading(e={},n=this.callOptions){const t=new Js({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getCompassHeading(t,n)).value}async getOrientation(e={},n=this.callOptions){const t=new zs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getOrientation(t,n)).orientation;if(!i)throw new Error("no orientation");return i}async getPosition(e={},n=this.callOptions){const t=new Vs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getPosition(t,n)}async getProperties(e={},n=this.callOptions){const t=new $s({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getProperties(t,n)}async getAccuracy(e={},n=this.callOptions){const t=new Ys({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getAccuracy(t,n)}async getLinearAcceleration(e={},n=this.callOptions){const t=new Ws({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getLinearAcceleration(t,n)).linearAcceleration;if(!i)throw new Error("no linear acceleration");return i}async getReadings(e={},n=this.callOptions){const t=new tn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getReadings(t,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetAccuracyResponse:cb,GetPositionResponse:lb,GetPropertiesResponse:db}=Ac;class pb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Bc),this.name=n,this.options=t}async getVoltage(e={},n=this.callOptions){const t=new Hs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getVoltage(t,n);return[o.volts,o.isAc]}async getCurrent(e={},n=this.callOptions){const t=new js({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getCurrent(t,n);return[o.amperes,o.isAc]}async getPower(e={},n=this.callOptions){const t=new Ks({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPower(t,n)).watts}async getReadings(e={},n=this.callOptions){const t=new tn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getReadings(t,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Yf={typeName:"viam.component.sensor.v1.SensorService",methods:{getReadings:{name:"GetReadings",I:tn,O:Da,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},ub=Object.freeze(Object.defineProperty({__proto__:null,SensorService:Yf},Symbol.toStringTag,{value:"Module"}));class gb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Yf),this.name=n,this.options=t}async getReadings(e={},n=this.callOptions){const t=new tn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getReadings(t,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Wf=s.makeMessageType("proto.stream.v1.ListStreamsRequest",[]),Hf=s.makeMessageType("proto.stream.v1.ListStreamsResponse",()=>[{no:1,name:"names",kind:"scalar",T:9,repeated:!0}]),fi=s.makeMessageType("proto.stream.v1.AddStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),jf=s.makeMessageType("proto.stream.v1.AddStreamResponse",[]),Ri=s.makeMessageType("proto.stream.v1.RemoveStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Kf=s.makeMessageType("proto.stream.v1.RemoveStreamResponse",[]),_i=s.makeMessageType("proto.stream.v1.Resolution",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5}]),Si=s.makeMessageType("proto.stream.v1.GetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Xf=s.makeMessageType("proto.stream.v1.GetStreamOptionsResponse",()=>[{no:1,name:"resolutions",kind:"message",T:_i,repeated:!0}]),ot=s.makeMessageType("proto.stream.v1.SetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"resolution",kind:"message",T:_i}]),Qf=s.makeMessageType("proto.stream.v1.SetStreamOptionsResponse",[]),Tb=Object.freeze(Object.defineProperty({__proto__:null,AddStreamRequest:fi,AddStreamResponse:jf,GetStreamOptionsRequest:Si,GetStreamOptionsResponse:Xf,ListStreamsRequest:Wf,ListStreamsResponse:Hf,RemoveStreamRequest:Ri,RemoveStreamResponse:Kf,Resolution:_i,SetStreamOptionsRequest:ot,SetStreamOptionsResponse:Qf},Symbol.toStringTag,{value:"Module"})),kb={typeName:"proto.stream.v1.StreamService",methods:{listStreams:{name:"ListStreams",I:Wf,O:Hf,kind:m.Unary},addStream:{name:"AddStream",I:fi,O:jf,kind:m.Unary},getStreamOptions:{name:"GetStreamOptions",I:Si,O:Xf,kind:m.Unary},setStreamOptions:{name:"SetStreamOptions",I:ot,O:Qf,kind:m.Unary},removeStream:{name:"RemoveStream",I:Ri,O:Kf,kind:m.Unary}}},jn=a=>a.replaceAll(":","+");class yb extends om{client;options;streams;constructor(e,n={}){super(),this.client=e.createServiceClient(kb),this.options=n,this.streams=new Set,e.on("track",t=>{this.emit("track",t)}),e.on(K.CONNECTED,()=>{for(const t of this.streams.values())this.add(t)})}async add(e){const n=new fi({name:jn(e)});this.options.requestLogger?.(n);try{await this.client.addStream(n),this.streams.add(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.addStream(n),this.streams.add(e)}}async remove(e){const n=new Ri({name:jn(e)});this.options.requestLogger?.(n);try{await this.client.removeStream(n),this.streams.delete(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.removeStream(n),this.streams.delete(e)}}async getOptions(e){const n=async i=>{const r=new Si({name:i});this.options.requestLogger?.(r);try{return(await this.client.getStreamOptions(r)).resolutions}catch{return[]}},t=jn(e);let o=await n(t);return o.length>0||(o=await n(e)),o}async setOptions(e,n,t){const o=new ot({name:jn(e),resolution:{width:n,height:t}});this.options.requestLogger?.(o);try{await this.client.setStreamOptions(o)}catch{o.name=e,this.options.requestLogger?.(o),await this.client.setStreamOptions(o)}}async resetOptions(e){const n=new ot({name:jn(e)});this.options.requestLogger?.(n);try{await this.client.setStreamOptions(n)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.setStreamOptions(n)}}STREAM_TIMEOUT=5e3;getStream=async e=>{const n=new Promise((t,o)=>{const i=r=>{const[c]=r.streams;c?c.id===e&&(this.off("track",i),t(c)):(this.off("track",i),o(new Error("Received track event with no streams")))};this.on("track",i),setTimeout(()=>{this.off("track",i),o(new Error(`Did not receive a stream after ${this.STREAM_TIMEOUT} ms`))},this.STREAM_TIMEOUT)});return await this.add(e),n}}const Ii=s.makeMessageType("viam.component.switch.v1.SetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),Zf=s.makeMessageType("viam.component.switch.v1.SetPositionResponse",[]),Oi=s.makeMessageType("viam.component.switch.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),eR=s.makeMessageType("viam.component.switch.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:13}]),bi=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),nR=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsResponse",()=>[{no:1,name:"number_of_positions",kind:"scalar",T:13},{no:2,name:"labels",kind:"scalar",T:9,repeated:!0}]),vb=Object.freeze(Object.defineProperty({__proto__:null,GetNumberOfPositionsRequest:bi,GetNumberOfPositionsResponse:nR,GetPositionRequest:Oi,GetPositionResponse:eR,SetPositionRequest:Ii,SetPositionResponse:Zf},Symbol.toStringTag,{value:"Module"})),hb={typeName:"viam.component.switch.v1.SwitchService",methods:{setPosition:{name:"SetPosition",I:Ii,O:Zf,kind:m.Unary},getPosition:{name:"GetPosition",I:Oi,O:eR,kind:m.Unary},getNumberOfPositions:{name:"GetNumberOfPositions",I:bi,O:nR,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}};class fb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(hb),this.name=n,this.options=t}async setPosition(e,n={},t=this.callOptions){const o=new Ii({name:this.name,position:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPosition(o,t)}async getPosition(e={},n=this.callOptions){const t=new Oi({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).position}async getNumberOfPositions(e={},n=this.callOptions){const t=new bi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getNumberOfPositions(t,n);if(o.labels.length>0&&o.labels.length!==o.numberOfPositions)throw new Error("the number of labels does not match the number of positions");return[o.numberOfPositions,o.labels]}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}let Rb=class{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(fs),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}};const _b={typeName:"viam.component.posetracker.v1.PoseTrackerService",methods:{getPoses:{name:"GetPoses",I:s.makeMessageType("viam.component.posetracker.v1.GetPosesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"body_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),O:s.makeMessageType("viam.component.posetracker.v1.GetPosesResponse",()=>[{no:1,name:"body_poses",kind:"map",K:9,V:{kind:"message",T:He}}]),kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}};class Sb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(_b),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class Ib{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(oc),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async open(e={},n=this.callOptions){const t=new Rs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.open(t,n)}async grab(e={},n=this.callOptions){const t=new _s({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.grab(t,n)}async stop(e={},n=this.callOptions){const t=new Ss({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new Is({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async isHoldingSomething(e={},n=this.callOptions){const t=new Os({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.isHoldingSomething(t,n)).isHoldingSomething}async getCurrentInputs(e={},n=this.callOptions){const t=new bs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getCurrentInputs(t,n)).values}async goToInputs(e,n={},t=this.callOptions){const o=new Ms({name:this.name,values:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.goToInputs(o,t)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class Ob{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(gc),this.name=n,this.options=t}async getEvents(e={},n=this.callOptions){const t=new Es({controller:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getEvents(t,n)).events}async triggerEvent(e,n={},t=this.callOptions){const o=new ws({controller:this.name,event:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.triggerEvent(o,t)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{Event:bb}=uc,{CollisionSpecification:Mb,Constraints:Eb,LinearConstraint:wb,ListPlanStatusesResponse:Cb,MotionConfiguration:Nb,ObstacleDetector:Pb,OrientationConstraint:Db}=$d;class Ab{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Yd),this.name=n,this.options=t}async move(e,n,t,o,i={},r=this.callOptions){const c=new ko({name:this.name,destination:e,componentName:n,worldState:t,constraints:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.move(c,r)).success}async moveOnMap(e,n,t,o,i,r={},c=this.callOptions){const l=new yo({name:this.name,destination:e,componentName:n,slamServiceName:t,motionConfiguration:o,obstacles:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.moveOnMap(l,c)).executionId}async moveOnGlobe(e,n,t,o,i,r,c,l={},d=this.callOptions){const u=new ho({name:this.name,destination:e,componentName:n,movementSensorName:t,heading:o,obstacles:i,boundingRegions:c,motionConfiguration:r,extra:p.fromJson(l)});return this.options.requestLogger?.(u),(await this.client.moveOnGlobe(u,d)).executionId}async stopPlan(e,n={},t=this.callOptions){const o=new Ro({name:this.name,componentName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),await this.client.stopPlan(o,t),null}async getPlan(e,n,t,o={},i=this.callOptions){const r=new So({name:this.name,componentName:e,lastPlanOnly:n,executionId:t,extra:p.fromJson(o)});return this.options.requestLogger?.(r),this.client.getPlan(r,i)}async listPlanStatuses(e,n={},t=this.callOptions){const o=new _o({name:this.name,onlyActivePlans:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.listPlanStatuses(o,t)}async getPose(e,n,t,o={},i=this.callOptions){const r=new fo({name:this.name,componentName:e,destinationFrame:n,supplementalTransforms:t,extra:p.fromJson(o)});this.options.requestLogger?.(r);const l=(await this.client.getPose(r,i)).pose;if(!l)throw new Error("no pose");return l}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Mi=s.makeMessageType("viam.service.datamanager.v1.SyncRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),aR=s.makeMessageType("viam.service.datamanager.v1.SyncResponse",[]),Ei=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"binary_data",kind:"scalar",T:12},{no:3,name:"tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"mime_type",kind:"enum",T:s.getEnumType(Mf)},{no:99,name:"extra",kind:"message",T:p}]),tR=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsResponse",[]),Ub=Object.freeze(Object.defineProperty({__proto__:null,SyncRequest:Mi,SyncResponse:aR,UploadBinaryDataToDatasetsRequest:Ei,UploadBinaryDataToDatasetsResponse:tR},Symbol.toStringTag,{value:"Module"})),qb={typeName:"viam.service.datamanager.v1.DataManagerService",methods:{sync:{name:"Sync",I:Mi,O:aR,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},uploadBinaryDataToDatasets:{name:"UploadBinaryDataToDatasets",I:Ei,O:tR,kind:m.Unary}}};class Lb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(qb),this.name=n,this.options=t}async sync(e={},n=this.callOptions){const t=new Mi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.sync(t,n)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}async uploadBinaryDataToDatasets(e,n,t,o,i={},r=this.callOptions){const c=new Ei({name:this.name,binaryData:e,tags:n,datasetIds:t,mimeType:o,extra:p.fromJson(i)});this.options.requestLogger?.(c),await this.client.uploadBinaryDataToDatasets(c,r)}}class Gb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(ip),this.name=n,this.options=t}async getMode(e={},n=this.callOptions){const t=new bo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getMode(t,n)).mode}async setMode(e,n={},t=this.callOptions){const o=new Mo({name:this.name,mode:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setMode(o,t)}async getLocation(e={},n=this.callOptions){const t=new Eo({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getLocation(t,n);if(!o.location)throw new Error("no location");if(!$f(o.location))throw new Error("invalid location");return o}async getWayPoints(e={},n=this.callOptions){const t=new wo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getWaypoints(t,n)).waypoints}async addWayPoint(e,n={},t=this.callOptions){const o=new Co({name:this.name,location:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.addWaypoint(o,t)}async removeWayPoint(e,n={},t=this.callOptions){const o=new No({name:this.name,id:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.removeWaypoint(o,t)}async getObstacles(e={},n=this.callOptions){const t=new Po({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getObstacles(t,n)).obstacles}async getPaths(e={},n=this.callOptions){const t=new Do({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPaths(t,n)).paths}async getProperties(e=this.callOptions){const n=new Ao({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetLocationResponse:Bb,GetPropertiesResponse:Fb,Path:xb,Waypoint:Jb}=op;class zb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Vc),this.name=n,this.options=t}async move(e,n={},t=this.callOptions){const o=new Xs({name:this.name,angleDeg:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.move(o,t)}async getPosition(e={},n=this.callOptions){const t=new Qs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).positionDeg}async stop(e={},n=this.callOptions){const t=new Zs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new eo({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class Vb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Tp),this.name=n,this.options=t}async getPosition(e=this.callOptions){const n=new Uo({name:this.name});return this.options.requestLogger?.(n),this.client.getPosition(n,e)}async getPointCloudMap(e,n=this.callOptions){const t=new qo({name:this.name,returnEditedMap:e});this.options.requestLogger?.(t);const o=[],i=this.client.getPointCloudMap(t,n);for await(const r of i)o.push(r.pointCloudPcdChunk);return sR(o)}async getInternalState(e=this.callOptions){const n=new Lo({name:this.name});this.options.requestLogger?.(n);const t=[],o=this.client.getInternalState(n,e);for await(const i of o)t.push(i.internalStateChunk);return sR(t)}async getProperties(e=this.callOptions){const n=new Go({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const sR=a=>{const e=a.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let t=0;for(const o of a)n.set(o,t),t+=o.length;return n},{GetPositionResponse:$b,GetPropertiesResponse:Yb}=gp;class Wb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(mg),this.name=n,this.options=t}async getDetectionsFromCamera(e,n={},t=this.callOptions){const o=new Ho({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getDetectionsFromCamera(o,t)).detections}async getDetections(e,n,t,o,i={},r=this.callOptions){const c=new Wo({name:this.name,image:e,width:n?BigInt(n):void 0,height:t?BigInt(t):void 0,mimeType:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.getDetections(c,r)).detections}async getClassificationsFromCamera(e,n,t={},o=this.callOptions){const i=new Ko({name:this.name,cameraName:e,n,extra:p.fromJson(t)});return this.options.requestLogger?.(i),(await this.client.getClassificationsFromCamera(i,o)).classifications}async getClassifications(e,n,t,o,i,r={},c=this.callOptions){const l=new jo({name:this.name,image:e,width:n,height:t,mimeType:o,n:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.getClassifications(l,c)).classifications}async getObjectPointClouds(e,n={},t=this.callOptions){const o=new Xo({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getObjectPointClouds(o,t)).objects}async getProperties(e={},n=this.callOptions){const t=new Qo({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getProperties(t,n);return{classificationsSupported:o.classificationsSupported,detectionsSupported:o.detectionsSupported,objectPointCloudsSupported:o.objectPointCloudsSupported}}async captureAllFromCamera(e,{returnImage:n,returnClassifications:t,returnDetections:o,returnObjectPointClouds:i},r={},c=this.callOptions){const l=new Zo({name:this.name,cameraName:e,returnImage:n,returnClassifications:t,returnDetections:o,returnObjectPointClouds:i,extra:p.fromJson(r)});this.options.requestLogger?.(l);const d=await this.client.captureAllFromCamera(l,c);return{image:d.image,classifications:d.classifications,detections:d.detections,objectPointClouds:d.objects,extra:d.extra}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{Classification:Hb,Detection:jb}=rg,{PointCloudObject:Kb}=Bt,oR=a=>Dn.UuidTool.toString([...a]),Xb=a=>new Uint8Array(Dn.UuidTool.toBytes(a)),wi=a=>({...a,uuidString:oR(a.uuid)});class Qb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(vg),this.name=n,this.options=t}async listUUIDs(e={},n=this.callOptions){const t=new Tg({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.listUUIDs(t,n)).uuids.map(i=>oR(i))}async getTransform(e,n={},t=this.callOptions){const o=new kg({name:this.name,uuid:Xb(e),extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getTransform(o,t);if(!i.transform)throw new Error("No transform returned from server");return wi(i.transform)}async*streamTransformChanges(e={},n=this.callOptions){const t=new yg({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=this.client.streamTransformChanges(t,n);for await(const i of o)i.transform&&(yield{...i,transform:wi(i.transform)})}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const iR=s.makeMessageType("viam.service.video.v1.GetVideoRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"start_timestamp",kind:"message",T:_},{no:3,name:"end_timestamp",kind:"message",T:_},{no:4,name:"video_codec",kind:"scalar",T:9},{no:5,name:"video_container",kind:"scalar",T:9},{no:6,name:"request_id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zb={typeName:"viam.service.video.v1.VideoService",methods:{getVideo:{name:"GetVideo",I:iR,O:s.makeMessageType("viam.service.video.v1.GetVideoResponse",()=>[{no:1,name:"video_data",kind:"scalar",T:12},{no:2,name:"video_container",kind:"scalar",T:9},{no:3,name:"request_id",kind:"scalar",T:9}]),kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},rR=a=>_.fromDate(a),eM=()=>crypto.randomUUID();class nM{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Zb),this.name=n,this.options=t}async*getVideo(e,n,t="",o="",i={},r=this.callOptions){const c=new iR({name:this.name,startTimestamp:e?rR(e):void 0,endTimestamp:n?rR(n):void 0,videoCodec:t,videoContainer:o,requestId:eM(),extra:p.fromJson(i)});this.options.requestLogger?.(c);const l=this.client.getVideo(c,r);for await(const d of l)yield d}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const mR={typeName:"viam.service.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},aM=Object.freeze(Object.defineProperty({__proto__:null,GenericService:mR},Symbol.toStringTag,{value:"Module"}));class tM{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(mR),this.name=n,this.options=t}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const sM="0.72.0";g.AnalogValue=PO,g.ArmClient=_O,g.ArmJointPositions=RO,g.AudioCodec=MO,g.AudioInClient=bO,g.AudioOutClient=wO,g.BaseClient=NO,g.BaseProperties=CO,g.BoardClient=AO,g.ButtonClient=LO,g.CameraClient=FO,g.Capsule=$O,g.Classification=Hb,g.Client=Xe,g.CloudConfig=vi,g.CollisionSpecification=Mb,g.ConnectError=C,g.ConnectionClosedError=ge,g.Constraints=Eb,g.DataManagerClient=Lb,g.Detection=jb,g.DiscoveryClient=xO,g.Duration=J,g.EncoderClient=zO,g.EncoderPositionType=Vf,g.EncoderProperties=JO,g.GantryClient=VO,g.GenericComponentClient=Rb,g.GenericServiceClient=tM,g.GeoGeometry=YO,g.GeoPoint=WO,g.GeometriesInFrame=HO,g.Geometry=jO,g.GripperClient=Ib,g.InputControllerClient=Ob,g.InputControllerEvent=bb,g.LinearConstraint=wb,g.ListPlanStatusesResponse=Cb,g.MLModelClient=ib,g.MachineConnectionEvent=K,g.ModelType=Qe,g.MotionClient=Ab,g.MotionConfiguration=Nb,g.MotorClient=rb,g.MovementSensorAccuracy=cb,g.MovementSensorClient=mb,g.MovementSensorPosition=lb,g.MovementSensorProperties=db,g.NavigationClient=Gb,g.NavigationPosition=Bb,g.NavigationProperties=Fb,g.ObstacleDetector=Pb,g.Orientation=KO,g.OrientationConstraint=Db,g.Path=xb,g.PointCloud=XO,g.PointCloudObject=Kb,g.Pose=QO,g.PoseInFrame=ZO,g.PoseTrackerClient=Sb,g.PowerMode=DO,g.PowerSensorClient=pb,g.RectangularPrism=eb,g.ResourceName=nb,g.RobotClient=Xe,g.SensorClient=gb,g.ServoClient=zb,g.SlamClient=Vb,g.SlamPosition=$b,g.SlamProperties=Yb,g.Sphere=ab,g.StreamClient=yb,g.Struct=p,g.SwitchClient=fb,g.Timestamp=_,g.TrainingStatus=Wa,g.Transform=tb,g.TransformChangeType=gg,g.Vector3=sb,g.VideoClient=nM,g.VisionClient=Wb,g.Waypoint=Jb,g.WorldState=ob,g.WorldStateStoreClient=Qb,g.addMetadata=Z_,g.appApi=RI,g.appRobotApi=US,g.armApi=Tm,g.baseApi=Im,g.billingApi=II,g.boardApi=Gm,g.buttonApi=UO,g.cameraApi=BS,g.commonApi=Bt,g.createConsoleLogWriter=__,g.createRobotClient=_g,g.createViamClient=hO,g.dataApi=LS,g.dataManagerApi=Ub,g.deleteMetadata=eS,g.disableDebugLogging=Q_,g.discoveryApi=qS,g.doCommandFromClient=q,g.enableDebugLogging=X_,g.encoderApi=zm,g.gantryApi=oS,g.genericComponentApi=iS,g.genericServiceApi=aM,g.getStatusFromClient=L,g.gripperApi=rS,g.inputControllerApi=uc,g.isValidGeoPoint=$f,g.mlTrainingApi=fI,g.motionApi=$d,g.motorApi=cS,g.movementSensorApi=Ac,g.navigationApi=op,g.powerSensorApi=lS,g.provisioningApi=kO,g.robotApi=bS,g.sensorApi=ub,g.servoApi=pS,g.setDebugLogWriter=h_,g.slamApi=gp,g.streamApi=Tb,g.switchApi=vb,g.transformWithUUID=wi,g.version=sM,g.visionApi=rg,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
8
|
+
};`],{type:"text/javascript"});class on{constructor(e,n){this.deferredTransport=n,this.host=e??"",this.transport=new rI(this.deferredTransport,this)}static heartbeatMonitoredMethods={};transport;currentSessionID="";sessionsSupported;heartbeatIntervalMs;host="";starting;get client(){const e=this.deferredTransport();return X(uo,e)}get sessionID(){return this.currentSessionID}setHost(e){this.host=e}getSessionMetadataInner(){const e=new Headers;return this.sessionsSupported&&this.currentSessionID!==""&&e.set("viam-sid",this.currentSessionID),e}reset(){this.starting||(this.sessionsSupported=void 0)}backgroundHeartbeat=!0;async heartbeat(){if(!this.sessionsSupported||this.currentSessionID==="")return;for(;this.starting;)await this.starting;let e;const n=async()=>{const a=new mo({id:this.currentSessionID});try{await this.client.sendSessionHeartbeat(a)}catch(o){if(o instanceof C&&o.code===g.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}if(o instanceof ge||o instanceof C&&o.rawMessage==="closed"){this.reset();return}}e?e.postMessage(this.heartbeatIntervalMs):setTimeout(()=>{n().catch(console.error)},this.heartbeatIntervalMs)};if(this.backgroundHeartbeat&&globalThis.Worker!==void 0){const a=window.URL.createObjectURL(mI);e=new Worker(a),URL.revokeObjectURL(a),e.addEventListener("message",()=>{n().catch(console.error)})}n().catch(console.error)}async getSessionMetadata(){for(;this.starting;)await this.starting;return this.sessionsSupported!==void 0?this.getSessionMetadataInner():(this.starting=new Promise((e,n)=>{(async()=>{const a=new ro;this.currentSessionID!==""&&(a.resume=this.currentSessionID);let o;try{o=await this.client.startSession(a)}catch(r){if(r instanceof C&&r.code===g.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}throw r}const{heartbeatWindow:i}=o;if(!i)throw new Error("expected heartbeat window in response to start session");this.sessionsSupported=!0,this.currentSessionID=o.id,this.heartbeatIntervalMs=(Number(i.seconds)*1e3+i.nanos/1e6)/5,await this.applyHeartbeatMonitoredMethods(),e(),this.heartbeat().catch(console.error)})().then(e).catch(n).finally(()=>{this.starting=void 0})}),await this.starting,this.getSessionMetadataInner())}async applyHeartbeatMonitoredMethods(){try{const e=X(iI,this.transport),n=new Wa({host:this.host,messageRequest:{case:"listServices",value:""}}),a=e.serverReflectionInfo(Tt([n]),{timeoutMs:1e4});for await(const o of a){const i=o.messageResponse.value.service.map(c=>new Wa({messageRequest:{case:"fileContainingSymbol",value:c.name}})),r=e.serverReflectionInfo(Tt(i),{timeoutMs:1e4});for await(const c of r)for(const l of c.messageResponse.value.fileDescriptorProto){const d=re.fromBinary(l);for(const u of d.service)for(const h of u.method)on.heartbeatMonitoredMethods[`/${d.package}.${u.name}/${h.name}`]=on.hasHeartbeatOption(h.options)}}}catch{on.heartbeatMonitoredMethods={"/viam.component.arm.v1.ArmService/MoveToPosition":!0,"/viam.component.arm.v1.ArmService/MoveToJointPositions":!0,"/viam.component.arm.v1.ArmService/MoveThroughJointPositions":!0,"/viam.component.base.v1.BaseService/MoveStraight":!0,"/viam.component.base.v1.BaseService/Spin":!0,"/viam.component.base.v1.BaseService/SetPower":!0,"/viam.component.base.v1.BaseService/SetVelocity":!0,"/viam.component.gantry.v1.GantryService/MoveToPosition":!0,"/viam.component.gripper.v1.GripperService/Open":!0,"/viam.component.gripper.v1.GripperService/Grab":!0,"/viam.component.motor.v1.MotorService/SetPower":!0,"/viam.component.motor.v1.MotorService/GoFor":!0,"/viam.component.motor.v1.MotorService/GoTo":!0,"/viam.component.motor.v1.MotorService/SetRPM":!0,"/viam.component.servo.v1.ServoService/Move":!0}}}static hasHeartbeatOption(e){if(!e)return!1;const n=new $i(e.toBinary());for(;n.pos<n.len;){const a=n.tag(),[o]=a;if(o===sm.field.no)return!0;n.string()}return!1}}const cI=s.makeEnum("viam.service.mlmodel.v1.LabelType",[{no:0,name:"LABEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"LABEL_TYPE_TENSOR_VALUE",localName:"TENSOR_VALUE"},{no:2,name:"LABEL_TYPE_TENSOR_AXIS",localName:"TENSOR_AXIS"}]),yg=s.makeMessageType("viam.service.mlmodel.v1.InferRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:3,name:"input_tensors",kind:"message",T:fg},{no:99,name:"extra",kind:"message",T:p}]),lI=s.makeMessageType("viam.service.mlmodel.v1.InferResponse",()=>[{no:3,name:"output_tensors",kind:"message",T:fg}]),vg=s.makeMessageType("viam.service.mlmodel.v1.MetadataRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),dI=s.makeMessageType("viam.service.mlmodel.v1.MetadataResponse",()=>[{no:1,name:"metadata",kind:"message",T:pI}]),pI=s.makeMessageType("viam.service.mlmodel.v1.Metadata",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"input_info",kind:"message",T:hg,repeated:!0},{no:5,name:"output_info",kind:"message",T:hg,repeated:!0}]),hg=s.makeMessageType("viam.service.mlmodel.v1.TensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"data_type",kind:"scalar",T:9},{no:4,name:"shape",kind:"scalar",T:5,repeated:!0},{no:5,name:"associated_files",kind:"message",T:uI,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),uI=s.makeMessageType("viam.service.mlmodel.v1.File",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"label_type",kind:"enum",T:s.getEnumType(cI)}]),gI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),TI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),kI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),yI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),vI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt32",()=>[{no:1,name:"data",kind:"scalar",T:15,repeated:!0}]),hI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt32",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),fI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt64",()=>[{no:1,name:"data",kind:"scalar",T:16,repeated:!0}]),RI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt64",()=>[{no:1,name:"data",kind:"scalar",T:6,repeated:!0}]),_I=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataFloat",()=>[{no:1,name:"data",kind:"scalar",T:2,repeated:!0}]),SI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataDouble",()=>[{no:1,name:"data",kind:"scalar",T:1,repeated:!0}]),II=s.makeMessageType("viam.service.mlmodel.v1.FlatTensor",()=>[{no:1,name:"shape",kind:"scalar",T:6,repeated:!0},{no:2,name:"int8_tensor",kind:"message",T:gI,oneof:"tensor"},{no:3,name:"uint8_tensor",kind:"message",T:TI,oneof:"tensor"},{no:4,name:"int16_tensor",kind:"message",T:kI,oneof:"tensor"},{no:5,name:"uint16_tensor",kind:"message",T:yI,oneof:"tensor"},{no:6,name:"int32_tensor",kind:"message",T:vI,oneof:"tensor"},{no:7,name:"uint32_tensor",kind:"message",T:hI,oneof:"tensor"},{no:8,name:"int64_tensor",kind:"message",T:fI,oneof:"tensor"},{no:9,name:"uint64_tensor",kind:"message",T:RI,oneof:"tensor"},{no:10,name:"float_tensor",kind:"message",T:_I,oneof:"tensor"},{no:11,name:"double_tensor",kind:"message",T:SI,oneof:"tensor"}]),fg=s.makeMessageType("viam.service.mlmodel.v1.FlatTensors",()=>[{no:1,name:"tensors",kind:"map",K:9,V:{kind:"message",T:II}}]),Rg={typeName:"viam.service.mlmodel.v1.MLModelService",methods:{infer:{name:"Infer",I:yg,O:lI,kind:m.Unary},metadata:{name:"Metadata",I:vg,O:dI,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},_g=s.makeEnum("viam.service.worldstatestore.v1.TransformChangeType",[{no:0,name:"TRANSFORM_CHANGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRANSFORM_CHANGE_TYPE_ADDED",localName:"ADDED"},{no:2,name:"TRANSFORM_CHANGE_TYPE_REMOVED",localName:"REMOVED"},{no:3,name:"TRANSFORM_CHANGE_TYPE_UPDATED",localName:"UPDATED"}]),Sg=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),EI=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsResponse",()=>[{no:1,name:"uuids",kind:"scalar",T:12,repeated:!0}]),Ig=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"uuid",kind:"scalar",T:12},{no:99,name:"extra",kind:"message",T:p}]),OI=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformResponse",()=>[{no:2,name:"transform",kind:"message",T:xe}]),Eg=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),MI=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesResponse",()=>[{no:1,name:"change_type",kind:"enum",T:s.getEnumType(_g)},{no:2,name:"transform",kind:"message",T:xe},{no:3,name:"updated_fields",kind:"message",T:pe}]),Og={typeName:"viam.service.worldstatestore.v1.WorldStateStoreService",methods:{listUUIDs:{name:"ListUUIDs",I:Sg,O:EI,kind:m.Unary},getTransform:{name:"GetTransform",I:Ig,O:OI,kind:m.Unary},streamTransformChanges:{name:"StreamTransformChanges",I:Eg,O:MI,kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},bI=(t,e)=>{if(t==null)throw new Error(e)},vn="Dial operation aborted",wI=t=>{const e=t;return typeof e.signalingAddress!="string"?!1:!e.iceServers||Array.isArray(e.iceServers)},Mg=t=>t>0&&Number.isInteger(t),bg=t=>{if(t instanceof C&&[g.Code.Canceled,g.Code.InvalidArgument,g.Code.NotFound,g.Code.AlreadyExists,g.Code.PermissionDenied,g.Code.FailedPrecondition,g.Code.OutOfRange,g.Code.Unimplemented,g.Code.Unauthenticated].includes(t.code))return!1;if(t instanceof Error){const e=t.message.toLowerCase();if(e.includes("invalid")||e.includes("configuration")||e.includes("cannot dial"))return!1}return!0},CI=t=>{if(t.credentials&&Fn(t.credentials))try{t.credentials.authEntity=new URL(t.credentials.authEntity).host}catch(e){if(!(e instanceof TypeError))throw e}if(t.reconnectMaxAttempts!==void 0&&!Mg(t.reconnectMaxAttempts))throw new Error(`Value of max reconnect attempts (${t.reconnectMaxAttempts}) should be a positive integer`);if(t.reconnectMaxWait!==void 0&&!Mg(t.reconnectMaxWait))throw new Error(`Value of max reconnect wait (${t.reconnectMaxWait}) should be a positive integer`)},wg=t=>{if(t instanceof Error&&t.message===vn)throw t};class Xe extends rm{serviceHost="";webrtcOptions={enabled:!1,host:"",signalingAddress:"",rtcConfig:{}};directOptions={};sessionOptions={disabled:!1};gRPCConnectionManager;sessionManager;peerConn;dataChannel;transport;connecting;connectResolve;dialing;currentDialAbortSignal;savedCreds;closed;robotServiceClient;armServiceClient;baseServiceClient;boardServiceClient;encoderServiceClient;gantryServiceClient;genericServiceClient;gripperServiceClient;mlModelServiceClient;movementSensorServiceClient;powerSensorServiceClient;inputControllerServiceClient;motorServiceClient;navigationServiceClient;discoveryServiceClient;motionServiceClient;visionServiceClient;servoServiceClient;slamServiceClient;worldStateStoreServiceClient;currentRetryAttempt=0;isReconnecting=!1;connectionId;onICEConnectionStateChange;onDataChannelClose;onTrack;constructor(e,n,a,o){super(),e!==void 0&&(this.serviceHost=e),n&&(this.webrtcOptions=n),o&&(this.directOptions=o),a&&(this.sessionOptions=a),this.gRPCConnectionManager=new QS(()=>{if(!this.transport)throw new Error(Xe.notConnectedYetStr);return this.transport},()=>{this.onDisconnect()}),this.sessionManager=new on(this.serviceHost,()=>{if(!this.transport)throw new Error(Xe.notConnectedYetStr);return this.transport});for(const i of Object.values(K))this.on(i,()=>{this.emit("connectionstatechange",{eventType:i})});this.closed=!1}cleanupEventListeners(){this.peerConn&&this.onICEConnectionStateChange&&(this.peerConn.removeEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onICEConnectionStateChange=void 0),this.peerConn&&this.onTrack&&(this.peerConn.removeEventListener("track",this.onTrack),this.onTrack=void 0),this.dataChannel&&this.onDataChannelClose&&(this.dataChannel.removeEventListener("close",this.onDataChannelClose),this.onDataChannelClose=void 0)}onDisconnect(e){if(this.noReconnect!==void 0&&this.noReconnect){this.emit(K.DISCONNECTED,e??{});return}if(this.closed){this.emit(K.DISCONNECTED,e??{});return}this.isReconnecting=!0,this.emit(K.RECONNECTING,{event:e??{}}),console.debug("Connection closed, will try to reconnect");const n={retry:(a,o)=>(console.debug(`Failed to connect, attempt ${o} with backoff`,a),this.currentRetryAttempt=o,this.closed?!1:bg(a)?!0:this.shouldRetryOnError?.()?(console.debug("Non-retryable error encountered, but shouldRetryOnError returned true",a),!0):(console.debug("Non-retryable error encountered, stopping reconnection attempts",a),!1))};this.reconnectMaxWait!==void 0&&(n.maxDelay=this.reconnectMaxWait),this.reconnectMaxAttempts!==void 0&&(n.numOfAttempts=this.reconnectMaxAttempts),this.currentRetryAttempt=0,Mt(async()=>this.connect(),n).then(()=>{this.isReconnecting=!1,console.debug("Reconnected successfully!")}).catch(a=>{this.isReconnecting=!1,console.debug(`Reconnection failed after ${this.currentRetryAttempt} attempt(s)`,a),this.emit(K.RECONNECTION_FAILED,{error:a,attempts:this.currentRetryAttempt})})}get noReconnect(){return this.webrtcOptions.noReconnect??this.directOptions.noReconnect}get reconnectMaxAttempts(){return this.webrtcOptions.reconnectMaxAttempts??this.directOptions.reconnectMaxAttempts}get reconnectMaxWait(){return this.webrtcOptions.reconnectMaxWait??this.directOptions.reconnectMaxWait}get shouldRetryOnError(){return this.webrtcOptions.shouldRetryOnError??this.directOptions.shouldRetryOnError}get sessionId(){return this.sessionManager.sessionID}static notConnectedYetStr="not connected yet";get robotService(){if(!this.robotServiceClient)throw new Error(Xe.notConnectedYetStr);return this.robotServiceClient}get armService(){return this.armServiceClient??=this.createServiceClient(vm),this.armServiceClient}get baseService(){return this.baseServiceClient??=this.createServiceClient(Mm),this.baseServiceClient}get boardService(){return this.boardServiceClient??=this.createServiceClient(xm),this.boardServiceClient}get encoderService(){return this.encoderServiceClient??=this.createServiceClient(Ym),this.encoderServiceClient}get gantryService(){return this.gantryServiceClient??=this.createServiceClient(Zm),this.gantryServiceClient}get genericService(){return this.genericServiceClient??=this.createServiceClient(_s),this.genericServiceClient}get gripperService(){return this.gripperServiceClient??=this.createServiceClient(rc),this.gripperServiceClient}get mlModelService(){return this.mlModelServiceClient??=this.createServiceClient(Rg),this.mlModelServiceClient}get movementSensorService(){return this.movementSensorServiceClient??=this.createServiceClient(Lc),this.movementSensorServiceClient}get powerSensorService(){return this.powerSensorServiceClient??=this.createServiceClient(xc),this.powerSensorServiceClient}get inputControllerService(){return this.inputControllerServiceClient??=this.createServiceClient(kc),this.inputControllerServiceClient}get motorService(){return this.motorServiceClient??=this.createServiceClient(Mc),this.motorServiceClient}get navigationService(){return this.navigationServiceClient??=this.createServiceClient(mp),this.navigationServiceClient}get discoveryService(){return this.discoveryServiceClient??=this.createServiceClient(Md),this.discoveryServiceClient}get motionService(){return this.motionServiceClient??=this.createServiceClient(jd),this.motionServiceClient}get visionService(){return this.visionServiceClient??=this.createServiceClient(kg),this.visionServiceClient}get servoService(){return this.servoServiceClient??=this.createServiceClient(Yc),this.servoServiceClient}get slamService(){return this.slamServiceClient??=this.createServiceClient(yp),this.slamServiceClient}get worldStateStoreService(){return this.worldStateStoreServiceClient??=this.createServiceClient(Og),this.worldStateStoreServiceClient}createServiceClient(e){return bI(this.clientTransport,Xe.notConnectedYetStr),X(e,this.clientTransport)}get peerConnection(){return this.peerConn}get clientTransport(){return this.sessionOptions.disabled?this.transport:this.sessionManager.transport}async dialWebRTC(e,n){if(n?.abort===!0)throw new Error(vn);return this.emit(K.DIALING,{method:"webrtc",attempt:this.currentRetryAttempt}),this.serviceHost=e.serviceHost??e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!0,this.webrtcOptions.host=e.host,this.webrtcOptions.signalingAddress=e.signalingAddress,this.webrtcOptions.rtcConfig.iceServers=e.iceServers??[],this.webrtcOptions.noReconnect=e.noReconnect,this.webrtcOptions.reconnectMaxWait=e.reconnectMaxWait,this.webrtcOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.webrtcOptions.shouldRetryOnError=e.shouldRetryOnError,this.webrtcOptions.forceRelay=e.forceRelay,this.webrtcOptions.forceP2P=e.forceP2P,this.webrtcOptions.turnUri=e.turnUri,this.webrtcOptions.turnScheme=e.turnScheme,this.webrtcOptions.turnTransport=e.turnTransport,this.webrtcOptions.turnPort=e.turnPort,this.webrtcOptions.signalingInsecure=e.signalingInsecure,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({priority:e.priority,dialTimeoutMs:e.dialTimeoutMs??e.dialTimeout??Jt,creds:e.credentials,extraHeaders:e.extraHeaders}),this}async dialDirect(e,n){if(n?.abort===!0)throw new Error(vn);if(this.emit(K.DIALING,{method:"grpc",attempt:this.currentRetryAttempt}),!e.host.includes("local"))throw new Error(`cannot dial "${e.host}" directly, please use a local url instead.`);return this.serviceHost=e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!1,this.directOptions.noReconnect=e.noReconnect,this.directOptions.reconnectMaxWait=e.reconnectMaxWait,this.directOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.directOptions.shouldRetryOnError=e.shouldRetryOnError,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({creds:e.credentials,dialTimeoutMs:e.dialTimeoutMs??e.dialTimeout??Jt,extraHeaders:e.extraHeaders}),this}resetDialing(e){this.dialing===e&&(this.dialing=void 0,this.currentDialAbortSignal=void 0)}async dial(e){CI(e),this.dialing&&this.currentDialAbortSignal&&(console.debug("Aborting previous dial attempt due to new dial call"),this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")})),this.currentDialAbortSignal={abort:!1};const n=this.performDial(e,this.currentDialAbortSignal,e.reconnectAbortSignal??{abort:!1});this.dialing=n;try{const a=await n;return this.resetDialing(n),a}catch(a){if(this.resetDialing(n),a instanceof Error&&a.message===vn)return console.debug(vn),this;throw a}}createBackOffOpts({abort:e},{abort:n}){return{retry:(a,o)=>{if(e||n)throw new Error(vn);return console.debug(`Failed to connect, attempt ${o} with backoff`,a),this.currentRetryAttempt=o,this.closed?!1:bg(a)?!0:(console.debug("Non-retryable error encountered, stopping connection attempts",a),!1)}}}async tryWebRTCDial(e,n,a){try{return{dialer:await Mt(async()=>this.dialWebRTC(e,n),a)}}catch(o){wg(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via WebRTC",i),this.emit(K.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async tryDirectDial(e,n,a){try{return{dialer:await Mt(async()=>this.dialDirect(e,n),a)}}catch(o){wg(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via gRPC",i),this.emit(K.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async performDial(e,n,a){const o=this.createBackOffOpts(n,a??{abort:!1});e.reconnectMaxWait!==void 0&&(o.maxDelay=e.reconnectMaxWait),o.numOfAttempts=e.noReconnect?1:e.reconnectMaxAttempts,this.currentRetryAttempt=0;const i=[],r=wI(e),c=r?2:1,l=n.abort||a?.abort===!0;if(r&&!l){const{dialer:u,error:h}=await this.tryWebRTCDial(e,n,o);if(!h)return u;i.push(h)}if(this.currentRetryAttempt=0,!(n.abort||a?.abort===!0)){const{dialer:u,error:h}=await this.tryDirectDial(e,n,o);if(!h)return u;i.push(h)}if(i.length===c)throw new Error("Failed to connect via all methods",{cause:i});return this}async disconnect(){for(ne("client_closed",{connectionId:this.connectionId}),this.emit(K.DISCONNECTING,{}),this.currentDialAbortSignal&&this.dialing&&(this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")}),this.resetDialing(this.dialing));this.connecting;)await this.connecting;this.cleanupEventListeners(),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),this.sessionManager.reset(),this.closed=!0,this.emit(K.DISCONNECTED,{})}isConnected(){return this.peerConn?.iceConnectionState==="connected"}async connect({creds:e=this.savedCreds,priority:n,dialTimeout:a,dialTimeoutMs:o,extraHeaders:i}={}){if(this.isReconnecting||this.emit(K.CONNECTING,{}),this.closed=!1,this.connecting){for(;this.connecting!==void 0;)await this.connecting;return}const r=Pn.UuidTool.newUuid();this.connecting=new Promise(c=>{this.connectResolve=c}),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),(!e||e!==this.savedCreds||this.sessionOptions.disabled)&&this.sessionManager.reset();try{ne("dial_started",{connectionId:r,method:this.webrtcOptions.enabled?"webrtc":"grpc",host:this.serviceHost,attempt:this.currentRetryAttempt});const c=new Headers(Bn);if(i)for(const[u,h]of Object.entries(i))if(u==="viam_client"&&c.has("viam_client")){const R=c.get("viam_client").replace("typescript;",`typescript(${h});`);c.set("viam_client",R)}else c.set(u,h);const l={webrtcOptions:{disableTrickleICE:!1,rtcConfig:this.webrtcOptions.rtcConfig,forceRelay:this.webrtcOptions.forceRelay,forceP2P:this.webrtcOptions.forceP2P,turnUri:this.webrtcOptions.turnUri,turnScheme:this.webrtcOptions.turnScheme,turnTransport:this.webrtcOptions.turnTransport,turnPort:this.webrtcOptions.turnPort,signalingInsecure:this.webrtcOptions.signalingInsecure},dialTimeoutMs:o??a??Jt,extraHeaders:c};if(e&&(Fn(e)?l.credentials=e:l.accessToken=e.payload),n!==void 0&&l.webrtcOptions&&(l.webrtcOptions.additionalSdpFields={"x-priority":n}),this.savedCreds=e,this.webrtcOptions.enabled){l.webrtcOptions&&(l.webrtcOptions.signalingCredentials=l.credentials);const u=this.webrtcOptions.signalingAddress||this.serviceHost,h=await Q_(u,this.webrtcOptions.host,l,this.serviceHost!==""&&u!==this.serviceHost);this.peerConn=h.peerConnection,this.dataChannel=h.dataChannel,this.connectionId=r,this.cleanupEventListeners(),this.onICEConnectionStateChange=()=>{const I=this.peerConn?.iceConnectionState;I==="disconnected"&&ne("ice_disconnected",{connectionId:this.connectionId}),I==="closed"&&this.onDisconnect()},this.peerConn.addEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onDataChannelClose=I=>this.onDisconnect(I),this.dataChannel.addEventListener("close",this.onDataChannelClose),this.transport=Yr(h.transport,r),this.onTrack=I=>{const[R]=I.streams;if(!R)throw this.emit("track",I),new Error("expected event stream to exist");const E=R.id.replaceAll("+",":");Object.defineProperty(R,"id",{value:E}),this.emit("track",I)},this.peerConn.addEventListener("track",this.onTrack)}else this.connectionId=r,this.transport=Yr(await ba(this.serviceHost,l),r),await this.gRPCConnectionManager.start();const d=this.sessionOptions.disabled?this.transport:this.sessionManager.transport;this.robotServiceClient=X(uo,d),ne("dial_success",{connectionId:r,method:this.webrtcOptions.enabled?"webrtc":"grpc",host:this.serviceHost}),this.emit(K.CONNECTED,{})}catch(c){throw ne("dial_failed",{connectionId:r,method:this.webrtcOptions.enabled?"webrtc":"grpc",host:this.serviceHost,error:c instanceof Error?c.message:String(c)}),this.isReconnecting||this.emit(K.DISCONNECTED,{}),c}finally{this.connectResolve?.(),this.connectResolve=void 0,this.connecting=void 0}}async getSessions(){return(await this.robotService.getSessions({})).sessions}async getOperations(){return(await this.robotService.getOperations({})).operations}async cancelOperation(e){await this.robotService.cancelOperation({id:e})}async blockForOperation(e){await this.robotService.blockForOperation({id:e})}async stopAll(){await this.robotService.stopAll({})}async frameSystemConfig(e){return(await this.robotService.frameSystemConfig({supplementalTransforms:e})).frameSystemConfigs}async transformPose(e,n,a,o){const i=new to({source:e,destination:n,supplementalTransforms:a}),c=(await this.robotService.transformPose(i,o)).pose;if(!c)throw new Error("no pose");return c}async transformPCD(e,n,a){const o=new so({pointCloudPcd:e,source:n,destination:a});return(await this.robotService.transformPCD(o)).pointCloudPcd}async getModelsFromModules(){const e=new oo({});return(await this.robotService.getModelsFromModules(e)).models}async getCloudMetadata(){return this.robotService.getCloudMetadata({})}async resourceNames(){return(await this.robotService.resourceNames({})).resources}async resourceRPCSubtypes(){return(await this.robotService.resourceRPCSubtypes({})).resourceRpcSubtypes}async getMachineStatus(){return this.robotService.getMachineStatus({})}async getVersion(){return this.robotService.getVersion({})}async restartModule(e,n){const a=new lo;e!==void 0&&(a.idOrName.case="moduleId",a.idOrName.value=e),n!==void 0&&(a.idOrName.case="moduleName",a.idOrName.value=n),await this.robotService.restartModule(a)}async getPose(e,n,a){const o=new po({componentName:e,destinationFrame:n,supplementalTransforms:a}),r=(await this.robotService.getPose(o)).pose;if(!r)throw new Error("no pose");return r}}const Cg=async t=>{const e=await new Xe().dial(t);if(e.isConnected())return e;throw new Error("Failed to connect to robot")},ja=s.makeEnum("viam.app.packages.v1.PackageType",[{no:0,name:"PACKAGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PACKAGE_TYPE_ARCHIVE",localName:"ARCHIVE"},{no:2,name:"PACKAGE_TYPE_ML_MODEL",localName:"ML_MODEL"},{no:3,name:"PACKAGE_TYPE_MODULE",localName:"MODULE"},{no:4,name:"PACKAGE_TYPE_SLAM_MAP",localName:"SLAM_MAP"},{no:5,name:"PACKAGE_TYPE_ML_TRAINING",localName:"ML_TRAINING"}]),Qe=s.makeEnum("viam.app.mltraining.v1.ModelType",[{no:0,name:"MODEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_TYPE_SINGLE_LABEL_CLASSIFICATION",localName:"SINGLE_LABEL_CLASSIFICATION"},{no:2,name:"MODEL_TYPE_MULTI_LABEL_CLASSIFICATION",localName:"MULTI_LABEL_CLASSIFICATION"},{no:3,name:"MODEL_TYPE_OBJECT_DETECTION",localName:"OBJECT_DETECTION"}]),rn=s.makeEnum("viam.app.mltraining.v1.ModelFramework",[{no:0,name:"MODEL_FRAMEWORK_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_FRAMEWORK_TFLITE",localName:"TFLITE"},{no:2,name:"MODEL_FRAMEWORK_TENSORFLOW",localName:"TENSORFLOW"},{no:3,name:"MODEL_FRAMEWORK_PYTORCH",localName:"PYTORCH"},{no:4,name:"MODEL_FRAMEWORK_ONNX",localName:"ONNX"}]),Ha=s.makeEnum("viam.app.mltraining.v1.TrainingStatus",[{no:0,name:"TRAINING_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRAINING_STATUS_PENDING",localName:"PENDING"},{no:2,name:"TRAINING_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"TRAINING_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"TRAINING_STATUS_FAILED",localName:"FAILED"},{no:5,name:"TRAINING_STATUS_CANCELED",localName:"CANCELED"},{no:6,name:"TRAINING_STATUS_CANCELING",localName:"CANCELING"}]),Dg=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobRequest",()=>[{no:7,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"model_name",kind:"scalar",T:9},{no:4,name:"model_version",kind:"scalar",T:9},{no:5,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:8,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:6,name:"tags",kind:"scalar",T:9,repeated:!0}]),Ng=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Pg=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"registry_item_id",kind:"scalar",T:9},{no:6,name:"registry_item_version",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"model_name",kind:"scalar",T:9},{no:5,name:"model_version",kind:"scalar",T:9},{no:7,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:8,name:"container_version",kind:"scalar",T:9}]),Ag=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),qg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ug=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobResponse",()=>[{no:1,name:"metadata",kind:"message",T:ni}]),Lg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Ha)}]),Gg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsResponse",()=>[{no:1,name:"jobs",kind:"message",T:ni,repeated:!0}]),ni=s.makeMessageType("viam.app.mltraining.v1.TrainingJobMetadata",()=>[{no:7,name:"id",kind:"scalar",T:9},{no:11,name:"dataset_id",kind:"scalar",T:9},{no:12,name:"organization_id",kind:"scalar",T:9},{no:13,name:"model_name",kind:"scalar",T:9},{no:14,name:"model_version",kind:"scalar",T:9},{no:15,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:17,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:18,name:"is_custom_job",kind:"scalar",T:8},{no:19,name:"registry_item_id",kind:"scalar",T:9},{no:20,name:"registry_item_version",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Ha)},{no:8,name:"error_status",kind:"message",T:Tn},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"last_modified",kind:"message",T:_},{no:9,name:"training_started",kind:"message",T:_},{no:10,name:"training_ended",kind:"message",T:_},{no:5,name:"synced_model_id",kind:"scalar",T:9},{no:16,name:"tags",kind:"scalar",T:9,repeated:!0},{no:21,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:22,name:"container_version",kind:"scalar",T:9}]),Bg=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Fg=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobResponse",[]),xg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Jg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobResponse",[]),zg=s.makeMessageType("viam.app.mltraining.v1.TrainingJobLogEntry",()=>[{no:1,name:"level",kind:"scalar",T:9},{no:2,name:"time",kind:"message",T:_},{no:3,name:"message",kind:"scalar",T:9}]),Vg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0}]),$g=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:zg,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Yg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersRequest",[]),Wg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersResponse",()=>[{no:1,name:"container_map",kind:"map",K:9,V:{kind:"message",T:jg}}]),jg=s.makeMessageType("viam.app.mltraining.v1.Container",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"uri",kind:"scalar",T:9},{no:3,name:"framework",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"eol",kind:"message",T:_}]),DI=Object.freeze(Object.defineProperty({__proto__:null,CancelTrainingJobRequest:Bg,CancelTrainingJobResponse:Fg,Container:jg,DeleteCompletedTrainingJobRequest:xg,DeleteCompletedTrainingJobResponse:Jg,GetTrainingJobLogsRequest:Vg,GetTrainingJobLogsResponse:$g,GetTrainingJobRequest:qg,GetTrainingJobResponse:Ug,ListSupportedContainersRequest:Yg,ListSupportedContainersResponse:Wg,ListTrainingJobsRequest:Lg,ListTrainingJobsResponse:Gg,ModelFramework:rn,ModelType:Qe,SubmitCustomTrainingJobRequest:Pg,SubmitCustomTrainingJobResponse:Ag,SubmitTrainingJobRequest:Dg,SubmitTrainingJobResponse:Ng,TrainingJobLogEntry:zg,TrainingJobMetadata:ni,TrainingStatus:Ha},Symbol.toStringTag,{value:"Module"})),Ka=s.makeEnum("viam.app.v1.OnlineState",[{no:0,name:"ONLINE_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ONLINE_STATE_ONLINE",localName:"ONLINE"},{no:2,name:"ONLINE_STATE_OFFLINE",localName:"OFFLINE"},{no:3,name:"ONLINE_STATE_AWAITING_SETUP",localName:"AWAITING_SETUP"}]),Hg=s.makeEnum("viam.app.v1.AuthenticationType",[{no:0,name:"AUTHENTICATION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"AUTHENTICATION_TYPE_WEB_OAUTH",localName:"WEB_OAUTH"},{no:2,name:"AUTHENTICATION_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"AUTHENTICATION_TYPE_ROBOT_PART_SECRET",localName:"ROBOT_PART_SECRET"},{no:4,name:"AUTHENTICATION_TYPE_LOCATION_SECRET",localName:"LOCATION_SECRET"}]),Vn=s.makeEnum("viam.app.v1.FragmentVisibility",[{no:0,name:"FRAGMENT_VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"FRAGMENT_VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"FRAGMENT_VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),Kg=s.makeEnum("viam.app.v1.FragmentErrorType",[{no:0,name:"FRAGMENT_ERROR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_ERROR_TYPE_NO_ACCESS",localName:"NO_ACCESS"},{no:2,name:"FRAGMENT_ERROR_TYPE_NESTING_LIMIT_EXCEEDED",localName:"NESTING_LIMIT_EXCEEDED"},{no:3,name:"FRAGMENT_ERROR_TYPE_CHILD_ID_INVALID",localName:"CHILD_ID_INVALID"},{no:4,name:"FRAGMENT_ERROR_TYPE_CYCLE_DETECTED",localName:"CYCLE_DETECTED"}]),Xa=s.makeEnum("viam.app.v1.ModuleSourceType",[{no:0,name:"MODULE_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_SOURCE_TYPE_EXTERNAL",localName:"EXTERNAL"},{no:2,name:"MODULE_SOURCE_TYPE_VIAM_HOSTED",localName:"VIAM_HOSTED"}]),Qa=s.makeEnum("viam.app.v1.ModuleLanguage",[{no:0,name:"MODULE_LANGUAGE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_LANGUAGE_GOLANG",localName:"GOLANG"},{no:2,name:"MODULE_LANGUAGE_PYTHON",localName:"PYTHON"},{no:3,name:"MODULE_LANGUAGE_CPP",localName:"CPP"}]),Xg=s.makeEnum("viam.app.v1.RegistryItemStatus",[{no:0,name:"REGISTRY_ITEM_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"REGISTRY_ITEM_STATUS_PUBLISHED",localName:"PUBLISHED"},{no:2,name:"REGISTRY_ITEM_STATUS_IN_DEVELOPMENT",localName:"IN_DEVELOPMENT"}]),hn=s.makeEnum("viam.app.v1.Visibility",[{no:0,name:"VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),Qg=s.makeEnum("viam.app.v1.AppType",[{no:0,name:"APP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"APP_TYPE_SINGLE_MACHINE",localName:"SINGLE_MACHINE"},{no:2,name:"APP_TYPE_MULTI_MACHINE",localName:"MULTI_MACHINE"}]),Zg=s.makeEnum("viam.app.v1.ClientAuthentication",[{no:0,name:"CLIENT_AUTHENTICATION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CLIENT_AUTHENTICATION_REQUIRED",localName:"REQUIRED"},{no:2,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED",localName:"NOT_REQUIRED"},{no:3,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED_WHEN_USING_PKCE",localName:"NOT_REQUIRED_WHEN_USING_PKCE"}]),eT=s.makeEnum("viam.app.v1.PKCE",[{no:0,name:"PKCE_UNSPECIFIED"},{no:1,name:"PKCE_REQUIRED"},{no:2,name:"PKCE_NOT_REQUIRED"},{no:3,name:"PKCE_NOT_REQUIRED_WHEN_USING_CLIENT_AUTHENTICATION"}]),nT=s.makeEnum("viam.app.v1.URLValidation",[{no:0,name:"URL_VALIDATION_UNSPECIFIED"},{no:1,name:"URL_VALIDATION_EXACT_MATCH"},{no:2,name:"URL_VALIDATION_ALLOW_WILDCARDS"}]),aT=s.makeEnum("viam.app.v1.EnabledGrant",[{no:0,name:"ENABLED_GRANT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ENABLED_GRANT_AUTHORIZATION_CODE",localName:"AUTHORIZATION_CODE"},{no:2,name:"ENABLED_GRANT_IMPLICIT",localName:"IMPLICIT"},{no:3,name:"ENABLED_GRANT_PASSWORD",localName:"PASSWORD"},{no:4,name:"ENABLED_GRANT_REFRESH_TOKEN",localName:"REFRESH_TOKEN"},{no:5,name:"ENABLED_GRANT_DEVICE_CODE",localName:"DEVICE_CODE"}]),fn=s.makeMessageType("viam.app.v1.Robot",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9},{no:4,name:"last_access",kind:"message",T:_},{no:5,name:"created_on",kind:"message",T:_},{no:6,name:"online_state",kind:"enum",T:s.getEnumType(Ka)},{no:7,name:"seconds_since_online",kind:"scalar",T:3}]),mn=s.makeMessageType("viam.app.v1.RobotPart",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:10,name:"dns_name",kind:"scalar",T:9},{no:3,name:"secret",kind:"scalar",T:9},{no:4,name:"robot",kind:"scalar",T:9},{no:12,name:"location_id",kind:"scalar",T:9},{no:5,name:"robot_config",kind:"message",T:p},{no:6,name:"last_access",kind:"message",T:_},{no:7,name:"user_supplied_info",kind:"message",T:p},{no:8,name:"main_part",kind:"scalar",T:8},{no:9,name:"fqdn",kind:"scalar",T:9},{no:11,name:"local_fqdn",kind:"scalar",T:9},{no:13,name:"created_on",kind:"message",T:_},{no:14,name:"secrets",kind:"message",T:oi,repeated:!0},{no:15,name:"last_updated",kind:"message",T:_},{no:16,name:"online_state",kind:"enum",T:s.getEnumType(Ka)},{no:17,name:"seconds_since_online",kind:"scalar",T:3},{no:18,name:"robot_config_json",kind:"scalar",T:9,opt:!0}]),tT=s.makeMessageType("viam.app.v1.RobotPartHistoryEntry",()=>[{no:1,name:"part",kind:"scalar",T:9},{no:2,name:"robot",kind:"scalar",T:9},{no:3,name:"when",kind:"message",T:_},{no:4,name:"old",kind:"message",T:mn},{no:5,name:"edited_by",kind:"message",T:ai}]),ai=s.makeMessageType("viam.app.v1.AuthenticatorInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Hg)},{no:2,name:"value",kind:"scalar",T:9},{no:3,name:"is_deactivated",kind:"scalar",T:8}]),sT=s.makeMessageType("viam.app.v1.ListOrganizationsRequest",[]),Rn=s.makeMessageType("viam.app.v1.Organization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"public_namespace",kind:"scalar",T:9},{no:5,name:"default_region",kind:"scalar",T:9},{no:6,name:"cid",kind:"scalar",T:9,opt:!0},{no:7,name:"default_fragments",kind:"message",T:ti,opt:!0}]),oT=s.makeMessageType("viam.app.v1.OrganizationMember",()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"emails",kind:"scalar",T:9,repeated:!0},{no:3,name:"date_added",kind:"message",T:_},{no:4,name:"last_login",kind:"message",T:_,opt:!0},{no:5,name:"last_access",kind:"message",T:_,opt:!0}]),iT=s.makeMessageType("viam.app.v1.ListOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:Rn,repeated:!0}]),$n=s.makeMessageType("viam.app.v1.OrganizationInvite",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"authorizations",kind:"message",T:ae,repeated:!0}]),rT=s.makeMessageType("viam.app.v1.CreateOrganizationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),mT=s.makeMessageType("viam.app.v1.CreateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),cT=s.makeMessageType("viam.app.v1.GetOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),lT=s.makeMessageType("viam.app.v1.GetOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),dT=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),pT=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityResponse",()=>[{no:1,name:"available",kind:"scalar",T:8}]),ti=s.makeMessageType("viam.app.v1.FragmentImportList",()=>[{no:1,name:"fragments",kind:"message",T:ny,repeated:!0}]),uT=s.makeMessageType("viam.app.v1.UpdateOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0},{no:5,name:"cid",kind:"scalar",T:9,opt:!0},{no:6,name:"default_fragments",kind:"message",T:ti,opt:!0}]),gT=s.makeMessageType("viam.app.v1.UpdateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),TT=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),kT=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),yT=s.makeMessageType("viam.app.v1.DeleteOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),vT=s.makeMessageType("viam.app.v1.DeleteOrganizationResponse",[]),hT=s.makeMessageType("viam.app.v1.GetOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),fT=s.makeMessageType("viam.app.v1.GetOrganizationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),RT=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),_T=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataResponse",[]),ST=s.makeMessageType("viam.app.v1.ListOrganizationMembersRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),IT=s.makeMessageType("viam.app.v1.ListOrganizationMembersResponse",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"members",kind:"message",T:oT,repeated:!0},{no:3,name:"invites",kind:"message",T:$n,repeated:!0}]),ET=s.makeMessageType("viam.app.v1.CreateOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"authorizations",kind:"message",T:ae,repeated:!0},{no:4,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),OT=s.makeMessageType("viam.app.v1.CreateOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:$n}]),MT=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"add_authorizations",kind:"message",T:ae,repeated:!0},{no:4,name:"remove_authorizations",kind:"message",T:ae,repeated:!0}]),bT=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsResponse",()=>[{no:1,name:"invite",kind:"message",T:$n}]),wT=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),CT=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteResponse",[]),DT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),NT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:$n}]),PT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9}]),AT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberResponse",[]),Za=s.makeMessageType("viam.app.v1.BillingAddress",()=>[{no:1,name:"address_line_1",kind:"scalar",T:9},{no:2,name:"address_line_2",kind:"scalar",T:9,opt:!0},{no:3,name:"city",kind:"scalar",T:9},{no:4,name:"state",kind:"scalar",T:9},{no:5,name:"zipcode",kind:"scalar",T:9},{no:6,name:"country",kind:"scalar",T:9}]),qT=s.makeMessageType("viam.app.v1.EnableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:Za}]),UT=s.makeMessageType("viam.app.v1.EnableBillingServiceResponse",[]),LT=s.makeMessageType("viam.app.v1.UpdateBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:Za}]),GT=s.makeMessageType("viam.app.v1.UpdateBillingServiceResponse",[]),BT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),FT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigResponse",()=>[{no:1,name:"billing_address",kind:"message",T:Za},{no:2,name:"support_email",kind:"scalar",T:9},{no:3,name:"logo_url",kind:"scalar",T:9},{no:4,name:"billing_dashboard_url",kind:"scalar",T:9}]),xT=s.makeMessageType("viam.app.v1.DisableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),JT=s.makeMessageType("viam.app.v1.DisableBillingServiceResponse",[]),zT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),VT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailResponse",[]),$T=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),YT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailResponse",()=>[{no:1,name:"email",kind:"scalar",T:9}]),si=s.makeMessageType("viam.app.v1.OrganizationIdentity",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),WT=s.makeMessageType("viam.app.v1.LocationOrganization",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"primary",kind:"scalar",T:8}]),et=s.makeMessageType("viam.app.v1.LocationAuth",()=>[{no:1,name:"secret",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"secrets",kind:"message",T:oi,repeated:!0}]),jT=s.makeMessageType("viam.app.v1.StorageConfig",()=>[{no:1,name:"region",kind:"scalar",T:9}]),Yn=s.makeMessageType("viam.app.v1.Location",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:4,name:"parent_location_id",kind:"scalar",T:9},{no:5,name:"auth",kind:"message",T:et},{no:6,name:"organizations",kind:"message",T:WT,repeated:!0},{no:3,name:"created_on",kind:"message",T:_},{no:7,name:"robot_count",kind:"scalar",T:5},{no:8,name:"config",kind:"message",T:jT},{no:9,name:"primary_org_identity",kind:"message",T:si,opt:!0}]),oi=s.makeMessageType("viam.app.v1.SharedSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"state",kind:"enum",T:s.getEnumType(HT)}]),HT=s.makeEnum("viam.app.v1.SharedSecret.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_ENABLED",localName:"ENABLED"},{no:2,name:"STATE_DISABLED",localName:"DISABLED"}]),KT=s.makeMessageType("viam.app.v1.CreateLocationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0}]),XT=s.makeMessageType("viam.app.v1.CreateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Yn}]),QT=s.makeMessageType("viam.app.v1.GetLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),ZT=s.makeMessageType("viam.app.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Yn}]),ek=s.makeMessageType("viam.app.v1.UpdateLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0}]),nk=s.makeMessageType("viam.app.v1.UpdateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Yn}]),ak=s.makeMessageType("viam.app.v1.DeleteLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),tk=s.makeMessageType("viam.app.v1.DeleteLocationResponse",[]),sk=s.makeMessageType("viam.app.v1.GetLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),ok=s.makeMessageType("viam.app.v1.GetLocationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),ik=s.makeMessageType("viam.app.v1.UpdateLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),rk=s.makeMessageType("viam.app.v1.UpdateLocationMetadataResponse",[]),mk=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),ck=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationResponse",()=>[{no:1,name:"organization_identities",kind:"message",T:si,repeated:!0}]),lk=s.makeMessageType("viam.app.v1.ListLocationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),dk=s.makeMessageType("viam.app.v1.ShareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),pk=s.makeMessageType("viam.app.v1.ShareLocationResponse",[]),uk=s.makeMessageType("viam.app.v1.UnshareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),gk=s.makeMessageType("viam.app.v1.UnshareLocationResponse",[]),Tk=s.makeMessageType("viam.app.v1.ListLocationsResponse",()=>[{no:1,name:"locations",kind:"message",T:Yn,repeated:!0}]),kk=s.makeMessageType("viam.app.v1.CreateLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),yk=s.makeMessageType("viam.app.v1.CreateLocationSecretResponse",()=>[{no:1,name:"auth",kind:"message",T:et}]),vk=s.makeMessageType("viam.app.v1.DeleteLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),hk=s.makeMessageType("viam.app.v1.DeleteLocationSecretResponse",[]),fk=s.makeMessageType("viam.app.v1.LocationAuthRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),Rk=s.makeMessageType("viam.app.v1.LocationAuthResponse",()=>[{no:1,name:"auth",kind:"message",T:et}]),_k=s.makeMessageType("viam.app.v1.GetRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Sk=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Ik=s.makeMessageType("viam.app.v1.RoverRentalRobot",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_main_part_id",kind:"scalar",T:9}]),Ek=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:Ik,repeated:!0}]),Ok=s.makeMessageType("viam.app.v1.GetRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:fn}]),Mk=s.makeMessageType("viam.app.v1.GetRobotPartsRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),bk=s.makeMessageType("viam.app.v1.GetRobotPartsResponse",()=>[{no:1,name:"parts",kind:"message",T:mn,repeated:!0}]),wk=s.makeMessageType("viam.app.v1.GetRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ck=s.makeMessageType("viam.app.v1.GetRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:mn},{no:2,name:"config_json",kind:"scalar",T:9}]),Dk=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9}]),Nk=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationResponse",()=>[{no:1,name:"part",kind:"message",T:mn}]),Pk=s.makeMessageType("viam.app.v1.GetRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0},{no:4,name:"page_token",kind:"scalar",T:9,opt:!0},{no:5,name:"levels",kind:"scalar",T:9,repeated:!0},{no:6,name:"start",kind:"message",T:_,opt:!0},{no:7,name:"end",kind:"message",T:_,opt:!0},{no:8,name:"limit",kind:"scalar",T:3,opt:!0},{no:9,name:"source",kind:"scalar",T:9,opt:!0},{no:10,name:"user_facing_only",kind:"scalar",T:8,opt:!0}]),Ak=s.makeMessageType("viam.app.v1.GetRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Ln,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),qk=s.makeMessageType("viam.app.v1.TailRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0}]),Uk=s.makeMessageType("viam.app.v1.TailRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Ln,repeated:!0}]),Lk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0},{no:4,name:"start",kind:"message",T:_,opt:!0},{no:5,name:"end",kind:"message",T:_,opt:!0}]),Gk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:tT,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Bk=s.makeMessageType("viam.app.v1.UpdateRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"robot_config",kind:"message",T:p},{no:4,name:"last_known_update",kind:"message",T:_,opt:!0},{no:5,name:"robot_config_json",kind:"scalar",T:9,opt:!0}]),Fk=s.makeMessageType("viam.app.v1.UpdateRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:mn}]),xk=s.makeMessageType("viam.app.v1.NewRobotPartRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9}]),Jk=s.makeMessageType("viam.app.v1.NewRobotPartResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),zk=s.makeMessageType("viam.app.v1.DeleteRobotPartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Vk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),$k=s.makeMessageType("viam.app.v1.GetRobotPartMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),Yk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),Wk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataResponse",[]),jk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),Hk=s.makeMessageType("viam.app.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"created_on",kind:"message",T:_}]),Kk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:ui,repeated:!0}]),Xk=s.makeMessageType("viam.app.v1.DeleteRobotPartResponse",[]),Ze=s.makeMessageType("viam.app.v1.Fragment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"fragment",kind:"message",T:p},{no:4,name:"organization_owner",kind:"scalar",T:9},{no:5,name:"public",kind:"scalar",T:8},{no:6,name:"created_on",kind:"message",T:_},{no:7,name:"organization_name",kind:"scalar",T:9},{no:9,name:"robot_part_count",kind:"scalar",T:5},{no:10,name:"organization_count",kind:"scalar",T:5},{no:11,name:"only_used_by_owner",kind:"scalar",T:8},{no:12,name:"visibility",kind:"enum",T:s.getEnumType(Vn)},{no:13,name:"last_updated",kind:"message",T:_},{no:14,name:"revision",kind:"scalar",T:9}]),Qk=s.makeMessageType("viam.app.v1.FragmentHistoryEntry",()=>[{no:1,name:"fragment",kind:"scalar",T:9},{no:2,name:"edited_on",kind:"message",T:_},{no:3,name:"old",kind:"message",T:Ze},{no:4,name:"edited_by",kind:"message",T:ai},{no:5,name:"revision",kind:"scalar",T:9},{no:6,name:"config",kind:"message",T:p}]),Zk=s.makeMessageType("viam.app.v1.FragmentRevision",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"created_at",kind:"message",T:_}]),nt=s.makeMessageType("viam.app.v1.FragmentTag",()=>[{no:1,name:"tag",kind:"scalar",T:9},{no:2,name:"revision",kind:"scalar",T:9}]),ey=s.makeMessageType("viam.app.v1.FragmentError",()=>[{no:1,name:"error_type",kind:"enum",T:s.getEnumType(Kg)},{no:2,name:"fragment_id",kind:"scalar",T:9},{no:3,name:"detail",kind:"scalar",T:9}]),at=s.makeMessageType("viam.app.v1.FragmentUsage",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"organizations",kind:"scalar",T:5},{no:3,name:"machines",kind:"scalar",T:5},{no:4,name:"machines_in_current_org",kind:"scalar",T:5},{no:5,name:"version",kind:"scalar",T:9,opt:!0}]),ny=s.makeMessageType("viam.app.v1.FragmentImport",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"prefix",kind:"scalar",T:9,opt:!0},{no:4,name:"variables",kind:"map",K:9,V:{kind:"scalar",T:9}}]),ii=s.makeMessageType("viam.app.v1.ResolvedFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"resolved_config",kind:"message",T:p},{no:3,name:"error",kind:"message",T:ey},{no:4,name:"revision",kind:"scalar",T:9}]),ay=s.makeMessageType("viam.app.v1.ListFragmentsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"show_public",kind:"scalar",T:8},{no:3,name:"fragment_visibility",kind:"enum",T:s.getEnumType(Vn),repeated:!0}]),ty=s.makeMessageType("viam.app.v1.ListFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Ze,repeated:!0},{no:2,name:"fragment_usages",kind:"message",T:at,repeated:!0}]),sy=s.makeMessageType("viam.app.v1.GetFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"current_organization_id",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9,opt:!0}]),oy=s.makeMessageType("viam.app.v1.GetFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Ze},{no:2,name:"fragment_usage",kind:"message",T:at},{no:3,name:"revisions",kind:"message",T:Zk,repeated:!0},{no:4,name:"tags",kind:"message",T:nt,repeated:!0}]),iy=s.makeMessageType("viam.app.v1.CreateFragmentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"config",kind:"message",T:p},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(Vn),opt:!0}]),ry=s.makeMessageType("viam.app.v1.CreateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Ze}]),my=s.makeMessageType("viam.app.v1.UpdateFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"config",kind:"message",T:p},{no:4,name:"public",kind:"scalar",T:8,opt:!0},{no:5,name:"visibility",kind:"enum",T:s.getEnumType(Vn),opt:!0},{no:6,name:"last_known_update",kind:"message",T:_,opt:!0}]),cy=s.makeMessageType("viam.app.v1.UpdateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Ze}]),ly=s.makeMessageType("viam.app.v1.DeleteFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),dy=s.makeMessageType("viam.app.v1.DeleteFragmentResponse",[]),py=s.makeMessageType("viam.app.v1.GetFragmentHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0}]),uy=s.makeMessageType("viam.app.v1.GetFragmentHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:Qk,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),gy=s.makeMessageType("viam.app.v1.GetFragmentUsageRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9}]),Ty=s.makeMessageType("viam.app.v1.GetFragmentUsageResponse",()=>[{no:1,name:"version_usages",kind:"message",T:at,repeated:!0}]),ky=s.makeMessageType("viam.app.v1.SetFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9},{no:3,name:"revision",kind:"scalar",T:9}]),yy=s.makeMessageType("viam.app.v1.SetFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:nt,repeated:!0}]),vy=s.makeMessageType("viam.app.v1.DeleteFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9}]),hy=s.makeMessageType("viam.app.v1.DeleteFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:nt,repeated:!0}]),fy=s.makeMessageType("viam.app.v1.ListRobotsRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),Ry=s.makeMessageType("viam.app.v1.ListRobotsForLocationsRequest",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0}]),_y=s.makeMessageType("viam.app.v1.ListRobotsForOrgRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),ri=s.makeMessageType("viam.app.v1.AdditionalFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9,opt:!0}]),Sy=s.makeMessageType("viam.app.v1.ListNestedFragmentsRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9,opt:!0},{no:2,name:"additional_fragments",kind:"message",T:ri,repeated:!0}]),Iy=s.makeMessageType("viam.app.v1.ListNestedFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Ze,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:ii,repeated:!0}]),Ey=s.makeMessageType("viam.app.v1.ListMachineFragmentsRequest",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"additional_fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"additional_fragments",kind:"message",T:ri,repeated:!0}]),Oy=s.makeMessageType("viam.app.v1.ListMachineFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Ze,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:ii,repeated:!0}]),mi=s.makeMessageType("viam.app.v1.ListMachineSummariesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"limit",kind:"scalar",T:5,opt:!0}]),My=s.makeMessageType("viam.app.v1.ListMachineSummariesResponse",()=>[{no:1,name:"location_summaries",kind:"message",T:by,repeated:!0}]),by=s.makeMessageType("viam.app.v1.LocationSummary",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"location_name",kind:"scalar",T:9},{no:3,name:"machine_summaries",kind:"message",T:wy,repeated:!0}]),wy=s.makeMessageType("viam.app.v1.MachineSummary",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"machine_name",kind:"scalar",T:9},{no:3,name:"part_summaries",kind:"message",T:Py,repeated:!0}]),Cy=s.makeMessageType("viam.app.v1.FragmentSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9}]),Dy=s.makeMessageType("viam.app.v1.ViamServerVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),Ny=s.makeMessageType("viam.app.v1.ViamAgentVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),Py=s.makeMessageType("viam.app.v1.PartSummary",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9},{no:11,name:"is_main_part",kind:"scalar",T:8},{no:12,name:"online_state",kind:"enum",T:s.getEnumType(Ka)},{no:13,name:"seconds_since_online",kind:"scalar",T:3},{no:14,name:"last_access",kind:"message",T:_,opt:!0},{no:3,name:"last_online",kind:"message",T:_,opt:!0},{no:4,name:"viam_server_version",kind:"message",T:Dy,opt:!0},{no:5,name:"viam_agent_version",kind:"message",T:Ny,opt:!0},{no:6,name:"os",kind:"scalar",T:9,opt:!0},{no:7,name:"platform",kind:"scalar",T:9,opt:!0},{no:8,name:"public_ip_address",kind:"scalar",T:9,opt:!0},{no:10,name:"dns_name",kind:"scalar",T:9,opt:!0},{no:9,name:"fragments",kind:"message",T:Cy,repeated:!0}]),Ay=s.makeMessageType("viam.app.v1.ListRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:fn,repeated:!0}]),qy=s.makeMessageType("viam.app.v1.ListRobotsForLocationsResponse",()=>[{no:1,name:"robots",kind:"message",T:fn,repeated:!0}]),Uy=s.makeMessageType("viam.app.v1.ListRobotsForOrgResponse",()=>[{no:1,name:"robots",kind:"message",T:fn,repeated:!0}]),Ly=s.makeMessageType("viam.app.v1.NewRobotRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"scalar",T:9}]),Gy=s.makeMessageType("viam.app.v1.NewRobotResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),By=s.makeMessageType("viam.app.v1.UpdateRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9}]),Fy=s.makeMessageType("viam.app.v1.UpdateRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:fn}]),xy=s.makeMessageType("viam.app.v1.DeleteRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Jy=s.makeMessageType("viam.app.v1.DeleteRobotResponse",[]),zy=s.makeMessageType("viam.app.v1.GetRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Vy=s.makeMessageType("viam.app.v1.GetRobotMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),$y=s.makeMessageType("viam.app.v1.UpdateRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),Yy=s.makeMessageType("viam.app.v1.UpdateRobotMetadataResponse",[]),Wy=s.makeMessageType("viam.app.v1.MarkPartAsMainRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),jy=s.makeMessageType("viam.app.v1.MarkPartAsMainResponse",[]),Hy=s.makeMessageType("viam.app.v1.MarkPartForRestartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Ky=s.makeMessageType("viam.app.v1.MarkPartForRestartResponse",[]),Xy=s.makeMessageType("viam.app.v1.CreateRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Qy=s.makeMessageType("viam.app.v1.CreateRobotPartSecretResponse",()=>[{no:1,name:"part",kind:"message",T:mn}]),Zy=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),ev=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretResponse",[]),ae=s.makeMessageType("viam.app.v1.Authorization",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"identity_id",kind:"scalar",T:9},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"identity_type",kind:"scalar",T:9}]),nv=s.makeMessageType("viam.app.v1.AddRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:ae}]),av=s.makeMessageType("viam.app.v1.AddRoleResponse",[]),tv=s.makeMessageType("viam.app.v1.RemoveRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:ae}]),sv=s.makeMessageType("viam.app.v1.RemoveRoleResponse",[]),ov=s.makeMessageType("viam.app.v1.ChangeRoleRequest",()=>[{no:1,name:"old_authorization",kind:"message",T:ae},{no:2,name:"new_authorization",kind:"message",T:ae}]),iv=s.makeMessageType("viam.app.v1.ChangeRoleResponse",[]),rv=s.makeMessageType("viam.app.v1.ListAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"resource_ids",kind:"scalar",T:9,repeated:!0}]),mv=s.makeMessageType("viam.app.v1.ListAuthorizationsResponse",()=>[{no:1,name:"authorizations",kind:"message",T:ae,repeated:!0}]),cv=s.makeMessageType("viam.app.v1.CheckPermissionsRequest",()=>[{no:1,name:"permissions",kind:"message",T:ci,repeated:!0}]),ci=s.makeMessageType("viam.app.v1.AuthorizedPermissions",()=>[{no:1,name:"resource_type",kind:"scalar",T:9},{no:2,name:"resource_id",kind:"scalar",T:9},{no:3,name:"permissions",kind:"scalar",T:9,repeated:!0}]),lv=s.makeMessageType("viam.app.v1.CheckPermissionsResponse",()=>[{no:1,name:"authorized_permissions",kind:"message",T:ci,repeated:!0}]),dv=s.makeMessageType("viam.app.v1.ModuleVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:di,repeated:!0},{no:3,name:"models",kind:"message",T:ln,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:cn,repeated:!0}]),pv=s.makeMessageType("viam.app.v1.ModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:ln,repeated:!0},{no:2,name:"versions",kind:"message",T:dv,repeated:!0},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"first_run",kind:"scalar",T:9,opt:!0},{no:5,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:6,name:"apps",kind:"message",T:cn,repeated:!0},{no:7,name:"source_type",kind:"enum",T:s.getEnumType(Xa),opt:!0},{no:8,name:"language",kind:"enum",T:s.getEnumType(Qa),opt:!0}]),uv=s.makeMessageType("viam.app.v1.MLModelVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:_}]),gv=s.makeMessageType("viam.app.v1.MLModelMetadata",()=>[{no:1,name:"versions",kind:"scalar",T:9,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:4,name:"detailed_versions",kind:"message",T:uv,repeated:!0}]),Tv=s.makeMessageType("viam.app.v1.MLTrainingVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:_}]),kv=s.makeMessageType("viam.app.v1.MLTrainingMetadata",()=>[{no:5,name:"versions",kind:"message",T:Tv,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:4,name:"draft",kind:"scalar",T:8}]),tt=s.makeMessageType("viam.app.v1.RegistryItem",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"public_namespace",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"enum",T:s.getEnumType(ja)},{no:6,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:7,name:"url",kind:"scalar",T:9},{no:8,name:"description",kind:"scalar",T:9},{no:9,name:"total_robot_usage",kind:"scalar",T:3},{no:13,name:"total_external_robot_usage",kind:"scalar",T:3},{no:10,name:"total_organization_usage",kind:"scalar",T:3},{no:14,name:"total_external_organization_usage",kind:"scalar",T:3},{no:11,name:"module_metadata",kind:"message",T:pv,oneof:"metadata"},{no:12,name:"ml_model_metadata",kind:"message",T:gv,oneof:"metadata"},{no:18,name:"ml_training_metadata",kind:"message",T:kv,oneof:"metadata"},{no:15,name:"created_at",kind:"message",T:_},{no:16,name:"updated_at",kind:"message",T:_}]),yv=s.makeMessageType("viam.app.v1.GetRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),vv=s.makeMessageType("viam.app.v1.GetRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:tt}]),hv=s.makeMessageType("viam.app.v1.CreateRegistryItemRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:s.getEnumType(ja)}]),fv=s.makeMessageType("viam.app.v1.CreateRegistryItemResponse",[]),Rv=s.makeMessageType("viam.app.v1.UpdateRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(ja)},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:5,name:"url",kind:"scalar",T:9,opt:!0},{no:6,name:"update_module_metadata",kind:"message",T:Uv,oneof:"metadata"},{no:7,name:"update_ml_model_metadata",kind:"message",T:Lv,oneof:"metadata"},{no:8,name:"update_ml_training_metadata",kind:"message",T:Gv,oneof:"metadata"},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),_v=s.makeMessageType("viam.app.v1.UpdateRegistryItemResponse",[]),Sv=s.makeMessageType("viam.app.v1.ListRegistryItemsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"types",kind:"enum",T:s.getEnumType(ja),repeated:!0},{no:3,name:"visibilities",kind:"enum",T:s.getEnumType(hn),repeated:!0},{no:4,name:"platforms",kind:"scalar",T:9,repeated:!0},{no:5,name:"statuses",kind:"enum",T:s.getEnumType(Xg),repeated:!0},{no:6,name:"search_term",kind:"scalar",T:9,opt:!0},{no:7,name:"page_token",kind:"scalar",T:9,opt:!0},{no:8,name:"public_namespaces",kind:"scalar",T:9,repeated:!0},{no:9,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0},{no:10,name:"module_source_types",kind:"enum",T:s.getEnumType(Xa),repeated:!0},{no:11,name:"module_languages",kind:"enum",T:s.getEnumType(Qa),repeated:!0}]),Iv=s.makeMessageType("viam.app.v1.ListRegistryItemsResponse",()=>[{no:1,name:"items",kind:"message",T:tt,repeated:!0}]),Ev=s.makeMessageType("viam.app.v1.DeleteRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9}]),Ov=s.makeMessageType("viam.app.v1.DeleteRegistryItemResponse",[]),Mv=s.makeMessageType("viam.app.v1.RenameRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_name",kind:"scalar",T:9}]),bv=s.makeMessageType("viam.app.v1.RenameRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:tt}]),wv=s.makeMessageType("viam.app.v1.TransferRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),Cv=s.makeMessageType("viam.app.v1.TransferRegistryItemResponse",[]),Dv=s.makeMessageType("viam.app.v1.CreateModuleRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Nv=s.makeMessageType("viam.app.v1.CreateModuleResponse",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),Pv=s.makeMessageType("viam.app.v1.UpdateModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:3,name:"url",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"models",kind:"message",T:ln,repeated:!0},{no:6,name:"entrypoint",kind:"scalar",T:9},{no:7,name:"first_run",kind:"scalar",T:9,opt:!0},{no:8,name:"apps",kind:"message",T:cn,repeated:!0},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),Av=s.makeMessageType("viam.app.v1.AllowedOrgIDs",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),cn=s.makeMessageType("viam.app.v1.App",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:6,name:"customizations",kind:"message",T:Lh},{no:7,name:"allowed_org_ids",kind:"message",T:Av,opt:!0}]),qv=s.makeMessageType("viam.app.v1.UpdateModuleResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),Uv=s.makeMessageType("viam.app.v1.UpdateModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:ln,repeated:!0},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"apps",kind:"message",T:cn,repeated:!0},{no:4,name:"source_type",kind:"enum",T:s.getEnumType(Xa),opt:!0},{no:5,name:"language",kind:"enum",T:s.getEnumType(Qa),opt:!0}]),Lv=s.makeMessageType("viam.app.v1.UpdateMLModelMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(rn)}]),Gv=s.makeMessageType("viam.app.v1.UpdateMLTrainingMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:3,name:"draft",kind:"scalar",T:8}]),ln=s.makeMessageType("viam.app.v1.Model",()=>[{no:1,name:"api",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"markdown_documentation",kind:"scalar",T:9,opt:!0},{no:4,name:"description",kind:"scalar",T:9,opt:!0},{no:5,name:"supported_hardware",kind:"scalar",T:9,repeated:!0}]),Bv=s.makeMessageType("viam.app.v1.ModuleFileInfo",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"platform",kind:"scalar",T:9},{no:5,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),Fv=s.makeMessageType("viam.app.v1.UploadModuleFileRequest",()=>[{no:1,name:"module_file_info",kind:"message",T:Bv,oneof:"module_file"},{no:2,name:"file",kind:"scalar",T:12,oneof:"module_file"}]),xv=s.makeMessageType("viam.app.v1.UploadModuleFileResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),Jv=s.makeMessageType("viam.app.v1.GetModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),zv=s.makeMessageType("viam.app.v1.GetModuleResponse",()=>[{no:1,name:"module",kind:"message",T:li}]),li=s.makeMessageType("viam.app.v1.Module",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:4,name:"versions",kind:"message",T:Vv,repeated:!0},{no:5,name:"url",kind:"scalar",T:9},{no:6,name:"description",kind:"scalar",T:9},{no:7,name:"models",kind:"message",T:ln,repeated:!0},{no:8,name:"total_robot_usage",kind:"scalar",T:3},{no:9,name:"total_organization_usage",kind:"scalar",T:3},{no:10,name:"organization_id",kind:"scalar",T:9},{no:11,name:"entrypoint",kind:"scalar",T:9},{no:12,name:"public_namespace",kind:"scalar",T:9},{no:13,name:"first_run",kind:"scalar",T:9,opt:!0},{no:14,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:15,name:"apps",kind:"message",T:cn,repeated:!0}]),Vv=s.makeMessageType("viam.app.v1.VersionHistory",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:di,repeated:!0},{no:3,name:"models",kind:"message",T:ln,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:cn,repeated:!0}]),di=s.makeMessageType("viam.app.v1.Uploads",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"uploaded_at",kind:"message",T:_}]),$v=s.makeMessageType("viam.app.v1.ListModulesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),Yv=s.makeMessageType("viam.app.v1.ListModulesResponse",()=>[{no:1,name:"modules",kind:"message",T:li,repeated:!0}]),Wv=s.makeMessageType("viam.app.v1.GetUserIDByEmailRequest",()=>[{no:1,name:"email",kind:"scalar",T:9}]),jv=s.makeMessageType("viam.app.v1.GetUserIDByEmailResponse",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),Hv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserRequest",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),pi=s.makeMessageType("viam.app.v1.OrgDetails",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"org_name",kind:"scalar",T:9},{no:3,name:"org_cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:5,name:"billing_tier",kind:"scalar",T:9,opt:!0}]),Kv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserResponse",()=>[{no:1,name:"orgs",kind:"message",T:pi,repeated:!0}]),Xv=s.makeMessageType("viam.app.v1.SearchOrganizationsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9,opt:!0},{no:2,name:"org_name",kind:"scalar",T:9,opt:!0},{no:3,name:"cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0}]),Qv=s.makeMessageType("viam.app.v1.SearchOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:pi,repeated:!0}]),Zv=s.makeMessageType("viam.app.v1.CreateKeyRequest",()=>[{no:1,name:"authorizations",kind:"message",T:ae,repeated:!0},{no:2,name:"name",kind:"scalar",T:9}]),eh=s.makeMessageType("viam.app.v1.CreateKeyResponse",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9}]),nh=s.makeMessageType("viam.app.v1.DeleteKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ah=s.makeMessageType("viam.app.v1.DeleteKeyResponse",[]),th=s.makeMessageType("viam.app.v1.RenameKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),sh=s.makeMessageType("viam.app.v1.RenameKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),oh=s.makeMessageType("viam.app.v1.AuthorizationDetails",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"org_id",kind:"scalar",T:9}]),ui=s.makeMessageType("viam.app.v1.APIKeyWithAuthorizations",()=>[{no:1,name:"api_key",kind:"message",T:Hk},{no:2,name:"authorizations",kind:"message",T:oh,repeated:!0}]),ih=s.makeMessageType("viam.app.v1.ListKeysRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),rh=s.makeMessageType("viam.app.v1.ListKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:ui,repeated:!0}]),mh=s.makeMessageType("viam.app.v1.RotateKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ch=s.makeMessageType("viam.app.v1.RotateKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),lh=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),dh=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),ph=s.makeMessageType("viam.app.v1.GetAppContentRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),uh=s.makeMessageType("viam.app.v1.GetAppContentResponse",()=>[{no:1,name:"blob_path",kind:"scalar",T:9},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"app_type",kind:"enum",T:s.getEnumType(Qg)},{no:4,name:"public",kind:"scalar",T:8}]),gh=s.makeMessageType("viam.app.v1.OrganizationSetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"logo",kind:"scalar",T:12}]),Th=s.makeMessageType("viam.app.v1.OrganizationSetLogoResponse",[]),kh=s.makeMessageType("viam.app.v1.OrganizationGetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),yh=s.makeMessageType("viam.app.v1.OrganizationGetLogoResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),vh=s.makeMessageType("viam.app.v1.EnableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),hh=s.makeMessageType("viam.app.v1.EnableAuthServiceResponse",[]),fh=s.makeMessageType("viam.app.v1.DisableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Rh=s.makeMessageType("viam.app.v1.DisableAuthServiceResponse",[]),_h=s.makeMessageType("viam.app.v1.CreateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_name",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:st}]),Sh=s.makeMessageType("viam.app.v1.CreateOAuthAppResponse",()=>[{no:1,name:"client_id",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9}]),Ih=s.makeMessageType("viam.app.v1.ReadOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),Eh=s.makeMessageType("viam.app.v1.ReadOAuthAppResponse",()=>[{no:1,name:"client_name",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:st}]),Oh=s.makeMessageType("viam.app.v1.UpdateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9},{no:3,name:"client_name",kind:"scalar",T:9},{no:4,name:"oauth_config",kind:"message",T:st}]),Mh=s.makeMessageType("viam.app.v1.UpdateOAuthAppResponse",[]),bh=s.makeMessageType("viam.app.v1.DeleteOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),wh=s.makeMessageType("viam.app.v1.DeleteOAuthAppResponse",[]),Ch=s.makeMessageType("viam.app.v1.ListOAuthAppsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Dh=s.makeMessageType("viam.app.v1.ListOAuthAppsResponse",()=>[{no:1,name:"client_ids",kind:"scalar",T:9,repeated:!0}]),Nh=s.makeMessageType("viam.app.v1.CreateOAuthAppUserRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"application_id",kind:"scalar",T:9},{no:3,name:"email",kind:"scalar",T:9},{no:4,name:"first_name",kind:"scalar",T:9},{no:5,name:"last_name",kind:"scalar",T:9},{no:6,name:"password",kind:"scalar",T:9}]),Ph=s.makeMessageType("viam.app.v1.CreateOAuthAppUserResponse",()=>[{no:1,name:"auth_token",kind:"scalar",T:9},{no:2,name:"registration_id",kind:"scalar",T:9},{no:3,name:"user_id",kind:"scalar",T:9},{no:4,name:"refresh_token",kind:"scalar",T:9}]),st=s.makeMessageType("viam.app.v1.OAuthConfig",()=>[{no:1,name:"client_authentication",kind:"enum",T:s.getEnumType(Zg)},{no:2,name:"pkce",kind:"enum",T:s.getEnumType(eT)},{no:3,name:"url_validation",kind:"enum",T:s.getEnumType(nT)},{no:4,name:"origin_uris",kind:"scalar",T:9,repeated:!0},{no:5,name:"redirect_uris",kind:"scalar",T:9,repeated:!0},{no:6,name:"logout_uri",kind:"scalar",T:9},{no:7,name:"enabled_grants",kind:"enum",T:s.getEnumType(aT),repeated:!0},{no:8,name:"invite_redirect_uri",kind:"scalar",T:9}]),Ah=s.makeMessageType("viam.app.v1.GetAppBrandingRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),qh=s.makeMessageType("viam.app.v1.TextOverrides",()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"scalar",T:9}}]),Uh=s.makeMessageType("viam.app.v1.GetAppBrandingResponse",()=>[{no:1,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:2,name:"text_customizations",kind:"map",K:9,V:{kind:"message",T:qh}},{no:3,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"allowed_org_ids",kind:"scalar",T:9,repeated:!0}]),Lh=s.makeMessageType("viam.app.v1.AppCustomizations",()=>[{no:1,name:"machine_picker",kind:"message",T:Gh}]),Gh=s.makeMessageType("viam.app.v1.MachinePickerCustomizations",()=>[{no:1,name:"heading",kind:"scalar",T:9,opt:!0},{no:2,name:"subheading",kind:"scalar",T:9,opt:!0}]),Bh=s.makeMessageType("viam.app.v1.UploadDevicePushTokenRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9},{no:2,name:"device_token",kind:"scalar",T:9},{no:3,name:"device_uuid",kind:"scalar",T:9}]),Fh=s.makeMessageType("viam.app.v1.UploadDevicePushTokenResponse",[]),xh=s.makeMessageType("viam.app.v1.DeleteDevicePushTokenRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9},{no:2,name:"device_uuid",kind:"scalar",T:9}]),Jh=s.makeMessageType("viam.app.v1.DeleteDevicePushTokenResponse",[]),zh=s.makeMessageType("viam.app.v1.GetDevicePushTokensRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9}]),Vh=s.makeMessageType("viam.app.v1.GetDevicePushTokensResponse",()=>[{no:1,name:"device_tokens",kind:"scalar",T:9,repeated:!0}]),$h=s.makeMessageType("viam.app.v1.SetFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"app_id",kind:"scalar",T:9},{no:3,name:"config_json",kind:"scalar",T:9}]),Yh=s.makeMessageType("viam.app.v1.SetFirebaseConfigResponse",[]),Wh=s.makeMessageType("viam.app.v1.GetFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),jh=s.makeMessageType("viam.app.v1.GetFirebaseConfigResponse",()=>[{no:1,name:"app_id",kind:"scalar",T:9}]),Hh=s.makeMessageType("viam.app.v1.DeleteFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"app_id",kind:"scalar",T:9}]),Kh=s.makeMessageType("viam.app.v1.DeleteFirebaseConfigResponse",[]),NI=Object.freeze(Object.defineProperty({__proto__:null,APIKey:Hk,APIKeyWithAuthorizations:ui,AddRoleRequest:nv,AddRoleResponse:av,AdditionalFragment:ri,AllowedOrgIDs:Av,App:cn,AppCustomizations:Lh,AppType:Qg,AuthenticationType:Hg,AuthenticatorInfo:ai,Authorization:ae,AuthorizationDetails:oh,AuthorizedPermissions:ci,BillingAddress:Za,ChangeRoleRequest:ov,ChangeRoleResponse:iv,CheckPermissionsRequest:cv,CheckPermissionsResponse:lv,ClientAuthentication:Zg,CreateFragmentRequest:iy,CreateFragmentResponse:ry,CreateKeyFromExistingKeyAuthorizationsRequest:lh,CreateKeyFromExistingKeyAuthorizationsResponse:dh,CreateKeyRequest:Zv,CreateKeyResponse:eh,CreateLocationRequest:KT,CreateLocationResponse:XT,CreateLocationSecretRequest:kk,CreateLocationSecretResponse:yk,CreateModuleRequest:Dv,CreateModuleResponse:Nv,CreateOAuthAppRequest:_h,CreateOAuthAppResponse:Sh,CreateOAuthAppUserRequest:Nh,CreateOAuthAppUserResponse:Ph,CreateOrganizationInviteRequest:ET,CreateOrganizationInviteResponse:OT,CreateOrganizationRequest:rT,CreateOrganizationResponse:mT,CreateRegistryItemRequest:hv,CreateRegistryItemResponse:fv,CreateRobotPartSecretRequest:Xy,CreateRobotPartSecretResponse:Qy,DeleteDevicePushTokenRequest:xh,DeleteDevicePushTokenResponse:Jh,DeleteFirebaseConfigRequest:Hh,DeleteFirebaseConfigResponse:Kh,DeleteFragmentRequest:ly,DeleteFragmentResponse:dy,DeleteFragmentTagRequest:vy,DeleteFragmentTagResponse:hy,DeleteKeyRequest:nh,DeleteKeyResponse:ah,DeleteLocationRequest:ak,DeleteLocationResponse:tk,DeleteLocationSecretRequest:vk,DeleteLocationSecretResponse:hk,DeleteOAuthAppRequest:bh,DeleteOAuthAppResponse:wh,DeleteOrganizationInviteRequest:wT,DeleteOrganizationInviteResponse:CT,DeleteOrganizationMemberRequest:PT,DeleteOrganizationMemberResponse:AT,DeleteOrganizationRequest:yT,DeleteOrganizationResponse:vT,DeleteRegistryItemRequest:Ev,DeleteRegistryItemResponse:Ov,DeleteRobotPartRequest:zk,DeleteRobotPartResponse:Xk,DeleteRobotPartSecretRequest:Zy,DeleteRobotPartSecretResponse:ev,DeleteRobotRequest:xy,DeleteRobotResponse:Jy,DisableAuthServiceRequest:fh,DisableAuthServiceResponse:Rh,DisableBillingServiceRequest:xT,DisableBillingServiceResponse:JT,EnableAuthServiceRequest:vh,EnableAuthServiceResponse:hh,EnableBillingServiceRequest:qT,EnableBillingServiceResponse:UT,EnabledGrant:aT,Fragment:Ze,FragmentError:ey,FragmentErrorType:Kg,FragmentHistoryEntry:Qk,FragmentImport:ny,FragmentImportList:ti,FragmentRevision:Zk,FragmentSummary:Cy,FragmentTag:nt,FragmentUsage:at,FragmentVisibility:Vn,GetAppBrandingRequest:Ah,GetAppBrandingResponse:Uh,GetAppContentRequest:ph,GetAppContentResponse:uh,GetBillingServiceConfigRequest:BT,GetBillingServiceConfigResponse:FT,GetDevicePushTokensRequest:zh,GetDevicePushTokensResponse:Vh,GetFirebaseConfigRequest:Wh,GetFirebaseConfigResponse:jh,GetFragmentHistoryRequest:py,GetFragmentHistoryResponse:uy,GetFragmentRequest:sy,GetFragmentResponse:oy,GetFragmentUsageRequest:gy,GetFragmentUsageResponse:Ty,GetLocationMetadataRequest:sk,GetLocationMetadataResponse:ok,GetLocationRequest:QT,GetLocationResponse:ZT,GetModuleRequest:Jv,GetModuleResponse:zv,GetOrganizationMetadataRequest:hT,GetOrganizationMetadataResponse:fT,GetOrganizationNamespaceAvailabilityRequest:dT,GetOrganizationNamespaceAvailabilityResponse:pT,GetOrganizationRequest:cT,GetOrganizationResponse:lT,GetOrganizationsWithAccessToLocationRequest:mk,GetOrganizationsWithAccessToLocationResponse:ck,GetRegistryItemRequest:yv,GetRegistryItemResponse:vv,GetRobotAPIKeysRequest:jk,GetRobotAPIKeysResponse:Kk,GetRobotMetadataRequest:zy,GetRobotMetadataResponse:Vy,GetRobotPartByNameAndLocationRequest:Dk,GetRobotPartByNameAndLocationResponse:Nk,GetRobotPartHistoryRequest:Lk,GetRobotPartHistoryResponse:Gk,GetRobotPartLogsRequest:Pk,GetRobotPartLogsResponse:Ak,GetRobotPartMetadataRequest:Vk,GetRobotPartMetadataResponse:$k,GetRobotPartRequest:wk,GetRobotPartResponse:Ck,GetRobotPartsRequest:Mk,GetRobotPartsResponse:bk,GetRobotRequest:_k,GetRobotResponse:Ok,GetRoverRentalRobotsRequest:Sk,GetRoverRentalRobotsResponse:Ek,GetUserIDByEmailRequest:Wv,GetUserIDByEmailResponse:jv,ListAuthorizationsRequest:rv,ListAuthorizationsResponse:mv,ListFragmentsRequest:ay,ListFragmentsResponse:ty,ListKeysRequest:ih,ListKeysResponse:rh,ListLocationsRequest:lk,ListLocationsResponse:Tk,ListMachineFragmentsRequest:Ey,ListMachineFragmentsResponse:Oy,ListMachineSummariesRequest:mi,ListMachineSummariesResponse:My,ListModulesRequest:$v,ListModulesResponse:Yv,ListNestedFragmentsRequest:Sy,ListNestedFragmentsResponse:Iy,ListOAuthAppsRequest:Ch,ListOAuthAppsResponse:Dh,ListOrganizationMembersRequest:ST,ListOrganizationMembersResponse:IT,ListOrganizationsByUserRequest:Hv,ListOrganizationsByUserResponse:Kv,ListOrganizationsRequest:sT,ListOrganizationsResponse:iT,ListRegistryItemsRequest:Sv,ListRegistryItemsResponse:Iv,ListRobotsForLocationsRequest:Ry,ListRobotsForLocationsResponse:qy,ListRobotsForOrgRequest:_y,ListRobotsForOrgResponse:Uy,ListRobotsRequest:fy,ListRobotsResponse:Ay,Location:Yn,LocationAuth:et,LocationAuthRequest:fk,LocationAuthResponse:Rk,LocationOrganization:WT,LocationSummary:by,MLModelMetadata:gv,MLModelVersion:uv,MLTrainingMetadata:kv,MLTrainingVersion:Tv,MachinePickerCustomizations:Gh,MachineSummary:wy,MarkPartAsMainRequest:Wy,MarkPartAsMainResponse:jy,MarkPartForRestartRequest:Hy,MarkPartForRestartResponse:Ky,Model:ln,Module:li,ModuleFileInfo:Bv,ModuleLanguage:Qa,ModuleMetadata:pv,ModuleSourceType:Xa,ModuleVersion:dv,NewRobotPartRequest:xk,NewRobotPartResponse:Jk,NewRobotRequest:Ly,NewRobotResponse:Gy,OAuthConfig:st,OnlineState:Ka,OrgDetails:pi,Organization:Rn,OrganizationGetLogoRequest:kh,OrganizationGetLogoResponse:yh,OrganizationGetSupportEmailRequest:$T,OrganizationGetSupportEmailResponse:YT,OrganizationIdentity:si,OrganizationInvite:$n,OrganizationMember:oT,OrganizationSetLogoRequest:gh,OrganizationSetLogoResponse:Th,OrganizationSetSupportEmailRequest:zT,OrganizationSetSupportEmailResponse:VT,PKCE:eT,PartSummary:Py,ReadOAuthAppRequest:Ih,ReadOAuthAppResponse:Eh,RegistryItem:tt,RegistryItemStatus:Xg,RemoveRoleRequest:tv,RemoveRoleResponse:sv,RenameKeyRequest:th,RenameKeyResponse:sh,RenameRegistryItemRequest:Mv,RenameRegistryItemResponse:bv,ResendOrganizationInviteRequest:DT,ResendOrganizationInviteResponse:NT,ResolvedFragment:ii,Robot:fn,RobotPart:mn,RobotPartHistoryEntry:tT,RotateKeyRequest:mh,RotateKeyResponse:ch,RoverRentalRobot:Ik,SearchOrganizationsRequest:Xv,SearchOrganizationsResponse:Qv,SetFirebaseConfigRequest:$h,SetFirebaseConfigResponse:Yh,SetFragmentTagRequest:ky,SetFragmentTagResponse:yy,ShareLocationRequest:dk,ShareLocationResponse:pk,SharedSecret:oi,SharedSecret_State:HT,StorageConfig:jT,TailRobotPartLogsRequest:qk,TailRobotPartLogsResponse:Uk,TextOverrides:qh,TransferRegistryItemRequest:wv,TransferRegistryItemResponse:Cv,URLValidation:nT,UnshareLocationRequest:uk,UnshareLocationResponse:gk,UpdateBillingServiceRequest:LT,UpdateBillingServiceResponse:GT,UpdateFragmentRequest:my,UpdateFragmentResponse:cy,UpdateLocationMetadataRequest:ik,UpdateLocationMetadataResponse:rk,UpdateLocationRequest:ek,UpdateLocationResponse:nk,UpdateMLModelMetadata:Lv,UpdateMLTrainingMetadata:Gv,UpdateModuleMetadata:Uv,UpdateModuleRequest:Pv,UpdateModuleResponse:qv,UpdateOAuthAppRequest:Oh,UpdateOAuthAppResponse:Mh,UpdateOrganizationInviteAuthorizationsRequest:MT,UpdateOrganizationInviteAuthorizationsResponse:bT,UpdateOrganizationMetadataRequest:RT,UpdateOrganizationMetadataResponse:_T,UpdateOrganizationNamespaceRequest:TT,UpdateOrganizationNamespaceResponse:kT,UpdateOrganizationRequest:uT,UpdateOrganizationResponse:gT,UpdateRegistryItemRequest:Rv,UpdateRegistryItemResponse:_v,UpdateRobotMetadataRequest:$y,UpdateRobotMetadataResponse:Yy,UpdateRobotPartMetadataRequest:Yk,UpdateRobotPartMetadataResponse:Wk,UpdateRobotPartRequest:Bk,UpdateRobotPartResponse:Fk,UpdateRobotRequest:By,UpdateRobotResponse:Fy,UploadDevicePushTokenRequest:Bh,UploadDevicePushTokenResponse:Fh,UploadModuleFileRequest:Fv,UploadModuleFileResponse:xv,Uploads:di,VersionHistory:Vv,ViamAgentVersion:Ny,ViamServerVersion:Dy,Visibility:hn},Symbol.toStringTag,{value:"Module"})),PI={typeName:"viam.app.v1.AppService",methods:{getUserIDByEmail:{name:"GetUserIDByEmail",I:Wv,O:jv,kind:m.Unary},createOrganization:{name:"CreateOrganization",I:rT,O:mT,kind:m.Unary},listOrganizations:{name:"ListOrganizations",I:sT,O:iT,kind:m.Unary},getOrganizationsWithAccessToLocation:{name:"GetOrganizationsWithAccessToLocation",I:mk,O:ck,kind:m.Unary},listOrganizationsByUser:{name:"ListOrganizationsByUser",I:Hv,O:Kv,kind:m.Unary},searchOrganizations:{name:"SearchOrganizations",I:Xv,O:Qv,kind:m.Unary},getOrganization:{name:"GetOrganization",I:cT,O:lT,kind:m.Unary},getOrganizationNamespaceAvailability:{name:"GetOrganizationNamespaceAvailability",I:dT,O:pT,kind:m.Unary},updateOrganization:{name:"UpdateOrganization",I:uT,O:gT,kind:m.Unary},updateOrganizationNamespace:{name:"UpdateOrganizationNamespace",I:TT,O:kT,kind:m.Unary},deleteOrganization:{name:"DeleteOrganization",I:yT,O:vT,kind:m.Unary},getOrganizationMetadata:{name:"GetOrganizationMetadata",I:hT,O:fT,kind:m.Unary},updateOrganizationMetadata:{name:"UpdateOrganizationMetadata",I:RT,O:_T,kind:m.Unary},listOrganizationMembers:{name:"ListOrganizationMembers",I:ST,O:IT,kind:m.Unary},createOrganizationInvite:{name:"CreateOrganizationInvite",I:ET,O:OT,kind:m.Unary},updateOrganizationInviteAuthorizations:{name:"UpdateOrganizationInviteAuthorizations",I:MT,O:bT,kind:m.Unary},deleteOrganizationMember:{name:"DeleteOrganizationMember",I:PT,O:AT,kind:m.Unary},deleteOrganizationInvite:{name:"DeleteOrganizationInvite",I:wT,O:CT,kind:m.Unary},resendOrganizationInvite:{name:"ResendOrganizationInvite",I:DT,O:NT,kind:m.Unary},enableBillingService:{name:"EnableBillingService",I:qT,O:UT,kind:m.Unary},disableBillingService:{name:"DisableBillingService",I:xT,O:JT,kind:m.Unary},updateBillingService:{name:"UpdateBillingService",I:LT,O:GT,kind:m.Unary},getBillingServiceConfig:{name:"GetBillingServiceConfig",I:BT,O:FT,kind:m.Unary},organizationSetSupportEmail:{name:"OrganizationSetSupportEmail",I:zT,O:VT,kind:m.Unary},organizationGetSupportEmail:{name:"OrganizationGetSupportEmail",I:$T,O:YT,kind:m.Unary},organizationSetLogo:{name:"OrganizationSetLogo",I:gh,O:Th,kind:m.Unary},organizationGetLogo:{name:"OrganizationGetLogo",I:kh,O:yh,kind:m.Unary},enableAuthService:{name:"EnableAuthService",I:vh,O:hh,kind:m.Unary},disableAuthService:{name:"DisableAuthService",I:fh,O:Rh,kind:m.Unary},createOAuthApp:{name:"CreateOAuthApp",I:_h,O:Sh,kind:m.Unary},readOAuthApp:{name:"ReadOAuthApp",I:Ih,O:Eh,kind:m.Unary},updateOAuthApp:{name:"UpdateOAuthApp",I:Oh,O:Mh,kind:m.Unary},deleteOAuthApp:{name:"DeleteOAuthApp",I:bh,O:wh,kind:m.Unary},listOAuthApps:{name:"ListOAuthApps",I:Ch,O:Dh,kind:m.Unary},createOAuthAppUser:{name:"CreateOAuthAppUser",I:Nh,O:Ph,kind:m.Unary},createLocation:{name:"CreateLocation",I:KT,O:XT,kind:m.Unary},getLocation:{name:"GetLocation",I:QT,O:ZT,kind:m.Unary},updateLocation:{name:"UpdateLocation",I:ek,O:nk,kind:m.Unary},deleteLocation:{name:"DeleteLocation",I:ak,O:tk,kind:m.Unary},getLocationMetadata:{name:"GetLocationMetadata",I:sk,O:ok,kind:m.Unary},updateLocationMetadata:{name:"UpdateLocationMetadata",I:ik,O:rk,kind:m.Unary},listLocations:{name:"ListLocations",I:lk,O:Tk,kind:m.Unary},shareLocation:{name:"ShareLocation",I:dk,O:pk,kind:m.Unary},unshareLocation:{name:"UnshareLocation",I:uk,O:gk,kind:m.Unary},locationAuth:{name:"LocationAuth",I:fk,O:Rk,kind:m.Unary},createLocationSecret:{name:"CreateLocationSecret",I:kk,O:yk,kind:m.Unary},deleteLocationSecret:{name:"DeleteLocationSecret",I:vk,O:hk,kind:m.Unary},getRobot:{name:"GetRobot",I:_k,O:Ok,kind:m.Unary},getRobotMetadata:{name:"GetRobotMetadata",I:zy,O:Vy,kind:m.Unary},updateRobotMetadata:{name:"UpdateRobotMetadata",I:$y,O:Yy,kind:m.Unary},getRoverRentalRobots:{name:"GetRoverRentalRobots",I:Sk,O:Ek,kind:m.Unary},getRobotParts:{name:"GetRobotParts",I:Mk,O:bk,kind:m.Unary},getRobotPart:{name:"GetRobotPart",I:wk,O:Ck,kind:m.Unary},getRobotPartByNameAndLocation:{name:"GetRobotPartByNameAndLocation",I:Dk,O:Nk,kind:m.Unary},getRobotPartLogs:{name:"GetRobotPartLogs",I:Pk,O:Ak,kind:m.Unary},tailRobotPartLogs:{name:"TailRobotPartLogs",I:qk,O:Uk,kind:m.ServerStreaming},getRobotPartHistory:{name:"GetRobotPartHistory",I:Lk,O:Gk,kind:m.Unary},updateRobotPart:{name:"UpdateRobotPart",I:Bk,O:Fk,kind:m.Unary},newRobotPart:{name:"NewRobotPart",I:xk,O:Jk,kind:m.Unary},deleteRobotPart:{name:"DeleteRobotPart",I:zk,O:Xk,kind:m.Unary},getRobotPartMetadata:{name:"GetRobotPartMetadata",I:Vk,O:$k,kind:m.Unary},updateRobotPartMetadata:{name:"UpdateRobotPartMetadata",I:Yk,O:Wk,kind:m.Unary},getRobotAPIKeys:{name:"GetRobotAPIKeys",I:jk,O:Kk,kind:m.Unary},markPartAsMain:{name:"MarkPartAsMain",I:Wy,O:jy,kind:m.Unary},markPartForRestart:{name:"MarkPartForRestart",I:Hy,O:Ky,kind:m.Unary},createRobotPartSecret:{name:"CreateRobotPartSecret",I:Xy,O:Qy,kind:m.Unary},deleteRobotPartSecret:{name:"DeleteRobotPartSecret",I:Zy,O:ev,kind:m.Unary},listRobots:{name:"ListRobots",I:fy,O:Ay,kind:m.Unary},listRobotsForLocations:{name:"ListRobotsForLocations",I:Ry,O:qy,kind:m.Unary},listRobotsForOrg:{name:"ListRobotsForOrg",I:_y,O:Uy,kind:m.Unary},newRobot:{name:"NewRobot",I:Ly,O:Gy,kind:m.Unary},updateRobot:{name:"UpdateRobot",I:By,O:Fy,kind:m.Unary},deleteRobot:{name:"DeleteRobot",I:xy,O:Jy,kind:m.Unary},listFragments:{name:"ListFragments",I:ay,O:ty,kind:m.Unary},getFragment:{name:"GetFragment",I:sy,O:oy,kind:m.Unary},createFragment:{name:"CreateFragment",I:iy,O:ry,kind:m.Unary},updateFragment:{name:"UpdateFragment",I:my,O:cy,kind:m.Unary},deleteFragment:{name:"DeleteFragment",I:ly,O:dy,kind:m.Unary},listNestedFragments:{name:"ListNestedFragments",I:Sy,O:Iy,kind:m.Unary},listMachineFragments:{name:"ListMachineFragments",I:Ey,O:Oy,kind:m.Unary},listMachineSummaries:{name:"ListMachineSummaries",I:mi,O:My,kind:m.Unary},getFragmentHistory:{name:"GetFragmentHistory",I:py,O:uy,kind:m.Unary},getFragmentUsage:{name:"GetFragmentUsage",I:gy,O:Ty,kind:m.Unary},setFragmentTag:{name:"SetFragmentTag",I:ky,O:yy,kind:m.Unary},deleteFragmentTag:{name:"DeleteFragmentTag",I:vy,O:hy,kind:m.Unary},addRole:{name:"AddRole",I:nv,O:av,kind:m.Unary},removeRole:{name:"RemoveRole",I:tv,O:sv,kind:m.Unary},changeRole:{name:"ChangeRole",I:ov,O:iv,kind:m.Unary},listAuthorizations:{name:"ListAuthorizations",I:rv,O:mv,kind:m.Unary},checkPermissions:{name:"CheckPermissions",I:cv,O:lv,kind:m.Unary},getRegistryItem:{name:"GetRegistryItem",I:yv,O:vv,kind:m.Unary},createRegistryItem:{name:"CreateRegistryItem",I:hv,O:fv,kind:m.Unary},updateRegistryItem:{name:"UpdateRegistryItem",I:Rv,O:_v,kind:m.Unary},listRegistryItems:{name:"ListRegistryItems",I:Sv,O:Iv,kind:m.Unary},deleteRegistryItem:{name:"DeleteRegistryItem",I:Ev,O:Ov,kind:m.Unary},renameRegistryItem:{name:"RenameRegistryItem",I:Mv,O:bv,kind:m.Unary},transferRegistryItem:{name:"TransferRegistryItem",I:wv,O:Cv,kind:m.Unary},createModule:{name:"CreateModule",I:Dv,O:Nv,kind:m.Unary},updateModule:{name:"UpdateModule",I:Pv,O:qv,kind:m.Unary},uploadModuleFile:{name:"UploadModuleFile",I:Fv,O:xv,kind:m.ClientStreaming},getModule:{name:"GetModule",I:Jv,O:zv,kind:m.Unary},listModules:{name:"ListModules",I:$v,O:Yv,kind:m.Unary},createKey:{name:"CreateKey",I:Zv,O:eh,kind:m.Unary},deleteKey:{name:"DeleteKey",I:nh,O:ah,kind:m.Unary},listKeys:{name:"ListKeys",I:ih,O:rh,kind:m.Unary},renameKey:{name:"RenameKey",I:th,O:sh,kind:m.Unary},rotateKey:{name:"RotateKey",I:mh,O:ch,kind:m.Unary},createKeyFromExistingKeyAuthorizations:{name:"CreateKeyFromExistingKeyAuthorizations",I:lh,O:dh,kind:m.Unary},getAppContent:{name:"GetAppContent",I:ph,O:uh,kind:m.Unary},getAppBranding:{name:"GetAppBranding",I:Ah,O:Uh,kind:m.Unary},uploadDevicePushToken:{name:"UploadDevicePushToken",I:Bh,O:Fh,kind:m.Unary},deleteDevicePushToken:{name:"DeleteDevicePushToken",I:xh,O:Jh,kind:m.Unary},getDevicePushTokens:{name:"GetDevicePushTokens",I:zh,O:Vh,kind:m.Unary},setFirebaseConfig:{name:"SetFirebaseConfig",I:$h,O:Yh,kind:m.Unary},getFirebaseConfig:{name:"GetFirebaseConfig",I:Wh,O:jh,kind:m.Unary},deleteFirebaseConfig:{name:"DeleteFirebaseConfig",I:Hh,O:Kh,kind:m.Unary}}},Xh=(t,e,n,a,o,i)=>new ae({authorizationType:"role",identityId:e,identityType:o,authorizationId:`${a}_${n}`,resourceType:a,organizationId:t,resourceId:i});class AI{client;constructor(e){this.client=X(PI,e)}async getUserIDByEmail(e){return(await this.client.getUserIDByEmail({email:e})).userId}async createOrganization(e){return(await this.client.createOrganization({name:e})).organization}async listOrganizations(){return(await this.client.listOrganizations({})).organizations}async getOrganizationsWithAccessToLocation(e){return(await this.client.getOrganizationsWithAccessToLocation({locationId:e})).organizationIdentities}async listOrganizationsByUser(e){return(await this.client.listOrganizationsByUser({userId:e})).orgs}async getOrganization(e){return(await this.client.getOrganization({organizationId:e})).organization}async getOrganizationNamespaceAvailability(e){return(await this.client.getOrganizationNamespaceAvailability({publicNamespace:e})).available}async updateOrganization(e,n,a,o,i,r){return(await this.client.updateOrganization({organizationId:e,name:n,publicNamespace:a,region:o,cid:i,defaultFragments:r})).organization}async deleteOrganization(e){await this.client.deleteOrganization({organizationId:e})}async listOrganizationMembers(e){return this.client.listOrganizationMembers({organizationId:e})}async createOrganizationInvite(e,n,a,o=!0){return(await this.client.createOrganizationInvite({organizationId:e,email:n,authorizations:a,sendEmailInvite:o})).invite}async updateOrganizationInviteAuthorizations(e,n,a,o){return(await this.client.updateOrganizationInviteAuthorizations({organizationId:e,email:n,addAuthorizations:a,removeAuthorizations:o})).invite}async deleteOrganizationMember(e,n){await this.client.deleteOrganizationMember({organizationId:e,userId:n})}async deleteOrganizationInvite(e,n){await this.client.deleteOrganizationInvite({organizationId:e,email:n})}async resendOrganizationInvite(e,n){return(await this.client.resendOrganizationInvite({organizationId:e,email:n})).invite}async createLocation(e,n,a){return(await this.client.createLocation({organizationId:e,name:n,parentLocationId:a})).location}async getLocation(e){return(await this.client.getLocation({locationId:e})).location}async updateLocation(e,n,a,o){return(await this.client.updateLocation({locationId:e,name:n,parentLocationId:a,region:o})).location}async deleteLocation(e){await this.client.deleteLocation({locationId:e})}async listLocations(e){return(await this.client.listLocations({organizationId:e})).locations}async shareLocation(e,n){await this.client.shareLocation({organizationId:e,locationId:n})}async unshareLocation(e,n){await this.client.unshareLocation({organizationId:e,locationId:n})}async locationAuth(e){return(await this.client.locationAuth({locationId:e})).auth}async createLocationSecret(e){return(await this.client.createLocationSecret({locationId:e})).auth}async deleteLocationSecret(e,n){await this.client.deleteLocationSecret({locationId:e,secretId:n})}async getRobot(e){return(await this.client.getRobot({id:e})).robot}async getRoverRentalRobots(e){return(await this.client.getRoverRentalRobots({orgId:e})).robots}async getRobotParts(e){return(await this.client.getRobotParts({robotId:e})).parts}async getRobotPart(e){return this.client.getRobotPart({id:e})}async getRobotPartByNameAndLocation(e,n){return this.client.getRobotPartByNameAndLocation({name:e,locationId:n})}async getRobotPartLogs(e,n,a,o,i,r=""){return this.client.getRobotPartLogs({id:e,filter:n,levels:a,pageToken:r,start:o?_.fromDate(o):void 0,end:i?_.fromDate(i):void 0})}async tailRobotPartLogs(e,n,a,o=!0){const i=this.client.tailRobotPartLogs({id:e,errorsOnly:o,filter:a});for await(const r of i)for(const c of r.logs)n.push(c)}async getRobotPartHistory(e){return(await this.client.getRobotPartHistory({id:e})).history}async updateRobotPart(e,n,a){return(await this.client.updateRobotPart({id:e,name:n,robotConfig:a})).part}async newRobotPart(e,n){return(await this.client.newRobotPart({robotId:e,partName:n})).partId}async deleteRobotPart(e){await this.client.deleteRobotPart({partId:e})}async getRobotAPIKeys(e){return(await this.client.getRobotAPIKeys({robotId:e})).apiKeys}async markPartAsMain(e){await this.client.markPartAsMain({partId:e})}async markPartForRestart(e){await this.client.markPartForRestart({partId:e})}async createRobotPartSecret(e){return(await this.client.createRobotPartSecret({partId:e})).part}async deleteRobotPartSecret(e,n){await this.client.deleteRobotPartSecret({partId:e,secretId:n})}async listRobots(e){return(await this.client.listRobots({locationId:e})).robots}async newRobot(e,n){return(await this.client.newRobot({name:n,location:e})).id}async updateRobot(e,n,a){return(await this.client.updateRobot({id:e,location:n,name:a})).robot}async deleteRobot(e){await this.client.deleteRobot({id:e})}async listFragments(e,n=!0,a=[]){return(await this.client.listFragments({organizationId:e,showPublic:n,fragmentVisibility:a})).fragments}async getFragment(e){return(await this.client.getFragment({id:e})).fragment}async createFragment(e,n,a){return(await this.client.createFragment({organizationId:e,name:n,config:a})).fragment}async updateFragment(e,n,a,o,i){return(await this.client.updateFragment({id:e,name:n,config:a,public:o,visibility:i})).fragment}async deleteFragment(e){await this.client.deleteFragment({id:e})}async listMachineFragments(e,n){return(await this.client.listMachineFragments({machineId:e,additionalFragmentIds:n})).fragments}async addRole(e,n,a,o,i){await this.client.addRole({authorization:Xh(e,n,a,o,"",i)})}async removeRole(e,n,a,o,i){await this.client.removeRole({authorization:Xh(e,n,a,o,"",i)})}async changeRole(e,n){await this.client.changeRole({oldAuthorization:e,newAuthorization:n})}async listAuthorizations(e,n){return(await this.client.listAuthorizations({organizationId:e,resourceIds:n})).authorizations}async checkPermissions(e){return(await this.client.checkPermissions({permissions:e})).authorizedPermissions}async getRegistryItem(e){return(await this.client.getRegistryItem({itemId:e})).item}async createRegistryItem(e,n,a){await this.client.createRegistryItem({organizationId:e,name:n,type:a})}async updateRegistryItem(e,n,a,o){await this.client.updateRegistryItem({itemId:e,type:n,description:a,visibility:o})}async listRegistryItems(e,n,a,o,i,r,c){const l={organizationId:e,types:n,visibilities:a,platforms:o,statuses:i,searchTerm:r,pageToken:c};return(await this.client.listRegistryItems(l)).items}async deleteRegistryItem(e){await this.client.deleteRegistryItem({itemId:e})}async createModule(e,n){return this.client.createModule({organizationId:e,name:n})}async updateModule(e,n,a,o,i,r){return(await this.client.updateModule({moduleId:e,visibility:n,url:a,description:o,models:i,entrypoint:r})).url}async getModule(e){return(await this.client.getModule({moduleId:e})).module}async listModules(e){return(await this.client.listModules({organizationId:e})).modules}async createKey(e,n){return this.client.createKey({name:n,authorizations:e})}async deleteKey(e){return this.client.deleteKey({id:e})}async listKeys(e){return(await this.client.listKeys({orgId:e})).apiKeys}async rotateKey(e){return this.client.rotateKey({id:e})}async createKeyFromExistingKeyAuthorizations(e){return this.client.createKeyFromExistingKeyAuthorizations({id:e})}async getAppContent(e,n){return this.client.getAppContent({publicNamespace:e,name:n})}async getOrganizationMetadata(e){return(await this.client.getOrganizationMetadata({organizationId:e})).toJson().data??{}}async updateOrganizationMetadata(e,n){await this.client.updateOrganizationMetadata({organizationId:e,data:p.fromJson(n)})}async getLocationMetadata(e){return(await this.client.getLocationMetadata({locationId:e})).toJson().data??{}}async updateLocationMetadata(e,n){await this.client.updateLocationMetadata({locationId:e,data:p.fromJson(n)})}async getRobotMetadata(e){return(await this.client.getRobotMetadata({id:e})).toJson().data??{}}async updateRobotMetadata(e,n){await this.client.updateRobotMetadata({id:e,data:p.fromJson(n)})}async getRobotPartMetadata(e){return(await this.client.getRobotPartMetadata({id:e})).toJson().data??{}}async updateRobotPartMetadata(e,n){await this.client.updateRobotPartMetadata({id:e,data:p.fromJson(n)})}async getAppBranding(e,n){return this.client.getAppBranding({publicNamespace:e,name:n})}async listMachineSummaries(e,n,a,o){const i=new mi({organizationId:e,fragmentIds:n,locationIds:a,limit:o});return(await this.client.listMachineSummaries(i)).locationSummaries}async createOAuthAppUser(e,n,a,o,i,r){return this.client.createOAuthAppUser({orgId:e,applicationId:n,email:a,firstName:o,lastName:i,password:r})}}const Qh=s.makeEnum("viam.app.v1.PaymentMethodType",[{no:0,name:"PAYMENT_METHOD_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PAYMENT_METHOD_TYPE_CARD",localName:"CARD"},{no:2,name:"PAYMENT_METHOD_TYPE_USBANKACCOUNT",localName:"USBANKACCOUNT"}]),Zh=s.makeEnum("viam.app.v1.UsageCostType",[{no:0,name:"USAGE_COST_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"USAGE_COST_TYPE_DATA_UPLOAD",localName:"DATA_UPLOAD"},{no:2,name:"USAGE_COST_TYPE_DATA_EGRESS",localName:"DATA_EGRESS"},{no:3,name:"USAGE_COST_TYPE_REMOTE_CONTROL",localName:"REMOTE_CONTROL"},{no:4,name:"USAGE_COST_TYPE_STANDARD_COMPUTE",localName:"STANDARD_COMPUTE"},{no:5,name:"USAGE_COST_TYPE_CLOUD_STORAGE",localName:"CLOUD_STORAGE"},{no:6,name:"USAGE_COST_TYPE_BINARY_DATA_CLOUD_STORAGE",localName:"BINARY_DATA_CLOUD_STORAGE"},{no:7,name:"USAGE_COST_TYPE_OTHER_CLOUD_STORAGE",localName:"OTHER_CLOUD_STORAGE"},{no:8,name:"USAGE_COST_TYPE_PER_MACHINE",localName:"PER_MACHINE"},{no:9,name:"USAGE_COST_TYPE_TRIGGER_NOTIFICATION",localName:"TRIGGER_NOTIFICATION"},{no:10,name:"USAGE_COST_TYPE_TABULAR_DATA_CLOUD_STORAGE",localName:"TABULAR_DATA_CLOUD_STORAGE"},{no:11,name:"USAGE_COST_TYPE_CONFIG_HISTORY_CLOUD_STORAGE",localName:"CONFIG_HISTORY_CLOUD_STORAGE"},{no:12,name:"USAGE_COST_TYPE_LOGS_CLOUD_STORAGE",localName:"LOGS_CLOUD_STORAGE"},{no:13,name:"USAGE_COST_TYPE_TRAINING_LOGS_CLOUD_STORAGE",localName:"TRAINING_LOGS_CLOUD_STORAGE"},{no:14,name:"USAGE_COST_TYPE_PACKAGES_CLOUD_STORAGE",localName:"PACKAGES_CLOUD_STORAGE"},{no:15,name:"USAGE_COST_TYPE_BINARY_DATA_UPLOAD",localName:"BINARY_DATA_UPLOAD"},{no:16,name:"USAGE_COST_TYPE_TABULAR_DATA_UPLOAD",localName:"TABULAR_DATA_UPLOAD"},{no:17,name:"USAGE_COST_TYPE_LOGS_UPLOAD",localName:"LOGS_UPLOAD"},{no:18,name:"USAGE_COST_TYPE_BINARY_DATA_EGRESS",localName:"BINARY_DATA_EGRESS"},{no:19,name:"USAGE_COST_TYPE_TABULAR_DATA_EGRESS",localName:"TABULAR_DATA_EGRESS"},{no:20,name:"USAGE_COST_TYPE_LOGS_EGRESS",localName:"LOGS_EGRESS"},{no:21,name:"USAGE_COST_TYPE_TRAINING_LOGS_EGRESS",localName:"TRAINING_LOGS_EGRESS"},{no:22,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_CLOUD_STORAGE",localName:"TABULAR_DATA_DATABASE_CLOUD_STORAGE"},{no:23,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_COMPUTE",localName:"TABULAR_DATA_DATABASE_COMPUTE"},{no:24,name:"USAGE_COST_TYPE_BINARY_DATA_CROSS_REGION_EGRESS",localName:"BINARY_DATA_CROSS_REGION_EGRESS"},{no:25,name:"USAGE_COST_TYPE_PIPELINE_SINK_CLOUD_STORAGE",localName:"PIPELINE_SINK_CLOUD_STORAGE"},{no:26,name:"USAGE_COST_TYPE_PIPELINE_SINK_COMPUTE",localName:"PIPELINE_SINK_COMPUTE"}]),ef=s.makeEnum("viam.app.v1.SourceType",[{no:0,name:"SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SOURCE_TYPE_ORG",localName:"ORG"},{no:2,name:"SOURCE_TYPE_FRAGMENT",localName:"FRAGMENT"}]),nf=s.makeMessageType("viam.app.v1.InvoiceSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"invoice_date",kind:"message",T:_},{no:3,name:"invoice_amount",kind:"scalar",T:1},{no:4,name:"status",kind:"scalar",T:9},{no:5,name:"due_date",kind:"message",T:_},{no:6,name:"paid_date",kind:"message",T:_},{no:7,name:"last_payment_failure_reason",kind:"scalar",T:9},{no:8,name:"last_payment_failure_at",kind:"message",T:_}]),af=s.makeMessageType("viam.app.v1.PaymentMethodCard",()=>[{no:1,name:"brand",kind:"scalar",T:9},{no:2,name:"last_four_digits",kind:"scalar",T:9}]),tf=s.makeMessageType("viam.app.v1.VerificationInfo",()=>[{no:1,name:"arrival_date",kind:"scalar",T:3},{no:2,name:"hosted_verification_page_url",kind:"scalar",T:9}]),sf=s.makeMessageType("viam.app.v1.PaymentMethodUSBankAccount",()=>[{no:1,name:"bank_name",kind:"scalar",T:9},{no:2,name:"last_four_digits_account_number",kind:"scalar",T:9},{no:3,name:"routing_number",kind:"scalar",T:9},{no:4,name:"account_type",kind:"scalar",T:9},{no:5,name:"verification_info",kind:"message",T:tf,opt:!0}]),of=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),rf=s.makeMessageType("viam.app.v1.UsageCost",()=>[{no:1,name:"resource_type",kind:"enum",T:s.getEnumType(Zh)},{no:2,name:"cost",kind:"scalar",T:1}]),mf=s.makeMessageType("viam.app.v1.ResourceUsageCostsBySource",()=>[{no:1,name:"source_type",kind:"enum",T:s.getEnumType(ef)},{no:2,name:"resource_usage_costs",kind:"message",T:cf},{no:3,name:"tier_name",kind:"scalar",T:9}]),cf=s.makeMessageType("viam.app.v1.ResourceUsageCosts",()=>[{no:1,name:"usage_costs",kind:"message",T:rf,repeated:!0},{no:2,name:"discount",kind:"scalar",T:1},{no:3,name:"total_with_discount",kind:"scalar",T:1},{no:4,name:"total_without_discount",kind:"scalar",T:1}]),lf=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageResponse",()=>[{no:1,name:"start_date",kind:"message",T:_},{no:2,name:"end_date",kind:"message",T:_},{no:14,name:"resource_usage_costs_by_source",kind:"message",T:mf,repeated:!0},{no:15,name:"subtotal",kind:"scalar",T:1},{no:3,name:"cloud_storage_usage_cost",kind:"scalar",T:1},{no:4,name:"data_upload_usage_cost",kind:"scalar",T:1},{no:5,name:"data_egres_usage_cost",kind:"scalar",T:1},{no:6,name:"remote_control_usage_cost",kind:"scalar",T:1},{no:7,name:"standard_compute_usage_cost",kind:"scalar",T:1},{no:8,name:"discount_amount",kind:"scalar",T:1},{no:9,name:"total_usage_with_discount",kind:"scalar",T:1},{no:10,name:"total_usage_without_discount",kind:"scalar",T:1},{no:11,name:"per_machine_usage_cost",kind:"scalar",T:1},{no:12,name:"binary_data_cloud_storage_usage_cost",kind:"scalar",T:1},{no:13,name:"other_cloud_storage_usage_cost",kind:"scalar",T:1}]),df=s.makeMessageType("viam.app.v1.GetOrgBillingInformationRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),pf=s.makeMessageType("viam.app.v1.GetOrgBillingInformationResponse",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Qh)},{no:2,name:"billing_email",kind:"scalar",T:9},{no:3,name:"method",kind:"message",T:af,opt:!0},{no:4,name:"billing_tier",kind:"scalar",T:9,opt:!0},{no:5,name:"method_us_bank_account",kind:"message",T:sf,opt:!0}]),uf=s.makeMessageType("viam.app.v1.GetInvoicesSummaryRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),gf=s.makeMessageType("viam.app.v1.GetInvoicesSummaryResponse",()=>[{no:1,name:"outstanding_balance",kind:"scalar",T:1},{no:2,name:"invoices",kind:"message",T:nf,repeated:!0}]),Tf=s.makeMessageType("viam.app.v1.GetInvoicePdfRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"org_id",kind:"scalar",T:9}]),kf=s.makeMessageType("viam.app.v1.GetInvoicePdfResponse",()=>[{no:1,name:"chunk",kind:"scalar",T:12}]),yf=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailRequest",()=>[{no:1,name:"customer_org_id",kind:"scalar",T:9},{no:2,name:"billing_owner_org_id",kind:"scalar",T:9}]),vf=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailResponse",[]),hf=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersRequest",[]),ff=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersResponse",()=>[{no:1,name:"tiers",kind:"scalar",T:9,repeated:!0}]),Rf=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"billing_tier",kind:"scalar",T:9}]),_f=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierResponse",[]),Sf=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),If=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationResponse",()=>[{no:1,name:"billing_organization_id",kind:"scalar",T:9}]),Ef=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"billing_organization_id",kind:"scalar",T:9}]),Of=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationResponse",[]),Mf=s.makeMessageType("viam.app.v1.ChargeOrganizationRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9,opt:!0},{no:3,name:"subtotal",kind:"scalar",T:1},{no:4,name:"tax",kind:"scalar",T:1},{no:5,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:6,name:"disable_confirmation_email",kind:"scalar",T:8}]),bf=s.makeMessageType("viam.app.v1.ChargeOrganizationResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),wf=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"amount",kind:"scalar",T:1},{no:3,name:"description",kind:"scalar",T:9,opt:!0},{no:4,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:5,name:"disable_email",kind:"scalar",T:8}]),Cf=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),qI=Object.freeze(Object.defineProperty({__proto__:null,ChargeOrganizationRequest:Mf,ChargeOrganizationResponse:bf,CreateInvoiceAndChargeImmediatelyRequest:wf,CreateInvoiceAndChargeImmediatelyResponse:Cf,GetAvailableBillingTiersRequest:hf,GetAvailableBillingTiersResponse:ff,GetCurrentMonthUsageRequest:of,GetCurrentMonthUsageResponse:lf,GetInvoicePdfRequest:Tf,GetInvoicePdfResponse:kf,GetInvoicesSummaryRequest:uf,GetInvoicesSummaryResponse:gf,GetLocationBillingOrganizationRequest:Sf,GetLocationBillingOrganizationResponse:If,GetOrgBillingInformationRequest:df,GetOrgBillingInformationResponse:pf,InvoiceSummary:nf,PaymentMethodCard:af,PaymentMethodType:Qh,PaymentMethodUSBankAccount:sf,ResourceUsageCosts:cf,ResourceUsageCostsBySource:mf,SendPaymentRequiredEmailRequest:yf,SendPaymentRequiredEmailResponse:vf,SourceType:ef,UpdateLocationBillingOrganizationRequest:Ef,UpdateLocationBillingOrganizationResponse:Of,UpdateOrganizationBillingTierRequest:Rf,UpdateOrganizationBillingTierResponse:_f,UsageCost:rf,UsageCostType:Zh,VerificationInfo:tf},Symbol.toStringTag,{value:"Module"})),UI={typeName:"viam.app.v1.BillingService",methods:{getCurrentMonthUsage:{name:"GetCurrentMonthUsage",I:of,O:lf,kind:m.Unary},getOrgBillingInformation:{name:"GetOrgBillingInformation",I:df,O:pf,kind:m.Unary},getInvoicesSummary:{name:"GetInvoicesSummary",I:uf,O:gf,kind:m.Unary},getInvoicePdf:{name:"GetInvoicePdf",I:Tf,O:kf,kind:m.ServerStreaming},sendPaymentRequiredEmail:{name:"SendPaymentRequiredEmail",I:yf,O:vf,kind:m.Unary},getAvailableBillingTiers:{name:"GetAvailableBillingTiers",I:hf,O:ff,kind:m.Unary},updateOrganizationBillingTier:{name:"UpdateOrganizationBillingTier",I:Rf,O:_f,kind:m.Unary},getLocationBillingOrganization:{name:"GetLocationBillingOrganization",I:Sf,O:If,kind:m.Unary},updateLocationBillingOrganization:{name:"UpdateLocationBillingOrganization",I:Ef,O:Of,kind:m.Unary},chargeOrganization:{name:"ChargeOrganization",I:Mf,O:bf,kind:m.Unary},createInvoiceAndChargeImmediately:{name:"CreateInvoiceAndChargeImmediately",I:wf,O:Cf,kind:m.Unary}}};class LI{client;constructor(e){this.client=X(UI,e)}async getCurrentMonthUsage(e){const n=await this.client.getCurrentMonthUsage({orgId:e});return n.start=n.startDate?.toDate(),n.end=n.endDate?.toDate(),n}async getOrgBillingInformation(e){return this.client.getOrgBillingInformation({orgId:e})}async getInvoicesSummary(e){return this.client.getInvoicesSummary({orgId:e})}async getInvoicePdf(e,n){const a=this.client.getInvoicePdf({id:e,orgId:n}),o=[];for await(const i of a)o.push(i.chunk);return GI(o)}}const GI=t=>{const e=t.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let a=0;for(const o of t)n.set(o,a),a+=o.length;return n};var Df={},Nf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){var n=function(){function y(f){this._id=new Uint8Array(f)}return y.prototype.buffer=function(){return this._id},y}();e.UUID=n;var a=function(){function y(f){this._id=new Uint8Array(f)}return y.prototype.buffer=function(){return this._id},y}();e.ObjectId=a;var o=function(){function y(f){this._time=typeof f!="string"?new Uint8Array(f||R(Date.now())):R(+new Date(f))}return y.prototype.buffer=function(){return this._time},y.prototype.fromString=function(f){this._time=R(+new Date(f))},y.prototype.toNumber=function(){return E(this._time)},y.prototype.toDate=function(){return new Date(E(this._time))},y}();e.UTC=o;function i(y){var f=5;for(var k in y)f+=r(k,y[k]);return f}function r(y,f){var k=1;if(y&&(k+=V(y)+1),f==null)return k;switch(f.constructor){case String:return k+4+V(f)+1;case Number:return Math.floor(f)===f&&f<=2147483647&&f>=-2147483647?k+4:k+8;case Boolean:return k+1;case Array:case Object:return k+i(f);case Int8Array:case Uint8Array:return k+5+f.byteLength;case Date:case o:return k+8;case n:return k+5+16;case a:return k+12;default:return 0}}function c(y){var f=new Uint8Array(i(y));return l(y,f),f}e.serialize=c;function l(y,f,k){if(k===void 0&&(k=0),k+=u(f.length,f,k),y.constructor===Array)for(var v=0,b=y.length;v<b;v++)k=h(v.toString(),y[v],f,k);else for(var M in y)k=h(M,y[M],f,k);return f[k++]=0,k}function d(y,f,k){var v=O(y),b=v.length;return f.set(v,k),f[k+b++]=0,b}function u(y,f,k){return f[k++]=y&255,f[k++]=y>>>8&255,f[k++]=y>>>16&255,f[k++]=y>>>24&255,4}function h(y,f,k,v){if(f==null)return k[v++]=10,v+=d(y,k,v),v;switch(f.constructor){case String:k[v++]=2,v+=d(y,k,v);var b=d(f,k,v+4);return v+=u(b,k,v),v+b;case Number:if(Math.floor(f)===f)f<=2147483647&&f>=-2147483647?(k[v++]=16,v+=d(y,k,v),v+=u(f,k,v)):(k[v++]=18,v+=d(y,k,v),k.set(R(f),v),v+=8);else{k[v++]=1,v+=d(y,k,v);var M=new Float64Array([f]),oe=new Uint8Array(M.buffer);k.set(oe,v),v+=8}return v;case Boolean:return k[v++]=8,v+=d(y,k,v),k[v++]=f?1:0,v;case Array:case Object:k[v++]=f.constructor===Array?4:3,v+=d(y,k,v);var B=l(f,k,v);return u(B-v,k,v),B;case Int8Array:case Uint8Array:return k[v++]=5,v+=d(y,k,v),v+=u(f.byteLength,k,v),k[v++]=0,k.set(f,v),v+=f.byteLength,v;case Date:return k[v++]=9,v+=d(y,k,v),k.set(R(f.getTime()),v),v+=8,v;case o:return k[v++]=9,v+=d(y,k,v),k.set(f.buffer(),v),v+=8,v;case n:return k[v++]=5,v+=d(y,k,v),v+=u(16,k,v),k[v++]=4,k.set(f.buffer(),v),v+=16,v;case a:return k[v++]=7,v+=d(y,k,v),k.set(f.buffer(),v),v+=12,v;case RegExp:return k[v++]=11,v+=d(y,k,v),v+=d(f.source,k,v),f.global&&(k[v++]=115),f.ignoreCase&&(k[v++]=105),f.multiline&&(k[v++]=109),k[v++]=0,v;default:return v}}function I(y,f,k,v){if(f===void 0&&(f=!1),k===void 0&&(k=0),v===void 0&&(v=!1),!(y.length<5)){var b=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;if(!(b<5||b>y.length)&&y[y.length-1]===0){for(var M=v?[]:{};;){var oe=y[k++];if(oe===0)break;for(var B=k;y[B]!==0&&B<y.length;B++);if(B>=y.length-1)return;var Y=D(y.subarray(k,B));switch(v&&(Y=parseInt(Y)),k=++B,oe){case 1:M[Y]=new Float64Array(y.slice(k,k+=8).buffer)[0];break;case 2:b=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,M[Y]=D(y.subarray(k,k+=b-1)),k++;break;case 3:b=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[Y]=I(y,f,k,!1),k+=b;break;case 4:b=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[Y]=I(y,f,k,!0),k+=b;break;case 5:if(b=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,y[k++]===4){if(b!==16)return;M[Y]=new n(y.subarray(k,k+=b))}else M[Y]=y.slice(k,k+=b);break;case 6:M[Y]=null;break;case 7:M[Y]=new a(y.subarray(k,k+=12));break;case 8:M[Y]=y[k++]===1;break;case 9:M[Y]=f?new o(y.subarray(k,k+=8)):new Date(E(y.subarray(k,k+=8)));break;case 10:M[Y]=null;break;case 11:for(B=k;B<y.length&&y[B++]!==0;);if(B>=y.length)return;var Ni=D(y.subarray(k,B));for(k=B;B<y.length&&y[B++]!==0;);if(B>=y.length)return;var Pi=D(y.subarray(k,B));k=B,M[Y]=new RegExp(Ni,Pi);break;case 16:M[Y]=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;break;case 18:M[Y]=E(y.subarray(k,k+=8));break;default:return}}return M}}}e.deserialize=I;function R(y){var f=new Uint8Array(8);if(Math.floor(y)===y){var k=4294967296,v=y%k|0,b=y/k|0;y<0&&(v=~(-y%k)|0,b=~(-y/k)|0,v=v+1&4294967295,v||b++);var M=0;f[M++]=v&255,f[M++]=v>>>8&255,f[M++]=v>>>16&255,f[M++]=v>>>24&255,f[M++]=b&255,f[M++]=b>>>8&255,f[M++]=b>>>16&255,f[M]=b>>>24&255}else{var oe=new Float64Array([y]),B=new Uint8Array(oe.buffer);f.set(B)}return f}function E(y,f){f===void 0&&(f=0);var k=4294967296,v=y[f++]|y[f++]<<8|y[f++]<<16|y[f++]<<24,b=y[f++]|y[f++]<<8|y[f++]<<16|y[f]<<24;return b*k+(v>=0?v:k+v)}function O(y){y=y.replace(/\r\n/g,`
|
|
9
|
+
`);for(var f=[],k=0,v=0,b=y.length;v<b;v++){var M=y.charCodeAt(v);M<128?f[k++]=M:M<2048?(f[k++]=M>>>6|192,f[k++]=M&63|128):(f[k++]=M>>>12|224,f[k++]=M>>>6&63|128,f[k++]=M&63|128)}return new Uint8Array(f)}function D(y){for(var f="",k=y.length,v=0,b,M,oe;v<k;)b=y[v],b<128?(f+=String.fromCharCode(b),v++):b>191&&b<224?(M=y[v+1],f+=String.fromCharCode((b&31)<<6|M&63),v+=2):(M=y[v+1],oe=y[v+2],f+=String.fromCharCode((b&15)<<12|(M&63)<<6|oe&63),v+=3);return f}function V(y){return encodeURI(y).split(/%..|./).length-1}}(t.BSON||(t.BSON={}))})(Nf),Object.defineProperty(Df,"__esModule",{value:!0});var BI=Nf,Wn=Df.BSON=BI.BSON;const FI={typeName:"viam.app.data.v1.DataService",methods:{tabularDataByFilter:{name:"TabularDataByFilter",I:Rp,O:_p,kind:m.Unary},tabularDataBySQL:{name:"TabularDataBySQL",I:Ip,O:Ep,kind:m.Unary},tabularDataByMQL:{name:"TabularDataByMQL",I:Op,O:Mp,kind:m.Unary},exportTabularData:{name:"ExportTabularData",I:bp,O:wp,kind:m.ServerStreaming},getLatestTabularData:{name:"GetLatestTabularData",I:Cp,O:Dp,kind:m.Unary},binaryDataByFilter:{name:"BinaryDataByFilter",I:Np,O:Pp,kind:m.Unary},binaryDataByIDs:{name:"BinaryDataByIDs",I:Ap,O:qp,kind:m.Unary},deleteTabularData:{name:"DeleteTabularData",I:Fp,O:xp,kind:m.Unary},deleteBinaryDataByFilter:{name:"DeleteBinaryDataByFilter",I:Jp,O:zp,kind:m.Unary},deleteBinaryDataByIDs:{name:"DeleteBinaryDataByIDs",I:Vp,O:$p,kind:m.Unary},addTagsToBinaryDataByIDs:{name:"AddTagsToBinaryDataByIDs",I:Yp,O:Wp,kind:m.Unary},addTagsToBinaryDataByFilter:{name:"AddTagsToBinaryDataByFilter",I:jp,O:Hp,kind:m.Unary},removeTagsFromBinaryDataByIDs:{name:"RemoveTagsFromBinaryDataByIDs",I:Kp,O:Xp,kind:m.Unary},removeTagsFromBinaryDataByFilter:{name:"RemoveTagsFromBinaryDataByFilter",I:Qp,O:Zp,kind:m.Unary},tagsByFilter:{name:"TagsByFilter",I:eu,O:nu,kind:m.Unary},addBoundingBoxToImageByID:{name:"AddBoundingBoxToImageByID",I:au,O:tu,kind:m.Unary},removeBoundingBoxFromImageByID:{name:"RemoveBoundingBoxFromImageByID",I:su,O:ou,kind:m.Unary},boundingBoxLabelsByFilter:{name:"BoundingBoxLabelsByFilter",I:mu,O:cu,kind:m.Unary},updateBoundingBox:{name:"UpdateBoundingBox",I:iu,O:ru,kind:m.Unary},getDatabaseConnection:{name:"GetDatabaseConnection",I:pu,O:uu,kind:m.Unary},configureDatabaseUser:{name:"ConfigureDatabaseUser",I:lu,O:du,kind:m.Unary},addBinaryDataToDatasetByIDs:{name:"AddBinaryDataToDatasetByIDs",I:gu,O:Tu,kind:m.Unary},removeBinaryDataFromDatasetByIDs:{name:"RemoveBinaryDataFromDatasetByIDs",I:ku,O:yu,kind:m.Unary},addSequencesToDataset:{name:"AddSequencesToDataset",I:vu,O:hu,kind:m.Unary},removeSequencesFromDataset:{name:"RemoveSequencesFromDataset",I:fu,O:Ru,kind:m.Unary},createIndex:{name:"CreateIndex",I:_u,O:Su,kind:m.Unary},listIndexes:{name:"ListIndexes",I:Ou,O:Mu,kind:m.Unary},deleteIndex:{name:"DeleteIndex",I:Iu,O:Eu,kind:m.Unary},createSavedQuery:{name:"CreateSavedQuery",I:wu,O:Cu,kind:m.Unary},updateSavedQuery:{name:"UpdateSavedQuery",I:qu,O:Uu,kind:m.Unary},getSavedQuery:{name:"GetSavedQuery",I:Pu,O:Au,kind:m.Unary},deleteSavedQuery:{name:"DeleteSavedQuery",I:Du,O:Nu,kind:m.Unary},listSavedQueries:{name:"ListSavedQueries",I:Lu,O:Gu,kind:m.Unary},createBinaryDataSignedURL:{name:"CreateBinaryDataSignedURL",I:Bu,O:Fu,kind:m.Unary},createSequence:{name:"CreateSequence",I:xu,O:Ju,kind:m.Unary},getSequence:{name:"GetSequence",I:zu,O:Vu,kind:m.Unary},updateSequence:{name:"UpdateSequence",I:$u,O:Yu,kind:m.Unary},deleteSequence:{name:"DeleteSequence",I:Wu,O:ju,kind:m.Unary},listSequences:{name:"ListSequences",I:Hu,O:Ku,kind:m.Unary},sequencesByDatasetID:{name:"SequencesByDatasetID",I:Xu,O:Qu,kind:m.Unary}}},xI=s.makeEnum("viam.app.datapipelines.v1.DataPipelineRunStatus",[{no:0,name:"DATA_PIPELINE_RUN_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_PIPELINE_RUN_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"DATA_PIPELINE_RUN_STATUS_STARTED",localName:"STARTED"},{no:3,name:"DATA_PIPELINE_RUN_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"DATA_PIPELINE_RUN_STATUS_FAILED",localName:"FAILED"}]),Pf=s.makeMessageType("viam.app.datapipelines.v1.DataPipeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"schedule",kind:"scalar",T:9},{no:6,name:"enabled",kind:"scalar",T:8},{no:7,name:"created_on",kind:"message",T:_},{no:8,name:"updated_at",kind:"message",T:_},{no:9,name:"data_source_type",kind:"enum",T:s.getEnumType(sn),opt:!0}]),JI=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),zI=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineResponse",()=>[{no:1,name:"data_pipeline",kind:"message",T:Pf}]),VI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),$I=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesResponse",()=>[{no:1,name:"data_pipelines",kind:"message",T:Pf,repeated:!0}]),YI=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"schedule",kind:"scalar",T:9},{no:5,name:"enable_backfill",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source_type",kind:"enum",T:s.getEnumType(sn),opt:!0}]),WI=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),jI=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),HI=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineResponse",[]),KI=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),XI=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineResponse",[]),QI=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ZI=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineResponse",[]),eE=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),nE=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineResponse",[]),aE=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_size",kind:"scalar",T:13},{no:3,name:"page_token",kind:"scalar",T:9}]),tE=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsResponse",()=>[{no:1,name:"pipeline_id",kind:"scalar",T:9},{no:2,name:"runs",kind:"message",T:sE,repeated:!0},{no:3,name:"next_page_token",kind:"scalar",T:9}]),sE=s.makeMessageType("viam.app.datapipelines.v1.DataPipelineRun",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"start_time",kind:"message",T:_},{no:3,name:"end_time",kind:"message",T:_},{no:4,name:"data_start_time",kind:"message",T:_},{no:5,name:"data_end_time",kind:"message",T:_},{no:6,name:"status",kind:"enum",T:s.getEnumType(xI)},{no:7,name:"error_message",kind:"scalar",T:9}]),oE={typeName:"viam.app.datapipelines.v1.DataPipelinesService",methods:{getDataPipeline:{name:"GetDataPipeline",I:JI,O:zI,kind:m.Unary},listDataPipelines:{name:"ListDataPipelines",I:VI,O:$I,kind:m.Unary},createDataPipeline:{name:"CreateDataPipeline",I:YI,O:WI,kind:m.Unary},renameDataPipeline:{name:"RenameDataPipeline",I:jI,O:HI,kind:m.Unary},deleteDataPipeline:{name:"DeleteDataPipeline",I:KI,O:XI,kind:m.Unary},enableDataPipeline:{name:"EnableDataPipeline",I:QI,O:ZI,kind:m.Unary},disableDataPipeline:{name:"DisableDataPipeline",I:eE,O:nE,kind:m.Unary},listDataPipelineRuns:{name:"ListDataPipelineRuns",I:aE,O:tE,kind:m.Unary}}},ot=s.makeEnum("viam.app.dataset.v1.DatasetType",[{no:0,name:"DATASET_TYPE_BINARY_DATA",localName:"BINARY_DATA"},{no:1,name:"DATASET_TYPE_SEQUENCE_DATA",localName:"SEQUENCE_DATA"}]),Af=s.makeEnum("viam.app.dataset.v1.SequenceDatasetExportStatus",[{no:0,name:"SEQUENCE_DATASET_EXPORT_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SEQUENCE_DATASET_EXPORT_STATUS_RUNNING",localName:"RUNNING"},{no:2,name:"SEQUENCE_DATASET_EXPORT_STATUS_COMPLETED",localName:"COMPLETED"},{no:3,name:"SEQUENCE_DATASET_EXPORT_STATUS_FAILED",localName:"FAILED"}]),qf=s.makeMessageType("viam.app.dataset.v1.Dataset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"time_created",kind:"message",T:_},{no:5,name:"type",kind:"enum",T:s.getEnumType(ot)}]),iE=s.makeMessageType("viam.app.dataset.v1.CreateDatasetRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:s.getEnumType(ot),opt:!0}]),rE=s.makeMessageType("viam.app.dataset.v1.CreateDatasetResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),mE=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),cE=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetResponse",[]),lE=s.makeMessageType("viam.app.dataset.v1.RenameDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),dE=s.makeMessageType("viam.app.dataset.v1.RenameDatasetResponse",[]),pE=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(ot),opt:!0}]),uE=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDResponse",()=>[{no:1,name:"datasets",kind:"message",T:qf,repeated:!0}]),gE=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsRequest",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),TE=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsResponse",()=>[{no:1,name:"datasets",kind:"message",T:qf,repeated:!0}]),kE=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsRequest",()=>[{no:1,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9}]),yE=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsResponse",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9}]),vE=s.makeMessageType("viam.app.dataset.v1.StartSequenceDatasetExportRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9}]),hE=s.makeMessageType("viam.app.dataset.v1.StartSequenceDatasetExportResponse",()=>[{no:1,name:"job_id",kind:"scalar",T:9}]),fE=s.makeMessageType("viam.app.dataset.v1.GetSequenceDatasetExportRequest",()=>[{no:1,name:"job_id",kind:"scalar",T:9}]),RE=s.makeMessageType("viam.app.dataset.v1.GetSequenceDatasetExportResponse",()=>[{no:1,name:"job_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Af)},{no:3,name:"download_url",kind:"scalar",T:9},{no:4,name:"expires_at",kind:"message",T:_},{no:5,name:"error_message",kind:"scalar",T:9},{no:6,name:"created_at",kind:"message",T:_},{no:7,name:"completed_at",kind:"message",T:_}]),_E={typeName:"viam.app.dataset.v1.DatasetService",methods:{createDataset:{name:"CreateDataset",I:iE,O:rE,kind:m.Unary},deleteDataset:{name:"DeleteDataset",I:mE,O:cE,kind:m.Unary},renameDataset:{name:"RenameDataset",I:lE,O:dE,kind:m.Unary},listDatasetsByOrganizationID:{name:"ListDatasetsByOrganizationID",I:pE,O:uE,kind:m.Unary},listDatasetsByIDs:{name:"ListDatasetsByIDs",I:gE,O:TE,kind:m.Unary},mergeDatasets:{name:"MergeDatasets",I:kE,O:yE,kind:m.Unary},startSequenceDatasetExport:{name:"StartSequenceDatasetExport",I:vE,O:hE,kind:m.Unary},getSequenceDatasetExport:{name:"GetSequenceDatasetExport",I:fE,O:RE,kind:m.Unary}}},Uf=s.makeEnum("viam.app.datasync.v1.MimeType",[{no:0,name:"MIME_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MIME_TYPE_IMAGE_JPEG",localName:"IMAGE_JPEG"},{no:2,name:"MIME_TYPE_IMAGE_PNG",localName:"IMAGE_PNG"},{no:3,name:"MIME_TYPE_APPLICATION_PCD",localName:"APPLICATION_PCD"},{no:4,name:"MIME_TYPE_VIDEO_MP4",localName:"VIDEO_MP4"}]),it=s.makeEnum("viam.app.datasync.v1.DataType",[{no:0,name:"DATA_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_TYPE_BINARY_SENSOR",localName:"BINARY_SENSOR"},{no:2,name:"DATA_TYPE_TABULAR_SENSOR",localName:"TABULAR_SENSOR"},{no:3,name:"DATA_TYPE_FILE",localName:"FILE"}]),gi=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:_n},{no:2,name:"sensor_contents",kind:"message",T:yi,repeated:!0}]),SE=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),Ti=s.makeMessageType("viam.app.datasync.v1.FileUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:_n,oneof:"upload_packet"},{no:2,name:"file_contents",kind:"message",T:Lf,oneof:"upload_packet"}]),IE=s.makeMessageType("viam.app.datasync.v1.FileUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),EE=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:ME,oneof:"upload_packet"},{no:2,name:"data",kind:"scalar",T:12,oneof:"upload_packet"}]),OE=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),ki=s.makeMessageType("viam.app.datasync.v1.SensorMetadata",()=>[{no:1,name:"time_requested",kind:"message",T:_},{no:2,name:"time_received",kind:"message",T:_},{no:3,name:"mime_type",kind:"enum",T:s.getEnumType(Uf)},{no:4,name:"annotations",kind:"message",T:Ja}]),yi=s.makeMessageType("viam.app.datasync.v1.SensorData",()=>[{no:1,name:"metadata",kind:"message",T:ki},{no:2,name:"struct",kind:"message",T:p,oneof:"data"},{no:3,name:"binary",kind:"scalar",T:12,oneof:"data"}]),Lf=s.makeMessageType("viam.app.datasync.v1.FileData",()=>[{no:1,name:"data",kind:"scalar",T:12}]),_n=s.makeMessageType("viam.app.datasync.v1.UploadMetadata",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:3,name:"component_name",kind:"scalar",T:9},{no:5,name:"method_name",kind:"scalar",T:9},{no:6,name:"type",kind:"enum",T:s.getEnumType(it)},{no:8,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:Z}},{no:7,name:"file_name",kind:"scalar",T:9},{no:9,name:"file_extension",kind:"scalar",T:9},{no:14,name:"file_create_time",kind:"message",T:_},{no:15,name:"file_modify_time",kind:"message",T:_},{no:10,name:"tags",kind:"scalar",T:9,repeated:!0},{no:12,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),ME=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadMetadata",()=>[{no:1,name:"upload_metadata",kind:"message",T:_n},{no:2,name:"sensor_metadata",kind:"message",T:ki}]),bE={typeName:"viam.app.datasync.v1.DataSyncService",methods:{dataCaptureUpload:{name:"DataCaptureUpload",I:gi,O:SE,kind:m.Unary},fileUpload:{name:"FileUpload",I:Ti,O:IE,kind:m.ClientStreaming},streamingDataCaptureUpload:{name:"StreamingDataCaptureUpload",I:EE,O:OE,kind:m.ClientStreaming}}},Je=()=>{console.warn("The BinaryID type is deprecated and will be removed in a future release. Please migrate to the BinaryDataId field instead.")};class jn{dataClient;datasetClient;dataSyncClient;dataPipelinesClient;static UPLOAD_CHUNK_SIZE=1024*64;constructor(e){this.dataClient=X(FI,e),this.datasetClient=X(_E,e),this.dataSyncClient=X(bE,e),this.dataPipelinesClient=X(oE,e)}async exportTabularData(e,n,a,o,i,r,c){const l=new zn;i&&(l.start=_.fromDate(i)),r&&(l.end=_.fromDate(r));let d;c&&(d=p.fromJson(c));const u={partId:e,resourceName:n,resourceSubtype:a,methodName:o,interval:l,additionalParameters:d},h=this.dataClient.exportTabularData(u),I=[];for await(const R of h)I.push({partId:R.partId,resourceName:R.resourceName,resourceSubtype:R.resourceSubtype,methodName:R.methodName,timeCaptured:R.timeCaptured.toDate(),organizationId:R.organizationId,locationId:R.locationId,robotName:R.robotName,robotId:R.robotId,partName:R.partName,methodParameters:R.methodParameters.toJson(),tags:R.tags,payload:R.payload.toJson()});return I}async tabularDataBySQL(e,n){return(await this.dataClient.tabularDataBySQL({organizationId:e,sqlQuery:n})).rawData.map(o=>Wn.deserialize(o))}async tabularDataByMQL(e,n,a,o,i){const r=n[0]instanceof Uint8Array?n:n.map(d=>Wn.serialize(d));let c=o;return a&&(!c||c.type===sn.UNSPECIFIED)&&(c=new Jo({type:sn.HOT_STORAGE})),(await this.dataClient.tabularDataByMQL({organizationId:e,mqlBinary:r,dataSource:c,queryPrefixName:i})).rawData.map(d=>Wn.deserialize(d))}async tabularDataByFilter(e,n,a,o="",i=!1,r=!1){const l={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:a,last:o},countOnly:i,includeInternalData:r},d=await this.dataClient.tabularDataByFilter(l),u=d.metadata.length,h=[];return h.push(...d.data.map(I=>{const R=I.metadataIndex,E=u!==0&&R>=u?new xa:d.metadata[R];return{data:I.data?.toJson(),metadata:E,timeRequested:I.timeRequested?.toDate(),timeReceived:I.timeRequested?.toDate()}})),{data:h,count:d.count,last:d.last}}async binaryDataByFilter(e,n,a,o="",i=!0,r=!1,c=!1){const d={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:a,last:o},includeBinary:i,countOnly:r,includeInternalData:c},u=await this.dataClient.binaryDataByFilter(d);return{data:u.data,count:u.count,last:u.last}}async binaryDataByIds(e,n=!0){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.binaryDataByIDs({binaryDataIds:e,includeBinary:n})).data:(Je(),(await this.dataClient.binaryDataByIDs({binaryIds:e,includeBinary:n})).data)}async createBinaryDataSignedURL(e,n){return(await this.dataClient.createBinaryDataSignedURL({binaryDataId:e,expirationMinutes:n})).signedUrl}async deleteTabularData(e,n,a){return(await this.dataClient.deleteTabularData({organizationId:e,deleteOlderThanDays:n,filter:a})).deletedCount}async deleteBinaryDataByFilter(e,n=!0){return(await this.dataClient.deleteBinaryDataByFilter({filter:e,includeInternalData:n})).deletedCount}async deleteBinaryDataByIds(e){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.deleteBinaryDataByIDs({binaryDataIds:e})).deletedCount:(Je(),(await this.dataClient.deleteBinaryDataByIDs({binaryIds:e})).deletedCount)}async addTagsToBinaryDataByIds(e,n){if(Array.isArray(n)&&typeof n[0]=="string"){await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryDataIds:n});return}Je(),await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryIds:n})}async addTagsToBinaryDataByFilter(e,n){await this.dataClient.addTagsToBinaryDataByFilter({tags:e,filter:n})}async removeTagsFromBinaryDataByIds(e,n){return Array.isArray(n)&&typeof n[0]=="string"?(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryDataIds:n})).deletedCount:(Je(),(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryIds:n})).deletedCount)}async removeTagsFromBinaryDataByFilter(e,n){return(await this.dataClient.removeTagsFromBinaryDataByFilter({tags:e,filter:n})).deletedCount}async tagsByFilter(e){return(await this.dataClient.tagsByFilter({filter:e})).tags}async addBoundingBoxToImageById(e,n,a,o,i,r,c){return typeof e=="string"?(await this.dataClient.addBoundingBoxToImageByID({binaryDataId:e,label:n,xMinNormalized:a,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId:(Je(),(await this.dataClient.addBoundingBoxToImageByID({binaryId:e,label:n,xMinNormalized:a,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId)}async removeBoundingBoxFromImageById(e,n){if(typeof e=="string"){await this.dataClient.removeBoundingBoxFromImageByID({binaryDataId:e,bboxId:n});return}Je(),await this.dataClient.removeBoundingBoxFromImageByID({binaryId:e,bboxId:n})}async updateBoundingBox(e,n,a,o,i,r,c,l){if(typeof e=="string"){await this.dataClient.updateBoundingBox({binaryDataId:e,bboxId:n,label:a,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l});return}Je(),await this.dataClient.updateBoundingBox({binaryId:e,bboxId:n,label:a,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l})}async boundingBoxLabelsByFilter(e){return(await this.dataClient.boundingBoxLabelsByFilter({filter:e})).labels}async configureDatabaseUser(e,n){await this.dataClient.configureDatabaseUser({organizationId:e,password:n})}async getDatabaseConnection(e){return(await this.dataClient.getDatabaseConnection({organizationId:e})).hostname}async addBinaryDataToDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.addBinaryDataToDatasetByIDs({binaryDataIds:e,datasetId:n});return}Je(),await this.dataClient.addBinaryDataToDatasetByIDs({binaryIds:e,datasetId:n})}async removeBinaryDataFromDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryDataIds:e,datasetId:n});return}Je(),await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryIds:e,datasetId:n})}async createDataset(e,n){return(await this.datasetClient.createDataset({name:e,organizationId:n})).id}async deleteDataset(e){await this.datasetClient.deleteDataset({id:e})}async renameDataset(e,n){await this.datasetClient.renameDataset({id:e,name:n})}async listDatasetsByOrganizationID(e,n){return(await this.datasetClient.listDatasetsByOrganizationID({organizationId:e,type:n})).datasets.map(o=>({created:o.timeCreated?.toDate(),...o}))}async listDatasetsByIds(e){return(await this.datasetClient.listDatasetsByIDs({ids:e})).datasets.map(a=>({created:a.timeCreated?.toDate(),...a}))}async tabularDataCaptureUpload(e,n,a,o,i,r,c){if(r.length!==e.length)throw new Error("dataRequestTimes and data lengths must be equal.");const l=new _n({partId:n,componentType:a,componentName:o,methodName:i,type:it.TABULAR_SENSOR,tags:c}),d=[];for(const[I,R]of e.entries()){const E=new ki,O=r[I];O&&(E.timeRequested=_.fromDate(O[0]),E.timeReceived=_.fromDate(O[1])),d.push(new yi({metadata:E,data:{case:"struct",value:p.fromJson(R)}}))}const u=new gi({metadata:l,sensorContents:d});return(await this.dataSyncClient.dataCaptureUpload(u)).fileId}async binaryDataCaptureUpload(e,n,a,o,i,r,c){const l=new _n({partId:n,componentType:a,componentName:o,methodName:i,type:it.BINARY_SENSOR,tags:c?.tags,fileExtension:c?.fileExtension??"",datasetIds:c?.datasetIds,mimeType:c?.mimeType??""}),d=new yi({metadata:{timeRequested:_.fromDate(r[0]),timeReceived:_.fromDate(r[1])},data:{case:"binary",value:e}}),u=new gi({metadata:l,sensorContents:[d]});return(await this.dataSyncClient.dataCaptureUpload(u)).binaryDataId}async fileUpload(e,n,a){const o=new _n({partId:n,type:it.FILE,...a});return(await this.dataSyncClient.fileUpload(jn.fileUploadRequests(o,e))).binaryDataId}static async*fileUploadRequests(e,n){yield new Ti({uploadPacket:{case:"metadata",value:e}});for(let a=0;a<n.length;a+=jn.UPLOAD_CHUNK_SIZE){let o=a+jn.UPLOAD_CHUNK_SIZE;o>n.length&&(o=n.length),yield new Ti({uploadPacket:{case:"fileContents",value:new Lf({data:n.slice(a,o)})}})}}static createFilter(e){const n=new Ke(e);if(e.startTime??e.endTime){const o=new zn;e.startTime&&(o.start=_.fromDate(e.startTime)),e.endTime&&(o.end=_.fromDate(e.endTime)),n.interval=o}const a=new Fa;return e.tags&&(a.tags=e.tags,n.tagsFilter=a),n}async getLatestTabularData(e,n,a,o,i){let r;i&&(r=p.fromJson(i));const c=await this.dataClient.getLatestTabularData({partId:e,resourceName:n,resourceSubtype:a,methodName:o,additionalParameters:r});return!c.payload||!c.timeCaptured||!c.timeSynced?null:[c.timeCaptured.toDate(),c.timeSynced.toDate(),c.payload.toJson()]}async listDataPipelines(e){return(await this.dataPipelinesClient.listDataPipelines({organizationId:e})).dataPipelines}async getDataPipeline(e){return(await this.dataPipelinesClient.getDataPipeline({id:e})).dataPipeline??null}async createDataPipeline(e,n,a,o,i,r){const c=a[0]instanceof Uint8Array?a:a.map(u=>Wn.serialize(u)),l=r??sn.STANDARD;return(await this.dataPipelinesClient.createDataPipeline({organizationId:e,name:n,mqlBinary:c,schedule:o,enableBackfill:i,dataSourceType:l})).id}async deleteDataPipeline(e){await this.dataPipelinesClient.deleteDataPipeline({id:e})}async listDataPipelineRuns(e,n){const a=await this.dataPipelinesClient.listDataPipelineRuns({id:e,pageSize:n});return new rt(this.dataPipelinesClient,e,a.runs,n,a.nextPageToken)}async createIndex(e,n,a,o){await this.dataClient.createIndex({organizationId:e,collectionType:n,indexSpec:[Wn.serialize(a)],pipelineName:o})}async listIndexes(e,n,a){return(await this.dataClient.listIndexes({organizationId:e,collectionType:n,pipelineName:a})).indexes}async deleteIndex(e,n,a,o){await this.dataClient.deleteIndex({organizationId:e,collectionType:n,indexName:a,pipelineName:o})}async createSequence(e,n,a,o,i){return(await this.dataClient.createSequence({partId:e,resources:n,sequenceTags:a,startTime:o?_.fromDate(o):void 0,endTime:i?_.fromDate(i):void 0})).id}async getSequence(e){const n=await this.dataClient.getSequence({id:e});if(!n.sequence)throw new Error("no sequence returned");return n.sequence}async updateSequence(e,n,a,o,i,r){await this.dataClient.updateSequence({id:e,resources:n,sequenceTags:a,startTime:o?_.fromDate(o):void 0,endTime:i?_.fromDate(i):void 0,fieldMask:r})}async deleteSequence(e){await this.dataClient.deleteSequence({id:e})}async listSequences(e,n,a){const o=await this.dataClient.listSequences({organizationId:e,pageToken:n,pageSize:a});return{sequences:o.sequences,nextPageToken:o.nextPageToken}}async addSequencesToDataset(e,n){await this.dataClient.addSequencesToDataset({sequenceIds:e,datasetId:n})}async removeSequencesFromDataset(e,n){await this.dataClient.removeSequencesFromDataset({sequenceIds:e,datasetId:n})}async sequencesByDatasetID(e,n,a){const o=await this.dataClient.sequencesByDatasetID({datasetId:e,pageToken:n,pageSize:a});return{sequences:o.sequences,nextPageToken:o.nextPageToken}}async startSequenceDatasetExport(e){return(await this.datasetClient.startSequenceDatasetExport({datasetId:e})).jobId}async getSequenceDatasetExport(e){return this.datasetClient.getSequenceDatasetExport({jobId:e})}}class rt{constructor(e,n,a=[],o,i){this.dataPipelinesClient=e,this.pipelineId=n,this.runs=a,this.pageSize=o,this.nextPageToken=i}async nextPage(){if(this.nextPageToken===void 0||this.nextPageToken==="")return new rt(this.dataPipelinesClient,this.pipelineId,[],this.pageSize,"");const e=await this.dataPipelinesClient.listDataPipelineRuns({id:this.pipelineId,pageSize:this.pageSize,pageToken:this.nextPageToken});return new rt(this.dataPipelinesClient,this.pipelineId,e.runs,this.pageSize,e.nextPageToken)}}const wE={typeName:"viam.app.mltraining.v1.MLTrainingService",methods:{submitTrainingJob:{name:"SubmitTrainingJob",I:Dg,O:Ng,kind:m.Unary},submitCustomTrainingJob:{name:"SubmitCustomTrainingJob",I:Pg,O:Ag,kind:m.Unary},getTrainingJob:{name:"GetTrainingJob",I:qg,O:Ug,kind:m.Unary},listTrainingJobs:{name:"ListTrainingJobs",I:Lg,O:Gg,kind:m.Unary},cancelTrainingJob:{name:"CancelTrainingJob",I:Bg,O:Fg,kind:m.Unary},deleteCompletedTrainingJob:{name:"DeleteCompletedTrainingJob",I:xg,O:Jg,kind:m.Unary},getTrainingJobLogs:{name:"GetTrainingJobLogs",I:Vg,O:$g,kind:m.Unary},listSupportedContainers:{name:"ListSupportedContainers",I:Yg,O:Wg,kind:m.Unary}}};class CE{client;constructor(e){this.client=X(wE,e)}async submitTrainingJob(e,n,a,o,i,r){return(await this.client.submitTrainingJob({organizationId:e,datasetId:n,modelName:a,modelVersion:o,modelType:i,tags:r})).id}async submitCustomTrainingJob(e,n,a,o,i,r){return(await this.client.submitCustomTrainingJob({organizationId:e,datasetId:n,registryItemId:a,registryItemVersion:o,modelName:i,modelVersion:r})).id}async getTrainingJob(e){return(await this.client.getTrainingJob({id:e})).metadata}async listTrainingJobs(e,n){return(await this.client.listTrainingJobs({organizationId:e,status:n})).jobs}async cancelTrainingJob(e){return await this.client.cancelTrainingJob({id:e}),null}async deleteCompletedTrainingJob(e){return await this.client.deleteCompletedTrainingJob({id:e}),null}}const Gf=s.makeMessageType("viam.provisioning.v1.ExitProvisioningRequest",[]),Bf=s.makeMessageType("viam.provisioning.v1.ExitProvisioningResponse",[]),Ff=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusRequest",[]),xf=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusResponse",()=>[{no:1,name:"provisioning_info",kind:"message",T:jf},{no:2,name:"has_smart_machine_credentials",kind:"scalar",T:8},{no:3,name:"is_online",kind:"scalar",T:8},{no:4,name:"latest_connection_attempt",kind:"message",T:vi},{no:5,name:"errors",kind:"scalar",T:9,repeated:!0},{no:6,name:"agent_version",kind:"scalar",T:9}]),Jf=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsRequest",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"psk",kind:"scalar",T:9}]),zf=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsResponse",[]),Vf=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsRequest",()=>[{no:1,name:"cloud",kind:"message",T:hi}]),$f=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsResponse",[]),Yf=s.makeMessageType("viam.provisioning.v1.GetNetworkListRequest",[]),Wf=s.makeMessageType("viam.provisioning.v1.GetNetworkListResponse",()=>[{no:1,name:"networks",kind:"message",T:vi,repeated:!0}]),jf=s.makeMessageType("viam.provisioning.v1.ProvisioningInfo",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"manufacturer",kind:"scalar",T:9}]),vi=s.makeMessageType("viam.provisioning.v1.NetworkInfo",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"security",kind:"scalar",T:9},{no:4,name:"signal",kind:"scalar",T:5},{no:5,name:"connected",kind:"scalar",T:8},{no:6,name:"last_error",kind:"scalar",T:9}]),hi=s.makeMessageType("viam.provisioning.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"app_address",kind:"scalar",T:9},{no:4,name:"api_key",kind:"message",T:Hf}]),Hf=s.makeMessageType("viam.provisioning.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),DE=Object.freeze(Object.defineProperty({__proto__:null,APIKey:Hf,CloudConfig:hi,ExitProvisioningRequest:Gf,ExitProvisioningResponse:Bf,GetNetworkListRequest:Yf,GetNetworkListResponse:Wf,GetSmartMachineStatusRequest:Ff,GetSmartMachineStatusResponse:xf,NetworkInfo:vi,ProvisioningInfo:jf,SetNetworkCredentialsRequest:Jf,SetNetworkCredentialsResponse:zf,SetSmartMachineCredentialsRequest:Vf,SetSmartMachineCredentialsResponse:$f},Symbol.toStringTag,{value:"Module"})),NE={typeName:"viam.provisioning.v1.ProvisioningService",methods:{getSmartMachineStatus:{name:"GetSmartMachineStatus",I:Ff,O:xf,kind:m.Unary},setNetworkCredentials:{name:"SetNetworkCredentials",I:Jf,O:zf,kind:m.Unary},setSmartMachineCredentials:{name:"SetSmartMachineCredentials",I:Vf,O:$f,kind:m.Unary},getNetworkList:{name:"GetNetworkList",I:Yf,O:Wf,kind:m.Unary},exitProvisioning:{name:"ExitProvisioning",I:Gf,O:Bf,kind:m.Unary}}};class PE{client;constructor(e){this.client=X(NE,e)}async getSmartMachineStatus(){return this.client.getSmartMachineStatus({})}async setNetworkCredentials(e,n,a){await this.client.setNetworkCredentials({type:e,ssid:n,psk:a})}async setSmartMachineCredentials(e){await this.client.setSmartMachineCredentials({cloud:e})}async getNetworkList(){return(await this.client.getNetworkList({})).networks}}const AE=async({serviceHost:t="https://app.viam.com",credentials:e})=>{const n=await pS(t,e);return new qE(n,e)};class qE{transport;credentials;dataClient;appClient;mlTrainingClient;provisioningClient;billingClient;constructor(e,n){this.transport=e,this.credentials=n,this.dataClient=new jn(this.transport),this.appClient=new AI(this.transport),this.mlTrainingClient=new CE(this.transport),this.provisioningClient=new PE(this.transport),this.billingClient=new LI(this.transport)}async getRobotSecretFromHost(e){const a=e.split(".viam.")[0]?.split(".");if(a!==void 0){const o=a.at(-1);if(o===void 0)return;const i=e.split(".").at(0);if(i!==void 0)return(await this.appClient.getRobotPartByNameAndLocation(i,o)).part?.secret}}async connectToMachine({host:e=void 0,id:n=void 0}){if(e===void 0&&n===void 0)throw new Error("Either a machine address or ID must be provided");let a=e,o;if(n!==void 0&&e===void 0){const c=(await this.appClient.getRobotParts(n)).find(l=>l.mainPart);if(!c)throw new Error(`Could not find a main part for the machine with UUID: ${n}`);a=c.fqdn,o=c.secret}if(a===void 0||a==="")throw new Error("Host was not provided and could not be obtained from the machine ID");let i=this.credentials;return Fn(i)||(o===void 0&&(o=await this.getRobotSecretFromHost(a)),i=o===void 0?i:{type:"robot-secret",payload:o,authEntity:a}),Cg({host:a,credentials:i,signalingAddress:"https://app.viam.com:443",reconnectMaxAttempts:1})}}const{JointPositions:UE}=ym;class LE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(vm),this.name=n,this.options=a}async getEndPosition(e={},n=this.callOptions){const a=new zt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getEndPosition(a,n)).pose;if(!i)throw new Error("no pose");return i}async getGeometries(e={},n=this.callOptions){return im(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return om(this.client.getKinematics,this.name,p.fromJson(e),n)}async get3DModels(e={},n=this.callOptions){const a=new Bt({name:this.name,extra:p.fromJson(e)});return(await this.client.get3DModels(a,n)).models}async moveToPosition(e,n={},a=this.callOptions){const o=new $t({name:this.name,to:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.moveToPosition(o,a)}async moveToJointPositions(e,n={},a=this.callOptions){const o=new kn({values:e}),i=new Yt({name:this.name,positions:o,extra:p.fromJson(n)});this.options.requestLogger?.(i),await this.client.moveToJointPositions(i,a)}async getJointPositions(e={},n=this.callOptions){const a=new Vt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getJointPositions(a,n)).positions;if(!i)throw new Error("no pose");return i}async stop(e={},n=this.callOptions){const a=new Wt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new jt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const Kf=s.makeMessageType("viam.component.audioin.v1.GetAudioRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"duration_seconds",kind:"scalar",T:2},{no:3,name:"codec",kind:"scalar",T:9},{no:4,name:"request_id",kind:"scalar",T:9},{no:5,name:"previous_timestamp_nanoseconds",kind:"scalar",T:3},{no:99,name:"extra",kind:"message",T:p}]),GE=s.makeMessageType("viam.component.audioin.v1.GetAudioResponse",()=>[{no:1,name:"audio",kind:"message",T:BE},{no:2,name:"request_id",kind:"scalar",T:9}]),BE=s.makeMessageType("viam.component.audioin.v1.AudioChunk",()=>[{no:1,name:"audio_data",kind:"scalar",T:12},{no:2,name:"audio_info",kind:"message",T:Aa},{no:3,name:"start_timestamp_nanoseconds",kind:"scalar",T:3},{no:4,name:"end_timestamp_nanoseconds",kind:"scalar",T:3},{no:5,name:"sequence",kind:"scalar",T:5}]),FE={typeName:"viam.component.audioin.v1.AudioInService",methods:{getAudio:{name:"GetAudio",I:Kf,O:GE,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Gn,O:Ft,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}};class xE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(FE),this.name=n,this.options=a}async*getAudio(e,n,a=0n,o={},i=this.callOptions){const r=new Kf({name:this.name,codec:e,durationSeconds:n,previousTimestampNanoseconds:a,extra:p.fromJson(o)});this.options.requestLogger?.(r);const c=this.client.getAudio(r,i);for await(const l of c)l.audio&&(yield{audioData:l.audio.audioData,audioInfo:l.audio.audioInfo,startTimeNs:l.audio.startTimestampNanoseconds,endTimeNs:l.audio.endTimestampNanoseconds,sequence:l.audio.sequence,requestID:l.requestId})}async getProperties(e={},n=this.callOptions){const a=new Gn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getProperties(a,n);return{supportedCodecs:o.supportedCodecs,sampleRateHz:o.sampleRateHz,numChannels:o.numChannels}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const JE={MP3:"mp3",PCM16:"pcm16",PCM32:"pcm32",PCM32_FLOAT:"pcm32_float",AAC:"aac",OPUS:"opus",FLAC:"flac",WAV:"wav"},Xf=s.makeMessageType("viam.component.audioout.v1.PlayRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"audio_data",kind:"scalar",T:12},{no:3,name:"audio_info",kind:"message",T:Aa},{no:99,name:"extra",kind:"message",T:p}]),fi=s.makeMessageType("viam.component.audioout.v1.PlayStreamRequest",()=>[{no:1,name:"init",kind:"message",T:Zf,oneof:"payload"},{no:2,name:"audio_chunk",kind:"message",T:Qf,oneof:"payload"}]),Qf=s.makeMessageType("viam.component.audioout.v1.PlayStreamChunk",()=>[{no:1,name:"audio_data",kind:"scalar",T:12}]),Zf=s.makeMessageType("viam.component.audioout.v1.PlayStreamInit",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"audio_info",kind:"message",T:Aa},{no:99,name:"extra",kind:"message",T:p}]),zE=s.makeMessageType("viam.component.audioout.v1.PlayResponse",[]),VE=s.makeMessageType("viam.component.audioout.v1.PlayStreamResponse",[]),$E={typeName:"viam.component.audioout.v1.AudioOutService",methods:{play:{name:"Play",I:Xf,O:zE,kind:m.Unary},playStream:{name:"PlayStream",I:fi,O:VE,kind:m.ClientStreaming},getProperties:{name:"GetProperties",I:Gn,O:Ft,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}};class YE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient($E),this.name=n,this.options=a}async play(e,n,a={},o=this.callOptions){const i=new Xf({name:this.name,audioData:e,audioInfo:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.play(i,o)}async playStream(e,n,a={},o=this.callOptions){const{name:i}=this,r=p.fromJson(a),c=async function*(){yield new fi({payload:{case:"init",value:new Zf({name:i,audioInfo:e,extra:r})}});for await(const d of n)yield new fi({payload:{case:"audioChunk",value:new Qf({audioData:d})}})};await this.client.playStream(c(),o)}async getProperties(e={},n=this.callOptions){const a=new Gn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getProperties(a,n);return{supportedCodecs:o.supportedCodecs,sampleRateHz:o.sampleRateHz,numChannels:o.numChannels}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:WE}=Om;class jE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Mm),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async moveStraight(e,n,a={},o=this.callOptions){const i=new Ht({name:this.name,mmPerSec:n,distanceMm:e?BigInt(e):void 0,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.moveStraight(i,o)}async spin(e,n,a={},o=this.callOptions){const i=new Kt({name:this.name,angleDeg:e,degsPerSec:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.spin(i,o)}async setPower(e,n,a={},o=this.callOptions){const i=new Qt({name:this.name,linear:e,angular:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPower(i,o)}async setVelocity(e,n,a={},o=this.callOptions){const i=new Zt({name:this.name,linear:e,angular:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setVelocity(i,o)}async stop(e={},n=this.callOptions){const a=new Xt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new es({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}async getProperties(e={},n=this.callOptions){const a=new qa({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getProperties(a,n)}}const{ReadAnalogReaderResponse:HE,PowerMode:KE}=Fm;class XE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(xm),this.name=n,this.options=a}async setGPIO(e,n,a={},o=this.callOptions){const i=new ns({name:this.name,pin:e,high:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setGPIO(i,o)}async getGPIO(e,n={},a=this.callOptions){const o=new as({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getGPIO(o,a)).high}async getPWM(e,n={},a=this.callOptions){const o=new ts({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.pWM(o,a)).dutyCyclePct}async setPWM(e,n,a={},o=this.callOptions){const i=new ss({name:this.name,pin:e,dutyCyclePct:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPWM(i,o)}async getPWMFrequency(e,n={},a=this.callOptions){const o=new os({name:this.name,pin:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.pWMFrequency(o,a);return Number(i.frequencyHz)}async setPWMFrequency(e,n,a={},o=this.callOptions){const i=new is({name:this.name,pin:e,frequencyHz:n?BigInt(n):void 0,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPWMFrequency(i,o)}async readAnalogReader(e,n={},a=this.callOptions){const o=new rs({boardName:this.name,analogReaderName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.readAnalogReader(o,a)}async writeAnalog(e,n,a={},o=this.callOptions){const i=new ms({name:this.name,pin:e,value:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.writeAnalog(i,o)}async getDigitalInterruptValue(e,n={},a=this.callOptions){const o=new cs({boardName:this.name,digitalInterruptName:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getDigitalInterruptValue(o,a);return Number(i.value)}async streamTicks(e,n,a={},o=this.callOptions){const i=new ls({name:this.name,pinNames:e,extra:p.fromJson(a)});this.options.requestLogger?.(i);const r=this.client.streamTicks(i,o);for await(const c of r)n.push({pinName:c.pinName,high:c.high,time:c.time?Number(c.time):0})}async setPowerMode(e,n,a={},o=this.callOptions){const i=new ds({name:this.name,powerMode:e,duration:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPowerMode(i,o)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const Ri=s.makeMessageType("viam.component.button.v1.PushRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),eR=s.makeMessageType("viam.component.button.v1.PushResponse",[]),QE=Object.freeze(Object.defineProperty({__proto__:null,PushRequest:Ri,PushResponse:eR},Symbol.toStringTag,{value:"Module"})),ZE={typeName:"viam.component.button.v1.ButtonService",methods:{push:{name:"Push",I:Ri,O:eR,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}};class eO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ZE),this.name=n,this.options=a}async push(e={},n=this.callOptions){const a=new Ri({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.push(a,n)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const nO={typeName:"viam.component.camera.v1.CameraService",methods:{getImages:{name:"GetImages",I:$o,O:Zu,kind:m.Unary},getPointCloud:{name:"GetPointCloud",I:Wo,O:eg,kind:m.Unary},getProperties:{name:"GetProperties",I:ng,O:ag,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}},aO="pointcloud/pcd";class tO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(nO),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async getImages(e=[],n={},a=this.callOptions){const o=new $o({name:this.name,filterSourceNames:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getImages(o,a),r=i.images.map(l=>({sourceName:l.sourceName,image:l.image,mimeType:l.mimeType})),c={capturedAt:i.responseMetadata?.capturedAt??new _};return{images:r,metadata:c}}async getPointCloud(e={},n=this.callOptions){const a=new Wo({name:this.name,mimeType:aO,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPointCloud(a,n)).pointCloud}async getProperties(e=this.callOptions){const n=new qa({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}class sO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Md),this.name=n,this.options=a}async discoverResources(e={},n=this.callOptions){const a=new yo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.discoverResources(a,n)).discoveries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:oO,PositionType:nR}=$m;class iO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Ym),this.name=n,this.options=a}async resetPosition(e={},n=this.callOptions){const a=new gs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.resetPosition(a,n)}async getProperties(e={},n=this.callOptions){const a=new Ts({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getProperties(a,n)}async getPosition(e=nR.UNSPECIFIED,n={},a=this.callOptions){const o=new us({name:this.name,positionType:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getPosition(o,a);return[i.value,i.positionType]}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}class rO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Zm),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){return im(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return om(this.client.getKinematics,this.name,p.fromJson(e),n)}async getPosition(e={},n=this.callOptions){const a=new ks({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).positionsMm}async moveToPosition(e,n,a={},o=this.callOptions){const i=new ys({name:this.name,positionsMm:e,speedsMmPerSec:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.moveToPosition(i,o)}async home(e={},n=this.callOptions){const a=new vs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.home(a,n)).homed}async getLengths(e={},n=this.callOptions){const a=new hs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getLengths(a,n)).lengthsMm}async stop(e={},n=this.callOptions){const a=new fs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new Rs({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const{Capsule:mO,GeoGeometry:cO,GeoPoint:lO,GeometriesInFrame:dO,Geometry:pO,Orientation:uO,PointCloud:gO,Pose:TO,PoseInFrame:kO,RectangularPrism:yO,ResourceName:vO,Sphere:hO,Transform:fO,Vector3:RO,WorldState:_O}=xt,aR=t=>{const{latitude:e,longitude:n}=t;return!(typeof e!="number"||typeof n!="number"||Number.isNaN(e)||Number.isNaN(n))};class SO{client;options;name;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Rg),this.name=n,this.options=a}async metadata(e={},n=this.callOptions){const a=new vg({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.metadata(a,n)}async infer(e,n={},a=this.callOptions){const o=new yg({name:this.name,inputTensors:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.infer(o,a)}}class IO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Mc),this.name=n,this.options=a}async setPower(e,n={},a=this.callOptions){const o=new Ns({name:this.name,powerPct:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPower(o,a)}async goFor(e,n,a={},o=this.callOptions){const i=new Ps({name:this.name,rpm:e,revolutions:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.goFor(i,o)}async goTo(e,n,a={},o=this.callOptions){const i=new As({name:this.name,rpm:e,positionRevolutions:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.goTo(i,o)}async setRPM(e,n={},a=this.callOptions){const o=new qs({name:this.name,rpm:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setRPM(o,a)}async resetZeroPosition(e,n={},a=this.callOptions){const o=new Us({name:this.name,offset:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.resetZeroPosition(o,a)}async stop(e={},n=this.callOptions){const a=new Gs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async getProperties(e={},n=this.callOptions){const a=new Fs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),{positionReporting:(await this.client.getProperties(a,n)).positionReporting}}async getPosition(e={},n=this.callOptions){const a=new Ls({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).position}async isPowered(e={},n=this.callOptions){const a=new Bs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.isPowered(a,n);return[o.isOn,o.powerPct]}async isMoving(e=this.callOptions){const n=new xs({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}class EO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Lc),this.name=n,this.options=a}async getLinearVelocity(e={},n=this.callOptions){const a=new Js({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getLinearVelocity(a,n)).linearVelocity;if(!i)throw new Error("no linear velocity");return i}async getAngularVelocity(e={},n=this.callOptions){const a=new zs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getAngularVelocity(a,n)).angularVelocity;if(!i)throw new Error("no angular velocity");return i}async getCompassHeading(e={},n=this.callOptions){const a=new Vs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getCompassHeading(a,n)).value}async getOrientation(e={},n=this.callOptions){const a=new $s({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getOrientation(a,n)).orientation;if(!i)throw new Error("no orientation");return i}async getPosition(e={},n=this.callOptions){const a=new Ys({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getPosition(a,n)}async getProperties(e={},n=this.callOptions){const a=new Ws({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getProperties(a,n)}async getAccuracy(e={},n=this.callOptions){const a=new js({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getAccuracy(a,n)}async getLinearAcceleration(e={},n=this.callOptions){const a=new Hs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getLinearAcceleration(a,n)).linearAcceleration;if(!i)throw new Error("no linear acceleration");return i}async getReadings(e={},n=this.callOptions){const a=new tn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getReadings(a,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const{GetAccuracyResponse:OO,GetPositionResponse:MO,GetPropertiesResponse:bO}=Uc;class wO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(xc),this.name=n,this.options=a}async getVoltage(e={},n=this.callOptions){const a=new Ks({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getVoltage(a,n);return[o.volts,o.isAc]}async getCurrent(e={},n=this.callOptions){const a=new Xs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getCurrent(a,n);return[o.amperes,o.isAc]}async getPower(e={},n=this.callOptions){const a=new Qs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPower(a,n)).watts}async getReadings(e={},n=this.callOptions){const a=new tn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getReadings(a,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const tR={typeName:"viam.component.sensor.v1.SensorService",methods:{getReadings:{name:"GetReadings",I:tn,O:Pa,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}},CO=Object.freeze(Object.defineProperty({__proto__:null,SensorService:tR},Symbol.toStringTag,{value:"Module"}));class DO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(tR),this.name=n,this.options=a}async getReadings(e={},n=this.callOptions){const a=new tn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getReadings(a,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const sR=s.makeMessageType("proto.stream.v1.ListStreamsRequest",[]),oR=s.makeMessageType("proto.stream.v1.ListStreamsResponse",()=>[{no:1,name:"names",kind:"scalar",T:9,repeated:!0}]),_i=s.makeMessageType("proto.stream.v1.AddStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),iR=s.makeMessageType("proto.stream.v1.AddStreamResponse",[]),Si=s.makeMessageType("proto.stream.v1.RemoveStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),rR=s.makeMessageType("proto.stream.v1.RemoveStreamResponse",[]),Ii=s.makeMessageType("proto.stream.v1.Resolution",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5}]),Ei=s.makeMessageType("proto.stream.v1.GetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),mR=s.makeMessageType("proto.stream.v1.GetStreamOptionsResponse",()=>[{no:1,name:"resolutions",kind:"message",T:Ii,repeated:!0}]),mt=s.makeMessageType("proto.stream.v1.SetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"resolution",kind:"message",T:Ii}]),cR=s.makeMessageType("proto.stream.v1.SetStreamOptionsResponse",[]),NO=Object.freeze(Object.defineProperty({__proto__:null,AddStreamRequest:_i,AddStreamResponse:iR,GetStreamOptionsRequest:Ei,GetStreamOptionsResponse:mR,ListStreamsRequest:sR,ListStreamsResponse:oR,RemoveStreamRequest:Si,RemoveStreamResponse:rR,Resolution:Ii,SetStreamOptionsRequest:mt,SetStreamOptionsResponse:cR},Symbol.toStringTag,{value:"Module"})),PO={typeName:"proto.stream.v1.StreamService",methods:{listStreams:{name:"ListStreams",I:sR,O:oR,kind:m.Unary},addStream:{name:"AddStream",I:_i,O:iR,kind:m.Unary},getStreamOptions:{name:"GetStreamOptions",I:Ei,O:mR,kind:m.Unary},setStreamOptions:{name:"SetStreamOptions",I:mt,O:cR,kind:m.Unary},removeStream:{name:"RemoveStream",I:Si,O:rR,kind:m.Unary}}},Hn=t=>t.replaceAll(":","+");class AO extends rm{client;options;streams;constructor(e,n={}){super(),this.client=e.createServiceClient(PO),this.options=n,this.streams=new Set,e.on("track",a=>{this.emit("track",a)}),e.on(K.CONNECTED,()=>{for(const a of this.streams.values())this.add(a)})}async add(e){const n=new _i({name:Hn(e)});this.options.requestLogger?.(n);try{await this.client.addStream(n),this.streams.add(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.addStream(n),this.streams.add(e)}}async remove(e){const n=new Si({name:Hn(e)});this.options.requestLogger?.(n);try{await this.client.removeStream(n),this.streams.delete(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.removeStream(n),this.streams.delete(e)}}async getOptions(e){const n=async i=>{const r=new Ei({name:i});this.options.requestLogger?.(r);try{return(await this.client.getStreamOptions(r)).resolutions}catch{return[]}},a=Hn(e);let o=await n(a);return o.length>0||(o=await n(e)),o}async setOptions(e,n,a){const o=new mt({name:Hn(e),resolution:{width:n,height:a}});this.options.requestLogger?.(o);try{await this.client.setStreamOptions(o)}catch{o.name=e,this.options.requestLogger?.(o),await this.client.setStreamOptions(o)}}async resetOptions(e){const n=new mt({name:Hn(e)});this.options.requestLogger?.(n);try{await this.client.setStreamOptions(n)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.setStreamOptions(n)}}STREAM_TIMEOUT=5e3;getStream=async e=>{const n=new Promise((a,o)=>{const i=r=>{const[c]=r.streams;c?c.id===e&&(this.off("track",i),a(c)):(this.off("track",i),o(new Error("Received track event with no streams")))};this.on("track",i),setTimeout(()=>{this.off("track",i),o(new Error(`Did not receive a stream after ${this.STREAM_TIMEOUT} ms`))},this.STREAM_TIMEOUT)});return await this.add(e),n}}const Oi=s.makeMessageType("viam.component.switch.v1.SetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),lR=s.makeMessageType("viam.component.switch.v1.SetPositionResponse",[]),Mi=s.makeMessageType("viam.component.switch.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),dR=s.makeMessageType("viam.component.switch.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:13}]),bi=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),pR=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsResponse",()=>[{no:1,name:"number_of_positions",kind:"scalar",T:13},{no:2,name:"labels",kind:"scalar",T:9,repeated:!0}]),qO=Object.freeze(Object.defineProperty({__proto__:null,GetNumberOfPositionsRequest:bi,GetNumberOfPositionsResponse:pR,GetPositionRequest:Mi,GetPositionResponse:dR,SetPositionRequest:Oi,SetPositionResponse:lR},Symbol.toStringTag,{value:"Module"})),UO={typeName:"viam.component.switch.v1.SwitchService",methods:{setPosition:{name:"SetPosition",I:Oi,O:lR,kind:m.Unary},getPosition:{name:"GetPosition",I:Mi,O:dR,kind:m.Unary},getNumberOfPositions:{name:"GetNumberOfPositions",I:bi,O:pR,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}};class LO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(UO),this.name=n,this.options=a}async setPosition(e,n={},a=this.callOptions){const o=new Oi({name:this.name,position:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPosition(o,a)}async getPosition(e={},n=this.callOptions){const a=new Mi({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).position}async getNumberOfPositions(e={},n=this.callOptions){const a=new bi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getNumberOfPositions(a,n);if(o.labels.length>0&&o.labels.length!==o.numberOfPositions)throw new Error("the number of labels does not match the number of positions");return[o.numberOfPositions,o.labels]}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}let GO=class{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(_s),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}};const BO={typeName:"viam.component.posetracker.v1.PoseTrackerService",methods:{getPoses:{name:"GetPoses",I:s.makeMessageType("viam.component.posetracker.v1.GetPosesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"body_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),O:s.makeMessageType("viam.component.posetracker.v1.GetPosesResponse",()=>[{no:1,name:"body_poses",kind:"map",K:9,V:{kind:"message",T:je}}]),kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:H,kind:m.Unary}}};class FO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(BO),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}class xO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(rc),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async open(e={},n=this.callOptions){const a=new Ss({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.open(a,n)}async grab(e={},n=this.callOptions){const a=new Is({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.grab(a,n)}async stop(e={},n=this.callOptions){const a=new Es({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new Os({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async isHoldingSomething(e={},n=this.callOptions){const a=new Ms({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.isHoldingSomething(a,n)).isHoldingSomething}async getCurrentInputs(e={},n=this.callOptions){const a=new bs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getCurrentInputs(a,n)).values}async goToInputs(e,n={},a=this.callOptions){const o=new ws({name:this.name,values:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.goToInputs(o,a)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}class JO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(kc),this.name=n,this.options=a}async getEvents(e={},n=this.callOptions){const a=new Cs({controller:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getEvents(a,n)).events}async triggerEvent(e,n={},a=this.callOptions){const o=new Ds({controller:this.name,event:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.triggerEvent(o,a)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const{Event:zO}=Tc,{CollisionSpecification:VO,Constraints:$O,LinearConstraint:YO,ListPlanStatusesResponse:WO,MotionConfiguration:jO,ObstacleDetector:HO,OrientationConstraint:KO}=Wd;class XO{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(jd),this.name=n,this.options=a}async move(e,n,a,o,i={},r=this.callOptions){const c=new vo({name:this.name,destination:e,componentName:n,worldState:a,constraints:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.move(c,r)).success}async moveOnMap(e,n,a,o,i,r={},c=this.callOptions){const l=new ho({name:this.name,destination:e,componentName:n,slamServiceName:a,motionConfiguration:o,obstacles:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.moveOnMap(l,c)).executionId}async moveOnGlobe(e,n,a,o,i,r,c,l={},d=this.callOptions){const u=new Ro({name:this.name,destination:e,componentName:n,movementSensorName:a,heading:o,obstacles:i,boundingRegions:c,motionConfiguration:r,extra:p.fromJson(l)});return this.options.requestLogger?.(u),(await this.client.moveOnGlobe(u,d)).executionId}async stopPlan(e,n={},a=this.callOptions){const o=new So({name:this.name,componentName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),await this.client.stopPlan(o,a),null}async getPlan(e,n,a,o={},i=this.callOptions){const r=new Eo({name:this.name,componentName:e,lastPlanOnly:n,executionId:a,extra:p.fromJson(o)});return this.options.requestLogger?.(r),this.client.getPlan(r,i)}async listPlanStatuses(e,n={},a=this.callOptions){const o=new Io({name:this.name,onlyActivePlans:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.listPlanStatuses(o,a)}async getPose(e,n,a,o={},i=this.callOptions){const r=new _o({name:this.name,componentName:e,destinationFrame:n,supplementalTransforms:a,extra:p.fromJson(o)});this.options.requestLogger?.(r);const l=(await this.client.getPose(r,i)).pose;if(!l)throw new Error("no pose");return l}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const wi=s.makeMessageType("viam.service.datamanager.v1.SyncRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),uR=s.makeMessageType("viam.service.datamanager.v1.SyncResponse",[]),Ci=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"binary_data",kind:"scalar",T:12},{no:3,name:"tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"mime_type",kind:"enum",T:s.getEnumType(Uf)},{no:99,name:"extra",kind:"message",T:p}]),gR=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsResponse",[]),QO=Object.freeze(Object.defineProperty({__proto__:null,SyncRequest:wi,SyncResponse:uR,UploadBinaryDataToDatasetsRequest:Ci,UploadBinaryDataToDatasetsResponse:gR},Symbol.toStringTag,{value:"Module"})),ZO={typeName:"viam.service.datamanager.v1.DataManagerService",methods:{sync:{name:"Sync",I:wi,O:uR,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary},uploadBinaryDataToDatasets:{name:"UploadBinaryDataToDatasets",I:Ci,O:gR,kind:m.Unary}}};class eM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ZO),this.name=n,this.options=a}async sync(e={},n=this.callOptions){const a=new wi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.sync(a,n)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}async uploadBinaryDataToDatasets(e,n,a,o,i={},r=this.callOptions){const c=new Ci({name:this.name,binaryData:e,tags:n,datasetIds:a,mimeType:o,extra:p.fromJson(i)});this.options.requestLogger?.(c),await this.client.uploadBinaryDataToDatasets(c,r)}}class nM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(mp),this.name=n,this.options=a}async getMode(e={},n=this.callOptions){const a=new bo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getMode(a,n)).mode}async setMode(e,n={},a=this.callOptions){const o=new wo({name:this.name,mode:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setMode(o,a)}async getLocation(e={},n=this.callOptions){const a=new Co({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getLocation(a,n);if(!o.location)throw new Error("no location");if(!aR(o.location))throw new Error("invalid location");return o}async getWayPoints(e={},n=this.callOptions){const a=new Do({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getWaypoints(a,n)).waypoints}async addWayPoint(e,n={},a=this.callOptions){const o=new No({name:this.name,location:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.addWaypoint(o,a)}async removeWayPoint(e,n={},a=this.callOptions){const o=new Po({name:this.name,id:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.removeWaypoint(o,a)}async getObstacles(e={},n=this.callOptions){const a=new Ao({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getObstacles(a,n)).obstacles}async getPaths(e={},n=this.callOptions){const a=new qo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPaths(a,n)).paths}async getProperties(e=this.callOptions){const n=new Uo({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const{GetLocationResponse:aM,GetPropertiesResponse:tM,Path:sM,Waypoint:oM}=rp;class iM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Yc),this.name=n,this.options=a}async move(e,n={},a=this.callOptions){const o=new Zs({name:this.name,angleDeg:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.move(o,a)}async getPosition(e={},n=this.callOptions){const a=new eo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).positionDeg}async stop(e={},n=this.callOptions){const a=new no({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new ao({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}class rM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(yp),this.name=n,this.options=a}async getPosition(e=this.callOptions){const n=new Lo({name:this.name});return this.options.requestLogger?.(n),this.client.getPosition(n,e)}async getPointCloudMap(e,n=this.callOptions){const a=new Go({name:this.name,returnEditedMap:e});this.options.requestLogger?.(a);const o=[],i=this.client.getPointCloudMap(a,n);for await(const r of i)o.push(r.pointCloudPcdChunk);return TR(o)}async getInternalState(e=this.callOptions){const n=new Bo({name:this.name});this.options.requestLogger?.(n);const a=[],o=this.client.getInternalState(n,e);for await(const i of o)a.push(i.internalStateChunk);return TR(a)}async getProperties(e=this.callOptions){const n=new Fo({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const TR=t=>{const e=t.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let a=0;for(const o of t)n.set(o,a),a+=o.length;return n},{GetPositionResponse:mM,GetPropertiesResponse:cM}=kp;class lM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(kg),this.name=n,this.options=a}async getDetectionsFromCamera(e,n={},a=this.callOptions){const o=new Ho({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getDetectionsFromCamera(o,a)).detections}async getDetections(e,n,a,o,i={},r=this.callOptions){const c=new jo({name:this.name,image:e,width:n?BigInt(n):void 0,height:a?BigInt(a):void 0,mimeType:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.getDetections(c,r)).detections}async getClassificationsFromCamera(e,n,a={},o=this.callOptions){const i=new Xo({name:this.name,cameraName:e,n,extra:p.fromJson(a)});return this.options.requestLogger?.(i),(await this.client.getClassificationsFromCamera(i,o)).classifications}async getClassifications(e,n,a,o,i,r={},c=this.callOptions){const l=new Ko({name:this.name,image:e,width:n,height:a,mimeType:o,n:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.getClassifications(l,c)).classifications}async getObjectPointClouds(e,n={},a=this.callOptions){const o=new Qo({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getObjectPointClouds(o,a)).objects}async getProperties(e={},n=this.callOptions){const a=new Zo({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getProperties(a,n);return{classificationsSupported:o.classificationsSupported,detectionsSupported:o.detectionsSupported,objectPointCloudsSupported:o.objectPointCloudsSupported}}async captureAllFromCamera(e,{returnImage:n,returnClassifications:a,returnDetections:o,returnObjectPointClouds:i},r={},c=this.callOptions){const l=new ei({name:this.name,cameraName:e,returnImage:n,returnClassifications:a,returnDetections:o,returnObjectPointClouds:i,extra:p.fromJson(r)});this.options.requestLogger?.(l);const d=await this.client.captureAllFromCamera(l,c);return{image:d.image,classifications:d.classifications,detections:d.detections,objectPointClouds:d.objects,extra:d.extra}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const{Classification:dM,Detection:pM}=Tg,{PointCloudObject:uM}=xt,kR=t=>Pn.UuidTool.toString([...t]),gM=t=>new Uint8Array(Pn.UuidTool.toBytes(t)),Di=t=>({...t,uuidString:kR(t.uuid)});class TM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Og),this.name=n,this.options=a}async listUUIDs(e={},n=this.callOptions){const a=new Sg({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.listUUIDs(a,n)).uuids.map(i=>kR(i))}async getTransform(e,n={},a=this.callOptions){const o=new Ig({name:this.name,uuid:gM(e),extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getTransform(o,a);if(!i.transform)throw new Error("No transform returned from server");return Di(i.transform)}async*streamTransformChanges(e={},n=this.callOptions){const a=new Eg({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=this.client.streamTransformChanges(a,n);for await(const i of o)i.transform&&(yield{...i,transform:Di(i.transform)})}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const yR=s.makeMessageType("viam.service.video.v1.GetVideoRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"start_timestamp",kind:"message",T:_},{no:3,name:"end_timestamp",kind:"message",T:_},{no:4,name:"video_codec",kind:"scalar",T:9},{no:5,name:"video_container",kind:"scalar",T:9},{no:6,name:"request_id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),kM={typeName:"viam.service.video.v1.VideoService",methods:{getVideo:{name:"GetVideo",I:yR,O:s.makeMessageType("viam.service.video.v1.GetVideoResponse",()=>[{no:1,name:"video_data",kind:"scalar",T:12},{no:2,name:"video_container",kind:"scalar",T:9},{no:3,name:"request_id",kind:"scalar",T:9}]),kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},vR=t=>_.fromDate(t),yM=()=>crypto.randomUUID();class vM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(kM),this.name=n,this.options=a}async*getVideo(e,n,a="",o="",i={},r=this.callOptions){const c=new yR({name:this.name,startTimestamp:e?vR(e):void 0,endTimestamp:n?vR(n):void 0,videoCodec:a,videoContainer:o,requestId:yM(),extra:p.fromJson(i)});this.options.requestLogger?.(c);const l=this.client.getVideo(c,r);for await(const d of l)yield d}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const hR={typeName:"viam.service.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:P,O:q,kind:m.Unary},getStatus:{name:"GetStatus",I:N,O:A,kind:m.Unary}}},hM=Object.freeze(Object.defineProperty({__proto__:null,GenericService:hR},Symbol.toStringTag,{value:"Module"}));class fM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(hR),this.name=n,this.options=a}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return U(this.client.doCommand,this.name,e,this.options,n)}}const RM="0.73.0";g.AnalogValue=HE,g.ArmClient=LE,g.ArmJointPositions=UE,g.AudioCodec=JE,g.AudioInClient=xE,g.AudioOutClient=YE,g.BaseClient=jE,g.BaseProperties=WE,g.BoardClient=XE,g.ButtonClient=eO,g.CameraClient=tO,g.Capsule=mO,g.Classification=dM,g.Client=Xe,g.CloudConfig=hi,g.CollisionSpecification=VO,g.ConnectError=C,g.ConnectionClosedError=ge,g.Constraints=$O,g.DataManagerClient=eM,g.DatasetType=ot,g.Detection=pM,g.DiscoveryClient=sO,g.Duration=J,g.EncoderClient=iO,g.EncoderPositionType=nR,g.EncoderProperties=oO,g.GantryClient=rO,g.GenericComponentClient=GO,g.GenericServiceClient=fM,g.GeoGeometry=cO,g.GeoPoint=lO,g.GeometriesInFrame=dO,g.Geometry=pO,g.GripperClient=xO,g.InputControllerClient=JO,g.InputControllerEvent=zO,g.LinearConstraint=YO,g.ListPlanStatusesResponse=WO,g.MLModelClient=SO,g.MachineConnectionEvent=K,g.ModelType=Qe,g.MotionClient=XO,g.MotionConfiguration=jO,g.MotorClient=IO,g.MovementSensorAccuracy=OO,g.MovementSensorClient=EO,g.MovementSensorPosition=MO,g.MovementSensorProperties=bO,g.NavigationClient=nM,g.NavigationPosition=aM,g.NavigationProperties=tM,g.ObstacleDetector=HO,g.Orientation=uO,g.OrientationConstraint=KO,g.Path=sM,g.PointCloud=gO,g.PointCloudObject=uM,g.Pose=TO,g.PoseInFrame=kO,g.PoseTrackerClient=FO,g.PowerMode=KE,g.PowerSensorClient=wO,g.RectangularPrism=yO,g.ResourceName=vO,g.RobotClient=Xe,g.SensorClient=DO,g.SequenceDatasetExportStatus=Af,g.ServoClient=iM,g.SlamClient=rM,g.SlamPosition=mM,g.SlamProperties=cM,g.Sphere=hO,g.StreamClient=AO,g.Struct=p,g.SwitchClient=LO,g.Timestamp=_,g.TrainingStatus=Ha,g.Transform=fO,g.TransformChangeType=_g,g.Vector3=RO,g.VideoClient=vM,g.VisionClient=lM,g.Waypoint=oM,g.WorldState=_O,g.WorldStateStoreClient=TM,g.addMetadata=lS,g.appApi=NI,g.appRobotApi=YS,g.armApi=ym,g.baseApi=Om,g.billingApi=qI,g.boardApi=Fm,g.buttonApi=QE,g.cameraApi=KS,g.commonApi=xt,g.createConsoleLogWriter=P_,g.createRobotClient=Cg,g.createViamClient=AE,g.dataApi=jS,g.dataManagerApi=QO,g.deleteMetadata=dS,g.disableDebugLogging=cS,g.discoveryApi=WS,g.doCommandFromClient=U,g.enableDebugLogging=mS,g.encoderApi=$m,g.gantryApi=kS,g.genericComponentApi=yS,g.genericServiceApi=hM,g.getStatusFromClient=L,g.gripperApi=vS,g.inputControllerApi=Tc,g.isValidGeoPoint=aR,g.mlTrainingApi=DI,g.motionApi=Wd,g.motorApi=fS,g.movementSensorApi=Uc,g.navigationApi=rp,g.powerSensorApi=RS,g.provisioningApi=DE,g.robotApi=LS,g.sensorApi=CO,g.servoApi=SS,g.setDebugLogWriter=C_,g.slamApi=kp,g.streamApi=NO,g.switchApi=qO,g.transformWithUUID=Di,g.version=RM,g.visionApi=Tg,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|