@viamrobotics/sdk 0.0.40-alpha.1 → 0.0.40-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.es.js CHANGED
@@ -1,4 +1,4 @@
1
- const version = "0.0.40-alpha.1";
1
+ const version = "0.0.40-alpha.3";
2
2
  var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, robot_pb = {}, googleProtobuf = {};
3
3
  (function(exports) {
4
4
  var $jscomp = $jscomp || {};
@@ -12472,14 +12472,14 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12472
12472
  }([function(p, o, r) {
12473
12473
  Object.defineProperty(o, "__esModule", { value: !0 });
12474
12474
  var i = r(3), l = function() {
12475
- function c(d, v) {
12476
- d === void 0 && (d = {}), v === void 0 && (v = { splitValues: !1 });
12477
- var m, y = this;
12475
+ function c(d, m) {
12476
+ d === void 0 && (d = {}), m === void 0 && (m = { splitValues: !1 });
12477
+ var v, y = this;
12478
12478
  this.headersMap = {}, d && (typeof Headers < "u" && d instanceof Headers ? i.getHeaderKeys(d).forEach(function(f) {
12479
12479
  i.getHeaderValues(d, f).forEach(function(b) {
12480
- v.splitValues ? y.append(f, i.splitHeaderValue(b)) : y.append(f, b);
12480
+ m.splitValues ? y.append(f, i.splitHeaderValue(b)) : y.append(f, b);
12481
12481
  });
12482
- }) : typeof (m = d) == "object" && typeof m.headersMap == "object" && typeof m.forEach == "function" ? d.forEach(function(f, b) {
12482
+ }) : typeof (v = d) == "object" && typeof v.headersMap == "object" && typeof v.forEach == "function" ? d.forEach(function(f, b) {
12483
12483
  y.append(f, b);
12484
12484
  }) : typeof Map < "u" && d instanceof Map ? d.forEach(function(f, b) {
12485
12485
  y.append(b, f);
@@ -12491,62 +12491,62 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12491
12491
  }));
12492
12492
  }
12493
12493
  return c.prototype.appendFromString = function(d) {
12494
- for (var v = d.split(`\r
12495
- `), m = 0; m < v.length; m++) {
12496
- var y = v[m], f = y.indexOf(":");
12494
+ for (var m = d.split(`\r
12495
+ `), v = 0; v < m.length; v++) {
12496
+ var y = m[v], f = y.indexOf(":");
12497
12497
  if (f > 0) {
12498
12498
  var b = y.substring(0, f).trim(), h = y.substring(f + 1).trim();
12499
12499
  this.append(b, h);
12500
12500
  }
12501
12501
  }
12502
- }, c.prototype.delete = function(d, v) {
12503
- var m = i.normalizeName(d);
12504
- if (v === void 0)
12505
- delete this.headersMap[m];
12502
+ }, c.prototype.delete = function(d, m) {
12503
+ var v = i.normalizeName(d);
12504
+ if (m === void 0)
12505
+ delete this.headersMap[v];
12506
12506
  else {
12507
- var y = this.headersMap[m];
12507
+ var y = this.headersMap[v];
12508
12508
  if (y) {
12509
- var f = y.indexOf(v);
12510
- f >= 0 && y.splice(f, 1), y.length === 0 && delete this.headersMap[m];
12509
+ var f = y.indexOf(m);
12510
+ f >= 0 && y.splice(f, 1), y.length === 0 && delete this.headersMap[v];
12511
12511
  }
12512
12512
  }
12513
- }, c.prototype.append = function(d, v) {
12514
- var m = this, y = i.normalizeName(d);
12515
- Array.isArray(this.headersMap[y]) || (this.headersMap[y] = []), Array.isArray(v) ? v.forEach(function(f) {
12516
- m.headersMap[y].push(i.normalizeValue(f));
12517
- }) : this.headersMap[y].push(i.normalizeValue(v));
12518
- }, c.prototype.set = function(d, v) {
12519
- var m = i.normalizeName(d);
12520
- if (Array.isArray(v)) {
12513
+ }, c.prototype.append = function(d, m) {
12514
+ var v = this, y = i.normalizeName(d);
12515
+ Array.isArray(this.headersMap[y]) || (this.headersMap[y] = []), Array.isArray(m) ? m.forEach(function(f) {
12516
+ v.headersMap[y].push(i.normalizeValue(f));
12517
+ }) : this.headersMap[y].push(i.normalizeValue(m));
12518
+ }, c.prototype.set = function(d, m) {
12519
+ var v = i.normalizeName(d);
12520
+ if (Array.isArray(m)) {
12521
12521
  var y = [];
12522
- v.forEach(function(f) {
12522
+ m.forEach(function(f) {
12523
12523
  y.push(i.normalizeValue(f));
12524
- }), this.headersMap[m] = y;
12524
+ }), this.headersMap[v] = y;
12525
12525
  } else
12526
- this.headersMap[m] = [i.normalizeValue(v)];
12527
- }, c.prototype.has = function(d, v) {
12528
- var m = this.headersMap[i.normalizeName(d)];
12529
- if (!Array.isArray(m))
12526
+ this.headersMap[v] = [i.normalizeValue(m)];
12527
+ }, c.prototype.has = function(d, m) {
12528
+ var v = this.headersMap[i.normalizeName(d)];
12529
+ if (!Array.isArray(v))
12530
12530
  return !1;
12531
- if (v !== void 0) {
12532
- var y = i.normalizeValue(v);
12533
- return m.indexOf(y) >= 0;
12531
+ if (m !== void 0) {
12532
+ var y = i.normalizeValue(m);
12533
+ return v.indexOf(y) >= 0;
12534
12534
  }
12535
12535
  return !0;
12536
12536
  }, c.prototype.get = function(d) {
12537
- var v = this.headersMap[i.normalizeName(d)];
12538
- return v !== void 0 ? v.concat() : [];
12537
+ var m = this.headersMap[i.normalizeName(d)];
12538
+ return m !== void 0 ? m.concat() : [];
12539
12539
  }, c.prototype.forEach = function(d) {
12540
- var v = this;
12541
- Object.getOwnPropertyNames(this.headersMap).forEach(function(m) {
12542
- d(m, v.headersMap[m]);
12540
+ var m = this;
12541
+ Object.getOwnPropertyNames(this.headersMap).forEach(function(v) {
12542
+ d(v, m.headersMap[v]);
12543
12543
  }, this);
12544
12544
  }, c.prototype.toHeaders = function() {
12545
12545
  if (typeof Headers < "u") {
12546
12546
  var d = new Headers();
12547
- return this.forEach(function(v, m) {
12548
- m.forEach(function(y) {
12549
- d.append(v, y);
12547
+ return this.forEach(function(m, v) {
12548
+ v.forEach(function(y) {
12549
+ d.append(m, y);
12550
12550
  });
12551
12551
  }), d;
12552
12552
  }
@@ -12579,23 +12579,23 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12579
12579
  var d = l;
12580
12580
  if (d instanceof Headers && d.getAll)
12581
12581
  return d.getAll(c);
12582
- var v = d.get(c);
12583
- return v && typeof v == "string" ? [v] : v;
12582
+ var m = d.get(c);
12583
+ return m && typeof m == "string" ? [m] : m;
12584
12584
  }, o.getHeaderKeys = function(l) {
12585
- var c = l, d = {}, v = [];
12586
- return c.keys ? i.iterateHeadersKeys(c, function(m) {
12587
- d[m] || (d[m] = !0, v.push(m));
12588
- }) : c.forEach ? c.forEach(function(m, y) {
12589
- d[y] || (d[y] = !0, v.push(y));
12590
- }) : i.iterateHeaders(c, function(m) {
12591
- var y = m[0];
12592
- d[y] || (d[y] = !0, v.push(y));
12593
- }), v;
12585
+ var c = l, d = {}, m = [];
12586
+ return c.keys ? i.iterateHeadersKeys(c, function(v) {
12587
+ d[v] || (d[v] = !0, m.push(v));
12588
+ }) : c.forEach ? c.forEach(function(v, y) {
12589
+ d[y] || (d[y] = !0, m.push(y));
12590
+ }) : i.iterateHeaders(c, function(v) {
12591
+ var y = v[0];
12592
+ d[y] || (d[y] = !0, m.push(y));
12593
+ }), m;
12594
12594
  }, o.splitHeaderValue = function(l) {
12595
12595
  var c = [];
12596
12596
  return l.split(", ").forEach(function(d) {
12597
- d.split(",").forEach(function(v) {
12598
- c.push(v);
12597
+ d.split(",").forEach(function(m) {
12598
+ c.push(m);
12599
12599
  });
12600
12600
  }), c;
12601
12601
  };
@@ -12619,10 +12619,10 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12619
12619
  function d(f) {
12620
12620
  return f.getUint32(1, !1);
12621
12621
  }
12622
- function v(f, b, h) {
12622
+ function m(f, b, h) {
12623
12623
  return f.byteLength - b >= h;
12624
12624
  }
12625
- function m(f, b, h) {
12625
+ function v(f, b, h) {
12626
12626
  if (f.slice)
12627
12627
  return f.slice(b, h);
12628
12628
  var R = f.length;
@@ -12655,18 +12655,18 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12655
12655
  else if (this.position === this.buffer.byteLength)
12656
12656
  this.buffer = b, this.position = 0;
12657
12657
  else {
12658
- var P = this.buffer.byteLength - this.position, D = new Uint8Array(P + b.byteLength), G = m(this.buffer, this.position);
12658
+ var P = this.buffer.byteLength - this.position, D = new Uint8Array(P + b.byteLength), G = v(this.buffer, this.position);
12659
12659
  D.set(G, 0);
12660
12660
  var z = new Uint8Array(b);
12661
12661
  D.set(z, P), this.buffer = D, this.position = 0;
12662
12662
  }
12663
12663
  for (; ; ) {
12664
- if (!v(this.buffer, this.position, 5))
12664
+ if (!m(this.buffer, this.position, 5))
12665
12665
  return O;
12666
- var x = m(this.buffer, this.position, this.position + 5), L = new DataView(x.buffer, x.byteOffset, x.byteLength), k = d(L);
12667
- if (!v(this.buffer, this.position, 5 + k))
12666
+ var x = v(this.buffer, this.position, this.position + 5), L = new DataView(x.buffer, x.byteOffset, x.byteLength), k = d(L);
12667
+ if (!m(this.buffer, this.position, 5 + k))
12668
12668
  return O;
12669
- var W = m(this.buffer, this.position + 5, this.position + 5 + k);
12669
+ var W = v(this.buffer, this.position + 5, this.position + 5 + k);
12670
12670
  if (this.position += 5 + k, c(L))
12671
12671
  return O.push({ chunkType: o.TRAILERS, trailers: (R = W, new r.Metadata(l(R))) }), O;
12672
12672
  O.push({ chunkType: o.MESSAGE, data: W });
@@ -12716,9 +12716,9 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12716
12716
  Object.defineProperty(g, "__esModule", { value: !0 }), g.client = void 0;
12717
12717
  var o = p(65), r = p(617), i = p(8), l = p(346), c = p(57), d = p(882);
12718
12718
  g.client = function(y, f) {
12719
- return new v(y, f);
12719
+ return new m(y, f);
12720
12720
  };
12721
- var v = function() {
12721
+ var m = function() {
12722
12722
  function y(f, b) {
12723
12723
  this.started = !1, this.sentFirstMessage = !1, this.completed = !1, this.closed = !1, this.finishedSending = !1, this.onHeadersCallbacks = [], this.onMessageCallbacks = [], this.onEndCallbacks = [], this.parser = new r.ChunkParser(), this.methodDefinition = f, this.props = b, this.createTransport();
12724
12724
  }
@@ -12730,7 +12730,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12730
12730
  this.props.debug && l.debug("grpc.onHeaders received after request was closed - ignoring");
12731
12731
  else if (b !== 0) {
12732
12732
  this.responseHeaders = f, this.props.debug && l.debug("onHeaders.responseHeaders", JSON.stringify(this.responseHeaders, null, 2));
12733
- var h = m(f);
12733
+ var h = v(f);
12734
12734
  this.props.debug && l.debug("onHeaders.gRPCStatus", h);
12735
12735
  var R = h && h >= 0 ? h : i.httpStatusToCode(b);
12736
12736
  this.props.debug && l.debug("onHeaders.code", R);
@@ -12763,7 +12763,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12763
12763
  if (this.props.debug && l.debug("grpc.onEnd"), this.closed)
12764
12764
  this.props.debug && l.debug("grpc.onEnd received after request was closed - ignoring");
12765
12765
  else if (this.responseTrailers !== void 0) {
12766
- var f = m(this.responseTrailers);
12766
+ var f = v(this.responseTrailers);
12767
12767
  if (f !== null) {
12768
12768
  var b = this.responseTrailers.get("grpc-message"), h = this.decodeGRPCStatus(b[0]);
12769
12769
  this.rawOnEnd(f, h, this.responseTrailers);
@@ -12772,7 +12772,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12772
12772
  } else {
12773
12773
  if (this.responseHeaders === void 0)
12774
12774
  return void this.rawOnError(i.Code.Unknown, "Response closed without headers");
12775
- var R = m(this.responseHeaders), O = this.responseHeaders.get("grpc-message");
12775
+ var R = v(this.responseHeaders), O = this.responseHeaders.get("grpc-message");
12776
12776
  if (this.props.debug && l.debug("grpc.headers only response ", R, O), R === null)
12777
12777
  return void this.rawOnEnd(i.Code.Unknown, "Response closed without grpc-status (Headers only)", this.responseHeaders);
12778
12778
  var P = this.decodeGRPCStatus(O[0]);
@@ -12872,7 +12872,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12872
12872
  this.closed = !0, this.props.debug && l.debug("request.abort aborting request"), this.transport.cancel();
12873
12873
  }, y;
12874
12874
  }();
12875
- function m(y) {
12875
+ function v(y) {
12876
12876
  var f = y.get("grpc-status") || [];
12877
12877
  if (f.length > 0)
12878
12878
  try {
@@ -12891,8 +12891,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12891
12891
  };
12892
12892
  }, 607: function(u, g, p) {
12893
12893
  Object.defineProperty(g, "__esModule", { value: !0 }), g.grpc = void 0;
12894
- var o, r = p(418), i = p(57), l = p(229), c = p(540), d = p(210), v = p(859), m = p(8), y = p(938), f = p(35), b = p(934);
12895
- (o = g.grpc || (g.grpc = {})).setDefaultTransport = i.setDefaultTransportFactory, o.CrossBrowserHttpTransport = v.CrossBrowserHttpTransport, o.FetchReadableStreamTransport = l.FetchReadableStreamTransport, o.XhrTransport = d.XhrTransport, o.WebsocketTransport = c.WebsocketTransport, o.Code = m.Code, o.Metadata = r.BrowserHeaders, o.client = function(h, R) {
12894
+ var o, r = p(418), i = p(57), l = p(229), c = p(540), d = p(210), m = p(859), v = p(8), y = p(938), f = p(35), b = p(934);
12895
+ (o = g.grpc || (g.grpc = {})).setDefaultTransport = i.setDefaultTransportFactory, o.CrossBrowserHttpTransport = m.CrossBrowserHttpTransport, o.FetchReadableStreamTransport = l.FetchReadableStreamTransport, o.XhrTransport = d.XhrTransport, o.WebsocketTransport = c.WebsocketTransport, o.Code = v.Code, o.Metadata = r.BrowserHeaders, o.client = function(h, R) {
12896
12896
  return b.client(h, R);
12897
12897
  }, o.invoke = y.invoke, o.unary = f.unary;
12898
12898
  }, 938: function(u, g, p) {
@@ -12925,8 +12925,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12925
12925
  }, 229: function(u, g, p) {
12926
12926
  var o = this && this.__assign || function() {
12927
12927
  return (o = Object.assign || function(c) {
12928
- for (var d, v = 1, m = arguments.length; v < m; v++)
12929
- for (var y in d = arguments[v])
12928
+ for (var d, m = 1, v = arguments.length; m < v; m++)
12929
+ for (var y in d = arguments[m])
12930
12930
  Object.prototype.hasOwnProperty.call(d, y) && (c[y] = d[y]);
12931
12931
  return c;
12932
12932
  }).apply(this, arguments);
@@ -12935,36 +12935,36 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12935
12935
  var r = p(65), i = p(346);
12936
12936
  g.FetchReadableStreamTransport = function(c) {
12937
12937
  return function(d) {
12938
- return function(v, m) {
12939
- return v.debug && i.debug("fetchRequest", v), new l(v, m);
12938
+ return function(m, v) {
12939
+ return m.debug && i.debug("fetchRequest", m), new l(m, v);
12940
12940
  }(d, c);
12941
12941
  };
12942
12942
  };
12943
12943
  var l = function() {
12944
- function c(d, v) {
12945
- this.cancelled = !1, this.controller = self.AbortController && new AbortController(), this.options = d, this.init = v;
12944
+ function c(d, m) {
12945
+ this.cancelled = !1, this.controller = self.AbortController && new AbortController(), this.options = d, this.init = m;
12946
12946
  }
12947
- return c.prototype.pump = function(d, v) {
12948
- var m = this;
12947
+ return c.prototype.pump = function(d, m) {
12948
+ var v = this;
12949
12949
  if (this.reader = d, this.cancelled)
12950
12950
  return this.options.debug && i.debug("Fetch.pump.cancel at first pump"), void this.reader.cancel().catch(function(y) {
12951
- m.options.debug && i.debug("Fetch.pump.reader.cancel exception", y);
12951
+ v.options.debug && i.debug("Fetch.pump.reader.cancel exception", y);
12952
12952
  });
12953
12953
  this.reader.read().then(function(y) {
12954
12954
  if (y.done)
12955
- return m.options.onEnd(), v;
12956
- m.options.onChunk(y.value), m.pump(m.reader, v);
12955
+ return v.options.onEnd(), m;
12956
+ v.options.onChunk(y.value), v.pump(v.reader, m);
12957
12957
  }).catch(function(y) {
12958
- m.cancelled ? m.options.debug && i.debug("Fetch.catch - request cancelled") : (m.cancelled = !0, m.options.debug && i.debug("Fetch.catch", y.message), m.options.onEnd(y));
12958
+ v.cancelled ? v.options.debug && i.debug("Fetch.catch - request cancelled") : (v.cancelled = !0, v.options.debug && i.debug("Fetch.catch", y.message), v.options.onEnd(y));
12959
12959
  });
12960
12960
  }, c.prototype.send = function(d) {
12961
- var v = this;
12962
- fetch(this.options.url, o(o({}, this.init), { headers: this.metadata.toHeaders(), method: "POST", body: d, signal: this.controller && this.controller.signal })).then(function(m) {
12963
- if (v.options.debug && i.debug("Fetch.response", m), v.options.onHeaders(new r.Metadata(m.headers), m.status), !m.body)
12964
- return m;
12965
- v.pump(m.body.getReader(), m);
12966
- }).catch(function(m) {
12967
- v.cancelled ? v.options.debug && i.debug("Fetch.catch - request cancelled") : (v.cancelled = !0, v.options.debug && i.debug("Fetch.catch", m.message), v.options.onEnd(m));
12961
+ var m = this;
12962
+ fetch(this.options.url, o(o({}, this.init), { headers: this.metadata.toHeaders(), method: "POST", body: d, signal: this.controller && this.controller.signal })).then(function(v) {
12963
+ if (m.options.debug && i.debug("Fetch.response", v), m.options.onHeaders(new r.Metadata(v.headers), v.status), !v.body)
12964
+ return v;
12965
+ m.pump(v.body.getReader(), v);
12966
+ }).catch(function(v) {
12967
+ m.cancelled ? m.options.debug && i.debug("Fetch.catch - request cancelled") : (m.cancelled = !0, m.options.debug && i.debug("Fetch.catch", v.message), m.options.onEnd(v));
12968
12968
  });
12969
12969
  }, c.prototype.sendMessage = function(d) {
12970
12970
  this.send(d);
@@ -12973,8 +12973,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
12973
12973
  this.metadata = d;
12974
12974
  }, c.prototype.cancel = function() {
12975
12975
  var d = this;
12976
- this.cancelled ? this.options.debug && i.debug("Fetch.cancel already cancelled") : (this.cancelled = !0, this.controller ? (this.options.debug && i.debug("Fetch.cancel.controller.abort"), this.controller.abort()) : this.options.debug && i.debug("Fetch.cancel.missing abort controller"), this.reader ? (this.options.debug && i.debug("Fetch.cancel.reader.cancel"), this.reader.cancel().catch(function(v) {
12977
- d.options.debug && i.debug("Fetch.cancel.reader.cancel exception", v);
12976
+ this.cancelled ? this.options.debug && i.debug("Fetch.cancel already cancelled") : (this.cancelled = !0, this.controller ? (this.options.debug && i.debug("Fetch.cancel.controller.abort"), this.controller.abort()) : this.options.debug && i.debug("Fetch.cancel.missing abort controller"), this.reader ? (this.options.debug && i.debug("Fetch.cancel.reader.cancel"), this.reader.cancel().catch(function(m) {
12977
+ d.options.debug && i.debug("Fetch.cancel.reader.cancel exception", m);
12978
12978
  })) : this.options.debug && i.debug("Fetch.cancel before reader"));
12979
12979
  }, c;
12980
12980
  }();
@@ -13010,7 +13010,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
13010
13010
  g.XhrTransport = function(f) {
13011
13011
  return function(b) {
13012
13012
  if (c.detectMozXHRSupport())
13013
- return new v(b, f);
13013
+ return new m(b, f);
13014
13014
  if (c.detectXHROverrideMimeTypeSupport())
13015
13015
  return new d(b, f);
13016
13016
  throw new Error("This environment's XHR implementation cannot support binary transfer.");
@@ -13049,7 +13049,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
13049
13049
  }, f;
13050
13050
  }();
13051
13051
  g.XHR = d;
13052
- var v = function(f) {
13052
+ var m = function(f) {
13053
13053
  function b() {
13054
13054
  return f !== null && f.apply(this, arguments) || this;
13055
13055
  }
@@ -13060,7 +13060,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
13060
13060
  this.options.debug && l.debug("MozXHR.onProgressEvent: ", new Uint8Array(h)), this.options.onChunk(new Uint8Array(h));
13061
13061
  }, b;
13062
13062
  }(d);
13063
- function m(f, b) {
13063
+ function v(f, b) {
13064
13064
  var h = f.charCodeAt(b);
13065
13065
  if (h >= 55296 && h <= 56319) {
13066
13066
  var R = f.charCodeAt(b + 1);
@@ -13070,12 +13070,12 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
13070
13070
  }
13071
13071
  function y(f) {
13072
13072
  for (var b = new Uint8Array(f.length), h = 0, R = 0; R < f.length; R++) {
13073
- var O = String.prototype.codePointAt ? f.codePointAt(R) : m(f, R);
13073
+ var O = String.prototype.codePointAt ? f.codePointAt(R) : v(f, R);
13074
13074
  b[h++] = 255 & O;
13075
13075
  }
13076
13076
  return b;
13077
13077
  }
13078
- g.MozChunkedArrayBufferXHR = v, g.stringToArrayBuffer = y;
13078
+ g.MozChunkedArrayBufferXHR = m, g.stringToArrayBuffer = y;
13079
13079
  }, 849: function(u, g) {
13080
13080
  var p;
13081
13081
  function o() {
@@ -13116,7 +13116,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
13116
13116
  return function(c) {
13117
13117
  return function(d) {
13118
13118
  d.debug && r.debug("websocketRequest", d);
13119
- var v, m = function(b) {
13119
+ var m, v = function(b) {
13120
13120
  if (b.substr(0, 8) === "https://")
13121
13121
  return "wss://" + b.substr(8);
13122
13122
  if (b.substr(0, 7) === "http://")
@@ -13125,34 +13125,34 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
13125
13125
  }(d.url), y = [];
13126
13126
  function f(b) {
13127
13127
  if (b === o.FINISH_SEND)
13128
- v.send(l);
13128
+ m.send(l);
13129
13129
  else {
13130
13130
  var h = b, R = new Int8Array(h.byteLength + 1);
13131
- R.set(new Uint8Array([0])), R.set(h, 1), v.send(R);
13131
+ R.set(new Uint8Array([0])), R.set(h, 1), m.send(R);
13132
13132
  }
13133
13133
  }
13134
13134
  return { sendMessage: function(b) {
13135
- v && v.readyState !== v.CONNECTING ? f(b) : y.push(b);
13135
+ m && m.readyState !== m.CONNECTING ? f(b) : y.push(b);
13136
13136
  }, finishSend: function() {
13137
- v && v.readyState !== v.CONNECTING ? f(o.FINISH_SEND) : y.push(o.FINISH_SEND);
13137
+ m && m.readyState !== m.CONNECTING ? f(o.FINISH_SEND) : y.push(o.FINISH_SEND);
13138
13138
  }, start: function(b) {
13139
- (v = new WebSocket(m, ["grpc-websockets"])).binaryType = "arraybuffer", v.onopen = function() {
13139
+ (m = new WebSocket(v, ["grpc-websockets"])).binaryType = "arraybuffer", m.onopen = function() {
13140
13140
  var h;
13141
- d.debug && r.debug("websocketRequest.onopen"), v.send((h = "", b.forEach(function(R, O) {
13141
+ d.debug && r.debug("websocketRequest.onopen"), m.send((h = "", b.forEach(function(R, O) {
13142
13142
  h += R + ": " + O.join(", ") + `\r
13143
13143
  `;
13144
13144
  }), i.encodeASCII(h))), y.forEach(function(R) {
13145
13145
  f(R);
13146
13146
  });
13147
- }, v.onclose = function(h) {
13147
+ }, m.onclose = function(h) {
13148
13148
  d.debug && r.debug("websocketRequest.onclose", h), d.onEnd();
13149
- }, v.onerror = function(h) {
13149
+ }, m.onerror = function(h) {
13150
13150
  d.debug && r.debug("websocketRequest.onerror", h);
13151
- }, v.onmessage = function(h) {
13151
+ }, m.onmessage = function(h) {
13152
13152
  d.onChunk(new Uint8Array(h.data));
13153
13153
  };
13154
13154
  }, cancel: function() {
13155
- d.debug && r.debug("websocket.abort"), v.close();
13155
+ d.debug && r.debug("websocket.abort"), m.close();
13156
13156
  } };
13157
13157
  }(c);
13158
13158
  };
@@ -13165,15 +13165,15 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
13165
13165
  throw new Error(".unary cannot be used with server-streaming methods. Use .invoke or .client instead.");
13166
13166
  if (i.requestStream)
13167
13167
  throw new Error(".unary cannot be used with client-streaming methods. Use .client instead.");
13168
- var c = null, d = null, v = r.client(i, { host: l.host, transport: l.transport, debug: l.debug });
13169
- return v.onHeaders(function(m) {
13170
- c = m;
13171
- }), v.onMessage(function(m) {
13172
- d = m;
13173
- }), v.onEnd(function(m, y, f) {
13174
- l.onEnd({ status: m, statusMessage: y, headers: c || new o.Metadata(), message: d, trailers: f });
13175
- }), v.start(l.metadata), v.send(l.request), v.finishSend(), { close: function() {
13176
- v.close();
13168
+ var c = null, d = null, m = r.client(i, { host: l.host, transport: l.transport, debug: l.debug });
13169
+ return m.onHeaders(function(v) {
13170
+ c = v;
13171
+ }), m.onMessage(function(v) {
13172
+ d = v;
13173
+ }), m.onEnd(function(v, y, f) {
13174
+ l.onEnd({ status: v, statusMessage: y, headers: c || new o.Metadata(), message: d, trailers: f });
13175
+ }), m.start(l.metadata), m.send(l.request), m.finishSend(), { close: function() {
13176
+ m.close();
13177
13177
  } };
13178
13178
  };
13179
13179
  }, 882: function(u, g) {
@@ -13203,6 +13203,41 @@ const promisify = function(t, e) {
13203
13203
  y: t.getY(),
13204
13204
  z: t.getZ()
13205
13205
  };
13206
+ }, encodePose = (t) => {
13207
+ const e = new common_pb.Pose();
13208
+ return e.setX(t.x), e.setY(t.y), e.setZ(t.z), e.setOX(t.oX), e.setOY(t.oY), e.setOZ(t.oZ), e.setTheta(t.theta), e;
13209
+ }, encodePoseInFrame = (t) => {
13210
+ if (!t.pose)
13211
+ throw new Error("no pose");
13212
+ const e = new common_pb.PoseInFrame();
13213
+ return e.setPose(encodePose(t.pose)), e.setReferenceFrame(t.referenceFrame), e;
13214
+ }, encodeResourceName = (t) => {
13215
+ const e = new common_pb.ResourceName();
13216
+ return e.setNamespace(t.namespace), e.setType(t.type), e.setSubtype(t.subtype), e.setName(t.name), e;
13217
+ }, encodeGeometry = (t) => {
13218
+ const e = new common_pb.Geometry();
13219
+ if (t.center !== void 0 && e.setCenter(encodePose(t.center)), t.sphere !== void 0) {
13220
+ const s = new common_pb.Sphere();
13221
+ s.setRadiusMm(t.sphere.radiusMm), e.setSphere(s);
13222
+ }
13223
+ if (t.box !== void 0) {
13224
+ const s = new common_pb.RectangularPrism();
13225
+ t.box.dimsMm !== void 0 && s.setDimsMm(encodeVector3D(t.box.dimsMm)), e.setBox(s);
13226
+ }
13227
+ if (t.capsule !== void 0) {
13228
+ const s = new common_pb.Capsule();
13229
+ s.setLengthMm(t.capsule.lengthMm), s.setRadiusMm(t.capsule.radiusMm), e.setCapsule(s);
13230
+ }
13231
+ return e;
13232
+ }, encodeGeometriesInFrame = (t) => {
13233
+ const e = new common_pb.GeometriesInFrame();
13234
+ return e.setReferenceFrame(t.referenceFrame), e.setGeometriesList(t.geometriesList.map(encodeGeometry)), e;
13235
+ }, encodeTransform = (t) => {
13236
+ const e = new common_pb.Transform();
13237
+ return e.setReferenceFrame(t.referenceFrame), t.physicalObject !== void 0 && e.setPhysicalObject(encodeGeometry(t.physicalObject)), t.poseInObserverFrame !== void 0 && e.setPoseInObserverFrame(encodePoseInFrame(t.poseInObserverFrame)), e;
13238
+ }, encodeWorldState = (t) => {
13239
+ const e = new common_pb.WorldState();
13240
+ return e.setObstaclesList(t.obstaclesList.map(encodeGeometriesInFrame)), e.setTransformsList(t.transformsList.map(encodeTransform)), e;
13206
13241
  };
13207
13242
  var __webpack_modules__ = { 37: function(t) {
13208
13243
  t.exports = function(e) {
@@ -13250,58 +13285,58 @@ var __webpack_modules__ = { 37: function(t) {
13250
13285
  }, function(e, s, n) {
13251
13286
  Object.defineProperty(s, "__esModule", { value: !0 });
13252
13287
  var u = n(0), g = n(8), p = n(9), o = n(1), r = n(4), i = n(14);
13253
- s.client = function(d, v) {
13254
- return new l(d, v);
13288
+ s.client = function(d, m) {
13289
+ return new l(d, m);
13255
13290
  };
13256
13291
  var l = function() {
13257
- function d(v, m) {
13258
- this.started = !1, this.sentFirstMessage = !1, this.completed = !1, this.closed = !1, this.finishedSending = !1, this.onHeadersCallbacks = [], this.onMessageCallbacks = [], this.onEndCallbacks = [], this.parser = new g.ChunkParser(), this.methodDefinition = v, this.props = m, this.createTransport();
13292
+ function d(m, v) {
13293
+ this.started = !1, this.sentFirstMessage = !1, this.completed = !1, this.closed = !1, this.finishedSending = !1, this.onHeadersCallbacks = [], this.onMessageCallbacks = [], this.onEndCallbacks = [], this.parser = new g.ChunkParser(), this.methodDefinition = m, this.props = v, this.createTransport();
13259
13294
  }
13260
13295
  return d.prototype.createTransport = function() {
13261
- var v = this.props.host + "/" + this.methodDefinition.service.serviceName + "/" + this.methodDefinition.methodName, m = { methodDefinition: this.methodDefinition, debug: this.props.debug || !1, url: v, onHeaders: this.onTransportHeaders.bind(this), onChunk: this.onTransportChunk.bind(this), onEnd: this.onTransportEnd.bind(this) };
13262
- this.props.transport ? this.transport = this.props.transport(m) : this.transport = r.makeDefaultTransport(m);
13263
- }, d.prototype.onTransportHeaders = function(v, m) {
13264
- if (this.props.debug && o.debug("onHeaders", v, m), this.closed)
13296
+ var m = this.props.host + "/" + this.methodDefinition.service.serviceName + "/" + this.methodDefinition.methodName, v = { methodDefinition: this.methodDefinition, debug: this.props.debug || !1, url: m, onHeaders: this.onTransportHeaders.bind(this), onChunk: this.onTransportChunk.bind(this), onEnd: this.onTransportEnd.bind(this) };
13297
+ this.props.transport ? this.transport = this.props.transport(v) : this.transport = r.makeDefaultTransport(v);
13298
+ }, d.prototype.onTransportHeaders = function(m, v) {
13299
+ if (this.props.debug && o.debug("onHeaders", m, v), this.closed)
13265
13300
  this.props.debug && o.debug("grpc.onHeaders received after request was closed - ignoring");
13266
- else if (m !== 0) {
13267
- this.responseHeaders = v, this.props.debug && o.debug("onHeaders.responseHeaders", JSON.stringify(this.responseHeaders, null, 2));
13268
- var y = c(v);
13301
+ else if (v !== 0) {
13302
+ this.responseHeaders = m, this.props.debug && o.debug("onHeaders.responseHeaders", JSON.stringify(this.responseHeaders, null, 2));
13303
+ var y = c(m);
13269
13304
  this.props.debug && o.debug("onHeaders.gRPCStatus", y);
13270
- var f = y && y >= 0 ? y : p.httpStatusToCode(m);
13305
+ var f = y && y >= 0 ? y : p.httpStatusToCode(v);
13271
13306
  this.props.debug && o.debug("onHeaders.code", f);
13272
- var b = v.get("grpc-message") || [];
13273
- if (this.props.debug && o.debug("onHeaders.gRPCMessage", b), this.rawOnHeaders(v), f !== p.Code.OK) {
13307
+ var b = m.get("grpc-message") || [];
13308
+ if (this.props.debug && o.debug("onHeaders.gRPCMessage", b), this.rawOnHeaders(m), f !== p.Code.OK) {
13274
13309
  var h = this.decodeGRPCStatus(b[0]);
13275
- this.rawOnError(f, h, v);
13310
+ this.rawOnError(f, h, m);
13276
13311
  }
13277
13312
  }
13278
- }, d.prototype.onTransportChunk = function(v) {
13279
- var m = this;
13313
+ }, d.prototype.onTransportChunk = function(m) {
13314
+ var v = this;
13280
13315
  if (this.closed)
13281
13316
  this.props.debug && o.debug("grpc.onChunk received after request was closed - ignoring");
13282
13317
  else {
13283
13318
  var y = [];
13284
13319
  try {
13285
- y = this.parser.parse(v);
13320
+ y = this.parser.parse(m);
13286
13321
  } catch (f) {
13287
13322
  return this.props.debug && o.debug("onChunk.parsing error", f, f.message), void this.rawOnError(p.Code.Internal, "parsing error: " + f.message);
13288
13323
  }
13289
13324
  y.forEach(function(f) {
13290
13325
  if (f.chunkType === g.ChunkType.MESSAGE) {
13291
- var b = m.methodDefinition.responseType.deserializeBinary(f.data);
13292
- m.rawOnMessage(b);
13326
+ var b = v.methodDefinition.responseType.deserializeBinary(f.data);
13327
+ v.rawOnMessage(b);
13293
13328
  } else
13294
- f.chunkType === g.ChunkType.TRAILERS && (m.responseHeaders ? (m.responseTrailers = new u.Metadata(f.trailers), m.props.debug && o.debug("onChunk.trailers", m.responseTrailers)) : (m.responseHeaders = new u.Metadata(f.trailers), m.rawOnHeaders(m.responseHeaders)));
13329
+ f.chunkType === g.ChunkType.TRAILERS && (v.responseHeaders ? (v.responseTrailers = new u.Metadata(f.trailers), v.props.debug && o.debug("onChunk.trailers", v.responseTrailers)) : (v.responseHeaders = new u.Metadata(f.trailers), v.rawOnHeaders(v.responseHeaders)));
13295
13330
  });
13296
13331
  }
13297
13332
  }, d.prototype.onTransportEnd = function() {
13298
13333
  if (this.props.debug && o.debug("grpc.onEnd"), this.closed)
13299
13334
  this.props.debug && o.debug("grpc.onEnd received after request was closed - ignoring");
13300
13335
  else if (this.responseTrailers !== void 0) {
13301
- var v = c(this.responseTrailers);
13302
- if (v !== null) {
13303
- var m = this.responseTrailers.get("grpc-message"), y = this.decodeGRPCStatus(m[0]);
13304
- this.rawOnEnd(v, y, this.responseTrailers);
13336
+ var m = c(this.responseTrailers);
13337
+ if (m !== null) {
13338
+ var v = this.responseTrailers.get("grpc-message"), y = this.decodeGRPCStatus(v[0]);
13339
+ this.rawOnEnd(m, y, this.responseTrailers);
13305
13340
  } else
13306
13341
  this.rawOnError(p.Code.Internal, "Response closed without grpc-status (Trailers provided)");
13307
13342
  } else {
@@ -13313,73 +13348,73 @@ var __webpack_modules__ = { 37: function(t) {
13313
13348
  var h = this.decodeGRPCStatus(b[0]);
13314
13349
  this.rawOnEnd(f, h, this.responseHeaders);
13315
13350
  }
13316
- }, d.prototype.decodeGRPCStatus = function(v) {
13317
- if (!v)
13351
+ }, d.prototype.decodeGRPCStatus = function(m) {
13352
+ if (!m)
13318
13353
  return "";
13319
13354
  try {
13320
- return decodeURIComponent(v);
13355
+ return decodeURIComponent(m);
13321
13356
  } catch {
13322
- return v;
13357
+ return m;
13323
13358
  }
13324
- }, d.prototype.rawOnEnd = function(v, m, y) {
13359
+ }, d.prototype.rawOnEnd = function(m, v, y) {
13325
13360
  var f = this;
13326
- this.props.debug && o.debug("rawOnEnd", v, m, y), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(b) {
13361
+ this.props.debug && o.debug("rawOnEnd", m, v, y), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(b) {
13327
13362
  if (!f.closed)
13328
13363
  try {
13329
- b(v, m, y);
13364
+ b(m, v, y);
13330
13365
  } catch (h) {
13331
13366
  setTimeout(function() {
13332
13367
  throw h;
13333
13368
  });
13334
13369
  }
13335
13370
  }));
13336
- }, d.prototype.rawOnHeaders = function(v) {
13337
- this.props.debug && o.debug("rawOnHeaders", v), this.completed || this.onHeadersCallbacks.forEach(function(m) {
13371
+ }, d.prototype.rawOnHeaders = function(m) {
13372
+ this.props.debug && o.debug("rawOnHeaders", m), this.completed || this.onHeadersCallbacks.forEach(function(v) {
13338
13373
  try {
13339
- m(v);
13374
+ v(m);
13340
13375
  } catch (y) {
13341
13376
  setTimeout(function() {
13342
13377
  throw y;
13343
13378
  });
13344
13379
  }
13345
13380
  });
13346
- }, d.prototype.rawOnError = function(v, m, y) {
13381
+ }, d.prototype.rawOnError = function(m, v, y) {
13347
13382
  var f = this;
13348
- y === void 0 && (y = new u.Metadata()), this.props.debug && o.debug("rawOnError", v, m), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(b) {
13383
+ y === void 0 && (y = new u.Metadata()), this.props.debug && o.debug("rawOnError", m, v), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(b) {
13349
13384
  if (!f.closed)
13350
13385
  try {
13351
- b(v, m, y);
13386
+ b(m, v, y);
13352
13387
  } catch (h) {
13353
13388
  setTimeout(function() {
13354
13389
  throw h;
13355
13390
  });
13356
13391
  }
13357
13392
  }));
13358
- }, d.prototype.rawOnMessage = function(v) {
13359
- var m = this;
13360
- this.props.debug && o.debug("rawOnMessage", v.toObject()), this.completed || this.closed || this.onMessageCallbacks.forEach(function(y) {
13361
- if (!m.closed)
13393
+ }, d.prototype.rawOnMessage = function(m) {
13394
+ var v = this;
13395
+ this.props.debug && o.debug("rawOnMessage", m.toObject()), this.completed || this.closed || this.onMessageCallbacks.forEach(function(y) {
13396
+ if (!v.closed)
13362
13397
  try {
13363
- y(v);
13398
+ y(m);
13364
13399
  } catch (f) {
13365
13400
  setTimeout(function() {
13366
13401
  throw f;
13367
13402
  });
13368
13403
  }
13369
13404
  });
13370
- }, d.prototype.onHeaders = function(v) {
13371
- this.onHeadersCallbacks.push(v);
13372
- }, d.prototype.onMessage = function(v) {
13373
- this.onMessageCallbacks.push(v);
13374
- }, d.prototype.onEnd = function(v) {
13375
- this.onEndCallbacks.push(v);
13376
- }, d.prototype.start = function(v) {
13405
+ }, d.prototype.onHeaders = function(m) {
13406
+ this.onHeadersCallbacks.push(m);
13407
+ }, d.prototype.onMessage = function(m) {
13408
+ this.onMessageCallbacks.push(m);
13409
+ }, d.prototype.onEnd = function(m) {
13410
+ this.onEndCallbacks.push(m);
13411
+ }, d.prototype.start = function(m) {
13377
13412
  if (this.started)
13378
13413
  throw new Error("Client already started - cannot .start()");
13379
13414
  this.started = !0;
13380
- var m = new u.Metadata(v || {});
13381
- m.set("content-type", "application/grpc-web+proto"), m.set("x-grpc-web", "1"), this.transport.start(m);
13382
- }, d.prototype.send = function(v) {
13415
+ var v = new u.Metadata(m || {});
13416
+ v.set("content-type", "application/grpc-web+proto"), v.set("x-grpc-web", "1"), this.transport.start(v);
13417
+ }, d.prototype.send = function(m) {
13383
13418
  if (!this.started)
13384
13419
  throw new Error("Client not started - .start() must be called before .send()");
13385
13420
  if (this.closed)
@@ -13389,8 +13424,8 @@ var __webpack_modules__ = { 37: function(t) {
13389
13424
  if (!this.methodDefinition.requestStream && this.sentFirstMessage)
13390
13425
  throw new Error("Message already sent for non-client-streaming method - cannot .send()");
13391
13426
  this.sentFirstMessage = !0;
13392
- var m = i.frameRequest(v);
13393
- this.transport.sendMessage(m);
13427
+ var v = i.frameRequest(m);
13428
+ this.transport.sendMessage(v);
13394
13429
  }, d.prototype.finishSend = function() {
13395
13430
  if (!this.started)
13396
13431
  throw new Error("Client not started - .finishSend() must be called before .close()");
@@ -13408,11 +13443,11 @@ var __webpack_modules__ = { 37: function(t) {
13408
13443
  }, d;
13409
13444
  }();
13410
13445
  function c(d) {
13411
- var v = d.get("grpc-status") || [];
13412
- if (v.length > 0)
13446
+ var m = d.get("grpc-status") || [];
13447
+ if (m.length > 0)
13413
13448
  try {
13414
- var m = v[0];
13415
- return parseInt(m, 10);
13449
+ var v = m[0];
13450
+ return parseInt(v, 10);
13416
13451
  } catch {
13417
13452
  return null;
13418
13453
  }
@@ -13448,63 +13483,63 @@ var __webpack_modules__ = { 37: function(t) {
13448
13483
  var r = o(3), i = function() {
13449
13484
  function l(c, d) {
13450
13485
  c === void 0 && (c = {}), d === void 0 && (d = { splitValues: !1 });
13451
- var v, m = this;
13486
+ var m, v = this;
13452
13487
  this.headersMap = {}, c && (typeof Headers < "u" && c instanceof Headers ? r.getHeaderKeys(c).forEach(function(y) {
13453
13488
  r.getHeaderValues(c, y).forEach(function(f) {
13454
- d.splitValues ? m.append(y, r.splitHeaderValue(f)) : m.append(y, f);
13489
+ d.splitValues ? v.append(y, r.splitHeaderValue(f)) : v.append(y, f);
13455
13490
  });
13456
- }) : typeof (v = c) == "object" && typeof v.headersMap == "object" && typeof v.forEach == "function" ? c.forEach(function(y, f) {
13457
- m.append(y, f);
13491
+ }) : typeof (m = c) == "object" && typeof m.headersMap == "object" && typeof m.forEach == "function" ? c.forEach(function(y, f) {
13492
+ v.append(y, f);
13458
13493
  }) : typeof Map < "u" && c instanceof Map ? c.forEach(function(y, f) {
13459
- m.append(f, y);
13494
+ v.append(f, y);
13460
13495
  }) : typeof c == "string" ? this.appendFromString(c) : typeof c == "object" && Object.getOwnPropertyNames(c).forEach(function(y) {
13461
13496
  var f = c[y];
13462
13497
  Array.isArray(f) ? f.forEach(function(b) {
13463
- m.append(y, b);
13464
- }) : m.append(y, f);
13498
+ v.append(y, b);
13499
+ }) : v.append(y, f);
13465
13500
  }));
13466
13501
  }
13467
13502
  return l.prototype.appendFromString = function(c) {
13468
13503
  for (var d = c.split(`\r
13469
- `), v = 0; v < d.length; v++) {
13470
- var m = d[v], y = m.indexOf(":");
13504
+ `), m = 0; m < d.length; m++) {
13505
+ var v = d[m], y = v.indexOf(":");
13471
13506
  if (y > 0) {
13472
- var f = m.substring(0, y).trim(), b = m.substring(y + 1).trim();
13507
+ var f = v.substring(0, y).trim(), b = v.substring(y + 1).trim();
13473
13508
  this.append(f, b);
13474
13509
  }
13475
13510
  }
13476
13511
  }, l.prototype.delete = function(c, d) {
13477
- var v = r.normalizeName(c);
13512
+ var m = r.normalizeName(c);
13478
13513
  if (d === void 0)
13479
- delete this.headersMap[v];
13514
+ delete this.headersMap[m];
13480
13515
  else {
13481
- var m = this.headersMap[v];
13482
- if (m) {
13483
- var y = m.indexOf(d);
13484
- y >= 0 && m.splice(y, 1), m.length === 0 && delete this.headersMap[v];
13516
+ var v = this.headersMap[m];
13517
+ if (v) {
13518
+ var y = v.indexOf(d);
13519
+ y >= 0 && v.splice(y, 1), v.length === 0 && delete this.headersMap[m];
13485
13520
  }
13486
13521
  }
13487
13522
  }, l.prototype.append = function(c, d) {
13488
- var v = this, m = r.normalizeName(c);
13489
- Array.isArray(this.headersMap[m]) || (this.headersMap[m] = []), Array.isArray(d) ? d.forEach(function(y) {
13490
- v.headersMap[m].push(r.normalizeValue(y));
13491
- }) : this.headersMap[m].push(r.normalizeValue(d));
13523
+ var m = this, v = r.normalizeName(c);
13524
+ Array.isArray(this.headersMap[v]) || (this.headersMap[v] = []), Array.isArray(d) ? d.forEach(function(y) {
13525
+ m.headersMap[v].push(r.normalizeValue(y));
13526
+ }) : this.headersMap[v].push(r.normalizeValue(d));
13492
13527
  }, l.prototype.set = function(c, d) {
13493
- var v = r.normalizeName(c);
13528
+ var m = r.normalizeName(c);
13494
13529
  if (Array.isArray(d)) {
13495
- var m = [];
13530
+ var v = [];
13496
13531
  d.forEach(function(y) {
13497
- m.push(r.normalizeValue(y));
13498
- }), this.headersMap[v] = m;
13532
+ v.push(r.normalizeValue(y));
13533
+ }), this.headersMap[m] = v;
13499
13534
  } else
13500
- this.headersMap[v] = [r.normalizeValue(d)];
13535
+ this.headersMap[m] = [r.normalizeValue(d)];
13501
13536
  }, l.prototype.has = function(c, d) {
13502
- var v = this.headersMap[r.normalizeName(c)];
13503
- if (!Array.isArray(v))
13537
+ var m = this.headersMap[r.normalizeName(c)];
13538
+ if (!Array.isArray(m))
13504
13539
  return !1;
13505
13540
  if (d !== void 0) {
13506
- var m = r.normalizeValue(d);
13507
- return v.indexOf(m) >= 0;
13541
+ var v = r.normalizeValue(d);
13542
+ return m.indexOf(v) >= 0;
13508
13543
  }
13509
13544
  return !0;
13510
13545
  }, l.prototype.get = function(c) {
@@ -13512,15 +13547,15 @@ var __webpack_modules__ = { 37: function(t) {
13512
13547
  return d !== void 0 ? d.concat() : [];
13513
13548
  }, l.prototype.forEach = function(c) {
13514
13549
  var d = this;
13515
- Object.getOwnPropertyNames(this.headersMap).forEach(function(v) {
13516
- c(v, d.headersMap[v]);
13550
+ Object.getOwnPropertyNames(this.headersMap).forEach(function(m) {
13551
+ c(m, d.headersMap[m]);
13517
13552
  }, this);
13518
13553
  }, l.prototype.toHeaders = function() {
13519
13554
  if (typeof Headers < "u") {
13520
13555
  var c = new Headers();
13521
- return this.forEach(function(d, v) {
13522
- v.forEach(function(m) {
13523
- c.append(d, m);
13556
+ return this.forEach(function(d, m) {
13557
+ m.forEach(function(v) {
13558
+ c.append(d, v);
13524
13559
  });
13525
13560
  }), c;
13526
13561
  }
@@ -13557,13 +13592,13 @@ var __webpack_modules__ = { 37: function(t) {
13557
13592
  return d && typeof d == "string" ? [d] : d;
13558
13593
  }, p.getHeaderKeys = function(i) {
13559
13594
  var l = i, c = {}, d = [];
13560
- return l.keys ? r.iterateHeadersKeys(l, function(v) {
13561
- c[v] || (c[v] = !0, d.push(v));
13562
- }) : l.forEach ? l.forEach(function(v, m) {
13563
- c[m] || (c[m] = !0, d.push(m));
13564
- }) : r.iterateHeaders(l, function(v) {
13565
- var m = v[0];
13595
+ return l.keys ? r.iterateHeadersKeys(l, function(m) {
13566
13596
  c[m] || (c[m] = !0, d.push(m));
13597
+ }) : l.forEach ? l.forEach(function(m, v) {
13598
+ c[v] || (c[v] = !0, d.push(v));
13599
+ }) : r.iterateHeaders(l, function(m) {
13600
+ var v = m[0];
13601
+ c[v] || (c[v] = !0, d.push(v));
13567
13602
  }), d;
13568
13603
  }, p.splitHeaderValue = function(i) {
13569
13604
  var l = [];
@@ -13650,149 +13685,149 @@ var __webpack_modules__ = { 37: function(t) {
13650
13685
  return typeof Response < "u" && Response.prototype.hasOwnProperty("body") && typeof Headers == "function";
13651
13686
  };
13652
13687
  }, function(e, s, n) {
13653
- var u, g = this && this.__extends || (u = function(v, m) {
13688
+ var u, g = this && this.__extends || (u = function(m, v) {
13654
13689
  return (u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(y, f) {
13655
13690
  y.__proto__ = f;
13656
13691
  } || function(y, f) {
13657
13692
  for (var b in f)
13658
13693
  f.hasOwnProperty(b) && (y[b] = f[b]);
13659
- })(v, m);
13660
- }, function(v, m) {
13694
+ })(m, v);
13695
+ }, function(m, v) {
13661
13696
  function y() {
13662
- this.constructor = v;
13697
+ this.constructor = m;
13663
13698
  }
13664
- u(v, m), v.prototype = m === null ? Object.create(m) : (y.prototype = m.prototype, new y());
13699
+ u(m, v), m.prototype = v === null ? Object.create(v) : (y.prototype = v.prototype, new y());
13665
13700
  });
13666
13701
  Object.defineProperty(s, "__esModule", { value: !0 });
13667
13702
  var p = n(0), o = n(1), r = n(11);
13668
- s.XhrTransport = function(v) {
13669
- return function(m) {
13703
+ s.XhrTransport = function(m) {
13704
+ return function(v) {
13670
13705
  if (r.detectMozXHRSupport())
13671
- return new l(m, v);
13706
+ return new l(v, m);
13672
13707
  if (r.detectXHROverrideMimeTypeSupport())
13673
- return new i(m, v);
13708
+ return new i(v, m);
13674
13709
  throw new Error("This environment's XHR implementation cannot support binary transfer.");
13675
13710
  };
13676
13711
  };
13677
13712
  var i = function() {
13678
- function v(m, y) {
13679
- this.options = m, this.init = y;
13713
+ function m(v, y) {
13714
+ this.options = v, this.init = y;
13680
13715
  }
13681
- return v.prototype.onProgressEvent = function() {
13716
+ return m.prototype.onProgressEvent = function() {
13682
13717
  this.options.debug && o.debug("XHR.onProgressEvent.length: ", this.xhr.response.length);
13683
- var m = this.xhr.response.substr(this.index);
13718
+ var v = this.xhr.response.substr(this.index);
13684
13719
  this.index = this.xhr.response.length;
13685
- var y = d(m);
13720
+ var y = d(v);
13686
13721
  this.options.onChunk(y);
13687
- }, v.prototype.onLoadEvent = function() {
13722
+ }, m.prototype.onLoadEvent = function() {
13688
13723
  this.options.debug && o.debug("XHR.onLoadEvent"), this.options.onEnd();
13689
- }, v.prototype.onStateChange = function() {
13724
+ }, m.prototype.onStateChange = function() {
13690
13725
  this.options.debug && o.debug("XHR.onStateChange", this.xhr.readyState), this.xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED && this.options.onHeaders(new p.Metadata(this.xhr.getAllResponseHeaders()), this.xhr.status);
13691
- }, v.prototype.sendMessage = function(m) {
13692
- this.xhr.send(m);
13693
- }, v.prototype.finishSend = function() {
13694
- }, v.prototype.start = function(m) {
13726
+ }, m.prototype.sendMessage = function(v) {
13727
+ this.xhr.send(v);
13728
+ }, m.prototype.finishSend = function() {
13729
+ }, m.prototype.start = function(v) {
13695
13730
  var y = this;
13696
- this.metadata = m;
13731
+ this.metadata = v;
13697
13732
  var f = new XMLHttpRequest();
13698
13733
  this.xhr = f, f.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(b, h) {
13699
13734
  f.setRequestHeader(b, h.join(", "));
13700
13735
  }), f.withCredentials = !!this.init.withCredentials, f.addEventListener("readystatechange", this.onStateChange.bind(this)), f.addEventListener("progress", this.onProgressEvent.bind(this)), f.addEventListener("loadend", this.onLoadEvent.bind(this)), f.addEventListener("error", function(b) {
13701
13736
  y.options.debug && o.debug("XHR.error", b), y.options.onEnd(b.error);
13702
13737
  });
13703
- }, v.prototype.configureXhr = function() {
13738
+ }, m.prototype.configureXhr = function() {
13704
13739
  this.xhr.responseType = "text", this.xhr.overrideMimeType("text/plain; charset=x-user-defined");
13705
- }, v.prototype.cancel = function() {
13740
+ }, m.prototype.cancel = function() {
13706
13741
  this.options.debug && o.debug("XHR.abort"), this.xhr.abort();
13707
- }, v;
13742
+ }, m;
13708
13743
  }();
13709
13744
  s.XHR = i;
13710
- var l = function(v) {
13711
- function m() {
13712
- return v !== null && v.apply(this, arguments) || this;
13745
+ var l = function(m) {
13746
+ function v() {
13747
+ return m !== null && m.apply(this, arguments) || this;
13713
13748
  }
13714
- return g(m, v), m.prototype.configureXhr = function() {
13749
+ return g(v, m), v.prototype.configureXhr = function() {
13715
13750
  this.options.debug && o.debug("MozXHR.configureXhr: setting responseType to 'moz-chunked-arraybuffer'"), this.xhr.responseType = "moz-chunked-arraybuffer";
13716
- }, m.prototype.onProgressEvent = function() {
13751
+ }, v.prototype.onProgressEvent = function() {
13717
13752
  var y = this.xhr.response;
13718
13753
  this.options.debug && o.debug("MozXHR.onProgressEvent: ", new Uint8Array(y)), this.options.onChunk(new Uint8Array(y));
13719
- }, m;
13754
+ }, v;
13720
13755
  }(i);
13721
- function c(v, m) {
13722
- var y = v.charCodeAt(m);
13756
+ function c(m, v) {
13757
+ var y = m.charCodeAt(v);
13723
13758
  if (y >= 55296 && y <= 56319) {
13724
- var f = v.charCodeAt(m + 1);
13759
+ var f = m.charCodeAt(v + 1);
13725
13760
  f >= 56320 && f <= 57343 && (y = 65536 + (y - 55296 << 10) + (f - 56320));
13726
13761
  }
13727
13762
  return y;
13728
13763
  }
13729
- function d(v) {
13730
- for (var m = new Uint8Array(v.length), y = 0, f = 0; f < v.length; f++) {
13731
- var b = String.prototype.codePointAt ? v.codePointAt(f) : c(v, f);
13732
- m[y++] = 255 & b;
13764
+ function d(m) {
13765
+ for (var v = new Uint8Array(m.length), y = 0, f = 0; f < m.length; f++) {
13766
+ var b = String.prototype.codePointAt ? m.codePointAt(f) : c(m, f);
13767
+ v[y++] = 255 & b;
13733
13768
  }
13734
- return m;
13769
+ return v;
13735
13770
  }
13736
13771
  s.MozChunkedArrayBufferXHR = l, s.stringToArrayBuffer = d;
13737
13772
  }, function(e, s, n) {
13738
13773
  Object.defineProperty(s, "__esModule", { value: !0 });
13739
13774
  var u, g = n(0);
13740
- function p(v) {
13741
- return function(m) {
13742
- return m === 9 || m === 10 || m === 13;
13743
- }(v) || v >= 32 && v <= 126;
13775
+ function p(m) {
13776
+ return function(v) {
13777
+ return v === 9 || v === 10 || v === 13;
13778
+ }(m) || m >= 32 && m <= 126;
13744
13779
  }
13745
- function o(v) {
13746
- for (var m = 0; m !== v.length; ++m)
13747
- if (!p(v[m]))
13780
+ function o(m) {
13781
+ for (var v = 0; v !== m.length; ++v)
13782
+ if (!p(m[v]))
13748
13783
  throw new Error("Metadata is not valid (printable) ASCII");
13749
- return String.fromCharCode.apply(String, Array.prototype.slice.call(v));
13784
+ return String.fromCharCode.apply(String, Array.prototype.slice.call(m));
13750
13785
  }
13751
- function r(v) {
13752
- return (128 & v.getUint8(0)) == 128;
13786
+ function r(m) {
13787
+ return (128 & m.getUint8(0)) == 128;
13753
13788
  }
13754
- function i(v) {
13755
- return v.getUint32(1, !1);
13789
+ function i(m) {
13790
+ return m.getUint32(1, !1);
13756
13791
  }
13757
- function l(v, m, y) {
13758
- return v.byteLength - m >= y;
13792
+ function l(m, v, y) {
13793
+ return m.byteLength - v >= y;
13759
13794
  }
13760
- function c(v, m, y) {
13761
- if (v.slice)
13762
- return v.slice(m, y);
13763
- var f = v.length;
13795
+ function c(m, v, y) {
13796
+ if (m.slice)
13797
+ return m.slice(v, y);
13798
+ var f = m.length;
13764
13799
  y !== void 0 && (f = y);
13765
- for (var b = new Uint8Array(f - m), h = 0, R = m; R < f; R++)
13766
- b[h++] = v[R];
13800
+ for (var b = new Uint8Array(f - v), h = 0, R = v; R < f; R++)
13801
+ b[h++] = m[R];
13767
13802
  return b;
13768
13803
  }
13769
- s.decodeASCII = o, s.encodeASCII = function(v) {
13770
- for (var m = new Uint8Array(v.length), y = 0; y !== v.length; ++y) {
13771
- var f = v.charCodeAt(y);
13804
+ s.decodeASCII = o, s.encodeASCII = function(m) {
13805
+ for (var v = new Uint8Array(m.length), y = 0; y !== m.length; ++y) {
13806
+ var f = m.charCodeAt(y);
13772
13807
  if (!p(f))
13773
13808
  throw new Error("Metadata contains invalid ASCII");
13774
- m[y] = f;
13809
+ v[y] = f;
13775
13810
  }
13776
- return m;
13777
- }, function(v) {
13778
- v[v.MESSAGE = 1] = "MESSAGE", v[v.TRAILERS = 2] = "TRAILERS";
13811
+ return v;
13812
+ }, function(m) {
13813
+ m[m.MESSAGE = 1] = "MESSAGE", m[m.TRAILERS = 2] = "TRAILERS";
13779
13814
  }(u = s.ChunkType || (s.ChunkType = {}));
13780
13815
  var d = function() {
13781
- function v() {
13816
+ function m() {
13782
13817
  this.buffer = null, this.position = 0;
13783
13818
  }
13784
- return v.prototype.parse = function(m, y) {
13785
- if (m.length === 0 && y)
13819
+ return m.prototype.parse = function(v, y) {
13820
+ if (v.length === 0 && y)
13786
13821
  return [];
13787
13822
  var f, b = [];
13788
13823
  if (this.buffer == null)
13789
- this.buffer = m, this.position = 0;
13824
+ this.buffer = v, this.position = 0;
13790
13825
  else if (this.position === this.buffer.byteLength)
13791
- this.buffer = m, this.position = 0;
13826
+ this.buffer = v, this.position = 0;
13792
13827
  else {
13793
- var h = this.buffer.byteLength - this.position, R = new Uint8Array(h + m.byteLength), O = c(this.buffer, this.position);
13828
+ var h = this.buffer.byteLength - this.position, R = new Uint8Array(h + v.byteLength), O = c(this.buffer, this.position);
13794
13829
  R.set(O, 0);
13795
- var P = new Uint8Array(m);
13830
+ var P = new Uint8Array(v);
13796
13831
  R.set(P, h), this.buffer = R, this.position = 0;
13797
13832
  }
13798
13833
  for (; ; ) {
@@ -13806,7 +13841,7 @@ var __webpack_modules__ = { 37: function(t) {
13806
13841
  return b.push({ chunkType: u.TRAILERS, trailers: (f = x, new g.Metadata(o(f))) }), b;
13807
13842
  b.push({ chunkType: u.MESSAGE, data: x });
13808
13843
  }
13809
- }, v;
13844
+ }, m;
13810
13845
  }();
13811
13846
  s.ChunkParser = d;
13812
13847
  }, function(e, s, n) {
@@ -13848,11 +13883,11 @@ var __webpack_modules__ = { 37: function(t) {
13848
13883
  };
13849
13884
  }, function(e, s, n) {
13850
13885
  Object.defineProperty(s, "__esModule", { value: !0 });
13851
- var u = n(3), g = n(4), p = n(6), o = n(12), r = n(7), i = n(5), l = n(9), c = n(13), d = n(15), v = n(2);
13852
- (function(m) {
13853
- m.setDefaultTransport = g.setDefaultTransportFactory, m.CrossBrowserHttpTransport = i.CrossBrowserHttpTransport, m.FetchReadableStreamTransport = p.FetchReadableStreamTransport, m.XhrTransport = r.XhrTransport, m.WebsocketTransport = o.WebsocketTransport, m.Code = l.Code, m.Metadata = u.BrowserHeaders, m.client = function(y, f) {
13854
- return v.client(y, f);
13855
- }, m.invoke = c.invoke, m.unary = d.unary;
13886
+ var u = n(3), g = n(4), p = n(6), o = n(12), r = n(7), i = n(5), l = n(9), c = n(13), d = n(15), m = n(2);
13887
+ (function(v) {
13888
+ v.setDefaultTransport = g.setDefaultTransportFactory, v.CrossBrowserHttpTransport = i.CrossBrowserHttpTransport, v.FetchReadableStreamTransport = p.FetchReadableStreamTransport, v.XhrTransport = r.XhrTransport, v.WebsocketTransport = o.WebsocketTransport, v.Code = l.Code, v.Metadata = u.BrowserHeaders, v.client = function(y, f) {
13889
+ return m.client(y, f);
13890
+ }, v.invoke = c.invoke, v.unary = d.unary;
13856
13891
  })(s.grpc || (s.grpc = {}));
13857
13892
  }, function(e, s, n) {
13858
13893
  var u;
@@ -13893,33 +13928,33 @@ var __webpack_modules__ = { 37: function(t) {
13893
13928
  return function(r) {
13894
13929
  return function(i) {
13895
13930
  i.debug && g.debug("websocketRequest", i);
13896
- var l, c = function(m) {
13897
- if (m.substr(0, 8) === "https://")
13898
- return "wss://" + m.substr(8);
13899
- if (m.substr(0, 7) === "http://")
13900
- return "ws://" + m.substr(7);
13931
+ var l, c = function(v) {
13932
+ if (v.substr(0, 8) === "https://")
13933
+ return "wss://" + v.substr(8);
13934
+ if (v.substr(0, 7) === "http://")
13935
+ return "ws://" + v.substr(7);
13901
13936
  throw new Error("Websocket transport constructed with non-https:// or http:// host.");
13902
13937
  }(i.url), d = [];
13903
- function v(m) {
13904
- if (m === u.FINISH_SEND)
13938
+ function m(v) {
13939
+ if (v === u.FINISH_SEND)
13905
13940
  l.send(o);
13906
13941
  else {
13907
- var y = m, f = new Int8Array(y.byteLength + 1);
13942
+ var y = v, f = new Int8Array(y.byteLength + 1);
13908
13943
  f.set(new Uint8Array([0])), f.set(y, 1), l.send(f);
13909
13944
  }
13910
13945
  }
13911
- return { sendMessage: function(m) {
13912
- l && l.readyState !== l.CONNECTING ? v(m) : d.push(m);
13946
+ return { sendMessage: function(v) {
13947
+ l && l.readyState !== l.CONNECTING ? m(v) : d.push(v);
13913
13948
  }, finishSend: function() {
13914
- l && l.readyState !== l.CONNECTING ? v(u.FINISH_SEND) : d.push(u.FINISH_SEND);
13915
- }, start: function(m) {
13949
+ l && l.readyState !== l.CONNECTING ? m(u.FINISH_SEND) : d.push(u.FINISH_SEND);
13950
+ }, start: function(v) {
13916
13951
  (l = new WebSocket(c, ["grpc-websockets"])).binaryType = "arraybuffer", l.onopen = function() {
13917
13952
  var y;
13918
- i.debug && g.debug("websocketRequest.onopen"), l.send((y = "", m.forEach(function(f, b) {
13953
+ i.debug && g.debug("websocketRequest.onopen"), l.send((y = "", v.forEach(function(f, b) {
13919
13954
  y += f + ": " + b.join(", ") + `\r
13920
13955
  `;
13921
13956
  }), p.encodeASCII(y))), d.forEach(function(f) {
13922
- v(f);
13957
+ m(f);
13923
13958
  });
13924
13959
  }, l.onclose = function(y) {
13925
13960
  i.debug && g.debug("websocketRequest.onclose", y), i.onEnd();
@@ -13963,8 +13998,8 @@ var __webpack_modules__ = { 37: function(t) {
13963
13998
  r = c;
13964
13999
  }), l.onMessage(function(c) {
13965
14000
  i = c;
13966
- }), l.onEnd(function(c, d, v) {
13967
- o.onEnd({ status: c, statusMessage: d, headers: r || new u.Metadata(), message: i, trailers: v });
14001
+ }), l.onEnd(function(c, d, m) {
14002
+ o.onEnd({ status: c, statusMessage: d, headers: r || new u.Metadata(), message: i, trailers: m });
13968
14003
  }), l.start(o.metadata), l.send(o.request), l.finishSend(), { close: function() {
13969
14004
  l.close();
13970
14005
  } };
@@ -20179,67 +20214,67 @@ var __webpack_modules__ = { 37: function(t) {
20179
20214
  }, 138: (t, e, s) => {
20180
20215
  Object.defineProperty(e, "__esModule", { value: !0 }), e.ClientChannel = void 0;
20181
20216
  var n = s(655), u = s(662), g = s(417), p = s(758), o = s(210), r = function(l) {
20182
- function c(d, v) {
20183
- var m = l.call(this, d, v) || this;
20184
- return Object.defineProperty(m, "streamIDCounter", { enumerable: !0, configurable: !0, writable: !0, value: 0 }), Object.defineProperty(m, "streams", { enumerable: !0, configurable: !0, writable: !0, value: {} }), v.onmessage = function(y) {
20185
- return m.onChannelMessage(y);
20217
+ function c(d, m) {
20218
+ var v = l.call(this, d, m) || this;
20219
+ return Object.defineProperty(v, "streamIDCounter", { enumerable: !0, configurable: !0, writable: !0, value: 0 }), Object.defineProperty(v, "streams", { enumerable: !0, configurable: !0, writable: !0, value: {} }), m.onmessage = function(y) {
20220
+ return v.onChannelMessage(y);
20186
20221
  }, d.addEventListener("iceconnectionstatechange", function() {
20187
20222
  var y = d.iceConnectionState;
20188
- y !== "failed" && y !== "disconnected" && y !== "closed" || m.onConnectionTerminated();
20189
- }), v.addEventListener("close", function() {
20190
- return m.onConnectionTerminated();
20191
- }), m;
20223
+ y !== "failed" && y !== "disconnected" && y !== "closed" || v.onConnectionTerminated();
20224
+ }), m.addEventListener("close", function() {
20225
+ return v.onConnectionTerminated();
20226
+ }), v;
20192
20227
  }
20193
20228
  return n.__extends(c, l), Object.defineProperty(c.prototype, "transportFactory", { enumerable: !1, configurable: !0, writable: !0, value: function() {
20194
20229
  var d = this;
20195
- return function(v) {
20196
- return d.newStream(d.nextStreamID(), v);
20230
+ return function(m) {
20231
+ return d.newStream(d.nextStreamID(), m);
20197
20232
  };
20198
20233
  } }), Object.defineProperty(c.prototype, "onConnectionTerminated", { enumerable: !1, configurable: !0, writable: !0, value: function() {
20199
20234
  this.closeWithReason(new p.ConnectionClosedError("data channel closed"));
20200
20235
  var d = new p.ConnectionClosedError("connection terminated");
20201
- for (var v in this.streams)
20202
- this.streams[v].cs.closeWithRecvError(d);
20236
+ for (var m in this.streams)
20237
+ this.streams[m].cs.closeWithRecvError(d);
20203
20238
  } }), Object.defineProperty(c.prototype, "onChannelMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(d) {
20204
- var v;
20239
+ var m;
20205
20240
  try {
20206
- v = o.Response.deserializeBinary(d.data);
20241
+ m = o.Response.deserializeBinary(d.data);
20207
20242
  } catch (b) {
20208
20243
  return void console.error("error deserializing message", b);
20209
20244
  }
20210
- var m = v.getStream();
20211
- if (m !== void 0) {
20212
- var y = m.getId(), f = this.streams[y];
20213
- f !== void 0 ? f.cs.onResponse(v) : console.error("no stream for id; discarding", "id", y);
20245
+ var v = m.getStream();
20246
+ if (v !== void 0) {
20247
+ var y = v.getId(), f = this.streams[y];
20248
+ f !== void 0 ? f.cs.onResponse(m) : console.error("no stream for id; discarding", "id", y);
20214
20249
  } else
20215
20250
  console.error("no stream id; discarding");
20216
20251
  } }), Object.defineProperty(c.prototype, "nextStreamID", { enumerable: !1, configurable: !0, writable: !0, value: function() {
20217
20252
  var d = new o.Stream();
20218
20253
  return d.setId(this.streamIDCounter++), d;
20219
- } }), Object.defineProperty(c.prototype, "newStream", { enumerable: !1, configurable: !0, writable: !0, value: function(d, v) {
20220
- var m = this;
20254
+ } }), Object.defineProperty(c.prototype, "newStream", { enumerable: !1, configurable: !0, writable: !0, value: function(d, m) {
20255
+ var v = this;
20221
20256
  if (this.isClosed())
20222
- return new i(new p.ConnectionClosedError("connection closed"), v);
20257
+ return new i(new p.ConnectionClosedError("connection closed"), m);
20223
20258
  var y = this.streams[d.getId()];
20224
20259
  if (y === void 0) {
20225
20260
  if (Object.keys(this.streams).length > 256)
20226
- return new i(new Error("stream limit hit"), v);
20261
+ return new i(new Error("stream limit hit"), m);
20227
20262
  y = { cs: new g.ClientStream(this, d, function(f) {
20228
- return m.removeStreamByID(f);
20229
- }, v) }, this.streams[d.getId()] = y;
20263
+ return v.removeStreamByID(f);
20264
+ }, m) }, this.streams[d.getId()] = y;
20230
20265
  }
20231
20266
  return y.cs;
20232
20267
  } }), Object.defineProperty(c.prototype, "removeStreamByID", { enumerable: !1, configurable: !0, writable: !0, value: function(d) {
20233
20268
  delete this.streams[d];
20234
- } }), Object.defineProperty(c.prototype, "writeHeaders", { enumerable: !1, configurable: !0, writable: !0, value: function(d, v) {
20235
- var m = new o.Request();
20236
- m.setStream(d), m.setHeaders(v), this.write(m);
20237
- } }), Object.defineProperty(c.prototype, "writeMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(d, v) {
20238
- var m = new o.Request();
20239
- m.setStream(d), m.setMessage(v), this.write(m);
20240
- } }), Object.defineProperty(c.prototype, "writeReset", { enumerable: !1, configurable: !0, writable: !0, value: function(d) {
20269
+ } }), Object.defineProperty(c.prototype, "writeHeaders", { enumerable: !1, configurable: !0, writable: !0, value: function(d, m) {
20241
20270
  var v = new o.Request();
20242
- v.setStream(d), v.setRstStream(!0), this.write(v);
20271
+ v.setStream(d), v.setHeaders(m), this.write(v);
20272
+ } }), Object.defineProperty(c.prototype, "writeMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(d, m) {
20273
+ var v = new o.Request();
20274
+ v.setStream(d), v.setMessage(m), this.write(v);
20275
+ } }), Object.defineProperty(c.prototype, "writeReset", { enumerable: !1, configurable: !0, writable: !0, value: function(d) {
20276
+ var m = new o.Request();
20277
+ m.setStream(d), m.setRstStream(!0), this.write(m);
20243
20278
  } }), c;
20244
20279
  }(u.BaseChannel);
20245
20280
  e.ClientChannel = r;
@@ -20260,74 +20295,74 @@ var __webpack_modules__ = { 37: function(t) {
20260
20295
  }, 417: (t, e, s) => {
20261
20296
  Object.defineProperty(e, "__esModule", { value: !0 }), e.encodeASCII = e.ClientStream = void 0;
20262
20297
  var n = s(655), u = s(37), g = s(370), p = s(758), o = s(210), r = function(d) {
20263
- function v(m, y, f, b) {
20298
+ function m(v, y, f, b) {
20264
20299
  var h = d.call(this, y, f, b) || this;
20265
- return Object.defineProperty(h, "channel", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(h, "headersReceived", { enumerable: !0, configurable: !0, writable: !0, value: !1 }), Object.defineProperty(h, "trailersReceived", { enumerable: !0, configurable: !0, writable: !0, value: !1 }), h.channel = m, h;
20300
+ return Object.defineProperty(h, "channel", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(h, "headersReceived", { enumerable: !0, configurable: !0, writable: !0, value: !1 }), Object.defineProperty(h, "trailersReceived", { enumerable: !0, configurable: !0, writable: !0, value: !1 }), h.channel = v, h;
20266
20301
  }
20267
- return n.__extends(v, d), Object.defineProperty(v.prototype, "start", { enumerable: !1, configurable: !0, writable: !0, value: function(m) {
20302
+ return n.__extends(m, d), Object.defineProperty(m.prototype, "start", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
20268
20303
  var y = "/".concat(this.opts.methodDefinition.service.serviceName, "/").concat(this.opts.methodDefinition.methodName), f = new o.RequestHeaders();
20269
- f.setMethod(y), f.setMetadata(l(m));
20304
+ f.setMethod(y), f.setMetadata(l(v));
20270
20305
  try {
20271
20306
  this.channel.writeHeaders(this.stream, f);
20272
20307
  } catch (b) {
20273
20308
  console.error("error writing headers", b), this.closeWithRecvError(b);
20274
20309
  }
20275
- } }), Object.defineProperty(v.prototype, "sendMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(m) {
20276
- m ? this.writeMessage(!1, m.slice(5)) : this.writeMessage(!1, void 0);
20277
- } }), Object.defineProperty(v.prototype, "resetStream", { enumerable: !1, configurable: !0, writable: !0, value: function() {
20310
+ } }), Object.defineProperty(m.prototype, "sendMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
20311
+ v ? this.writeMessage(!1, v.slice(5)) : this.writeMessage(!1, void 0);
20312
+ } }), Object.defineProperty(m.prototype, "resetStream", { enumerable: !1, configurable: !0, writable: !0, value: function() {
20278
20313
  try {
20279
20314
  this.channel.writeReset(this.stream);
20280
- } catch (m) {
20281
- console.error("error writing reset", m), this.closeWithRecvError(m);
20315
+ } catch (v) {
20316
+ console.error("error writing reset", v), this.closeWithRecvError(v);
20282
20317
  }
20283
- } }), Object.defineProperty(v.prototype, "finishSend", { enumerable: !1, configurable: !0, writable: !0, value: function() {
20318
+ } }), Object.defineProperty(m.prototype, "finishSend", { enumerable: !1, configurable: !0, writable: !0, value: function() {
20284
20319
  this.opts.methodDefinition.requestStream && this.writeMessage(!0, void 0);
20285
- } }), Object.defineProperty(v.prototype, "cancel", { enumerable: !1, configurable: !0, writable: !0, value: function() {
20320
+ } }), Object.defineProperty(m.prototype, "cancel", { enumerable: !1, configurable: !0, writable: !0, value: function() {
20286
20321
  this.closed || this.resetStream();
20287
- } }), Object.defineProperty(v.prototype, "writeMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(m, y) {
20322
+ } }), Object.defineProperty(m.prototype, "writeMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(v, y) {
20288
20323
  try {
20289
20324
  if (!y || y.length == 0)
20290
- return (f = new o.PacketMessage()).setEom(!0), (b = new o.RequestMessage()).setHasMessage(!!y), b.setPacketMessage(f), b.setEos(m), void this.channel.writeMessage(this.stream, b);
20325
+ return (f = new o.PacketMessage()).setEom(!0), (b = new o.RequestMessage()).setHasMessage(!!y), b.setPacketMessage(f), b.setEos(v), void this.channel.writeMessage(this.stream, b);
20291
20326
  for (; y.length !== 0; ) {
20292
20327
  var f, b, h = Math.min(y.length, 16373);
20293
- (f = new o.PacketMessage()).setData(y.slice(0, h)), (y = y.slice(h)).length === 0 && f.setEom(!0), (b = new o.RequestMessage()).setHasMessage(!!y), b.setPacketMessage(f), b.setEos(m), this.channel.writeMessage(this.stream, b);
20328
+ (f = new o.PacketMessage()).setData(y.slice(0, h)), (y = y.slice(h)).length === 0 && f.setEom(!0), (b = new o.RequestMessage()).setHasMessage(!!y), b.setPacketMessage(f), b.setEos(v), this.channel.writeMessage(this.stream, b);
20294
20329
  }
20295
20330
  } catch (R) {
20296
20331
  console.error("error writing message", R), this.closeWithRecvError(R);
20297
20332
  }
20298
- } }), Object.defineProperty(v.prototype, "onResponse", { enumerable: !1, configurable: !0, writable: !0, value: function(m) {
20299
- switch (m.getTypeCase()) {
20333
+ } }), Object.defineProperty(m.prototype, "onResponse", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
20334
+ switch (v.getTypeCase()) {
20300
20335
  case o.Response.TypeCase.HEADERS:
20301
20336
  if (this.headersReceived)
20302
20337
  return void this.closeWithRecvError(new Error("headers already received"));
20303
20338
  if (this.trailersReceived)
20304
20339
  return void this.closeWithRecvError(new Error("headers received after trailers"));
20305
- this.processHeaders(m.getHeaders());
20340
+ this.processHeaders(v.getHeaders());
20306
20341
  break;
20307
20342
  case o.Response.TypeCase.MESSAGE:
20308
20343
  if (!this.headersReceived)
20309
20344
  return void this.closeWithRecvError(new Error("headers not yet received"));
20310
20345
  if (this.trailersReceived)
20311
20346
  return void this.closeWithRecvError(new Error("headers received after trailers"));
20312
- this.processMessage(m.getMessage());
20347
+ this.processMessage(v.getMessage());
20313
20348
  break;
20314
20349
  case o.Response.TypeCase.TRAILERS:
20315
- this.processTrailers(m.getTrailers());
20350
+ this.processTrailers(v.getTrailers());
20316
20351
  break;
20317
20352
  default:
20318
- console.error("unknown response type", m.getTypeCase());
20353
+ console.error("unknown response type", v.getTypeCase());
20319
20354
  }
20320
- } }), Object.defineProperty(v.prototype, "processHeaders", { enumerable: !1, configurable: !0, writable: !0, value: function(m) {
20321
- this.headersReceived = !0, this.opts.onHeaders(c(m.getMetadata()), 200);
20322
- } }), Object.defineProperty(v.prototype, "processMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(m) {
20323
- var y = d.prototype.processPacketMessage.call(this, m.getPacketMessage());
20355
+ } }), Object.defineProperty(m.prototype, "processHeaders", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
20356
+ this.headersReceived = !0, this.opts.onHeaders(c(v.getMetadata()), 200);
20357
+ } }), Object.defineProperty(m.prototype, "processMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
20358
+ var y = d.prototype.processPacketMessage.call(this, v.getPacketMessage());
20324
20359
  if (y) {
20325
20360
  var f = new ArrayBuffer(y.length + 5);
20326
20361
  new DataView(f, 1, 4).setUint32(0, y.length, !1), new Uint8Array(f, 5).set(y), this.opts.onChunk(new Uint8Array(f));
20327
20362
  }
20328
- } }), Object.defineProperty(v.prototype, "processTrailers", { enumerable: !1, configurable: !0, writable: !0, value: function(m) {
20363
+ } }), Object.defineProperty(m.prototype, "processTrailers", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
20329
20364
  this.trailersReceived = !0;
20330
- var y, f, b = c(m.getMetadata()), h = m.getStatus();
20365
+ var y, f, b = c(v.getMetadata()), h = v.getStatus();
20331
20366
  h ? (y = h.getCode(), f = h.getMessage(), b.set("grpc-status", "".concat(h.getCode())), f !== void 0 && b.set("grpc-message", h.getMessage())) : (y = 0, b.set("grpc-status", "0"), f = "");
20332
20367
  var R = function(P) {
20333
20368
  var D = "";
@@ -20337,12 +20372,12 @@ var __webpack_modules__ = { 37: function(t) {
20337
20372
  }), i(D);
20338
20373
  }(b), O = new ArrayBuffer(R.length + 5);
20339
20374
  new DataView(O, 0, 1).setUint8(0, 128), new DataView(O, 1, 4).setUint32(0, R.length, !1), new Uint8Array(O, 5).set(R), this.opts.onChunk(new Uint8Array(O)), y !== 0 ? this.closeWithRecvError(new p.GRPCError(y, f)) : this.closeWithRecvError();
20340
- } }), v;
20375
+ } }), m;
20341
20376
  }(g.BaseStream);
20342
20377
  function i(d) {
20343
- for (var v, m, y = new Uint8Array(d.length), f = 0; f !== d.length; ++f) {
20378
+ for (var m, v, y = new Uint8Array(d.length), f = 0; f !== d.length; ++f) {
20344
20379
  var b = d.charCodeAt(f);
20345
- if (!((v = m = b) === 9 || v === 10 || v === 13 || m >= 32 && m <= 126))
20380
+ if (!((m = v = b) === 9 || m === 10 || m === 13 || v >= 32 && v <= 126))
20346
20381
  throw new Error("Metadata contains invalid ASCII");
20347
20382
  y[f] = b;
20348
20383
  }
@@ -20351,23 +20386,23 @@ var __webpack_modules__ = { 37: function(t) {
20351
20386
  e.ClientStream = r, e.encodeASCII = i;
20352
20387
  var l = function(d) {
20353
20388
  if (d) {
20354
- var v = new o.Metadata(), m = v.getMdMap();
20389
+ var m = new o.Metadata(), v = m.getMdMap();
20355
20390
  if (d.forEach(function(y, f) {
20356
20391
  var b = new o.Strings();
20357
- b.setValuesList(f), m.set(y, b);
20358
- }), v.getMdMap().getLength() !== 0)
20359
- return v;
20392
+ b.setValuesList(f), v.set(y, b);
20393
+ }), m.getMdMap().getLength() !== 0)
20394
+ return m;
20360
20395
  }
20361
20396
  }, c = function(d) {
20362
- var v = new u.grpc.Metadata();
20363
- return d && d.getMdMap().forEach(function(m, y) {
20364
- return v.append(y, m.getValuesList());
20365
- }), v;
20397
+ var m = new u.grpc.Metadata();
20398
+ return d && d.getMdMap().forEach(function(v, y) {
20399
+ return m.append(y, v.getValuesList());
20400
+ }), m;
20366
20401
  };
20367
20402
  }, 512: (t, e, s) => {
20368
20403
  Object.defineProperty(e, "__esModule", { value: !0 }), e.dialWebRTC = e.dialDirect = void 0;
20369
- var n = s(655), u = s(37), g = s(138), p = s(758), o = s(743), r = s(34), i = s(165), l = s(400), c = s(982), d = s(958), v = s(93);
20370
- function m(h, R) {
20404
+ var n = s(655), u = s(37), g = s(138), p = s(758), o = s(743), r = s(34), i = s(165), l = s(400), c = s(982), d = s(958), m = s(93);
20405
+ function v(h, R) {
20371
20406
  return n.__awaiter(this, void 0, void 0, function() {
20372
20407
  var O, P;
20373
20408
  return n.__generator(this, function(D) {
@@ -20426,7 +20461,7 @@ var __webpack_modules__ = { 37: function(t) {
20426
20461
  });
20427
20462
  });
20428
20463
  }
20429
- e.dialDirect = m;
20464
+ e.dialDirect = v;
20430
20465
  var f = function() {
20431
20466
  function h(R, O, P) {
20432
20467
  Object.defineProperty(this, "opts", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "transport", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "extraMetadata", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), this.opts = R, this.extraMetadata = P, this.transport = O(R);
@@ -20475,11 +20510,11 @@ var __webpack_modules__ = { 37: function(t) {
20475
20510
  return n.__generator(this, function(J) {
20476
20511
  switch (J.label) {
20477
20512
  case 0:
20478
- return b(O), W = O?.webrtcOptions, [4, (0, v.newPeerConnectionForClient)(W !== void 0 && W.disableTrickleICE, W?.rtcConfig)];
20513
+ return b(O), W = O?.webrtcOptions, [4, (0, m.newPeerConnectionForClient)(W !== void 0 && W.disableTrickleICE, W?.rtcConfig)];
20479
20514
  case 1:
20480
20515
  X = J.sent(), S = X.pc, M = X.dc, _ = !1, J.label = 2;
20481
20516
  case 2:
20482
- return J.trys.push([2, , 9, 10]), E = O, O && (E = n.__assign({}, O), O.accessToken || (E.authEntity = (P = O?.webrtcOptions) === null || P === void 0 ? void 0 : P.signalingAuthEntity, E.authEntity || (E.externalAuthAddress ? E.authEntity = (D = O.externalAuthAddress) === null || D === void 0 ? void 0 : D.replace(/^(.*:\/\/)/, "") : E.authEntity = h.replace(/^(.*:\/\/)/, "")), E.credentials = (G = O?.webrtcOptions) === null || G === void 0 ? void 0 : G.signalingCredentials, E.accessToken = (z = O?.webrtcOptions) === null || z === void 0 ? void 0 : z.signalingAccessToken), E.externalAuthAddress = (x = O?.webrtcOptions) === null || x === void 0 ? void 0 : x.signalingExternalAuthAddress, E.externalAuthToEntity = (L = O?.webrtcOptions) === null || L === void 0 ? void 0 : L.signalingExternalAuthToEntity), [4, m(h, E)];
20517
+ return J.trys.push([2, , 9, 10]), E = O, O && (E = n.__assign({}, O), O.accessToken || (E.authEntity = (P = O?.webrtcOptions) === null || P === void 0 ? void 0 : P.signalingAuthEntity, E.authEntity || (E.externalAuthAddress ? E.authEntity = (D = O.externalAuthAddress) === null || D === void 0 ? void 0 : D.replace(/^(.*:\/\/)/, "") : E.authEntity = h.replace(/^(.*:\/\/)/, "")), E.credentials = (G = O?.webrtcOptions) === null || G === void 0 ? void 0 : G.signalingCredentials, E.accessToken = (z = O?.webrtcOptions) === null || z === void 0 ? void 0 : z.signalingAccessToken), E.externalAuthAddress = (x = O?.webrtcOptions) === null || x === void 0 ? void 0 : x.signalingExternalAuthAddress, E.externalAuthToEntity = (L = O?.webrtcOptions) === null || L === void 0 ? void 0 : L.signalingExternalAuthToEntity), [4, v(h, E)];
20483
20518
  case 3:
20484
20519
  return F = J.sent(), T = u.grpc.client(d.SignalingService.Call, { host: h, transport: F }), w = "", C = !1, j = function(q) {
20485
20520
  if (!C) {
@@ -20602,7 +20637,7 @@ var __webpack_modules__ = { 37: function(t) {
20602
20637
  var n = s(655);
20603
20638
  e.newPeerConnectionForClient = function(u, g) {
20604
20639
  return n.__awaiter(this, void 0, void 0, function() {
20605
- var p, o, r, i, l, c, d, v, m = this;
20640
+ var p, o, r, i, l, c, d, m, v = this;
20606
20641
  return n.__generator(this, function(y) {
20607
20642
  switch (y.label) {
20608
20643
  case 0:
@@ -20611,7 +20646,7 @@ var __webpack_modules__ = { 37: function(t) {
20611
20646
  }), (i = p.createDataChannel("data", { id: 0, negotiated: !0, ordered: !0 })).binaryType = "arraybuffer", (l = p.createDataChannel("negotiation", { id: 1, negotiated: !0, ordered: !0 })).binaryType = "arraybuffer", c = !1, l.onopen = function() {
20612
20647
  c = !0;
20613
20648
  }, l.onmessage = function(f) {
20614
- return n.__awaiter(m, void 0, void 0, function() {
20649
+ return n.__awaiter(v, void 0, void 0, function() {
20615
20650
  var b, h;
20616
20651
  return n.__generator(this, function(R) {
20617
20652
  switch (R.label) {
@@ -20631,7 +20666,7 @@ var __webpack_modules__ = { 37: function(t) {
20631
20666
  });
20632
20667
  });
20633
20668
  }, p.onnegotiationneeded = function() {
20634
- return n.__awaiter(m, void 0, void 0, function() {
20669
+ return n.__awaiter(v, void 0, void 0, function() {
20635
20670
  var f;
20636
20671
  return n.__generator(this, function(b) {
20637
20672
  switch (b.label) {
@@ -20658,10 +20693,10 @@ var __webpack_modules__ = { 37: function(t) {
20658
20693
  case 3:
20659
20694
  return y.sent(), [3, 5];
20660
20695
  case 4:
20661
- return v = y.sent(), [2, Promise.reject(v)];
20696
+ return m = y.sent(), [2, Promise.reject(m)];
20662
20697
  case 5:
20663
20698
  return p.onicecandidate = function(f) {
20664
- return n.__awaiter(m, void 0, void 0, function() {
20699
+ return n.__awaiter(v, void 0, void 0, function() {
20665
20700
  return n.__generator(this, function(b) {
20666
20701
  return f.candidate !== null || o({ pc: p, dc: i }), [2];
20667
20702
  });
@@ -20672,7 +20707,7 @@ var __webpack_modules__ = { 37: function(t) {
20672
20707
  });
20673
20708
  };
20674
20709
  }, 655: (t, e, s) => {
20675
- s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => P, __asyncGenerator: () => O, __asyncValues: () => D, __await: () => R, __awaiter: () => l, __classPrivateFieldGet: () => k, __classPrivateFieldIn: () => X, __classPrivateFieldSet: () => W, __createBinding: () => d, __decorate: () => o, __exportStar: () => v, __extends: () => u, __generator: () => c, __importDefault: () => L, __importStar: () => x, __makeTemplateObject: () => G, __metadata: () => i, __param: () => r, __read: () => y, __rest: () => p, __spread: () => f, __spreadArray: () => h, __spreadArrays: () => b, __values: () => m });
20710
+ s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => P, __asyncGenerator: () => O, __asyncValues: () => D, __await: () => R, __awaiter: () => l, __classPrivateFieldGet: () => k, __classPrivateFieldIn: () => X, __classPrivateFieldSet: () => W, __createBinding: () => d, __decorate: () => o, __exportStar: () => m, __extends: () => u, __generator: () => c, __importDefault: () => L, __importStar: () => x, __makeTemplateObject: () => G, __metadata: () => i, __param: () => r, __read: () => y, __rest: () => p, __spread: () => f, __spreadArray: () => h, __spreadArrays: () => b, __values: () => v });
20676
20711
  var n = function(S, M) {
20677
20712
  return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_, E) {
20678
20713
  _.__proto__ = E;
@@ -20824,11 +20859,11 @@ var __webpack_modules__ = { 37: function(t) {
20824
20859
  } : function(S, M, _, E) {
20825
20860
  E === void 0 && (E = _), S[E] = M[_];
20826
20861
  };
20827
- function v(S, M) {
20862
+ function m(S, M) {
20828
20863
  for (var _ in S)
20829
20864
  _ === "default" || Object.prototype.hasOwnProperty.call(M, _) || d(M, S, _);
20830
20865
  }
20831
- function m(S) {
20866
+ function v(S) {
20832
20867
  var M = typeof Symbol == "function" && Symbol.iterator, _ = M && S[M], E = 0;
20833
20868
  if (_)
20834
20869
  return _.call(S);
@@ -20930,7 +20965,7 @@ var __webpack_modules__ = { 37: function(t) {
20930
20965
  if (!Symbol.asyncIterator)
20931
20966
  throw new TypeError("Symbol.asyncIterator is not defined.");
20932
20967
  var M, _ = S[Symbol.asyncIterator];
20933
- return _ ? _.call(S) : (S = m(S), M = {}, E("next"), E("throw"), E("return"), M[Symbol.asyncIterator] = function() {
20968
+ return _ ? _.call(S) : (S = v(S), M = {}, E("next"), E("throw"), E("return"), M[Symbol.asyncIterator] = function() {
20934
20969
  return this;
20935
20970
  }, M);
20936
20971
  function E(F) {
@@ -21441,13 +21476,13 @@ var __webpack_modules__ = { 37: function(t) {
21441
21476
  }
21442
21477
  g.Authenticate = { methodName: "Authenticate", service: g, requestStream: !1, responseStream: !1, requestType: n.AuthenticateRequest, responseType: n.AuthenticateResponse }, e.AuthService = g, p.prototype.authenticate = function(i, l, c) {
21443
21478
  arguments.length === 2 && (c = arguments[1]);
21444
- var d = u.unary(g.Authenticate, { request: i, host: this.serviceHost, metadata: l, transport: this.options.transport, debug: this.options.debug, onEnd: function(v) {
21479
+ var d = u.unary(g.Authenticate, { request: i, host: this.serviceHost, metadata: l, transport: this.options.transport, debug: this.options.debug, onEnd: function(m) {
21445
21480
  if (c)
21446
- if (v.status !== u.Code.OK) {
21447
- var m = new Error(v.statusMessage);
21448
- m.code = v.status, m.metadata = v.trailers, c(m, null);
21481
+ if (m.status !== u.Code.OK) {
21482
+ var v = new Error(m.statusMessage);
21483
+ v.code = m.status, v.metadata = m.trailers, c(v, null);
21449
21484
  } else
21450
- c(null, v.message);
21485
+ c(null, m.message);
21451
21486
  } });
21452
21487
  return { cancel: function() {
21453
21488
  c = null, d.close();
@@ -21463,13 +21498,13 @@ var __webpack_modules__ = { 37: function(t) {
21463
21498
  }
21464
21499
  o.AuthenticateTo = { methodName: "AuthenticateTo", service: o, requestStream: !1, responseStream: !1, requestType: n.AuthenticateToRequest, responseType: n.AuthenticateToResponse }, e.ExternalAuthService = o, r.prototype.authenticateTo = function(i, l, c) {
21465
21500
  arguments.length === 2 && (c = arguments[1]);
21466
- var d = u.unary(o.AuthenticateTo, { request: i, host: this.serviceHost, metadata: l, transport: this.options.transport, debug: this.options.debug, onEnd: function(v) {
21501
+ var d = u.unary(o.AuthenticateTo, { request: i, host: this.serviceHost, metadata: l, transport: this.options.transport, debug: this.options.debug, onEnd: function(m) {
21467
21502
  if (c)
21468
- if (v.status !== u.Code.OK) {
21469
- var m = new Error(v.statusMessage);
21470
- m.code = v.status, m.metadata = v.trailers, c(m, null);
21503
+ if (m.status !== u.Code.OK) {
21504
+ var v = new Error(m.statusMessage);
21505
+ v.code = m.status, v.metadata = m.trailers, c(v, null);
21471
21506
  } else
21472
- c(null, v.message);
21507
+ c(null, m.message);
21473
21508
  } });
21474
21509
  return { cancel: function() {
21475
21510
  c = null, d.close();
@@ -22830,11 +22865,11 @@ var __webpack_modules__ = { 37: function(t) {
22830
22865
  i.data.forEach(function(d) {
22831
22866
  d(c);
22832
22867
  });
22833
- }, onEnd: function(c, d, v) {
22834
- i.status.forEach(function(m) {
22835
- m({ code: c, details: d, metadata: v });
22836
- }), i.end.forEach(function(m) {
22837
- m({ code: c, details: d, metadata: v });
22868
+ }, onEnd: function(c, d, m) {
22869
+ i.status.forEach(function(v) {
22870
+ v({ code: c, details: d, metadata: m });
22871
+ }), i.end.forEach(function(v) {
22872
+ v({ code: c, details: d, metadata: m });
22838
22873
  }), i = null;
22839
22874
  } });
22840
22875
  return { on: function(c, d) {
@@ -22858,10 +22893,10 @@ var __webpack_modules__ = { 37: function(t) {
22858
22893
  }, p.prototype.answer = function(o) {
22859
22894
  var r = { data: [], end: [], status: [] }, i = u.client(g.Answer, { host: this.serviceHost, metadata: o, transport: this.options.transport });
22860
22895
  return i.onEnd(function(l, c, d) {
22861
- r.status.forEach(function(v) {
22862
- v({ code: l, details: c, metadata: d });
22863
- }), r.end.forEach(function(v) {
22864
- v({ code: l, details: c, metadata: d });
22896
+ r.status.forEach(function(m) {
22897
+ m({ code: l, details: c, metadata: d });
22898
+ }), r.end.forEach(function(m) {
22899
+ m({ code: l, details: c, metadata: d });
22865
22900
  }), r = null;
22866
22901
  }), i.onMessage(function(l) {
22867
22902
  r.data.forEach(function(c) {
@@ -39186,23 +39221,13 @@ class ArmClient {
39186
39221
  const g = (await promisify(s.getEndPosition.bind(s), n)).getPose();
39187
39222
  if (!g)
39188
39223
  throw new Error("no pose");
39189
- return {
39190
- x: g.getX(),
39191
- y: g.getY(),
39192
- z: g.getZ(),
39193
- ox: g.getOX(),
39194
- oy: g.getOY(),
39195
- oz: g.getOZ(),
39196
- theta: g.getTheta()
39197
- };
39224
+ return g.toObject();
39198
39225
  }
39199
39226
  async moveToPosition(e, s = {}) {
39200
- const n = this.ArmService, u = new common_pb.Pose();
39201
- u.setX(e.x), u.setY(e.y), u.setZ(e.z), u.setOX(e.ox), u.setOY(e.oy), u.setOZ(e.oz), u.setTheta(e.theta);
39202
- const g = new arm_pb.MoveToPositionRequest();
39203
- g.setName(this.name), g.setTo(u), g.setExtra(struct_pb.Struct.fromJavaScript(s)), this.options.requestLogger?.(g), await promisify(
39227
+ const n = this.ArmService, u = new arm_pb.MoveToPositionRequest();
39228
+ u.setName(this.name), u.setTo(encodePose(e)), u.setExtra(struct_pb.Struct.fromJavaScript(s)), this.options.requestLogger?.(u), await promisify(
39204
39229
  n.moveToPosition.bind(n),
39205
- g
39230
+ u
39206
39231
  );
39207
39232
  }
39208
39233
  async moveToJointPositions(e, s = {}) {
@@ -41402,43 +41427,68 @@ class StreamClient extends EventDispatcher {
41402
41427
  }
41403
41428
  }
41404
41429
  }
41405
- class GripperClient {
41430
+ const encodeLinearConstraint = (t) => {
41431
+ const e = new motion_pb.LinearConstraint();
41432
+ return e.setLineToleranceMm(t.lineToleranceMm), e.setOrientationToleranceDegs(t.orientationToleranceDegs), e;
41433
+ }, encodeOrientationConstraint = (t) => {
41434
+ const e = new motion_pb.OrientationConstraint();
41435
+ return e.setOrientationToleranceDegs(t.orientationToleranceDegs), e;
41436
+ }, encodeAllowedFrameCollisions = (t) => {
41437
+ const e = new motion_pb.CollisionSpecification.AllowedFrameCollisions();
41438
+ return e.setFrame1(t.frame1), e.setFrame2(t.frame2), e;
41439
+ }, encodeCollisionSpecification = (t) => {
41440
+ const e = new motion_pb.CollisionSpecification();
41441
+ return e.setAllowsList(t.allowsList.map(encodeAllowedFrameCollisions)), e;
41442
+ }, encodeConstraints = (t) => {
41443
+ const e = new motion_pb.Constraints();
41444
+ return e.setLinearConstraintList(
41445
+ t.linearConstraintList.map(encodeLinearConstraint)
41446
+ ), e.setOrientationConstraintList(
41447
+ t.orientationConstraintList.map(encodeOrientationConstraint)
41448
+ ), e.setCollisionSpecificationList(
41449
+ t.collisionSpecificationList.map(encodeCollisionSpecification)
41450
+ ), e;
41451
+ };
41452
+ class MotionClient {
41406
41453
  client;
41407
41454
  name;
41408
41455
  options;
41409
41456
  constructor(e, s, n = {}) {
41410
- this.client = e.createServiceClient(GripperServiceClient_1), this.name = s, this.options = n;
41457
+ this.client = e.createServiceClient(MotionServiceClient_1), this.name = s, this.options = n;
41411
41458
  }
41412
- get GripperService() {
41459
+ get service() {
41413
41460
  return this.client;
41414
41461
  }
41415
- async open(e = {}) {
41416
- const s = this.GripperService, n = new gripper_pb.OpenRequest();
41417
- n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), await promisify(
41418
- s.open.bind(s),
41419
- n
41420
- );
41462
+ async move(e, s, n, u, g = {}) {
41463
+ const p = this.service, o = new motion_pb.MoveRequest();
41464
+ return o.setName(this.name), o.setDestination(encodePoseInFrame(e)), o.setComponentName(encodeResourceName(s)), n !== void 0 && o.setWorldState(encodeWorldState(n)), u !== void 0 && o.setConstraints(encodeConstraints(u)), o.setExtra(struct_pb.Struct.fromJavaScript(g)), this.options.requestLogger?.(o), (await promisify(
41465
+ p.move.bind(p),
41466
+ o
41467
+ )).getSuccess();
41421
41468
  }
41422
- async grab(e = {}) {
41423
- const s = this.GripperService, n = new gripper_pb.GrabRequest();
41424
- n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), await promisify(
41425
- s.grab.bind(s),
41426
- n
41427
- );
41469
+ async moveOnMap(e, s, n, u = {}) {
41470
+ const g = this.service, p = new motion_pb.MoveOnMapRequest();
41471
+ return p.setName(this.name), p.setDestination(encodePose(e)), p.setComponentName(encodeResourceName(s)), p.setSlamServiceName(encodeResourceName(n)), p.setExtra(struct_pb.Struct.fromJavaScript(u)), this.options.requestLogger?.(p), (await promisify(
41472
+ g.moveOnMap.bind(g),
41473
+ p
41474
+ )).getSuccess();
41428
41475
  }
41429
- async stop(e = {}) {
41430
- const s = this.GripperService, n = new gripper_pb.StopRequest();
41431
- n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), await promisify(
41432
- s.stop.bind(s),
41433
- n
41434
- );
41476
+ async moveSingleComponent(e, s, n, u = {}) {
41477
+ const g = this.service, p = new motion_pb.MoveSingleComponentRequest();
41478
+ return p.setName(this.name), p.setDestination(encodePoseInFrame(e)), p.setComponentName(encodeResourceName(s)), n !== void 0 && p.setWorldState(encodeWorldState(n)), p.setExtra(struct_pb.Struct.fromJavaScript(u)), this.options.requestLogger?.(p), (await promisify(g.moveSingleComponent.bind(g), p)).getSuccess();
41435
41479
  }
41436
- async isMoving() {
41437
- const e = this.GripperService, s = new gripper_pb.IsMovingRequest();
41438
- return s.setName(this.name), this.options.requestLogger?.(s), (await promisify(
41439
- e.isMoving.bind(e),
41440
- s
41441
- )).getIsMoving();
41480
+ async getPose(e, s, n, u = {}) {
41481
+ const g = this.service, p = new motion_pb.GetPoseRequest();
41482
+ p.setName(this.name), p.setComponentName(encodeResourceName(e)), p.setDestinationFrame(s), p.setSupplementalTransformsList(
41483
+ n.map(encodeTransform)
41484
+ ), p.setExtra(struct_pb.Struct.fromJavaScript(u)), this.options.requestLogger?.(p);
41485
+ const r = (await promisify(
41486
+ g.getPose.bind(g),
41487
+ p
41488
+ )).getPose();
41489
+ if (!r)
41490
+ throw new Error("no pose");
41491
+ return r.toObject();
41442
41492
  }
41443
41493
  }
41444
41494
  export {
@@ -41447,7 +41497,7 @@ export {
41447
41497
  BoardClient,
41448
41498
  CameraClient,
41449
41499
  RobotClient as Client,
41450
- GripperClient,
41500
+ MotionClient,
41451
41501
  MotorClient,
41452
41502
  MovementSensorClient,
41453
41503
  RobotClient,