@origonai/web-sdk 0.1.3 → 0.1.4

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.
@@ -1,4 +1,4 @@
1
- class ts {
1
+ class ds {
2
2
  constructor() {
3
3
  this.callbacks = {};
4
4
  }
@@ -51,181 +51,181 @@ class h extends Error {
51
51
  return new h({ kind: "session", message: t });
52
52
  }
53
53
  }
54
- function rn(e) {
54
+ function un(e) {
55
55
  return typeof e == "object" && e !== null && "error" in e && typeof e.error == "object" && e.error !== null && "message" in e.error;
56
56
  }
57
- const k = 8, an = 1048576, L = {
57
+ const k = 8, ln = 1048576, L = {
58
58
  REQUEST: 1,
59
59
  DATA: 2,
60
60
  ERROR: 3,
61
61
  CANCEL: 4
62
- }, on = 0;
63
- class b extends Error {
62
+ }, dn = 0;
63
+ class g extends Error {
64
64
  constructor(t) {
65
65
  super(t), this.name = "OrpcCodecError";
66
66
  }
67
67
  }
68
- class cn extends b {
68
+ class hn extends g {
69
69
  constructor(t) {
70
- super(`frame payload too large: ${t} > ${an}`), this.name = "OrpcFrameTooLargeError", this.declaredLength = t;
70
+ super(`frame payload too large: ${t} > ${ln}`), this.name = "OrpcFrameTooLargeError", this.declaredLength = t;
71
71
  }
72
72
  }
73
- const we = new TextEncoder(), un = new TextDecoder("utf-8", { fatal: !0 });
74
- function ns(e, t, n, s) {
75
- const r = we.encode(e), i = Object.entries(n).map(
76
- ([d, f]) => [we.encode(d), we.encode(f)]
73
+ const Ie = new TextEncoder(), fn = new TextDecoder("utf-8", { fatal: !0 });
74
+ function hs(e, t, n, s) {
75
+ const r = Ie.encode(e), i = Object.entries(n).map(
76
+ ([d, f]) => [Ie.encode(d), Ie.encode(f)]
77
77
  );
78
78
  let a = 2 + r.length + 8 + 1 + 2 + s.length;
79
79
  for (const [d, f] of i) a += 2 + d.length + 2 + f.length;
80
- const o = Pe(L.REQUEST, a), l = new DataView(o.buffer);
80
+ const o = Ge(L.REQUEST, a), l = new DataView(o.buffer);
81
81
  let u = k;
82
- l.setUint16(u, r.length), u += 2, o.set(r, u), u += r.length, l.setBigUint64(u, BigInt(t)), u += 8, o[u++] = on, l.setUint16(u, i.length), u += 2;
82
+ l.setUint16(u, r.length), u += 2, o.set(r, u), u += r.length, l.setBigUint64(u, BigInt(t)), u += 8, o[u++] = dn, l.setUint16(u, i.length), u += 2;
83
83
  for (const [d, f] of i)
84
84
  l.setUint16(u, d.length), u += 2, o.set(d, u), u += d.length, l.setUint16(u, f.length), u += 2, o.set(f, u), u += f.length;
85
85
  return o.set(s, u), o;
86
86
  }
87
- function ss(e) {
88
- const t = Pe(L.DATA, e.length);
87
+ function fs(e) {
88
+ const t = Ge(L.DATA, e.length);
89
89
  return t.set(e, k), t;
90
90
  }
91
- function ln() {
92
- return Pe(L.CANCEL, 0);
91
+ function mn() {
92
+ return Ge(L.CANCEL, 0);
93
93
  }
94
- function rs(e) {
94
+ function ms(e) {
95
95
  if (e.length < k)
96
- throw new b(`frame shorter than header: ${e.length} < ${k}`);
96
+ throw new g(`frame shorter than header: ${e.length} < ${k}`);
97
97
  const t = e[0];
98
98
  if (!Object.values(L).includes(t))
99
- throw new b(`unexpected frame type 0x${t.toString(16)}`);
99
+ throw new g(`unexpected frame type 0x${t.toString(16)}`);
100
100
  const n = new DataView(e.buffer, e.byteOffset, k), s = n.getUint16(2);
101
- if (s !== 0) throw new b(`non-zero reserved field: ${s}`);
101
+ if (s !== 0) throw new g(`non-zero reserved field: ${s}`);
102
102
  const r = n.getUint32(4);
103
- if (r > an) throw new cn(r);
103
+ if (r > ln) throw new hn(r);
104
104
  if (t === L.CANCEL && r !== 0)
105
- throw new b(`CANCEL payload must be empty: ${r}`);
105
+ throw new g(`CANCEL payload must be empty: ${r}`);
106
106
  return { frameType: t, payloadLen: r };
107
107
  }
108
- function is(e, t) {
108
+ function ps(e, t) {
109
109
  switch (e) {
110
110
  case L.REQUEST: {
111
- const { path: n, body: s } = as(t);
111
+ const { path: n, body: s } = gs(t);
112
112
  return { type: "response", path: n, body: s };
113
113
  }
114
114
  case L.DATA:
115
115
  return { type: "data", body: t };
116
116
  case L.ERROR: {
117
117
  if (t.length < 4)
118
- throw new b(`ERROR frame too short for code: ${t.length}`);
118
+ throw new g(`ERROR frame too short for code: ${t.length}`);
119
119
  const n = new DataView(t.buffer, t.byteOffset, t.byteLength);
120
120
  let s;
121
121
  try {
122
- s = un.decode(t.subarray(4));
122
+ s = fn.decode(t.subarray(4));
123
123
  } catch {
124
- throw new b("ERROR reason is not valid UTF-8");
124
+ throw new g("ERROR reason is not valid UTF-8");
125
125
  }
126
126
  return { type: "error", code: n.getUint32(0), reason: s };
127
127
  }
128
128
  case L.CANCEL:
129
129
  return { type: "cancel" };
130
130
  default:
131
- throw new b(`unexpected frame type 0x${e.toString(16)}`);
131
+ throw new g(`unexpected frame type 0x${e.toString(16)}`);
132
132
  }
133
133
  }
134
- function Pe(e, t) {
134
+ function Ge(e, t) {
135
135
  if (!Number.isSafeInteger(t) || t < 0 || t > 4294967295)
136
- throw new b(`payload length is outside u32: ${t}`);
136
+ throw new g(`payload length is outside u32: ${t}`);
137
137
  const n = new Uint8Array(k + t), s = new DataView(n.buffer);
138
138
  return n[0] = e, n[1] = 0, s.setUint16(2, 0), s.setUint32(4, t), n;
139
139
  }
140
- function as(e) {
140
+ function gs(e) {
141
141
  const t = new DataView(e.buffer, e.byteOffset, e.byteLength);
142
142
  let n = 0;
143
- if (e.length < 2) throw new b("REQUEST payload too short for path_len");
143
+ if (e.length < 2) throw new g("REQUEST payload too short for path_len");
144
144
  const s = t.getUint16(n);
145
- if (n += 2, s === 0) throw new b("empty path");
146
- if (s > 4096) throw new b(`path too long: ${s}`);
147
- if (n + s > e.length) throw new b("path_len overflows payload");
145
+ if (n += 2, s === 0) throw new g("empty path");
146
+ if (s > 4096) throw new g(`path too long: ${s}`);
147
+ if (n + s > e.length) throw new g("path_len overflows payload");
148
148
  const r = e.subarray(n, n + s);
149
149
  for (const l of r)
150
- if (!(l >= 65 && l <= 90 || l >= 97 && l <= 122 || l >= 48 && l <= 57 || l === 46 || l === 95 || l === 47)) throw new b("REQUEST path contains an invalid byte");
151
- const i = un.decode(r);
152
- if (n += s, n + 11 > e.length) throw new b("REQUEST payload missing fixed tail");
150
+ if (!(l >= 65 && l <= 90 || l >= 97 && l <= 122 || l >= 48 && l <= 57 || l === 46 || l === 95 || l === 47)) throw new g("REQUEST path contains an invalid byte");
151
+ const i = fn.decode(r);
152
+ if (n += s, n + 11 > e.length) throw new g("REQUEST payload missing fixed tail");
153
153
  n += 8;
154
154
  const a = e[n++];
155
- if (a !== on)
156
- throw new b(`unsupported response encoding: ${a}`);
155
+ if (a !== dn)
156
+ throw new g(`unsupported response encoding: ${a}`);
157
157
  const o = t.getUint16(n);
158
158
  n += 2;
159
159
  for (let l = 0; l < o; l++) {
160
160
  if (n + 2 > e.length)
161
- throw new b(`truncated metadata key_len at ${l}`);
161
+ throw new g(`truncated metadata key_len at ${l}`);
162
162
  const u = t.getUint16(n);
163
163
  if (n += 2, n + u > e.length)
164
- throw new b(`truncated metadata key at ${l}`);
164
+ throw new g(`truncated metadata key at ${l}`);
165
165
  if (n += u, n + 2 > e.length)
166
- throw new b(`truncated metadata val_len at ${l}`);
166
+ throw new g(`truncated metadata val_len at ${l}`);
167
167
  const d = t.getUint16(n);
168
168
  if (n += 2, n + d > e.length)
169
- throw new b(`truncated metadata val at ${l}`);
169
+ throw new g(`truncated metadata val at ${l}`);
170
170
  n += d;
171
171
  }
172
172
  return { path: i, body: e.subarray(n) };
173
173
  }
174
- const ce = /* @__PURE__ */ new Map();
175
- function at(e) {
176
- const t = ce.get(e);
174
+ const ue = /* @__PURE__ */ new Map();
175
+ function ct(e) {
176
+ const t = ue.get(e);
177
177
  if (t && !t.dead) return t;
178
178
  const n = new WebTransport(e), s = { transport: n, dead: !1 };
179
179
  return n.closed.then(
180
- () => ue(e, s),
181
- () => ue(e, s)
182
- ), ce.set(e, s), s;
180
+ () => le(e, s),
181
+ () => le(e, s)
182
+ ), ue.set(e, s), s;
183
183
  }
184
- function ue(e, t) {
185
- t.dead = !0, ce.get(e) === t && ce.delete(e);
184
+ function le(e, t) {
185
+ t.dead = !0, ue.get(e) === t && ue.delete(e);
186
186
  }
187
- async function ot(e) {
187
+ async function ut(e) {
188
188
  return await e.transport.ready, e.transport.createBidirectionalStream();
189
189
  }
190
- async function os(e, t) {
191
- let n = at(e), s, r = !1;
190
+ async function bs(e, t) {
191
+ let n = ct(e), s, r = !1;
192
192
  try {
193
- s = await ot(n);
193
+ s = await ut(n);
194
194
  } catch {
195
- ue(e, n), r = !0, n = at(e), s = await ot(n);
195
+ le(e, n), r = !0, n = ct(e), s = await ut(n);
196
196
  }
197
197
  const i = s.writable.getWriter(), a = s.readable.getReader();
198
198
  try {
199
199
  await i.write(t);
200
200
  } catch (o) {
201
- throw ct(e, n, o), o;
201
+ throw lt(e, n, o), o;
202
202
  }
203
203
  return {
204
204
  reader: a,
205
205
  writer: i,
206
206
  reconnected: r,
207
- sessionFailed: (o) => ct(e, n, o)
207
+ sessionFailed: (o) => lt(e, n, o)
208
208
  };
209
209
  }
210
- function ct(e, t, n) {
211
- typeof n != "object" && typeof n != "function" || n === null || n.source === "session" && ue(e, t);
210
+ function lt(e, t, n) {
211
+ typeof n != "object" && typeof n != "function" || n === null || n.source === "session" && le(e, t);
212
212
  }
213
- class ut {
213
+ class dt {
214
214
  constructor(t) {
215
215
  this.reader = t, this.chunks = [], this.available = 0, this.ended = !1;
216
216
  }
217
217
  async readFrame() {
218
218
  if (await this.ensure(k), this.available === 0 && this.ended) return null;
219
219
  if (this.available < k)
220
- throw new b(
220
+ throw new g(
221
221
  `response FIN truncated frame header: have ${this.available}, need ${k}`
222
222
  );
223
- const t = rs(this.peek(k)), n = k + t.payloadLen;
223
+ const t = ms(this.peek(k)), n = k + t.payloadLen;
224
224
  if (await this.ensure(n), this.available < n)
225
- throw new b(
225
+ throw new g(
226
226
  `response FIN truncated frame payload: have ${this.available - k}, need ${t.payloadLen}`
227
227
  );
228
- return this.take(k), is(t.frameType, this.take(t.payloadLen));
228
+ return this.take(k), ps(t.frameType, this.take(t.payloadLen));
229
229
  }
230
230
  async cancel(t) {
231
231
  await this.reader.cancel(t);
@@ -282,73 +282,73 @@ const Q = {
282
282
  CANCELLED: 4,
283
283
  /** Streaming DATA exceeds the ingress cap. */
284
284
  MESSAGE_TOO_LARGE: 12
285
- }, cs = "DATA frame too large";
285
+ }, Es = "DATA frame too large";
286
286
  class S extends Error {
287
287
  constructor(t, n) {
288
288
  super(`orpc error 0x${t.toString(16)}${n ? `: ${n}` : ""}`), this.name = "OrpcError", this.code = t, this.reason = n;
289
289
  }
290
290
  }
291
- function us(e) {
291
+ function ys(e) {
292
292
  if (typeof e != "object" && typeof e != "function" || e === null) return !1;
293
293
  const t = e;
294
294
  return t.source === "stream" && Number.isInteger(t.streamErrorCode) && t.streamErrorCode >= 0 && t.streamErrorCode <= 255;
295
295
  }
296
- function ls(e) {
297
- if (!us(e))
296
+ function ws(e) {
297
+ if (!ys(e))
298
298
  return e instanceof Error || typeof e == "object" && e !== null && "message" in e ? e : new Error(String(e));
299
- const t = e.streamErrorCode === Y.MESSAGE_TOO_LARGE ? cs : `WebTransport stream aborted with code 0x${e.streamErrorCode.toString(16)}`;
299
+ const t = e.streamErrorCode === Y.MESSAGE_TOO_LARGE ? Es : `WebTransport stream aborted with code 0x${e.streamErrorCode.toString(16)}`;
300
300
  return new S(e.streamErrorCode, t);
301
301
  }
302
- function dn(e, t = "orpc stream cancelled") {
302
+ function pn(e, t = "orpc stream cancelled") {
303
303
  if (typeof WebTransportError < "u")
304
304
  return new WebTransportError(t, { source: "stream", streamErrorCode: e });
305
305
  const n = new Error(t);
306
306
  return n.name = "WebTransportError", n.source = "stream", n.streamErrorCode = e, n;
307
307
  }
308
- const ds = {
308
+ const Is = {
309
309
  event() {
310
310
  }
311
- }, hs = [];
312
- function fs() {
313
- return hs.slice();
311
+ }, Ns = [];
312
+ function Ts() {
313
+ return Ns.slice();
314
314
  }
315
- typeof window < "u" && (window.__orpcDebug = fs);
316
- function ms(e, t, n = {}) {
317
- const s = n.logger ?? ds, r = n.transport ?? os, i = { ...n.metadata };
315
+ typeof window < "u" && (window.__orpcDebug = Ts);
316
+ function Ss(e, t, n = {}) {
317
+ const s = n.logger ?? Is, r = n.transport ?? bs, i = { ...n.metadata };
318
318
  delete i.authorization;
319
319
  async function a(d, f) {
320
- const p = t.getToken(), m = p ? { ...i, authorization: `Bearer ${p}` } : { ...i }, g = ns(d, 0, m, f);
321
- s.event({ kind: "request", path: d, reqBytes: g.length });
322
- const E = await r(e, g);
320
+ const p = t.getToken(), m = p ? { ...i, authorization: `Bearer ${p}` } : { ...i }, b = hs(d, 0, m, f);
321
+ s.event({ kind: "request", path: d, reqBytes: b.length });
322
+ const E = await r(e, b);
323
323
  return E.reconnected && s.event({ kind: "transport", path: d, event: "reconnect" }), E;
324
324
  }
325
325
  async function o(d, f, p) {
326
- const m = Ie(), g = await a(d, f), E = new ut(g.reader), x = g.writer.close().then(
326
+ const m = Ne(), b = await a(d, f), E = new dt(b.reader), x = b.writer.close().then(
327
327
  () => null,
328
- (v) => P(g, v)
328
+ (_) => V(b, _)
329
329
  );
330
330
  let T;
331
331
  try {
332
332
  T = await E.readFrame();
333
- } catch (v) {
334
- throw await O(g, E, v), P(g, v);
333
+ } catch (_) {
334
+ throw await O(b, E, _), V(b, _);
335
335
  }
336
- if (T === null) throw new b("response FIN before unary reply");
336
+ if (T === null) throw new g("response FIN before unary reply");
337
337
  if (T.type === "data" || T.type === "cancel")
338
338
  throw await O(
339
- g,
339
+ b,
340
340
  E,
341
- new b(`unexpected ${T.type} frame`)
342
- ), new b(`unexpected ${T.type} frame before unary reply`);
343
- let rt;
341
+ new g(`unexpected ${T.type} frame`)
342
+ ), new g(`unexpected ${T.type} frame before unary reply`);
343
+ let at;
344
344
  try {
345
- rt = await E.readFrame();
346
- } catch (v) {
347
- throw await O(g, E, v), P(g, v);
345
+ at = await E.readFrame();
346
+ } catch (_) {
347
+ throw await O(b, E, _), V(b, _);
348
348
  }
349
- if (rt !== null) {
350
- const v = new b("trailing frame after unary terminal");
351
- throw await O(g, E, v), v;
349
+ if (at !== null) {
350
+ const _ = new g("trailing frame after unary terminal");
351
+ throw await O(b, E, _), _;
352
352
  }
353
353
  if (T.type === "error")
354
354
  return s.event({
@@ -356,47 +356,47 @@ function ms(e, t, n = {}) {
356
356
  path: d,
357
357
  code: T.code,
358
358
  reason: T.reason,
359
- ms: Ie() - m
359
+ ms: Ne() - m
360
360
  }), u(T.code, T.reason, d, f, p);
361
361
  if (T.path !== d)
362
- throw new b(`response path mismatch: expected ${d}, got ${T.path}`);
363
- const it = await x;
364
- if (it) throw it;
365
- return s.event({ kind: "response", path: d, respBytes: T.body.length, ms: Ie() - m }), T.body;
362
+ throw new g(`response path mismatch: expected ${d}, got ${T.path}`);
363
+ const ot = await x;
364
+ if (ot) throw ot;
365
+ return s.event({ kind: "response", path: d, respBytes: T.body.length, ms: Ne() - m }), T.body;
366
366
  }
367
367
  async function l(d, f) {
368
- const p = await a(d, f), m = new ut(p.reader);
369
- let g;
368
+ const p = await a(d, f), m = new dt(p.reader);
369
+ let b;
370
370
  try {
371
- g = await m.readFrame();
371
+ b = await m.readFrame();
372
372
  } catch (E) {
373
- throw await O(p, m, E), P(p, E);
373
+ throw await O(p, m, E), V(p, E);
374
374
  }
375
- if (g === null) {
376
- const E = new b("response FIN before streaming REQUEST echo");
375
+ if (b === null) {
376
+ const E = new g("response FIN before streaming REQUEST echo");
377
377
  throw await O(p, m, E), E;
378
378
  }
379
- if (g.type === "error")
380
- throw await hn(p), new S(g.code, g.reason);
381
- if (g.type !== "response") {
382
- const E = new b(
383
- `unexpected ${g.type} frame before streaming REQUEST echo`
379
+ if (b.type === "error")
380
+ throw await gn(p), new S(b.code, b.reason);
381
+ if (b.type !== "response") {
382
+ const E = new g(
383
+ `unexpected ${b.type} frame before streaming REQUEST echo`
384
384
  );
385
385
  throw await O(p, m, E), E;
386
386
  }
387
- if (g.path !== d) {
388
- const E = new b(
389
- `response path mismatch: expected ${d}, got ${g.path}`
387
+ if (b.path !== d) {
388
+ const E = new g(
389
+ `response path mismatch: expected ${d}, got ${b.path}`
390
390
  );
391
391
  throw await O(p, m, E), E;
392
392
  }
393
- return new ps(g.body, p, m);
393
+ return new ks(b.body, p, m);
394
394
  }
395
- async function u(d, f, p, m, g) {
395
+ async function u(d, f, p, m, b) {
396
396
  switch (d) {
397
397
  case Q.INVALID:
398
398
  case Q.EXPIRED:
399
- if (g)
399
+ if (b)
400
400
  throw t.logout(), new S(d, f);
401
401
  return await t.refresh(), o(p, m, !0);
402
402
  case Q.STALE:
@@ -412,16 +412,16 @@ function ms(e, t, n = {}) {
412
412
  stream: l
413
413
  };
414
414
  }
415
- class ps {
415
+ class ks {
416
416
  constructor(t, n, s) {
417
417
  this.channel = n, this.frames = s, this.terminal = "open", this.terminalError = null, this.upload = "open", this.uploadError = null, this.finishPromise = null, this.cancelPromise = null, this.nextTail = Promise.resolve(), this.initial = t;
418
418
  }
419
419
  async send(t) {
420
420
  this.assertWritable();
421
421
  try {
422
- await this.channel.writer.write(ss(t));
422
+ await this.channel.writer.write(fs(t));
423
423
  } catch (n) {
424
- throw this.upload = "stopped", this.uploadError = P(this.channel, n), this.uploadError;
424
+ throw this.upload = "stopped", this.uploadError = V(this.channel, n), this.uploadError;
425
425
  }
426
426
  }
427
427
  async finish() {
@@ -435,17 +435,17 @@ class ps {
435
435
  this.upload = "closed";
436
436
  },
437
437
  (t) => {
438
- throw this.upload = "stopped", this.uploadError = P(this.channel, t), this.uploadError;
438
+ throw this.upload = "stopped", this.uploadError = V(this.channel, t), this.uploadError;
439
439
  }
440
440
  ), this.finishPromise;
441
441
  }
442
442
  }
443
443
  }
444
444
  async cancel(t = Y.CANCELLED) {
445
- if (bs(t), this.cancelPromise) return this.cancelPromise;
445
+ if (As(t), this.cancelPromise) return this.cancelPromise;
446
446
  if (this.terminal !== "open") return;
447
447
  this.terminal = "cancelled", this.terminalError = new S(t, "stream cancelled");
448
- const n = dn(t);
448
+ const n = pn(t);
449
449
  return this.cancelPromise = Promise.allSettled([
450
450
  this.cancelUpload(),
451
451
  this.frames.cancel(n).catch((s) => this.channel.sessionFailed?.(s))
@@ -475,23 +475,23 @@ class ps {
475
475
  t = await this.frames.readFrame();
476
476
  } catch (s) {
477
477
  if (this.terminalError) throw this.terminalError;
478
- const r = P(this.channel, s);
479
- throw this.terminal = "error", this.terminalError = r, s instanceof b && await O(this.channel, this.frames, s), r;
478
+ const r = V(this.channel, s);
479
+ throw this.terminal = "error", this.terminalError = r, s instanceof g && await O(this.channel, this.frames, s), r;
480
480
  }
481
481
  if (this.terminalError) throw this.terminalError;
482
482
  if (t === null)
483
483
  return this.terminal = "clean", { done: !0, value: void 0 };
484
484
  if (t.type === "data") return { done: !1, value: t.body };
485
485
  if (t.type === "error")
486
- throw this.terminal = "error", this.terminalError = new S(t.code, t.reason), hn(this.channel), this.terminalError;
487
- const n = new b(`unexpected ${t.type} frame after streaming REQUEST echo`);
486
+ throw this.terminal = "error", this.terminalError = new S(t.code, t.reason), gn(this.channel), this.terminalError;
487
+ const n = new g(`unexpected ${t.type} frame after streaming REQUEST echo`);
488
488
  throw this.terminal = "error", this.terminalError = n, await O(this.channel, this.frames, n), n;
489
489
  }
490
490
  assertWritable() {
491
491
  if (this.terminalError) throw this.terminalError;
492
492
  if (this.terminal !== "open") throw new S(Y.CANCELLED, "stream is terminal");
493
493
  if (this.upload !== "open")
494
- throw this.uploadError ?? new b("stream upload is already finished");
494
+ throw this.uploadError ?? new g("stream upload is already finished");
495
495
  }
496
496
  async cancelUpload() {
497
497
  if (this.upload === "closing") {
@@ -501,7 +501,7 @@ class ps {
501
501
  if (this.upload === "open") {
502
502
  this.upload = "closing";
503
503
  try {
504
- await this.channel.writer.write(ln()), await this.channel.writer.close(), this.upload = "closed";
504
+ await this.channel.writer.write(mn()), await this.channel.writer.close(), this.upload = "closed";
505
505
  } catch (t) {
506
506
  this.upload = "stopped", this.channel.sessionFailed?.(t);
507
507
  }
@@ -509,12 +509,12 @@ class ps {
509
509
  }
510
510
  }
511
511
  async function O(e, t, n) {
512
- if (!(n instanceof b)) return;
513
- const s = n instanceof cn ? Y.MESSAGE_TOO_LARGE : Y.INVALID_ARGUMENT, r = dn(s, n.message);
512
+ if (!(n instanceof g)) return;
513
+ const s = n instanceof hn ? Y.MESSAGE_TOO_LARGE : Y.INVALID_ARGUMENT, r = pn(s, n.message);
514
514
  await Promise.allSettled([
515
515
  (async () => {
516
516
  try {
517
- await e.writer.write(ln()), await e.writer.close();
517
+ await e.writer.write(mn()), await e.writer.close();
518
518
  } catch (i) {
519
519
  e.sessionFailed?.(i);
520
520
  }
@@ -522,27 +522,27 @@ async function O(e, t, n) {
522
522
  t.cancel(r).catch((i) => e.sessionFailed?.(i))
523
523
  ]);
524
524
  }
525
- async function hn(e) {
525
+ async function gn(e) {
526
526
  try {
527
527
  await e.writer.close();
528
528
  } catch (t) {
529
529
  e.sessionFailed?.(t);
530
530
  }
531
531
  }
532
- function P(e, t) {
533
- return e.sessionFailed?.(t), ls(t);
532
+ function V(e, t) {
533
+ return e.sessionFailed?.(t), ws(t);
534
534
  }
535
- function bs(e) {
535
+ function As(e) {
536
536
  if (!Number.isInteger(e) || e < 0 || e > 255)
537
537
  throw new RangeError(`WebTransport stream error code must be an integer in 0..255: ${e}`);
538
538
  }
539
- function Ie() {
539
+ function Ne() {
540
540
  return typeof performance < "u" ? performance.now() : Date.now();
541
541
  }
542
- function W(e) {
542
+ function j(e) {
543
543
  return new Promise((t) => setTimeout(t, e));
544
544
  }
545
- function fn() {
545
+ function bn() {
546
546
  const e = Date.now(), t = new Uint8Array(16);
547
547
  crypto.getRandomValues(t), t[0] = e >> 40 & 255, t[1] = e >> 32 & 255, t[2] = e >> 24 & 255, t[3] = e >> 16 & 255, t[4] = e >> 8 & 255, t[5] = e & 255, t[6] = t[6] & 15 | 112, t[8] = t[8] & 63 | 128;
548
548
  const n = [...t].map((s) => s.toString(16).padStart(2, "0")).join("");
@@ -551,14 +551,14 @@ function fn() {
551
551
  20
552
552
  )}-${n.slice(20)}`;
553
553
  }
554
- function Ve(e, t) {
554
+ function Be(e, t) {
555
555
  return e !== null && typeof e == "object" && "$typeName" in e && typeof e.$typeName == "string" ? t === void 0 ? !0 : t.typeName === e.$typeName : !1;
556
556
  }
557
557
  var c;
558
558
  (function(e) {
559
559
  e[e.DOUBLE = 1] = "DOUBLE", e[e.FLOAT = 2] = "FLOAT", e[e.INT64 = 3] = "INT64", e[e.UINT64 = 4] = "UINT64", e[e.INT32 = 5] = "INT32", e[e.FIXED64 = 6] = "FIXED64", e[e.FIXED32 = 7] = "FIXED32", e[e.BOOL = 8] = "BOOL", e[e.STRING = 9] = "STRING", e[e.BYTES = 12] = "BYTES", e[e.UINT32 = 13] = "UINT32", e[e.SFIXED32 = 15] = "SFIXED32", e[e.SFIXED64 = 16] = "SFIXED64", e[e.SINT32 = 17] = "SINT32", e[e.SINT64 = 18] = "SINT64";
560
560
  })(c || (c = {}));
561
- function gs() {
561
+ function vs() {
562
562
  let e = 0, t = 0;
563
563
  for (let s = 0; s < 28; s += 7) {
564
564
  let r = this.buf[this.pos++];
@@ -575,7 +575,7 @@ function gs() {
575
575
  }
576
576
  throw new Error("invalid varint");
577
577
  }
578
- function Ne(e, t, n) {
578
+ function Te(e, t, n) {
579
579
  for (let i = 0; i < 28; i = i + 7) {
580
580
  const a = e >>> i, o = !(!(a >>> 7) && t == 0), l = (o ? a | 128 : a) & 255;
581
581
  if (n.push(l), !o)
@@ -592,7 +592,7 @@ function Ne(e, t, n) {
592
592
  }
593
593
  }
594
594
  const ae = 4294967296;
595
- function lt(e) {
595
+ function ht(e) {
596
596
  const t = e[0] === "-";
597
597
  t && (e = e.slice(1));
598
598
  const n = 1e6;
@@ -601,37 +601,37 @@ function lt(e) {
601
601
  const l = Number(e.slice(a, o));
602
602
  r *= n, s = s * n + l, s >= ae && (r = r + (s / ae | 0), s = s % ae);
603
603
  }
604
- return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), t ? pn(s, r) : Ge(s, r);
604
+ return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), t ? yn(s, r) : Ye(s, r);
605
605
  }
606
- function Es(e, t) {
607
- let n = Ge(e, t);
606
+ function Rs(e, t) {
607
+ let n = Ye(e, t);
608
608
  const s = n.hi & 2147483648;
609
- s && (n = pn(n.lo, n.hi));
610
- const r = mn(n.lo, n.hi);
609
+ s && (n = yn(n.lo, n.hi));
610
+ const r = En(n.lo, n.hi);
611
611
  return s ? "-" + r : r;
612
612
  }
613
- function mn(e, t) {
614
- if ({ lo: e, hi: t } = ys(e, t), t <= 2097151)
613
+ function En(e, t) {
614
+ if ({ lo: e, hi: t } = _s(e, t), t <= 2097151)
615
615
  return String(ae * t + e);
616
616
  const n = e & 16777215, s = (e >>> 24 | t << 8) & 16777215, r = t >> 16 & 65535;
617
617
  let i = n + s * 6777216 + r * 6710656, a = s + r * 8147497, o = r * 2;
618
618
  const l = 1e7;
619
- return i >= l && (a += Math.floor(i / l), i %= l), a >= l && (o += Math.floor(a / l), a %= l), o.toString() + dt(a) + dt(i);
619
+ return i >= l && (a += Math.floor(i / l), i %= l), a >= l && (o += Math.floor(a / l), a %= l), o.toString() + ft(a) + ft(i);
620
620
  }
621
- function ys(e, t) {
621
+ function _s(e, t) {
622
622
  return { lo: e >>> 0, hi: t >>> 0 };
623
623
  }
624
- function Ge(e, t) {
624
+ function Ye(e, t) {
625
625
  return { lo: e | 0, hi: t | 0 };
626
626
  }
627
- function pn(e, t) {
628
- return t = ~t, e ? e = ~e + 1 : t += 1, Ge(e, t);
627
+ function yn(e, t) {
628
+ return t = ~t, e ? e = ~e + 1 : t += 1, Ye(e, t);
629
629
  }
630
- const dt = (e) => {
630
+ const ft = (e) => {
631
631
  const t = String(e);
632
632
  return "0000000".slice(t.length) + t;
633
633
  };
634
- function Ce(e, t) {
634
+ function Ue(e, t) {
635
635
  if (e >= 0) {
636
636
  for (; e > 127; )
637
637
  t.push(e & 127 | 128), e = e >>> 7;
@@ -642,7 +642,7 @@ function Ce(e, t) {
642
642
  t.push(1);
643
643
  }
644
644
  }
645
- function ws() {
645
+ function Os() {
646
646
  let e = this.buf[this.pos++], t = e & 127;
647
647
  if ((e & 128) == 0)
648
648
  return this.assertBounds(), t;
@@ -659,8 +659,8 @@ function ws() {
659
659
  throw new Error("invalid varint");
660
660
  return this.assertBounds(), t >>> 0;
661
661
  }
662
- const w = /* @__PURE__ */ Is();
663
- function Is() {
662
+ const w = /* @__PURE__ */ Cs();
663
+ function Cs() {
664
664
  const e = new DataView(new ArrayBuffer(8));
665
665
  if (typeof BigInt == "function" && typeof e.getBigInt64 == "function" && typeof e.getBigUint64 == "function" && typeof e.setBigInt64 == "function" && typeof e.setBigUint64 == "function" && (!!globalThis.Deno || !!globalThis.Bun || typeof process != "object" || typeof process.env != "object" || process.env.BUF_BIGINT_DISABLE !== "1")) {
666
666
  const n = BigInt("-9223372036854775808"), s = BigInt("9223372036854775807"), r = BigInt("0"), i = BigInt("18446744073709551615");
@@ -703,30 +703,30 @@ function Is() {
703
703
  zero: "0",
704
704
  supported: !1,
705
705
  parse(n) {
706
- return typeof n != "string" && (n = n.toString()), ht(n), n;
706
+ return typeof n != "string" && (n = n.toString()), mt(n), n;
707
707
  },
708
708
  uParse(n) {
709
- return typeof n != "string" && (n = n.toString()), ft(n), n;
709
+ return typeof n != "string" && (n = n.toString()), pt(n), n;
710
710
  },
711
711
  enc(n) {
712
- return typeof n != "string" && (n = n.toString()), ht(n), lt(n);
712
+ return typeof n != "string" && (n = n.toString()), mt(n), ht(n);
713
713
  },
714
714
  uEnc(n) {
715
- return typeof n != "string" && (n = n.toString()), ft(n), lt(n);
715
+ return typeof n != "string" && (n = n.toString()), pt(n), ht(n);
716
716
  },
717
717
  dec(n, s) {
718
- return Es(n, s);
718
+ return Rs(n, s);
719
719
  },
720
720
  uDec(n, s) {
721
- return mn(n, s);
721
+ return En(n, s);
722
722
  }
723
723
  };
724
724
  }
725
- function ht(e) {
725
+ function mt(e) {
726
726
  if (!/^-?[0-9]+$/.test(e))
727
727
  throw new Error("invalid int64: " + e);
728
728
  }
729
- function ft(e) {
729
+ function pt(e) {
730
730
  if (!/^[0-9]+$/.test(e))
731
731
  throw new Error("invalid uint64: " + e);
732
732
  }
@@ -751,7 +751,7 @@ function q(e, t) {
751
751
  return 0;
752
752
  }
753
753
  }
754
- function Ns(e, t) {
754
+ function Ds(e, t) {
755
755
  switch (e) {
756
756
  case c.BOOL:
757
757
  return t === !1;
@@ -766,16 +766,16 @@ function Ns(e, t) {
766
766
  return t == 0;
767
767
  }
768
768
  }
769
- const bn = 2, M = Symbol.for("reflect unsafe local");
770
- function gn(e, t) {
769
+ const wn = 2, M = Symbol.for("reflect unsafe local");
770
+ function In(e, t) {
771
771
  const n = e[t.localName].case;
772
772
  return n === void 0 ? n : t.fields.find((s) => s.localName === n);
773
773
  }
774
- function Ts(e, t) {
774
+ function Us(e, t) {
775
775
  const n = t.localName;
776
776
  if (t.oneof)
777
777
  return e[t.oneof.localName].case === n;
778
- if (t.presence != bn)
778
+ if (t.presence != wn)
779
779
  return e[n] !== void 0 && Object.prototype.hasOwnProperty.call(e, n);
780
780
  switch (t.fieldKind) {
781
781
  case "list":
@@ -783,7 +783,7 @@ function Ts(e, t) {
783
783
  case "map":
784
784
  return Object.keys(e[n]).length > 0;
785
785
  case "scalar":
786
- return !Ns(t.scalar, e[n]);
786
+ return !Ds(t.scalar, e[n]);
787
787
  case "enum":
788
788
  return e[n] !== t.enum.values[0].number;
789
789
  }
@@ -792,25 +792,25 @@ function Ts(e, t) {
792
792
  function H(e, t) {
793
793
  return Object.prototype.hasOwnProperty.call(e, t) && e[t] !== void 0;
794
794
  }
795
- function En(e, t) {
795
+ function Nn(e, t) {
796
796
  if (t.oneof) {
797
797
  const n = e[t.oneof.localName];
798
798
  return n.case === t.localName ? n.value : void 0;
799
799
  }
800
800
  return e[t.localName];
801
801
  }
802
- function yn(e, t, n) {
802
+ function Tn(e, t, n) {
803
803
  t.oneof ? e[t.oneof.localName] = {
804
804
  case: t.localName,
805
805
  value: n
806
806
  } : e[t.localName] = n;
807
807
  }
808
- function Ss(e, t) {
808
+ function Ls(e, t) {
809
809
  const n = t.localName;
810
810
  if (t.oneof) {
811
811
  const s = t.oneof.localName;
812
812
  e[s].case === n && (e[s] = { case: void 0 });
813
- } else if (t.presence != bn)
813
+ } else if (t.presence != wn)
814
814
  delete e[n];
815
815
  else
816
816
  switch (t.fieldKind) {
@@ -828,12 +828,12 @@ function Ss(e, t) {
828
828
  break;
829
829
  }
830
830
  }
831
- function F(e) {
831
+ function P(e) {
832
832
  return e !== null && typeof e == "object" && !Array.isArray(e);
833
833
  }
834
- function Be(e, t) {
834
+ function $e(e, t) {
835
835
  var n, s, r, i;
836
- if (F(e) && M in e && "add" in e && "field" in e && typeof e.field == "function") {
836
+ if (P(e) && M in e && "add" in e && "field" in e && typeof e.field == "function") {
837
837
  if (t !== void 0) {
838
838
  const a = t, o = e.field();
839
839
  return a.listKind == o.listKind && a.scalar === o.scalar && ((n = a.message) === null || n === void 0 ? void 0 : n.typeName) === ((s = o.message) === null || s === void 0 ? void 0 : s.typeName) && ((r = a.enum) === null || r === void 0 ? void 0 : r.typeName) === ((i = o.enum) === null || i === void 0 ? void 0 : i.typeName);
@@ -842,9 +842,9 @@ function Be(e, t) {
842
842
  }
843
843
  return !1;
844
844
  }
845
- function Ye(e, t) {
845
+ function Xe(e, t) {
846
846
  var n, s, r, i;
847
- if (F(e) && M in e && "has" in e && "field" in e && typeof e.field == "function") {
847
+ if (P(e) && M in e && "has" in e && "field" in e && typeof e.field == "function") {
848
848
  if (t !== void 0) {
849
849
  const a = t, o = e.field();
850
850
  return a.mapKey === o.mapKey && a.mapKind == o.mapKind && a.scalar === o.scalar && ((n = a.message) === null || n === void 0 ? void 0 : n.typeName) === ((s = o.message) === null || s === void 0 ? void 0 : s.typeName) && ((r = a.enum) === null || r === void 0 ? void 0 : r.typeName) === ((i = o.enum) === null || i === void 0 ? void 0 : i.typeName);
@@ -853,17 +853,17 @@ function Ye(e, t) {
853
853
  }
854
854
  return !1;
855
855
  }
856
- function $e(e, t) {
857
- return F(e) && M in e && "desc" in e && F(e.desc) && e.desc.kind === "message" && (t === void 0 || e.desc.typeName == t.typeName);
856
+ function Ke(e, t) {
857
+ return P(e) && M in e && "desc" in e && P(e.desc) && e.desc.kind === "message" && (t === void 0 || e.desc.typeName == t.typeName);
858
858
  }
859
- function ks(e) {
860
- return In(e.$typeName);
859
+ function Ms(e) {
860
+ return kn(e.$typeName);
861
861
  }
862
- function wn(e) {
862
+ function Sn(e) {
863
863
  const t = e.fields[0];
864
- return In(e.typeName) && t !== void 0 && t.fieldKind == "scalar" && t.name == "value" && t.number == 1;
864
+ return kn(e.typeName) && t !== void 0 && t.fieldKind == "scalar" && t.name == "value" && t.number == 1;
865
865
  }
866
- function In(e) {
866
+ function kn(e) {
867
867
  return e.startsWith("google.protobuf.") && [
868
868
  "DoubleValue",
869
869
  "FloatValue",
@@ -876,122 +876,122 @@ function In(e) {
876
876
  "BytesValue"
877
877
  ].includes(e.substring(16));
878
878
  }
879
- const As = 999, Rs = 998, oe = 2;
879
+ const xs = 999, Ps = 998, oe = 2;
880
880
  function C(e, t) {
881
- if (Ve(t, e))
881
+ if (Be(t, e))
882
882
  return t;
883
- const n = Ds(e);
884
- return t !== void 0 && _s(e, n, t), n;
883
+ const n = Ys(e);
884
+ return t !== void 0 && Vs(e, n, t), n;
885
885
  }
886
- function _s(e, t, n) {
886
+ function Vs(e, t, n) {
887
887
  for (const s of e.members) {
888
888
  let r = n[s.localName];
889
889
  if (r == null)
890
890
  continue;
891
891
  let i;
892
892
  if (s.kind == "oneof") {
893
- const a = gn(n, s);
893
+ const a = In(n, s);
894
894
  if (!a)
895
895
  continue;
896
- i = a, r = En(n, a);
896
+ i = a, r = Nn(n, a);
897
897
  } else
898
898
  i = s;
899
899
  switch (i.fieldKind) {
900
900
  case "message":
901
- r = Xe(i, r);
901
+ r = je(i, r);
902
902
  break;
903
903
  case "scalar":
904
- r = Nn(i, r);
904
+ r = An(i, r);
905
905
  break;
906
906
  case "list":
907
- r = Os(i, r);
907
+ r = Gs(i, r);
908
908
  break;
909
909
  case "map":
910
- r = vs(i, r);
910
+ r = Fs(i, r);
911
911
  break;
912
912
  }
913
- yn(t, i, r);
913
+ Tn(t, i, r);
914
914
  }
915
915
  return t;
916
916
  }
917
- function Nn(e, t) {
918
- return e.scalar == c.BYTES ? Ke(t) : t;
917
+ function An(e, t) {
918
+ return e.scalar == c.BYTES ? We(t) : t;
919
919
  }
920
- function vs(e, t) {
921
- if (F(t)) {
920
+ function Fs(e, t) {
921
+ if (P(t)) {
922
922
  if (e.scalar == c.BYTES)
923
- return mt(t, Ke);
923
+ return gt(t, We);
924
924
  if (e.mapKind == "message")
925
- return mt(t, (n) => Xe(e, n));
925
+ return gt(t, (n) => je(e, n));
926
926
  }
927
927
  return t;
928
928
  }
929
- function Os(e, t) {
929
+ function Gs(e, t) {
930
930
  if (Array.isArray(t)) {
931
931
  if (e.scalar == c.BYTES)
932
- return t.map(Ke);
932
+ return t.map(We);
933
933
  if (e.listKind == "message")
934
- return t.map((n) => Xe(e, n));
934
+ return t.map((n) => je(e, n));
935
935
  }
936
936
  return t;
937
937
  }
938
- function Xe(e, t) {
939
- if (e.fieldKind == "message" && !e.oneof && wn(e.message))
940
- return Nn(e.message.fields[0], t);
941
- if (F(t)) {
938
+ function je(e, t) {
939
+ if (e.fieldKind == "message" && !e.oneof && Sn(e.message))
940
+ return An(e.message.fields[0], t);
941
+ if (P(t)) {
942
942
  if (e.message.typeName == "google.protobuf.Struct" && e.parent.typeName !== "google.protobuf.Value")
943
943
  return t;
944
- if (!Ve(t, e.message))
944
+ if (!Be(t, e.message))
945
945
  return C(e.message, t);
946
946
  }
947
947
  return t;
948
948
  }
949
- function Ke(e) {
949
+ function We(e) {
950
950
  return Array.isArray(e) ? new Uint8Array(e) : e;
951
951
  }
952
- function mt(e, t) {
952
+ function gt(e, t) {
953
953
  const n = {};
954
954
  for (const s of Object.entries(e))
955
955
  n[s[0]] = t(s[1]);
956
956
  return n;
957
957
  }
958
- const Cs = Symbol(), pt = /* @__PURE__ */ new WeakMap();
959
- function Ds(e) {
958
+ const Bs = Symbol(), bt = /* @__PURE__ */ new WeakMap();
959
+ function Ys(e) {
960
960
  let t;
961
- if (Us(e)) {
962
- const n = pt.get(e);
961
+ if ($s(e)) {
962
+ const n = bt.get(e);
963
963
  let s, r;
964
964
  if (n)
965
965
  ({ prototype: s, members: r } = n);
966
966
  else {
967
967
  s = {}, r = /* @__PURE__ */ new Set();
968
968
  for (const i of e.members)
969
- i.kind != "oneof" && (i.fieldKind != "scalar" && i.fieldKind != "enum" || i.presence != oe && (r.add(i), s[i.localName] = Te(i)));
970
- pt.set(e, { prototype: s, members: r });
969
+ i.kind != "oneof" && (i.fieldKind != "scalar" && i.fieldKind != "enum" || i.presence != oe && (r.add(i), s[i.localName] = Se(i)));
970
+ bt.set(e, { prototype: s, members: r });
971
971
  }
972
972
  t = Object.create(s), t.$typeName = e.typeName;
973
973
  for (const i of e.members)
974
- r.has(i) || i.kind == "field" && (i.fieldKind == "message" || (i.fieldKind == "scalar" || i.fieldKind == "enum") && i.presence != oe) || (t[i.localName] = Te(i));
974
+ r.has(i) || i.kind == "field" && (i.fieldKind == "message" || (i.fieldKind == "scalar" || i.fieldKind == "enum") && i.presence != oe) || (t[i.localName] = Se(i));
975
975
  } else {
976
976
  t = {
977
977
  $typeName: e.typeName
978
978
  };
979
979
  for (const n of e.members)
980
- (n.kind == "oneof" || n.presence == oe) && (t[n.localName] = Te(n));
980
+ (n.kind == "oneof" || n.presence == oe) && (t[n.localName] = Se(n));
981
981
  }
982
982
  return t;
983
983
  }
984
- function Us(e) {
984
+ function $s(e) {
985
985
  switch (e.file.edition) {
986
- case As:
986
+ case xs:
987
987
  return !1;
988
- case Rs:
988
+ case Ps:
989
989
  return !0;
990
990
  default:
991
991
  return e.fields.some((t) => t.presence != oe && t.fieldKind != "message" && !t.oneof);
992
992
  }
993
993
  }
994
- function Te(e) {
994
+ function Se(e) {
995
995
  if (e.kind == "oneof")
996
996
  return { case: void 0 };
997
997
  if (e.fieldKind == "list")
@@ -999,7 +999,7 @@ function Te(e) {
999
999
  if (e.fieldKind == "map")
1000
1000
  return {};
1001
1001
  if (e.fieldKind == "message")
1002
- return Cs;
1002
+ return Bs;
1003
1003
  const t = e.getDefaultValue();
1004
1004
  return t !== void 0 ? e.fieldKind == "scalar" && e.longAsString ? t.toString() : t : e.fieldKind == "scalar" ? q(e.scalar, e.longAsString) : e.enum.values[0].number;
1005
1005
  }
@@ -1008,12 +1008,12 @@ class $ extends Error {
1008
1008
  super(n), this.name = s, this.field = () => t;
1009
1009
  }
1010
1010
  }
1011
- const Se = Symbol.for("@bufbuild/protobuf/text-encoding");
1012
- function We() {
1013
- if (globalThis[Se] == null) {
1011
+ const ke = Symbol.for("@bufbuild/protobuf/text-encoding");
1012
+ function qe() {
1013
+ if (globalThis[ke] == null) {
1014
1014
  const e = new globalThis.TextEncoder(), t = new globalThis.TextDecoder();
1015
1015
  let n;
1016
- globalThis[Se] = {
1016
+ globalThis[ke] = {
1017
1017
  encodeUtf8(s) {
1018
1018
  return e.encode(s);
1019
1019
  },
@@ -1029,15 +1029,15 @@ function We() {
1029
1029
  }
1030
1030
  };
1031
1031
  }
1032
- return globalThis[Se];
1032
+ return globalThis[ke];
1033
1033
  }
1034
1034
  var I;
1035
1035
  (function(e) {
1036
1036
  e[e.Varint = 0] = "Varint", e[e.Bit64 = 1] = "Bit64", e[e.LengthDelimited = 2] = "LengthDelimited", e[e.StartGroup = 3] = "StartGroup", e[e.EndGroup = 4] = "EndGroup", e[e.Bit32 = 5] = "Bit32";
1037
1037
  })(I || (I = {}));
1038
- const Tn = 34028234663852886e22, Sn = -34028234663852886e22, kn = 4294967295, An = 2147483647, Rn = -2147483648;
1039
- class Ls {
1040
- constructor(t = We().encodeUtf8) {
1038
+ const vn = 34028234663852886e22, Rn = -34028234663852886e22, _n = 4294967295, On = 2147483647, Cn = -2147483648;
1039
+ class Xs {
1040
+ constructor(t = qe().encodeUtf8) {
1041
1041
  this.encodeUtf8 = t, this.stack = [], this.chunks = [], this.buf = [];
1042
1042
  }
1043
1043
  /**
@@ -1092,7 +1092,7 @@ class Ls {
1092
1092
  * Write a `uint32` value, an unsigned 32 bit varint.
1093
1093
  */
1094
1094
  uint32(t) {
1095
- for (bt(t); t > 127; )
1095
+ for (Et(t); t > 127; )
1096
1096
  this.buf.push(t & 127 | 128), t = t >>> 7;
1097
1097
  return this.buf.push(t), this;
1098
1098
  }
@@ -1100,7 +1100,7 @@ class Ls {
1100
1100
  * Write a `int32` value, a signed 32 bit varint.
1101
1101
  */
1102
1102
  int32(t) {
1103
- return ke(t), Ce(t, this.buf), this;
1103
+ return Ae(t), Ue(t, this.buf), this;
1104
1104
  }
1105
1105
  /**
1106
1106
  * Write a `bool` value, a varint.
@@ -1125,7 +1125,7 @@ class Ls {
1125
1125
  * Write a `float` value, 32-bit floating point number.
1126
1126
  */
1127
1127
  float(t) {
1128
- xs(t);
1128
+ js(t);
1129
1129
  let n = new Uint8Array(4);
1130
1130
  return new DataView(n.buffer).setFloat32(0, t, !0), this.raw(n);
1131
1131
  }
@@ -1140,7 +1140,7 @@ class Ls {
1140
1140
  * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
1141
1141
  */
1142
1142
  fixed32(t) {
1143
- bt(t);
1143
+ Et(t);
1144
1144
  let n = new Uint8Array(4);
1145
1145
  return new DataView(n.buffer).setUint32(0, t, !0), this.raw(n);
1146
1146
  }
@@ -1148,7 +1148,7 @@ class Ls {
1148
1148
  * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
1149
1149
  */
1150
1150
  sfixed32(t) {
1151
- ke(t);
1151
+ Ae(t);
1152
1152
  let n = new Uint8Array(4);
1153
1153
  return new DataView(n.buffer).setInt32(0, t, !0), this.raw(n);
1154
1154
  }
@@ -1156,7 +1156,7 @@ class Ls {
1156
1156
  * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
1157
1157
  */
1158
1158
  sint32(t) {
1159
- return ke(t), t = (t << 1 ^ t >> 31) >>> 0, Ce(t, this.buf), this;
1159
+ return Ae(t), t = (t << 1 ^ t >> 31) >>> 0, Ue(t, this.buf), this;
1160
1160
  }
1161
1161
  /**
1162
1162
  * Write a `sfixed64` value, a signed, fixed-length 64-bit integer.
@@ -1177,26 +1177,26 @@ class Ls {
1177
1177
  */
1178
1178
  int64(t) {
1179
1179
  let n = w.enc(t);
1180
- return Ne(n.lo, n.hi, this.buf), this;
1180
+ return Te(n.lo, n.hi, this.buf), this;
1181
1181
  }
1182
1182
  /**
1183
1183
  * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
1184
1184
  */
1185
1185
  sint64(t) {
1186
1186
  const n = w.enc(t), s = n.hi >> 31, r = n.lo << 1 ^ s, i = (n.hi << 1 | n.lo >>> 31) ^ s;
1187
- return Ne(r, i, this.buf), this;
1187
+ return Te(r, i, this.buf), this;
1188
1188
  }
1189
1189
  /**
1190
1190
  * Write a `uint64` value, an unsigned 64-bit varint.
1191
1191
  */
1192
1192
  uint64(t) {
1193
1193
  const n = w.uEnc(t);
1194
- return Ne(n.lo, n.hi, this.buf), this;
1194
+ return Te(n.lo, n.hi, this.buf), this;
1195
1195
  }
1196
1196
  }
1197
- class Ms {
1198
- constructor(t, n = We().decodeUtf8) {
1199
- this.decodeUtf8 = n, this.varint64 = gs, this.uint32 = ws, this.buf = t, this.len = t.length, this.pos = 0, this.view = new DataView(t.buffer, t.byteOffset, t.byteLength);
1197
+ class Ks {
1198
+ constructor(t, n = qe().decodeUtf8) {
1199
+ this.decodeUtf8 = n, this.varint64 = vs, this.uint32 = Os, this.buf = t, this.len = t.length, this.pos = 0, this.view = new DataView(t.buffer, t.byteOffset, t.byteLength);
1200
1200
  }
1201
1201
  /**
1202
1202
  * Reads a tag - field number and wire type. Tags are uint32 varints; values
@@ -1351,82 +1351,82 @@ class Ms {
1351
1351
  return this.decodeUtf8(this.bytes(), t);
1352
1352
  }
1353
1353
  }
1354
- function ke(e) {
1354
+ function Ae(e) {
1355
1355
  if (typeof e == "string")
1356
1356
  e = Number(e);
1357
1357
  else if (typeof e != "number")
1358
1358
  throw new Error("invalid int32: " + typeof e);
1359
- if (!Number.isInteger(e) || e > An || e < Rn)
1359
+ if (!Number.isInteger(e) || e > On || e < Cn)
1360
1360
  throw new Error("invalid int32: " + e);
1361
1361
  }
1362
- function bt(e) {
1362
+ function Et(e) {
1363
1363
  if (typeof e == "string")
1364
1364
  e = Number(e);
1365
1365
  else if (typeof e != "number")
1366
1366
  throw new Error("invalid uint32: " + typeof e);
1367
- if (!Number.isInteger(e) || e > kn || e < 0)
1367
+ if (!Number.isInteger(e) || e > _n || e < 0)
1368
1368
  throw new Error("invalid uint32: " + e);
1369
1369
  }
1370
- function xs(e) {
1370
+ function js(e) {
1371
1371
  if (typeof e == "string") {
1372
1372
  const t = e;
1373
1373
  if (e = Number(e), Number.isNaN(e) && t !== "NaN")
1374
1374
  throw new Error("invalid float32: " + t);
1375
1375
  } else if (typeof e != "number")
1376
1376
  throw new Error("invalid float32: " + typeof e);
1377
- if (Number.isFinite(e) && (e > Tn || e < Sn))
1377
+ if (Number.isFinite(e) && (e > vn || e < Rn))
1378
1378
  throw new Error("invalid float32: " + e);
1379
1379
  }
1380
- function Fs(e, t) {
1381
- const n = e.fieldKind == "list" ? Be(t, e) : e.fieldKind == "map" ? Ye(t, e) : je(e, t);
1380
+ function Ws(e, t) {
1381
+ const n = e.fieldKind == "list" ? $e(t, e) : e.fieldKind == "map" ? Xe(t, e) : He(e, t);
1382
1382
  if (n === !0)
1383
1383
  return;
1384
1384
  let s;
1385
1385
  switch (e.fieldKind) {
1386
1386
  case "list":
1387
- s = `expected ${vn(e)}, got ${de(t)}`;
1387
+ s = `expected ${Un(e)}, got ${he(t)}`;
1388
1388
  break;
1389
1389
  case "map":
1390
- s = `expected ${On(e)}, got ${de(t)}`;
1390
+ s = `expected ${Ln(e)}, got ${he(t)}`;
1391
1391
  break;
1392
1392
  default:
1393
- s = le(e, t, n);
1393
+ s = de(e, t, n);
1394
1394
  }
1395
1395
  return new $(e, s);
1396
1396
  }
1397
- function gt(e, t, n) {
1398
- const s = je(e, n);
1397
+ function yt(e, t, n) {
1398
+ const s = He(e, n);
1399
1399
  if (s !== !0)
1400
- return new $(e, `list item #${t + 1}: ${le(e, n, s)}`);
1400
+ return new $(e, `list item #${t + 1}: ${de(e, n, s)}`);
1401
1401
  }
1402
- function Ps(e, t, n) {
1403
- const s = De(t, e.mapKey);
1402
+ function qs(e, t, n) {
1403
+ const s = Le(t, e.mapKey);
1404
1404
  if (s !== !0)
1405
- return new $(e, `invalid map key: ${le({ scalar: e.mapKey }, t, s)}`);
1406
- const r = je(e, n);
1405
+ return new $(e, `invalid map key: ${de({ scalar: e.mapKey }, t, s)}`);
1406
+ const r = He(e, n);
1407
1407
  if (r !== !0)
1408
- return new $(e, `map entry ${de(t)}: ${le(e, n, r)}`);
1408
+ return new $(e, `map entry ${he(t)}: ${de(e, n, r)}`);
1409
1409
  }
1410
- function je(e, t) {
1411
- return e.scalar !== void 0 ? De(t, e.scalar) : e.enum !== void 0 ? e.enum.open ? De(t, c.INT32) : e.enum.values.some((n) => n.number === t) : $e(t, e.message);
1410
+ function He(e, t) {
1411
+ return e.scalar !== void 0 ? Le(t, e.scalar) : e.enum !== void 0 ? e.enum.open ? Le(t, c.INT32) : e.enum.values.some((n) => n.number === t) : Ke(t, e.message);
1412
1412
  }
1413
- function De(e, t) {
1413
+ function Le(e, t) {
1414
1414
  switch (t) {
1415
1415
  case c.DOUBLE:
1416
1416
  return typeof e == "number";
1417
1417
  case c.FLOAT:
1418
- return typeof e != "number" ? !1 : Number.isNaN(e) || !Number.isFinite(e) ? !0 : e > Tn || e < Sn ? `${e.toFixed()} out of range` : !0;
1418
+ return typeof e != "number" ? !1 : Number.isNaN(e) || !Number.isFinite(e) ? !0 : e > vn || e < Rn ? `${e.toFixed()} out of range` : !0;
1419
1419
  case c.INT32:
1420
1420
  case c.SFIXED32:
1421
1421
  case c.SINT32:
1422
- return typeof e != "number" || !Number.isInteger(e) ? !1 : e > An || e < Rn ? `${e.toFixed()} out of range` : !0;
1422
+ return typeof e != "number" || !Number.isInteger(e) ? !1 : e > On || e < Cn ? `${e.toFixed()} out of range` : !0;
1423
1423
  case c.FIXED32:
1424
1424
  case c.UINT32:
1425
- return typeof e != "number" || !Number.isInteger(e) ? !1 : e > kn || e < 0 ? `${e.toFixed()} out of range` : !0;
1425
+ return typeof e != "number" || !Number.isInteger(e) ? !1 : e > _n || e < 0 ? `${e.toFixed()} out of range` : !0;
1426
1426
  case c.BOOL:
1427
1427
  return typeof e == "boolean";
1428
1428
  case c.STRING:
1429
- return typeof e != "string" ? !1 : We().checkUtf8(e) || "invalid UTF8";
1429
+ return typeof e != "string" ? !1 : qe().checkUtf8(e) || "invalid UTF8";
1430
1430
  case c.BYTES:
1431
1431
  return e instanceof Uint8Array;
1432
1432
  case c.INT64:
@@ -1450,13 +1450,13 @@ function De(e, t) {
1450
1450
  return !1;
1451
1451
  }
1452
1452
  }
1453
- function le(e, t, n) {
1454
- return n = typeof n == "string" ? `: ${n}` : `, got ${de(t)}`, e.scalar !== void 0 ? `expected ${Vs(e.scalar)}` + n : e.enum !== void 0 ? `expected ${e.enum.toString()}` + n : `expected ${_n(e.message)}` + n;
1453
+ function de(e, t, n) {
1454
+ return n = typeof n == "string" ? `: ${n}` : `, got ${he(t)}`, e.scalar !== void 0 ? `expected ${Hs(e.scalar)}` + n : e.enum !== void 0 ? `expected ${e.enum.toString()}` + n : `expected ${Dn(e.message)}` + n;
1455
1455
  }
1456
- function de(e) {
1456
+ function he(e) {
1457
1457
  switch (typeof e) {
1458
1458
  case "object":
1459
- return e === null ? "null" : e instanceof Uint8Array ? `Uint8Array(${e.length})` : Array.isArray(e) ? `Array(${e.length})` : Be(e) ? vn(e.field()) : Ye(e) ? On(e.field()) : $e(e) ? _n(e.desc) : Ve(e) ? `message ${e.$typeName}` : "object";
1459
+ return e === null ? "null" : e instanceof Uint8Array ? `Uint8Array(${e.length})` : Array.isArray(e) ? `Array(${e.length})` : $e(e) ? Un(e.field()) : Xe(e) ? Ln(e.field()) : Ke(e) ? Dn(e.desc) : Be(e) ? `message ${e.$typeName}` : "object";
1460
1460
  case "string":
1461
1461
  return e.length > 30 ? "string" : `"${e.split('"').join('\\"')}"`;
1462
1462
  case "boolean":
@@ -1469,10 +1469,10 @@ function de(e) {
1469
1469
  return typeof e;
1470
1470
  }
1471
1471
  }
1472
- function _n(e) {
1472
+ function Dn(e) {
1473
1473
  return `ReflectMessage (${e.typeName})`;
1474
1474
  }
1475
- function vn(e) {
1475
+ function Un(e) {
1476
1476
  switch (e.listKind) {
1477
1477
  case "message":
1478
1478
  return `ReflectList (${e.message.toString()})`;
@@ -1482,7 +1482,7 @@ function vn(e) {
1482
1482
  return `ReflectList (${c[e.scalar]})`;
1483
1483
  }
1484
1484
  }
1485
- function On(e) {
1485
+ function Ln(e) {
1486
1486
  switch (e.mapKind) {
1487
1487
  case "message":
1488
1488
  return `ReflectMap (${c[e.mapKey]}, ${e.message.toString()})`;
@@ -1492,7 +1492,7 @@ function On(e) {
1492
1492
  return `ReflectMap (${c[e.mapKey]}, ${c[e.scalar]})`;
1493
1493
  }
1494
1494
  }
1495
- function Vs(e) {
1495
+ function Hs(e) {
1496
1496
  switch (e) {
1497
1497
  case c.STRING:
1498
1498
  return "string";
@@ -1520,18 +1520,18 @@ function Vs(e) {
1520
1520
  return "number (int32)";
1521
1521
  }
1522
1522
  }
1523
- const Gs = 0;
1524
- function ge(e, t, n = !0) {
1525
- return new Cn(e, t, n);
1523
+ const Zs = 0;
1524
+ function Ee(e, t, n = !0) {
1525
+ return new Mn(e, t, n);
1526
1526
  }
1527
- const Et = /* @__PURE__ */ new WeakMap();
1528
- class Cn {
1527
+ const wt = /* @__PURE__ */ new WeakMap();
1528
+ class Mn {
1529
1529
  get sortedFields() {
1530
- const t = Et.get(this.desc);
1530
+ const t = wt.get(this.desc);
1531
1531
  if (t)
1532
1532
  return t;
1533
1533
  const n = this.desc.fields.concat().sort((s, r) => s.number - r.number);
1534
- return Et.set(this.desc, n), n;
1534
+ return wt.set(this.desc, n), n;
1535
1535
  }
1536
1536
  constructor(t, n, s = !0) {
1537
1537
  this.lists = /* @__PURE__ */ new Map(), this.maps = /* @__PURE__ */ new Map(), this.check = s, this.desc = t, this.message = this[M] = n ?? C(t), this.fields = t.fields, this.oneofs = t.oneofs, this.members = t.members;
@@ -1540,48 +1540,48 @@ class Cn {
1540
1540
  return this._fieldsByNumber || (this._fieldsByNumber = new Map(this.desc.fields.map((n) => [n.number, n]))), this._fieldsByNumber.get(t);
1541
1541
  }
1542
1542
  oneofCase(t) {
1543
- return K(this.message, t), gn(this.message, t);
1543
+ return K(this.message, t), In(this.message, t);
1544
1544
  }
1545
1545
  isSet(t) {
1546
- return K(this.message, t), Ts(this.message, t);
1546
+ return K(this.message, t), Us(this.message, t);
1547
1547
  }
1548
1548
  clear(t) {
1549
- K(this.message, t), Ss(this.message, t);
1549
+ K(this.message, t), Ls(this.message, t);
1550
1550
  }
1551
1551
  get(t) {
1552
1552
  K(this.message, t);
1553
- const n = En(this.message, t);
1553
+ const n = Nn(this.message, t);
1554
1554
  switch (t.fieldKind) {
1555
1555
  case "list":
1556
1556
  let s = this.lists.get(t);
1557
1557
  return (!s || s[M] !== n) && this.lists.set(
1558
1558
  t,
1559
1559
  // biome-ignore lint/suspicious/noAssignInExpressions: no
1560
- s = new Bs(t, n, this.check)
1560
+ s = new zs(t, n, this.check)
1561
1561
  ), s;
1562
1562
  case "map":
1563
1563
  let r = this.maps.get(t);
1564
1564
  return (!r || r[M] !== n) && this.maps.set(
1565
1565
  t,
1566
1566
  // biome-ignore lint/suspicious/noAssignInExpressions: no
1567
- r = new Ys(t, n, this.check)
1567
+ r = new Qs(t, n, this.check)
1568
1568
  ), r;
1569
1569
  case "message":
1570
- return He(t, n, this.check);
1570
+ return ze(t, n, this.check);
1571
1571
  case "scalar":
1572
- return n === void 0 ? q(t.scalar, !1) : Ze(t, n);
1572
+ return n === void 0 ? q(t.scalar, !1) : Qe(t, n);
1573
1573
  case "enum":
1574
1574
  return n ?? t.enum.values[0].number;
1575
1575
  }
1576
1576
  }
1577
1577
  set(t, n) {
1578
1578
  if (K(this.message, t), this.check) {
1579
- const r = Fs(t, n);
1579
+ const r = Ws(t, n);
1580
1580
  if (r)
1581
1581
  throw r;
1582
1582
  }
1583
1583
  let s;
1584
- t.fieldKind == "message" ? s = qe(t, n) : Ye(n) || Be(n) ? s = n[M] : s = ze(t, n), yn(this.message, t, s);
1584
+ t.fieldKind == "message" ? s = Ze(t, n) : Xe(n) || $e(n) ? s = n[M] : s = Je(t, n), Tn(this.message, t, s);
1585
1585
  }
1586
1586
  getUnknown() {
1587
1587
  return this.message.$unknown;
@@ -1594,7 +1594,7 @@ function K(e, t) {
1594
1594
  if (t.parent.typeName !== e.$typeName)
1595
1595
  throw new $(t, `cannot use ${t.toString()} with message ${e.$typeName}`, "ForeignFieldError");
1596
1596
  }
1597
- class Bs {
1597
+ class zs {
1598
1598
  field() {
1599
1599
  return this._field;
1600
1600
  }
@@ -1606,25 +1606,25 @@ class Bs {
1606
1606
  }
1607
1607
  get(t) {
1608
1608
  const n = this._arr[t];
1609
- return n === void 0 ? void 0 : Ae(this._field, n, this.check);
1609
+ return n === void 0 ? void 0 : ve(this._field, n, this.check);
1610
1610
  }
1611
1611
  set(t, n) {
1612
1612
  if (t < 0 || t >= this._arr.length)
1613
1613
  throw new $(this._field, `list item #${t + 1}: out of range`);
1614
1614
  if (this.check) {
1615
- const s = gt(this._field, t, n);
1615
+ const s = yt(this._field, t, n);
1616
1616
  if (s)
1617
1617
  throw s;
1618
1618
  }
1619
- this._arr[t] = yt(this._field, n);
1619
+ this._arr[t] = It(this._field, n);
1620
1620
  }
1621
1621
  add(t) {
1622
1622
  if (this.check) {
1623
- const n = gt(this._field, this._arr.length, t);
1623
+ const n = yt(this._field, this._arr.length, t);
1624
1624
  if (n)
1625
1625
  throw n;
1626
1626
  }
1627
- this._arr.push(yt(this._field, t));
1627
+ this._arr.push(It(this._field, t));
1628
1628
  }
1629
1629
  clear() {
1630
1630
  this._arr.splice(0, this._arr.length);
@@ -1637,14 +1637,14 @@ class Bs {
1637
1637
  }
1638
1638
  *values() {
1639
1639
  for (const t of this._arr)
1640
- yield Ae(this._field, t, this.check);
1640
+ yield ve(this._field, t, this.check);
1641
1641
  }
1642
1642
  *entries() {
1643
1643
  for (let t = 0; t < this._arr.length; t++)
1644
- yield [t, Ae(this._field, this._arr[t], this.check)];
1644
+ yield [t, ve(this._field, this._arr[t], this.check)];
1645
1645
  }
1646
1646
  }
1647
- class Ys {
1647
+ class Qs {
1648
1648
  constructor(t, n, s = !0) {
1649
1649
  this.obj = this[M] = n ?? {}, this.check = s, this._field = t;
1650
1650
  }
@@ -1653,11 +1653,11 @@ class Ys {
1653
1653
  }
1654
1654
  set(t, n) {
1655
1655
  if (this.check) {
1656
- const s = Ps(this._field, t, n);
1656
+ const s = qs(this._field, t, n);
1657
1657
  if (s)
1658
1658
  throw s;
1659
1659
  }
1660
- return this.obj[J(t)] = $s(this._field, n), this;
1660
+ return this.obj[J(t)] = Js(this._field, n), this;
1661
1661
  }
1662
1662
  delete(t) {
1663
1663
  const n = J(t), s = Object.prototype.hasOwnProperty.call(this.obj, n);
@@ -1676,12 +1676,12 @@ class Ys {
1676
1676
  }
1677
1677
  *keys() {
1678
1678
  for (const t of Object.keys(this.obj))
1679
- yield wt(t, this._field.mapKey);
1679
+ yield Nt(t, this._field.mapKey);
1680
1680
  }
1681
1681
  *entries() {
1682
1682
  for (const t of Object.entries(this.obj))
1683
1683
  yield [
1684
- wt(t[0], this._field.mapKey),
1684
+ Nt(t[0], this._field.mapKey),
1685
1685
  Re(this._field, t[1], this.check)
1686
1686
  ];
1687
1687
  }
@@ -1700,31 +1700,31 @@ class Ys {
1700
1700
  t.call(n, s[1], s[0], this);
1701
1701
  }
1702
1702
  }
1703
- function qe(e, t) {
1704
- return $e(t) ? ks(t.message) && !e.oneof && e.fieldKind == "message" ? t.message.value : t.desc.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" ? Un(t.message) : t.message : t;
1703
+ function Ze(e, t) {
1704
+ return Ke(t) ? Ms(t.message) && !e.oneof && e.fieldKind == "message" ? t.message.value : t.desc.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" ? Pn(t.message) : t.message : t;
1705
1705
  }
1706
- function He(e, t, n) {
1707
- return t !== void 0 && (wn(e.message) && !e.oneof && e.fieldKind == "message" ? t = {
1706
+ function ze(e, t, n) {
1707
+ return t !== void 0 && (Sn(e.message) && !e.oneof && e.fieldKind == "message" ? t = {
1708
1708
  $typeName: e.message.typeName,
1709
- value: Ze(e.message.fields[0], t)
1710
- } : e.message.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" && F(t) && (t = Dn(t))), new Cn(e.message, t, n);
1709
+ value: Qe(e.message.fields[0], t)
1710
+ } : e.message.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" && P(t) && (t = xn(t))), new Mn(e.message, t, n);
1711
1711
  }
1712
- function yt(e, t) {
1713
- return e.listKind == "message" ? qe(e, t) : ze(e, t);
1712
+ function It(e, t) {
1713
+ return e.listKind == "message" ? Ze(e, t) : Je(e, t);
1714
1714
  }
1715
- function Ae(e, t, n) {
1716
- return e.listKind == "message" ? He(e, t, n) : Ze(e, t);
1715
+ function ve(e, t, n) {
1716
+ return e.listKind == "message" ? ze(e, t, n) : Qe(e, t);
1717
1717
  }
1718
- function $s(e, t) {
1719
- return e.mapKind == "message" ? qe(e, t) : ze(e, t);
1718
+ function Js(e, t) {
1719
+ return e.mapKind == "message" ? Ze(e, t) : Je(e, t);
1720
1720
  }
1721
1721
  function Re(e, t, n) {
1722
- return e.mapKind == "message" ? He(e, t, n) : t;
1722
+ return e.mapKind == "message" ? ze(e, t, n) : t;
1723
1723
  }
1724
1724
  function J(e) {
1725
1725
  return typeof e == "string" || typeof e == "number" ? e : String(e);
1726
1726
  }
1727
- function wt(e, t) {
1727
+ function Nt(e, t) {
1728
1728
  switch (t) {
1729
1729
  case c.STRING:
1730
1730
  return e;
@@ -1762,7 +1762,7 @@ function wt(e, t) {
1762
1762
  }
1763
1763
  return e;
1764
1764
  }
1765
- function Ze(e, t) {
1765
+ function Qe(e, t) {
1766
1766
  switch (e.scalar) {
1767
1767
  case c.INT64:
1768
1768
  case c.SFIXED64:
@@ -1776,7 +1776,7 @@ function Ze(e, t) {
1776
1776
  }
1777
1777
  return t;
1778
1778
  }
1779
- function ze(e, t) {
1779
+ function Je(e, t) {
1780
1780
  switch (e.scalar) {
1781
1781
  case c.INT64:
1782
1782
  case c.SFIXED64:
@@ -1790,28 +1790,28 @@ function ze(e, t) {
1790
1790
  }
1791
1791
  return t;
1792
1792
  }
1793
- function Dn(e) {
1793
+ function xn(e) {
1794
1794
  const t = {
1795
1795
  $typeName: "google.protobuf.Struct",
1796
1796
  fields: {}
1797
1797
  };
1798
- if (F(e))
1798
+ if (P(e))
1799
1799
  for (const [n, s] of Object.entries(e))
1800
- t.fields[n] = Mn(s);
1800
+ t.fields[n] = Fn(s);
1801
1801
  return t;
1802
1802
  }
1803
- function Un(e) {
1803
+ function Pn(e) {
1804
1804
  const t = {};
1805
1805
  for (const [n, s] of Object.entries(e.fields))
1806
- t[n] = Ln(s);
1806
+ t[n] = Vn(s);
1807
1807
  return t;
1808
1808
  }
1809
- function Ln(e) {
1809
+ function Vn(e) {
1810
1810
  switch (e.kind.case) {
1811
1811
  case "structValue":
1812
- return Un(e.kind.value);
1812
+ return Pn(e.kind.value);
1813
1813
  case "listValue":
1814
- return e.kind.value.values.map(Ln);
1814
+ return e.kind.value.values.map(Vn);
1815
1815
  case "nullValue":
1816
1816
  case void 0:
1817
1817
  return null;
@@ -1819,7 +1819,7 @@ function Ln(e) {
1819
1819
  return e.kind.value;
1820
1820
  }
1821
1821
  }
1822
- function Mn(e) {
1822
+ function Fn(e) {
1823
1823
  const t = {
1824
1824
  $typeName: "google.protobuf.Value",
1825
1825
  kind: { case: void 0 }
@@ -1836,7 +1836,7 @@ function Mn(e) {
1836
1836
  break;
1837
1837
  case "object":
1838
1838
  if (e === null)
1839
- t.kind = { case: "nullValue", value: Gs };
1839
+ t.kind = { case: "nullValue", value: Zs };
1840
1840
  else if (Array.isArray(e)) {
1841
1841
  const n = {
1842
1842
  $typeName: "google.protobuf.ListValue",
@@ -1844,7 +1844,7 @@ function Mn(e) {
1844
1844
  };
1845
1845
  if (Array.isArray(e))
1846
1846
  for (const s of e)
1847
- n.values.push(Mn(s));
1847
+ n.values.push(Fn(s));
1848
1848
  t.kind = {
1849
1849
  case: "listValue",
1850
1850
  value: n
@@ -1852,14 +1852,14 @@ function Mn(e) {
1852
1852
  } else
1853
1853
  t.kind = {
1854
1854
  case: "structValue",
1855
- value: Dn(e)
1855
+ value: xn(e)
1856
1856
  };
1857
1857
  break;
1858
1858
  }
1859
1859
  return t;
1860
1860
  }
1861
- function Xs(e) {
1862
- const t = Ws();
1861
+ function er(e) {
1862
+ const t = nr();
1863
1863
  let n = e.length * 3 / 4;
1864
1864
  e[e.length - 2] == "=" ? n -= 2 : e[e.length - 1] == "=" && (n -= 1);
1865
1865
  let s = new Uint8Array(n), r = 0, i = 0, a, o = 0;
@@ -1900,20 +1900,20 @@ function Xs(e) {
1900
1900
  return s.subarray(0, r);
1901
1901
  }
1902
1902
  let ee, B;
1903
- function Ks(e) {
1903
+ function tr(e) {
1904
1904
  return ee || (ee = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), ee.slice(0, -2).concat("-", "_")), ee;
1905
1905
  }
1906
- function Ws() {
1906
+ function nr() {
1907
1907
  if (!B) {
1908
1908
  B = [];
1909
- const e = Ks();
1909
+ const e = tr();
1910
1910
  for (let t = 0; t < e.length; t++)
1911
1911
  B[e[t].charCodeAt(0)] = t;
1912
1912
  B[45] = e.indexOf("+"), B[95] = e.indexOf("/");
1913
1913
  }
1914
1914
  return B;
1915
1915
  }
1916
- function he(e) {
1916
+ function fe(e) {
1917
1917
  let t = !1;
1918
1918
  const n = [];
1919
1919
  for (let s = 0; s < e.length; s++) {
@@ -1941,7 +1941,7 @@ function he(e) {
1941
1941
  }
1942
1942
  return n.join("");
1943
1943
  }
1944
- const js = /* @__PURE__ */ new Set([
1944
+ const sr = /* @__PURE__ */ new Set([
1945
1945
  // names reserved by JavaScript
1946
1946
  "constructor",
1947
1947
  "toString",
@@ -1949,25 +1949,25 @@ const js = /* @__PURE__ */ new Set([
1949
1949
  "valueOf"
1950
1950
  ]);
1951
1951
  function Z(e) {
1952
- return js.has(e) ? e + "$" : e;
1952
+ return sr.has(e) ? e + "$" : e;
1953
1953
  }
1954
- function Qe(e) {
1954
+ function et(e) {
1955
1955
  for (const t of e.field)
1956
- H(t, "jsonName") || (t.jsonName = he(t.name));
1957
- e.nestedType.forEach(Qe);
1956
+ H(t, "jsonName") || (t.jsonName = fe(t.name));
1957
+ e.nestedType.forEach(et);
1958
1958
  }
1959
- function qs(e, t) {
1959
+ function rr(e, t) {
1960
1960
  const n = e.values.find((s) => s.name === t);
1961
1961
  if (!n)
1962
1962
  throw new Error(`cannot parse ${e} default value: ${t}`);
1963
1963
  return n.number;
1964
1964
  }
1965
- function Hs(e, t) {
1965
+ function ir(e, t) {
1966
1966
  switch (e) {
1967
1967
  case c.STRING:
1968
1968
  return t;
1969
1969
  case c.BYTES: {
1970
- const n = Zs(t);
1970
+ const n = ar(t);
1971
1971
  if (n === !1)
1972
1972
  throw new Error(`cannot parse ${c[e]} default value: ${t}`);
1973
1973
  return n;
@@ -2001,7 +2001,7 @@ function Hs(e, t) {
2001
2001
  return parseInt(t, 10);
2002
2002
  }
2003
2003
  }
2004
- function Zs(e) {
2004
+ function ar(e) {
2005
2005
  const t = [], n = {
2006
2006
  tail: e,
2007
2007
  c: "",
@@ -2095,27 +2095,27 @@ function Zs(e) {
2095
2095
  }
2096
2096
  return new Uint8Array(t);
2097
2097
  }
2098
- function* Ue(e) {
2098
+ function* Me(e) {
2099
2099
  switch (e.kind) {
2100
2100
  case "file":
2101
2101
  for (const t of e.messages)
2102
- yield t, yield* Ue(t);
2102
+ yield t, yield* Me(t);
2103
2103
  yield* e.enums, yield* e.services, yield* e.extensions;
2104
2104
  break;
2105
2105
  case "message":
2106
2106
  for (const t of e.nestedMessages)
2107
- yield t, yield* Ue(t);
2107
+ yield t, yield* Me(t);
2108
2108
  yield* e.nestedEnums, yield* e.nestedExtensions;
2109
2109
  break;
2110
2110
  }
2111
2111
  }
2112
- function xn(...e) {
2113
- const t = zs();
2112
+ function Gn(...e) {
2113
+ const t = or();
2114
2114
  if (!e.length)
2115
2115
  return t;
2116
2116
  if ("$typeName" in e[0] && e[0].$typeName == "google.protobuf.FileDescriptorSet") {
2117
2117
  for (const n of e[0].file)
2118
- St(n, t);
2118
+ At(n, t);
2119
2119
  return t;
2120
2120
  }
2121
2121
  if ("$typeName" in e[0]) {
@@ -2133,14 +2133,14 @@ function xn(...e) {
2133
2133
  };
2134
2134
  const n = e[0], s = e[1], r = /* @__PURE__ */ new Set();
2135
2135
  for (const a of [n, ...i(n)].reverse())
2136
- St(a, t);
2136
+ At(a, t);
2137
2137
  } else
2138
2138
  for (const n of e)
2139
2139
  for (const s of n.files)
2140
2140
  t.addFile(s);
2141
2141
  return t;
2142
2142
  }
2143
- function zs() {
2143
+ function or() {
2144
2144
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
2145
2145
  return {
2146
2146
  kind: "registry",
@@ -2154,7 +2154,7 @@ function zs() {
2154
2154
  },
2155
2155
  addFile(s, r, i) {
2156
2156
  if (n.set(s.proto.name, s), !r)
2157
- for (const a of Ue(s))
2157
+ for (const a of Me(s))
2158
2158
  this.add(a);
2159
2159
  if (i)
2160
2160
  for (const a of s.dependencies)
@@ -2199,7 +2199,7 @@ function zs() {
2199
2199
  }
2200
2200
  };
2201
2201
  }
2202
- const Qs = 998, Js = 999, er = 9999, tr = 9, z = 10, j = 11, nr = 12, It = 14, Je = 3, sr = 2, Nt = 1, rr = 0, _e = 1, Tt = 2, ir = 3, ar = 1, or = 2, cr = 1, ur = 2, lr = 1001, Fn = {
2202
+ const cr = 998, ur = 999, lr = 9999, dr = 9, z = 10, W = 11, hr = 12, Tt = 14, tt = 3, fr = 2, St = 1, mr = 0, _e = 1, kt = 2, pr = 3, gr = 1, br = 2, Er = 1, yr = 2, wr = 1001, Bn = {
2203
2203
  // EDITION_PROTO2
2204
2204
  998: {
2205
2205
  fieldPresence: 1,
@@ -2277,15 +2277,15 @@ const Qs = 998, Js = 999, er = 9999, tr = 9, z = 10, j = 11, nr = 12, It = 14, J
2277
2277
  // EXPORT_TOP_LEVEL,
2278
2278
  }
2279
2279
  };
2280
- function St(e, t) {
2280
+ function At(e, t) {
2281
2281
  var n, s;
2282
2282
  const r = {
2283
2283
  kind: "file",
2284
2284
  proto: e,
2285
2285
  deprecated: (s = (n = e.options) === null || n === void 0 ? void 0 : n.deprecated) !== null && s !== void 0 ? s : !1,
2286
- edition: mr(e),
2286
+ edition: Sr(e),
2287
2287
  name: e.name.replace(/\.proto$/, ""),
2288
- dependencies: pr(e, t),
2288
+ dependencies: kr(e, t),
2289
2289
  enums: [],
2290
2290
  messages: [],
2291
2291
  extensions: [],
@@ -2303,50 +2303,50 @@ function St(e, t) {
2303
2303
  }
2304
2304
  };
2305
2305
  for (const o of e.enumType)
2306
- Pn(o, r, void 0, t);
2306
+ Yn(o, r, void 0, t);
2307
2307
  for (const o of e.messageType)
2308
- Vn(o, r, void 0, t, a);
2308
+ $n(o, r, void 0, t, a);
2309
2309
  for (const o of e.service)
2310
- dr(o, r, t);
2311
- Le(r, t);
2310
+ Ir(o, r, t);
2311
+ xe(r, t);
2312
2312
  for (const o of i.values())
2313
- Me(o, t, a);
2313
+ Pe(o, t, a);
2314
2314
  for (const o of r.messages)
2315
- Me(o, t, a), Le(o, t);
2315
+ Pe(o, t, a), xe(o, t);
2316
2316
  t.addFile(r, !0);
2317
2317
  }
2318
- function Le(e, t) {
2318
+ function xe(e, t) {
2319
2319
  switch (e.kind) {
2320
2320
  case "file":
2321
2321
  for (const n of e.proto.extension) {
2322
- const s = xe(n, e, t);
2322
+ const s = Ve(n, e, t);
2323
2323
  e.extensions.push(s), t.add(s);
2324
2324
  }
2325
2325
  break;
2326
2326
  case "message":
2327
2327
  for (const n of e.proto.extension) {
2328
- const s = xe(n, e, t);
2328
+ const s = Ve(n, e, t);
2329
2329
  e.nestedExtensions.push(s), t.add(s);
2330
2330
  }
2331
2331
  for (const n of e.nestedMessages)
2332
- Le(n, t);
2332
+ xe(n, t);
2333
2333
  break;
2334
2334
  }
2335
2335
  }
2336
- function Me(e, t, n) {
2337
- const s = e.proto.oneofDecl.map((i) => fr(i, e)), r = /* @__PURE__ */ new Set();
2336
+ function Pe(e, t, n) {
2337
+ const s = e.proto.oneofDecl.map((i) => Tr(i, e)), r = /* @__PURE__ */ new Set();
2338
2338
  for (const i of e.proto.field) {
2339
- const a = Er(i, s), o = xe(i, e, t, a, n);
2339
+ const a = Rr(i, s), o = Ve(i, e, t, a, n);
2340
2340
  e.fields.push(o), e.field[o.localName] = o, a === void 0 ? e.members.push(o) : (a.fields.push(o), r.has(a) || (r.add(a), e.members.push(a)));
2341
2341
  }
2342
2342
  for (const i of s.filter((a) => r.has(a)))
2343
2343
  e.oneofs.push(i);
2344
2344
  for (const i of e.nestedMessages)
2345
- Me(i, t, n);
2345
+ Pe(i, t, n);
2346
2346
  }
2347
- function Pn(e, t, n, s) {
2347
+ function Yn(e, t, n, s) {
2348
2348
  var r, i, a, o, l;
2349
- const u = br(e.name, e.value), d = {
2349
+ const u = Ar(e.name, e.value), d = {
2350
2350
  kind: "enum",
2351
2351
  proto: e,
2352
2352
  deprecated: (i = (r = e.options) === null || r === void 0 ? void 0 : r.deprecated) !== null && i !== void 0 ? i : !1,
@@ -2354,7 +2354,7 @@ function Pn(e, t, n, s) {
2354
2354
  parent: n,
2355
2355
  open: !0,
2356
2356
  name: e.name,
2357
- typeName: Ee(e, n, t),
2357
+ typeName: ye(e, n, t),
2358
2358
  value: {},
2359
2359
  values: [],
2360
2360
  sharedPrefix: u,
@@ -2362,7 +2362,7 @@ function Pn(e, t, n, s) {
2362
2362
  return `enum ${this.typeName}`;
2363
2363
  }
2364
2364
  };
2365
- d.open = Nr(d), s.add(d);
2365
+ d.open = Dr(d), s.add(d);
2366
2366
  for (const f of e.value) {
2367
2367
  const p = f.name;
2368
2368
  d.values.push(
@@ -2383,7 +2383,7 @@ function Pn(e, t, n, s) {
2383
2383
  }
2384
2384
  ((l = n?.nestedEnums) !== null && l !== void 0 ? l : t.enums).push(d);
2385
2385
  }
2386
- function Vn(e, t, n, s, r) {
2386
+ function $n(e, t, n, s, r) {
2387
2387
  var i, a, o, l;
2388
2388
  const u = {
2389
2389
  kind: "message",
@@ -2392,7 +2392,7 @@ function Vn(e, t, n, s, r) {
2392
2392
  file: t,
2393
2393
  parent: n,
2394
2394
  name: e.name,
2395
- typeName: Ee(e, n, t),
2395
+ typeName: ye(e, n, t),
2396
2396
  fields: [],
2397
2397
  field: {},
2398
2398
  oneofs: [],
@@ -2406,11 +2406,11 @@ function Vn(e, t, n, s, r) {
2406
2406
  };
2407
2407
  ((o = e.options) === null || o === void 0 ? void 0 : o.mapEntry) === !0 ? r.add(u) : (((l = n?.nestedMessages) !== null && l !== void 0 ? l : t.messages).push(u), s.add(u));
2408
2408
  for (const d of e.enumType)
2409
- Pn(d, t, u, s);
2409
+ Yn(d, t, u, s);
2410
2410
  for (const d of e.nestedType)
2411
- Vn(d, t, u, s, r);
2411
+ $n(d, t, u, s, r);
2412
2412
  }
2413
- function dr(e, t, n) {
2413
+ function Ir(e, t, n) {
2414
2414
  var s, r;
2415
2415
  const i = {
2416
2416
  kind: "service",
@@ -2418,7 +2418,7 @@ function dr(e, t, n) {
2418
2418
  deprecated: (r = (s = e.options) === null || s === void 0 ? void 0 : s.deprecated) !== null && r !== void 0 ? r : !1,
2419
2419
  file: t,
2420
2420
  name: e.name,
2421
- typeName: Ee(e, void 0, t),
2421
+ typeName: ye(e, void 0, t),
2422
2422
  methods: [],
2423
2423
  method: {},
2424
2424
  toString() {
@@ -2427,11 +2427,11 @@ function dr(e, t, n) {
2427
2427
  };
2428
2428
  t.services.push(i), n.add(i);
2429
2429
  for (const a of e.method) {
2430
- const o = hr(a, i, n);
2430
+ const o = Nr(a, i, n);
2431
2431
  i.methods.push(o), i.method[o.localName] = o;
2432
2432
  }
2433
2433
  }
2434
- function hr(e, t, n) {
2434
+ function Nr(e, t, n) {
2435
2435
  var s, r, i, a;
2436
2436
  let o;
2437
2437
  e.clientStreaming && e.serverStreaming ? o = "bidi_streaming" : e.clientStreaming ? o = "client_streaming" : e.serverStreaming ? o = "server_streaming" : o = "unary";
@@ -2448,13 +2448,13 @@ function hr(e, t, n) {
2448
2448
  methodKind: o,
2449
2449
  input: l,
2450
2450
  output: u,
2451
- idempotency: (a = (i = e.options) === null || i === void 0 ? void 0 : i.idempotencyLevel) !== null && a !== void 0 ? a : rr,
2451
+ idempotency: (a = (i = e.options) === null || i === void 0 ? void 0 : i.idempotencyLevel) !== null && a !== void 0 ? a : mr,
2452
2452
  toString() {
2453
2453
  return `rpc ${t.typeName}.${d}`;
2454
2454
  }
2455
2455
  };
2456
2456
  }
2457
- function fr(e, t) {
2457
+ function Tr(e, t) {
2458
2458
  return {
2459
2459
  kind: "oneof",
2460
2460
  proto: e,
@@ -2462,13 +2462,13 @@ function fr(e, t) {
2462
2462
  parent: t,
2463
2463
  fields: [],
2464
2464
  name: e.name,
2465
- localName: Z(he(e.name)),
2465
+ localName: Z(fe(e.name)),
2466
2466
  toString() {
2467
2467
  return `oneof ${t.typeName}.${this.name}`;
2468
2468
  }
2469
2469
  };
2470
2470
  }
2471
- function xe(e, t, n, s, r) {
2471
+ function Ve(e, t, n, s, r) {
2472
2472
  var i, a, o;
2473
2473
  const l = r === void 0, u = {
2474
2474
  kind: "field",
@@ -2479,8 +2479,8 @@ function xe(e, t, n, s, r) {
2479
2479
  scalar: void 0,
2480
2480
  message: void 0,
2481
2481
  enum: void 0,
2482
- presence: yr(e, s, l, t),
2483
- utf8Validation: Tr(e, t),
2482
+ presence: _r(e, s, l, t),
2483
+ utf8Validation: Ur(e, t),
2484
2484
  listKind: void 0,
2485
2485
  mapKind: void 0,
2486
2486
  mapKey: void 0,
@@ -2490,72 +2490,72 @@ function xe(e, t, n, s, r) {
2490
2490
  getDefaultValue: void 0
2491
2491
  };
2492
2492
  if (l) {
2493
- const m = t.kind == "file" ? t : t.file, g = t.kind == "file" ? void 0 : t, E = Ee(e, g, m);
2494
- u.kind = "extension", u.file = m, u.parent = g, u.oneof = void 0, u.typeName = E, u.jsonName = `[${E}]`, u.toString = () => `extension ${E}`;
2493
+ const m = t.kind == "file" ? t : t.file, b = t.kind == "file" ? void 0 : t, E = ye(e, b, m);
2494
+ u.kind = "extension", u.file = m, u.parent = b, u.oneof = void 0, u.typeName = E, u.jsonName = `[${E}]`, u.toString = () => `extension ${E}`;
2495
2495
  const x = n.getMessage(D(e.extendee));
2496
2496
  A(x, `invalid FieldDescriptorProto: extendee ${e.extendee} not found`), u.extendee = x;
2497
2497
  } else {
2498
2498
  const m = t;
2499
- A(m.kind == "message"), u.parent = m, u.oneof = s, u.localName = s ? he(e.name) : Z(he(e.name)), u.jsonName = e.jsonName, u.toString = () => `field ${m.typeName}.${e.name}`;
2499
+ A(m.kind == "message"), u.parent = m, u.oneof = s, u.localName = s ? fe(e.name) : Z(fe(e.name)), u.jsonName = e.jsonName, u.toString = () => `field ${m.typeName}.${e.name}`;
2500
2500
  }
2501
2501
  const d = e.label, f = e.type, p = (o = e.options) === null || o === void 0 ? void 0 : o.jstype;
2502
- if (d === Je) {
2503
- const m = f == j ? r?.get(D(e.typeName)) : void 0;
2502
+ if (d === tt) {
2503
+ const m = f == W ? r?.get(D(e.typeName)) : void 0;
2504
2504
  if (m) {
2505
2505
  u.fieldKind = "map";
2506
- const { key: g, value: E } = Ir(m);
2507
- return u.mapKey = g.scalar, u.mapKind = E.fieldKind, u.message = E.message, u.delimitedEncoding = !1, u.enum = E.enum, u.scalar = E.scalar, u;
2506
+ const { key: b, value: E } = Cr(m);
2507
+ return u.mapKey = b.scalar, u.mapKind = E.fieldKind, u.message = E.message, u.delimitedEncoding = !1, u.enum = E.enum, u.scalar = E.scalar, u;
2508
2508
  }
2509
2509
  switch (u.fieldKind = "list", f) {
2510
- case j:
2510
+ case W:
2511
2511
  case z:
2512
- u.listKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message), u.delimitedEncoding = kt(e, t);
2512
+ u.listKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message), u.delimitedEncoding = vt(e, t);
2513
2513
  break;
2514
- case It:
2514
+ case Tt:
2515
2515
  u.listKind = "enum", u.enum = n.getEnum(D(e.typeName)), A(u.enum);
2516
2516
  break;
2517
2517
  default:
2518
- u.listKind = "scalar", u.scalar = f, u.longAsString = p == Nt;
2518
+ u.listKind = "scalar", u.scalar = f, u.longAsString = p == St;
2519
2519
  break;
2520
2520
  }
2521
- return u.packed = wr(e, t), u;
2521
+ return u.packed = Or(e, t), u;
2522
2522
  }
2523
2523
  switch (f) {
2524
- case j:
2524
+ case W:
2525
2525
  case z:
2526
- u.fieldKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.delimitedEncoding = kt(e, t), u.getDefaultValue = () => {
2526
+ u.fieldKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.delimitedEncoding = vt(e, t), u.getDefaultValue = () => {
2527
2527
  };
2528
2528
  break;
2529
- case It: {
2529
+ case Tt: {
2530
2530
  const m = n.getEnum(D(e.typeName));
2531
- A(m !== void 0, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.fieldKind = "enum", u.enum = n.getEnum(D(e.typeName)), u.getDefaultValue = () => H(e, "defaultValue") ? qs(m, e.defaultValue) : void 0;
2531
+ A(m !== void 0, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.fieldKind = "enum", u.enum = n.getEnum(D(e.typeName)), u.getDefaultValue = () => H(e, "defaultValue") ? rr(m, e.defaultValue) : void 0;
2532
2532
  break;
2533
2533
  }
2534
2534
  default: {
2535
- u.fieldKind = "scalar", u.scalar = f, u.longAsString = p == Nt, u.getDefaultValue = () => H(e, "defaultValue") ? Hs(f, e.defaultValue) : void 0;
2535
+ u.fieldKind = "scalar", u.scalar = f, u.longAsString = p == St, u.getDefaultValue = () => H(e, "defaultValue") ? ir(f, e.defaultValue) : void 0;
2536
2536
  break;
2537
2537
  }
2538
2538
  }
2539
2539
  return u;
2540
2540
  }
2541
- function mr(e) {
2541
+ function Sr(e) {
2542
2542
  switch (e.syntax) {
2543
2543
  case "":
2544
2544
  case "proto2":
2545
- return Qs;
2545
+ return cr;
2546
2546
  case "proto3":
2547
- return Js;
2547
+ return ur;
2548
2548
  case "editions":
2549
- if (e.edition === er)
2550
- return lr;
2551
- if (e.edition in Fn)
2549
+ if (e.edition === lr)
2550
+ return wr;
2551
+ if (e.edition in Bn)
2552
2552
  return e.edition;
2553
2553
  throw new Error(`${e.name}: unsupported edition`);
2554
2554
  default:
2555
2555
  throw new Error(`${e.name}: unsupported syntax "${e.syntax}"`);
2556
2556
  }
2557
2557
  }
2558
- function pr(e, t) {
2558
+ function kr(e, t) {
2559
2559
  return e.dependency.map((n) => {
2560
2560
  const s = t.getFile(n);
2561
2561
  if (!s)
@@ -2563,8 +2563,8 @@ function pr(e, t) {
2563
2563
  return s;
2564
2564
  });
2565
2565
  }
2566
- function br(e, t) {
2567
- const n = gr(e) + "_";
2566
+ function Ar(e, t) {
2567
+ const n = vr(e) + "_";
2568
2568
  for (const s of t) {
2569
2569
  if (!s.name.toLowerCase().startsWith(n))
2570
2570
  return;
@@ -2574,72 +2574,72 @@ function br(e, t) {
2574
2574
  }
2575
2575
  return n;
2576
2576
  }
2577
- function gr(e) {
2577
+ function vr(e) {
2578
2578
  return (e.substring(0, 1) + e.substring(1).replace(/[A-Z]/g, (t) => "_" + t)).toLowerCase();
2579
2579
  }
2580
- function Ee(e, t, n) {
2580
+ function ye(e, t, n) {
2581
2581
  let s;
2582
2582
  return t ? s = `${t.typeName}.${e.name}` : n.proto.package.length > 0 ? s = `${n.proto.package}.${e.name}` : s = `${e.name}`, s;
2583
2583
  }
2584
2584
  function D(e) {
2585
2585
  return e.startsWith(".") ? e.substring(1) : e;
2586
2586
  }
2587
- function Er(e, t) {
2587
+ function Rr(e, t) {
2588
2588
  if (!H(e, "oneofIndex") || e.proto3Optional)
2589
2589
  return;
2590
2590
  const n = t[e.oneofIndex];
2591
2591
  return A(n, `invalid FieldDescriptorProto: oneof #${e.oneofIndex} for field #${e.number} not found`), n;
2592
2592
  }
2593
- function yr(e, t, n, s) {
2594
- if (e.label == sr)
2595
- return ir;
2596
- if (e.label == Je)
2597
- return Tt;
2593
+ function _r(e, t, n, s) {
2594
+ if (e.label == fr)
2595
+ return pr;
2596
+ if (e.label == tt)
2597
+ return kt;
2598
2598
  if (t || e.proto3Optional || n)
2599
2599
  return _e;
2600
- const r = V("fieldPresence", { proto: e, parent: s });
2601
- return r == Tt && (e.type == j || e.type == z) ? _e : r;
2600
+ const r = F("fieldPresence", { proto: e, parent: s });
2601
+ return r == kt && (e.type == W || e.type == z) ? _e : r;
2602
2602
  }
2603
- function wr(e, t) {
2604
- if (e.label != Je)
2603
+ function Or(e, t) {
2604
+ if (e.label != tt)
2605
2605
  return !1;
2606
2606
  switch (e.type) {
2607
- case tr:
2608
- case nr:
2607
+ case dr:
2608
+ case hr:
2609
2609
  case z:
2610
- case j:
2610
+ case W:
2611
2611
  return !1;
2612
2612
  }
2613
2613
  const n = e.options;
2614
- return n && H(n, "packed") ? n.packed : ar == V("repeatedFieldEncoding", {
2614
+ return n && H(n, "packed") ? n.packed : gr == F("repeatedFieldEncoding", {
2615
2615
  proto: e,
2616
2616
  parent: t
2617
2617
  });
2618
2618
  }
2619
- function Ir(e) {
2619
+ function Cr(e) {
2620
2620
  const t = e.fields.find((s) => s.number === 1), n = e.fields.find((s) => s.number === 2);
2621
2621
  return A(t && t.fieldKind == "scalar" && t.scalar != c.BYTES && t.scalar != c.FLOAT && t.scalar != c.DOUBLE && n && n.fieldKind != "list" && n.fieldKind != "map"), { key: t, value: n };
2622
2622
  }
2623
- function Nr(e) {
2623
+ function Dr(e) {
2624
2624
  var t;
2625
- return cr == V("enumType", {
2625
+ return Er == F("enumType", {
2626
2626
  proto: e.proto,
2627
2627
  parent: (t = e.parent) !== null && t !== void 0 ? t : e.file
2628
2628
  });
2629
2629
  }
2630
- function kt(e, t) {
2631
- return e.type == z ? !0 : or == V("messageEncoding", {
2630
+ function vt(e, t) {
2631
+ return e.type == z ? !0 : br == F("messageEncoding", {
2632
2632
  proto: e,
2633
2633
  parent: t
2634
2634
  });
2635
2635
  }
2636
- function Tr(e, t) {
2637
- return ur == V("utf8Validation", {
2636
+ function Ur(e, t) {
2637
+ return yr == F("utf8Validation", {
2638
2638
  proto: e,
2639
2639
  parent: t
2640
2640
  });
2641
2641
  }
2642
- function V(e, t) {
2642
+ function F(e, t) {
2643
2643
  var n, s;
2644
2644
  const r = (n = t.proto.options) === null || n === void 0 ? void 0 : n.features;
2645
2645
  if (r) {
@@ -2649,47 +2649,47 @@ function V(e, t) {
2649
2649
  }
2650
2650
  if ("kind" in t) {
2651
2651
  if (t.kind == "message")
2652
- return V(e, (s = t.parent) !== null && s !== void 0 ? s : t.file);
2653
- const i = Fn[t.edition];
2652
+ return F(e, (s = t.parent) !== null && s !== void 0 ? s : t.file);
2653
+ const i = Bn[t.edition];
2654
2654
  if (!i)
2655
2655
  throw new Error(`feature default for edition ${t.edition} not found`);
2656
2656
  return i[e];
2657
2657
  }
2658
- return V(e, t.parent);
2658
+ return F(e, t.parent);
2659
2659
  }
2660
2660
  function A(e, t) {
2661
2661
  if (!e)
2662
2662
  throw new Error(t);
2663
2663
  }
2664
- function Sr(e) {
2665
- const t = kr(e);
2666
- return t.messageType.forEach(Qe), xn(t, () => {
2664
+ function Lr(e) {
2665
+ const t = Mr(e);
2666
+ return t.messageType.forEach(et), Gn(t, () => {
2667
2667
  }).getFile(t.name);
2668
2668
  }
2669
- function kr(e) {
2669
+ function Mr(e) {
2670
2670
  return Object.assign(/* @__PURE__ */ Object.create({
2671
2671
  syntax: "",
2672
2672
  edition: 0
2673
- }), Object.assign(Object.assign({ $typeName: "google.protobuf.FileDescriptorProto", dependency: [], publicDependency: [], weakDependency: [], optionDependency: [], service: [], extension: [] }, e), { messageType: e.messageType.map(Gn), enumType: e.enumType.map(Bn) }));
2673
+ }), Object.assign(Object.assign({ $typeName: "google.protobuf.FileDescriptorProto", dependency: [], publicDependency: [], weakDependency: [], optionDependency: [], service: [], extension: [] }, e), { messageType: e.messageType.map(Xn), enumType: e.enumType.map(Kn) }));
2674
2674
  }
2675
- function Gn(e) {
2675
+ function Xn(e) {
2676
2676
  var t, n, s, r, i, a, o, l;
2677
2677
  return Object.assign(/* @__PURE__ */ Object.create({
2678
2678
  visibility: 0
2679
2679
  }), {
2680
2680
  $typeName: "google.protobuf.DescriptorProto",
2681
2681
  name: e.name,
2682
- field: (n = (t = e.field) === null || t === void 0 ? void 0 : t.map(Ar)) !== null && n !== void 0 ? n : [],
2682
+ field: (n = (t = e.field) === null || t === void 0 ? void 0 : t.map(xr)) !== null && n !== void 0 ? n : [],
2683
2683
  extension: [],
2684
- nestedType: (r = (s = e.nestedType) === null || s === void 0 ? void 0 : s.map(Gn)) !== null && r !== void 0 ? r : [],
2685
- enumType: (a = (i = e.enumType) === null || i === void 0 ? void 0 : i.map(Bn)) !== null && a !== void 0 ? a : [],
2684
+ nestedType: (r = (s = e.nestedType) === null || s === void 0 ? void 0 : s.map(Xn)) !== null && r !== void 0 ? r : [],
2685
+ enumType: (a = (i = e.enumType) === null || i === void 0 ? void 0 : i.map(Kn)) !== null && a !== void 0 ? a : [],
2686
2686
  extensionRange: (l = (o = e.extensionRange) === null || o === void 0 ? void 0 : o.map((d) => Object.assign({ $typeName: "google.protobuf.DescriptorProto.ExtensionRange" }, d))) !== null && l !== void 0 ? l : [],
2687
2687
  oneofDecl: [],
2688
2688
  reservedRange: [],
2689
2689
  reservedName: []
2690
2690
  });
2691
2691
  }
2692
- function Ar(e) {
2692
+ function xr(e) {
2693
2693
  return Object.assign(/* @__PURE__ */ Object.create({
2694
2694
  label: 1,
2695
2695
  typeName: "",
@@ -2698,9 +2698,9 @@ function Ar(e) {
2698
2698
  oneofIndex: 0,
2699
2699
  jsonName: "",
2700
2700
  proto3Optional: !1
2701
- }), Object.assign(Object.assign({ $typeName: "google.protobuf.FieldDescriptorProto" }, e), { options: e.options ? Rr(e.options) : void 0 }));
2701
+ }), Object.assign(Object.assign({ $typeName: "google.protobuf.FieldDescriptorProto" }, e), { options: e.options ? Pr(e.options) : void 0 }));
2702
2702
  }
2703
- function Rr(e) {
2703
+ function Pr(e) {
2704
2704
  var t, n, s;
2705
2705
  return Object.assign(/* @__PURE__ */ Object.create({
2706
2706
  ctype: 0,
@@ -2714,7 +2714,7 @@ function Rr(e) {
2714
2714
  retention: 0
2715
2715
  }), Object.assign(Object.assign({ $typeName: "google.protobuf.FieldOptions" }, e), { targets: (t = e.targets) !== null && t !== void 0 ? t : [], editionDefaults: (s = (n = e.editionDefaults) === null || n === void 0 ? void 0 : n.map((i) => Object.assign({ $typeName: "google.protobuf.FieldOptions.EditionDefault" }, i))) !== null && s !== void 0 ? s : [], uninterpretedOption: [] }));
2716
2716
  }
2717
- function Bn(e) {
2717
+ function Kn(e) {
2718
2718
  return Object.assign(/* @__PURE__ */ Object.create({
2719
2719
  visibility: 0
2720
2720
  }), {
@@ -2725,98 +2725,98 @@ function Bn(e) {
2725
2725
  value: e.value.map((n) => Object.assign({ $typeName: "google.protobuf.EnumValueDescriptorProto" }, n))
2726
2726
  });
2727
2727
  }
2728
- function R(e, t, ...n) {
2728
+ function v(e, t, ...n) {
2729
2729
  return n.reduce((s, r) => s.nestedMessages[r], e.messages[t]);
2730
2730
  }
2731
- const _r = /* @__PURE__ */ Sr({ name: "google/protobuf/descriptor.proto", package: "google.protobuf", messageType: [{ name: "FileDescriptorSet", field: [{ name: "file", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FileDescriptorProto" }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "FileDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "package", number: 2, type: 9, label: 1 }, { name: "dependency", number: 3, type: 9, label: 3 }, { name: "public_dependency", number: 10, type: 5, label: 3 }, { name: "weak_dependency", number: 11, type: 5, label: 3 }, { name: "option_dependency", number: 15, type: 9, label: 3 }, { name: "message_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 5, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "service", number: 6, type: 11, label: 3, typeName: ".google.protobuf.ServiceDescriptorProto" }, { name: "extension", number: 7, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FileOptions" }, { name: "source_code_info", number: 9, type: 11, label: 1, typeName: ".google.protobuf.SourceCodeInfo" }, { name: "syntax", number: 12, type: 9, label: 1 }, { name: "edition", number: 14, type: 14, label: 1, typeName: ".google.protobuf.Edition" }] }, { name: "DescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "field", number: 2, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "extension", number: 6, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "nested_type", number: 3, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "extension_range", number: 5, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ExtensionRange" }, { name: "oneof_decl", number: 8, type: 11, label: 3, typeName: ".google.protobuf.OneofDescriptorProto" }, { name: "options", number: 7, type: 11, label: 1, typeName: ".google.protobuf.MessageOptions" }, { name: "reserved_range", number: 9, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ReservedRange" }, { name: "reserved_name", number: 10, type: 9, label: 3 }, { name: "visibility", number: 11, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "ExtensionRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions" }] }, { name: "ReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "ExtensionRangeOptions", field: [{ name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }, { name: "declaration", number: 2, type: 11, label: 3, typeName: ".google.protobuf.ExtensionRangeOptions.Declaration", options: { retention: 2 } }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "verification", number: 3, type: 14, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions.VerificationState", defaultValue: "UNVERIFIED", options: { retention: 2 } }], nestedType: [{ name: "Declaration", field: [{ name: "number", number: 1, type: 5, label: 1 }, { name: "full_name", number: 2, type: 9, label: 1 }, { name: "type", number: 3, type: 9, label: 1 }, { name: "reserved", number: 5, type: 8, label: 1 }, { name: "repeated", number: 6, type: 8, label: 1 }] }], enumType: [{ name: "VerificationState", value: [{ name: "DECLARATION", number: 0 }, { name: "UNVERIFIED", number: 1 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 3, type: 5, label: 1 }, { name: "label", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Label" }, { name: "type", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Type" }, { name: "type_name", number: 6, type: 9, label: 1 }, { name: "extendee", number: 2, type: 9, label: 1 }, { name: "default_value", number: 7, type: 9, label: 1 }, { name: "oneof_index", number: 9, type: 5, label: 1 }, { name: "json_name", number: 10, type: 9, label: 1 }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions" }, { name: "proto3_optional", number: 17, type: 8, label: 1 }], enumType: [{ name: "Type", value: [{ name: "TYPE_DOUBLE", number: 1 }, { name: "TYPE_FLOAT", number: 2 }, { name: "TYPE_INT64", number: 3 }, { name: "TYPE_UINT64", number: 4 }, { name: "TYPE_INT32", number: 5 }, { name: "TYPE_FIXED64", number: 6 }, { name: "TYPE_FIXED32", number: 7 }, { name: "TYPE_BOOL", number: 8 }, { name: "TYPE_STRING", number: 9 }, { name: "TYPE_GROUP", number: 10 }, { name: "TYPE_MESSAGE", number: 11 }, { name: "TYPE_BYTES", number: 12 }, { name: "TYPE_UINT32", number: 13 }, { name: "TYPE_ENUM", number: 14 }, { name: "TYPE_SFIXED32", number: 15 }, { name: "TYPE_SFIXED64", number: 16 }, { name: "TYPE_SINT32", number: 17 }, { name: "TYPE_SINT64", number: 18 }] }, { name: "Label", value: [{ name: "LABEL_OPTIONAL", number: 1 }, { name: "LABEL_REPEATED", number: 3 }, { name: "LABEL_REQUIRED", number: 2 }] }] }, { name: "OneofDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "options", number: 2, type: 11, label: 1, typeName: ".google.protobuf.OneofOptions" }] }, { name: "EnumDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "value", number: 2, type: 11, label: 3, typeName: ".google.protobuf.EnumValueDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumOptions" }, { name: "reserved_range", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto.EnumReservedRange" }, { name: "reserved_name", number: 5, type: 9, label: 3 }, { name: "visibility", number: 6, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "EnumReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "EnumValueDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumValueOptions" }] }, { name: "ServiceDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "method", number: 2, type: 11, label: 3, typeName: ".google.protobuf.MethodDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ServiceOptions" }] }, { name: "MethodDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "input_type", number: 2, type: 9, label: 1 }, { name: "output_type", number: 3, type: 9, label: 1 }, { name: "options", number: 4, type: 11, label: 1, typeName: ".google.protobuf.MethodOptions" }, { name: "client_streaming", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "server_streaming", number: 6, type: 8, label: 1, defaultValue: "false" }] }, { name: "FileOptions", field: [{ name: "java_package", number: 1, type: 9, label: 1 }, { name: "java_outer_classname", number: 8, type: 9, label: 1 }, { name: "java_multiple_files", number: 10, type: 8, label: 1, defaultValue: "false", options: {} }, { name: "java_generate_equals_and_hash", number: 20, type: 8, label: 1, options: { deprecated: !0 } }, { name: "java_string_check_utf8", number: 27, type: 8, label: 1, defaultValue: "false" }, { name: "optimize_for", number: 9, type: 14, label: 1, typeName: ".google.protobuf.FileOptions.OptimizeMode", defaultValue: "SPEED" }, { name: "go_package", number: 11, type: 9, label: 1 }, { name: "cc_generic_services", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "java_generic_services", number: 17, type: 8, label: 1, defaultValue: "false" }, { name: "py_generic_services", number: 18, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 23, type: 8, label: 1, defaultValue: "false" }, { name: "cc_enable_arenas", number: 31, type: 8, label: 1, defaultValue: "true" }, { name: "objc_class_prefix", number: 36, type: 9, label: 1 }, { name: "csharp_namespace", number: 37, type: 9, label: 1 }, { name: "swift_prefix", number: 39, type: 9, label: 1 }, { name: "php_class_prefix", number: 40, type: 9, label: 1 }, { name: "php_namespace", number: 41, type: 9, label: 1 }, { name: "php_metadata_namespace", number: 44, type: 9, label: 1 }, { name: "ruby_package", number: 45, type: 9, label: 1 }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "OptimizeMode", value: [{ name: "SPEED", number: 1 }, { name: "CODE_SIZE", number: 2 }, { name: "LITE_RUNTIME", number: 3 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MessageOptions", field: [{ name: "message_set_wire_format", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "no_standard_descriptor_accessor", number: 2, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "map_entry", number: 7, type: 8, label: 1 }, { name: "deprecated_legacy_json_field_conflicts", number: 11, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 12, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldOptions", field: [{ name: "ctype", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.CType", defaultValue: "STRING" }, { name: "packed", number: 2, type: 8, label: 1 }, { name: "jstype", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.JSType", defaultValue: "JS_NORMAL" }, { name: "lazy", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "unverified_lazy", number: 15, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "weak", number: 10, type: 8, label: 1, defaultValue: "false", options: { deprecated: !0 } }, { name: "debug_redact", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "retention", number: 17, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.OptionRetention" }, { name: "targets", number: 19, type: 14, label: 3, typeName: ".google.protobuf.FieldOptions.OptionTargetType" }, { name: "edition_defaults", number: 20, type: 11, label: 3, typeName: ".google.protobuf.FieldOptions.EditionDefault" }, { name: "features", number: 21, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "feature_support", number: 22, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], nestedType: [{ name: "EditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "value", number: 2, type: 9, label: 1 }] }, { name: "FeatureSupport", field: [{ name: "edition_introduced", number: 1, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "edition_deprecated", number: 2, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "deprecation_warning", number: 3, type: 9, label: 1 }, { name: "edition_removed", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "removal_error", number: 5, type: 9, label: 1 }] }], enumType: [{ name: "CType", value: [{ name: "STRING", number: 0 }, { name: "CORD", number: 1 }, { name: "STRING_PIECE", number: 2 }] }, { name: "JSType", value: [{ name: "JS_NORMAL", number: 0 }, { name: "JS_STRING", number: 1 }, { name: "JS_NUMBER", number: 2 }] }, { name: "OptionRetention", value: [{ name: "RETENTION_UNKNOWN", number: 0 }, { name: "RETENTION_RUNTIME", number: 1 }, { name: "RETENTION_SOURCE", number: 2 }] }, { name: "OptionTargetType", value: [{ name: "TARGET_TYPE_UNKNOWN", number: 0 }, { name: "TARGET_TYPE_FILE", number: 1 }, { name: "TARGET_TYPE_EXTENSION_RANGE", number: 2 }, { name: "TARGET_TYPE_MESSAGE", number: 3 }, { name: "TARGET_TYPE_FIELD", number: 4 }, { name: "TARGET_TYPE_ONEOF", number: 5 }, { name: "TARGET_TYPE_ENUM", number: 6 }, { name: "TARGET_TYPE_ENUM_ENTRY", number: 7 }, { name: "TARGET_TYPE_SERVICE", number: 8 }, { name: "TARGET_TYPE_METHOD", number: 9 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "OneofOptions", field: [{ name: "features", number: 1, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumOptions", field: [{ name: "allow_alias", number: 2, type: 8, label: 1 }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated_legacy_json_field_conflicts", number: 6, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 7, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumValueOptions", field: [{ name: "deprecated", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "features", number: 2, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "debug_redact", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "feature_support", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "ServiceOptions", field: [{ name: "features", number: 34, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MethodOptions", field: [{ name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "idempotency_level", number: 34, type: 14, label: 1, typeName: ".google.protobuf.MethodOptions.IdempotencyLevel", defaultValue: "IDEMPOTENCY_UNKNOWN" }, { name: "features", number: 35, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "IdempotencyLevel", value: [{ name: "IDEMPOTENCY_UNKNOWN", number: 0 }, { name: "NO_SIDE_EFFECTS", number: 1 }, { name: "IDEMPOTENT", number: 2 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "UninterpretedOption", field: [{ name: "name", number: 2, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption.NamePart" }, { name: "identifier_value", number: 3, type: 9, label: 1 }, { name: "positive_int_value", number: 4, type: 4, label: 1 }, { name: "negative_int_value", number: 5, type: 3, label: 1 }, { name: "double_value", number: 6, type: 1, label: 1 }, { name: "string_value", number: 7, type: 12, label: 1 }, { name: "aggregate_value", number: 8, type: 9, label: 1 }], nestedType: [{ name: "NamePart", field: [{ name: "name_part", number: 1, type: 9, label: 2 }, { name: "is_extension", number: 2, type: 8, label: 2 }] }] }, { name: "FeatureSet", field: [{ name: "field_presence", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.FieldPresence", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPLICIT", edition: 900 }, { value: "IMPLICIT", edition: 999 }, { value: "EXPLICIT", edition: 1e3 }] } }, { name: "enum_type", number: 2, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnumType", options: { retention: 1, targets: [6, 1], editionDefaults: [{ value: "CLOSED", edition: 900 }, { value: "OPEN", edition: 999 }] } }, { name: "repeated_field_encoding", number: 3, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.RepeatedFieldEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPANDED", edition: 900 }, { value: "PACKED", edition: 999 }] } }, { name: "utf8_validation", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.Utf8Validation", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "NONE", edition: 900 }, { value: "VERIFY", edition: 999 }] } }, { name: "message_encoding", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.MessageEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "LENGTH_PREFIXED", edition: 900 }] } }, { name: "json_format", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.JsonFormat", options: { retention: 1, targets: [3, 6, 1], editionDefaults: [{ value: "LEGACY_BEST_EFFORT", edition: 900 }, { value: "ALLOW", edition: 999 }] } }, { name: "enforce_naming_style", number: 7, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnforceNamingStyle", options: { retention: 2, targets: [1, 2, 3, 4, 5, 6, 7, 8, 9], editionDefaults: [{ value: "STYLE_LEGACY", edition: 900 }, { value: "STYLE2024", edition: 1001 }] } }, { name: "default_symbol_visibility", number: 8, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility", options: { retention: 2, targets: [1], editionDefaults: [{ value: "EXPORT_ALL", edition: 900 }, { value: "EXPORT_TOP_LEVEL", edition: 1001 }] } }], nestedType: [{ name: "VisibilityFeature", enumType: [{ name: "DefaultSymbolVisibility", value: [{ name: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", number: 0 }, { name: "EXPORT_ALL", number: 1 }, { name: "EXPORT_TOP_LEVEL", number: 2 }, { name: "LOCAL_ALL", number: 3 }, { name: "STRICT", number: 4 }] }] }], enumType: [{ name: "FieldPresence", value: [{ name: "FIELD_PRESENCE_UNKNOWN", number: 0 }, { name: "EXPLICIT", number: 1 }, { name: "IMPLICIT", number: 2 }, { name: "LEGACY_REQUIRED", number: 3 }] }, { name: "EnumType", value: [{ name: "ENUM_TYPE_UNKNOWN", number: 0 }, { name: "OPEN", number: 1 }, { name: "CLOSED", number: 2 }] }, { name: "RepeatedFieldEncoding", value: [{ name: "REPEATED_FIELD_ENCODING_UNKNOWN", number: 0 }, { name: "PACKED", number: 1 }, { name: "EXPANDED", number: 2 }] }, { name: "Utf8Validation", value: [{ name: "UTF8_VALIDATION_UNKNOWN", number: 0 }, { name: "VERIFY", number: 2 }, { name: "NONE", number: 3 }] }, { name: "MessageEncoding", value: [{ name: "MESSAGE_ENCODING_UNKNOWN", number: 0 }, { name: "LENGTH_PREFIXED", number: 1 }, { name: "DELIMITED", number: 2 }] }, { name: "JsonFormat", value: [{ name: "JSON_FORMAT_UNKNOWN", number: 0 }, { name: "ALLOW", number: 1 }, { name: "LEGACY_BEST_EFFORT", number: 2 }] }, { name: "EnforceNamingStyle", value: [{ name: "ENFORCE_NAMING_STYLE_UNKNOWN", number: 0 }, { name: "STYLE2024", number: 1 }, { name: "STYLE_LEGACY", number: 2 }] }], extensionRange: [{ start: 1e3, end: 9995 }, { start: 9995, end: 1e4 }, { start: 1e4, end: 10001 }] }, { name: "FeatureSetDefaults", field: [{ name: "defaults", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" }, { name: "minimum_edition", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "maximum_edition", number: 5, type: 14, label: 1, typeName: ".google.protobuf.Edition" }], nestedType: [{ name: "FeatureSetEditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "overridable_features", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "fixed_features", number: 5, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }] }] }, { name: "SourceCodeInfo", field: [{ name: "location", number: 1, type: 11, label: 3, typeName: ".google.protobuf.SourceCodeInfo.Location" }], nestedType: [{ name: "Location", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "span", number: 2, type: 5, label: 3, options: { packed: !0 } }, { name: "leading_comments", number: 3, type: 9, label: 1 }, { name: "trailing_comments", number: 4, type: 9, label: 1 }, { name: "leading_detached_comments", number: 6, type: 9, label: 3 }] }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "GeneratedCodeInfo", field: [{ name: "annotation", number: 1, type: 11, label: 3, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation" }], nestedType: [{ name: "Annotation", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "source_file", number: 2, type: 9, label: 1 }, { name: "begin", number: 3, type: 5, label: 1 }, { name: "end", number: 4, type: 5, label: 1 }, { name: "semantic", number: 5, type: 14, label: 1, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation.Semantic" }], enumType: [{ name: "Semantic", value: [{ name: "NONE", number: 0 }, { name: "SET", number: 1 }, { name: "ALIAS", number: 2 }] }] }] }], enumType: [{ name: "Edition", value: [{ name: "EDITION_UNKNOWN", number: 0 }, { name: "EDITION_LEGACY", number: 900 }, { name: "EDITION_PROTO2", number: 998 }, { name: "EDITION_PROTO3", number: 999 }, { name: "EDITION_2023", number: 1e3 }, { name: "EDITION_2024", number: 1001 }, { name: "EDITION_UNSTABLE", number: 9999 }, { name: "EDITION_1_TEST_ONLY", number: 1 }, { name: "EDITION_2_TEST_ONLY", number: 2 }, { name: "EDITION_99997_TEST_ONLY", number: 99997 }, { name: "EDITION_99998_TEST_ONLY", number: 99998 }, { name: "EDITION_99999_TEST_ONLY", number: 99999 }, { name: "EDITION_MAX", number: 2147483647 }] }, { name: "SymbolVisibility", value: [{ name: "VISIBILITY_UNSET", number: 0 }, { name: "VISIBILITY_LOCAL", number: 1 }, { name: "VISIBILITY_EXPORT", number: 2 }] }] }), vr = /* @__PURE__ */ R(_r, 1);
2732
- var At;
2733
- (function(e) {
2734
- e[e.DECLARATION = 0] = "DECLARATION", e[e.UNVERIFIED = 1] = "UNVERIFIED";
2735
- })(At || (At = {}));
2731
+ const Vr = /* @__PURE__ */ Lr({ name: "google/protobuf/descriptor.proto", package: "google.protobuf", messageType: [{ name: "FileDescriptorSet", field: [{ name: "file", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FileDescriptorProto" }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "FileDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "package", number: 2, type: 9, label: 1 }, { name: "dependency", number: 3, type: 9, label: 3 }, { name: "public_dependency", number: 10, type: 5, label: 3 }, { name: "weak_dependency", number: 11, type: 5, label: 3 }, { name: "option_dependency", number: 15, type: 9, label: 3 }, { name: "message_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 5, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "service", number: 6, type: 11, label: 3, typeName: ".google.protobuf.ServiceDescriptorProto" }, { name: "extension", number: 7, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FileOptions" }, { name: "source_code_info", number: 9, type: 11, label: 1, typeName: ".google.protobuf.SourceCodeInfo" }, { name: "syntax", number: 12, type: 9, label: 1 }, { name: "edition", number: 14, type: 14, label: 1, typeName: ".google.protobuf.Edition" }] }, { name: "DescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "field", number: 2, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "extension", number: 6, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "nested_type", number: 3, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "extension_range", number: 5, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ExtensionRange" }, { name: "oneof_decl", number: 8, type: 11, label: 3, typeName: ".google.protobuf.OneofDescriptorProto" }, { name: "options", number: 7, type: 11, label: 1, typeName: ".google.protobuf.MessageOptions" }, { name: "reserved_range", number: 9, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ReservedRange" }, { name: "reserved_name", number: 10, type: 9, label: 3 }, { name: "visibility", number: 11, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "ExtensionRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions" }] }, { name: "ReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "ExtensionRangeOptions", field: [{ name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }, { name: "declaration", number: 2, type: 11, label: 3, typeName: ".google.protobuf.ExtensionRangeOptions.Declaration", options: { retention: 2 } }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "verification", number: 3, type: 14, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions.VerificationState", defaultValue: "UNVERIFIED", options: { retention: 2 } }], nestedType: [{ name: "Declaration", field: [{ name: "number", number: 1, type: 5, label: 1 }, { name: "full_name", number: 2, type: 9, label: 1 }, { name: "type", number: 3, type: 9, label: 1 }, { name: "reserved", number: 5, type: 8, label: 1 }, { name: "repeated", number: 6, type: 8, label: 1 }] }], enumType: [{ name: "VerificationState", value: [{ name: "DECLARATION", number: 0 }, { name: "UNVERIFIED", number: 1 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 3, type: 5, label: 1 }, { name: "label", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Label" }, { name: "type", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Type" }, { name: "type_name", number: 6, type: 9, label: 1 }, { name: "extendee", number: 2, type: 9, label: 1 }, { name: "default_value", number: 7, type: 9, label: 1 }, { name: "oneof_index", number: 9, type: 5, label: 1 }, { name: "json_name", number: 10, type: 9, label: 1 }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions" }, { name: "proto3_optional", number: 17, type: 8, label: 1 }], enumType: [{ name: "Type", value: [{ name: "TYPE_DOUBLE", number: 1 }, { name: "TYPE_FLOAT", number: 2 }, { name: "TYPE_INT64", number: 3 }, { name: "TYPE_UINT64", number: 4 }, { name: "TYPE_INT32", number: 5 }, { name: "TYPE_FIXED64", number: 6 }, { name: "TYPE_FIXED32", number: 7 }, { name: "TYPE_BOOL", number: 8 }, { name: "TYPE_STRING", number: 9 }, { name: "TYPE_GROUP", number: 10 }, { name: "TYPE_MESSAGE", number: 11 }, { name: "TYPE_BYTES", number: 12 }, { name: "TYPE_UINT32", number: 13 }, { name: "TYPE_ENUM", number: 14 }, { name: "TYPE_SFIXED32", number: 15 }, { name: "TYPE_SFIXED64", number: 16 }, { name: "TYPE_SINT32", number: 17 }, { name: "TYPE_SINT64", number: 18 }] }, { name: "Label", value: [{ name: "LABEL_OPTIONAL", number: 1 }, { name: "LABEL_REPEATED", number: 3 }, { name: "LABEL_REQUIRED", number: 2 }] }] }, { name: "OneofDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "options", number: 2, type: 11, label: 1, typeName: ".google.protobuf.OneofOptions" }] }, { name: "EnumDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "value", number: 2, type: 11, label: 3, typeName: ".google.protobuf.EnumValueDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumOptions" }, { name: "reserved_range", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto.EnumReservedRange" }, { name: "reserved_name", number: 5, type: 9, label: 3 }, { name: "visibility", number: 6, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "EnumReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "EnumValueDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumValueOptions" }] }, { name: "ServiceDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "method", number: 2, type: 11, label: 3, typeName: ".google.protobuf.MethodDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ServiceOptions" }] }, { name: "MethodDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "input_type", number: 2, type: 9, label: 1 }, { name: "output_type", number: 3, type: 9, label: 1 }, { name: "options", number: 4, type: 11, label: 1, typeName: ".google.protobuf.MethodOptions" }, { name: "client_streaming", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "server_streaming", number: 6, type: 8, label: 1, defaultValue: "false" }] }, { name: "FileOptions", field: [{ name: "java_package", number: 1, type: 9, label: 1 }, { name: "java_outer_classname", number: 8, type: 9, label: 1 }, { name: "java_multiple_files", number: 10, type: 8, label: 1, defaultValue: "false", options: {} }, { name: "java_generate_equals_and_hash", number: 20, type: 8, label: 1, options: { deprecated: !0 } }, { name: "java_string_check_utf8", number: 27, type: 8, label: 1, defaultValue: "false" }, { name: "optimize_for", number: 9, type: 14, label: 1, typeName: ".google.protobuf.FileOptions.OptimizeMode", defaultValue: "SPEED" }, { name: "go_package", number: 11, type: 9, label: 1 }, { name: "cc_generic_services", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "java_generic_services", number: 17, type: 8, label: 1, defaultValue: "false" }, { name: "py_generic_services", number: 18, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 23, type: 8, label: 1, defaultValue: "false" }, { name: "cc_enable_arenas", number: 31, type: 8, label: 1, defaultValue: "true" }, { name: "objc_class_prefix", number: 36, type: 9, label: 1 }, { name: "csharp_namespace", number: 37, type: 9, label: 1 }, { name: "swift_prefix", number: 39, type: 9, label: 1 }, { name: "php_class_prefix", number: 40, type: 9, label: 1 }, { name: "php_namespace", number: 41, type: 9, label: 1 }, { name: "php_metadata_namespace", number: 44, type: 9, label: 1 }, { name: "ruby_package", number: 45, type: 9, label: 1 }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "OptimizeMode", value: [{ name: "SPEED", number: 1 }, { name: "CODE_SIZE", number: 2 }, { name: "LITE_RUNTIME", number: 3 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MessageOptions", field: [{ name: "message_set_wire_format", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "no_standard_descriptor_accessor", number: 2, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "map_entry", number: 7, type: 8, label: 1 }, { name: "deprecated_legacy_json_field_conflicts", number: 11, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 12, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldOptions", field: [{ name: "ctype", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.CType", defaultValue: "STRING" }, { name: "packed", number: 2, type: 8, label: 1 }, { name: "jstype", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.JSType", defaultValue: "JS_NORMAL" }, { name: "lazy", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "unverified_lazy", number: 15, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "weak", number: 10, type: 8, label: 1, defaultValue: "false", options: { deprecated: !0 } }, { name: "debug_redact", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "retention", number: 17, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.OptionRetention" }, { name: "targets", number: 19, type: 14, label: 3, typeName: ".google.protobuf.FieldOptions.OptionTargetType" }, { name: "edition_defaults", number: 20, type: 11, label: 3, typeName: ".google.protobuf.FieldOptions.EditionDefault" }, { name: "features", number: 21, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "feature_support", number: 22, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], nestedType: [{ name: "EditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "value", number: 2, type: 9, label: 1 }] }, { name: "FeatureSupport", field: [{ name: "edition_introduced", number: 1, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "edition_deprecated", number: 2, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "deprecation_warning", number: 3, type: 9, label: 1 }, { name: "edition_removed", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "removal_error", number: 5, type: 9, label: 1 }] }], enumType: [{ name: "CType", value: [{ name: "STRING", number: 0 }, { name: "CORD", number: 1 }, { name: "STRING_PIECE", number: 2 }] }, { name: "JSType", value: [{ name: "JS_NORMAL", number: 0 }, { name: "JS_STRING", number: 1 }, { name: "JS_NUMBER", number: 2 }] }, { name: "OptionRetention", value: [{ name: "RETENTION_UNKNOWN", number: 0 }, { name: "RETENTION_RUNTIME", number: 1 }, { name: "RETENTION_SOURCE", number: 2 }] }, { name: "OptionTargetType", value: [{ name: "TARGET_TYPE_UNKNOWN", number: 0 }, { name: "TARGET_TYPE_FILE", number: 1 }, { name: "TARGET_TYPE_EXTENSION_RANGE", number: 2 }, { name: "TARGET_TYPE_MESSAGE", number: 3 }, { name: "TARGET_TYPE_FIELD", number: 4 }, { name: "TARGET_TYPE_ONEOF", number: 5 }, { name: "TARGET_TYPE_ENUM", number: 6 }, { name: "TARGET_TYPE_ENUM_ENTRY", number: 7 }, { name: "TARGET_TYPE_SERVICE", number: 8 }, { name: "TARGET_TYPE_METHOD", number: 9 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "OneofOptions", field: [{ name: "features", number: 1, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumOptions", field: [{ name: "allow_alias", number: 2, type: 8, label: 1 }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated_legacy_json_field_conflicts", number: 6, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 7, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumValueOptions", field: [{ name: "deprecated", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "features", number: 2, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "debug_redact", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "feature_support", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "ServiceOptions", field: [{ name: "features", number: 34, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MethodOptions", field: [{ name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "idempotency_level", number: 34, type: 14, label: 1, typeName: ".google.protobuf.MethodOptions.IdempotencyLevel", defaultValue: "IDEMPOTENCY_UNKNOWN" }, { name: "features", number: 35, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "IdempotencyLevel", value: [{ name: "IDEMPOTENCY_UNKNOWN", number: 0 }, { name: "NO_SIDE_EFFECTS", number: 1 }, { name: "IDEMPOTENT", number: 2 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "UninterpretedOption", field: [{ name: "name", number: 2, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption.NamePart" }, { name: "identifier_value", number: 3, type: 9, label: 1 }, { name: "positive_int_value", number: 4, type: 4, label: 1 }, { name: "negative_int_value", number: 5, type: 3, label: 1 }, { name: "double_value", number: 6, type: 1, label: 1 }, { name: "string_value", number: 7, type: 12, label: 1 }, { name: "aggregate_value", number: 8, type: 9, label: 1 }], nestedType: [{ name: "NamePart", field: [{ name: "name_part", number: 1, type: 9, label: 2 }, { name: "is_extension", number: 2, type: 8, label: 2 }] }] }, { name: "FeatureSet", field: [{ name: "field_presence", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.FieldPresence", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPLICIT", edition: 900 }, { value: "IMPLICIT", edition: 999 }, { value: "EXPLICIT", edition: 1e3 }] } }, { name: "enum_type", number: 2, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnumType", options: { retention: 1, targets: [6, 1], editionDefaults: [{ value: "CLOSED", edition: 900 }, { value: "OPEN", edition: 999 }] } }, { name: "repeated_field_encoding", number: 3, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.RepeatedFieldEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPANDED", edition: 900 }, { value: "PACKED", edition: 999 }] } }, { name: "utf8_validation", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.Utf8Validation", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "NONE", edition: 900 }, { value: "VERIFY", edition: 999 }] } }, { name: "message_encoding", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.MessageEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "LENGTH_PREFIXED", edition: 900 }] } }, { name: "json_format", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.JsonFormat", options: { retention: 1, targets: [3, 6, 1], editionDefaults: [{ value: "LEGACY_BEST_EFFORT", edition: 900 }, { value: "ALLOW", edition: 999 }] } }, { name: "enforce_naming_style", number: 7, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnforceNamingStyle", options: { retention: 2, targets: [1, 2, 3, 4, 5, 6, 7, 8, 9], editionDefaults: [{ value: "STYLE_LEGACY", edition: 900 }, { value: "STYLE2024", edition: 1001 }] } }, { name: "default_symbol_visibility", number: 8, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility", options: { retention: 2, targets: [1], editionDefaults: [{ value: "EXPORT_ALL", edition: 900 }, { value: "EXPORT_TOP_LEVEL", edition: 1001 }] } }], nestedType: [{ name: "VisibilityFeature", enumType: [{ name: "DefaultSymbolVisibility", value: [{ name: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", number: 0 }, { name: "EXPORT_ALL", number: 1 }, { name: "EXPORT_TOP_LEVEL", number: 2 }, { name: "LOCAL_ALL", number: 3 }, { name: "STRICT", number: 4 }] }] }], enumType: [{ name: "FieldPresence", value: [{ name: "FIELD_PRESENCE_UNKNOWN", number: 0 }, { name: "EXPLICIT", number: 1 }, { name: "IMPLICIT", number: 2 }, { name: "LEGACY_REQUIRED", number: 3 }] }, { name: "EnumType", value: [{ name: "ENUM_TYPE_UNKNOWN", number: 0 }, { name: "OPEN", number: 1 }, { name: "CLOSED", number: 2 }] }, { name: "RepeatedFieldEncoding", value: [{ name: "REPEATED_FIELD_ENCODING_UNKNOWN", number: 0 }, { name: "PACKED", number: 1 }, { name: "EXPANDED", number: 2 }] }, { name: "Utf8Validation", value: [{ name: "UTF8_VALIDATION_UNKNOWN", number: 0 }, { name: "VERIFY", number: 2 }, { name: "NONE", number: 3 }] }, { name: "MessageEncoding", value: [{ name: "MESSAGE_ENCODING_UNKNOWN", number: 0 }, { name: "LENGTH_PREFIXED", number: 1 }, { name: "DELIMITED", number: 2 }] }, { name: "JsonFormat", value: [{ name: "JSON_FORMAT_UNKNOWN", number: 0 }, { name: "ALLOW", number: 1 }, { name: "LEGACY_BEST_EFFORT", number: 2 }] }, { name: "EnforceNamingStyle", value: [{ name: "ENFORCE_NAMING_STYLE_UNKNOWN", number: 0 }, { name: "STYLE2024", number: 1 }, { name: "STYLE_LEGACY", number: 2 }] }], extensionRange: [{ start: 1e3, end: 9995 }, { start: 9995, end: 1e4 }, { start: 1e4, end: 10001 }] }, { name: "FeatureSetDefaults", field: [{ name: "defaults", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" }, { name: "minimum_edition", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "maximum_edition", number: 5, type: 14, label: 1, typeName: ".google.protobuf.Edition" }], nestedType: [{ name: "FeatureSetEditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "overridable_features", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "fixed_features", number: 5, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }] }] }, { name: "SourceCodeInfo", field: [{ name: "location", number: 1, type: 11, label: 3, typeName: ".google.protobuf.SourceCodeInfo.Location" }], nestedType: [{ name: "Location", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "span", number: 2, type: 5, label: 3, options: { packed: !0 } }, { name: "leading_comments", number: 3, type: 9, label: 1 }, { name: "trailing_comments", number: 4, type: 9, label: 1 }, { name: "leading_detached_comments", number: 6, type: 9, label: 3 }] }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "GeneratedCodeInfo", field: [{ name: "annotation", number: 1, type: 11, label: 3, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation" }], nestedType: [{ name: "Annotation", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "source_file", number: 2, type: 9, label: 1 }, { name: "begin", number: 3, type: 5, label: 1 }, { name: "end", number: 4, type: 5, label: 1 }, { name: "semantic", number: 5, type: 14, label: 1, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation.Semantic" }], enumType: [{ name: "Semantic", value: [{ name: "NONE", number: 0 }, { name: "SET", number: 1 }, { name: "ALIAS", number: 2 }] }] }] }], enumType: [{ name: "Edition", value: [{ name: "EDITION_UNKNOWN", number: 0 }, { name: "EDITION_LEGACY", number: 900 }, { name: "EDITION_PROTO2", number: 998 }, { name: "EDITION_PROTO3", number: 999 }, { name: "EDITION_2023", number: 1e3 }, { name: "EDITION_2024", number: 1001 }, { name: "EDITION_UNSTABLE", number: 9999 }, { name: "EDITION_1_TEST_ONLY", number: 1 }, { name: "EDITION_2_TEST_ONLY", number: 2 }, { name: "EDITION_99997_TEST_ONLY", number: 99997 }, { name: "EDITION_99998_TEST_ONLY", number: 99998 }, { name: "EDITION_99999_TEST_ONLY", number: 99999 }, { name: "EDITION_MAX", number: 2147483647 }] }, { name: "SymbolVisibility", value: [{ name: "VISIBILITY_UNSET", number: 0 }, { name: "VISIBILITY_LOCAL", number: 1 }, { name: "VISIBILITY_EXPORT", number: 2 }] }] }), Fr = /* @__PURE__ */ v(Vr, 1);
2736
2732
  var Rt;
2737
2733
  (function(e) {
2738
- e[e.DOUBLE = 1] = "DOUBLE", e[e.FLOAT = 2] = "FLOAT", e[e.INT64 = 3] = "INT64", e[e.UINT64 = 4] = "UINT64", e[e.INT32 = 5] = "INT32", e[e.FIXED64 = 6] = "FIXED64", e[e.FIXED32 = 7] = "FIXED32", e[e.BOOL = 8] = "BOOL", e[e.STRING = 9] = "STRING", e[e.GROUP = 10] = "GROUP", e[e.MESSAGE = 11] = "MESSAGE", e[e.BYTES = 12] = "BYTES", e[e.UINT32 = 13] = "UINT32", e[e.ENUM = 14] = "ENUM", e[e.SFIXED32 = 15] = "SFIXED32", e[e.SFIXED64 = 16] = "SFIXED64", e[e.SINT32 = 17] = "SINT32", e[e.SINT64 = 18] = "SINT64";
2734
+ e[e.DECLARATION = 0] = "DECLARATION", e[e.UNVERIFIED = 1] = "UNVERIFIED";
2739
2735
  })(Rt || (Rt = {}));
2740
2736
  var _t;
2741
2737
  (function(e) {
2742
- e[e.OPTIONAL = 1] = "OPTIONAL", e[e.REPEATED = 3] = "REPEATED", e[e.REQUIRED = 2] = "REQUIRED";
2738
+ e[e.DOUBLE = 1] = "DOUBLE", e[e.FLOAT = 2] = "FLOAT", e[e.INT64 = 3] = "INT64", e[e.UINT64 = 4] = "UINT64", e[e.INT32 = 5] = "INT32", e[e.FIXED64 = 6] = "FIXED64", e[e.FIXED32 = 7] = "FIXED32", e[e.BOOL = 8] = "BOOL", e[e.STRING = 9] = "STRING", e[e.GROUP = 10] = "GROUP", e[e.MESSAGE = 11] = "MESSAGE", e[e.BYTES = 12] = "BYTES", e[e.UINT32 = 13] = "UINT32", e[e.ENUM = 14] = "ENUM", e[e.SFIXED32 = 15] = "SFIXED32", e[e.SFIXED64 = 16] = "SFIXED64", e[e.SINT32 = 17] = "SINT32", e[e.SINT64 = 18] = "SINT64";
2743
2739
  })(_t || (_t = {}));
2744
- var vt;
2745
- (function(e) {
2746
- e[e.SPEED = 1] = "SPEED", e[e.CODE_SIZE = 2] = "CODE_SIZE", e[e.LITE_RUNTIME = 3] = "LITE_RUNTIME";
2747
- })(vt || (vt = {}));
2748
2740
  var Ot;
2749
2741
  (function(e) {
2750
- e[e.STRING = 0] = "STRING", e[e.CORD = 1] = "CORD", e[e.STRING_PIECE = 2] = "STRING_PIECE";
2742
+ e[e.OPTIONAL = 1] = "OPTIONAL", e[e.REPEATED = 3] = "REPEATED", e[e.REQUIRED = 2] = "REQUIRED";
2751
2743
  })(Ot || (Ot = {}));
2752
2744
  var Ct;
2753
2745
  (function(e) {
2754
- e[e.JS_NORMAL = 0] = "JS_NORMAL", e[e.JS_STRING = 1] = "JS_STRING", e[e.JS_NUMBER = 2] = "JS_NUMBER";
2746
+ e[e.SPEED = 1] = "SPEED", e[e.CODE_SIZE = 2] = "CODE_SIZE", e[e.LITE_RUNTIME = 3] = "LITE_RUNTIME";
2755
2747
  })(Ct || (Ct = {}));
2756
2748
  var Dt;
2757
2749
  (function(e) {
2758
- e[e.RETENTION_UNKNOWN = 0] = "RETENTION_UNKNOWN", e[e.RETENTION_RUNTIME = 1] = "RETENTION_RUNTIME", e[e.RETENTION_SOURCE = 2] = "RETENTION_SOURCE";
2750
+ e[e.STRING = 0] = "STRING", e[e.CORD = 1] = "CORD", e[e.STRING_PIECE = 2] = "STRING_PIECE";
2759
2751
  })(Dt || (Dt = {}));
2760
2752
  var Ut;
2761
2753
  (function(e) {
2762
- e[e.TARGET_TYPE_UNKNOWN = 0] = "TARGET_TYPE_UNKNOWN", e[e.TARGET_TYPE_FILE = 1] = "TARGET_TYPE_FILE", e[e.TARGET_TYPE_EXTENSION_RANGE = 2] = "TARGET_TYPE_EXTENSION_RANGE", e[e.TARGET_TYPE_MESSAGE = 3] = "TARGET_TYPE_MESSAGE", e[e.TARGET_TYPE_FIELD = 4] = "TARGET_TYPE_FIELD", e[e.TARGET_TYPE_ONEOF = 5] = "TARGET_TYPE_ONEOF", e[e.TARGET_TYPE_ENUM = 6] = "TARGET_TYPE_ENUM", e[e.TARGET_TYPE_ENUM_ENTRY = 7] = "TARGET_TYPE_ENUM_ENTRY", e[e.TARGET_TYPE_SERVICE = 8] = "TARGET_TYPE_SERVICE", e[e.TARGET_TYPE_METHOD = 9] = "TARGET_TYPE_METHOD";
2754
+ e[e.JS_NORMAL = 0] = "JS_NORMAL", e[e.JS_STRING = 1] = "JS_STRING", e[e.JS_NUMBER = 2] = "JS_NUMBER";
2763
2755
  })(Ut || (Ut = {}));
2764
2756
  var Lt;
2765
2757
  (function(e) {
2766
- e[e.IDEMPOTENCY_UNKNOWN = 0] = "IDEMPOTENCY_UNKNOWN", e[e.NO_SIDE_EFFECTS = 1] = "NO_SIDE_EFFECTS", e[e.IDEMPOTENT = 2] = "IDEMPOTENT";
2758
+ e[e.RETENTION_UNKNOWN = 0] = "RETENTION_UNKNOWN", e[e.RETENTION_RUNTIME = 1] = "RETENTION_RUNTIME", e[e.RETENTION_SOURCE = 2] = "RETENTION_SOURCE";
2767
2759
  })(Lt || (Lt = {}));
2768
2760
  var Mt;
2769
2761
  (function(e) {
2770
- e[e.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", e[e.EXPORT_ALL = 1] = "EXPORT_ALL", e[e.EXPORT_TOP_LEVEL = 2] = "EXPORT_TOP_LEVEL", e[e.LOCAL_ALL = 3] = "LOCAL_ALL", e[e.STRICT = 4] = "STRICT";
2762
+ e[e.TARGET_TYPE_UNKNOWN = 0] = "TARGET_TYPE_UNKNOWN", e[e.TARGET_TYPE_FILE = 1] = "TARGET_TYPE_FILE", e[e.TARGET_TYPE_EXTENSION_RANGE = 2] = "TARGET_TYPE_EXTENSION_RANGE", e[e.TARGET_TYPE_MESSAGE = 3] = "TARGET_TYPE_MESSAGE", e[e.TARGET_TYPE_FIELD = 4] = "TARGET_TYPE_FIELD", e[e.TARGET_TYPE_ONEOF = 5] = "TARGET_TYPE_ONEOF", e[e.TARGET_TYPE_ENUM = 6] = "TARGET_TYPE_ENUM", e[e.TARGET_TYPE_ENUM_ENTRY = 7] = "TARGET_TYPE_ENUM_ENTRY", e[e.TARGET_TYPE_SERVICE = 8] = "TARGET_TYPE_SERVICE", e[e.TARGET_TYPE_METHOD = 9] = "TARGET_TYPE_METHOD";
2771
2763
  })(Mt || (Mt = {}));
2772
2764
  var xt;
2773
2765
  (function(e) {
2774
- e[e.FIELD_PRESENCE_UNKNOWN = 0] = "FIELD_PRESENCE_UNKNOWN", e[e.EXPLICIT = 1] = "EXPLICIT", e[e.IMPLICIT = 2] = "IMPLICIT", e[e.LEGACY_REQUIRED = 3] = "LEGACY_REQUIRED";
2766
+ e[e.IDEMPOTENCY_UNKNOWN = 0] = "IDEMPOTENCY_UNKNOWN", e[e.NO_SIDE_EFFECTS = 1] = "NO_SIDE_EFFECTS", e[e.IDEMPOTENT = 2] = "IDEMPOTENT";
2775
2767
  })(xt || (xt = {}));
2776
- var Ft;
2777
- (function(e) {
2778
- e[e.ENUM_TYPE_UNKNOWN = 0] = "ENUM_TYPE_UNKNOWN", e[e.OPEN = 1] = "OPEN", e[e.CLOSED = 2] = "CLOSED";
2779
- })(Ft || (Ft = {}));
2780
2768
  var Pt;
2781
2769
  (function(e) {
2782
- e[e.REPEATED_FIELD_ENCODING_UNKNOWN = 0] = "REPEATED_FIELD_ENCODING_UNKNOWN", e[e.PACKED = 1] = "PACKED", e[e.EXPANDED = 2] = "EXPANDED";
2770
+ e[e.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", e[e.EXPORT_ALL = 1] = "EXPORT_ALL", e[e.EXPORT_TOP_LEVEL = 2] = "EXPORT_TOP_LEVEL", e[e.LOCAL_ALL = 3] = "LOCAL_ALL", e[e.STRICT = 4] = "STRICT";
2783
2771
  })(Pt || (Pt = {}));
2784
2772
  var Vt;
2785
2773
  (function(e) {
2786
- e[e.UTF8_VALIDATION_UNKNOWN = 0] = "UTF8_VALIDATION_UNKNOWN", e[e.VERIFY = 2] = "VERIFY", e[e.NONE = 3] = "NONE";
2774
+ e[e.FIELD_PRESENCE_UNKNOWN = 0] = "FIELD_PRESENCE_UNKNOWN", e[e.EXPLICIT = 1] = "EXPLICIT", e[e.IMPLICIT = 2] = "IMPLICIT", e[e.LEGACY_REQUIRED = 3] = "LEGACY_REQUIRED";
2787
2775
  })(Vt || (Vt = {}));
2776
+ var Ft;
2777
+ (function(e) {
2778
+ e[e.ENUM_TYPE_UNKNOWN = 0] = "ENUM_TYPE_UNKNOWN", e[e.OPEN = 1] = "OPEN", e[e.CLOSED = 2] = "CLOSED";
2779
+ })(Ft || (Ft = {}));
2788
2780
  var Gt;
2789
2781
  (function(e) {
2790
- e[e.MESSAGE_ENCODING_UNKNOWN = 0] = "MESSAGE_ENCODING_UNKNOWN", e[e.LENGTH_PREFIXED = 1] = "LENGTH_PREFIXED", e[e.DELIMITED = 2] = "DELIMITED";
2782
+ e[e.REPEATED_FIELD_ENCODING_UNKNOWN = 0] = "REPEATED_FIELD_ENCODING_UNKNOWN", e[e.PACKED = 1] = "PACKED", e[e.EXPANDED = 2] = "EXPANDED";
2791
2783
  })(Gt || (Gt = {}));
2792
2784
  var Bt;
2793
2785
  (function(e) {
2794
- e[e.JSON_FORMAT_UNKNOWN = 0] = "JSON_FORMAT_UNKNOWN", e[e.ALLOW = 1] = "ALLOW", e[e.LEGACY_BEST_EFFORT = 2] = "LEGACY_BEST_EFFORT";
2786
+ e[e.UTF8_VALIDATION_UNKNOWN = 0] = "UTF8_VALIDATION_UNKNOWN", e[e.VERIFY = 2] = "VERIFY", e[e.NONE = 3] = "NONE";
2795
2787
  })(Bt || (Bt = {}));
2796
2788
  var Yt;
2797
2789
  (function(e) {
2798
- e[e.ENFORCE_NAMING_STYLE_UNKNOWN = 0] = "ENFORCE_NAMING_STYLE_UNKNOWN", e[e.STYLE2024 = 1] = "STYLE2024", e[e.STYLE_LEGACY = 2] = "STYLE_LEGACY";
2790
+ e[e.MESSAGE_ENCODING_UNKNOWN = 0] = "MESSAGE_ENCODING_UNKNOWN", e[e.LENGTH_PREFIXED = 1] = "LENGTH_PREFIXED", e[e.DELIMITED = 2] = "DELIMITED";
2799
2791
  })(Yt || (Yt = {}));
2800
2792
  var $t;
2801
2793
  (function(e) {
2802
- e[e.NONE = 0] = "NONE", e[e.SET = 1] = "SET", e[e.ALIAS = 2] = "ALIAS";
2794
+ e[e.JSON_FORMAT_UNKNOWN = 0] = "JSON_FORMAT_UNKNOWN", e[e.ALLOW = 1] = "ALLOW", e[e.LEGACY_BEST_EFFORT = 2] = "LEGACY_BEST_EFFORT";
2803
2795
  })($t || ($t = {}));
2804
2796
  var Xt;
2805
2797
  (function(e) {
2806
- e[e.EDITION_UNKNOWN = 0] = "EDITION_UNKNOWN", e[e.EDITION_LEGACY = 900] = "EDITION_LEGACY", e[e.EDITION_PROTO2 = 998] = "EDITION_PROTO2", e[e.EDITION_PROTO3 = 999] = "EDITION_PROTO3", e[e.EDITION_2023 = 1e3] = "EDITION_2023", e[e.EDITION_2024 = 1001] = "EDITION_2024", e[e.EDITION_UNSTABLE = 9999] = "EDITION_UNSTABLE", e[e.EDITION_1_TEST_ONLY = 1] = "EDITION_1_TEST_ONLY", e[e.EDITION_2_TEST_ONLY = 2] = "EDITION_2_TEST_ONLY", e[e.EDITION_99997_TEST_ONLY = 99997] = "EDITION_99997_TEST_ONLY", e[e.EDITION_99998_TEST_ONLY = 99998] = "EDITION_99998_TEST_ONLY", e[e.EDITION_99999_TEST_ONLY = 99999] = "EDITION_99999_TEST_ONLY", e[e.EDITION_MAX = 2147483647] = "EDITION_MAX";
2798
+ e[e.ENFORCE_NAMING_STYLE_UNKNOWN = 0] = "ENFORCE_NAMING_STYLE_UNKNOWN", e[e.STYLE2024 = 1] = "STYLE2024", e[e.STYLE_LEGACY = 2] = "STYLE_LEGACY";
2807
2799
  })(Xt || (Xt = {}));
2808
2800
  var Kt;
2809
2801
  (function(e) {
2810
- e[e.VISIBILITY_UNSET = 0] = "VISIBILITY_UNSET", e[e.VISIBILITY_LOCAL = 1] = "VISIBILITY_LOCAL", e[e.VISIBILITY_EXPORT = 2] = "VISIBILITY_EXPORT";
2802
+ e[e.NONE = 0] = "NONE", e[e.SET = 1] = "SET", e[e.ALIAS = 2] = "ALIAS";
2811
2803
  })(Kt || (Kt = {}));
2812
- function Or(e) {
2804
+ var jt;
2805
+ (function(e) {
2806
+ e[e.EDITION_UNKNOWN = 0] = "EDITION_UNKNOWN", e[e.EDITION_LEGACY = 900] = "EDITION_LEGACY", e[e.EDITION_PROTO2 = 998] = "EDITION_PROTO2", e[e.EDITION_PROTO3 = 999] = "EDITION_PROTO3", e[e.EDITION_2023 = 1e3] = "EDITION_2023", e[e.EDITION_2024 = 1001] = "EDITION_2024", e[e.EDITION_UNSTABLE = 9999] = "EDITION_UNSTABLE", e[e.EDITION_1_TEST_ONLY = 1] = "EDITION_1_TEST_ONLY", e[e.EDITION_2_TEST_ONLY = 2] = "EDITION_2_TEST_ONLY", e[e.EDITION_99997_TEST_ONLY = 99997] = "EDITION_99997_TEST_ONLY", e[e.EDITION_99998_TEST_ONLY = 99998] = "EDITION_99998_TEST_ONLY", e[e.EDITION_99999_TEST_ONLY = 99999] = "EDITION_99999_TEST_ONLY", e[e.EDITION_MAX = 2147483647] = "EDITION_MAX";
2807
+ })(jt || (jt = {}));
2808
+ var Wt;
2809
+ (function(e) {
2810
+ e[e.VISIBILITY_UNSET = 0] = "VISIBILITY_UNSET", e[e.VISIBILITY_LOCAL = 1] = "VISIBILITY_LOCAL", e[e.VISIBILITY_EXPORT = 2] = "VISIBILITY_EXPORT";
2811
+ })(Wt || (Wt = {}));
2812
+ function Gr(e) {
2813
2813
  return Object.assign(Object.assign({ readUnknownFields: !0, recursionLimit: 100 }, e), { depth: 0 });
2814
2814
  }
2815
- function fe(e, t, n) {
2816
- const s = ge(e, void 0, !1);
2817
- return Yn(s, new Ms(t), Or(n), !1, t.byteLength), s.message;
2815
+ function me(e, t, n) {
2816
+ const s = Ee(e, void 0, !1);
2817
+ return jn(s, new Ks(t), Gr(n), !1, t.byteLength), s.message;
2818
2818
  }
2819
- function Yn(e, t, n, s, r) {
2819
+ function jn(e, t, n, s, r) {
2820
2820
  var i;
2821
2821
  if (++n.depth > n.recursionLimit)
2822
2822
  throw new Error(`cannot decode ${e.desc} from binary: maximum recursion depth of ${n.recursionLimit} reached`);
@@ -2830,13 +2830,13 @@ function Yn(e, t, n, s, r) {
2830
2830
  n.readUnknownFields && u.push({ no: o, wireType: l, data: p });
2831
2831
  continue;
2832
2832
  }
2833
- Cr(e, t, d, l, n);
2833
+ Br(e, t, d, l, n);
2834
2834
  }
2835
2835
  if (s && (l != I.EndGroup || o !== r))
2836
2836
  throw new Error("invalid end group tag");
2837
2837
  u.length > 0 && e.setUnknown(u), n.depth--;
2838
2838
  }
2839
- function Cr(e, t, n, s, r) {
2839
+ function Br(e, t, n, s, r) {
2840
2840
  var i;
2841
2841
  switch (n.fieldKind) {
2842
2842
  case "scalar":
@@ -2850,7 +2850,7 @@ function Cr(e, t, n, s, r) {
2850
2850
  e.set(n, a);
2851
2851
  else if (r.readUnknownFields) {
2852
2852
  const l = [];
2853
- Ce(a, l);
2853
+ Ue(a, l);
2854
2854
  const u = (i = e.getUnknown()) !== null && i !== void 0 ? i : [];
2855
2855
  u.push({
2856
2856
  no: n.number,
@@ -2860,17 +2860,17 @@ function Cr(e, t, n, s, r) {
2860
2860
  }
2861
2861
  break;
2862
2862
  case "message":
2863
- e.set(n, et(t, r, n, e.get(n)));
2863
+ e.set(n, nt(t, r, n, e.get(n)));
2864
2864
  break;
2865
2865
  case "list":
2866
- Ur(t, s, e.get(n), r);
2866
+ $r(t, s, e.get(n), r);
2867
2867
  break;
2868
2868
  case "map":
2869
- Dr(t, e.get(n), r);
2869
+ Yr(t, e.get(n), r);
2870
2870
  break;
2871
2871
  }
2872
2872
  }
2873
- function Dr(e, t, n) {
2873
+ function Yr(e, t, n) {
2874
2874
  const s = t.field();
2875
2875
  let r, i;
2876
2876
  const a = e.uint32(), o = e.pos + a;
@@ -2889,7 +2889,7 @@ function Dr(e, t, n) {
2889
2889
  i = e.int32();
2890
2890
  break;
2891
2891
  case "message":
2892
- i = et(e, n, s);
2892
+ i = nt(e, n, s);
2893
2893
  break;
2894
2894
  }
2895
2895
  break;
@@ -2904,16 +2904,16 @@ function Dr(e, t, n) {
2904
2904
  i = s.enum.values[0].number;
2905
2905
  break;
2906
2906
  case "message":
2907
- i = ge(s.message, void 0, !1);
2907
+ i = Ee(s.message, void 0, !1);
2908
2908
  break;
2909
2909
  }
2910
2910
  t.set(r, i);
2911
2911
  }
2912
- function Ur(e, t, n, s) {
2912
+ function $r(e, t, n, s) {
2913
2913
  var r;
2914
2914
  const i = n.field();
2915
2915
  if (i.listKind === "message") {
2916
- n.add(et(e, s, i));
2916
+ n.add(nt(e, s, i));
2917
2917
  return;
2918
2918
  }
2919
2919
  const a = (r = i.scalar) !== null && r !== void 0 ? r : c.INT32;
@@ -2925,9 +2925,9 @@ function Ur(e, t, n, s) {
2925
2925
  for (; e.pos < l; )
2926
2926
  n.add(X(e, a, i.utf8Validation));
2927
2927
  }
2928
- function et(e, t, n, s) {
2929
- const r = n.delimitedEncoding, i = s ?? ge(n.message, void 0, !1);
2930
- return Yn(i, e, t, r, r ? n.number : e.uint32()), i;
2928
+ function nt(e, t, n, s) {
2929
+ const r = n.delimitedEncoding, i = s ?? Ee(n.message, void 0, !1);
2930
+ return jn(i, e, t, r, r ? n.number : e.uint32()), i;
2931
2931
  }
2932
2932
  function X(e, t, n = !1) {
2933
2933
  switch (t) {
@@ -2963,66 +2963,66 @@ function X(e, t, n = !1) {
2963
2963
  return e.sint32();
2964
2964
  }
2965
2965
  }
2966
- function Lr(e, t) {
2966
+ function Xr(e, t) {
2967
2967
  var n;
2968
- const s = fe(vr, Xs(e));
2969
- return s.messageType.forEach(Qe), s.dependency = (n = void 0) !== null && n !== void 0 ? n : [], xn(s, (i) => {
2968
+ const s = me(Fr, er(e));
2969
+ return s.messageType.forEach(et), s.dependency = (n = void 0) !== null && n !== void 0 ? n : [], Gn(s, (i) => {
2970
2970
  }).getFile(s.name);
2971
2971
  }
2972
- const Mr = 3, Wt = {
2972
+ const Kr = 3, qt = {
2973
2973
  writeUnknownFields: !0
2974
2974
  };
2975
- function xr(e) {
2976
- return e ? Object.assign(Object.assign({}, Wt), e) : Wt;
2975
+ function jr(e) {
2976
+ return e ? Object.assign(Object.assign({}, qt), e) : qt;
2977
2977
  }
2978
2978
  function te(e, t, n) {
2979
- return me(new Ls(), xr(n), ge(e, t)).finish();
2979
+ return pe(new Xs(), jr(n), Ee(e, t)).finish();
2980
2980
  }
2981
- function me(e, t, n) {
2981
+ function pe(e, t, n) {
2982
2982
  var s;
2983
2983
  for (const r of n.sortedFields) {
2984
2984
  if (!n.isSet(r)) {
2985
- if (r.presence == Mr)
2985
+ if (r.presence == Kr)
2986
2986
  throw new Error(`cannot encode ${r} to binary: required field not set`);
2987
2987
  continue;
2988
2988
  }
2989
- Fr(e, t, n, r);
2989
+ Wr(e, t, n, r);
2990
2990
  }
2991
2991
  if (t.writeUnknownFields)
2992
2992
  for (const { no: r, wireType: i, data: a } of (s = n.getUnknown()) !== null && s !== void 0 ? s : [])
2993
2993
  e.tag(r, i).raw(a);
2994
2994
  return e;
2995
2995
  }
2996
- function Fr(e, t, n, s) {
2996
+ function Wr(e, t, n, s) {
2997
2997
  var r;
2998
2998
  switch (s.fieldKind) {
2999
2999
  case "scalar":
3000
3000
  case "enum":
3001
- pe(e, n.desc.typeName, s.name, (r = s.scalar) !== null && r !== void 0 ? r : c.INT32, s.number, n.get(s));
3001
+ ge(e, n.desc.typeName, s.name, (r = s.scalar) !== null && r !== void 0 ? r : c.INT32, s.number, n.get(s));
3002
3002
  break;
3003
3003
  case "list":
3004
- Pr(e, t, s, n.get(s));
3004
+ qr(e, t, s, n.get(s));
3005
3005
  break;
3006
3006
  case "message":
3007
- $n(e, t, s, n.get(s));
3007
+ Wn(e, t, s, n.get(s));
3008
3008
  break;
3009
3009
  case "map":
3010
3010
  for (const [i, a] of n.get(s))
3011
- Vr(e, t, s, i, a);
3011
+ Hr(e, t, s, i, a);
3012
3012
  break;
3013
3013
  }
3014
3014
  }
3015
- function pe(e, t, n, s, r, i) {
3016
- Xn(e.tag(r, Gr(s)), t, n, s, i);
3015
+ function ge(e, t, n, s, r, i) {
3016
+ qn(e.tag(r, Zr(s)), t, n, s, i);
3017
3017
  }
3018
- function $n(e, t, n, s) {
3019
- n.delimitedEncoding ? me(e.tag(n.number, I.StartGroup), t, s).tag(n.number, I.EndGroup) : me(e.tag(n.number, I.LengthDelimited).fork(), t, s).join();
3018
+ function Wn(e, t, n, s) {
3019
+ n.delimitedEncoding ? pe(e.tag(n.number, I.StartGroup), t, s).tag(n.number, I.EndGroup) : pe(e.tag(n.number, I.LengthDelimited).fork(), t, s).join();
3020
3020
  }
3021
- function Pr(e, t, n, s) {
3021
+ function qr(e, t, n, s) {
3022
3022
  var r;
3023
3023
  if (n.listKind == "message") {
3024
3024
  for (const a of s)
3025
- $n(e, t, n, a);
3025
+ Wn(e, t, n, a);
3026
3026
  return;
3027
3027
  }
3028
3028
  const i = (r = n.scalar) !== null && r !== void 0 ? r : c.INT32;
@@ -3031,27 +3031,27 @@ function Pr(e, t, n, s) {
3031
3031
  return;
3032
3032
  e.tag(n.number, I.LengthDelimited).fork();
3033
3033
  for (const a of s)
3034
- Xn(e, n.parent.typeName, n.name, i, a);
3034
+ qn(e, n.parent.typeName, n.name, i, a);
3035
3035
  e.join();
3036
3036
  return;
3037
3037
  }
3038
3038
  for (const a of s)
3039
- pe(e, n.parent.typeName, n.name, i, n.number, a);
3039
+ ge(e, n.parent.typeName, n.name, i, n.number, a);
3040
3040
  }
3041
- function Vr(e, t, n, s, r) {
3041
+ function Hr(e, t, n, s, r) {
3042
3042
  var i;
3043
- switch (e.tag(n.number, I.LengthDelimited).fork(), pe(e, n.parent.typeName, n.name, n.mapKey, 1, s), n.mapKind) {
3043
+ switch (e.tag(n.number, I.LengthDelimited).fork(), ge(e, n.parent.typeName, n.name, n.mapKey, 1, s), n.mapKind) {
3044
3044
  case "scalar":
3045
3045
  case "enum":
3046
- pe(e, n.parent.typeName, n.name, (i = n.scalar) !== null && i !== void 0 ? i : c.INT32, 2, r);
3046
+ ge(e, n.parent.typeName, n.name, (i = n.scalar) !== null && i !== void 0 ? i : c.INT32, 2, r);
3047
3047
  break;
3048
3048
  case "message":
3049
- me(e.tag(2, I.LengthDelimited).fork(), t, r).join();
3049
+ pe(e.tag(2, I.LengthDelimited).fork(), t, r).join();
3050
3050
  break;
3051
3051
  }
3052
3052
  e.join();
3053
3053
  }
3054
- function Xn(e, t, n, s, r) {
3054
+ function qn(e, t, n, s, r) {
3055
3055
  try {
3056
3056
  switch (s) {
3057
3057
  case c.STRING:
@@ -3104,7 +3104,7 @@ function Xn(e, t, n, s, r) {
3104
3104
  throw i instanceof Error ? new Error(`cannot encode field ${t}.${n} to binary: ${i.message}`) : i;
3105
3105
  }
3106
3106
  }
3107
- function Gr(e) {
3107
+ function Zr(e) {
3108
3108
  switch (e) {
3109
3109
  case c.BYTES:
3110
3110
  case c.STRING:
@@ -3121,13 +3121,13 @@ function Gr(e) {
3121
3121
  return I.Varint;
3122
3122
  }
3123
3123
  }
3124
- function Br(e, t, ...n) {
3124
+ function zr(e, t, ...n) {
3125
3125
  if (n.length > 0)
3126
3126
  throw new Error();
3127
3127
  return e.services[t];
3128
3128
  }
3129
- const _ = /* @__PURE__ */ Lr("CgpjaGF0LnByb3RvEgdjaGF0LnYxIkkKCkF0dGFjaG1lbnQSCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCRIUCgxjb250ZW50X3R5cGUYAyABKAkSCwoDdXJsGAQgASgJIkEKBkJ1dHRvbhINCgVsYWJlbBgBIAEoCRINCgV2YWx1ZRgCIAEoCRIZCgtidXR0b25fdHlwZRgDIAEoCVIEdHlwZSJ/CgRDYXJkEg0KBXRpdGxlGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEicKBWltYWdlGAMgASgLMhMuY2hhdC52MS5BdHRhY2htZW50SACIAQESIAoHYnV0dG9ucxgEIAMoCzIPLmNoYXQudjEuQnV0dG9uQggKBl9pbWFnZSIjCg9NZXNzYWdlTWV0YWRhdGESEAoIYXVkaWVuY2UYASABKAkiIgoOVHlwaW5nTWV0YWRhdGESEAoIYXVkaWVuY2UYASABKAki7QIKB01lc3NhZ2USCgoCaWQYASABKAkSDAoEcm9sZRgCIAEoCRIRCgR0ZXh0GAMgASgJSACIAQESEQoEaHRtbBgEIAEoCUgBiAEBEigKC2F0dGFjaG1lbnRzGAUgAygLMhMuY2hhdC52MS5BdHRhY2htZW50EiAKB2J1dHRvbnMYBiADKAsyDy5jaGF0LnYxLkJ1dHRvbhIeCgdnYWxsZXJ5GAcgAygLMg0uY2hhdC52MS5DYXJkEhEKCXRpbWVzdGFtcBgIIAEoCRIYCgd1c2VyX2lkGAkgASgJUgd1c2VyX2lkEhwKCXVzZXJfbmFtZRgKIAEoCVIJdXNlcl9uYW1lEg0KBXN0YXRlGAsgASgJEhMKBmFjdGlvbhgMIAEoCUgCiAEBEioKCG1ldGFkYXRhGA0gASgLMhguY2hhdC52MS5NZXNzYWdlTWV0YWRhdGFCBwoFX3RleHRCBwoFX2h0bWxCCQoHX2FjdGlvbiKRAQoLVHlwaW5nRXZlbnQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSDQoFc3RhdGUYAiABKAkSDAoEcm9sZRgDIAEoCRIPCgd1c2VyX2lkGAQgASgJEhEKCXVzZXJfbmFtZRgFIAEoCRIpCghtZXRhZGF0YRgGIAEoCzIXLmNoYXQudjEuVHlwaW5nTWV0YWRhdGEiXQoRUGFydGljaXBhbnRKb2luZWQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSDAoEcm9sZRgCIAEoCRIPCgd1c2VyX2lkGAMgASgJEhEKCXVzZXJfbmFtZRgEIAEoCSJJCg9QYXJ0aWNpcGFudExlZnQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSEwoGcmVhc29uGAIgASgJSACIAQFCCQoHX3JlYXNvbiJjCgNBY3cSDwoHZW5hYmxlZBgBIAEoCBIQCghkdXJhdGlvbhgCIAEoAxIPCgdlbmZvcmNlGAMgASgIEhIKCnN0YXJ0ZWRfYXQYBCABKAkSFAoMZGlzcG9zaXRpb25zGAUgAygJIkYKDFNlc3Npb25FbmRlZBIOCgZyZWFzb24YASABKAkSHgoDYWN3GAIgASgLMgwuY2hhdC52MS5BY3dIAIgBAUIGCgRfYWN3IhwKCUhlYXJ0YmVhdBIPCgd1bml4X21zGAEgASgDIqkCCglDaGF0RXZlbnQSIwoHbWVzc2FnZRgBIAEoCzIQLmNoYXQudjEuTWVzc2FnZUgAEiYKBnR5cGluZxgCIAEoCzIULmNoYXQudjEuVHlwaW5nRXZlbnRIABI4ChJwYXJ0aWNpcGFudF9qb2luZWQYAyABKAsyGi5jaGF0LnYxLlBhcnRpY2lwYW50Sm9pbmVkSAASNAoQcGFydGljaXBhbnRfbGVmdBgEIAEoCzIYLmNoYXQudjEuUGFydGljaXBhbnRMZWZ0SAASLgoNc2Vzc2lvbl9lbmRlZBgFIAEoCzIVLmNoYXQudjEuU2Vzc2lvbkVuZGVkSAASJwoJaGVhcnRiZWF0GAYgASgLMhIuY2hhdC52MS5IZWFydGJlYXRIAEIGCgRraW5kIg8KDUF0dGFjaFJlcXVlc3QiNgoOQXR0YWNoUmVzcG9uc2USFgoOcGFydGljaXBhbnRfaWQYASABKAkSDAoEcm9sZRgCIAEoCSKFAgoOTWVzc2FnZVJlcXVlc3QSGQoRY2xpZW50X21lc3NhZ2VfaWQYASABKAkSEQoEdGV4dBgCIAEoCUgAiAEBEigKC2F0dGFjaG1lbnRzGAMgAygLMhMuY2hhdC52MS5BdHRhY2htZW50EhIKBXZhbHVlGAQgASgJSAGIAQESGgoNZ2FsbGVyeV9sYWJlbBgFIAEoCUgCiAEBEhEKBGh0bWwYBiABKAlIA4gBARIqCghtZXRhZGF0YRgHIAEoCzIYLmNoYXQudjEuTWVzc2FnZU1ldGFkYXRhQgcKBV90ZXh0QggKBl92YWx1ZUIQCg5fZ2FsbGVyeV9sYWJlbEIHCgVfaHRtbCI0Cg9NZXNzYWdlUmVzcG9uc2USIQoHbWVzc2FnZRgBIAEoCzIQLmNoYXQudjEuTWVzc2FnZSJJCg1UeXBpbmdSZXF1ZXN0Eg0KBXN0YXRlGAEgASgJEikKCG1ldGFkYXRhGAIgASgLMhcuY2hhdC52MS5UeXBpbmdNZXRhZGF0YSIQCg5UeXBpbmdSZXNwb25zZSIOCgxMZWF2ZVJlcXVlc3QiDwoNTGVhdmVSZXNwb25zZTLyAQoHU2Vzc2lvbhI2CgZBdHRhY2gSFi5jaGF0LnYxLkF0dGFjaFJlcXVlc3QaEi5jaGF0LnYxLkNoYXRFdmVudDABEjwKB01lc3NhZ2USFy5jaGF0LnYxLk1lc3NhZ2VSZXF1ZXN0GhguY2hhdC52MS5NZXNzYWdlUmVzcG9uc2USOQoGVHlwaW5nEhYuY2hhdC52MS5UeXBpbmdSZXF1ZXN0GhcuY2hhdC52MS5UeXBpbmdSZXNwb25zZRI2CgVMZWF2ZRIVLmNoYXQudjEuTGVhdmVSZXF1ZXN0GhYuY2hhdC52MS5MZWF2ZVJlc3BvbnNlYgZwcm90bzM"), Yr = /* @__PURE__ */ R(_, 0), $r = /* @__PURE__ */ R(_, 3), Xr = /* @__PURE__ */ R(_, 4), Kr = /* @__PURE__ */ R(_, 12), jt = /* @__PURE__ */ R(_, 13), Wr = /* @__PURE__ */ R(_, 14), qt = /* @__PURE__ */ R(_, 15), jr = /* @__PURE__ */ R(_, 16), Ht = /* @__PURE__ */ R(_, 17), Zt = /* @__PURE__ */ R(_, 19), ne = /* @__PURE__ */ Br(_, 0);
3130
- function tt(e, t) {
3129
+ const R = /* @__PURE__ */ Xr("CgpjaGF0LnByb3RvEgdjaGF0LnYxIkkKCkF0dGFjaG1lbnQSCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCRIUCgxjb250ZW50X3R5cGUYAyABKAkSCwoDdXJsGAQgASgJIkEKBkJ1dHRvbhINCgVsYWJlbBgBIAEoCRINCgV2YWx1ZRgCIAEoCRIZCgtidXR0b25fdHlwZRgDIAEoCVIEdHlwZSJ/CgRDYXJkEg0KBXRpdGxlGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEicKBWltYWdlGAMgASgLMhMuY2hhdC52MS5BdHRhY2htZW50SACIAQESIAoHYnV0dG9ucxgEIAMoCzIPLmNoYXQudjEuQnV0dG9uQggKBl9pbWFnZSIjCg9NZXNzYWdlTWV0YWRhdGESEAoIYXVkaWVuY2UYASABKAkiIgoOVHlwaW5nTWV0YWRhdGESEAoIYXVkaWVuY2UYASABKAki7QIKB01lc3NhZ2USCgoCaWQYASABKAkSDAoEcm9sZRgCIAEoCRIRCgR0ZXh0GAMgASgJSACIAQESEQoEaHRtbBgEIAEoCUgBiAEBEigKC2F0dGFjaG1lbnRzGAUgAygLMhMuY2hhdC52MS5BdHRhY2htZW50EiAKB2J1dHRvbnMYBiADKAsyDy5jaGF0LnYxLkJ1dHRvbhIeCgdnYWxsZXJ5GAcgAygLMg0uY2hhdC52MS5DYXJkEhEKCXRpbWVzdGFtcBgIIAEoCRIYCgd1c2VyX2lkGAkgASgJUgd1c2VyX2lkEhwKCXVzZXJfbmFtZRgKIAEoCVIJdXNlcl9uYW1lEg0KBXN0YXRlGAsgASgJEhMKBmFjdGlvbhgMIAEoCUgCiAEBEioKCG1ldGFkYXRhGA0gASgLMhguY2hhdC52MS5NZXNzYWdlTWV0YWRhdGFCBwoFX3RleHRCBwoFX2h0bWxCCQoHX2FjdGlvbiKRAQoLVHlwaW5nRXZlbnQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSDQoFc3RhdGUYAiABKAkSDAoEcm9sZRgDIAEoCRIPCgd1c2VyX2lkGAQgASgJEhEKCXVzZXJfbmFtZRgFIAEoCRIpCghtZXRhZGF0YRgGIAEoCzIXLmNoYXQudjEuVHlwaW5nTWV0YWRhdGEiXQoRUGFydGljaXBhbnRKb2luZWQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSDAoEcm9sZRgCIAEoCRIPCgd1c2VyX2lkGAMgASgJEhEKCXVzZXJfbmFtZRgEIAEoCSJJCg9QYXJ0aWNpcGFudExlZnQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSEwoGcmVhc29uGAIgASgJSACIAQFCCQoHX3JlYXNvbiJjCgNBY3cSDwoHZW5hYmxlZBgBIAEoCBIQCghkdXJhdGlvbhgCIAEoAxIPCgdlbmZvcmNlGAMgASgIEhIKCnN0YXJ0ZWRfYXQYBCABKAkSFAoMZGlzcG9zaXRpb25zGAUgAygJIkYKDFNlc3Npb25FbmRlZBIOCgZyZWFzb24YASABKAkSHgoDYWN3GAIgASgLMgwuY2hhdC52MS5BY3dIAIgBAUIGCgRfYWN3IhwKCUhlYXJ0YmVhdBIPCgd1bml4X21zGAEgASgDIqkCCglDaGF0RXZlbnQSIwoHbWVzc2FnZRgBIAEoCzIQLmNoYXQudjEuTWVzc2FnZUgAEiYKBnR5cGluZxgCIAEoCzIULmNoYXQudjEuVHlwaW5nRXZlbnRIABI4ChJwYXJ0aWNpcGFudF9qb2luZWQYAyABKAsyGi5jaGF0LnYxLlBhcnRpY2lwYW50Sm9pbmVkSAASNAoQcGFydGljaXBhbnRfbGVmdBgEIAEoCzIYLmNoYXQudjEuUGFydGljaXBhbnRMZWZ0SAASLgoNc2Vzc2lvbl9lbmRlZBgFIAEoCzIVLmNoYXQudjEuU2Vzc2lvbkVuZGVkSAASJwoJaGVhcnRiZWF0GAYgASgLMhIuY2hhdC52MS5IZWFydGJlYXRIAEIGCgRraW5kIg8KDUF0dGFjaFJlcXVlc3QiNgoOQXR0YWNoUmVzcG9uc2USFgoOcGFydGljaXBhbnRfaWQYASABKAkSDAoEcm9sZRgCIAEoCSKFAgoOTWVzc2FnZVJlcXVlc3QSGQoRY2xpZW50X21lc3NhZ2VfaWQYASABKAkSEQoEdGV4dBgCIAEoCUgAiAEBEigKC2F0dGFjaG1lbnRzGAMgAygLMhMuY2hhdC52MS5BdHRhY2htZW50EhIKBXZhbHVlGAQgASgJSAGIAQESGgoNZ2FsbGVyeV9sYWJlbBgFIAEoCUgCiAEBEhEKBGh0bWwYBiABKAlIA4gBARIqCghtZXRhZGF0YRgHIAEoCzIYLmNoYXQudjEuTWVzc2FnZU1ldGFkYXRhQgcKBV90ZXh0QggKBl92YWx1ZUIQCg5fZ2FsbGVyeV9sYWJlbEIHCgVfaHRtbCI0Cg9NZXNzYWdlUmVzcG9uc2USIQoHbWVzc2FnZRgBIAEoCzIQLmNoYXQudjEuTWVzc2FnZSJJCg1UeXBpbmdSZXF1ZXN0Eg0KBXN0YXRlGAEgASgJEikKCG1ldGFkYXRhGAIgASgLMhcuY2hhdC52MS5UeXBpbmdNZXRhZGF0YSIQCg5UeXBpbmdSZXNwb25zZSIOCgxMZWF2ZVJlcXVlc3QiDwoNTGVhdmVSZXNwb25zZTLyAQoHU2Vzc2lvbhI2CgZBdHRhY2gSFi5jaGF0LnYxLkF0dGFjaFJlcXVlc3QaEi5jaGF0LnYxLkNoYXRFdmVudDABEjwKB01lc3NhZ2USFy5jaGF0LnYxLk1lc3NhZ2VSZXF1ZXN0GhguY2hhdC52MS5NZXNzYWdlUmVzcG9uc2USOQoGVHlwaW5nEhYuY2hhdC52MS5UeXBpbmdSZXF1ZXN0GhcuY2hhdC52MS5UeXBpbmdSZXNwb25zZRI2CgVMZWF2ZRIVLmNoYXQudjEuTGVhdmVSZXF1ZXN0GhYuY2hhdC52MS5MZWF2ZVJlc3BvbnNlYgZwcm90bzM"), Qr = /* @__PURE__ */ v(R, 0), Jr = /* @__PURE__ */ v(R, 3), ei = /* @__PURE__ */ v(R, 4), ti = /* @__PURE__ */ v(R, 12), Ht = /* @__PURE__ */ v(R, 13), ni = /* @__PURE__ */ v(R, 14), Zt = /* @__PURE__ */ v(R, 15), si = /* @__PURE__ */ v(R, 16), zt = /* @__PURE__ */ v(R, 17), Qt = /* @__PURE__ */ v(R, 19), ne = /* @__PURE__ */ zr(R, 0);
3130
+ function st(e, t) {
3131
3131
  if (e == null) return;
3132
3132
  if (typeof e != "object" || Array.isArray(e))
3133
3133
  throw h.session(`${t} carried invalid metadata`);
@@ -3136,7 +3136,7 @@ function tt(e, t) {
3136
3136
  if (n === "internal" || n === "all") return { audience: n };
3137
3137
  throw h.session(`${t} carried invalid metadata.audience`);
3138
3138
  }
3139
- const qr = "x-origon-client-id", Hr = "stream_overflow", U = {
3139
+ const ri = "x-origon-client-id", ii = "stream_overflow", U = {
3140
3140
  /** session_not_found — terminal */
3141
3141
  NOT_FOUND: 1,
3142
3142
  /** bad request (e.g. missing client id at gw) — terminal */
@@ -3164,7 +3164,7 @@ function se(e) {
3164
3164
  return "terminal";
3165
3165
  }
3166
3166
  }
3167
- function zt(e) {
3167
+ function Jt(e) {
3168
3168
  let t;
3169
3169
  try {
3170
3170
  t = new URL(e);
@@ -3180,11 +3180,11 @@ function zt(e) {
3180
3180
  `chat session url carries no client id (want /chat/api/<id>/live, got "${t.pathname}")`
3181
3181
  );
3182
3182
  }
3183
- function Zr(e) {
3184
- const t = fe(Kr, e);
3183
+ function ai(e) {
3184
+ const t = me(ti, e);
3185
3185
  switch (t.kind.case) {
3186
3186
  case "message":
3187
- return { kind: "message", message: Kn(t.kind.value) };
3187
+ return { kind: "message", message: Hn(t.kind.value) };
3188
3188
  case "typing": {
3189
3189
  const n = t.kind.value;
3190
3190
  if (n.state !== "on" && n.state !== "off")
@@ -3197,20 +3197,20 @@ function Zr(e) {
3197
3197
  userId: n.userId,
3198
3198
  userName: n.userName,
3199
3199
  state: n.state,
3200
- metadata: ei(n.metadata?.audience)
3200
+ metadata: li(n.metadata?.audience)
3201
3201
  }
3202
3202
  };
3203
3203
  }
3204
3204
  case "sessionEnded": {
3205
3205
  const n = t.kind.value.reason;
3206
- return { kind: "ended", reason: n, replay: n === Hr };
3206
+ return { kind: "ended", reason: n, replay: n === ii };
3207
3207
  }
3208
3208
  default:
3209
3209
  return { kind: "ignore" };
3210
3210
  }
3211
3211
  }
3212
- function Kn(e) {
3213
- const t = e.role === "ai" || e.role === "user" || e.role === "system" ? e.role : "external", n = tt(e.metadata, "chat message");
3212
+ function Hn(e) {
3213
+ const t = e.role === "ai" || e.role === "user" || e.role === "system" ? e.role : "external", n = st(e.metadata, "chat message");
3214
3214
  return {
3215
3215
  role: t,
3216
3216
  id: e.id,
@@ -3229,18 +3229,18 @@ function Kn(e) {
3229
3229
  ...e.userId !== "" ? { userId: e.userId } : {},
3230
3230
  ...e.userName !== "" ? { userName: e.userName } : {},
3231
3231
  ...e.action !== void 0 ? { action: e.action } : {},
3232
- ...e.buttons.length > 0 ? { buttons: e.buttons.map(Wn) } : {},
3233
- ...e.gallery.length > 0 ? { gallery: e.gallery.map(zr) } : {}
3232
+ ...e.buttons.length > 0 ? { buttons: e.buttons.map(Zn) } : {},
3233
+ ...e.gallery.length > 0 ? { gallery: e.gallery.map(oi) } : {}
3234
3234
  };
3235
3235
  }
3236
- function Wn(e) {
3236
+ function Zn(e) {
3237
3237
  return { label: e.label, value: e.value, type: e.buttonType };
3238
3238
  }
3239
- function zr(e) {
3239
+ function oi(e) {
3240
3240
  return {
3241
3241
  title: e.title,
3242
3242
  description: e.description,
3243
- buttons: e.buttons.map(Wn),
3243
+ buttons: e.buttons.map(Zn),
3244
3244
  ...e.image !== void 0 ? {
3245
3245
  image: {
3246
3246
  id: e.image.id,
@@ -3251,9 +3251,9 @@ function zr(e) {
3251
3251
  } : {}
3252
3252
  };
3253
3253
  }
3254
- class Qr {
3254
+ class ci {
3255
3255
  constructor(t, n) {
3256
- this.url = t.url, this.token = t.token, this.clientId = zt(t.url), this.opts = n, this.client = this.createClient();
3256
+ this.url = t.url, this.token = t.token, this.clientId = Jt(t.url), this.opts = n, this.client = this.createClient();
3257
3257
  }
3258
3258
  get credentials() {
3259
3259
  return { url: this.url, token: this.token };
@@ -3266,7 +3266,7 @@ class Qr {
3266
3266
  */
3267
3267
  setCredentials(t) {
3268
3268
  const n = t.url !== this.url;
3269
- this.url = t.url, this.token = t.token, n && (this.clientId = zt(t.url), this.client = this.createClient());
3269
+ this.url = t.url, this.token = t.token, n && (this.clientId = Jt(t.url), this.client = this.createClient());
3270
3270
  }
3271
3271
  createClient() {
3272
3272
  const t = {
@@ -3275,18 +3275,18 @@ class Qr {
3275
3275
  logout: () => {
3276
3276
  }
3277
3277
  };
3278
- return ms(this.url, t, {
3279
- metadata: { [qr]: this.clientId },
3278
+ return Ss(this.url, t, {
3279
+ metadata: { [ri]: this.clientId },
3280
3280
  ...this.opts.transport !== void 0 ? { transport: this.opts.transport } : {},
3281
3281
  ...this.opts.logger !== void 0 ? { logger: this.opts.logger } : {}
3282
3282
  });
3283
3283
  }
3284
3284
  /** Attach — join the room. The `initial` frame is the `AttachResponse`. */
3285
3285
  async attach() {
3286
- const t = te(jt, C(jt)), n = await this.client.stream(re(ne.method.attach), t);
3286
+ const t = te(Ht, C(Ht)), n = await this.client.stream(re(ne.method.attach), t);
3287
3287
  let s;
3288
3288
  try {
3289
- s = fe(Wr, n.initial);
3289
+ s = me(ni, n.initial);
3290
3290
  } catch (r) {
3291
3291
  throw n.cancel(), r;
3292
3292
  }
@@ -3297,10 +3297,10 @@ class Qr {
3297
3297
  * timestamp, rewritten attachment URLs) — the former POST echo.
3298
3298
  */
3299
3299
  async message(t) {
3300
- const n = C(qt, {
3300
+ const n = C(Zt, {
3301
3301
  clientMessageId: t.clientMessageId,
3302
3302
  attachments: (t.attachments ?? []).map(
3303
- (i) => C(Yr, {
3303
+ (i) => C(Qr, {
3304
3304
  id: i.id,
3305
3305
  name: i.name,
3306
3306
  contentType: i.contentType,
@@ -3312,48 +3312,48 @@ class Qr {
3312
3312
  ...t.html !== void 0 ? { html: t.html } : {},
3313
3313
  ...t.value !== void 0 ? { value: t.value } : {},
3314
3314
  ...t.galleryLabel !== void 0 ? { galleryLabel: t.galleryLabel } : {},
3315
- ...t.metadata?.audience !== void 0 ? { metadata: C($r, t.metadata) } : {}
3315
+ ...t.metadata?.audience !== void 0 ? { metadata: C(Jr, t.metadata) } : {}
3316
3316
  }), s = await this.client.call(
3317
3317
  re(ne.method.message),
3318
- te(qt, n)
3319
- ), r = fe(jr, s);
3318
+ te(Zt, n)
3319
+ ), r = me(si, s);
3320
3320
  if (r.message === void 0)
3321
3321
  throw h.session("chat message response carried no message");
3322
- return Kn(r.message);
3322
+ return Hn(r.message);
3323
3323
  }
3324
3324
  /** Typing — on/off indicator. Unary; the response is empty. */
3325
3325
  async typing(t, n) {
3326
- const s = C(Ht, {
3326
+ const s = C(zt, {
3327
3327
  state: t,
3328
- ...n?.audience !== void 0 ? { metadata: C(Xr, n) } : {}
3328
+ ...n?.audience !== void 0 ? { metadata: C(ei, n) } : {}
3329
3329
  });
3330
3330
  await this.client.call(
3331
3331
  re(ne.method.typing),
3332
- te(Ht, s)
3332
+ te(zt, s)
3333
3333
  );
3334
3334
  }
3335
3335
  /** Leave — explicit participant leave (immediate finalize, idempotent). */
3336
3336
  async leave() {
3337
3337
  await this.client.call(
3338
3338
  re(ne.method.leave),
3339
- te(Zt, C(Zt))
3339
+ te(Qt, C(Qt))
3340
3340
  );
3341
3341
  }
3342
3342
  }
3343
- function Jr(e, t) {
3343
+ function ui(e, t) {
3344
3344
  if (e === "internal" || e === "all") return e;
3345
3345
  throw h.session(`${t} carried invalid or missing metadata.audience`);
3346
3346
  }
3347
- function ei(e) {
3348
- return { audience: Jr(e, "chat typing event") };
3347
+ function li(e) {
3348
+ return { audience: ui(e, "chat typing event") };
3349
3349
  }
3350
3350
  function re(e) {
3351
3351
  return `${e.parent.typeName}/${e.name}`;
3352
3352
  }
3353
- const ti = 3e3, ni = 6e3, si = 3, ri = 500, ii = 2e3;
3354
- class ai {
3353
+ const di = 3e3, hi = 6e3, fi = 3, mi = 500, pi = 2e3;
3354
+ class gi {
3355
3355
  constructor(t, n) {
3356
- this.stream = null, this.terminalFired = !1, this.reattaching = !1, this.provisionedRecoveryPromise = null, this.recoveryGeneration = 0, this.knownMessageIds = /* @__PURE__ */ new Set(), this.outboundOffTimer = null, this.outboundTypingMetadata = null, this.inboundTyping = /* @__PURE__ */ new Map(), this.sessionId = t.sessionId, this.lane = new Qr(
3356
+ this.stream = null, this.terminalFired = !1, this.reattaching = !1, this.provisionedRecoveryPromise = null, this.recoveryGeneration = 0, this.knownMessageIds = /* @__PURE__ */ new Set(), this.outboundOffTimer = null, this.outboundTypingMetadata = null, this.inboundTyping = /* @__PURE__ */ new Map(), this.sessionId = t.sessionId, this.lane = new ci(
3357
3357
  { url: t.url.replace(/\/$/, ""), token: t.token },
3358
3358
  { remint: () => this.remint() }
3359
3359
  ), this.sessionHttp = n.sessionHttp, this.provisionedRecovery = n.provisionedRecovery, this.dispatcher = n.dispatcher, this.onTerminal = n.onTerminal;
@@ -3389,7 +3389,7 @@ class ai {
3389
3389
  // ── Outbound API ─────────────────────────────────────────────────────
3390
3390
  async sendMessage(t) {
3391
3391
  this.cancelOutboundDebounce({ flushOff: !0 });
3392
- const n = fn(), s = tt(t.metadata, "chat message request"), r = {
3392
+ const n = bn(), s = st(t.metadata, "chat message request"), r = {
3393
3393
  role: t.role ?? "external",
3394
3394
  id: "",
3395
3395
  localId: n,
@@ -3442,7 +3442,7 @@ class ai {
3442
3442
  this.outboundOffTimer = null;
3443
3443
  const n = this.outboundTypingMetadata;
3444
3444
  this.outboundTypingMetadata = null, this.sendTyping("off", n ?? void 0);
3445
- }, ti);
3445
+ }, di);
3446
3446
  }
3447
3447
  stopTyping() {
3448
3448
  this.cancelOutboundDebounce({ flushOff: !0 });
@@ -3453,7 +3453,7 @@ class ai {
3453
3453
  this.fireTerminal({ kind: "localClose" }), n && await Promise.race([
3454
3454
  this.lane.leave().catch((s) => {
3455
3455
  }),
3456
- W(ii)
3456
+ j(pi)
3457
3457
  ]);
3458
3458
  }
3459
3459
  /**
@@ -3481,7 +3481,7 @@ class ai {
3481
3481
  if (this.terminalFired || this.stream !== t) continue;
3482
3482
  let r;
3483
3483
  try {
3484
- r = Zr(s);
3484
+ r = ai(s);
3485
3485
  } catch {
3486
3486
  this.fireTerminal({ kind: "protocolViolation" });
3487
3487
  return;
@@ -3550,7 +3550,7 @@ class ai {
3550
3550
  if (!n) return null;
3551
3551
  let s = t;
3552
3552
  for (let r = 0; r < n.delaysMs.length; r++) {
3553
- if (await W(n.delaysMs[r]), this.terminalFired) return null;
3553
+ if (await j(n.delaysMs[r]), this.terminalFired) return null;
3554
3554
  const i = ++this.recoveryGeneration;
3555
3555
  let a;
3556
3556
  try {
@@ -3634,8 +3634,8 @@ class ai {
3634
3634
  this.reattaching = !0;
3635
3635
  try {
3636
3636
  let t = !1;
3637
- for (let n = 0; n < si; n++) {
3638
- if (await W(ri * 2 ** n), this.terminalFired) return;
3637
+ for (let n = 0; n < fi; n++) {
3638
+ if (await j(mi * 2 ** n), this.terminalFired) return;
3639
3639
  try {
3640
3640
  const { stream: s } = await this.lane.attach();
3641
3641
  if (this.terminalFired) {
@@ -3726,7 +3726,7 @@ class ai {
3726
3726
  ...t,
3727
3727
  state: "off"
3728
3728
  });
3729
- }, ni);
3729
+ }, hi);
3730
3730
  this.inboundTyping.set(t.participantId, { timer: n, update: t });
3731
3731
  }
3732
3732
  clearInboundWatchdog(t) {
@@ -3767,7 +3767,7 @@ class ai {
3767
3767
  this.stream = null, n && n.cancel(), this.clearAllInboundWatchdogs({ notify: this.provisionedRecovery !== void 0 }), this.outboundOffTimer && (clearTimeout(this.outboundOffTimer), this.outboundOffTimer = null), this.outboundTypingMetadata = null, this.onTerminal(t, this.sessionId);
3768
3768
  }
3769
3769
  }
3770
- class oi {
3770
+ class bi {
3771
3771
  constructor(t) {
3772
3772
  this.endpoint = t.endpoint.replace(/\/$/, ""), this.defaultHeaders = {}, t.token && (this.defaultHeaders.Authorization = `Bearer ${t.token}`);
3773
3773
  }
@@ -3797,7 +3797,7 @@ class oi {
3797
3797
  } catch (a) {
3798
3798
  throw h.other(`fetch failed: ${a.message}`);
3799
3799
  }
3800
- return Qt(i);
3800
+ return en(i);
3801
3801
  }
3802
3802
  async getJsonAbsolute(t, n) {
3803
3803
  const s = {
@@ -3811,7 +3811,7 @@ class oi {
3811
3811
  } catch (i) {
3812
3812
  throw h.other(`fetch failed: ${i.message}`);
3813
3813
  }
3814
- return Qt(r);
3814
+ return en(r);
3815
3815
  }
3816
3816
  async deleteAbsolute(t, n) {
3817
3817
  const s = {
@@ -3827,7 +3827,7 @@ class oi {
3827
3827
  }
3828
3828
  if (!r.ok) {
3829
3829
  const i = await r.text().catch(() => ""), a = n?.bearer;
3830
- throw nt(
3830
+ throw rt(
3831
3831
  r.status,
3832
3832
  a ? i.split(a).join("[REDACTED]") : i
3833
3833
  );
@@ -3837,10 +3837,10 @@ class oi {
3837
3837
  return this.url(t);
3838
3838
  }
3839
3839
  }
3840
- async function Qt(e) {
3840
+ async function en(e) {
3841
3841
  const t = await e.text();
3842
3842
  if (!e.ok)
3843
- throw nt(e.status, t);
3843
+ throw rt(e.status, t);
3844
3844
  let n;
3845
3845
  if (t.length !== 0) {
3846
3846
  try {
@@ -3848,28 +3848,28 @@ async function Qt(e) {
3848
3848
  } catch (s) {
3849
3849
  throw h.other(`decode response: ${s.message}`);
3850
3850
  }
3851
- if (rn(n))
3851
+ if (un(n))
3852
3852
  throw h.http(e.status, n.error.code, n.error.message);
3853
3853
  return n;
3854
3854
  }
3855
3855
  }
3856
- function nt(e, t) {
3856
+ function rt(e, t) {
3857
3857
  if (e >= 500)
3858
3858
  return h.serverUnavailable(e);
3859
3859
  if (t.length === 0)
3860
3860
  return h.http(e, "", `HTTP ${e}`);
3861
3861
  try {
3862
3862
  const n = JSON.parse(t);
3863
- if (rn(n))
3863
+ if (un(n))
3864
3864
  return h.http(e, n.error.code, n.error.message);
3865
3865
  } catch {
3866
3866
  }
3867
3867
  return h.http(e, "", t.slice(0, 200));
3868
3868
  }
3869
- function ve(e, t) {
3869
+ function Oe(e, t) {
3870
3870
  return t ? `${e}?userId=${encodeURIComponent(t)}` : e;
3871
3871
  }
3872
- class ci {
3872
+ class Ei {
3873
3873
  constructor(t, n) {
3874
3874
  this.http = t, this.userId = n;
3875
3875
  }
@@ -3881,24 +3881,54 @@ class ci {
3881
3881
  startSession(t) {
3882
3882
  const n = { channel: t.channel };
3883
3883
  return t.sessionId && (n.sessionId = t.sessionId), t.data && (n.data = t.data), this.http.postJson(
3884
- ve("/session/start", this.userId),
3884
+ Oe("/session/start", this.userId),
3885
3885
  n
3886
3886
  );
3887
3887
  }
3888
3888
  /** `GET /sessions` — list prior sessions (matches `client-sdk/session`). */
3889
3889
  async listSessions() {
3890
- const t = await this.http.getJson(ve("/sessions", this.userId));
3891
- return ui(t);
3890
+ const t = await this.http.getJson(Oe("/sessions", this.userId));
3891
+ return zn(t);
3892
3892
  }
3893
3893
  /** `GET /session/{id}` — fetch transcript + control (matches `client-sdk/session`). */
3894
3894
  async getSession(t) {
3895
3895
  const n = await this.http.getJson(
3896
- ve(`/session/${encodeURIComponent(t)}`, this.userId)
3896
+ Oe(`/session/${encodeURIComponent(t)}`, this.userId)
3897
+ );
3898
+ return Qn(n);
3899
+ }
3900
+ async listSessionsPage(t = {}) {
3901
+ const n = tn(t.pageSize, 50, 100, "directory"), s = await this.http.getJson(
3902
+ nn("/sessions", this.userId, n, t.cursor, t.search),
3903
+ { signal: t.signal }
3904
+ );
3905
+ return yi(s);
3906
+ }
3907
+ async getSessionPage(t, n = {}) {
3908
+ const s = tn(n.pageSize, 100, 250, "history"), r = await this.http.getJson(
3909
+ nn(
3910
+ `/session/${encodeURIComponent(t)}`,
3911
+ this.userId,
3912
+ s,
3913
+ n.cursor
3914
+ ),
3915
+ { signal: n.signal }
3897
3916
  );
3898
- return li(n);
3917
+ return wi(r);
3899
3918
  }
3900
3919
  }
3901
- function ui(e) {
3920
+ function tn(e, t, n, s) {
3921
+ const r = e ?? t;
3922
+ if (!Number.isInteger(r) || r < 1 || r > n)
3923
+ throw h.other(`${s} page size must be between 1 and ${n}`);
3924
+ return r;
3925
+ }
3926
+ function nn(e, t, n, s, r) {
3927
+ if (s === "") throw h.other("page cursor must not be empty");
3928
+ const i = new URLSearchParams();
3929
+ return t && i.set("userId", t), i.set("pageSize", String(n)), s !== void 0 && i.set("cursor", s), r !== void 0 && i.set("search", r), `${e}?${i.toString()}`;
3930
+ }
3931
+ function zn(e) {
3902
3932
  if (!Array.isArray(e))
3903
3933
  throw h.other("decode sessions: expected an array");
3904
3934
  return e.forEach((t, n) => {
@@ -3910,11 +3940,11 @@ function ui(e) {
3910
3940
  const s = t;
3911
3941
  return s.lastMessage === void 0 || s.lastMessage === null ? s : {
3912
3942
  ...s,
3913
- lastMessage: jn(s.lastMessage, `decode sessions[${n}].lastMessage`)
3943
+ lastMessage: es(s.lastMessage, `decode sessions[${n}].lastMessage`)
3914
3944
  };
3915
3945
  });
3916
3946
  }
3917
- function li(e) {
3947
+ function Qn(e) {
3918
3948
  if (typeof e != "object" || e === null || Array.isArray(e))
3919
3949
  throw h.other("decode session: expected an object");
3920
3950
  const t = e.history;
@@ -3923,14 +3953,39 @@ function li(e) {
3923
3953
  return {
3924
3954
  ...e,
3925
3955
  history: t.map(
3926
- (n, s) => jn(n, `decode session.history[${s}]`)
3956
+ (n, s) => es(n, `decode session.history[${s}]`)
3927
3957
  )
3928
3958
  };
3929
3959
  }
3930
- function jn(e, t) {
3960
+ function yi(e) {
3961
+ const t = Jn(e, ["nextCursor", "sessions"], "decode sessions page");
3962
+ if (t.nextCursor !== null && typeof t.nextCursor != "string")
3963
+ throw h.other("decode sessions page.nextCursor: expected string or null");
3964
+ return {
3965
+ sessions: zn(t.sessions),
3966
+ nextCursor: t.nextCursor
3967
+ };
3968
+ }
3969
+ function wi(e) {
3970
+ const t = Jn(e, ["control", "history", "nextCursor"], "decode session page");
3971
+ if (t.nextCursor !== null && typeof t.nextCursor != "string")
3972
+ throw h.other("decode session page.nextCursor: expected string or null");
3973
+ if (t.control !== "ai" && t.control !== "user")
3974
+ throw h.other("decode session page.control: expected ai or user");
3975
+ return { ...Qn({ history: t.history, control: t.control }), nextCursor: t.nextCursor };
3976
+ }
3977
+ function Jn(e, t, n) {
3978
+ if (typeof e != "object" || e === null || Array.isArray(e))
3979
+ throw h.other(`${n}: expected an object`);
3980
+ const s = e, r = Object.keys(s).sort();
3981
+ if (r.length !== t.length || r.some((i, a) => i !== t[a]))
3982
+ throw h.other(`${n}: unexpected envelope keys`);
3983
+ return s;
3984
+ }
3985
+ function es(e, t) {
3931
3986
  if (typeof e != "object" || e === null || Array.isArray(e))
3932
3987
  throw h.other(`${t}: expected an object`);
3933
- const n = e, s = tt(
3988
+ const n = e, s = st(
3934
3989
  e.metadata,
3935
3990
  t
3936
3991
  );
@@ -3940,7 +3995,7 @@ function jn(e, t) {
3940
3995
  }
3941
3996
  return { ...n, metadata: s };
3942
3997
  }
3943
- function di(e, t, n, s) {
3998
+ function Ii(e, t, n, s) {
3944
3999
  return new Promise((r, i) => {
3945
4000
  const a = new XMLHttpRequest();
3946
4001
  a.open("POST", e, !0), s && a.setRequestHeader("Authorization", `Bearer ${s}`);
@@ -3948,20 +4003,20 @@ function di(e, t, n, s) {
3948
4003
  o.append("file", t, t.name);
3949
4004
  let l = -1, u = 0;
3950
4005
  if (n.onProgress && (a.upload.onprogress = (d) => {
3951
- const f = d.lengthComputable ? d.total : void 0, p = d.loaded, m = f !== void 0 ? Math.min(100, Math.floor(p / f * 100)) : void 0, g = Date.now();
3952
- if (m !== void 0 ? m !== l : g - u >= 100) {
3953
- m !== void 0 && (l = m), u = g;
4006
+ const f = d.lengthComputable ? d.total : void 0, p = d.loaded, m = f !== void 0 ? Math.min(100, Math.floor(p / f * 100)) : void 0, b = Date.now();
4007
+ if (m !== void 0 ? m !== l : b - u >= 100) {
4008
+ m !== void 0 && (l = m), u = b;
3954
4009
  const x = { bytesUploaded: p };
3955
4010
  f !== void 0 && (x.totalBytes = f), m !== void 0 && (x.percent = m), n.onProgress?.(x);
3956
4011
  }
3957
4012
  }), a.onload = () => {
3958
4013
  const d = a.status, f = a.responseText ?? "";
3959
4014
  if (d < 200 || d >= 300) {
3960
- i(nt(d, mi(f, s)));
4015
+ i(rt(d, Si(f, s)));
3961
4016
  return;
3962
4017
  }
3963
4018
  try {
3964
- const p = hi(JSON.parse(f));
4019
+ const p = Ni(JSON.parse(f));
3965
4020
  if (n.onProgress && t.size > 0) {
3966
4021
  const m = {
3967
4022
  bytesUploaded: t.size,
@@ -3988,8 +4043,8 @@ function di(e, t, n, s) {
3988
4043
  a.send(o);
3989
4044
  });
3990
4045
  }
3991
- function hi(e) {
3992
- if (!fi(e)) throw h.other("decode response: attachment must be an object");
4046
+ function Ni(e) {
4047
+ if (!Ti(e)) throw h.other("decode response: attachment must be an object");
3993
4048
  const { id: t, name: n, contentType: s, url: r } = e;
3994
4049
  if (typeof t != "string" || typeof n != "string" || typeof s != "string")
3995
4050
  throw h.other("decode response: attachment id, name, and contentType must be strings");
@@ -3997,17 +4052,17 @@ function hi(e) {
3997
4052
  throw h.other("decode response: attachment url must be a string when present");
3998
4053
  return { id: t, name: n, contentType: s, ...r !== void 0 ? { url: r } : {} };
3999
4054
  }
4000
- function fi(e) {
4055
+ function Ti(e) {
4001
4056
  return typeof e == "object" && e !== null && !Array.isArray(e);
4002
4057
  }
4003
- function mi(e, t) {
4058
+ function Si(e, t) {
4004
4059
  return t ? e.split(t).join("[REDACTED]") : e;
4005
4060
  }
4006
- function pi(e, t) {
4061
+ function ki(e, t) {
4007
4062
  if (e.size === 0)
4008
4063
  return { ok: !1, error: h.attachment("EMPTY_FILE", `Empty file: ${e.name}`) };
4009
4064
  if (!t) return { ok: !0 };
4010
- const n = bi(e.type);
4065
+ const n = Ai(e.type);
4011
4066
  if (!n)
4012
4067
  return {
4013
4068
  ok: !1,
@@ -4031,28 +4086,28 @@ function pi(e, t) {
4031
4086
  )
4032
4087
  } : { ok: !0 };
4033
4088
  }
4034
- function bi(e) {
4089
+ function Ai(e) {
4035
4090
  return e ? e.startsWith("image/") ? "images" : e.startsWith("video/") ? "videos" : e.startsWith("audio/") ? "audio" : e.startsWith("application/") || e.startsWith("text/") || e === "application/pdf" ? "documents" : null : null;
4036
4091
  }
4037
- const Jt = "origonWebSdkUserId";
4038
- function gi() {
4039
- const e = localStorage.getItem(Jt);
4092
+ const sn = "origonWebSdkUserId";
4093
+ function vi() {
4094
+ const e = localStorage.getItem(sn);
4040
4095
  if (e) return e;
4041
- const t = fn();
4042
- return localStorage.setItem(Jt, t), t;
4096
+ const t = bn();
4097
+ return localStorage.setItem(sn, t), t;
4043
4098
  }
4044
- const Ei = (1n << 62n) - 1n;
4099
+ const Ri = (1n << 62n) - 1n;
4045
4100
  class y extends Error {
4046
4101
  constructor(t) {
4047
4102
  super(t), this.name = "CodecError";
4048
4103
  }
4049
4104
  }
4050
- function yi(e) {
4105
+ function _i(e) {
4051
4106
  if (e < 0n) throw new y(`negative varint: ${e}`);
4052
4107
  if (e <= 63n) return 1;
4053
4108
  if (e <= 16383n) return 2;
4054
4109
  if (e <= 1073741823n) return 4;
4055
- if (e <= Ei) return 8;
4110
+ if (e <= Ri) return 8;
4056
4111
  throw new y(`varint overflow: ${e}`);
4057
4112
  }
4058
4113
  class G {
@@ -4077,7 +4132,7 @@ class G {
4077
4132
  this.chunks.push(t), this.len += t.length;
4078
4133
  }
4079
4134
  putVarint(t) {
4080
- const n = typeof t == "number" ? BigInt(t) : t, s = yi(n);
4135
+ const n = typeof t == "number" ? BigInt(t) : t, s = _i(n);
4081
4136
  switch (s) {
4082
4137
  case 1:
4083
4138
  this.putU8(Number(n));
@@ -4116,7 +4171,7 @@ class G {
4116
4171
  return t;
4117
4172
  }
4118
4173
  }
4119
- class ye {
4174
+ class we {
4120
4175
  constructor(t) {
4121
4176
  this.buf = t, this.offset = 0;
4122
4177
  }
@@ -4197,9 +4252,9 @@ class ye {
4197
4252
  return new TextDecoder("utf-8", { fatal: !0 }).decode(this.getLengthPrefixedBytes());
4198
4253
  }
4199
4254
  }
4200
- function wi(e) {
4255
+ function Oi(e) {
4201
4256
  try {
4202
- const t = new ye(e);
4257
+ const t = new we(e);
4203
4258
  t.getVarint();
4204
4259
  const n = t.getVarint();
4205
4260
  return t.position() + Number(n);
@@ -4207,16 +4262,16 @@ function wi(e) {
4207
4262
  return null;
4208
4263
  }
4209
4264
  }
4210
- const Ii = 1, qn = 2, Ni = 4, Ti = 8, Si = 32;
4211
- function ki(e) {
4212
- const t = new G(), n = e.endOfGroup ? qn : 0;
4265
+ const Ci = 1, ts = 2, Di = 4, Ui = 8, Li = 32;
4266
+ function Mi(e) {
4267
+ const t = new G(), n = e.endOfGroup ? ts : 0;
4213
4268
  return t.putVarint(n), t.putVarint(e.trackAlias), t.putVarint(e.groupId), t.putVarint(e.objectId), t.putU8(e.publisherPriority & 255), t.putBytes(e.payload), t.toUint8Array();
4214
4269
  }
4215
- function Ai(e) {
4216
- const t = new ye(e), n = Number(t.getVarint());
4270
+ function xi(e) {
4271
+ const t = new we(e), n = Number(t.getVarint());
4217
4272
  if (!(n >= 0 && n <= 15 || n >= 32 && n <= 47))
4218
4273
  throw new y(`invalid ObjectDatagram type byte 0x${n.toString(16)}`);
4219
- const s = (n & Ii) !== 0, r = (n & qn) !== 0, i = (n & Ni) !== 0, a = (n & Ti) !== 0, o = (n & Si) !== 0;
4274
+ const s = (n & Ci) !== 0, r = (n & ts) !== 0, i = (n & Di) !== 0, a = (n & Ui) !== 0, o = (n & Li) !== 0;
4220
4275
  if (o && r)
4221
4276
  throw new y("status datagram cannot also be end-of-group");
4222
4277
  const l = t.getVarint(), u = t.getVarint(), d = i ? 1n : t.getVarint(), f = a ? 0 : t.getU8();
@@ -4248,11 +4303,11 @@ const ie = {
4248
4303
  AudioObject: 0,
4249
4304
  AudioFeedback: 1
4250
4305
  };
4251
- function en(e, t) {
4306
+ function rn(e, t) {
4252
4307
  const n = new Uint8Array(t.length + 1);
4253
4308
  return n[0] = e, n.set(t, 1), n;
4254
4309
  }
4255
- function Ri(e) {
4310
+ function Pi(e) {
4256
4311
  if (e.length === 0) throw new y("empty datagram envelope");
4257
4312
  return { cls: e[0], body: e.subarray(1) };
4258
4313
  }
@@ -4279,37 +4334,37 @@ const Fe = 64 * 1024, N = {
4279
4334
  // 0x56-0x57 = feedback verbs moved to datagrams; reserved
4280
4335
  SEND_DTMF: 0x58n,
4281
4336
  SEND_DTMF_OK: 0x59n
4282
- }, _i = "0123456789*#ABCD";
4283
- function Hn(e) {
4284
- return e.length === 1 && _i.includes(e);
4337
+ }, Vi = "0123456789*#ABCD";
4338
+ function ns(e) {
4339
+ return e.length === 1 && Vi.includes(e);
4285
4340
  }
4286
- function vi(e) {
4287
- const t = new G(), { msgType: n, payload: s } = Ci(e);
4341
+ function Fi(e) {
4342
+ const t = new G(), { msgType: n, payload: s } = Bi(e);
4288
4343
  if (s.length > Fe)
4289
4344
  throw new y(`control frame payload ${s.length} > ${Fe}`);
4290
4345
  return t.putVarint(n), t.putVarint(s.length), t.putBytes(s), t.toUint8Array();
4291
4346
  }
4292
- function Oi(e) {
4293
- const t = wi(e);
4347
+ function Gi(e) {
4348
+ const t = Oi(e);
4294
4349
  if (t === null || t > e.length) return null;
4295
- const n = new ye(e), s = n.getVarint(), r = Number(n.getVarint());
4350
+ const n = new we(e), s = n.getVarint(), r = Number(n.getVarint());
4296
4351
  if (r > Fe)
4297
4352
  throw new y(`oversized payload ${r}`);
4298
4353
  const i = n.getBytes(r);
4299
- return { msg: Di(s, i), consumed: t };
4354
+ return { msg: Yi(s, i), consumed: t };
4300
4355
  }
4301
- function Ci(e) {
4356
+ function Bi(e) {
4302
4357
  switch (e.type) {
4303
4358
  case "connect":
4304
- return { msgType: N.CONNECT, payload: ji(e.data) };
4359
+ return { msgType: N.CONNECT, payload: sa(e.data) };
4305
4360
  case "negotiateMedia":
4306
- return { msgType: N.NEGOTIATE_MEDIA, payload: qi(e.data) };
4361
+ return { msgType: N.NEGOTIATE_MEDIA, payload: ra(e.data) };
4307
4362
  case "mute":
4308
- return { msgType: N.MUTE, payload: Hi(e.data) };
4363
+ return { msgType: N.MUTE, payload: ia(e.data) };
4309
4364
  case "resume":
4310
- return { msgType: N.RESUME, payload: Zi(e.data) };
4365
+ return { msgType: N.RESUME, payload: aa(e.data) };
4311
4366
  case "sendDtmf":
4312
- return { msgType: N.SEND_DTMF, payload: zi(e.data) };
4367
+ return { msgType: N.SEND_DTMF, payload: oa(e.data) };
4313
4368
  // The remaining variants are server-emitted; we never encode them
4314
4369
  // outbound. Including the cases keeps the union exhaustive.
4315
4370
  case "connectOk":
@@ -4326,42 +4381,42 @@ function Ci(e) {
4326
4381
  throw new y(`refusing to encode server-emitted variant '${e.type}'`);
4327
4382
  }
4328
4383
  }
4329
- function Di(e, t) {
4330
- const n = new ye(t);
4384
+ function Yi(e, t) {
4385
+ const n = new we(t);
4331
4386
  let s;
4332
4387
  switch (e) {
4333
4388
  case N.CONNECT_OK:
4334
- s = { type: "connectOk", data: Qi(n) };
4389
+ s = { type: "connectOk", data: ca(n) };
4335
4390
  break;
4336
4391
  case N.NEGOTIATE_MEDIA_OK:
4337
- s = { type: "negotiateMediaOk", data: Ji(n) };
4392
+ s = { type: "negotiateMediaOk", data: ua(n) };
4338
4393
  break;
4339
4394
  case N.MUTE_OK:
4340
- s = { type: "muteOk", data: tn(n) };
4395
+ s = { type: "muteOk", data: an(n) };
4341
4396
  break;
4342
4397
  case N.RESUME_OK:
4343
- s = { type: "resumeOk", data: ea(n) };
4398
+ s = { type: "resumeOk", data: la(n) };
4344
4399
  break;
4345
4400
  case N.SEND_DTMF_OK:
4346
- s = { type: "sendDtmfOk", data: tn(n) };
4401
+ s = { type: "sendDtmfOk", data: an(n) };
4347
4402
  break;
4348
4403
  case N.PEER_ATTACHED:
4349
- s = { type: "peerAttached", data: ta(n) };
4404
+ s = { type: "peerAttached", data: da(n) };
4350
4405
  break;
4351
4406
  case N.PEER_DETACHED:
4352
- s = { type: "peerDetached", data: na(n) };
4407
+ s = { type: "peerDetached", data: ha(n) };
4353
4408
  break;
4354
4409
  case N.ENDPOINT_MUTED:
4355
- s = { type: "endpointMuted", data: sa(n) };
4410
+ s = { type: "endpointMuted", data: fa(n) };
4356
4411
  break;
4357
4412
  case N.ENDPOINT_HANGUP:
4358
- s = { type: "endpointHangup", data: ra(n) };
4413
+ s = { type: "endpointHangup", data: ma(n) };
4359
4414
  break;
4360
4415
  case N.PEER_STATE_CHANGED:
4361
- s = { type: "peerStateChanged", data: ia(n) };
4416
+ s = { type: "peerStateChanged", data: pa(n) };
4362
4417
  break;
4363
4418
  case N.MOQ_ERROR:
4364
- s = { type: "moqError", data: aa(n) };
4419
+ s = { type: "moqError", data: ga(n) };
4365
4420
  break;
4366
4421
  default:
4367
4422
  throw new y(`unknown control message type 0x${e.toString(16)}`);
@@ -4372,17 +4427,17 @@ function Di(e, t) {
4372
4427
  );
4373
4428
  return s;
4374
4429
  }
4375
- function Ui(e) {
4430
+ function $i(e) {
4376
4431
  switch (e) {
4377
4432
  case "audio":
4378
4433
  return 1n;
4379
4434
  }
4380
4435
  }
4381
- function Li(e) {
4436
+ function Xi(e) {
4382
4437
  if (e === 1n) return "audio";
4383
4438
  throw new y(`unknown EncodingClass id ${e}`);
4384
4439
  }
4385
- function Mi(e) {
4440
+ function Ki(e) {
4386
4441
  switch (e) {
4387
4442
  case "primary":
4388
4443
  return 1n;
@@ -4390,12 +4445,12 @@ function Mi(e) {
4390
4445
  return 2n;
4391
4446
  }
4392
4447
  }
4393
- function xi(e) {
4448
+ function ji(e) {
4394
4449
  if (e === 1n) return "primary";
4395
4450
  if (e === 2n) return "captions";
4396
4451
  throw new y(`unknown TrackPurpose id ${e}`);
4397
4452
  }
4398
- function Fi(e) {
4453
+ function Wi(e) {
4399
4454
  switch (e) {
4400
4455
  case "opus":
4401
4456
  return 1n;
@@ -4405,13 +4460,13 @@ function Fi(e) {
4405
4460
  return 3n;
4406
4461
  }
4407
4462
  }
4408
- function st(e) {
4463
+ function it(e) {
4409
4464
  if (e === 1n) return "opus";
4410
4465
  if (e === 2n) return "pcmu";
4411
4466
  if (e === 3n) return "pcma";
4412
4467
  throw new y(`unknown AudioCodec id ${e}`);
4413
4468
  }
4414
- function Pi(e) {
4469
+ function qi(e) {
4415
4470
  switch (e) {
4416
4471
  case "none":
4417
4472
  return 0n;
@@ -4423,171 +4478,171 @@ function Pi(e) {
4423
4478
  return 3n;
4424
4479
  }
4425
4480
  }
4426
- function Zn(e) {
4481
+ function ss(e) {
4427
4482
  if (e === 0n) return "none";
4428
4483
  if (e === 1n) return "uplink";
4429
4484
  if (e === 2n) return "downlink";
4430
4485
  if (e === 3n) return "both";
4431
4486
  throw new y(`unknown MuteScope id ${e}`);
4432
4487
  }
4433
- function Vi(e) {
4488
+ function Hi(e) {
4434
4489
  if (e === 1n) return "normal";
4435
4490
  if (e === 2n) return "userCancel";
4436
4491
  if (e === 3n) return "error";
4437
4492
  throw new y(`unknown HangupReason id ${e}`);
4438
4493
  }
4439
- function zn(e) {
4494
+ function rs(e) {
4440
4495
  if (e === 1n) return "client";
4441
4496
  if (e === 2n) return "controller";
4442
4497
  if (e === 3n) return "engine";
4443
4498
  if (e === 4n) return "networkLost";
4444
4499
  throw new y(`unknown Origin id ${e}`);
4445
4500
  }
4446
- function Gi(e) {
4501
+ function Zi(e) {
4447
4502
  if (e === 1n) return "active";
4448
4503
  if (e === 2n) return "held";
4449
4504
  if (e === 3n) return "muted";
4450
4505
  if (e === 4n) return "hangup";
4451
4506
  throw new y(`unknown PeerState id ${e}`);
4452
4507
  }
4453
- function Bi(e) {
4508
+ function zi(e) {
4454
4509
  if (e === 1n) return "codecMismatch";
4455
4510
  if (e === 2n) return "unsupportedClass";
4456
4511
  if (e === 3n) return "capacityExceeded";
4457
4512
  throw new y(`unknown TrackRejectionReason id ${e}`);
4458
4513
  }
4459
- function Yi(e, t) {
4460
- t.putVarint(Ui(e.class)), t.putVarint(Mi(e.purpose)), t.putVarint(e.codecs.length);
4461
- for (const n of e.codecs) t.putVarint(Fi(n));
4514
+ function Qi(e, t) {
4515
+ t.putVarint($i(e.class)), t.putVarint(Ki(e.purpose)), t.putVarint(e.codecs.length);
4516
+ for (const n of e.codecs) t.putVarint(Wi(n));
4462
4517
  }
4463
- function Qn(e, t) {
4518
+ function is(e, t) {
4464
4519
  t.putVarint(e.length);
4465
- for (const n of e) Yi(n, t);
4520
+ for (const n of e) Qi(n, t);
4466
4521
  }
4467
- function $i(e) {
4522
+ function Ji(e) {
4468
4523
  return {
4469
4524
  offerIndex: Number(e.getVarint()),
4470
4525
  alias: e.getVarint(),
4471
- codec: st(e.getVarint()),
4526
+ codec: it(e.getVarint()),
4472
4527
  frameSizeMs: Number(e.getVarint())
4473
4528
  };
4474
4529
  }
4475
- function Jn(e) {
4530
+ function as(e) {
4476
4531
  const t = Number(e.getVarint()), n = [];
4477
- for (let s = 0; s < t; s++) n.push($i(e));
4532
+ for (let s = 0; s < t; s++) n.push(Ji(e));
4478
4533
  return n;
4479
4534
  }
4480
- function Xi(e) {
4535
+ function ea(e) {
4481
4536
  return {
4482
4537
  offerIndex: Number(e.getVarint()),
4483
- reason: Bi(e.getVarint())
4538
+ reason: zi(e.getVarint())
4484
4539
  };
4485
4540
  }
4486
- function es(e) {
4541
+ function os(e) {
4487
4542
  const t = Number(e.getVarint()), n = [];
4488
- for (let s = 0; s < t; s++) n.push(Xi(e));
4543
+ for (let s = 0; s < t; s++) n.push(ea(e));
4489
4544
  return n;
4490
4545
  }
4491
- function Ki(e) {
4546
+ function ta(e) {
4492
4547
  return {
4493
4548
  peerEndpointId: e.getString(),
4494
4549
  alias: e.getVarint(),
4495
- codec: st(e.getVarint())
4550
+ codec: it(e.getVarint())
4496
4551
  };
4497
4552
  }
4498
- function Wi(e) {
4499
- const t = e.getVarint(), n = Zn(e.getVarint()), s = e.getVarint() !== 0n, r = Number(e.getVarint()), i = [];
4500
- for (let a = 0; a < r; a++) i.push(Ki(e));
4553
+ function na(e) {
4554
+ const t = e.getVarint(), n = ss(e.getVarint()), s = e.getVarint() !== 0n, r = Number(e.getVarint()), i = [];
4555
+ for (let a = 0; a < r; a++) i.push(ta(e));
4501
4556
  return { sessionSeq: t, mute: n, held: s, peers: i };
4502
4557
  }
4503
- function ji(e) {
4558
+ function sa(e) {
4504
4559
  const t = new G();
4505
- return t.putVarint(e.requestId), t.putLengthPrefixedBytes(e.callToken), t.putString(e.sdkName), t.putString(e.sdkVersion), Qn(e.offers, t), t.putVarint(e.frameSizeMs), t.toUint8Array();
4560
+ return t.putVarint(e.requestId), t.putLengthPrefixedBytes(e.callToken), t.putString(e.sdkName), t.putString(e.sdkVersion), is(e.offers, t), t.putVarint(e.frameSizeMs), t.toUint8Array();
4506
4561
  }
4507
- function qi(e) {
4562
+ function ra(e) {
4508
4563
  const t = new G();
4509
- return t.putVarint(e.requestId), Qn(e.offers, t), t.putVarint(e.frameSizeMs), t.toUint8Array();
4564
+ return t.putVarint(e.requestId), is(e.offers, t), t.putVarint(e.frameSizeMs), t.toUint8Array();
4510
4565
  }
4511
- function Hi(e) {
4566
+ function ia(e) {
4512
4567
  const t = new G();
4513
- return t.putVarint(e.requestId), t.putVarint(Pi(e.scope)), t.toUint8Array();
4568
+ return t.putVarint(e.requestId), t.putVarint(qi(e.scope)), t.toUint8Array();
4514
4569
  }
4515
- function Zi(e) {
4570
+ function aa(e) {
4516
4571
  const t = new G();
4517
4572
  return t.putVarint(e.requestId), t.putLengthPrefixedBytes(e.callToken), t.putVarint(e.lastEventSeq), t.toUint8Array();
4518
4573
  }
4519
- function zi(e) {
4520
- if (!Hn(e.digit))
4574
+ function oa(e) {
4575
+ if (!ns(e.digit))
4521
4576
  throw new y("invalid DTMF symbol");
4522
4577
  const t = new G();
4523
4578
  return t.putVarint(e.requestId), t.putU8(e.digit.charCodeAt(0)), t.toUint8Array();
4524
4579
  }
4525
- function Qi(e) {
4580
+ function ca(e) {
4526
4581
  return {
4527
4582
  requestId: e.getVarint(),
4528
4583
  serverEpochUnix: e.getVarint(),
4529
4584
  canonicalPcmRate: Number(e.getVarint()),
4530
- bindings: Jn(e),
4531
- rejected: es(e)
4585
+ bindings: as(e),
4586
+ rejected: os(e)
4532
4587
  };
4533
4588
  }
4534
- function Ji(e) {
4589
+ function ua(e) {
4535
4590
  return {
4536
4591
  requestId: e.getVarint(),
4537
- bindings: Jn(e),
4538
- rejected: es(e)
4592
+ bindings: as(e),
4593
+ rejected: os(e)
4539
4594
  };
4540
4595
  }
4541
- function tn(e) {
4596
+ function an(e) {
4542
4597
  return { requestId: e.getVarint() };
4543
4598
  }
4544
- function ea(e) {
4599
+ function la(e) {
4545
4600
  return {
4546
4601
  requestId: e.getVarint(),
4547
- state: Wi(e)
4602
+ state: na(e)
4548
4603
  };
4549
4604
  }
4550
- function ta(e) {
4605
+ function da(e) {
4551
4606
  return {
4552
4607
  requestId: e.getVarint(),
4553
4608
  peerEndpointId: e.getString(),
4554
4609
  alias: e.getVarint(),
4555
- class: Li(e.getVarint()),
4556
- purpose: xi(e.getVarint()),
4557
- codec: st(e.getVarint()),
4610
+ class: Xi(e.getVarint()),
4611
+ purpose: ji(e.getVarint()),
4612
+ codec: it(e.getVarint()),
4558
4613
  frameSizeMs: Number(e.getVarint())
4559
4614
  };
4560
4615
  }
4561
- function na(e) {
4616
+ function ha(e) {
4562
4617
  return {
4563
4618
  requestId: e.getVarint(),
4564
4619
  peerEndpointId: e.getString()
4565
4620
  };
4566
4621
  }
4567
- function sa(e) {
4622
+ function fa(e) {
4568
4623
  return {
4569
4624
  requestId: e.getVarint(),
4570
4625
  endpointId: e.getString(),
4571
- scope: Zn(e.getVarint()),
4572
- origin: zn(e.getVarint())
4626
+ scope: ss(e.getVarint()),
4627
+ origin: rs(e.getVarint())
4573
4628
  };
4574
4629
  }
4575
- function ra(e) {
4630
+ function ma(e) {
4576
4631
  return {
4577
4632
  requestId: e.getVarint(),
4578
4633
  endpointId: e.getString(),
4579
- reason: Vi(e.getVarint()),
4580
- origin: zn(e.getVarint())
4634
+ reason: Hi(e.getVarint()),
4635
+ origin: rs(e.getVarint())
4581
4636
  };
4582
4637
  }
4583
- function ia(e) {
4638
+ function pa(e) {
4584
4639
  return {
4585
4640
  requestId: e.getVarint(),
4586
4641
  peerEndpointId: e.getString(),
4587
- state: Gi(e.getVarint())
4642
+ state: Zi(e.getVarint())
4588
4643
  };
4589
4644
  }
4590
- function aa(e) {
4645
+ function ga(e) {
4591
4646
  const t = e.getVarint();
4592
4647
  let n;
4593
4648
  if (t === 0n)
@@ -4597,9 +4652,9 @@ function aa(e) {
4597
4652
  else
4598
4653
  throw new y(`MoqError.request_id present tag ${t} not in {0,1}`);
4599
4654
  const s = e.getVarint(), r = e.getString();
4600
- return { requestId: n, code: oa(s), rawCode: s, detail: r };
4655
+ return { requestId: n, code: ba(s), rawCode: s, detail: r };
4601
4656
  }
4602
- function oa(e) {
4657
+ function ba(e) {
4603
4658
  switch (e) {
4604
4659
  case 0x1001n:
4605
4660
  return "endpointNotProvisioned";
@@ -4627,7 +4682,7 @@ function oa(e) {
4627
4682
  return null;
4628
4683
  }
4629
4684
  }
4630
- const ca = /* @__PURE__ */ new Set([
4685
+ const Ea = /* @__PURE__ */ new Set([
4631
4686
  "sessionEnded",
4632
4687
  "tokenInvalid",
4633
4688
  "tokenExpired",
@@ -4665,7 +4720,7 @@ class be {
4665
4720
  }
4666
4721
  /** Encode + write one control frame. Honours WT backpressure. */
4667
4722
  async sendControl(t) {
4668
- const n = vi(t);
4723
+ const n = Fi(t);
4669
4724
  await this.controlWriter.ready, await this.controlWriter.write(n);
4670
4725
  }
4671
4726
  /**
@@ -4677,7 +4732,7 @@ class be {
4677
4732
  let t = new Uint8Array(0);
4678
4733
  for (; ; ) {
4679
4734
  for (; ; ) {
4680
- const i = Oi(t);
4735
+ const i = Gi(t);
4681
4736
  if (!i) break;
4682
4737
  yield i.msg, t = t.subarray(i.consumed);
4683
4738
  }
@@ -4752,8 +4807,8 @@ class be {
4752
4807
  }
4753
4808
  }
4754
4809
  }
4755
- const ua = 2e3;
4756
- class la {
4810
+ const ya = 2e3;
4811
+ class wa {
4757
4812
  constructor(t) {
4758
4813
  this.ctx = null, this.node = null, this.micStream = null, this.micSource = null, this.silenceSource = null, this.micDiagAnalyser = null, this.micDiagTimer = null, this.outboundCallback = null, this.downlinkFeedbackCallback = null, this.captureGeneration = 0, this.outboundCaptureGeneration = null, this.outputGateEpoch = 0, this.captureCommandId = 0, this.captureAcks = /* @__PURE__ */ new Map(), this.options = {
4759
4814
  wasmUrl: t.wasmUrl,
@@ -4963,7 +5018,7 @@ class la {
4963
5018
  const n = ++this.captureCommandId, s = new Promise((r, i) => {
4964
5019
  const a = setTimeout(() => {
4965
5020
  this.captureAcks.get(n)?.expected === t && (this.captureAcks.delete(n), i(new Error(`${t} acknowledgement timed out`)));
4966
- }, ua);
5021
+ }, ya);
4967
5022
  this.captureAcks.set(n, { expected: t, resolve: r, reject: i, timeout: a });
4968
5023
  });
4969
5024
  return { commandId: n, ack: s };
@@ -4990,16 +5045,16 @@ class la {
4990
5045
  }
4991
5046
  }
4992
5047
  }
4993
- const nn = [100, 250, 500, 1e3], da = 1e4, ha = 50;
4994
- function sn(e, t) {
5048
+ const on = [100, 250, 500, 1e3], Ia = 1e4, Na = 50;
5049
+ function cn(e, t) {
4995
5050
  return new URL(t, e.endsWith("/") ? e : `${e}/`).href;
4996
5051
  }
4997
- const fa = new URL("./audio/wasm-gen/origon_web_audio_bg.wasm?no-inline", import.meta.url).href, ma = new URL("./audio/audio-processor.js?no-inline", import.meta.url).href;
4998
- class pa {
5052
+ const Ta = new URL("./audio/wasm-gen/origon_web_audio_bg.wasm?no-inline", import.meta.url).href, Sa = new URL("./audio/audio-processor.js?no-inline", import.meta.url).href;
5053
+ class ka {
4999
5054
  constructor(t, n) {
5000
5055
  this.transport = null, this.requestIdCtr = 1n, this.uplinkAlias = null, this.peerAliasByEndpoint = /* @__PURE__ */ new Map(), this.pendingRequests = /* @__PURE__ */ new Map(), this.closedTransports = /* @__PURE__ */ new WeakSet(), this.lastEventSeq = 0n, this.terminalReason = null, this.controlReady = !1, this.statsSubscriberCount = 0, this.latestStats = null, this.statsSubscribers = /* @__PURE__ */ new Set(), this.currentMuteScope = "none", this.startGeneration = 0, this.captureTransition = Promise.resolve(), this.captureGeneration = 0, this.localCaptureEnabled = !1, this.desiredCoach = !1, this.diagTx = 0, this.diagRx = 0, this.diagLastStatsLog = 0, this.sessionId = t.sessionId, this.url = `${t.url.replace(/\/$/, "")}/web`, this.callToken = t.token, this.dispatcher = n.dispatcher, this.onTerminal = n.onTerminal;
5001
- const s = n.assetBaseUrl ? sn(n.assetBaseUrl, "audio/wasm-gen/origon_web_audio_bg.wasm") : fa, r = n.assetBaseUrl ? sn(n.assetBaseUrl, "audio/audio-processor.js") : ma;
5002
- this.host = new la({
5056
+ const s = n.assetBaseUrl ? cn(n.assetBaseUrl, "audio/wasm-gen/origon_web_audio_bg.wasm") : Ta, r = n.assetBaseUrl ? cn(n.assetBaseUrl, "audio/audio-processor.js") : Sa;
5057
+ this.host = new wa({
5003
5058
  wasmUrl: s,
5004
5059
  processorUrl: r,
5005
5060
  onStats: (i) => this.handleHostStats(i),
@@ -5014,7 +5069,7 @@ class pa {
5014
5069
  const n = this.startGeneration;
5015
5070
  this.assertStartActive(n), await this.host.start(), this.assertStartActive(n), this.host.onOutboundDatagram((s) => {
5016
5071
  this.diagTx += 1, this.diagTx === 1 || this.diagTx % 100;
5017
- const r = en(ie.AudioObject, s);
5072
+ const r = rn(ie.AudioObject, s);
5018
5073
  this.transport?.sendDatagram(r).catch(() => {
5019
5074
  });
5020
5075
  }), this.host.onDownlinkFeedback((s) => {
@@ -5024,7 +5079,7 @@ class pa {
5024
5079
  if (r += 2, r + i > s.length) break;
5025
5080
  const a = s.subarray(r, r + i);
5026
5081
  r += i;
5027
- const o = en(ie.AudioFeedback, a);
5082
+ const o = rn(ie.AudioFeedback, a);
5028
5083
  this.transport?.sendDatagram(o).catch(() => {
5029
5084
  });
5030
5085
  }
@@ -5057,7 +5112,7 @@ class pa {
5057
5112
  }
5058
5113
  /** Send one DTMF symbol to the active CX flow. Never queued across Resume. */
5059
5114
  async sendDtmf(t) {
5060
- if (!Hn(t))
5115
+ if (!ns(t))
5061
5116
  throw new Error("invalid DTMF digit");
5062
5117
  if (!this.controlReady)
5063
5118
  throw new Error("DTMF is unavailable while voice transport is not connected");
@@ -5168,7 +5223,7 @@ class pa {
5168
5223
  for await (const n of t.readDatagrams()) {
5169
5224
  let s;
5170
5225
  try {
5171
- const r = Ri(n);
5226
+ const r = Pi(n);
5172
5227
  if (r.cls === ie.AudioFeedback) {
5173
5228
  this.host.pushUplinkFeedback(r.body);
5174
5229
  continue;
@@ -5180,7 +5235,7 @@ class pa {
5180
5235
  continue;
5181
5236
  }
5182
5237
  try {
5183
- const r = Ai(s);
5238
+ const r = xi(s);
5184
5239
  this.diagRx += 1, this.diagRx === 1 || this.diagRx % 100;
5185
5240
  } catch {
5186
5241
  }
@@ -5201,7 +5256,7 @@ class pa {
5201
5256
  }
5202
5257
  if ("requestId" in t.data) {
5203
5258
  const s = t.data.requestId;
5204
- s !== null && s !== 0n && (this.lastEventSeq = ba(this.lastEventSeq, s));
5259
+ s !== null && s !== 0n && (this.lastEventSeq = Aa(this.lastEventSeq, s));
5205
5260
  }
5206
5261
  switch (t.type) {
5207
5262
  case "peerAttached": {
@@ -5234,10 +5289,10 @@ class pa {
5234
5289
  }
5235
5290
  case "moqError": {
5236
5291
  const s = t.data.code;
5237
- if (s === null || ca.has(s)) {
5292
+ if (s === null || Ea.has(s)) {
5238
5293
  const i = s ?? "unknown";
5239
5294
  this.enterTerminalState(
5240
- s === null ? { kind: "protocolViolation" } : ga(s),
5295
+ s === null ? { kind: "protocolViolation" } : va(s),
5241
5296
  new Error(`terminal MoqError ${i}`),
5242
5297
  `terminal MoqError ${i}`
5243
5298
  );
@@ -5272,20 +5327,20 @@ class pa {
5272
5327
  if (this.controlReady = !1, this.rejectPendingRequestsForTransport(
5273
5328
  t,
5274
5329
  new Error("voice transport closed before control acknowledgement")
5275
- ), this.closedTransports.add(t), this.host.cancelCaptureTransition(!1), this.localCaptureEnabled || (this.captureGeneration += 1, this.host.cancelCaptureTransition(!0)), await W(ha), this.terminalReason) {
5330
+ ), this.closedTransports.add(t), this.host.cancelCaptureTransition(!1), this.localCaptureEnabled || (this.captureGeneration += 1, this.host.cancelCaptureTransition(!0)), await j(Na), this.terminalReason) {
5276
5331
  this.host.dispose().catch(() => {
5277
5332
  }), this.onTerminal(this.terminalReason, this.sessionId);
5278
5333
  return;
5279
5334
  }
5280
5335
  this.transport === t && (this.transport = null);
5281
- for (let r = 1; r <= nn.length && this.isStartActive(n); r++) {
5282
- const i = nn[r - 1];
5336
+ for (let r = 1; r <= on.length && this.isStartActive(n); r++) {
5337
+ const i = on[r - 1];
5283
5338
  this.dispatcher.fire("onReconnecting", this.sessionId, "voice", {
5284
5339
  attempt: r,
5285
5340
  reason: { kind: "networkLoss" }
5286
5341
  });
5287
5342
  try {
5288
- await W(i), this.assertStartActive(n), await this.attemptResume(n), this.assertStartActive(n), this.dispatcher.fire("onReconnected", this.sessionId, "voice"), this.watchTransportClosed();
5343
+ await j(i), this.assertStartActive(n), await this.attemptResume(n), this.assertStartActive(n), this.dispatcher.fire("onReconnected", this.sessionId, "voice"), this.watchTransportClosed();
5289
5344
  return;
5290
5345
  } catch {
5291
5346
  if (this.terminalReason)
@@ -5383,7 +5438,7 @@ class pa {
5383
5438
  }
5384
5439
  const a = setTimeout(() => {
5385
5440
  this.pendingRequests.delete(t) && r(new Error(`request ${t} timed out`));
5386
- }, da);
5441
+ }, Ia);
5387
5442
  this.pendingRequests.set(t, {
5388
5443
  transport: i,
5389
5444
  requestType: n.type,
@@ -5409,7 +5464,7 @@ class pa {
5409
5464
  /** Outbound datagram payload — for tests / external pumps. */
5410
5465
  encodeAudioObject(t) {
5411
5466
  if (this.uplinkAlias === null) throw new Error("uplink alias not negotiated");
5412
- return ki({
5467
+ return Mi({
5413
5468
  trackAlias: this.uplinkAlias,
5414
5469
  groupId: t.groupId,
5415
5470
  objectId: t.objectId,
@@ -5422,10 +5477,10 @@ class pa {
5422
5477
  return this.currentMuteScope;
5423
5478
  }
5424
5479
  }
5425
- function ba(e, t) {
5480
+ function Aa(e, t) {
5426
5481
  return e > t ? e : t;
5427
5482
  }
5428
- function ga(e) {
5483
+ function va(e) {
5429
5484
  switch (e) {
5430
5485
  case "sessionEnded":
5431
5486
  return { kind: "sessionEnded" };
@@ -5451,20 +5506,20 @@ function ga(e) {
5451
5506
  return { kind: "replayLost" };
5452
5507
  }
5453
5508
  }
5454
- class Ea {
5509
+ class Ra {
5455
5510
  constructor() {
5456
- this.config = null, this.http = null, this.sessionHttp = null, this.dispatcher = new ts(), this.sessions = /* @__PURE__ */ new Map(), this.pendingUploads = /* @__PURE__ */ new Map();
5511
+ this.config = null, this.http = null, this.sessionHttp = null, this.dispatcher = new ds(), this.sessions = /* @__PURE__ */ new Map(), this.pendingUploads = /* @__PURE__ */ new Map();
5457
5512
  }
5458
5513
  // ── Lifecycle ────────────────────────────────────────────────────────
5459
5514
  initialize(t) {
5460
5515
  if (!t.endpoint) throw h.missingField("endpoint");
5461
- const n = t.attachmentBaseUrl === void 0 ? void 0 : Ia(t.endpoint, t.attachmentBaseUrl);
5516
+ const n = t.attachmentBaseUrl === void 0 ? void 0 : Ca(t.endpoint, t.attachmentBaseUrl);
5462
5517
  if (n !== void 0 && !t.token)
5463
5518
  throw h.missingField("token");
5464
- this.attributes = t.attributes ? { ...t.attributes } : void 0, this.assetBaseUrl = t.assetBaseUrl, this.attachmentBaseUrl = n, this.attachmentBearer = n === void 0 ? void 0 : t.token, this.userId = t.userId ?? gi(), this.http = new oi({
5519
+ this.attributes = t.attributes ? { ...t.attributes } : void 0, this.assetBaseUrl = t.assetBaseUrl, this.attachmentBaseUrl = n, this.attachmentBearer = n === void 0 ? void 0 : t.token, this.userId = t.userId ?? vi(), this.http = new bi({
5465
5520
  endpoint: t.endpoint,
5466
5521
  ...t.token ? { token: t.token } : {}
5467
- }), this.sessionHttp = new ci(this.http, this.userId);
5522
+ }), this.sessionHttp = new Ei(this.http, this.userId);
5468
5523
  }
5469
5524
  async authenticate() {
5470
5525
  const n = await this.requireSessionHttp().postConfig();
@@ -5495,12 +5550,18 @@ class Ea {
5495
5550
  async getSession(t) {
5496
5551
  return this.requireSessionHttp().getSession(t);
5497
5552
  }
5553
+ async getSessionsPage(t = {}) {
5554
+ return this.requireSessionHttp().listSessionsPage(t);
5555
+ }
5556
+ async getSessionPage(t, n = {}) {
5557
+ return this.requireSessionHttp().getSessionPage(t, n);
5558
+ }
5498
5559
  // ── Start / end ──────────────────────────────────────────────────────
5499
5560
  async startSession(t) {
5500
5561
  const n = this.requireSessionHttp();
5501
5562
  if (t.sessionId && this.sessions.has(t.sessionId))
5502
5563
  throw h.other(`session already active: ${t.sessionId}`);
5503
- const s = ya(this.attributes, t.data), r = { channel: t.channel };
5564
+ const s = _a(this.attributes, t.data), r = { channel: t.channel };
5504
5565
  t.sessionId && (r.sessionId = t.sessionId), s && (r.data = s);
5505
5566
  const i = await n.startSession(r);
5506
5567
  return t.channel, await this.attachSession(i, t.channel), { sessionId: i.sessionId };
@@ -5520,7 +5581,7 @@ class Ea {
5520
5581
  throw h.other('chat join options require channel "chat"');
5521
5582
  if (t.channel === "chat" && t.voice !== void 0)
5522
5583
  throw h.other('voice join options require channel "voice"');
5523
- const n = t.channel === "chat" ? wa(t.chat?.recovery) : void 0, s = {
5584
+ const n = t.channel === "chat" ? Oa(t.chat?.recovery) : void 0, s = {
5524
5585
  sessionId: t.sessionId,
5525
5586
  url: t.url,
5526
5587
  token: t.token
@@ -5544,7 +5605,7 @@ class Ea {
5544
5605
  */
5545
5606
  async attachSession(t, n, s = !1, r) {
5546
5607
  if (n === "voice") {
5547
- const a = new pa(t, {
5608
+ const a = new ka(t, {
5548
5609
  dispatcher: this.dispatcher,
5549
5610
  // `sessionId` is the session's *current* id (post-`rename()`), not the
5550
5611
  // one captured at construction — so a migrated session tears down its
@@ -5573,7 +5634,7 @@ class Ea {
5573
5634
  }
5574
5635
  return;
5575
5636
  }
5576
- const i = new ai(t, {
5637
+ const i = new gi(t, {
5577
5638
  sessionHttp: this.requireSessionHttp(),
5578
5639
  provisionedRecovery: r,
5579
5640
  dispatcher: this.dispatcher,
@@ -5663,13 +5724,13 @@ class Ea {
5663
5724
  * defers the whole decision to the server).
5664
5725
  */
5665
5726
  async uploadAttachment(t, n) {
5666
- const s = this.requireHttp(), r = this.config?.attachmentPolicy, i = pi(t, r);
5727
+ const s = this.requireHttp(), r = this.config?.attachmentPolicy, i = ki(t, r);
5667
5728
  if (!i.ok) throw i.error;
5668
5729
  const a = new AbortController();
5669
5730
  this.pendingUploads.set(n.uploadId, a);
5670
5731
  try {
5671
- const o = Ta(a.signal, n.signal), l = this.attachmentBaseUrl ?? s.buildAbsoluteUrl("/attachment");
5672
- return await di(
5732
+ const o = Ua(a.signal, n.signal), l = this.attachmentBaseUrl ?? s.buildAbsoluteUrl("/attachment");
5733
+ return await Ii(
5673
5734
  `${l}/upload`,
5674
5735
  t,
5675
5736
  { ...n, signal: o },
@@ -5722,15 +5783,15 @@ class Ea {
5722
5783
  return this.http;
5723
5784
  }
5724
5785
  }
5725
- let Oe = null;
5726
- function Sa() {
5727
- return Oe || (Oe = new Ea()), Oe;
5786
+ let Ce = null;
5787
+ function Ma() {
5788
+ return Ce || (Ce = new Ra()), Ce;
5728
5789
  }
5729
- function ya(e, t) {
5790
+ function _a(e, t) {
5730
5791
  if (!(!e && !t))
5731
5792
  return e ? t ? { ...t, attributes: { ...e, ...t.attributes } } : { attributes: e } : t;
5732
5793
  }
5733
- function wa(e) {
5794
+ function Oa(e) {
5734
5795
  if (e !== void 0) {
5735
5796
  if (e.replay !== "server")
5736
5797
  throw h.other('provisioned chat recovery requires replay "server"');
@@ -5741,18 +5802,18 @@ function wa(e) {
5741
5802
  return { ...e, delaysMs: [...e.delaysMs] };
5742
5803
  }
5743
5804
  }
5744
- function Ia(e, t) {
5805
+ function Ca(e, t) {
5745
5806
  let n, s;
5746
5807
  try {
5747
5808
  n = new URL(e), s = new URL(t, n);
5748
5809
  } catch {
5749
5810
  throw h.other("invalid attachmentBaseUrl");
5750
5811
  }
5751
- if (t.trim() === "" || t.trim() !== t || !t.startsWith("/") && !/^https?:\/\//.test(t) || Na(t) || s.protocol !== "https:" && s.protocol !== "http:" || s.origin !== n.origin || s.username !== "" || s.password !== "" || s.search !== "" || s.hash !== "" || s.pathname === "/")
5812
+ if (t.trim() === "" || t.trim() !== t || !t.startsWith("/") && !/^https?:\/\//.test(t) || Da(t) || s.protocol !== "https:" && s.protocol !== "http:" || s.origin !== n.origin || s.username !== "" || s.password !== "" || s.search !== "" || s.hash !== "" || s.pathname === "/")
5752
5813
  throw h.other("attachmentBaseUrl must be an HTTP(S) path on the endpoint origin");
5753
5814
  return s.toString().replace(/\/$/, "");
5754
5815
  }
5755
- function Na(e) {
5816
+ function Da(e) {
5756
5817
  let t = e;
5757
5818
  for (let r = e.length + 1; r > 0; r -= 1) {
5758
5819
  if (t.includes("\\")) return !0;
@@ -5787,12 +5848,142 @@ function Na(e) {
5787
5848
  }
5788
5849
  return !0;
5789
5850
  }
5790
- function Ta(e, t) {
5851
+ function Ua(e, t) {
5791
5852
  if (!t) return e;
5792
5853
  const n = new AbortController(), s = () => n.abort();
5793
5854
  return e.aborted || t.aborted ? (n.abort(), n.signal) : (e.addEventListener("abort", s, { once: !0 }), t.addEventListener("abort", s, { once: !0 }), n.signal);
5794
5855
  }
5795
- const ka = {
5856
+ const cs = 8;
5857
+ class xa {
5858
+ constructor() {
5859
+ this.generationValue = 0, this.query = null, this.live = /* @__PURE__ */ new Map(), this.value = {
5860
+ sessions: [],
5861
+ nextCursor: null,
5862
+ emptyContinuations: 0
5863
+ };
5864
+ }
5865
+ get generation() {
5866
+ return this.generationValue;
5867
+ }
5868
+ get search() {
5869
+ return this.query;
5870
+ }
5871
+ get state() {
5872
+ return this.value;
5873
+ }
5874
+ begin(t, n = []) {
5875
+ this.generationValue = this.generationValue + 1 >>> 0 || 1;
5876
+ const s = us(t ?? "");
5877
+ return this.query = s || null, this.live.clear(), this.value = {
5878
+ sessions: this.query === null ? [...n] : [],
5879
+ nextCursor: null,
5880
+ emptyContinuations: 0
5881
+ }, this.generationValue;
5882
+ }
5883
+ applyLive(t) {
5884
+ this.live.delete(t.sessionId);
5885
+ const n = this.value.sessions.filter((s) => s.sessionId !== t.sessionId);
5886
+ (this.query === null || La(t, this.query)) && (this.live.set(t.sessionId, t), n.push(t)), n.sort((s, r) => r.updatedAt.localeCompare(s.updatedAt)), this.value = { ...this.value, sessions: n };
5887
+ }
5888
+ merge(t, n, s) {
5889
+ if (t !== this.generationValue) return !1;
5890
+ const r = /* @__PURE__ */ new Map();
5891
+ if (!s)
5892
+ for (const a of this.value.sessions) r.set(a.sessionId, a);
5893
+ for (const a of n.sessions) r.set(a.sessionId, a);
5894
+ for (const a of this.live.values()) r.set(a.sessionId, a);
5895
+ const i = [...r.values()].sort((a, o) => o.updatedAt.localeCompare(a.updatedAt));
5896
+ return this.value = {
5897
+ sessions: i,
5898
+ nextCursor: n.nextCursor,
5899
+ emptyContinuations: n.sessions.length === 0 && n.nextCursor !== null ? this.value.emptyContinuations + 1 : 0
5900
+ }, !0;
5901
+ }
5902
+ canLoadMore() {
5903
+ return this.value.nextCursor !== null && this.value.emptyContinuations < cs;
5904
+ }
5905
+ }
5906
+ class Pa {
5907
+ constructor() {
5908
+ this.generationValue = 0, this.live = /* @__PURE__ */ new Map(), this.value = {
5909
+ history: [],
5910
+ control: "ai",
5911
+ nextCursor: null,
5912
+ emptyContinuations: 0
5913
+ };
5914
+ }
5915
+ get generation() {
5916
+ return this.generationValue;
5917
+ }
5918
+ get state() {
5919
+ return this.value;
5920
+ }
5921
+ begin(t) {
5922
+ return this.generationValue = this.generationValue + 1 >>> 0 || 1, this.live.clear(), this.value = {
5923
+ history: [...t?.history ?? []],
5924
+ control: t?.control ?? "ai",
5925
+ nextCursor: null,
5926
+ emptyContinuations: 0
5927
+ }, this.generationValue;
5928
+ }
5929
+ applyLive(t) {
5930
+ for (const [s, r] of this.live)
5931
+ ce(r, t) && this.live.delete(s);
5932
+ const n = ls(t);
5933
+ n && this.live.set(n, t), this.value = { ...this.value, history: De(this.value.history, [t]) };
5934
+ }
5935
+ removeLive(t) {
5936
+ for (const [n, s] of this.live)
5937
+ ce(s, t) && this.live.delete(n);
5938
+ this.value = {
5939
+ ...this.value,
5940
+ history: this.value.history.filter((n) => !ce(n, t))
5941
+ };
5942
+ }
5943
+ merge(t, n, s) {
5944
+ if (t !== this.generationValue) return !1;
5945
+ let r = s ? [...n.history] : De(n.history, this.value.history);
5946
+ return r = De(r, [...this.live.values()]), this.value = {
5947
+ history: r,
5948
+ control: n.control,
5949
+ nextCursor: n.nextCursor,
5950
+ emptyContinuations: n.history.length === 0 && n.nextCursor !== null ? this.value.emptyContinuations + 1 : 0
5951
+ }, !0;
5952
+ }
5953
+ canLoadMore() {
5954
+ return this.value.nextCursor !== null && this.value.emptyContinuations < cs;
5955
+ }
5956
+ }
5957
+ function us(e) {
5958
+ let t = "", n = !1;
5959
+ for (const s of e) {
5960
+ if (/\p{White_Space}/u.test(s)) {
5961
+ n = t.length > 0;
5962
+ continue;
5963
+ }
5964
+ /\p{Cc}/u.test(s) || (n && (t += " ", n = !1), t += s.toLowerCase());
5965
+ }
5966
+ return t;
5967
+ }
5968
+ function La(e, t) {
5969
+ const n = (s) => s !== void 0 && us(s).includes(t);
5970
+ return n(e.subject) || n(e.contact?.name) || n(e.lastMessage?.text) || (e.lastMessage?.attachments ?? []).some((s) => n(s.name));
5971
+ }
5972
+ function ls(e) {
5973
+ return e.id || e.localId || null;
5974
+ }
5975
+ function ce(e, t) {
5976
+ return !!(t.id && (e.id === t.id || e.localId === t.id) || t.localId && (e.id === t.localId || e.localId === t.localId));
5977
+ }
5978
+ function De(e, t) {
5979
+ const n = [...e];
5980
+ for (const s of t) {
5981
+ const i = ls(s) ? n.findIndex((a) => ce(a, s)) : -1;
5982
+ i >= 0 ? n[i] = s : n.push(s);
5983
+ }
5984
+ return n;
5985
+ }
5986
+ const Va = {
5796
5987
  AI: "ai",
5797
5988
  EXTERNAL: "external",
5798
5989
  USER: "user",
@@ -5800,9 +5991,14 @@ const ka = {
5800
5991
  };
5801
5992
  export {
5802
5993
  h as ClientError,
5803
- ka as MESSAGE_ROLES,
5994
+ cs as MAX_EMPTY_PAGE_CONTINUATIONS,
5995
+ Va as MESSAGE_ROLES,
5804
5996
  S as OrpcError,
5805
- Ea as SessionManager,
5806
- Sa as getSessionManager
5997
+ xa as SessionDirectoryPager,
5998
+ Pa as SessionHistoryPager,
5999
+ Ra as SessionManager,
6000
+ Ma as getSessionManager,
6001
+ us as normalizeSearchField,
6002
+ La as sessionMatchesSearch
5807
6003
  };
5808
6004
  //# sourceMappingURL=origon-web-sdk.js.map